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

BAPI

Former Member
0 Likes
1,084

HI,

HOW TO IMPLIMENT BAPI IN OUR PRG..

12 REPLIES 12
Read only

Former Member
0 Likes
1,040

Hi Raghuveer

The ways of calling BAPI fromyour program is same as calling function module.

Go to BAPi transaction, Find the BAPi you want to use. Check the Bapi name

CAll it from you program

using call function 'BAPI name'

Best regards

Naresh

Read only

abdul_hakim
Active Contributor
0 Likes
1,040

itz like calling a normal function module..

cheers,

Abdul

Read only

Former Member
0 Likes
1,040

Hi,

Essentially, BAPI's are like function modules. Just find the correct bapi for you in tcode BAPI.

You can insert the bapi method using pattern. Its easier.

best regards,

Kenny

Read only

0 Likes
1,040

ok thanks but how to findout corect bapi of transaction

Read only

Former Member
0 Likes
1,040

Hi Raghuveer,

BAPI's are called in the same way as any other FM's.The only difference is that BAPI's are used for a particular purpose as for example Updating all the tables related to material master we use a particular BAPI that updats all the related aterial master tables.

Regards,

Mukesh Kumar

Read only

Former Member
0 Likes
1,040

search for BAPI* in se37..pass all the relevant paarmeters...and call bapi_transaction_committ in th end..

reward points if it helps

regards

Gunjan

Read only

Clemenss
Active Contributor
0 Likes
1,040

... just one quite essential addition:

BAPIs can be called from outside the system where they are running.

Call a BAPI in another SAP system using CALL FUNCTION <BAPI> DESTINATION <DEST>. <DEST> is a valid RFC destination defined in your system with transaction SM59.

One consequence of the remote call ability (you can call from VBASIC, DELPHI and more!) is that you do not have any exceptions.

All occuring messages including errors are collected in the return table. The calling program should evaluate this table.

Regards,

Clemens

Read only

Former Member
0 Likes
1,040

Hi,

If the BAPI is already in your System, then you can use it like normal Function module. use the Pattern Button, Give the BAPI name and enter .

now pass the Appropriate parameters to BAPI and use it.

Regards

vijay

Read only

Former Member
0 Likes
1,040

hi experts ,

can anybody tell me logic for finding the errors in transaction method ..

Read only

0 Likes
1,040

Hi,

DATA: ITAB TYPE TABLE OF BDCMSGCOLL. 

CALL TRANSACTION 'SE38'  USING BDCDATA  MODE 'N' 
                         <b>MESSAGES INTO ITAB.</b>

now you get the error/success/warnings into itab. now loop this itab and call FM FORMAT_MESSAGE or MESSAGE_PREPARE and frame the message and see the log.

if it MM01 then BAPI_MATERIAL_SAVEDATA

if it is sales order then

BAPI_SALESORDER_CREATEFROMDAT1

BAPI_SALESORDER_CREATEFROMDAT2

if it is Purchase Requisition

then BAPI_REQUISITION_CREATE

Regards

vijay