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

put data in sdata idoc

Former Member
0 Likes
3,226

Hi people !!

I am adding data in the segment fields of an idoc.
The segment is: E1EDK01.
The segment fields are:

  VSART_BEZ

  AUGRU_BEZ

  ABRVW_BEZ
I am trying to fill them directly in the SDATA field like below:

DATA: lv_edidd TYPE EDIDD.

LOOP AT int_edidd into lv_edidd.

   IF lv_edidd-segnam = 'E1EDK01'.

     lv_edidd-sdata+167(20) = 'vsart_bez'.

     lv_edidd-sdata+290(40) = 'augru_bez'.

     lv_edidd-sdata+333(20) = 'abrvw_bez'.

   ENDIF.

MODIFY int_edidd from lv_edidd.

ENDLOOP.

Do you know a FUNCTION to know exactly the numbers to cut the string ( the numbers above are reference) and assign them the value?i dont know the position.
Thankks
Regards

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,429

why cant oyu try declaring a structure of type E1EDK01 and then get the values into it..

Eg:

data : lw_E1EDK01 type E1EDK01 .

LOOP AT int_edidd into lv_edidd.

   IF lv_edidd-segnam = 'E1EDK01'.

lw_E1EDK01 =   lv_edidd-sdata.

compare your values and proceed.

...

...

endloop.

thanks,

Sam

3 REPLIES 3
Read only

Former Member
0 Likes
1,429

Hi Ivan,

The requirement is not clear. How you want to cut the string ?

You want to get the string with out cuts ?

'CONV_TEXTSTRING_TO_ITF' will help in that case.

Regards,

Nivedita

Read only

0 Likes
1,429

Hi.
i would like to know if there is a FM to get the values already added in sdata field. ( sdata is a long string )

in this case i need these fields values that are inside of  E1EDK01 segment.

vsart_bez

augru_bez

labrvw_bez

i trying to get them one by one, but i dont know how to get it.

for example.

lv_edidd-sdata+290(40) = 'my new value to show in the system'.
the numbers 290(40) are wrong, because doesn fit the position of the value-

I hope your help
regards

Read only

Former Member
0 Likes
1,430

why cant oyu try declaring a structure of type E1EDK01 and then get the values into it..

Eg:

data : lw_E1EDK01 type E1EDK01 .

LOOP AT int_edidd into lv_edidd.

   IF lv_edidd-segnam = 'E1EDK01'.

lw_E1EDK01 =   lv_edidd-sdata.

compare your values and proceed.

...

...

endloop.

thanks,

Sam