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

IDOC segments

Former Member
0 Likes
1,550

Hi all,

i have a scenario in IDOC,

i have route information in E1EDK01 and shipping conditions information in E1EDP01.

based on certain conditions I need to change the Shipping condition (E1EDP01) based on the route (E1EDK01).

How can i read the filed in e1edk01 in the segment e1edp01.

Can someone suggest me hints/solutions to the above problem.

E1EDP01-VSBED needs to be modified based on E1EDK01-ROUTE.

Summarizing : reading the data of one segment into another.

Thanks in Advance

srikanth.p

Hi all,

i have a scenario in IDOC,

i have route information in E1EDK01 and shipping conditions information in E1EDP01.

based on certain conditions I need to change the Shipping condition (E1EDP01) based on the route (E1EDK01).

How can i read the filed in e1edk01 in the segment e1edp01.

Can someone suggest me hints/solutions to the above problem.

E1EDP01-VSBED needs to be modified based on E1EDK01-ROUTE.

Summarizing : reading the data of one segment into another.

Thanks in Advance

srikanth.p

3 REPLIES 3
Read only

Former Member
0 Likes
970

Srikanth,

Once the idoc is created, you cannot modify it programatically. But when processing the idoc in the input function say IDOC_DELVRY_INPUT (if your message is DELVRY) you can change the variable data for the segment after the segment is read.

Idoc data is available in EDID4 table. you can query based on the idoc number and segment name. then you move the sdata field into a structure of the same type as the segment (for every segment a structure is created in SE11 with same name). Then you will be able to access the field that you want to access.

You can also write a BDC program or CATT to call se38 and execute program IDOC_DISPLAY_DATA and put in the idoc number and segment name. Then, you can use the menu option Data Record -> Display -> Change to switch into the edit mode and then edit the segment data based on your criteria. But keep in mind that when the idoc is edited it changes to status 69 and a copy of the original idoc is created in status 70.

Salai.

Read only

0 Likes
970

Hi prakash,

My IDOC is indound and Fm is IDOC_INPUT_ORDER

Here in one segment route is present and in the other shipping condition is present.

Route field is having value, but shipping condition is not having an value from the incoming IDOC.

Now i need to take the value of the route (from one segment) and change the Shipping conditions(other segment) in the segment.

Can this be possible.

Please do suggest me a solution,

Thanks

Srikanth.P

Read only

0 Likes
970

I have already suggested the solution. Either

a. change the value in the runtime when the idoc is processing. In this case the idoc segment data is not modified but when it is processed, a different value is used based on your code. You will have to find a user exit or you can create an enhancement.

b. do a BDC to the program as I suggested above. In this case, the idoc is updated.

I would suggest option A is this is a regular scenario. if this is a one time scenario for error handling etc, go with option b.

Salai.