‎2007 Sep 17 4:40 AM
i have three three function codes.now my requirement is how to declare a internal table with function codes.
‎2007 Sep 17 4:46 AM
This is the code to generate a dynamic internal table
DATA : LV_DBTAB1 LIKE DD02L-TABNAME.
DATA : DREF TYPE REF TO DATA.
FIELD-SYMBOLS: <ITAB> TYPE ANY TABLE, " used to store dynamic tables
<WA> TYPE ANY, " used to store record data
<WA1> TYPE ANY . " used to store field data
CREATE DATA DREF TYPE STANDARD TABLE OF (LV_DBTAB1)
WITH NON-UNIQUE DEFAULT KEY.
ASSIGN DREF->* TO <ITAB> .
* selects all data
SELECT * FROM (LV_DBTAB1) INTO TABLE <ITAB> .
LOOP AT <ITAB> ASSIGNING <WA>.
"....
endloop.
‎2007 Sep 17 4:49 AM
Hi..
Declare the ITAB using SY-UCOMM as the Data type.
Example:
Data : it_ucomm type Table of SY-UCOMM with header line.
IT_UCOMM = 'ADD'.
APPEND IT_UCOMM.
IT_UCOMM = 'SUB'.
APPEND IT_UCOMM.
SET PF-STATUS 'GUI1' EXCLUDING IT_UCOMM.
reward if Helpful.