Skip to Content
avatar image
Former Member

unable to update Cost Center and GL Account while using BAPI_PO_CHANGE

i am trying to add new service line item in existing Purchase Order via  BAPI_PO_CHANGE the Service line item is added successfully but not able to update Cost Center and GL Account for service line 20 .. any solution for it ?

CALL FUNCTION 'BAPI_PO_CHANGE'

     EXPORTING

       purchaseorder     = ebeln

     TABLES

       return                   = wt_return[]

       poitem                  = it_poitem[]

       poitemx                 = it_poitemx[]

       poschedule            = it_poschedule[]

       poschedulex          = it_poschedulex[]

       poaccount             = it_poaccount[]

       poaccountx            = it_poaccountx[]

       poservices             = it_poservices[]

       posrvaccessvalues = it_posrvaccessvalues[].

error_po.PNG (58.1 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Nov 04, 2015 at 04:09 AM

    The Requirement was :

    Adjusting existing purchase order with creating new service line to it.

    The Issue got Resolved but instead of creating Service line got solution of creating one more PO line item with service line ..

    Tried everything for creating service line with GL Account and Cost Center but GL Accounts and Cost Center is missing in created line (As in My Original Question )..

    Itab's of Line item with Service Line :

    1.Values passed to the 'BAPI_PO_CHANGE' :

    2. it_poitem :

    3. it_poaccount :

    4. it_poservices :

    5.  it_posrvaccessvalue :


    1.PNG (44.6 kB)
    2.PNG (38.6 kB)
    3.PNG (27.5 kB)
    4.PNG (39.9 kB)
    5.PNG (18.2 kB)
    Add comment
    10|10000 characters needed characters exceeded

  • Oct 30, 2015 at 01:29 PM

    your shown code is of no use,  the important part is how you fill  these tables, which fields are filled with what values.

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 30, 2015 at 02:03 PM

    How did you fill (at least) POACCOUNT, POSERVICES and POSRVACCESSVALUES ?

    Hint : compare SERIAL_NO in table POACCOUNT and POSRVACCESSVALUES

    Regards,

    Raymond

    Add comment
    10|10000 characters needed characters exceeded