02-19-2009 6:52 AM
LOOP AT <table> INTO <struct>.
CLEAR l_uom.
lf_fieldname = '<struct>-UOM'.
ASSIGN (lf_fieldname) TO <uom>.
l_uom = <uom> .
ENDLOOP.
02-19-2009 7:18 AM
What is the problem? The fact that fieldsymbol is not assigned some times, or is it never assigned?
No matter what, you can always check if field symbols was assigned using:
IF <fs> IS ASSIGNED.
ENDIF.
How about that, ABAP command to check assignment.....Well I'll be .....
02-19-2009 6:55 AM
02-19-2009 7:14 AM
02-19-2009 6:56 AM
Could be many reasons.
But most often i got this error due to my Typo in Fieldcat. Either in Small letters or typo in fieldcat .
02-19-2009 6:59 AM
1.there might be lengt mismatch..
ie lf_fieldname = '<struct>-UOM'.
lenght of lf_fieldname and '<struct>-UOM' might be different
2. remove the bracket
ASSIGN If_fieldname TO <uom>. without bracket
hope it solves the issue
Edited by: pratyush v on Feb 19, 2009 12:31 PM
02-19-2009 7:01 AM
Hi Janaki,
Instead of ASSIGN (lf_fieldname) TO <uom>.
try using
ASSIGN COMPONENT 'UOM' OF STRUCTURE <struc> TO <uom>.
02-19-2009 7:18 AM
I need to put the contents of lf_fieldname into <uom>.......when lf_fieldname is <struct>-UOM.....
so
assign lf_fieldname to <uom> is of no use...........and hence v use
assign (lf_fieldname) to <uom>
my problem is since i dont knw till the run time if UOM field is present in the table or not, and whn it's not, no mem_area is referenced in the bkgrnd and hence i get an error...........i need to knw if v have a provision to chk if (lf_fieldname) has ne value or not....
Please help....:)
Regards,
Aparna.
02-19-2009 7:18 AM
What is the problem? The fact that fieldsymbol is not assigned some times, or is it never assigned?
No matter what, you can always check if field symbols was assigned using:
IF <fs> IS ASSIGNED.
ENDIF.
How about that, ABAP command to check assignment.....Well I'll be .....
02-19-2009 7:22 AM