*&---------------------------------------------------------------------*
*& Report ZCONRAD_TMP04
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT zconrad_tmp04.
DATA:
lv_seq TYPE num2,
lv_tabnm TYPE tabnm,
lr_data TYPE REF TO data,
lr_exception TYPE REF TO cx_root,
lv_ex_text TYPE string,
lr_table TYPE REF TO cl_salv_table.
FIELD-SYMBOLS:
<data> TYPE ANY TABLE,
<line> TYPE ANY,
<field> TYPE ANY.
lv_seq = 20.
lv_tabnm = 'SFLIGHT'.
TRY .
CREATE DATA lr_data TYPE TABLE OF (lv_tabnm).
CATCH cx_root INTO lr_exception.
lv_ex_text = lr_exception->get_text( ).
MESSAGE s000(db) WITH lv_ex_text DISPLAY LIKE 'E'.
RETURN.
ENDTRY.
IF lr_data IS BOUND.
ASSIGN lr_data->* TO <data>.
IF sy-subrc = 0.
SELECT *
INTO TABLE <data>
FROM (lv_tabnm).
IF sy-subrc = 0.
* LOOP AT <data>
* ASSIGNING <line>.
*
* ASSIGN COMPONENT 2 OF STRUCTURE <line> TO <field>.
* IF sy-subrc = 0.
* WRITE:/ <field>.
* ENDIF.
* ENDLOOP.
TRY.
cl_salv_table=>factory(
* exporting
* r_container = custom_container
* container_name = 'BCALVC_EVENT1_CONT1'
IMPORTING
r_salv_table = lr_table
CHANGING
t_table = <data> ).
lr_table->display( ).
CATCH cx_salv_msg. "#EC NO_HANDLER
ENDTRY.
ENDIF.
ENDIF.
ENDIF.
'ERP-SAP > ABAP' 카테고리의 다른 글
<ABAP> ALV Fields Catalog 속성값 정리 사이트 (0) | 2014.01.16 |
---|---|
<ABAP> SAVE_TEXT, READ_TEXT 저장시 사용 펑션 (0) | 2013.12.18 |
<ABAP> SM37 (BATCH) DEBUG 배치 디버깅 (0) | 2013.12.03 |
<ABAP> DB수정 프로그램 (0) | 2013.11.06 |
<ABAP> Data Element read 하기, Table 정보 등.'DDIF_FIELDINFO_GET' 'NAMETAB_GET' (0) | 2013.09.11 |