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: 

Outbound IDoc status set as 31

Former Member
0 Kudos

Hi Friends,

I am working on the outbound IDoc interface IDOC_OUTPUT_ORDRSP. I modify/add few segments based on the business conditions using the user-exit EXIT_SAPLVEDC_003 (ZXVEDU15). According to the business need, I have to set the IDoc status record as 31. Now IDoc is being created with status record as 30. Is there any way to set the status record with status 31 within the scope of this IDoc interface IDOC_OUTPUT_ORDRSP.

Pls let me know if any user exit for this same purpose. If not possible to set status explain me the reason for that.

Thanks

Hari

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

You can use this standard program RC1_IDOC_SET_STATUS to change IDoc status 30 to another status.

If the program does't exits then try this ...

DATA: L_EDIDC_TAB LIKE EDIDC OCCURS 1 WITH HEADER LINE,

L_IDOC_STATUS_TAB LIKE BDIDOCSTAT OCCURS 1 WITH HEADERLINE,

L_IDOC_CONTROL LIKE EDIDC.

L_IDOC_STATUS_TAB-DOCNUM = <your IDoc number>.

L_IDOC_STATUS_TAB-STATUS = '68'.

APPEND L_IDOC_STATUS_TAB.

CALL FUNCTION 'IDOC_STATUS_WRITE_TO_DATABASE'

EXPORTING

IDOC_NUMBER = L_EDIDC_TAB-DOCNUM

IMPORTING

IDOC_CONTROL = L_IDOC_CONTROL

TABLES

IDOC_STATUS = L_IDOC_STATUS_TAB

EXCEPTIONS

IDOC_FOREIGN_LOCK = 1

IDOC_NOT_FOUND = 2

IDOC_STATUS_RECORDS_EMPTY = 3

IDOC_STATUS_INVALID = 4

DB_ERROR = 5

OTHERS = 6.

...

<b>Reward points</b>

Regards

Message was edited by:

skk

3 REPLIES 3

former_member187255
Active Contributor
0 Kudos

Hari,

May be you can use this report <b>RC1_IDOC_SET_STATUS</b> to change the status ...

Hope this helps..

Chandra.

Former Member
0 Kudos

Hi Hari,

I guess no need to modify the IDOC User exit,let me say one example

suppose i have one sales order ,if customer is not belongs to USA Country ,then i should not use IDOC ,i used to write the code under VOFM Routine,here i can use NAST Table,simply write sy-subrc eq 4.

Thanks

Seshu

Former Member
0 Kudos

Hi,

You can use this standard program RC1_IDOC_SET_STATUS to change IDoc status 30 to another status.

If the program does't exits then try this ...

DATA: L_EDIDC_TAB LIKE EDIDC OCCURS 1 WITH HEADER LINE,

L_IDOC_STATUS_TAB LIKE BDIDOCSTAT OCCURS 1 WITH HEADERLINE,

L_IDOC_CONTROL LIKE EDIDC.

L_IDOC_STATUS_TAB-DOCNUM = <your IDoc number>.

L_IDOC_STATUS_TAB-STATUS = '68'.

APPEND L_IDOC_STATUS_TAB.

CALL FUNCTION 'IDOC_STATUS_WRITE_TO_DATABASE'

EXPORTING

IDOC_NUMBER = L_EDIDC_TAB-DOCNUM

IMPORTING

IDOC_CONTROL = L_IDOC_CONTROL

TABLES

IDOC_STATUS = L_IDOC_STATUS_TAB

EXCEPTIONS

IDOC_FOREIGN_LOCK = 1

IDOC_NOT_FOUND = 2

IDOC_STATUS_RECORDS_EMPTY = 3

IDOC_STATUS_INVALID = 4

DB_ERROR = 5

OTHERS = 6.

...

<b>Reward points</b>

Regards

Message was edited by:

skk