Skip to Content
0
May 10, 2013 at 04:34 PM

assigning values to dynamic fields of a workarea

1003 Views

Hello Friends,

I have the following requirement, My apologies if I put in the wrong forum.

I need to populate a internal table workarea, where the field names of the workarea are stored in another internal table

eg: IT_GLACCOUNT_TAB TYPE STANDARD TABLE OF /BI0/PGL_ACCOUNT,

IWA_GLACCOUNT_TAB TYPE /BI0/PGL_ACCOUNT

TYPES: BEGIN OF I_ATTRIBUTES_HEADER,

EPMNODE TYPE C LENGTH 50,

BWNODE TYPE C LENGTH 50,

TECHBWNODE TYPE C LENGTH 50,

END OF I_ATTRIBUTES_HEADER. -- this would contain the technical names of the attributes for eg

EPMNODE BWNODE TECHBWNODE

glaccount 0gl_account glaccount

acct_type zaccttype /bic/zaccttype

I should not write

iwa_glaccount_tab-glaccount = '110001'

instead glaccount field name should be read from the intenal table above inside the loop

eg:

loop into...

iwa_glaccount_tab-"here I should have the dynamic field populated from internal table" = '110001'

endloop