on 2017 Feb 20 12:11 AM
Dear Experts,
I have the challenge to realize outbound communication for Purchase Orders in SAP by Design implementation.
It means, the PO should go out automatically from SAP ByD to another external application X.
Additionally POs have to go out only when they have been somehow changed.
If something has been changed in the purchase order and PurchaseOrderLifeCycleStatusCode is 6, 7 or 9, then the whole order should be sent to the external application.
The problem is, that the SAP has to initialize communication, push the orders via Web Service to the external application (called X in the following text) and, as the response from X system, get the confirmation that the orders have been received properly by X.
I'm totally new to SAP, but as I know, SAP by Design in the standard can only send purchase orders through web service as a response to the query from external application.
So, SAP by Design cannot initialise communication to create purchase orders on the external application because SAP waits for the proper query and only then sends the information to the external application. Of course please correct me if I'm wrong.
Here is what I came up with:
1. To ensure orders' changes tracing, I will add two Extension Fields to Purchase Orders:
a. send_flag (True - order should be sent to X / False - order should not be sent to X) - it says if the order has been changed and should be sent to external application X.
This send_flag will be set to True by Event-BeforeSave event created on the extension of standard AP.Purchasing.Global:PurchaseOrder object.
The send_flag will be then switched to False during transmission receiving confirmation from external application X.
b. version - it will be the number increased during each change - thanks to this we know, among other things, how many times the order has been sent to X.
The value of this field will be increased by Event-BeforeSave event created on the extension of standard AP.Purchasing.Global:PurchaseOrder object.
2. To generate outbound web service message I will prepare some business object (BO) in SDK (with SAP Cloud Application Studio).
This BO will have some action which will search for PurchaseOrder instances which send_flag is set to True (so these ones which should be sent to external application X).
Based on these data the BO will generate Request to the external application X. The system X will be prepared for this and will be waiting for such Requests.
This request will have method Create, which will create purchase orders on the external application X.
The system X will response in the same session by the numbers of orders (and their versions) which have succeeded.
My BO will receive this response from X and will change send_flag for succeeded purchase orders to False.
Please share your opinion if my scenario does make sense and is doable?
As I mentioned at the beginning I'm totally new to SAP. If the scenario totally doesn't make sense, please tell me - I'm opened to criticism.
I will be very grateful for any suggestion/idea/path how to realize such outbound communication scenario for Purchase Orders in SAP by Design.
Thank you in advance.
Request clarification before answering.
Hi Piotr,
We're not using this right now so this is a bit of a theoretical answer, but I think ByD can send the PO to your Supplier if you do the following:
This should result in your PO's being sent to X in XML format automatically.
Of course, it requires that system X is able to interpret the XML it receives from ByD correctly 🙂
If you have already explored this and it does not work for you, my apologies....
Regards,
Eelco
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Eelco,
thank you very much for your answer.
Do you maybe know, if this solution handles a confirmation from the X system, which tells us that the order data were received properly,
and only then marks the local order's status as sent to external system?
Thank you in advance.
Best regards,
Piotr Kowalski
User | Count |
---|---|
95 | |
12 | |
10 | |
8 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.