Skip to Content
0
Former Member
Apr 29, 2009 at 08:13 AM

Problem with using BAPI

144 Views

Hi

In short the business requirement is as follows: We have one cube where all data to be used is stored. This data is to be extracted from BW and send to R/3 to be process in transaction KB21N. We are using receiving cost center or internal orders as receivers.

I created a function module in BW where I am collecting all the data to be passed from the cube and then calling the SAP Standard BAPI 'BAPI_ACC_ACTIVITY_ALLOC_POST' passing on the header info and item table, but I am getting errors on fields I am not filling.

The fields I am passing is:

CO Area

User name

Sender cost center

Receiver cost center or internal order.

When I simulate this function module in test mode (typing all inputs manually) on the R/3 side it is working OK and I get a document number as a return.

I have defined my header table and item table that will be passed the same as the structures in the BAPI's. However, when I move the data from the cube as selected, I only use the fields that I need. I am not sure if I must enter all fields as per structure into my move statement.

The other thing I am not sure about is that I am sending more than one item. Should I loop through the item table and calling the BAPI for each item, or is it OK to just call it once and pass all items in the table?

Can anyone please give some advise on what possibly could be wrong?

Here is the error i am getting:

Status of Volume Retraction:

IK AFF 101FM dimension not active - entry of Functional Area will be ignored

AB 1 547No currency key found for ISO code 0 in field CURRENCY_ISO

AB 1 537RK40C_EXT-ex_curr initial v., currency amount 2020202020202020202.0202 in PRICE was t

EK O 483Enter material and plant

E6 3 511Real Estate object cannot be found

EK I 211Personnel number invalid

EK O 483Enter material and plant

E6 3 511Real Estate object cannot be found

EK I 211Personnel number invalid

EB K 202Document contains errors