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

Typical problem with MASTER_IDOC_DISTRIBUTE

Former Member
0 Likes
1,046

I have written the custom program to fetch the data and to form an outbound IDoc using MASTER_IDOC_DISTRIBUTE.

The problem is when i execute the pgm 1st time the IDoc got generated. As it was in Yellow state i tried to execute the program RSEOUT00. Even then it was in yellow state.

Now again i ran the custom program and create danother IDoc. Even now this IDoc is also in Yellow state. But now when i ran RSEOUT00 program with these two IDoc numbers, now the 1st one got into green while the 2nd remained in Yellow.

Now my Questions are

1. First of all why it was in yellow color when i ran the program first time even though when i set "Trigger immediately " at partner profiles.

2. Why the first one is going into green state when the second idoc got generated ?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
908

Hi,

The problem might be because your custom program might be locking the IDOC when you executed the RSEOUT00.

Generate the IDoc. exit your custom program completely and then execute the RSEOUT00.

Hope this helps.

I have written the custom program to fetch the data and to form an outbound IDoc using MASTER_IDOC_DISTRIBUTE.

The problem is when i execute the pgm 1st time the IDoc got generated. As it was in Yellow state i tried to execute the program RSEOUT00. Even then it was in yellow state.

Now again i ran the custom program and create danother IDoc. Even now this IDoc is also in Yellow state. But now when i ran RSEOUT00 program with these two IDoc numbers, now the 1st one got into green while the 2nd remained in Yellow.

Now my Questions are

1. First of all why it was in yellow color when i ran the program first time even though when i set "Trigger immediately " at partner profiles.

2. Why the first one is going into green state when the second idoc got generated ?

5 REPLIES 5
Read only

Former Member
0 Likes
909

Hi,

The problem might be because your custom program might be locking the IDOC when you executed the RSEOUT00.

Generate the IDoc. exit your custom program completely and then execute the RSEOUT00.

Hope this helps.

Read only

Former Member
0 Likes
908

try to use the FM "EDI_OUTPUT_NEW".

This should solve your problem.

Read only

0 Likes
908

Hi Gordon,

Can you explain with more inputs plz ?

Read only

0 Likes
908

HI Friends,

i have solved the issue by myself.

I have just used the FM EDI_DOCUMENT_DEQUEUE_LATER before commit wok statement.

Can any one explain me the reason why it worked out ?

Read only

0 Likes
908

Hi,

This FM is used to Unlock IDoc after close.

If you use the IDoc API, a logical SAP lock is relocated during the open. This logical lock is normally cancelled during the close. However, you can use a parameter to set it so that it is not unblocked. You can then later explicitly include this lock.