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: 

Fetch the USER Status of Service Order during commit

ricky_shaw
Contributor
0 Kudos
199

Hello Experts,
I need to dynamically catch the latest USER status of a Service Order whenever there is a change and send this in
an IDOC (Z)segment.

I am submitting the program for IORD tcode to issue this change.

I am writing code to fill the Idoc segments in exit include: ZXIWMIU01 for FM: IDOC_OUTPUT_IORDER and the Idoc
is getting populated.


This user status change is only happening after commit work stmt BUT PRIOR to this commit work, the IDOC is
getting posted (status 30) thru FM: MASTER_IDOC_DISTRIBUTE
I tried to get the USER status by triggering my Z** FM in UPDATE TASK but after this FM the code is not going to
the exit to populate the IDOC segment.

Can anyone suggest?

Thanks

3 REPLIES 3

former_member192109
Participant
0 Kudos
81

Hi Rick,

     i am not much of a functional guy so i am not sure what IORD is but a generic way (or a suggestion) for this would be to try it as written below.

          As you say that the user status change is happening only after commit , then you should try configuring a message output  ( If possible )for this and assign the code for triggering the IDOC to this particular output type. this will ensure that the commit happens first and then the IDOC is triggered by the output later.

     Hope it helps.

Regards,

Umar Syed.

0 Kudos
81

Hello,

Can any one help me on this one plsssssss.

0 Kudos
81

Hi Umar,

The IDoc triggering is SAP Std for this Std IDOC.

How can we assign this to output type.? Can you pls elaborate..