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: 

unable to capture error message while creating an SO using bapi

Former Member
0 Kudos

Hi,

Can anybody suggest how to capture the error message while creating a SO using BAPI.

I have developed a customeized BAPI and using the BDC format to create the SO.

Note: i am using a call transaction method for the BDC.

I am sending the message into message1.

but i am unable to send the same into an internal table

shyam.

1 REPLY 1

Former Member
0 Kudos

Hi Shyam

If my understanding is correct, you are performing BDC process within the customized BAPI...

And you want to collect the messages from BDC to an internal table and pass to the output.

Proceed as below:

1. While calling BDC, use CALL TRANSACTION .... with addition: <b>MESSAGES INTO itab</b>. The structure of itab should be like <b>BDCMSGCOLL</b>.

2. Now the messages will be collected in ita.

3. Prepare the messages using FM: <b>FORMAT_MESSAGE</b>

4. Collect to the returning table.

Hope this helps...

Though i could not understand the reason of creating a BDC within BAPI, you can opt for loading orders via BAPI's like: BAPI_SALESORDER_CREATEFROMDAT1 or BAPI_SALESORDER_CREATEFROMDAT2.

Kind Regards

Eswar