Skip to Content
0
Sep 28, 2005 at 12:56 PM

Using BAPI_PO_CREATE1 : Linking service, and account assignment

2665 Views

Hello,

I have trouble when using BAPI_PO_CREATE1. When creating PO using BAPI_PO_CREATE1, I need to input service for each po item and the service itself need to have account assignment. I simplify the code below.

**PO item
t_poitem-po_item        = '10'. "for item 10
t_poitem-PCKG_NO        = '20'. "link with service
...

t_poitemx-po_item        = 'X'.
t_poitemx-PCKG_NO       = 'X'.
...

**Account Assignment
t_poaccount-po_item    = '10'. "link with PO Item
t_poaccount-SERIAL_NO  = '01'. 
t_poaccount-DISTR_PERC = 1.
...
t_poaccountx-po_item    = '10'.
t_poaccountx-SERIAL_NO  =  '01'.
t_poaccountx-po_itemx    = 'X'.
t_poaccountx-SERIAL_NOx  = 'X'.
t_poaccountx-DISTR_PERC = 'X'.
...

**PO Services
**1st row
t_poservices-PCKG_NO = '20'.
t_poservices-LINE_NO = '0000000001'.
t_poservices-SUBPCKG_NO  = '21'.
APPEND t_poservices.
clear t_poservices.

**2nd row
t_poservices-PCKG_NO = '21'.
t_poservices-LINE_NO = '0000000002'.
t_poservices-EXT_LINE = '0000000010'.
...

**fill account assignment for services
t_POSRVACCESSVALUES-pckg_no = '21'.
t_POSRVACCESSVALUES-LINE_NO = '0000000002'.
T_POSRVACCESSVALUES-SERNO_LINE = '01'.
t_POSRVACCESSVALUES-SERIAL_NO = '01'. "acct. assign. link
t_POSRVACCESSVALUES-PERCENTAGE = '100'.
...

Every time i execute BAPI_PO_CREATE1 using entry similar like above, i always found error message in t_return like this:

No account assignment exists for service line 0000000010

I feel sure that i have fill every field needed to link services and account assignment which is using serial_no, but somehow it does not link correctly. Can anyone advise me if there is some thing missing or incorrect with my ABAP code above? Thank you in advance for your help. For sure, first helpful answer will receive my rewards point. 😉

Regards,

Abraham