2010 Sep 23 12:12 PM
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.
2010 Sep 23 12:40 PM
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
2010 Sep 24 9:44 AM
Hi!
The i_account-wbs_element is the account element...
If I specify the costcenter its the same, it doesnt' works.
2010 Sep 27 9:35 AM
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.
2010 Sep 27 10:12 AM
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.
2010 Sep 27 10:23 AM
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
2010 Sep 27 12:28 PM
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.
2010 Sep 29 9:45 AM
Finally I've found it,
the note 1361190 solves the problem.
Thanks everybody.