cancel
Showing results for 
Search instead for 
Did you mean: 

Webservice to Multiple BAPI

Former Member
0 Kudos

Hi,

My scenario is Webservice to RFC POC and I am working this on sandbox system.

I have already developed WS to BAPI 1(BAPI_CONTRACT_CREATEFROMDATA) and i want another BAPI2(BAPI_QUOTATION_CREATEFROMDATA)..

and in my scenario i am planning to avoid Custom BAPI ....

So I am Create one more Message mapping in request,operation and receiver agreement...

If it ok then where i have to write logic?

For this if i pass the value for salesdoc CQ contract should create and If i pass KM Quotation should create

Can anyone give me the solution for this?

Regards

Kalyan

Accepted Solutions (0)

Answers (3)

Answers (3)

rajasekhar_reddy14
Active Contributor
0 Kudos

Try with multi mapping also without developing two mapping in one message mapping you can write a condition . search in scn multi mapping without BPM . you find one wonderfull blog.

former_member184681
Active Contributor
0 Kudos

Hi Kalyan,

In addition to what Michal has already mentioned, you can find a nice description of the conditional interface determination concept here:
http://help.sap.com/saphelp_nw04/helpdata/en/42/ea20e737f33ee9e10000000a1553f7/content.htm

Moreover, here is an example of configuration, with some screenshots included:
http://wiki.sdn.sap.com/wiki/display/XI/Xpath+Condition+in+Receiver+Determination

Hope this helps,
Greg

Former Member
0 Kudos

former_member184681
Active Contributor
0 Kudos

Dear Kalyan,

You used the BAPI structure as a sender service interface? Is that what you are trying to say? If so, then what you want to do won't be possible. What you should do is to develop a sender service interface yourself based on some custom Data Types and Message Type, then create Message Mappings from that SI to both your target BAPIs and PI will decide which mapping to use and which BAPI to execute, based on the condition in Interface Determination.

Regards,
Greg

Former Member
0 Kudos

Hi Grzegorz,

You used the BAPI structure as a sender service interface?

Yes,the two BAPI structure is same,

So by this you mean to say I want to create custom bapi for this which inludes this two BAPIs rite?

As i am doing POC so i am thinking without custom bapi is it possible or not?

Regards

Kalyan

rajasekhar_reddy14
Active Contributor
0 Kudos

If you develop two indivudal mapping , you dont required two separate service interfaces for sender web service, once service interface is enough and in interface dederamination the condition will decide which bapi mapping to execute.

Service Interface_web service-->BAPI1

Service Interface_web service-->BAPI2

You will create 2 receiver agreements.

former_member184681
Active Contributor
0 Kudos

Dear Kalyan,

Again: you do not have to create a custom BAPI for this, you can include all the logic in PI. No ABAP coding is required for your scenario. All you need to do is to agree with the sender system for some sender structure (because those BAPIs have different importing and exporting parameters), then create this structure in PI as sender Service Interface and prepare mappings.

Greg

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

>>>For this if i pass the value for salesdoc CQ contract should create and If i pass KM Quotation should create

you can do that in interface determination - by adding a condition

so condition 1: if something CQ - then bapi1

condition 2 - if something KM - then bapi2

Regards,

Michal Krawczyk