‎2007 May 07 9:46 AM
Hi all,
I have a following problem with this piece of code:
CLEAR lv_fieldname.
MOVE 'VALUEPART1' TO lv_fieldname.
ASSIGN COMPONENT lv_fieldname OF STRUCTURE ev_targetstruct TO <lf_valuepart>.
<lf_valuepart> = <ls_targetline>+0(240).
CLEAR lv_fieldname.
MOVE 'VALUEPART2' TO lv_fieldname.
ASSIGN COMPONENT lv_fieldname OF STRUCTURE ev_targetstruct TO <lf_valuepart>.
<lf_valuepart> = <ls_targetline>+240(240).
The ev_targetstruct has a following structure:
STRUCTURE TE_STRUC CHAR 30 0
VALUEPART1 VALUEPART CHAR 240 0
VALUEPART2 VALUEPART CHAR 240 0
VALUEPART3 VALUEPART CHAR 240 0
VALUEPART4 VALUEPART CHAR 240 0
The field VALUEPART1 is filled correctly and the value is transfered to the structure ev_targetstruct. But I am having trouble with the VALUEPART2, this field is not filled even though the <lf_valuepart> is filled from <ls_targetline>+240(240). But the value from <lf_valuepart> is not transfered to the structure ev_targetstruct.
Do you have any idea what might be the problem?
Thanks a lot!
Tomas Kraus
‎2007 May 07 9:53 AM
Hi,
Cud you write the statements where you are passing the values of fieldsymbols to the structure
‎2007 May 07 9:59 AM
Hi,
there are no such statements, the above coding is all there is. The VALUEPART1 is filled and transfered to the structure but in the next step the VALUEPART2 is not passed to the structure.
Thanks for help.
Tomas
‎2007 May 07 10:00 AM
Maybe try to use a new <lf_valuepart2> in the second case 😃
‎2007 May 07 10:04 AM
Hi,
Check the statement for <lf_valuepart> = <ls_targetline>+240(240).
and also the declaration for VALUEPART2.
‎2007 May 07 10:08 AM
also let us show the declaration for <lf_valuepart>??, is its length greater than 480?
‎2007 May 07 10:18 AM
The <lf_valuepart> is defined as VALUEPART2:
MOVE 'VALUEPART2' TO lv_fieldname.
ASSIGN COMPONENT lv_fieldname OF STRUCTURE ev_targetstruct TO <lf_valuepart>.
<lf_valuepart> = <ls_targetline>+240(240).
ie. <lf_valuepart> length is 240
‎2007 May 07 10:24 AM
CLEAR lv_fieldname.
MOVE 'VALUEPART1' TO lv_fieldname.
ASSIGN COMPONENT lv_fieldname OF STRUCTURE ev_targetstruct TO <lf_valuepart>.
<b><lf_valuepart> = <ls_targetline>+0(240).</b>
CLEAR lv_fieldname.
MOVE 'VALUEPART2' TO lv_fieldname.
ASSIGN COMPONENT lv_fieldname OF STRUCTURE ev_targetstruct TO <lf_valuepart>.
<b><lf_valuepart> = <ls_targetline>+240(240).</b>
You say that ]<lf_valuepart> is only 240 , but you are assigning it a length of 480,
so is the dump , change the second bold line to this , declare another variable <lf_valuepart1>
<b><lf_valuepart1></b> = <ls_targetline>+240(240).
‎2007 May 07 10:27 AM
the value is stored but probably not visible due to some length problem.
or are usure <ls_targetline>+240(240) is not blank?
‎2007 May 07 10:34 AM
Hi,
the <ls_targetline>+240(240) is not empty, the <lf_valuepart> is filled - there is no short dump, but it is not transfered to the ev_targetstruct whereas in the first step it is transfered to the structure....that's what puzzles me....
‎2007 May 07 10:36 AM
u say <lf_valuepart> length is 240 and u want to fill that with length of 480 , how is that possible?????
‎2007 May 07 10:40 AM
‎2007 May 07 10:52 AM
Hi,
it doesn't work either. Thanks for your suggestion...
Tomas