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

Data Transfer thru BAPI

Former Member
0 Likes
738

Hi Experts,

I am beginner in bapi. I have done data transfer using bdc but now have to done using BAPI. Please help,as it's urgent.

Points sure.

Anshu

1 ACCEPTED SOLUTION
Read only

former_member196280
Active Contributor
0 Likes
693

BAPI as the simplest form of BDC

Let me give you an example, it will give you some idea...

Let us use BAPI FM "BAPI_ACC_GOODS_MOV_REV_CHECK" i.e Goods Movement Reversal

It has two parameters,

REVERSAL

RETURN

and you have to pass populate your internal table and pass to the parameters and in return your internal table will be populated with respective values and messages...

<u>Reversal document number contains:</u> should be populated and send to <b>REVERSAL</b>

OBJ_TYPE Sender ID

OBJ_KEY Reference number of the reversal document (source document)

OBJ_SYS Logical system

OBJ_KEY_R Reference number of the document to be reversed.

You will see RETURN populated in return with

The first message contains the general status of processing:

Type ID Number Message

S RW 605 Document posted successfully

S RW 614 Document check without errors

A RW 609 Error in document

The fields MESSAGE_V1, MESSAGE_V2 and MESSAGE_V3 contain the following information:

Reference transaction ( OBJ_TYPE)

Reference key ( OBJ_KEY)

Logical system of source document ( OBJ_SYS)

Additional messages are transferred with the following information:

Parameter ( PARAMETER)

Row ( ROW)

Field ( FIELD)

in which the error occurred.

Regards,

SaiRam

4 REPLIES 4
Read only

Former Member
0 Likes
693

Hi Anshu,

Do you mean to say data upload?

If yes then just treat the BAPI as the more precise format of BDC and pass all the data to relevent tables in the BAPI and call the BAPI.

Just search the forum with BAPI material and you will get lots of material.

Regards,

Atish

Read only

former_member196280
Active Contributor
0 Likes
694

BAPI as the simplest form of BDC

Let me give you an example, it will give you some idea...

Let us use BAPI FM "BAPI_ACC_GOODS_MOV_REV_CHECK" i.e Goods Movement Reversal

It has two parameters,

REVERSAL

RETURN

and you have to pass populate your internal table and pass to the parameters and in return your internal table will be populated with respective values and messages...

<u>Reversal document number contains:</u> should be populated and send to <b>REVERSAL</b>

OBJ_TYPE Sender ID

OBJ_KEY Reference number of the reversal document (source document)

OBJ_SYS Logical system

OBJ_KEY_R Reference number of the document to be reversed.

You will see RETURN populated in return with

The first message contains the general status of processing:

Type ID Number Message

S RW 605 Document posted successfully

S RW 614 Document check without errors

A RW 609 Error in document

The fields MESSAGE_V1, MESSAGE_V2 and MESSAGE_V3 contain the following information:

Reference transaction ( OBJ_TYPE)

Reference key ( OBJ_KEY)

Logical system of source document ( OBJ_SYS)

Additional messages are transferred with the following information:

Parameter ( PARAMETER)

Row ( ROW)

Field ( FIELD)

in which the error occurred.

Regards,

SaiRam

Read only

0 Likes
693

Hi,

Will you provide me any code using bapi to upload data.

Read only

0 Likes
693

Hi Anshu,

check below link

http://www.erpgenie.com/sap/abap/example_code.htm

you can find some sample code here.

Regards,

Atish