QUESTION POSED ON: 23 July 2008 Once I receive orders IDoc data from webMethods, I need to do validation for the following:
1. PO Number and date: exists or not ?
2. Material: exists or not ?
3. Pricing calculation
If I find any mismatches in the data, I have to populate these in SAP error tables.
Is there any simple way to populate in error tables from IDoc ?
I am getting 51 (Status reset after editing IDoc) because I made some changes in IDoc (we05) and reprocessed the IDoc using BD87.
To continue reading for free, register below or login
Requires Membership to View
To read more you must become a member of SearchSAP.com
Is there any simple way to populate in error tables from IDoc? Yes. In your IDoc processing routine, add these lines:
idoc_status-docnum = idoc_contrl-docnum.
idoc_status-status = '51'.
idoc_status-msgty = 'E'.
idoc_status-msgid = 'VG'.
idoc_status-msgno = '204'.
idoc_status-msgv1 = xvbak-kunnr.
idoc_status-msgv2 = lieferant.
APPEND idoc_status
IDoc processing is a fully customized process. When you receive an IDoc, the IDoc engine looks for the IDOCTYP and MSGTYP in the IDoc header and loks up the processing function module intable EDIFCT. You can now create an own function module Z_IDOC_ORDER_INPUT and replace the original entry. Then your function will be called instead, and you can pre-process the IDoc as you need it.
The best way is like this:
Copy the original idoc processing function IDOC_INPUT_ORDERS05 to Z_IDOC_INPUT_ORDERS
Delete the coding from the function Z_IDOC_INPUT_ORDERS, and make call function to IDOC_INPUT_ORDERS05
Replace the entry in EDIFCT (with WE42 or with SM31 and view V_EDIFCT)
Test it ; it should work as before. Now you can change Z_IDOC_INPUT_ORDERS by adding your code before calling IDOC_INPUT_ORDERS05.
If you decide to quit Z_IDOC_INPUT_ORDERS before calling IDOC_INPUT_ORDERS05, do not forget to set the EDIDC-STATUS value correctly.
Search and Browse the Expert Answer Center Search and browse more than 25,000 question and
answer pairs from more than 250 TechTarget industry experts.
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.
All Rights Reserved, Copyright 2000 - 2009, TechTarget | Read our Privacy Policy SearchSAP.com is a search service provided by TechTarget and is completely independent of and not affiliated with SAP AG.