cancel
Showing results for 
Search instead for 
Did you mean: 

BPM Scenario

Former Member
0 Kudos

Hello Friends,

I have scenario where i have to call 2 BAPI's. The input is supplied from file.

Once i read the input, i have to call

BAPI_INCOMINGINVOICE_GETLIST

Once this BAPI returns me the invoice number and fiscal year, i have to call

BAPI_INCOMNGINVOICE_GETDATA for each invoice number and generate individual file for each invoice.

For the above case, i am using BPM. And i have worked out till collecting the invoice number and fiscal year.

Once i collect these data from first BAPI, how to proceed for calling second bapi for data in BPM.

Any help is appreciated.

Thanks,

Ramesh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ramesh,

you just need to maintain a second transformation step (optional) and a second send step in the BPM. just use the container element where you saved the response from the first BAPI.

Regards

Dominic

Answers (2)

Answers (2)

Former Member
0 Kudos

Hey,

Instead of calling the BAPIs in two distinct send steps of BPM what you can do is you can use RFC look up for first BAPI and then use a send step for the second BAPI.

If both the BAPI's are of the same R3 then you can write an RFC and call both the BAPI's in the same RFC and pass the output of the first BAPI to the second within the RFC.

This will improve your performance as the interaction between R3 and BPM is reduced.

regards,

Milan

Former Member
0 Kudos

Thanks Milan for your reply.

But the problem is i am not suppose write any sort of ABAP development in R/3 System

Also, does RFC look help me in improving the performance. If i am incorporating RFC lookup do i have to do it in BPM only?

sunil_singh13
Active Contributor
0 Kudos

Yes RFC look up will Immprove the Performance But still you have to use BPM as you have to make Multiple calls to the Second BAPI as there are multiple Invoice.

Thanks

Sunil Singh

Former Member
0 Kudos

Hey,

RFC look up will improve performance and yes you have to use BPM.

regards,

Milan

prateek
Active Contributor
0 Kudos

As your RFC returns many invoice number and its data, it would be better to use send step of BPM instead of lookup. RFC lookup is recommended when the amount of data is small. So amount of data returned by first RFC should be the deciding factor.

Regards,

Prateek

Former Member
0 Kudos

hello all,

for the above scenario i have designed the bpm as follows

start -> receive step -> send step1 -> container ->Block for each -> send step2 -> send step3 -> Stop.

send step is calling the bapi. But i am not sure whether the response from the bapi is collected in container, from Block step it is failing to error.

error. An empty container element was specified when sending

I am not sure, why the container is not storing any of the response or send the from the container

Any help appreciated

regards

Ramesh P

sunil_singh13
Active Contributor
0 Kudos

Hi Ramesh,

Your structure in which you are collecting invoice number will have occurence 0...unbounded.

Now take a block set its mode to ForEach. It will ask you for the Multiline Container and cureent line Container in the Step Property. so you have to have two container variable one will be of multiline and other will be single line and both will refer to the same message interface.

use containers to provide "for" condition so that it will process that many messages.

Also you shld know the number of invoices returned by your Bapi for that you use transformation step before calling second bapi whose mapping will return you the number of invoices created.

Thanks

Sunil Singh

Former Member
0 Kudos

hello dominic,

thanks for your reply.

hello sunil,

Do we require the counter, can we not keep track with having the number of records returned from the bapi?

sunil_singh13
Active Contributor
0 Kudos

yes that will do, No need to use transformation.

Also make sure that you have separate Message for each Invoice No returned.

Invoice1

.

.

.Invoice2

.

.

Invoice3

.

.

Thanks

Sunil Singh

Former Member
0 Kudos

ok let me try out and get back.

If you any help on the same in terms of document kindly pass it.

Thanks and Regards

Ramesh P