Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPIs

Former Member
0 Likes
582

Hello All,

I m in the process of designing a interface to SAP.

We are receiving the material# and in case the material is not available in SAP, we need to create the same and then create a sales order with that material number.

The data is been transmitted via Web-methods to SAP from a different system.

Now, once we receive the data, can we

Step 1: call a Bapi to check for the existence of that material,

in case the material is not present,

Step 2 : call a different BAPI to create the material from the BAPI mentioned for step 1

in case material is present, call a different BAPI to create the sales order line in Sales order.

Can we branch from one BAPI to another.

Or do we have to create a custom program to call different BAPIs depending on conditions.

Thanks

Gauravjit

Hello All,

I m in the process of designing a interface to SAP.

We are receiving the material# and in case the material is not available in SAP, we need to create the same and then create a sales order with that material number.

The data is been transmitted via Web-methods to SAP from a different system.

Now, once we receive the data, can we

Step 1: call a Bapi to check for the existence of that material,

in case the material is not present,

Step 2 : call a different BAPI to create the material from the BAPI mentioned for step 1

in case material is present, call a different BAPI to create the sales order line in Sales order.

Can we branch from one BAPI to another.

Or do we have to create a custom program to call different BAPIs depending on conditions.

Thanks

Gauravjit

3 REPLIES 3
Read only

Former Member
0 Likes
561

How you are receving the data from the external system, If its like Idoc / File than you have to write a separate Function module/Program to process this Idoc/ File, In this case you do all your requirements in a single program

Regards

Sasi

Read only

0 Likes
561

As we are in the process of designing the interface, we can get the data [which is material#] in any format, either an idoc, flat file or BAPI].

I am not in favor of flat file as it would meaning writing that file to some directory and another program going in reading the file and blah blah blah....

Can we make/design something which is more efficient/real time if possible.

Regards,

Gauravjit

Read only

Former Member
0 Likes
561

Hi,

You can create 1 RFC function that inside you have your logic as per your requirements.

And call your RFC in your web-methods instead of 2 different BAPI.

Hope it helps,

Victor.