How to change net Price by using BAPI_PO_change

Hi experts..
How i can change net price by using bapi_po_change.
What parameters i have to pass in this fm.
if possible please tell me , which table this FM will update.
Thanks.
I will award points for all help.

See the below code and have tested and it works great..
REPORT  ZTEST_PG_07 NO STANDARD PAGE HEADING
                    MESSAGE-ID z9_msg_prash.
Tables Declaration  ****
TABLES: ekpo.
Variables Declaration  ****
DATA: v_purchaseorder TYPE bapimepoheader-po_number.
DATA: v_ebelp TYPE ekpo-ebelp.
Constants Declaration  ****
CONSTANTS: x VALUE 'X'.
Internal Tables Declaration  ****
DATA: it_return  TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.
DATA: it_poitem  TYPE STANDARD TABLE OF bapimepoitem WITH HEADER LINE.
DATA: it_poitemx TYPE STANDARD TABLE OF bapimepoitemx WITH HEADER LINE.
DATA: wa_return  TYPE bapiret2.
Selection Screen  ****
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
PARAMETERS: p_ebeln LIKE ekpo-ebeln OBLIGATORY.
PARAMETERS: p_ebelp LIKE ekpo-ebelp.
PARAMETERS: p_menge LIKE ekpo-menge.
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN
AT SELECTION-SCREEN ON p_ebeln.
  IF p_ebeln IS NOT INITIAL.
    SELECT SINGLE ebeln INTO v_purchaseorder FROM ekpo
    WHERE ebeln = p_ebeln.
    IF sy-subrc <> 0.
      MESSAGE e002.
    ENDIF.
  ELSE.
    MESSAGE e005.
  ENDIF.
AT SELECTION-SCREEN ON p_ebelp.
  if p_ebeln is not initial.
  IF p_ebelp IS NOT INITIAL.
    SELECT SINGLE ebelp INTO v_ebelp FROM ekpo
    WHERE ebeln = p_ebeln AND ebelp = p_ebelp.
    IF sy-subrc <> 0.
      MESSAGE e003.
    ENDIF.
  ELSE.
    MESSAGE e006.
  ENDIF.
  endif.
START-OF-SELECTION
START-OF-SELECTION.
  v_purchaseorder = p_ebeln.
  it_poitem-po_item  = p_ebelp.
  it_poitem-quantity = p_menge.
  it_poitem-net_price = '20.00'.
  APPEND it_poitem.
  it_poitemx-po_item  = p_ebelp.
  it_poitemx-po_itemx = x.
  it_poitemx-quantity = x.
  APPEND it_poitemx.
*&----Calling BAPI function module
  CALL FUNCTION 'BAPI_PO_CHANGE'
    EXPORTING
     purchaseorder                = v_purchaseorder
    testrun                      = x
   TABLES
     return                       = it_return
     poitem                       = it_poitem
     poitemx                      = it_poitemx.
     CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      EXPORTING
        WAIT          = space
     IMPORTING
       RETURN        =
END-OF-SELECTION
END-OF-SELECTION.
  LOOP AT it_return INTO wa_return.
    WRITE:/ wa_return-message.
  ENDLOOP.
Thanks
Seshu

Similar Messages

  • How to change net price of order in B2B webshop

    Hi All,
    I have a requirement where a new input field (discount) is to be added in 'order.jsp' page of B2B webshop in header level. when a user enters some discount in it and clicks 'update' button, the netprice in header should be reduced by given discount and also all the line items should get affected by the same discount. I have added input field using extension mechanism as stated in 'examples' document.Now i am stuck with the pricing.Can any one suggest some pointers on this.
    Regards,
    Anasuya

    Hello Anasuya,
    You can call either function module CRM_PRICING_MAINTAIN_OW  (header) or function module CRM_PRICING_I_MAINTAIN_OW (item) in your CRM BAdI method CHANGEHEAD_SET_DATA to update the pricing conditions in your transactions.
    You are able to do this since the user is in the Basket / Cart page and clicking Update button.
    Easwar Ram
    http://www.parxlns.com

  • Recreating duty calculations for PO for changed Net price of an item.

    Dear Friends,
    i am trying to simulate the duty values for a PO by calling the FM's in the below said order.
    it is working fine, when i am simply passing the actual value of the item via structure (gfl_komp) shown below.
    My requirement is like, i want to change the net price in the  item structure (gfl_komp) and recalculate based on the changed Net Price. But when i change the Net value, it is not getting reflected in the simulated value of FM 'Pricing_screen'.
    Is there anything i should pass to the  header structure (gfl_komk). Please help me out.
       CALL FUNCTION 'ME_FILL_KOMK_PO'
              EXPORTING
                i_ekko          = gfl_ekko
                i_ekpo          = gfl_ekpo_pass
               i_lfa1          = gfl_lfa1
                i_t001          = gfl_t001
               i_kalsm         = gfl_ekko-kalsm
               i_kappl         = 'M'
         I_EGIMP         = I_EGIMP
         I_LFM1          = I_LFM1
         I_T001W         = I_T001W
         I_TRTYP         = I_TRTYP
         I_WEDATEN       = I_WEDATEN
         I_KVORG         = I_KVORG
             IMPORTING
               e_komk          = gfl_komk
            CALL FUNCTION 'ME_FILL_KOMP_PO'
              EXPORTING
                i_ekpo                     = gfl_ekpo_pass
                i_t001w                    = gfl_t001w
                i_ekko                     = gfl_ekko
                i_komk                     = gfl_komk
           I_MT06E                    = I_MT06E
           I_EINE                     = I_EINE
           I_EINA                     = I_EINA
           I_PREISFINDUNGSMENGE       = I_PREISFINDUNGSMENGE
           I_UEBPO                    = I_UEBPO
             IMPORTING
               e_komp                     = gfl_komp
    Here i am trying to change the values of the actual PO values in gfl_komk and gfl_komp.
            CALL FUNCTION 'PRICING_SCREEN'
              EXPORTING
                comm_head_i            = gfl_komk
                comm_item_i            = gfl_komp
      COMM_TEXT              = ''
      DISPLAY_ONLY           = ''
      MATERIAL_TEXT          = ''
      TRTYP_I                = 'A'
      FPTYP_I                = ''
      CTRL_NO_DISPLAY        = CTRL_NO_DISPLAY
      REQUEST_POS1           = '-'
      REQUEST_POSM           = '-'
      REQUEST_POSP           = '-'
      REQUEST_POSL           = '-'
    IMPORTING
      COMM_HEAD_E            = COMM_HEAD_E
      COMM_ITEM_E            = COMM_ITEM_E
      CALCULATION_TYPE       = CALCULATION_TYPE
      FCODE_E                = FCODE_E
              TABLES
                tkomv                  = git_tkomv
      SVBAP                  = SVBAP
    CHANGING
      C_VFKOMV               = C_VFKOMV
        ENDCASE.
      ENDIF.
    Regards,
    Sandeep Sivan
    Edited by: sandeep sivan on Apr 13, 2010 11:32 AM
    Edited by: sandeep sivan on Apr 13, 2010 11:32 AM
    Edited by: sandeep sivan on Apr 13, 2010 11:37 AM
    Edited by: sandeep sivan on Apr 13, 2010 11:47 AM

    hi sirnivas..
    Thanq you for the points..these are the first i ever recieved..
    if you are working on peice of code which can get the price history do me a favour if you have finished the code just explain it to me who did u  do that...
    i have been working on an object from last two weeks to get the latest price...
    the thing is even though the price for condition items has been changed it wont get updated in the Sales orders unless new pricing fot the document is done...
    so i have to get all the sales orders who condition items price has been changed and display them in an ALV...so if you can get the exact old values...for the conditions i guess the opposite also can be done.....
    Here i have suggestion for you...in condition items there is a process called SCHEMA ( pricing Schema) which you can see using Condition Analysis button at the bottom of the condition item window...
    you can see all the price changes to the condition when you parse the tree structure of the procedure..EXAMPLE :- R0000 etc...
    so some Sales orders if the Schema has been changed all the existing condition are replaced by New ones from the changed Schema...so i guess that would play an important role in deciding the Price of Sales order...
    I know this is bit long but .....if you did finsish your program do let me know how you did it...
    Thankyou very much and good luck.

  • How to change the price of a material in PO

    Hi,
      Please tell me how to change the price of a material while raising a  PO,for example  i am raising a PO and in conditions  the price is 100 and i wanna update it to 110.Please help me

    HI,
    If you are using condion record, you can change the value for the required condition type so that it will flow to PO. IF you are not using that, you can change the price at the line item level in PO itself.
    Regards
    Ram

  • Change Net price in the PO after releasing blocked invoice

    Hi,
    We had a PO which had wrong price for an item.  Invoice amount was hight for this line item and so the invoice was blocked.  Accounting manually unblocked the invoice so purchasing could correct the price on the PO but now the net price column is greyed out in the PO just for that line itme.
    Please can anyone let me know how to change the price on the PO so that invoice could be processed.
    Thanks
    Mira

    Hi,
    Once PGR Processed you can't change the Price of the PO.
    First you have to reverse the INvoice in MR8M..
    Then you have to cancel the MIGO  through 102 movement type.
    then you do changes in PO item value.
    afterthat do MIGO & MIRO.
    it will work.
    SAM

  • Hello ! how to change document sizes and use our own size (not A3, A2 ...) thank you !

    hello ! how to change document sizes and use our own size (not A3, A2 ...) thank you !

    Experiment. No harm in trying.
    If you are just starting to use Pages you need to make your own assessment given current events whether committing your work to a format and software given this support is a wise move.
    You also need to look at what will produce workable results. Particularly if your large posters are to be commercially printed and contain large bitmap (photographic) images.
    Always work backwards from your output. Ask your printer what they require to do their job.
    Peter

  • *Is it possible to change NET PRICE of Service PO after Invoice.*

    if it is possible can you please mention what are ways to change NET price after INVOICE

    I would suggest Forum "ERP - Logistics Materials Management (MM)":
    SAP ERP - Logistics Materials Management (SAP MM)
    But I believe you should try Forum Search beforehand:
    http://forums.sdn.sap.com/search!default.jspa

  • How to Change S960 Lockscreen wallpaper using own image?

    Can anybody advise on how to change S960 lockscreen wallpaper using own image? I only manage to use the default or existing lockscreen wallpaper which appear in theme setting.

    Hi all, the solution is very simple.Simply save the pictures that you want to use as your lockscreen into storage/sdcard0/Download/pictures/lockscreenYour lockscreen picture should be in 16:9 or (1920 x 1080 pixels). To set the pictures as your lockscreen, go to theme setings, swipe to the right and tap the lockscreen wallpaper option that is on the right (red box).You'll see all the lenovo default lockscreen wallpapers, as well as the lockscreen pictures that you saved. Just tap the picture and set as lockscreen wallpaper.

  • How to change the number im using on my messages?

    how to change the number im using on my messages?

    If you are asking about the telephone number, Messages/Preferences/Accounts/Messages account - click add e-mail and enter it.

  • Changing Net Price using bapi 'BAPI_PO_CREATE1'

    Hi All,
    I have a requirement to create the PO using BAPI .In this ,  the Net Price value is automatically updated from Info record.
    Can any one pls suggest the procedure how to update this Net Price through a flat file , and not through the info record.
    Thanks in advance...
    Regards,
    Sivani.

    HI,
    Try to set the IMPORT paramter NO_PRICE_FROM_PO = 'X'.
    also if u want the data from the flat file collect the data from flat file to internal table.
    loop through that internal table
    call BAPI.
    endloop.
    Hope this solves ur problem
    Thanks ,
    Ruchi

  • How to populate net price on delivery

    Hi All
          We are running closed order reports on sales overview cube with the selection on Actual goods issue date. But we are not getting Net price and ordered quantity in the report. The reason is Net price is coming from sales order but when we extract using Actual goods issue date data is populating from delivery line only.
      Anyone have idea on this how to extract delivered orders with netprice and also we need ordered quantity.
    Thanks
    Vani

    There might be more than one method to resolve the requirement.
    You can develop a routine in t.code VOFM and add it in the column  AltCTy. The logic in the routine can be if the netvalue exceeds 2500, then the net value should be 2500.
    The second option is you can try with using standard. In VK12, after maintaining the pricing as 100/day, go to details. Then in upper limit add value as 2500. Then create a test sales order for 25 days and more than 25 days, then check the values. I think this can help with your scenario.
    Regards,

  • Is there any transaction that will change net price in a purchase order

    Hi All,
               Is there any program / transaction where i can change the net price for few materials in the purchase orders (say 100 purchase orders) which has been created few days back. Please let me know at the earliest.
    Regards,
    PSS

    Hi,
    By changing the price in the Info Record price condition it is possible to made to reflect the same in PO Net Price through Automatic document Adjustment.
    MEI1 & MEI2 are used for Invidual & Mass processing.
    Its applicable to Vendor / Material combination i.e. Info Record.
    Regards,
    Ramesh

  • How to change PO price after Goods receipt

    Hi Expert,
    This is very urgent. I have created PO with account assignment (Individual order/project (D)) and has material master last month and received goods last month too.
    PO item already been issued and used for production. There is no stock balance both urestricted and sales order stock.
    Now we need to change the PO price for paying the vendor right price. I have tried MBST to cancel/reverse material document and give me error message saying "Sales ord stk deficit" I think because of no stock avaible in the system.
    I need a urgent solution: How can  i change PO price or cancel material doc to adjust the PO price.
    Thanks,
    Mohammed Rahman

    Hi Mohammed
    Which step system appear error ?
    Example: Qty PO have already receipt 4 set, you already used 3 set. Stock have 1 set.
    When you use 561with quantity 5 set, stock have 6 set.
    after u cancel PO wrong price (qty is 4 set) - stock have 2 set  but when you change PO and Goods Receipt again stock will have 6 set.
    And you use 562 with Qty 5set => now stock still have 1 set.
    And price already changed.
    Regards,
    Thang
    Edited by: Cao Danh Thang on Jun 13, 2008 4:30 AM

  • How to get net price of a given material(Just like in VA01)

    Hello Experts,
    How do I get the net price of a given material? Just like when entering a
    material in VA01(sales order creation). Hope you can help me guys.
    Thank you and take care!

    This is a million dollar question.
    It depends on how the pricing have been configured in your system and only your SD consultant can answer it correctly. Price in VA01 could be determined by using the pricing conditions or, if allowed, a manual user entry (i.e. when users just type in the price). Discounts, taxes, etc. are calculated in a similar way, also based on the configuration.
    Pricing conditions are displayed in transaction VK13. You might want to take a look at an order in VA03 -> double-click on a line and go to Conditions tab. There are buttons Analysis and Condition Rec. that might be useful for your research. It is possible to configure different price for the same material and different customer, distribution channel, etc., so you will have to ask your SD consultant how to get the correct number in each case.
    Just FYI the net price on the order/contract is in VBAP-NETWR and condition are stored in the tables Annn, e.g. A901, etc. The tables are generated according to the configuration and are different in each system.

  • How to make net price field in Purchase Order Uneditable

    Hello all,
    I am facing a problem. During creation of purchase orders the material price is picked up from the Info Record, but the net price field is editable. Please guide me how through standard SAP can i make this net price field uneditable.
    Thanks in Advance,
    Ritesh.

    Hi Ritesh,
    You can goto:
    SPRO-MM-Purchasing-Purchase Order-Define Screen Layout at Document Level
    from here you select ME21N-Selection group-Quantity and Price.
    Make the price and price unit as DISPLAY.
    By this it will show only display for price, but you have to take not that there is also condition tab which user can change the price, this price is from INFOREC.
    Goto to M/06 select your Condition type, In Manual entries maintain "D"-Not possible to process manually
    Regards,
    Maia

Maybe you are looking for