04-04-2006 4:18 PM
I have a code thar recover a table and modify some fields and modify the table, but when i use the assign instruction it gives me an error, can anybody help me please?
Thanks in advance,
regards
data: fld(50) value '((SAPLMEPO)pot[])'.
field-symbols: <fs1> type table.
data: wa_ekpo like ekpo.
assign (fld) to <fs1>.
loop at <fs1> into wa_ekpo.
wa_ekpo-mtart = 'ZSRV'.
clear: wa_ekpo-bstae,
wa_ekpo-kzabs.
modify <fs1> from wa_ekpo index sy-tabix.
endloop.
04-04-2006 4:23 PM
Hi Carl,
Are you sure, if this "((SAPLMEPO)pot[])" is an internal table?
During run time, the assign statement is trying to transfer this data to the field symbol.
If ((SAPLMEPO)pot[]) doesn't exist, then it will give an error.
Regards,
Ravi
04-04-2006 4:23 PM
Question: In what context are you using the ASSIGN? It is in an exit-include (context of SAPLMEPO) or function-exit or something else.
I suspect that the field is not accessible, because out-of-context. If you debug the program and you don't get it in your watch-list it doesn't seem well.
By the way: Looks like a dirty-trick (Maybe try another exit or so?)
Best wishes,
Florin
04-04-2006 4:23 PM
Hi Carl,
Are you sure, if this "((SAPLMEPO)pot[])" is an internal table?
During run time, the assign statement is trying to transfer this data to the field symbol.
If ((SAPLMEPO)pot[]) doesn't exist, then it will give an error.
Regards,
Ravi
04-04-2006 4:27 PM
You were right, the problem was that it was only (SAPLMEPO)pot[].
Thanks and regards
here you have the points
04-04-2006 4:37 PM
Hi,
as far as I understand your coding, you are trying to assign the internal table POT used in program SAPLMEPO via memory to your field-symbol?
First this will not work with two brackets and second I don't know if this will make sense. I know that it is possible to get access in a customer exit by using:
(calling program)Table-Field e.g. (SAPLMEPO)EKKN-MWSKZ
even if the field isn't used as a changing parameter. I don't know if this is helpful for you. Why can't you use the table directly?
Regards
Nicola