Application Development 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: 

Create DEBMAS IDoc with BAPI informations

christian_swonke
Participant
0 Kudos

Hello,

I use the BAPI BAPI_CUSTOMER_CREATEFROMDATA1 to create new customers.

Now I want to save the parameter values of this BAPI in a Idoc if the return code is not equals 0.

I know that for the BAPI to create a salesorder (BAPI_SALESORDER_CREATEFROMDAT2) exists a subroutine "IDOC_SALESORDER_CREATEFROMDAT2" to with the same parameters like the function module to save the informations as an Idoc.

Exist anything like this also for the customer creation bapi?

Or how can I create an DEBMAS Idoc with the parameter informations ob the BAPI so easy as possible?

Because at the moment I have implemented the creation of the Idoc manually.

Regards

Christian

3 REPLIES 3

Former Member
0 Kudos

Hi,

How to Find Bapi for Particular Transaction in SAP

How to find function module or Bapi for particular transaction in sap?

If you mean that you need to know what BAPI's a particular tranx uses, which I can only assume that's what you mean, then you should access the code behind the transaction and search for 'CALL'. That normally is the standard method that think that most people use.

Suppose you want to find the bapi for creating a sales order, you usually use transaction VA01 for this.

1. Find out the package of the transaction.

Start Va01 go to system --> status.

Double click on transaction

Package is VA

Open this package in SE80

Open business engineering-->Business object types

Find the BO which sounds the most appropriate

I would suggest BUS2032 Sales Order

Double click.

Open methods.

Find the released method with from data or something similar in the name

, Createfromdat2

Position the cursor in it and click the program button

Scroll down to find the bapi used in this method

With this way you can also find out programs and FM's

2. Start va01 go to system-->status

Double click transaction VA01

Double click on package

Read the application component. (this is SD-SLS Sales)

Then open the transaction BAPI

Sales and distribution>Sales>sales order

createfromdat2

In similar way you search bapi for customer creation transaction.

Regards,

N M Poojari.

christian_swonke
Participant
0 Kudos

No, sorry that was not my question.

I know how I can find BAPIs

I want to know if there is a similar subroutine or function module to create an DEBMAS like the bapi BAPI_CUSTOMER_CREATEFROMDATA1.

This means with the same parameters.

Because If I try to create an customer with the bapi BAPI_CUSTOMER_CREATEFROMDATA1 and receive an error, I want to store the informations and also the return values of the bapi in an DEBMAS Idoc.

The BAPI BAPI_SALESORDER_CREATEFROMDAT2 has a subroutine with the same parameters which can create an Idoc.

Former Member
0 Kudos

Hi Christian,

I'm afraid that nothing like that do exists.

I would even insist to not uses BAPI_CUSTOMER_CREATEFROMDATA1.

This is simply due to the fact that BAPI has been developped exclusively for SAP Online Store. As a result, standard creation and maintenance of customer through this BAPI will lead to troubles in the future.

There is NO BAPI nor direct function module to maintain Customer master data.

To creates DEBMAS from your coding !!

I would suggest that you send you BAPI parameters to a file and process that file using LSMW.

Alternatively look at RFBIDE00, but this will not help too much.

Also, don't forget that customer master is related to adress idocs like ADR*MAS.

DEBMAS is really not enough is you plan to distribute customers with accurate address informations

Alain