cancel
Showing results for 
Search instead for 
Did you mean: 

Triggering of outbound Enterprise service PurchaseOrderCreatedInformation_Out

Former Member
0 Kudos

I have read through various posts relating to triggering outbound standard Enterprise Services. In general, I am surprised at the lack of any detailed SAP documentation on this, especially given that these are standard.

In particular, we are interested in invoking outbound proxy PurchaseOrderCreatedInformation_Out, contained in namespace http://sap.com/xi/APPL/Global2, to inform an external non-SAP system that we created a po.  I have pieced together that worklfow WS53800008 can be used to invoke this service (and others) - for this to work though, it needs to be triggered with a binding of event_creator & guid.

Here is some SAP documentation: http://help.sap.com/SCENARIOS_BUS2008/helpdata/EN/28/a7511f44f34d25a2c8732e48c0932f/content.htm

for one of the other po outbound services, which is severely lacking. It simply says to link bus2012.created -> WS53800008, but says nothing whatsoever about binding.  BUS2012 does not contain a guid.  I have also see some posts alluding to using SWF_BAM, which I have no idea how this can be accomplished without significant coding for the mapping. I have seen other posts alluding to using class CL_SE_PUR_PO_WF_OUT.created in the swf_bam linkage,etc., but cannot seem to get that event to trigger.

My question is: has anyone used this service PurchaseOrderCreatedInformation_Out?  How in fact did you invoke it - specifically, what exactly did you do to bind the guid in, i.e. pass it to the workflow.  Again, our scenario is fairly simple: create a po and replicate the data out via PI to an external system.

Regarding outbound services in general, is there any good, detailed documentation out there that shows the specific steps needed to invoke these.

Any light you can shed on this topic I would love to hear it. So far whenever e have thought about using an outbound standard Enterprise Service, it has been a painful process trying to use standard means to trigger it.

Regards,

Keith

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi guys,

The Enterprise Services:

PurchaseOrderChangedInformation_Out

PurchaseOrderCreatedInformation_Out

Are triggered by the workflow WS53800008 - you can check it at the event linkage on T-Code: SWETYPV for BUS2012 (PO) - and the events create/change are delivered deactivated in this workflow, you need to activate them. Go to T-Code SWDD and call the WFL above, open the event create/change and activate (transport request required).

After activating these events all PO confirmations started being send out from ERP, now the BAdI PUR_SE_PO_INTERFACE_OUT_SELECT has to be implemented in order to filter out those services based on the content (e.g. PO nbr, classification of a vendor or other details from the message). (check sap note 1317789).

Note business function LOG_ESOA_OPS_2 has to be active as well (T-Code: SFW5).

Regards,

Ricardo

Former Member
0 Kudos

Hi all - thanks very much for your responses.  I am finally getting back to updating this post specific to how we made the scenario work.

Yes, we had found the workflow WS53800008 was the one to send this PurchaseOrderCreatedInformation_Out service out.  We linked it up using swetypv, etc., but see that the po guid is used to pass from the event to the workflow.  We do not have this guid - this is probably where that business function was needing to be turned on.  The scope of our project was not willing to take on the activation of this business function.  Therefore, using this standard approach out of the box was not going to work for us.

What we ended up doing was simply finding the underlying class/method that workflow ends up calling, and we call that directly from some custom code. Essentially we bypassed any of the 'guid' data.  We already knew the po number, so why then work with guid?

  Specifically, at the point we need the service PurchaseOrderCreatedInformation_Out to be initiated (i.e. when we successfully saved the new po), we added the following code:

DATA: cl_po_out TYPE REF TO cl_se_pur_pocrtedinfo,
            cl_r_po_out
TYPE REF TO cl_se_pur_pocrtedinfo.
     
DATA: lt_return TYPE bapirettab.
     
CREATE OBJECT cl_po_out.
      cl_r_po_out
= cl_po_out->get_instance( ).
     
TRY.
          cl_r_po_out
->process_out( EXPORTING iv_po_no = pe_ponumber IMPORTING et_return = lt_return ).
       
CATCH cx_ai_system_fault.
       
CATCH cx_appl_proxy_badi_processing.
       
CATCH cx_ops_se.
     
ENDTRY.
     
COMMIT WORK.

I.e.

          1.  Instantiating class CL_SE_PUR_POCRTEDINFO,

          2. Then executing  CL_SE_PUR_POCRTEDINFO->process_out with po number:

           This works great for us. In our custom code (you could maybe find a badi to use on po save if you don't have any specific z custom code), we call the class/method directly to initiate the service.  The runtime of the service is of course viewable in sxi_monitor, so losing any workflow runtime (swi1) was not a big deal for us.

Regards,

Keith

P.S. my other question still remains is that "is there an easier way to find how some of these services are to be triggered?".  Only because I knew workflow had I founf that WS53800008, i.e. by searching through pftc/swdd.

Former Member
0 Kudos

Small correction, the note describing PUR_SE_PO_INTERFACE_OUT_SELECT is 1317798. See http://service.sap.com/sap/support/notes/1317798 . Cheers, Bartjan

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Keith,

Did you make it work?

My scenario:

After creating or changing a PO via Enterprise Service PurchaseOrderERPRequest_In_V1 (stage I am now), I want to use the ES PurchaseOrderCreatedInformation_Out and PurchaseOrderChangedInformation_Out to inform the recipient that a purchase order was created/ changed.

Please let me know how to activate those services.

Thank you very much and regards,

Ricardo

Former Member
0 Kudos

Ricardo,

I think a better bet would be to post this question in the SRM Functional forum. There's some work needed in IMG (TCode SPRO - enabling business function LOG_MM_P2PSE_1) from a functional perpective to automatically trigger these services.

What you need to very weary of is that this 'trigger' would enable various other triggers / services. So the SRM functional guys should be able to tell you if there's somehow a way that you can only trigger these 2 in IMG on PO creation in ECC if that is your requirement.

Regards, Trevor

Former Member
0 Kudos

Thanks Trevor.

I'll check your tips and post in SRM forum as well.

Regards,

Ricardo

MichalKrawczyk
Active Contributor
0 Kudos

Hi Keith,

I'm not answering your question directly but think about using the IDOC - ORDERS05 - which can be used for PO creation:

a) in standard you will know when it's going to be distrubuted as you can monitor it from the PO itself

b) in standard you have the message output technique which can used to determine when the IDOC needs to be delivered (which PO type, etc.)

as far as I know for enterprise services such things are still not yet available for SAP "old" transactions so maybe it's worth considering using the good old IDOCs ?

good reference for both ECC and PI part:

http://www.sap-press.com/products/Mastering-IDoc-Business-Scenarios-with-SAP-NetWeaver-PI.html

Regards,

Michal Krawczyk