PR price to PO while creating PO

Hi friends,
Post to upgradation 6.0 from 4.70, we are facing one peculiar problem..
Our scenario is:
1. PR creation with Price
2. Referencing PR for PO..Here price will be copied from PR
Now problem:
1. PR where there is no material master..Price is copied automatically from PR..
2. Where as PR having Material master..Price is copied from Last purchase order..
But we need for both the scenario, Price should be copied from PR..
Kindly anyone can suggest solution for this scenario..
regards,
Sundaresan.k

Hi,
Are you sure this is an upgrade question, and not simply an MM issue?
I suggest you test the same exact scenarios in your old 4.7 system and the 6.0 system.
The functionality to copy the last PO price for POs for a specific material number was already present in 4.7.  This is controlled via the (usually automatic) creation of info records and also the EVO parameter ID which is configured in the IMG>Purchasing>Environment>Default Values for Buyer.  As long as you don't have a specific EVO parameter that has disabled the "last PO price" this is the standard behaviour.
I don't believe a <blank> material PR will create any info record, so there is no feature to default the last PO price into a PO w/ref to a PR that is not material-specific (ex. a material group).
In other words, even in 4.7 if you had a PO w/ref to a PR, and that material has already been purchased from the same vendor before, the last PO price will be proposed.  So I don't think this is an upgrade issue, I suspect a difference in the data you are using between the 4.7 and 6.0 system, user ID difference...etc...

Similar Messages

  • BADI to uncheck Invoice indicator and set net price as 0 while creating PO

    Hi all,
    Is there any BADI to uncheck the Invoice indicator and set the net price as "0" while creating Purchase order?
    Im creating Purchase order in SRM and for certain vendor and material group net price should be set to zero and invoice receipt to be unchecked so that user wont get invoice receipt.
    Can anyone tell me how to do this?
    Thanks,
    Amal

    Pradeep,
    Thanks for your response.
    I will tell you the actual senario im having.
    Using Shoppin Cart, user will order for some items in SRM and once it was completed PO will be created in R/3 system. Here(R/3) when i check in ME23 for the created PO, the IR flag has been set. But i want the PO should be created as IR flag not checked and amount is changed to ZERO for certain vendor and material group combination.
    I searched some threads and found few function modules ( BBP_PD_PO_GETDETAILS, BBP_PD_PO_UPDATE, BBP_PD_PO_SAVE) which can be used in BADI BBP_DOC_CHANGE_BADI. But im not aware of the fields in which we can found vendor, material group, amount, IR indicator.
    Can you please guide me how to resolve this?
    This is my first task in SRM and im not aware of all terms in SRM.
    SRM version: 4.0
    R/3 version: ECC 5.0
    Thanks,
    Amal

  • Price Field Changeable while creating the Shopping cart

    Hi We are in SRM 4.0 and follow a classic scenarios.
    For some materials we run program EBP_GET_BACKEND_PRICES
    and get the prices from the backend, how ever while creating a shopping cart if the price differs we need to change the price but the field is grey.
    how do we change the price ????
    EX - My MAP in R/3 for Material A is  100 Rs. how ever while I create a shopping cart the price i need to enter is 102 how do I change the  price.
    can anyone throw light on this.
    regards,
    Nimish Sheth

    Nimish,
    for this you have to change the standard code.
    In screen communication structures, there is a flag "price_changeable" that controls the edit mode of price field.
    You have to change the standard logic to implement your behaviour in FORM price_changable_set from include LBBP_SC_APPF92:
      IF es_item-mode EQ gc_display OR
        ( es_item-rfq_ind EQ gc_yes AND es_item-price IS INITIAL ).
        CLEAR: es_item-price_changeable.
      ELSE.
        IF NOT es_item-catalogid IS INITIAL OR
           es_item-price_origin EQ c_price_origin_f OR
           iv_scenario EQ c_sc_generic_soco OR
           iv_scenario EQ c_sc_generic_history OR
           iv_scenario EQ c_sc_generic_workload OR
           ( es_item-price NE es_item-gross_price AND
             NOT es_item-price IS INITIAL ).
          CLEAR: es_item-price_changeable.
        ELSE.
          es_item-price_changeable = gc_yes.
        ENDIF.
      ENDIF.
    Rgds
    Christophe

  • Price not picking while creating purchase order

    hi all,
    i have created a pricing procedure and assigned to the vedor, but while creating purchase order the material price is not picking up.if i use the standard one the price is picking up. can anyone explaing any setting iam missing.
    regards
    thyagarajan

    Hi
    In your pricing procedure
    For the condition type Automatic Gross price PB00, you have assigned am Access sequence.
    <b>Access sequence</b>: An access sequence is a search strategy by means of which the system searches for valid records in various condition tables. It consists of one or more accesses. The sequence of accesses controls the priority of the individual condition records among each other. Through the accesses, the system is told where to look first and where to look next for a valid condition record in each case.
    Once the pricing procedure triggers, System looks for the valid condition recorrd for the condition type PB00 as per the priority listed in Access sequence.
    Example: If purchase info record is the first priority and you maintained the Info record then system picks the price from Info record into PO.
    If no valid condition record found then it will trigger PBXX Manual Gross price condition in PO and ask to enter the price manually.This is called condition technique.
    So check whether you maintained the Condition record for PB00 or not?
    Regards
    Ramakrishna

  • Price error message while creating production order- Urgent

    In past i was getting warning message of 'No price could be determined for material/batch and Plant" message no CK 465 at the time of saving the production order after creation but now it has stopped even though there is no price in material amster.
    I changed the configuration to Error message (TC: OPR4_PPCO) and it works but why not for warning message?
    Thanks

    Please confirm where i should check for Activity price?
    But then why we are able to get error message.
    Reexplain:
    Creating a production order which do not have standard cost in material master.
    While saving, getting a error message'No price could be determined.......'
    Now changing the message to Warning through configuration using TC: OPR4_PPCO
    Now again creating the production order and saving
    Expectation to have same message as warning but not getting anything.
    Thanks
    Edited by: vineet garg on May 1, 2008 12:14 AM

  • Get "Error in Net Price Calculation" error while creating a Purchase Order

    I am getting a error when i try to create a PO. Says "Error in Net Price Calculation item 00010(Please correct)"
    I have defined conditon records with the price for the material  and have also created info record.However the price in the info record (including currency i.e USDN is different than the one defined in the conditon records currency is USD).
    However the price is different from the one defined in info record and in material master.
    Where is it picking the price from also is there any way to edit the price in material master or info record ?
    Also when i view the condition records by using Tcode MEK1 i get the following error
    "Access Pricing Purchasing Z00q 20 contains no fields"
    I know Z001 is the access sequence
    Can any one tell me wht is this error message about ?
    Edited by: Dspsac on Jan 29, 2008 4:31 AM

    how can u maintain the condition record as well as info record for a vendor -material in the same time frame
    it is not possibe
    as info record is also 1 of the condition table
    if u have maintained the info record then system is going to fetch the data from there but point top notice is it depends on the validity of record
    system fetch the price from info record
    and the currency used is fom vendor master

  • Material Listing Error while creating the sales order

    Hi Guru's
    I have mantained a material in the lisitng for A002 combiantion for SO/DC/Pric. ref. material
    While creating the sales order is throwing an error as material is not listed so the transaction is not possible.
    I have done the basic invetingation on the folowing aspects
    1)checking the material in the listing
    2)Validity periods
    3)Material not blcoked
    4)Mateial is extened for the respective sales org
    Kindly help ASAP.
    Thanks & Regards
    Tarakaram

    Dear SAP SD 007
    I can confidently tell that an enhancement or an user exit has been applied in your scenario
    You have to check that
    Normally when creating a sales order with respect or referring billing documents the qty will be in editable mode and it is standard problem
    Your people has solved the standard problem by enhancement
    Usually OR--LF-PGI----F2 (SAY THE QTY IS 25 UNITS)
    Now you are creating returns order with reference to F2 in the return order type Re there is a standard issue that user can edit the qty to 30 from the original 25
    To solve this only your people have used userexit
    Line items and qty greyed out means definately there is some enhancement or user exit applied
    You have to check that
    Regards
    Raja

  • How to update the condition price in sales order while creating the invoice

    Hi,
    How to update the condition price in the sales order to carry out the new price while creating the invoice?
    While creating the invoice it should update the condition price in sales order.
    Thanks,
    Balaram

    No, pricing is not there in delivery.
    I found an exit for VF01transaction where we can update the price in order.
    Can you please tell me how to update the price if I have the order, material numbers and conditions number?
    Thanks,
    Balaram

  • Vendor price comparision while creating a PO

    Hi,
    In this scenario the clients wants that while creating a PO the pop up should be displayed showing the prices of different Vendors for that material.From this he could select the Vendor with the best price and create a PO.Is it possible,please guide.
    Thanks
    Arun

    Hi
    At the time of Po creation this facility is not available.U can compare it at the time of RFQ
    also while creating PR u can compare diff. vendor price and select suitable one
    Vishal...

  • Net Price Issue while creating PO w.r.t PR

    Dear All,
    While creating PO w.r.t PR, there is error given by the system as Net Price is not adopted. Net Price remains as zero. All the others details are automatically adopted.
    Is there customization required so that Net Price is adopted from PR while creating the PO.
    Please guide.
    Regards,
    Vikas

    Hi,
    Yes there is a way to fix this.
    Please follow the steps below.
    1) SPRO --> MM --> Purchasing --> Authorization Management --> Define Function Authorizations for Buyers
    2) Maintain 01 function authorization or copy it to create a new one
    3) Under General Parameters, Check Adopt PO Price.
    4) If you would like PO to have reference objects as mandatory, uncheck W/o Reference Optional
    5) Go to each buyers ID by SU01 --> Parameter. Enter EFB and enter the 2 codes that you defined in Step 2.
    6) Log out then log back in
    Now with that ID, when you create PR, under valuation, you have a new drop down button asking whether you would like to adopt the price in PO.
    Kuber

  • Exact purchase price of material should reflect while creating new P.R

    Dear CONS
       We have created a P.O for a specfic material. the value of material is Rs.10/- ( say).we know the system will show the moving average price of material ( Rs. 12/-) while creating P.R & P.O. Is there any way to check that the exact price of material from the last P.o is Rs. 10/-. That means we want to use the last P.o's price for creating P.R or P.O.PL. suggest its solution.

    Hi,
    Define Default value for buyers.
    SPRO>MM>Purchasing-->Dealut values for buyers.
    maintain the settings for last PO price capture in this PO.
    after that maintain iwith user Profile with EVO parameters.
    Use the User parameters for last Po price pick for current PO.
    SAM

  • Price Change while creating a shopping cart

    Dear Srm Guru's
    We are in SRM 4.0 and following a classic scenarios.
    While creating a shopping cart  the price in the shopping cart is picked up from the price which we upload through EBP_GET_BACKEND_PRICES
    If there is a variation in the price can we change the price while creating the shopping cart. Currently the field is in display mode what settings should we make that it allows a change of price while creation of shopping cart.
    Regards,
    Nimish Sheth

    Nimish,
    for this you have to change the standard code.
    In screen communication structures, there is a flag "price_changeable" that controls the edit mode of price field.
    You have to change the standard logic to implement your behaviour in FORM price_changable_set from include LBBP_SC_APPF92:
      IF es_item-mode EQ gc_display OR
        ( es_item-rfq_ind EQ gc_yes AND es_item-price IS INITIAL ).
        CLEAR: es_item-price_changeable.
      ELSE.
        IF NOT es_item-catalogid IS INITIAL OR
           es_item-price_origin EQ c_price_origin_f OR
           iv_scenario EQ c_sc_generic_soco OR
           iv_scenario EQ c_sc_generic_history OR
           iv_scenario EQ c_sc_generic_workload OR
           ( es_item-price NE es_item-gross_price AND
             NOT es_item-price IS INITIAL ).
          CLEAR: es_item-price_changeable.
        ELSE.
          es_item-price_changeable = gc_yes.
        ENDIF.
      ENDIF.
    Rgds
    Christophe

  • Error  while creating a Service PO using BAPI_PO_CREATE1

    Hi,
    Im facing Error as "In case of account assignment, please enter acc. assignment data for item" while creating Service PO using BAPI_PO_CREATE1.
    Header Data
          w_poheader-comp_code = w_src-bukrs.  "Company Code
          w_poheader-doc_type = w_src-bsart.   "Document type
         w_poheader-delete_ind = w_src-vrtkz. "Deletion Indicator
          CLEAR: lv_date.
          CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
            EXPORTING
              date_external            = w_src-aedat
            IMPORTING
              date_internal            = lv_date
            EXCEPTIONS
              date_external_is_invalid = 1
              OTHERS                   = 2.
          w_poheader-creat_date = lv_date.    "Creation Date
          w_poheader-created_by = sy-uname.    "Creator Name
          w_poheader-vendor = w_src-lifnr.     "Vendor
          w_poheader-pmnttrms = w_src-zterm.   "Payment Terms
          w_poheader-purch_org = w_src-ekorg.  "Purchase Organization
          w_poheader-pur_group = w_src-ekgrp.  "Purchase Group
          w_poheader-ref_1    = w_src-ihrez.   "OLD PO
          w_poheaderx-comp_code = 'X'.  "Company Code
          w_poheaderx-doc_type = 'X'.   "Document type
         w_poheaderx-delete_ind = 'X'.      "Deletion Indicator
          w_poheaderx-creat_date = 'X'.    "Creation Date
          w_poheaderx-created_by = 'X'.
          w_poheaderx-vendor = 'X'.
          w_poheaderx-pmnttrms = 'X'.   "Payment Terms
          w_poheaderx-purch_org = 'X'.  "Purchase Organization
          w_poheaderx-pur_group = 'X'.  "Purchase Group
          w_poheaderx-ref_1 = 'X'.
    Item Data
          w_poitem-po_item = w_src-ebelp.
          IF NOT w_src-elikz IS INITIAL.
            w_poitem-delete_ind = w_src-elikz.
          ENDIF.
          IF NOT w_src-txz01 IS INITIAL.
            w_poitem-short_text = w_src-txz01.
          ENDIF.
          IF NOT w_src-werks IS INITIAL.
            w_poitem-plant = w_src-werks.
          ENDIF.
    Material group
          IF NOT w_src-matkl IS INITIAL.
            w_poitem-matl_group = w_src-matkl.
          ENDIF.
    Open or Partial Qty
          IF w_src-opqty IS  NOT INITIAL.
            w_poitem-quantity = w_src-opqty.
          ELSEIF NOT w_src-paqty IS INITIAL.
            w_poitem-quantity = w_src-paqty.
          ENDIF.
          IF NOT w_src-meins IS INITIAL.
            w_poitem-po_unit = w_src-meins. "Base Unit of Measure
          ENDIF.
          IF NOT w_src-netpr IS INITIAL.
            w_poitem-net_price = w_src-netpr.  "Net Price
          ENDIF.
          IF NOT w_src-mwskz IS INITIAL.
            w_poitem-tax_code = w_src-mwskz.
          ENDIF.
          IF NOT w_src-pstyp IS INITIAL.
            w_poitem-item_cat = w_src-pstyp.
          ENDIF.
          IF NOT w_src-knttp IS INITIAL.
            w_poitem-acctasscat = w_src-knttp.
          ENDIF.
          IF NOT w_src-vrtkz IS INITIAL.
            w_poitem-distrib = w_src-vrtkz.
          ENDIF.
    Package No
          IF NOT w_src-packno IS INITIAL.
            w_poitem-pckg_no = w_src-packno.  "Package no
          ENDIF.
          IF w_poitem-delete_ind IS INITIAL AND
             w_poitem-short_text IS INITIAL AND
             w_poitem-plant IS INITIAL AND
             w_poitem-matl_group IS INITIAL AND
             w_poitem-quantity IS INITIAL AND
             w_poitem-po_unit IS INITIAL AND
             w_poitem-net_price IS INITIAL AND
             w_poitem-tax_code IS INITIAL.
            CLEAR lv_item.
          ELSE.
            APPEND w_poitem TO i_poitem.
            CLEAR: w_poitem.
            lv_item = 'X'.
          ENDIF.
          w_poitemx-po_item = w_src-ebelp.
          w_poitemx-delete_ind = 'X'.
          w_poitemx-short_text = 'X'.
          w_poitemx-plant = 'X'.
          w_poitemx-matl_group = 'X'.
          w_poitemx-quantity = 'X'.
          w_poitemx-po_unit = 'X'.
          w_poitemx-net_price = 'X'.
          w_poitemx-tax_code = 'X'.
          w_poitemx-item_cat = 'X'.
          w_poitemx-acctasscat = 'X'.
          w_poitemx-distrib = 'X'.
          IF NOT w_src-packno IS INITIAL.
            w_poitemx-pckg_no = 'X'.
          ENDIF.
          IF lv_item = 'X'.
            APPEND w_poitemx TO i_poitemx.
            CLEAR: w_poitemx,
                   lv_item.
          ENDIF.
    PO Deliery Address
          w_poaddrdelivery-po_item = w_src-ebelp.
          IF NOT w_src-adrn2 IS INITIAL.
            w_poaddrdelivery-addr_no = w_src-adrn2.
            APPEND w_poaddrdelivery TO i_poaddrdelivery.
            CLEAR w_poaddrdelivery.
          ENDIF.
    POschedule
          w_poschedule-po_item = w_src-ebelp.
          CLEAR: lv_date.
          CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
            EXPORTING
              date_external            = w_src-eindt
            IMPORTING
              date_internal            = lv_date
            EXCEPTIONS
              date_external_is_invalid = 1
              OTHERS                   = 2.
          IF NOT lv_date IS INITIAL.
            w_poschedule-del_datcat_ext = 'D'. "Delivery Date in Day Format
            w_poschedule-delivery_date = lv_date.
            w_poschedule-quantity = w_src-menge.
            APPEND w_poschedule TO i_poschedule.
            CLEAR w_poschedule.
            lv_schd = 'X'.
          ENDIF.
          w_poschedulex-po_item = w_src-ebelp.
          w_poschedulex-del_datcat_ext = 'X'.
          w_poschedulex-delivery_date = 'X'.
          w_poschedulex-quantity = 'X'.
          IF lv_schd = 'X'.
            APPEND w_poschedulex TO i_poschedulex.
            CLEAR : w_poschedulex,
                    lv_schd.
          ENDIF.
    PO Account Assignment
          w_poaccount-po_item = w_src-ebelp.
          w_poaccount-serial_no = w_src-zekkn.
    Distribution Indicator is 1
          IF w_src-vrtkz EQ '1'.
            w_poaccount-distr_perc = w_src-vproz.
            IF NOT w_src-menge IS INITIAL.
              CLEAR lv_menge.
              lv_menge = w_src-menge.
            ENDIF.
            lv_acct_qty = lv_menge * w_src-vproz / 100.
    Get Round value of Quanity
            frac = FRAC( lv_acct_qty ).
            IF frac EQ 0.
              lv_acct_qty = FLOOR( lv_acct_qty ).
            ELSE.
              lv_acct_qty = CEIL( lv_acct_qty ).
            ENDIF.
            w_poaccount-quantity = lv_acct_qty.
          ELSEIF w_src-vrtkz IS INITIAL.
            w_poaccount-quantity = w_src-menge.
          ENDIF.
          w_poaccount-gl_account = w_src-saknr.
          w_poaccount-costcenter = w_src-kostl.
          w_poaccount-asset_no = w_src-anln1.
          w_poaccount-wbs_element = w_src-wbs.
          w_poaccount-network = w_src-nplnr.
          w_poaccount-tax_code = w_src-mwskz.
          w_poaccount-activity = w_src-vornr.
          APPEND w_poaccount TO i_poaccount.
          CLEAR w_poaccount.
          w_poaccountx-po_item = w_src-ebelp.
          w_poaccountx-serial_no = w_src-zekkn.
          IF w_src-vrtkz EQ '1'.
            w_poaccountx-distr_perc =  'X'.
          ENDIF.
          w_poaccountx-quantity = 'X'.
          w_poaccountx-gl_account = 'X'.
          w_poaccountx-costcenter = 'X'.
          w_poaccountx-wbs_element = 'X'.
          w_poaccountx-network = 'X'.
          w_poaccountx-tax_code = 'X'.
          w_poaccountx-activity = 'X'.
          APPEND w_poaccountx TO i_poaccountx.
          CLEAR w_poaccountx.
    PO Services
          w_poservices-pckg_no = w_src-packno.  "Package no
          w_poservices-line_no = w_src-srv_line_no.    "Line item
          w_poservices-ext_line = w_src-extrow.    "External line
         w_poservices-outl_level = 0.
         w_poservices-outl_ind = 'X'.
          w_poservices-subpckg_no = w_src-sub_packno.  "Sub package no
          w_poservices-quantity = w_src-srqty.  "Service Quantity
          w_poservices-base_uom = w_src-srmeins.  "Service Basic unit of Measure
          w_poservices-price_unit = '1'.
         w_poservices-from_line = '1'.
          w_poservices-gr_price  = w_src-brtwr.  "GR Price
          w_poservices-short_text = w_src-sh_text1.    "Service Short Text
         w_poservices-matl_group = w_src-matkl.  "Material Group
          APPEND w_poservices TO i_poservices.
          CLEAR w_poservices.
    PO Service Access values
          w_posrvacc-pckg_no = w_src-packno.  "Package no
          w_posrvacc-line_no = w_src-srv_line_no. "Line item
          w_posrvacc-serno_line = w_src-zekkn.                  "'01'..
          IF w_src-vproz IS INITIAL.
            w_posrvacc-percentage = '100.0'.
          ENDIF.
          w_posrvacc-serial_no = w_src-zekkn.                   "'01'.
          w_posrvacc-quantity = w_src-srqty.  "Service Quantity
          w_posrvacc-net_value = w_src-srqty.  "Net value
          APPEND w_posrvacc TO i_posrvacc.
          CLEAR w_posrvacc.
        ENDIF.
    ***Create a NEW PO
        AT END OF ihrez.
    Call BAPI
          CALL FUNCTION 'BAPI_PO_CREATE1'
            EXPORTING
              poheader          = w_poheader
              poheaderx         = w_poheaderx
            IMPORTING
              exppurchaseorder  = gv_ebeln
            TABLES
              return            = i_return
              poitem            = i_poitem[]
              poitemx           = i_poitemx[]
              poaddrdelivery    = i_poaddrdelivery[]
              poschedule        = i_poschedule[]
              poschedulex       = i_poschedulex[]
              poaccount         = i_poaccount[]
              poaccountx        = i_poaccountx[]
              poservices        = i_poservices[]
              posrvaccessvalues = i_posrvacc[]
              extensionin       = i_extensionin[].
    Commit the Transaction
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
           EXPORTING
             WAIT          = 'X'.
    Regards,
    Deepthi.

    1. If we get error as  "In case of account assignment, please enter acc. assignment data for item" than First cehck whetaher u have authorization to Tcode ME23n or not. In my case, I din't had authorization to Me23n tcode.
    2. If we get Error as "Please Mainatain Services or Limits". Please create a Service PO in the following Order.
    *& Internal Table Declaration
    DATA : i_intern         TYPE STANDARD TABLE OF alsmex_tabline WITH HEADER LINE,
           i_poitem         TYPE STANDARD TABLE OF bapimepoitem,
           i_poitemx        TYPE STANDARD TABLE OF bapimepoitemx,
           i_poaddrdelivery TYPE STANDARD TABLE OF bapimepoaddrdelivery,
           i_poschedule     TYPE STANDARD TABLE OF bapimeposchedule,
           i_poschedulex    TYPE STANDARD TABLE OF bapimeposchedulx,
           i_poaccount      TYPE STANDARD TABLE OF bapimepoaccount,
           i_poaccountx     TYPE STANDARD TABLE OF bapimepoaccountx,
           i_poservices     TYPE STANDARD TABLE OF bapiesllc,
           i_posrvacc       TYPE STANDARD TABLE OF bapiesklc,
           i_extensionin    TYPE STANDARD TABLE OF bapiparex,
           i_return         TYPE STANDARD TABLE OF bapiret2.
    *& Work Area Declaration
    DATA:
          w_poheader       TYPE bapimepoheader,
          w_poheaderx      TYPE bapimepoheaderx,
          w_poitem         TYPE bapimepoitem,
          w_poitemx        TYPE bapimepoitemx,
          w_poaddrdelivery TYPE bapimepoaddrdelivery,
          w_poschedule     TYPE bapimeposchedule,
          w_poschedulex    TYPE bapimeposchedulx,
          w_poaccount      TYPE bapimepoaccount,
          w_poaccountx     TYPE bapimepoaccountx,
          w_poservices     TYPE bapiesllc,
          w_posrvacc       TYPE bapiesklc,
          w_extensionin    TYPE bapiparex,
          w_return         TYPE bapiret2.
    START-OF-SELECTION.
    Header Data
      w_poheader-comp_code = '5791'.  "Company Code
      w_poheader-doc_type = 'Z0CM'.   "Document type
      w_poheader-creat_date = sy-datum.  "lv_date.    "Creation Date
      w_poheader-created_by = sy-uname.    "Creator Name
      w_poheader-vendor = '0005012343'.     "Vendor
      w_poheader-pmnttrms = 'Z004'.   "Payment Terms
      w_poheader-purch_org = 'P000'.  "Purchase Organization
      w_poheader-pur_group = '001'.  "Purchase Group
      w_poheader-ref_1    = '004500007671'.   "OLD PO
      w_poheaderx-comp_code = 'X'.  "Company Code
      w_poheaderx-doc_type = 'X'.   "Document type
      w_poheaderx-creat_date = 'X'.    "Creation Date
      w_poheaderx-created_by = 'X'.
      w_poheaderx-vendor = 'X'.
      w_poheaderx-pmnttrms = 'X'.   "Payment Terms
      w_poheaderx-purch_org = 'X'.  "Purchase Organization
      w_poheaderx-pur_group = 'X'.  "Purchase Group
      w_poheaderx-ref_1 = 'X'.
    Item Data
      w_poitem-po_item = '000010'.
      w_poitem-short_text = 'Z0CM - Default Appr. Test  '.
      w_poitem-plant = '5368'.
      Trackign no
      w_poitem-trackingno = ''.
    Material group
      w_poitem-matl_group = '119'.
      w_poitem-po_unit = 'EA'. "Base Unit of Measure
      w_poitem-net_price = '17500.00'.  "Net Price
      w_poitem-tax_code = 'I0'.
      w_poitem-item_cat = '9'.
      w_poitem-acctasscat = 'K'.
      w_poitem-distrib = space.
    Package must be given in item to create Service PO
      w_poitem-pckg_no = 0000000001.
      APPEND w_poitem TO i_poitem.
      CLEAR: w_poitem.
      w_poitemx-po_item = '000010'.
      w_poitemx-delete_ind = 'X'.
      w_poitemx-short_text = 'X'.
      w_poitemx-plant = 'X'.
      w_poitemx-trackingno = 'X'.
      w_poitemx-matl_group = 'X'.
      w_poitemx-quantity = 'X'.
      w_poitemx-po_unit = 'X'.
      w_poitemx-net_price = 'X'.
      w_poitemx-tax_code = 'X'.
      w_poitemx-item_cat = 'X'.
      w_poitemx-acctasscat = 'X'.
      w_poitemx-distrib = 'X'.
      w_poitemx-pckg_no = 'X'.
      APPEND w_poitemx TO i_poitemx.
      CLEAR: w_poitemx.
    PO Deliery Address
          w_poaddrdelivery-po_item = '000010'.
            w_poaddrdelivery-addr_no = '0000061208'.
            APPEND w_poaddrdelivery TO i_poaddrdelivery.
            CLEAR w_poaddrdelivery.
    POschedule
          w_poschedule-po_item = '000010'..
    DATA : LV_DATE TYPE SY-DATUM,
           lv_schd.
          CLEAR: lv_date.
          CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
            EXPORTING
              date_external            = '12/2/2009'
            IMPORTING
              date_internal            = lv_date
            EXCEPTIONS
              date_external_is_invalid = 1
              OTHERS                   = 2.
          IF NOT lv_date IS INITIAL.
            w_poschedule-del_datcat_ext = 'D'. "Delivery Date in Day Format
            w_poschedule-delivery_date = lv_date.
            w_poschedule-quantity = '1.000'.
            APPEND w_poschedule TO i_poschedule.
            CLEAR w_poschedule.
            lv_schd = 'X'.
          ENDIF.
          w_poschedulex-po_item = '000010'.
          w_poschedulex-del_datcat_ext = 'X'.
          w_poschedulex-delivery_date = 'X'.
          w_poschedulex-quantity = 'X'.
          IF lv_schd = 'X'.
            APPEND w_poschedulex TO i_poschedulex.
            CLEAR : w_poschedulex,
                    lv_schd.
          ENDIF.
    PO Account Assignment
      w_poaccount-po_item = '000010'.
      w_poaccount-serial_no = '01'.
      w_poaccount-distr_perc = ''.
      w_poaccount-quantity = '1.000'.
      w_poaccount-gl_account = '0000603064'.
      w_poaccount-costcenter = '0053680100'.
      w_poaccount-asset_no = ''.
      w_poaccount-wbs_element = ''.
      w_poaccount-network = ''.
      w_poaccount-tax_code = 'I0'.
      w_poaccount-activity = ''.
      APPEND w_poaccount TO i_poaccount.
      CLEAR w_poaccount.
      w_poaccountx-po_item = '000010'.
      w_poaccountx-serial_no = '01'.
      w_poaccountx-distr_perc =  'X'.
      w_poaccountx-quantity = 'X'.
      w_poaccountx-gl_account = 'X'.
      w_poaccountx-costcenter = 'X'.
      w_poaccountx-wbs_element = 'X'.
      w_poaccountx-network = 'X'.
      w_poaccountx-tax_code = 'X'.
      w_poaccountx-activity = 'X'.
      w_poaccountx-cmmt_item = 'X'.
      APPEND w_poaccountx TO i_poaccountx.
      CLEAR w_poaccountx.
    Extension for ZZSub
      w_extensionin-structure = 'BAPI_TE_MEPOACCOUNTING'.
      w_extensionin-valuepart1+0(5) = '00010'..
      w_extensionin-valuepart1+5(2) = '01'.
      w_extensionin-valuepart1+28(5) = ''.
      APPEND w_extensionin TO i_extensionin.
      CLEAR w_extensionin.
      w_extensionin-structure = 'BAPI_TE_MEPOACCOUNTINGX'.
      w_extensionin-valuepart1+0(5) = '00010'.
      w_extensionin-valuepart1+5(2) = '01'.
      w_extensionin-valuepart1+11(1) = 'X'.
      APPEND w_extensionin TO i_extensionin.
      CLEAR w_extensionin.
    Extension to add Expense Type only
      w_extensionin-structure = 'BAPI_TE_MEPOHEADER'.
      w_extensionin-valuepart1+10(4) = '0131'.
      APPEND w_extensionin TO i_extensionin.
      CLEAR w_extensionin.
      w_extensionin-structure = 'BAPI_TE_MEPOHEADERX'.
      w_extensionin-valuepart1+10(4) = 'X'.
      APPEND w_extensionin TO i_extensionin.
      CLEAR w_extensionin.
      EXPORT i_extensionin[] TO MEMORY ID 'SUB'.
    PO Services
    PO Services( One Line Iem)
    Assign the dummy no as Pacakage no
      w_poservices-pckg_no = 0000000001.  "(assign package no as a dummy number)
      w_poservices-line_no = 0000000001.      "Line item
      w_poservices-outl_ind = 'X'.
    Assign Dummy no as sub package no
      w_poservices-subpckg_no = 0000000003.   "(Dummy No.) "Sub package no
      w_poservices-from_line = '1'.
      APPEND w_poservices TO i_poservices.
      CLEAR w_poservices.
    PO Services(Second Line Item )
    Assign the same sub package dummy no which is mentioned above
      w_poservices-pckg_no = 0000000003.   "(Dummy No.) "Sub package no
      w_poservices-line_no = 0000000002.
      w_poservices-ext_line = '0000000010'.     "External line
      w_poservices-quantity = '17500.0'.    "Service Quantity
      w_poservices-base_uom = 'EA'.    "Service Basic unit of Measure
      w_poservices-price_unit = '1'.
      w_poservices-gr_price  = '1'.    "GR Price
      w_poservices-short_text = 'Z0CM - Default Appr. T'.      "Service Short Text
    w_poservices-matl_group = '119'.  "w_src-matkl.  "Material Group
      APPEND w_poservices TO i_poservices.
      CLEAR w_poservices.
    PO Service Access values
      w_posrvacc-pckg_no = 0000000003.  "w_src-sub_packno.  "Sub package no
      w_posrvacc-line_no = 0000000002.  "w_src-srv_line_no. "Line item
      w_posrvacc-serno_line = '01'.
      w_posrvacc-percentage = '100.0'.
      w_posrvacc-serial_no = '01'.
      w_posrvacc-quantity = '17500.0'.  "w_src-srqty.  "Service Quantity
      APPEND w_posrvacc TO i_posrvacc.
      CLEAR w_posrvacc.
      DATA : gv_ebeln TYPE ebeln.
    Call BAPI
      CALL FUNCTION 'BAPI_PO_CREATE1'
        EXPORTING
          poheader          = w_poheader
          poheaderx         = w_poheaderx
        IMPORTING
          exppurchaseorder  = gv_ebeln
        TABLES
          return            = i_return
          poitem            = i_poitem[]
          poitemx           = i_poitemx[]
          poaddrdelivery    = i_poaddrdelivery[]
          poschedule        = i_poschedule[]
          poschedulex       = i_poschedulex[]
          poaccount         = i_poaccount[]
          poaccountx        = i_poaccountx[]
          poservices        = i_poservices[]
          posrvaccessvalues = i_posrvacc[]
          extensionin       = i_extensionin[].
    Commit the Transaction
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = 'X'.
      WRITE:/5 gv_ebeln COLOR 5.
      SKIP 2.
      DATA : lv_msg TYPE string.
      LOOP AT i_return INTO w_return WHERE type = 'E'.
        CALL FUNCTION 'FORMAT_MESSAGE'
          EXPORTING
            id        = w_return-id
            lang      = 'EN'
            no        = w_return-number
            v1        = w_return-message_v1
            v2        = w_return-message_v2
            v3        = w_return-message_v3
            v4        = w_return-message_v4
          IMPORTING
            msg       = lv_msg
          EXCEPTIONS
            not_found = 1
            OTHERS    = 2.
        WRITE:/10 lv_msg.
      ENDLOOP.

  • Error while creating a Purchase Order

    Hi Friends,
    I am new to SAP MM. I am getting a problem while creating a purchase order. I created Purchase Info Record, Source List, but while creating Purchase Order, price is not picking from the purchase order. I am getting an error i.e. Net Value must be greater than 0. I checked all the settings, but getting same error.
    Could you please solve this

    Hi,
    Give some price at the item level for the item in the PO.
    And check the Pricing procedure in PO
    Hope it helps you.
    Thanks.

  • Error while creating Frame work Purchase order

    Hi Gurus,
    We are trying to implement Frame work order process with following configurations.
    1)Item cat  B for acc assingment Y
    2)Allow  item catg B with acc *** K and Y.(How to config this in SPRO)
    So when i am creating a PO adopted through Purchase Req (account ***  K and item cat B) i am getting error message "Pricing Error :Mandatory condition NAVS is Missing".So how do i configure this pricing process.
    Also when i am creating a Frame work order do i need to select the document type both in PO and PR as frame work order or NB order type will work with these config of Item cat B and acc *** Y?
    When i am creating a PR or PO with doc type frame work order the order unit is automatically populating as "AU" is this something std or do i have to do anything in configuration?
    When i created a PO with ref to PR aith account *** K into the PO and add the item category B the charging information was not maintained so how to maintian this?
    How to maintain the accounting info from PR?
    Also if there is a complete process link releated to config of frame work order that will be great.
    Thanks in Advance.

    Hi
    We are trying to implement Frame work order process with following configurations.
    Item cat B for acc assingment Y
    Create new acct assignment category in IMG -MM - Purchasing -Account Assignment - Maintain Account Assignment Categories (If you are sure of fields to be used then you can directly create Y, if not then copy existing category say K to new one and choose required fields)
    Allow item catg B with acc *** K and Y.(How to config this in SPRO)
    In Purchasing - account assignment - Define Combination of Item Categories/Account Assignment Categories - set combination for Y and B.
    Hope your documement types (PO & PR) allows item category B.
    So when i am creating a PO adopted through Purchase Req (account *** K and item cat B) i am getting error message "Pricing Error :Mandatory condition NAVS is Missing".So how do i configure this pricing process.
    Check the pricing procedure in IMG - Purchasing - Conditions - Define Price Determination Process - Define Calculation Schema - Check for calculation schema - NAVS has been maintained.
    Also when i am creating a Frame work order do i need to select the document type both in PO and PR as frame work order or NB order type will work with these config of Item cat B and acc *** Y?
    You need to choose document types while creating purchase transactions. If that document type doesnt support item category B- then you will get an error message.
    When i am creating a PR or PO with doc type frame work order the order unit is automatically populating as "AU" is this something std or do i have to do anything in configuration?
    For services (D category) we define AU as default unit (IMG - MM - External Services Management - Source Determination and Default Values - for Client/for Purchasing Organizations)
    When i created a PO with ref to PR aith account *** K into the PO and add the item category B the charging information was not maintained so how to maintian this?
    How to maintain the accounting info from PR?
    create Framework requisition and then copy it to a PO.
    Thanks

Maybe you are looking for

  • Getting "ora-20005 task is modified" error while updating task payload

    Hi, I am trying to update a task's payload using the Task Service. But I am getting the following error :- "IRC_SOAINFRA.WFTASKPKG_111160", line 2932 ORA-20005: ORA-06512: at line 1I am using the task element which I got back by calling the TaskQuery

  • How do I increase the size of icons within Word and other apps on my MacBook Pro

    Trouble reading icons on top of menu bars etc...ie Microsoft Word and even Apple software.   How can I get the text  larger over all on my 15" MacBook Pro? ?

  • Is there a way to make invoke-command interactive?

    Hello, I have a script that runs an invoke-command with multiple arguments and performs operation on a remote workstation. I want to add some additional confirmations and dialogue choices depending on how the script block executes on the remove PC. I

  • Selective edit in ALV grid

    Hi, I am using the REUSE_ALV_GRID_DISPLAY_LVC function to display a grid. In this grid I have some columns containing checkboxes that are editable. But, depending on some data in de records that I show, some of these checkboxes should be non-editable

  • How does BC record abandoned carts

    Does anyone have any info on how BC records abandoned carts? My client seems to think that they checked a report for a particular date range and there was $x of abandoned carts and then checked the same date range a few days later an the value was le