07-03-2007 10:21 PM
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
07-04-2007 7:02 AM
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
07-03-2007 10:41 PM
Hari,
May be you can use this report <b>RC1_IDOC_SET_STATUS</b> to change the status ...
Hope this helps..
Chandra.
07-03-2007 10:49 PM
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
07-04-2007 7:02 AM
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