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: 

Problem with assign component statement

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

what does your dump say?

0 Kudos

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

0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

Thanks Leandro, my issue is resolved