Hi,
I am creating a dynamic internal table which consists of some fields which are being filled dynamically and some fields which are being filled from a static internal table. I am facing two issues in the development:-
1. The static fields are being populated into the dynamic work area successfully but I am not able to modify the dynamic in ternal table using the work area.
PFB my code:
READ TABLE I_LEVEL1 WITH KEY KSCHL = WA_T681-KSCHL
KOTABNR = WA_T681-KOTABNR.
IF SY-SUBRC EQ 0.
<WA_DYN_TABLE1>-UDATE = I_LEVEL1-UDATE.
<WA_DYN_TABLE1>-UTIME = I_LEVEL1-UTIME.
MOVE-CORRESPONDING <WA_DYN_TABLE1> TO <WA_DYN_TABLE>.
MODIFY <I_DYN_TABLE> FROM <WA_DYN_TABLE> TRANSPORTING UDATE
UTIME.
The dynamic filds of <I_DYN_TABLE> are being populated successfully but the MODIFY statement gives an error.
The specified type has no structure and therefore no component called UDATE.
2. The other problem I am facing is that while displaying output for the same ALV, no column names are being displayed.
I am using OOPS ALV.
PFB my code for the same:
CL_SALV_TABLE=>FACTORY( IMPORTING R_SALV_TABLE = O_TABLE
CHANGING T_TABLE = <I_DYN_TABLE> ).
O_FUNCTIONS = O_TABLE->GET_FUNCTIONS( ).
O_FUNCTIONS->SET_ALL( ABAP_TRUE ).
O_COLUMNS = O_TABLE->GET_COLUMNS( ).
O_COLUMNS->SET_OPTIMIZE( 'X' ).
Please help me regarding the issues.
Thanks.
Edited by: Suhas Saha on Jan 18, 2012 3:11 PM