cancel
Showing results for 
Search instead for 
Did you mean: 

Field-Simbol: Assign Internal Table

Former Member
0 Kudos

Hi,

I want read the internal table XOBJK_ALL in program SAPLIPW1 from program MM07MSE0.

DATA: va_tab2(30) VALUE '(SAPLIPW1)XOBJK_ALL'.

FIELD-SYMBOLS <lt> TYPE table .

ASSIGN (va_tab2) TO <lt>.

If I execute this code a dump is occuring at line:

ASSIGN (va_tab2) TO <lt>.

Please help me. Thank you.

Accepted Solutions (1)

Accepted Solutions (1)

manuel_bassani
Contributor
0 Kudos

Hi Fabio,

i think you are assigning the work area instead the table

try this:


'(SAPLIPW1)XOBJK_ALL[]' 

and remember also to always check the sy-subrc of assign statement


ASSIGN (va_tab2) TO <lt>.
if sy-subrc = 0.
  ... use field-sumbol <lt>
endif.

or


ASSIGN (va_tab2) TO <lt>.
if <lt> is assigned.
  ... use field-sumbol <lt>
endif.

this will avoid short dump.

Regards, Manuel

If you find this answer useful, please remember to reward some points and close the thread if your problem is solved

Thanks

Message was edited by: Manuel Bassani

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Try to use this way.

DATA: va_tab2(30) VALUE '(SAPLIPW1)XOBJK_ALL'.

DATA XOBJK_ALL LIKE RIPW0 OCCURS 10 WITH HEADER LINE.

FIELD-SYMBOLS <LT> STRUCTURE RIPW0 DEFAULT XOBJK_ALL .

ASSIGN (va_tab2) TO <LT>.

former_member188685
Active Contributor
0 Kudos

hi fabio,

for me it is not giving any dump..

DATA: va_tab2(30) VALUE '(SAPLIPW1)XOBJK_ALL'.
FIELD-SYMBOLS <lt> TYPE table .

ASSIGN (va_tab2) TO <lt>.

same code as you did..

can you check the same..

regards

vijay