03-06-2018 2:34 PM
Hi expers,
Whenever I créate a new sales order through VA01, after saving it, some changes are made in user exit USEREXIT_REFRESH_DOCUMENT.
The problem is whenever I créate the sales order through EDI (tx. WE19). The programa doesn't run this exit.
I tried to to my changes in USEREXIT_SAVE_DOCUMENT but at this momento I don't have all the required data, so I need to do my changes later.
Is there any possibility to do that?
thanks in advance,
Maria
03-06-2018 4:45 PM
03-07-2018 9:35 AM
They need to change carrier partner depending on the value they have at this moment. The problem is that this carrier doesnt' exist at this moment in SAP, so when I chexk its ADRNR there is no value, even if I have already the sales order number.
I tried to do my changes in user exit EXIT_SAPLVEDA_004 and it seems it works using bapi BAPI_SALESORDER_CHANGE. But maybe there is an easier way to do this.
Thanks!
03-07-2018 9:25 PM
In case of EDI, you can simply add a partner segment using an EDI user exit before the order gets posted. There are also user exits in the partner determination process. Google -> sales order partner determination user exits site:sap.com
Based on what value exactly are you changing the carrier? It really should not be changed "behind the scenes" after it's determined. It's just not a good design.
03-08-2018 8:41 AM
When I create a sales order using VA01, the carrier exits in SAP so I have no problems in userexit save_document_prepare. But in this case, EDI, the carrier doesn't exist when executing the userexit. That's why I'm now using IDOC_INPUT_ORDERS's userexits..