BAPI_PO_CREATE1 use in a loop - net price issue

Hi,
I'm using BAPI_PO_CREATE1 within a loop to create a PO with multiple items - grouped by vendor, plant and delivery date. After each BAPI call I use BAPI_TRANSACTION_COMMIT with WAIT = 'X', further I track the results from BAPIRETURN into some kind of log. All my structures and internal tables used in the bapi interface are cleared/freed after each call in order not to have inconsistent data. I'm passing only 1 condition 'PBXX' with net price. I'm passing 2 records in the condition table - 1st with CHANGE_ID = 'D', and second one with CHANGE_ID = 'I'. Further, I set (no_price_from_po  = 'X') and (memory_uncomplete = 'X')
At the tests I used the same material vendor and plant in all items and only delivery date is different in order to create few orders one after another. Even price is changed for each item.
First of my PO within a loop is created as expected - with correct price value, even if the combination material/plant is passed twise and the resulted PO have 2 items.
The issue I have is comming out at the next PO-s (2nd, 3th..) - the system returns error message:
E-218 Net price must be greater than 0
I stuck right here. Tried quite a lot of different screnarios without success. Further tried even different vendor/material/plant for the second PO. Checked also the forum posts before to consider to write this one - haven't found anything relevant which might be of any help.
Any ideas what is wrong?
Thanks in advance.
Regards,
Ivaylo Mutafchiev

Hi,
in fact my price values were not so small - 2.15, 1.55, 2.45, etc... but nothing less than 1.00. Nevertheless, you pointed me to the right direction - to search OSS for the answer. OSS Note 571860:
https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=571860
helps me to find out what I missed in my scenario: I didn't set ITEM-NET_PRICE at all, just via condition table. Now, when I added the following:
item-net_price = some_price. itemx-net_price = 'X'.
item-po_price = '2'. itemx-po_price = 'X'.   " <-- in fact, PO is created even without this line
all of my POs are created with correct prices from the input.
Problem solved.
Thanks!
Ivaylo

Similar Messages

  • Inforecord Net price issue JPY currency

    Hi Experts
    I am facing an issue in Inforecords Net price when net price is mainatined in JPY currency
    The data maintained and as can be seen using ME13 for Net Price for example is 1 JPY
    Where as when I fetch this data using EINE table the value is shOWNn as 0.01
    ( Same is the case when Net price is maintained as 232,687  JPY. In EINE table NET price field this is shown as 2326.87JPY
    Please advice why the system behaviour is as mentioned above . Also how can we overcome this issue.
    Thanks and Regards
    Vikrant

    This is because the field is technically defined as currency field with 2 decimals.
    Please read OSS Note 53206 - Processing of currency fields.
    it explains whatyou have to do in your programs

  • Net Price Issue

    Hi all,
    I am extracting data from 2LIS_02_SCL into Cube. When I checked the extractor in RSA3 I noticed Net Price getting different values.
    The Net Price is coming from EKPO. As we know that in the data source it will show per unit price ie. Net Price / Price Unit. For eg if I have Net Price as 50.40 and Price Unit as 1,000 in table, in the data source I get 0.05 which is correct as per my funcitonal person. But if we have Net Price as 0.82 and Price Unit as 1,000 I am getting 0.00 instead of 0.00082. It is not showing the remaiming decimal places. And also I am using standard field.
    Can any one tell me how to bring the remaining decimal places also.
    Thanks in advance
    regards,
    mahi

    Hi Bobs,
    I know we can increase the decimal places in BW side. But what I want to know is why in the data source only two decimal places are showing up.
    for eg. In EKPO Net Price = 0.82 and Price Unit = 1,000.
    In the data source Net Price = 0.00 where it should be 0.00082 because it is calculating per Unit Price.
    I hope now you understood my problem.
    Anyways thanks for your answer.
    Let me know if any suggestions.

  • 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

  • Create Sales order with reference to a Billing Document - Net price issue

    Hi Everyone,
        The Billing Document has one line item with Net value of 16,000. However, when I create the Sales Order with reference to the Billing Document, the net price shows 64,000.  When I check the Document flow of the Billing Document, there were two Contracts on top of my Billing Document. One is a contract with the overall status of "Being Processed" and this is where I checked the net value is 64,000. The next contract invoice is already completed (net value is 16,000).
        Has anyone encounter such case? How would I be able to create the sales order with reference to the Billing document and have the net value of what is in the Billing Document (16,000). Which part of the configuration is setting this up. Thanks!

    Hi,
    This is a very rare case, if you are sure of the scenario, would suggest you two alternatives:
    1) whenever you go against the flow of SAP, you have customize it, so its better you discuss this matter with your ABAP person.
    2) never tried it out but you can:
    you cannot see that in Billing Document that which is the sales document assigned to it, but to estblish that relationship,
    we do copy control setting from Billing Document to Sales Order type (T.Code:VTFA).
    Menupath: SPRO >> IMG >> Sales & Distribution >. sales >> Billing Document >> Copy Control >> Copy Control from Billing Document to Sales Order Type.
    Hope this will help you.
    Regards,
    Siddharth.

  • PO Qty and Net Price Issue

    Hi All,
    My requirement is :
    Once PO is created on the basis PR,The Qty and Price is copied from PR,the requirement is that user cant change the QTY and Price in PO.If the user wants to change,they need to edit the Project and the change should happen in PO.
    Please advice how to do this .
    Thanks
    Muzamil

    Hi,
    If you want to modify / edit PO , then you can do it thru ME22N and please see to it that it should be under release not released fully.
    Regards,
    Dhruv Kumar Malhotra

  • Net price update in creation of the purchase order

    Guys,
    I have a query, please find the details below.
    I have created a ABAP for posting the purchase orders using the BAPI function 'BAPI_PO_CREATE1', I am passing the net price value in the input file. But the system is taking the net price from the purchase info record of that material. My own net price is not considered.
    Please find my observations below.
    1. First of all system is checking whether there is a PIR maintained for the material or not. If PIR is maintained, then system is defaultly considering the net price maintained in the PIR.
    2. Later I have deleted the net price maintained in PIR. In this case, system is considering the net price of that material from the previous purchase order.
    But my query is that I don't want the system to consider the net price from previous material, I want to update my own net price to line item of the PO.
    Could anyone please suggest me how should I proceed further so solve this query?
    Thanks in advance.
    Regards,
    Vijaymadhur.

    Hi,
    Yes, this can be achieved. Don't maintain any price in inforecord. Then in SPRO > Materials Management > Purchasing > Environment Data > Define default value for buyers > Here click on settings on default values > In Inforecord update > Maintain no update fro PO and quotation.
    Now the last PO price will not be saved in Inforecord and hence this will not b carried to PO.
    Regards,
    Prabu

  • V_NL Net price report problem

    Hi Experts,
    I have a problem in V_NL Net price report it is not showing net price correctly in report vs sales or billing net value.
    I could tell what is our scenerio in pricing report and what i have done on SAP.
    We need net value pricing report for each material for particular customer excluded frieght and tax.   As per user requirement we customized the report and included fiield sales office on that. 
    When we ran the report it shows entirely different price we don't know where those net values picked from. When i checked previous posts and i implemented OSS note 415141 for further adjustments.  Still i couldn't get the correct report if anybody would have worked on same issue....
    What should i need to do on configuration side to get this report correctly.
    Kindly reply back and let me know the solution.
    regards
    rc gopi

    This is teh documentation I got for the program SDNETPR0
    Short text
    Create net price list
    Description
    This program is used for creating the 'Net price list'.
    Requirements (example)
    The following must exist:
    Order type TA is defined
    Billing type FX is defined
    Item category DLN is defined
    Copying control for the combination FX - TA - DLN is defined
    The default data for fields 'Billing type', 'Order type' and 'Item category' allow individual copying control. In this context, you must bear in mind that the system will run through the  copying requirements and data tranfer routines created for this purpose and stored in copying control.
    These entries and objects are released with the standard.
    The system also requires that the pricing procedure uses subtotal 2 (KZWI2) for temporary storage of the net price.
    Output
    The output contains the following per customer:
    Material incl. description
    Price content (sales quantity unit)
    Price incl. currency (VBRP-KZWI2)
    The document types and I.Cs mentioned here are for examples. The area output says what details are presented to the user finally based on the details inputted.
    Most of the fields are mandatory here.
    Hope this helps. You can reward if this helps you

  • V_NL Net price list

    Hi All,
    Can anybody explain the excact functionality V_NL, and what are all the restrictions it has?
    What are the default feilds refers to, Event there is bundle of data is available but not getting any thing in output?......
    Thanks in advance....
    Raj........

    This is teh documentation I got for the program SDNETPR0
    Short text
    Create net price list
    Description
    This program is used for creating the 'Net price list'.
    Requirements (example)
    The following must exist:
    Order type TA is defined
    Billing type FX is defined
    Item category DLN is defined
    Copying control for the combination FX - TA - DLN is defined
    The default data for fields 'Billing type', 'Order type' and 'Item category' allow individual copying control. In this context, you must bear in mind that the system will run through the  copying requirements and data tranfer routines created for this purpose and stored in copying control.
    These entries and objects are released with the standard.
    The system also requires that the pricing procedure uses subtotal 2 (KZWI2) for temporary storage of the net price.
    Output
    The output contains the following per customer:
    Material incl. description
    Price content (sales quantity unit)
    Price incl. currency (VBRP-KZWI2)
    The document types and I.Cs mentioned here are for examples. The area output says what details are presented to the user finally based on the details inputted.
    Most of the fields are mandatory here.
    Hope this helps. You can reward if this helps you

  • Last PO net price will capture in PR

    Dear all,
    i want that when i create PR the valuation price will come automaically from the last po net price. for this any configuration i have to do or any user exits are there for this requirement.. please help...i have no idea regarding this.

    Hi,
    To populate last P.O. price in P.R. you need to check the check box on P.O. "infoupdate"
    Please refer the below links  for more clarity...
    exact purchase price of material should reflect while creating new P.R
    Net Price Issue while creating PO w.r.t PR
    Regards,
    Udaya.
    Edited by: udayareddy on Oct 12, 2011 3:21 PM
    Edited by: udayareddy on Oct 12, 2011 3:23 PM

  • Net Price Changed History

    Hello All,
    May I know which table I can use to download the Net Price Changed History.
    Thank you.
    Regards,
    Angela

    Hi,
    If you have maintained at Purchase Info Record Plant Level go to Table A017 / maintain at Purcahe Org Lvel go to Table A018.
    In that table Give "M" for application and execute, it will display for the conditon PB00  valid to and from date along with condtion record no.
    Note the conditon recor dno go to Table KONP, gie the conditon record no.
    This will display the Net Price of that period.
    Regards
    Give Points if useful

  • Net Price showing zero while using BAPI_PO_CREATE1 for me21n

    Dear All,
    I am using BAPI_PO_CREATE1 for ME21N. The problem is, after execution of the program the error msg it shows-
    No instance of object type PurchaseOrder has been created. External reference:
    Purchase order still contains faulty items
    Net price must be greater than 0
    The values are coming from excel file.
    Please tell me where I am doing wrong.
    With regards,
    Rosaline.

    Hi,
    Symptom
    You create a purchase order with BAPI_PO_CREATE1 or you add an item to an existing purchase order with BAPI_PO_CHANGE. You assign a value in field POITEM-NET_PRICE. However, this value is not transferred. If it was not possible for you to determine any conditions, the system generated the error message 06218 'Net price must be greater than 0'.
    Other terms
    BAPI_PO_CREATE1, BAPI_PO_CHANGE, price, net price, gross price, conditions, price determination, condition type, 06218, EKPO-NETPR, NETPR, POITEM-NET_PRICE, NET_PRICE, PO_PRICE, BAPI_PO_PRICE, BUS2012, PurchaseOrder.CreateFromData1, CreateFromData1, PurchaeOrder.Change
    Reason and Prerequisites
    This function has not been available up to now. You could also assign conditions via the condition tables.
    Read also Notes 399791, 428621, 529287, 578253 and 539950 for this.
    Solution
    The present note adds field PO_PRICE to table POITEM. PO_PRICE can have the values ' ', '1' or '2' with the following meaning:
        PO_PRICE = ' ': The price determination is carried out as before.
        PO_PRICE = '1': The value assigned in field NET_PRICE is transferred as a gross price, that is it is set in the condition type that is defined as a base price in the calculation schema. All other condition types remain unchanged. No conditions are copied from the last document.
        PO_PRICE = '2': The value assigned in field NET_PRICE is transferred as a net price, that is it is set in the condition type that is defined as base price in the calculation scheme. All other condition types are deleted.
    Note the following
    The following restrictions apply to field PO_PRICE:
        If you assign conditions via the BAPI interface, these are always transferred. This is carried out independently of the value that you assign in field PO_PRICE.
        If you add a new item to a purchase order with BAPI_PO_CHANGE, it does not suffice to fill field POITEM-NET_PRICE on item level. The corresponding currency must be specified explicitly on header level.
        You can only use field PO_PRICE during the creation of a purchase order item. If you want to change the price of an already existing item, you can only do this via the conditions.
        If you fill field POITEM-PO_PRICE, you must enter an 'X' in POITEMX-PO_PRICE so that the value is transferred.
    Correction
    The correction is made available via R/3 support package. If you want to implement the note manually, proceed as follows:
        1. Make sure that your system contains Notes 494759, 552189 and 578253.
        2. Create data type BAPI_PO_PRICE with the following attributes:
                        Short text:
                           Price transfer indicator: 1  = gross, 2 = net
                        Package: ME
                        Domain: BPUEB
        3. Extend structure BAPIMEPOITEM (directly after NO_ROUNDING):
                        Component: PO_PRICE
                        Component type: BAPI_PO_PRICE
        4. Extend structure BAPIMEPOITEMX (directly after NO_ROUNDING):
                        Component: PO_PRICE
                        Component type: BAPIUPDATE
        5. Extend structure MEPOITEM_DATA (directly after NO_ROUNDING):
                        Component: PO_PRICE
                        Component type: BAPI_PO_PRICE
        6. Extend structure MEPOITEM_DATAX (directly after NO_ROUNDING):
                        Component: PO_PRICE
                        Component type: BAPIUPDATE
        7. Implement the correction instructions in your system.
    regards,
    Ravi
    Edited by: Parupelly on Dec 14, 2011 1:30 PM

  • 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

  • Net price must be greater than 0 error while creating PO using BAPI

    Hi guys!
    I'm using BAPI_PO_CREATE1 to create several PO's from a Z table record. I finally achieved that my BAPI to work as wished, with conditions, etc.
    The problem im having is that  i get the error of net price must be > 0.
    I do not have any condition type defined . Is it necessary to define one?
    Plz any help will be very appreciated.
    Thx.

    It will be configuration problem,create one PO manually and see the results
    and create same data for Po using  Function module and see the results
    most of the time net price should be more than 0,keep net price should be more than zero
    see the simple program ,what i created :
    *& Report  ZBAPI
    REPORT  ZBAPI.
    DATA: BEGIN OF i_data OCCURS 0,
            text(255),
          END OF i_data.
    DATA: i_ekko TYPE bapiekkoc.
    DATA: it_ekko LIKE TABLE OF i_ekko INITIAL SIZE 0  WITH HEADER LINE.
    DATA: BEGIN OF i_ekpo OCCURS 0,
            po_item(5),
            pur_mat(18),
            plant(4),
            net_price(23),
            disp_quan(13),
         END OF i_ekpo.
    DATA: it_ekpo LIKE TABLE OF bapiekpoc INITIAL SIZE 0 WITH HEADER LINE .
    DATA: BEGIN OF i_eket OCCURS 0,
             po_item(5),
             deliv_date(8),
             quantity(13),
          END OF i_eket.
    DATA: it_eket LIKE TABLE OF bapieket INITIAL SIZE 0 WITH HEADER LINE.
    DATA: v_index TYPE i.
    DATA: return TYPE TABLE OF bapireturn INITIAL SIZE 0 WITH HEADER LINE.
    DATA: po_num(10).
    START-OF-SELECTION.
    CALL FUNCTION 'UPLOAD'
    EXPORTING
      CODEPAGE                      = ' '
      FILENAME                      = ' '
      FILETYPE                      = ' '
      ITEM                          = ' '
      FILEMASK_MASK                 = ' '
      FILEMASK_TEXT                 = ' '
      FILETYPE_NO_CHANGE            = ' '
      FILEMASK_ALL                  = ' '
      FILETYPE_NO_SHOW              = ' '
      LINE_EXIT                     = ' '
      USER_FORM                     = ' '
      USER_PROG                     = ' '
      SILENT                        = 'S'
    IMPORTING
      FILESIZE                      =
      CANCEL                        =
      ACT_FILENAME                  =
      ACT_FILETYPE                  =
      TABLES
        data_tab                      = i_data
    EXCEPTIONS
      CONVERSION_ERROR              = 1
      INVALID_TABLE_WIDTH           = 2
      INVALID_TYPE                  = 3
      NO_BATCH                      = 4
      UNKNOWN_ERROR                 = 5
      GUI_REFUSE_FILETRANSFER       = 6
      OTHERS                        = 7
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    loop at i_data.
    if i_data-text(1) = 'H'.
       shift i_data-text.
       v_index = v_index + 1.
       split i_data-text at ',' into i_ekko-doc_type
                                    i_ekko-purch_org
                                    i_ekko-pur_group
                                    i_ekko-vendor.
      append i_ekko to it_ekko.
    elseif i_data-text(1) = 'I'.
    shift i_data-text.
    split i_data-text at ',' into i_ekpo-po_item
                                   i_ekpo-pur_mat
                                   i_ekpo-plant
                                   i_ekpo-net_price
                                   i_ekpo-disp_quan.
    append i_ekpo.
    move-corresponding i_ekpo to it_ekpo.
    append it_ekpo.
    clear it_ekpo.
    else.
    shift i_data-text.
    split i_data-text at ',' into i_eket-po_item
                                   i_eket-deliv_date
                                   i_eket-quantity.
    append it_eket .
    move-corresponding i_eket to it_eket.
    append it_eket.
    clear it_eket.
    endif.
    endloop.
    CALL FUNCTION 'BAPI_PO_CREATE'
      EXPORTING
        po_header                        = i_ekko
      PO_HEADER_ADD_DATA               =
      HEADER_ADD_DATA_RELEVANT         =
      PO_ADDRESS                       =
      SKIP_ITEMS_WITH_ERROR            = 'X'
      ITEM_ADD_DATA_RELEVANT           =
      HEADER_TECH_FIELDS               =
    IMPORTING
      PURCHASEORDER                    =
      tables
        po_items                         = it_ekpo
      PO_ITEM_ADD_DATA                 =
        po_item_schedules                = it_eket
      PO_ITEM_ACCOUNT_ASSIGNMENT       =
      PO_ITEM_TEXT                     =
       RETURN                           = return
      PO_LIMITS                        =
      PO_CONTRACT_LIMITS               =
      PO_SERVICES                      =
      PO_SRV_ACCASS_VALUES             =
      PO_SERVICES_TEXT                 =
      PO_BUSINESS_PARTNER              =
      EXTENSIONIN                      =
      POADDRDELIVERY                   =
    write: po_num.
    use BAPi_TRANSACTION_COMITT FM always
      loop at return.
      write:/ return-message,return-type.
      endloop.
    Thanks
    Seshu
    Message was edited by:
            Seshu Maramreddy
    Message was edited by:
            Seshu Maramreddy

  • Net Price not Updating Using BAPI : BAPI_CONTRACT_CREATE

    Dear Experts,
    I am facing an issue while creating CONTRACT using the bapi: BAPI_CONTRACT_CREATE. I am creating the Contract based on data from my excel sheet. And we are maintaining the INFO RECORDS for the same materials.
    In the excel sheet we are providing the NetPrice (NETPR) and creating the Contract. My issue is " instead of taking the Net Price from the excel it is taking the Net Price from Info Records". For Example, if for a Particular material the Net Price in our excel file is 125, after bapi execution, the net price is updating as 100 instead of 125 in Contract Creation( ME31k-ME33K). In the Info Records we are maintaining this net price(100) for that material.
    Thanks in Advance for your response.
    Regards,
    Prasad

    you can use BAPI_CONTRACT_CREATEFROMDATA
    * Create Contract Order Number [BAPI_CONTRACT_CREATEFROMDATA]
      CALL FUNCTION 'BAPI_CONTRACT_CREATEFROMDATA'
           EXPORTING
             contract_header_in      = header
             convert                 = 'X'
           IMPORTING
             salesdocument           = v_order
           TABLES
             return                  = t_return
             contract_items_in       = itab_item
             contract_items_inx      = itemx
             contract_partners       = t_partners
             contract_conditions_in  = t_conds
             contract_conditions_inx = t_condsx
             contract_data_in        = t_contract
             contract_text           = t_texts.

Maybe you are looking for

  • ITunes won't launch in windows 7 64 bit

    itunes used to work fine under Windows 7. Recently it stopped responding. It won't launch. I can see that the processes are running, in Task Manager. But iTunes never opens. I have tried a dozen ideas from hardware review forums and I have done all t

  • Intel Macbook and Airport management Utility

    I am trying to set up airport management utility on my new Intel Macbook Pro. I have downloaded the utility and attempted to open it and get an error stating that it requires Airport 3.4. The update doesn't work and I believe I must have the latest A

  • Sent Messages / Incorrect Date

    Any solutions?... Or anyone else with this problem? My SENT folder is MAIL is set to retreive messages from my .Mac SENT folder. When it does, most messages, and sometimes all of them, show they were sent "TODAY." Of course, these were messages sent

  • SU 2006-002v1.0 vs1.1

    My poor brain is addlepated. I've tracked this for hours now, guess there was nothing better to do. P~) To keep this simple. SU 2006-002v1.0 is installed 3/13/06 3.03 pm and working fine. SU 2006-002v1.1 never showed up in Software Update. Any point

  • ***How to Invoke backing bean method by DOUBLE-CLICK the table ROW!!***

    Hi, How can I collect the selected row value & navigate to next page by DOUBLE-CLICK the result table row. My application got searchResult page where I am displaying the list of user in result table. Then selecting any one row and navigating to maste