12-20-2008 7:52 PM
Hi Team,
I have done the following coding to get teh dynamic value sof a field but the assign statement is failing... Its returing the sy-subrc as 4.
LOOP AT <t_tab> INTO <s_tab>.
LOOP AT t_flds.
CONCATENATE '<s_tab>-' t_flds-fieldname INTO v_fldval.
ASSIGN (v_fldval) TO <fldval>.
endloop
endloop.
Appericiate your suggestions.
Thnx,
Ankur..
12-20-2008 9:10 PM
Are the structure lenght for both (v_fldval) and <fldval> is Same?
F1 help od "Assign" says:
The assigned memory area mem_area must be at least as long as the data type specified in casting_spec and must have the same alignment.
12-22-2008 3:44 PM
Hi Amit,
Thanks for your update .. My situation is as follows...
Data: v_fldval Type Fieldnam
Field-symbols: <fldval> type any
The variable will be any field name like(i_mara-matnr/i_bseg-belnr) the assin statement should assign the value of the row to the field symbol.. but its givign subrc as 4.
Appreciate your ur help.
Thanks,
Anjan...
02-19-2009 6:43 AM
Hi Ankur,
I am facing the same problem.........wit no solution in hand, cud u plz let me knw if u have got some solution over this.....
The problem occurs, maybe because the internal table field symbol <t_tab> (and hence <s_tab>) does not contain the fieldname for which u r tryin to get the value in <v_fldval>
Is there a way to chk if a particular fieldname exists in the <t_tab>, so tht if v dont get it, we wud avoid the ASSIGN statement, so tht v dont get a dump
Appreciate ur inputs.....
Regards,
Aparna.