Skip to Content
0
Former Member
Nov 16, 2009 at 10:05 AM

Dynamic Fieldcatlog

38 Views

hi all,

IN final internal table we have the data as

YEAR/MONTH BUKRS BELNR GJAHR WRBTR

JAN/2008 0005 10001 2008 101

FEB/2008 0005 10001 2008 102

MAR/2008 0005 10001 2008 210

APR/2008 0005 10001 2008 310

I need to get the output as below

BUKRS BELNR GJAHR JAN/2008 FEB/2008 MAR/2008 APR/2008

0005 10001 2008 101 102 210 310

to get as above i am using dynamic fieldcatlog.

LOOP AT lt_final.

l_index = sy-tabix.

ASSIGN COMPONENT l_index OF STRUCTURE <f_line> TO <f_field>.

<f_field> = lt_final-wrbtr.

ASSIGN COMPONENT 'BUKRS' OF STRUCTURE <f_line> TO <f_field>.

<f_field> = lt_final-bukrs.

ASSIGN COMPONENT 'BELNR' OF STRUCTURE <f_line> TO <f_field>.

<f_field> = lt_final-belnr.

AT LAST.

INSERT <f_line> INTO TABLE <f_tab>.

ENDAT.

ENDLOOP.

i am not getting amount value in the output. if i remove the assign component for bukrs and belnr

in the above then we are able to see amount values in the output.

please let me know what to do to get bukrs and belnr data along with amount data.