Skip to Content
-1

Multiple service line items price issue using BAPI_PO_CREATE1

Hi,

I am sending PO from non sap to sap system with multiple service line items, but the problem is updating the same net price in all service line items.

Regards,

RK

Add a comment
10|10000 characters needed characters exceeded

  • Hi Abinath
    
    Please find the below code used inside the item loop. PO is creating successfully in sap but same net price is updating in all the service line items.
    
            ls_serv-pckg_no = lv_pack.
            ls_serv-line_no = '0000000001'.
            ls_serv-ext_line = ''.
            ls_serv-outl_ind = 'X'.
            ls_serv-outl_no = '0'.
            ls_serv-subpckg_no = '0000000002'.
            ls_serv-from_line = 1.
    
    
            APPEND ls_serv TO lt_serv.
            CLEAR ls_serv.
            ls_serv-pckg_no = '0000000002'
            ls_serv-line_no = '0000000002'.
            ls_serv-ext_line = '0000000010'. 
            ls_serv-outl_level = '0'.
            ls_serv-subpckg_no = '0'.
            ls_serv-base_uom = item-po_unit.
            ls_serv-uom_iso  = item-po_unit_iso.
            ls_serv-quantity = item-net_price.
            ls_serv-net_value = item-net_price.
            ls_serv-price_unit = '1'.
            ls_serv-gr_price = '1'.
            ls_serv-short_text = item-short_text.
            ls_servmatl_group = item-matl_group.
            APPEND ls_serv TO lt_serv.
            CLEAR ls_serv.
    
    
            ls_svalues-pckg_no = lv_pack.
            ls_svalues-line_no = '0'.
            ls_svalues-serial_no = '01'.
            ls_svalues-serno_line = '01'.
            APPEND ls_svalues TO lt_svalues.
            CLEAR : ls_svalues, ls_account.
            ls_svalues-pckg_no = '0000000002'.
            ls_svalues-line_no = '0000000002'.
            ls_svalues-serial_no = '01'.
            ls_svalues-serno_line = '01'.
            APPEND ls_svalues TO lt_svalues.
    
    Thank You.
    
    RK
    
    
  • Hi Abinath,

    below is the code for service lines I am passing to BAPI_PO_CREATE1.

    PO is creating in SAP successfully but same net price is reflecting all line items .

    CALL FUNCTION 'NUMBER_GET_NEXT'

    EXPORTING nr_range_nr = '01'

    object = 'SERVICE'

    IMPORTING

    number = lv_pack

    EXCEPTIONS

    interval_not_found = 1

    number_range_not_intern = 2

    object_not_found = 3

    quantity_is_0 = 4

    quantity_is_not_1 = 5

    interval_overflow = 6

    buffer_overflow = 7

    OTHERS = 8.

    ls_serv-pckg_no = lv_pack.

    ls_serv-line_no = '0000000001'.

    ls_serv-ext_line = ''.

    ls_serv-outl_ind = 'X'.

    ls_serv-outl_no = '0'.

    ls_serv-subpckg_no = '0000000002'.

    ls_serv-from_line = 1.

    APPEND ls_serv TO lt_serv.

    CLEAR ls_ser.

    ls_serv-pckg_no = '0000000002'.

    ls_serv-line_no = '0000000002'.

    ls_serv-ext_line = '0000000010'.

    ls_serv-outl_level = '0'.

    ls_serv-subpckg_no = '0'.

    ls_serv-base_uom = item-po_unit.

    ls_serv-uom_iso = item-po_unit_iso.

    ls_serv-quantity = item-net_price.

    ls_serv-net_value = item-net_price.

    ls_serv-price_unit = '1'.
    ls_serv-gr_price = '1'.

    ls_serv-short_text = item-short_text.

    ls_serv-matl_group = item-matl_group.

    APPEND ls_serv TO lt_serv.

    CLEAR ls_serv.

    ls_sval-pckg_no = lv_pack.

    ls_sval-line_no = '0'.

    ls_sval-serial_no = '01'.

    ls_sval-serno_line = '01'.

    APPEND ls_sval TO lt_sval

    CLEAR : ls_sval.

    ls_sval-pckg_no = '0000000002'.

    ls_sval-line_no = '0000000002'.

    ls_sval-serial_no = '01'.

    ls_sval-serno_line = '01'.

    APPEND ls_sval TO lt_sval.

  • Hi, Can you add the code - Service Item internal table loaded..

Assigned Tags

Related questions

2 Answers

  • Posted on Jul 31, 2020 at 08:08 AM
    Hi Abinath
    
    Please find the below code used inside the item loop. PO is creating successfully in sap but same net price is updating in all the service line items.
    
            ls_serv-pckg_no = lv_pack.
            ls_serv-line_no = '0000000001'.
            ls_serv-ext_line = ''.
            ls_serv-outl_ind = 'X'.
            ls_serv-outl_no = '0'.
            ls_serv-subpckg_no = '0000000002'.
            ls_serv-from_line = 1.
    
    
            APPEND ls_serv TO lt_serv.
            CLEAR ls_serv.
            ls_serv-pckg_no = '0000000002'
            ls_serv-line_no = '0000000002'.
            ls_serv-ext_line = '0000000010'. 
            ls_serv-outl_level = '0'.
            ls_serv-subpckg_no = '0'.
            ls_serv-base_uom = item-po_unit.
            ls_serv-uom_iso  = item-po_unit_iso.
            ls_serv-quantity = item-net_price.
            ls_serv-net_value = item-net_price.
            ls_serv-price_unit = '1'.
            ls_serv-gr_price = '1'.
            ls_serv-short_text = item-short_text.
            ls_servmatl_group = item-matl_group.
            APPEND ls_serv TO lt_serv.
            CLEAR ls_serv.
    
    
            ls_svalues-pckg_no = lv_pack.
            ls_svalues-line_no = '0'.
            ls_svalues-serial_no = '01'.
            ls_svalues-serno_line = '01'.
            APPEND ls_svalues TO lt_svalues.
            CLEAR : ls_svalues, ls_account.
            ls_svalues-pckg_no = '0000000002'.
            ls_svalues-line_no = '0000000002'.
            ls_svalues-serial_no = '01'.
            ls_svalues-serno_line = '01'.
            APPEND ls_svalues TO lt_svalues.
    
    Thank You.
    
    RK
    
    
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 31, 2020 at 08:09 AM
    Hi Abinath
    
    Please find the below code used inside the item loop. PO is creating successfully in sap but same net price is updating in all the service line items.
    
            ls_serv-pckg_no = lv_pack.
            ls_serv-line_no = '0000000001'.
            ls_serv-ext_line = ''.
            ls_serv-outl_ind = 'X'.
            ls_serv-outl_no = '0'.
            ls_serv-subpckg_no = '0000000002'.
            ls_serv-from_line = 1.
    
    
            APPEND ls_serv TO lt_serv.
            CLEAR ls_serv.
            ls_serv-pckg_no = '0000000002'
            ls_serv-line_no = '0000000002'.
            ls_serv-ext_line = '0000000010'. 
            ls_serv-outl_level = '0'.
            ls_serv-subpckg_no = '0'.
            ls_serv-base_uom = item-po_unit.
            ls_serv-uom_iso  = item-po_unit_iso.
            ls_serv-quantity = item-net_price.
            ls_serv-net_value = item-net_price.
            ls_serv-price_unit = '1'.
            ls_serv-gr_price = '1'.
            ls_serv-short_text = item-short_text.
            ls_servmatl_group = item-matl_group.
            APPEND ls_serv TO lt_serv.
            CLEAR ls_serv.
    
    
            ls_svalues-pckg_no = lv_pack.
            ls_svalues-line_no = '0'.
            ls_svalues-serial_no = '01'.
            ls_svalues-serno_line = '01'.
            APPEND ls_svalues TO lt_svalues.
            CLEAR : ls_svalues, ls_account.
            ls_svalues-pckg_no = '0000000002'.
            ls_svalues-line_no = '0000000002'.
            ls_svalues-serial_no = '01'.
            ls_svalues-serno_line = '01'.
            APPEND ls_svalues TO lt_svalues.
    
    Thank You.
    
    RK
    
    
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.