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: 

Posting data to BAPI.

former_member186390
Participant
0 Kudos

Hi!!

Please help me in solving the following task:

database tables to be used: COBK, COEP & two custom tables.

i have populated data into one internal table & then this needs to be processed using

BAPI_ACC_MANUAL_ALLOC_CHECK. & SEND a mail to some mailing addresses

OR

I acan process this internal table using

BAPI_ACC_MANUAL_ALLOC_POST, If errors are there i have to generate the error log.

THank YOU

Amit

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor
0 Kudos

You have to use standard sap tools to display protocol from table parameter RETURN structure BAPIRET2.

Look at [Thread: Increase size of the standard information window/get mesages in long text|;

Regards

7 REPLIES 7

raymond_giuseppi
Active Contributor
0 Kudos

You have to use standard sap tools to display protocol from table parameter RETURN structure BAPIRET2.

Look at [Thread: Increase size of the standard information window/get mesages in long text|;

Regards

0 Kudos

Hi!!

Its not clear to me.......

how to pass data to bapi???

suppose i have to pass ainternal table to a bapi...how to do it??

please help.

thank u

amit

0 Kudos

Hi Amit,

If you want to pass an internal table to a BAPI,then you will have to do it by passing the table to the TABLES in the BAPI.

You can also pass it to the export parameters in the BAPI after calling the BAPI.

While passing the internal tables to the BAPI,you must check if the parametrs of the BAPI and the internal table are of the same structure or not.

For example in the BAPI ,BAPI_ACC_MANUAL_ALLOC_POST

for DOC_HEADER the structure is BAPIDOCHDRU12P

for DOC_NO the structure is BAPIDOCHDRU12P.

So you will have to create the internal tables with the same structure or else there will be a mismatch in the types.

Reward points if helpfull.

Regards,

Kashyap

Edited by: Kashyap Ivaturi on Jan 11, 2008 2:39 PM

0 Kudos

Pass the data in a table parameter

> CALL FUNCTION 'BAPI_ACC_MANUAL_ALLOC_POST'

> EXPORTING

> doc_header = doc_header

> ignore_warnings = ' '

> IMPORTING

> doc_no = doc_no

> TABLES

> doc_items = doc_items

> return = return.

You have to map your cobk/coep internal table to the format/structure required by the BAPI.

Look for Function Modules with name like MAP2E* or MAP2I* (reverse) in the function group of the BAPI function module (like MAP2E_COBK_TO_BAPIDOCHDRR) to help you convert the fields.

Look at sap online help [Converting Between Int. and Ext. Data Formats and Structures|http://help.sap.com/saphelp_nw04/helpdata/en/a5/3ec9594ac011d1894e0000e829fbbd/frameset.htm]

Regards

former_member186390
Participant
0 Kudos

Hi!!

Now i have one more Issue........

Afer execting the bapi i m getting ....

w

period entry is ignored by the system

e

real estate objects cannot be dtermined by the entries

e

account 7023400 requires an assignment to co object

and so on.

IF these are warnings & errors returned by bapi then what i should do to get 'S' success message...

please help me.

thank you

amit

former_member186390
Participant
0 Kudos

please help me to solve this issue soon......

thanks

amit

Edited by: Amit Kumar Singh on Jan 17, 2008 8:17 AM

former_member186390
Participant
0 Kudos

thank you all......