cancel
Showing results for 
Search instead for 
Did you mean: 

file to sync bapi_multimapping_without bpm

Former Member
0 Kudos

Hi All,

I have done a file ->bapi -> response to file testing interface using the adapter modules.

My actual scenario is :

Source file has multiple lines and for each line i have to call a bapi. The response of the BAPI needs to be appended in a file.

My question is:

Should i use a BPM to call the bapi as many times as the lines present in the source file?

I read the sap documentation for multimapping and i suppose we cannot use multimapping for synchronous interfaces?

Is there any way i can do my scenario without using a BPM?

Regards,

Balaji.M

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

If you need to avoid BPM, then you have to change the BAPI / RFC to be able to take multiple records in one call.

If no, you have to use a BPM.

Former Member
0 Kudos

Bhavesh,

If you need to avoid BPM, then you have to change the BAPI / RFC to be able to take multiple records in one call.

How can i do this? Can you please explain?

I searched for blogs, but all of them i saw, have one rfc call. Is there any blog that does this without a bpm:

a) Source file comes in with multiple lines

b) For each line a sync bapi or rfc needs to be called

c) Reponse needs to be written to a file

I did my scenario using a BPM and the performance is very bad (the size of the box is small, but would not make a great deal of difference if it were a bigger box). Here is what i do in a BPM

1) get the source file

2) call bpm

2.1) inside bpm, transformation1 - does a multimapping

2.2) block start(For Each)

2.3) Sync Send to bapi. Mapping called outside bpm in interface determination

2.4) Async Send - to write response - done in the response mapping of the Interface Mapping.

Please let me know if i can do how i can do steps a, b, c (in bold above) without bpm

Thanks,

Balaji

santhosh_kumarv
Active Contributor
0 Kudos

Hi Balaji,

To pass the multiple record to the RFC you need to modify the BAPI/RFC.

Add a Tables parameter to hold the multiple records at a time i.e. create an Table type and use it in the RFC. By this way you can pass multiple records to the table at a single pass and in the RFC you can read the table content for each record.

>>Is there any blog that does this without a bpm:

Refer this wiki [File RFC File Without BPM|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/file-rfc-file%28without+bpm%29]

Thanks

SaNv...

Answers (2)

Answers (2)

Former Member
0 Kudos

Hey,

In this case BPM will be required as the scenario is async-sync.

Design will be something like this.

Sender file structure is mapped to BAPI request structure.

occurence of BAPI request structure must be 0..unbounded.

map the node to the source node corresponding to each record in file(so that for each record the bapi is called)

BPM.

receive-> abstract async(file)

transformation-> mapping between file and BAPI request.

multiline container-> to accumalate all the records.

Block step-> set the mode to forEach (this will loop for the number of records in the multiline container)

send-> sync send(BAPI)

multiline container-> to accumulate the responce.

transformaition-> to map the resonse of bapi to file.

send-> abstract async target file(outside the block).

regards,

Milan

Former Member
0 Kudos

Hi

Reffer to the below mentioned link .

https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3115---Multi-Mapping [original link is broken] [original link is broken] [original link is broken] without BPM

https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/7032---Sync/Async [original link is broken] [original link is broken] [original link is broken] scenarios without BPM

Regard's

Chetan Ahuja