Posted: Sun Sep 02, 2007 5:38 pm Post subject: Динамическое создание внутренней таблицы
Code:
REPORT ztest91 .
TYPE-POOLS: slis.
TABLES: dd02l.
DATA: lt_fieldcat TYPE slis_t_fieldcat_alv,
lf TYPE lvc_t_fcat,
vr TYPE REF TO data,
fc LIKE LINE OF lt_fieldcat,
lfc LIKE LINE OF lf.
DATA: g_exit_caused_by_caller,
gs_exit_caused_by_user TYPE slis_exit_by_user.
FIELD-SYMBOLS: <p> TYPE STANDARD TABLE.
PARAMETERS: tabn LIKE dd02l-tabname.
CLEAR dd02l.
SELECT SINGLE * FROM dd02l WHERE tabname = tabn.
IF NOT dd02l-tabname IS INITIAL.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = tabn
CHANGING
ct_fieldcat = lt_fieldcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2.
LOOP AT lt_fieldcat INTO fc.
MOVE-CORRESPONDING fc TO lfc.
APPEND lfc TO lf.
ENDLOOP.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.