cancel
Showing results for 
Search instead for 
Did you mean: 

Executing two data services sequentially

Former Member
0 Kudos

Hello experts,

I have the following scenario:

I want to execute an RFC (Data Service 1) that runs on an R/3 instance and creates a new accounting document, I have created the input form and so far it works OK. Problem is that I want to store the results of the previous call on a separate Database, for this, I have created a Stored procedure on Database server and its coresponding Data Service (Data Service 2) in VC.

How can I execute both Data Services on a sequence? Data Service 1 first to create document, and after that, execute Data Service 2 to store results on database, both have to be triggered with one event.

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi David,

Just to clarify your requirements, my understanding is that:

1) You want to execute Data Service 1 first, with data from the form;

2) Then you want to execute Data Service 2 , only if the call to Data Service 1 is successful, with data from the form plus new data created by Data Service 2, such as the document number.

In order to achieve this, Data Service 1 must return the required update values and return code in the SAME output port. You must then carry out the following steps:

1) Connect the output port of Data Service 1 to the input port of Data Service 2;

2) Assign the relevant output port fields of Data Service 1 to the input port fields of Data Service 2;

3) Assign a guard condition that checks that the return code of Data Service 1 is the "success code".

If your Data Service 1 is based on a standard SAP RFC, the return code will most likely be provided in a separate output port than the other data, so you may need to create a wrapper RFC that combines the return code and data into a single output port.

Hope that helps,

Mustafa.

Former Member
0 Kudos

Hi David,

Just to clarify your requirements, my understanding is that:

1) You want to execute Data Service 1 first, with data from the form;

2) Then you want to execute Data Service 2 , only if the call to Data Service 1 is successful, with data from the form plus new data created by Data Service 2, such as the document number.

In order to achieve this, Data Service 1 must return the required update values and return code in the SAME output port. You must then carry out the following steps:

1) Connect the output port of Data Service 1 to the input port of Data Service 2;

2) Assign the relevant output port fields of Data Service 1 to the input port fields of Data Service 2;

3) Assign a guard condition that checks that the return code of Data Service 1 is the "success code".

If your Data Service 1 is based on a standard SAP RFC, the return code will most likely be provided in a separate output port than the other data, so you may need to create a wrapper RFC that combines the return code and data into a single output port.

Hope that helps,

Mustafa.