Application Development and Automation 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: 
Read only

Problem with assign component statement

Former Member
0 Likes
1,148

Hi ,

I have problem in using Assing componet statement

here is my values

Var1 = I_FEBKO

var2 = butxt.

now i wrote a statement like

ASSIGN lv_temp3 TO <lfs_strname>.

ASSIGN lv_temp4 TO <lfs_fieldname>.

ASSIGN COMPONENT <lfs_fieldname> OF STRUCTURE <lfs_strname> TO <lfs_kunnr>.

but it is not working and dumping , can you plese suggent on where i am going wrong.

thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
915

Hi,

See:

lv_temp3 = 'I_FEBKO'.
lv_temp4 = 'BUTXT'.

ASSIGN (lv_temp3) TO <lfs_strname>.

ASSIGN COMPONENT lv_temp4 OF STRUCTURE <lfs_strname> TO  <lfs_kunnr>.

Best regards,

Leandro Mengue

5 REPLIES 5
Read only

Former Member
0 Likes
915

what does your dump say?

Read only

0 Likes
915

actually after the assing statement , i am trying to move the values of <lfs_kunnr> to an other filed

the dump says you are trying to access an unassigned filed string.

but i have values in that assinged structure

Read only

0 Likes
915

Hi,

What are the values of lv_temp3 and lv_temp4 ?

If it has "I_FEBKO", should be:

ASSIGN (lv_temp3) TO <lfs_strname>.

Best regards,

Leandro Mengue

Read only

Former Member
0 Likes
916

Hi,

See:

lv_temp3 = 'I_FEBKO'.
lv_temp4 = 'BUTXT'.

ASSIGN (lv_temp3) TO <lfs_strname>.

ASSIGN COMPONENT lv_temp4 OF STRUCTURE <lfs_strname> TO  <lfs_kunnr>.

Best regards,

Leandro Mengue

Read only

0 Likes
915

Thanks Leandro, my issue is resolved