Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

field symbols

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

former_member181962
Active Contributor
0 Kudos

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

4 REPLIES 4

Former Member
0 Kudos

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

former_member181962
Active Contributor
0 Kudos

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

0 Kudos

You were right, the problem was that it was only (SAPLMEPO)pot[].

Thanks and regards

here you have the points

Former Member
0 Kudos

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