2012 Oct 17 4:02 PM
Hi Experts,
I have a requirement to create purchase orders with services for ME21N. I´m using BAPI_PO_CREATE1 but i failed to work properly and i get the following message: "No account assignment exists for service line 0000000010".
I'm using BAPI_PO_CREATE1 like this.
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
poheader = wa_poheader
poheaderx = wa_poheaderx
testrun = 'X'
TABLES
return = gt_return
poitem = gt_poitem
poitemx = gt_poitemx
poaccount = gt_poaccount
poaccountx = gt_poaccountx
poservices = gt_poservices.
Thanks in advice,
Alejandro Alvarado.
2012 Oct 17 4:18 PM
HI,
Which is the account assignment category you are using? Please check the category and the corresponding fields that have been populated. Generally this account assignment is used for costing elements and you also need to check if all the mandatory costing elements are filled. This error occurs when there is some discrepancy in the account assignement category and the populated fields.
Regards,
Hardik Mehta
2012 Oct 17 4:18 PM
HI,
Which is the account assignment category you are using? Please check the category and the corresponding fields that have been populated. Generally this account assignment is used for costing elements and you also need to check if all the mandatory costing elements are filled. This error occurs when there is some discrepancy in the account assignement category and the populated fields.
Regards,
Hardik Mehta
2012 Oct 17 5:02 PM
Hi Hardik,
I´m using 'N (Network)' for account assignment category, and i´m filling the following fields in the PO_ACCOUNT and PO_ACCOUNTX tables.
wa_poaccount-po_item = g_item.
wa_poaccount-serial_no = 01.
wa_poaccount-creat_date = sy-datum.
wa_poaccount-quantity = '1.00'.
wa_poaccount-net_value = '50.00'.
wa_poaccount-gl_account = wa_estructuras-value31.
wa_poaccount-co_area = 'GMMM'.
wa_poaccount-network = wa_estructuras-value32.
wa_poaccount-activity = wa_estructuras-value33.
APPEND wa_poaccount TO gt_poaccount.
I think that those field are that te BAPI require.
Thanks for your reply.
2012 Oct 17 6:20 PM
Hi experts,
I solved my problem. For PO with services it's necesary to populate POSRVACCESSVALUES table.
The correct BAPI is like this.
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
poheader = wa_poheader
poheaderx = wa_poheaderx
testrun = 'X'
TABLES
return = gt_return
poitem = gt_poitem
poitemx = gt_poitemx
poaccount = gt_poaccount
poaccountx = gt_poaccountx
poservices = gt_poservices
posrvaccessvalues = gt_posrvaccessvalues.
Greetings.
2021 May 03 7:11 AM