Skip to Content
0
Former Member
Jul 06, 2009 at 10:15 AM

Dynamically assignment of an field to a workarea

31 Views

Dear Experts,

I am reading a XML with the below Function Module.

I want to "save" the data of the Import-Parameter (gt_file). The value of gt_file (cname) is according to the fields of wa_beanstandung.

Now, my Problem is, I am not able to assign the value of cname to the workarea. What shall I use for the field of workarea.

Look the given code please.

If you have any Idea please let me know. Or it would be very nice to have a coding how to solve that.

I thank you very much in advance.

With kind regards

CALL FUNCTION 'SMUM_XML_PARSE'

EXPORTING

xml_input = return_pdf-xml

TABLES

xml_table = gt_file

return = gt_return.

LOOP AT gt_file INTO wa_file.

LOOP AT itab_dd03l.

IF itab_dd03l-fieldname EQ wa_file-cname.

IF wa_file-cvalue IS NOT INITIAL.

  • wa_beanstandung-??? = wa_file-cvalue. <-- Here the workarea-field should assigned dynamically

append wa_beanstandung to zbeanstandung.

ENDIF.

ENDIF.

ENDLOOP.

ENDLOOP.