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: 

BAPI_PO_CREATE1 account problem

Former Member
0 Kudos
321

Hi!

I'm a bit hopeless!

I'll read a lot of message about BAPI_PO_CREATE1, but I don't find the solution to my problem.

I have SAP_APPL 600, and before to pass the note 1477394 and his corrections notes the program was working. Now it doesn't works.

I'll try to explain the problem:

I have a program which create a PO program with BAPI_PO_CREATE1 bapi.

This bapi launch the methods of the ME_PROCESS_PO_CUST badi.

In this method (CHECK for example) if I try to catch the accounting data, it doesn't find it. The method returns the structure with out account info.

It doesn't works for material. For services it works fine.

I think that it could be realted with how I'm passing the account table to the BAPI_PO_CREATE.

i_account-po_item = p_contador.

i_account-serial_no = 0.

i_account-quantity = p_pos-menge.

WRITE l_pep TO i_account-wbs_element.

i_accountx-po_item = p_contador.

i_accountx-po_itemx = 'X'.

i_accountx-serial_no = 0.

i_accountx-quantity = 'X'.

i_accountx-wbs_element = 'X'.

APPEND i_account.

APPEND i_accountx.

Any help would be appreciated!.

Thanks.

7 REPLIES 7

Former Member
0 Kudos
170

Check the BAPI documentation, you have not provided account related info.

Parameter: POACCOUNT

PO_ITEM = 00001

SERIAL_NO = 01

QUANTITY = 15.000

GL_ACCOUNT = 0000400000

COSTCENTER = 0000001000

CO_AREA = 1000

Parameter: POACCOUNTX

PO_ITEM = 00001

SERIAL_NO = 01

QUANTITY = X

GL_ACCOUNT = X

COSTCENTER = X

CO_AREA = X

0 Kudos
170

Hi!

The i_account-wbs_element is the account element...

If I specify the costcenter its the same, it doesnt' works.

Former Member
0 Kudos
170

It's possible to use the BAPI_PO_CREATE1 passing only this tables

poitem

poitemx

poschedule

poschedulex

poaccount

poaccountx

potextitem

or it's necesary to pass POCOND table?

THANKS.

Former Member
0 Kudos
170

Hello Adell ,

whats the value you are passing for POITEM-ACCTASSCAT = 'P/Y'--> project/Cost Center...etc

Paste your code of ME_PROCESS_PO_CUST-->Check Method.

regards

Prabhu.

0 Kudos
170

Hello!

I'm using P (poject), but it fails also with cost center.

The code of CHECK method is this.

CALL METHOD im_header->get_items

RECEIVING

re_items = i_items.

LOOP AT i_items INTO w_items.

CALL METHOD w_items-item->get_accountings

RECEIVING

re_accountings = i_input.

LOOP AT i_input INTO w_input.

CALL METHOD w_input-accounting->get_data

RECEIVING

re_data = w_item_i.

ENDLOOP.

ENDLOOP.

The w_item_i it's empty.

Thanks.

Edited by: Adell Boix on Sep 27, 2010 12:50 PM

Former Member
0 Kudos
170

Hi everybody!

If I put an EXIT command to the badi ME_PROCESS_PO_CUST it fails too. So it's seems to be that I'm passing the parameter to BAPI_PO_CREATE1 in a wrong way. But it was working before.....!

If anybody have any idea, it would be appreciate.

to be continued.

Former Member
0 Kudos
170

Finally I've found it,

the note 1361190 solves the problem.

Thanks everybody.