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

Error in BAPI_PO_CREATE1 imputing WBS Element

rafael_cermeno
Explorer
0 Likes
2,321

hi,

   I'm trying to create a service purchase order (ME21N) tied to a purchase requisition using BAPI_PO_CREATE1. The purchase requisition is imputed to Project (WBS Element). I have not been able to create, the BAPI generates an error KI235 "Account & requires an assignment to a CO object" The account 123456 is not set in OKB9 table. However, when I create a service purchase order using the same bapi with this account but charged to cost center, works perfectly. However, I need to create it imputing WBS element.

I filled the following relevant fields to the BAPI:

  POITEM-PO_ITEM    : 00010

  POITEM-SHORT_TEXT : Texto 

  POITEM-PLANT      : 'CENTRO'

  POITEM-MATL_GROUP : 'GRUP'

  POITEM-QUANTITY   : 1

  POITEM-PO_UNIT    : 'ACT'

  POITEM-NET_PRICE  : 10

  POITEM-ITEM_CAT   : '9'

  POITEM-ACCTASSCAT : 'P'

  POITEM-PREQ_NO    : 2000001500

  POITEM-PREQ_ITEM  : 00010

  POITEM-PREQ_NAME  : 0000012000

  POITEM-PCKG_NO    : 0000000100

  POACCOUNT-PO_ITEM    : 00010

  POACCOUNT-SERIAL_NO  : '01'

  POACCOUNT-GL_ACCOUNT : '123456'

  POACCOUNT-WBS_ELEMENT: 'PEP_ELEMET'

  POACCOUNT-CO_AREA    : 'SCOS'

  POACCOUNT-PROFIT_CTR : 'CTRBENEF'

  POACCOUNT-FUND       : 'FUND'

  POACCOUNT-CMMT_ITEM  : '0000123456'

Best Regards,

3 REPLIES 3
Read only

rafael_cermeno
Explorer
0 Likes
1,309

After a long investigating process, implementing the following note solved the problem: 1977169.


Best regards.





Read only

0 Likes
1,309

Hello Rafael,

we are also facing same issue. we implemented the above note ,but it is not working.Could you please suggest the solution which will solve this.the above describes the CHNAGE Bapi.we are facing the issue when PO Creating.

Read only

0 Likes
1,309

Hello,

we had the same problem recently.

The task was to migrate project account service orders via Idoc. Then we always got the error message KI235 and noticed that the given PSP element was not read correctly from the IDoc.

The solution is to take the POSID field from the PRPS table! Not POSNR.

Best regards

Caroline