Automatically determine conditions when creating a purchase order via bapi

Hi Gurus,
I need some help...
I'm creating purchase orders with data of some sales orders. Tha data from sales orders is transfered to an alv grid... In this alv I need to display the values for the price scheme (as in ME21N when I put de material and vendor and press enter).
Thanks in adavnce,
LR

Dear Anna Shao 
1 .Our SBO is version 2007B
2. The Decimal of Amount is 2 and that of Price is 6
3. Vat rate is 17%
4. The gross price is not small,the problem is that the difference is not small either.Sometimes  it's bigger than 0.1 RMB.I can give you the example.
LineNo     ItemCode  Quantity  UnitPrice       VatRate      GrossPrice     LineTotal     GrossTotal
1            A     10         299.145299    J1(17%)      349.995299      2991.45      3499.95
2            A     10         299.150000    J1(17%)      350.000000      2991.45      3500.00
3            A     10         299.150000    J1(17%)      350.010000      2991.50      3500.10
If you set the unit price list for ItemCode 'A', you will get the result like row 1 above.
If you set the gross price list for ItemCode 'A' ,you will get the result like row 2 above.
If you do not set any price list for ItemCode 'A'  and you just set the unit price 299.150000 in the purchase order,you will get the result like row 3 above.
The perfect one is row 2.It is just what  our customer needs.So they set the gross price list for ItemCode 'A'.  But another problem occured when using MRP order recommendation. It is the one why I post a thread,just as I have descripted at first
Edited by: Jianzhong Zhang on Feb 25, 2009 3:53 AM

Similar Messages

  • User Exit to Create Production Order when creating of Purchase Order

    Hi Guru's,
    I want to create the Production Order when creating the Purchase Order. i want to know is there any user exit exists for that??
    My scenario is as follows.
    we are converting the Purchase Requisition to the Purchase Order , while doing this we want to create the Production Order.. Is this possible??
    If possible how can we do that???Please suggest me the possible solution.
    Thanks in advance.
    Thank you,
    Adi.

    Teja,
    My Scenario is as follows.
    P1- Manufacturing Plant
    P2 - WareHouse Plant (Procures Material from P1 using STO)
    When we run the MRP in P2, it creates a Purchase Requisition, that Purc.Req is going to be convert as STO (Stock Transport Order) in P1 Plant.
    When converting the Purchase Req to STO, we need to create a Production Order in P1 Plant.
    we know that system will creae the Purchase Order only, is there any possibility that,For creating the Production Order is there any user Exit/BADI or any other procedure while creating the Purchase Order????
    Thanks,
    Adi.

  • How can I select alternative BOM when creating subcontract purchase order?

    In our business, a finish good material always has different production versions at the same time. Each of production versions has its own alternative BOM. When I create a planned order, I can select wanted BOM through specifying production version.
    But, when I creating subcontract purchase order, there is no field for me to specify the production version or which alternative BOM I prefer. In this case, I need to create a planned order at first. And then, convert the planned order to purchase. Only through this way, I can create a subcontract purchase order with my wanted BOM.
    So, I wonder if there is any way to select alternative BOM directly when creating subcontract purchase order.
    Thanks a lot!
    Regards
    Robbie

    Dear Mr. MM
    can you give me additional information about your solution?
    BUT I would not expect the sytem to offer you during the Purchasing cycle the different Production Versions as it is not meant to be. I remember having the same requirement some time ago and we solved it the way I described above, additionally we created a Pop up window with a user exit during the PO creation which offered the different production versions and if the one linked with the quota arrangement, the standard PV, is used in the PO.
    We also have the same problem, we activated businessfunction SCM_GEN_02 so that it is possible to have several production versions for one supplier, but unfortunatly it is not possible to change the production version in the purchase order. (business function does not seem to be very integrated)
    So i would be very interested in your solution because acually it seems that i have to modify the sap standard.
    Thank you and best regards
    Lisa

  • Problem attempting to create a purchase order via SRM Portal instance.

    Unsing SRM7.0 with PPS; When attempting to create a purchase order via the "Create Purchase
    Order" button in SRM Portal instance, after select ECPO type; the following message is show in the screen: "Object or set with GUID 00000000000000000000000000000000 does not exist".
    Could you please advise what the problem might be and what to do.Thanks, responds would be very appreciated.Kind regards.
    Edited by: ital230 on Jun 30, 2010 10:37 AM
    Edited by: ital230 on Jun 30, 2010 11:05 AM

    Solve!
    The problem was the attributes specialy the BSA.
    chekout the attribute should be at highest level and in the user not excluded (grayed).
    Also
    Define Backend System for Product Category: check that the system for category transfer should be from srm to backend:

  • Sale Order Item Quantity Not Populating When Create A Sale Order Using BAPI

    I am having a problem when creating a sale order using BAPI
    BAPI_SALESORDER_CREATEFROMDAT2
    Problem is that sale order item quantity field is not populating
    code is as follows
    ORDER_ITEMS_IN-ITM_NUMBER = '0010'.
    ORDER_ITEMS_IN-MATERIAL = '000000000010000262'.
    ORDER_ITEMS_IN-TARGET_QU = 'LB'.
    ORDER_ITEMS_IN-TARGET_QTY = 1.

    Hi,
    Try populating ORDER_SCHEDULES_IN table in the bapi field REQ_QTY.
    Regds,
    Rudra

  • Get a wrong price  when creating a Purchase Order in order recommendation

    Dear all
        I meet a strange problem .I have already set a gross price list for Item 'A' . When I create a purchase order in Purchase Order Window,It will calculate a unit price (net price) according to the  gross price list  automatically .But when I create a purchase order in Order Recommendation Window,It will get a unit price as same as the gross price in predefined gross price list.They should not be equal in fact.

    Dear Anna Shao 
    1 .Our SBO is version 2007B
    2. The Decimal of Amount is 2 and that of Price is 6
    3. Vat rate is 17%
    4. The gross price is not small,the problem is that the difference is not small either.Sometimes  it's bigger than 0.1 RMB.I can give you the example.
    LineNo     ItemCode  Quantity  UnitPrice       VatRate      GrossPrice     LineTotal     GrossTotal
    1            A     10         299.145299    J1(17%)      349.995299      2991.45      3499.95
    2            A     10         299.150000    J1(17%)      350.000000      2991.45      3500.00
    3            A     10         299.150000    J1(17%)      350.010000      2991.50      3500.10
    If you set the unit price list for ItemCode 'A', you will get the result like row 1 above.
    If you set the gross price list for ItemCode 'A' ,you will get the result like row 2 above.
    If you do not set any price list for ItemCode 'A'  and you just set the unit price 299.150000 in the purchase order,you will get the result like row 3 above.
    The perfect one is row 2.It is just what  our customer needs.So they set the gross price list for ItemCode 'A'.  But another problem occured when using MRP order recommendation. It is the one why I post a thread,just as I have descripted at first
    Edited by: Jianzhong Zhang on Feb 25, 2009 3:53 AM

  • DBIF_RSQL_INVALID_RSQL when creating a Purchase Order (ME21N)

    Hi,
    The system is generating a short dump DBIF_RSQL_INVALID_RSQL when a user tries to create a purchase order.
    what could be the cause of this? i have analysed the short dump in st22 and looked at sm21 and st11 and they are giving very little detaill.
                                                                                    Error in the module RSQL accessing the database interface.                                                                               
    What happened?                                                                               
    Error in ABAP application program.                                                                               
    The current ABAP program "SAPLZMM_GET_ACT" had to be terminated because one of    
    the                                                                               
    statements could not be executed.                                                                               
    This is probably due to an error in the ABAP program.                                                                               
    What can you do?                                                                               
    Print out the error message (using the "Print" function)                          
    and make a note of the actions and input that caused the                          
    error.                                                                               
    To resolve the problem, contact your SAP system administrator.                    
    You can use transaction ST22 (ABAP Dump Analysis) to view and administer          
    termination messages, especially those beyond their normal deletion              
    date.                                                                               
    Error analysis                                                                               
    An exception occurred. This exception is dealt with in more detail below  
    . The exception, which is assigned to the class 'CX_SY_OPEN_SQL_DB', was  
    neither                                                                  
    caught nor passed along using a RAISING clause, in the procedure          
    "ZMM_GET_ACT_PLN" "(FUNCTION)"                                           
    Since the caller of the procedure could not have expected this exception  
    to occur, the running program was terminated.                            
    The reason for the exception is:                                          
    The SQL statement generated from the SAP Open SQL Statement violates a    
    restriction imposed by the database system used in R/3.                                                                               
    Possible errors:                                                          
    o The maximum size of an SQL statement has been exceeded.                
    o The statement contains too many input variables.                       
    o The space needed for the input data exceeds the available memory.      
    o ...                                                                               
    You can usually find details in the system log (SM21) and in the          
    developer trace of the work process (ST11).                               
    If an error occurs the developer trace often informs you about the        
    current restrictions.                                                                               
    How to correct the error                                                                               
    The exception must either be prevented, caught within the procedure             
    "ZMM_GET_ACT_PLN"                                                              
    "(FUNCTION)", or declared in the procedure's RAISING clause.                    
    To prevent the exception, note the following:                                   
    The SAP Open SQL statement must be divided into several smaller units.          
    If the problem occurred due to the use of an excessively large table            
    in an IN itab construct, you can use the addition FOR ALL ENTRIES               
    instead.                                                                        
    When you use this addition, the statement is split into smaller units           
    according to the restrictions of the database system used.                                                                               
    You may able to find an interim solution to the problem                         
    in the SAP note system. If you have access to the note system yourself,         
    use the following search criteria:                                                                               
    "DBIF_RSQL_INVALID_RSQL" CX_SY_OPEN_SQL_DBC                                     
    "SAPLZMM_GET_ACT" or "LZMM_GET_ACTU01"                                          
    "ZMM_GET_ACT_PLN"                                                               

    Hi,
    Wherever you have used SQL statement please do check all the fields here as some of the fields are not in correct order as they are required per the actual table in dictonary, to just verify that you can use addition of "INTO CORRESPONDING FIELDS OF INTERNALTABLE" in your SQL statement as this will not require the fields to be in order but this may cause performance issue.
    Thanks and Regards
    Sudharshan

  • Error SG105 when creating/changing Purchase Order

    Hi All,
    When we are trying to create or change import purchase orders, an error message pops up saying " Enter rate USD / INR rate type for 07.04.2008 in the system settings".
    Currently we had upgraded from SAP 4.6C to ECC 6.0.
    The exchange rates are maintained valid from 01.04.2008 using T-code OB08.
    Could anyone point out the reason for this problem.
    Regards
    Alo

    Hi
    there is no exchange rate setting apart from the OB08 setting
    Just check the exchange rate type used is maintained or not.
    Recheck the dates & currency conversions
    Thanks & Regards
    kishore

  • Attributes being removed when creating a Purchase Order

    Hi,
    We are running SRM 4.0 ECS.
    I have an issue when creating a PO directly (BBP_POC).
    When I have enter the item line information and then go details to enter a G/L account, the attributes UOM and Gross Price are removed. I need to go <i>Back to Item overview</i> to fill them in again. If I do it in <i>Item detail</i>  in the <i>Basic data</i> tab, the attribute data keeps on being removed.
    Does anyone know why this happens?
    Message was edited by:
            Anders Halmind
    Message was edited by:
            Anders Halmind

    HI,
    That means the PO print program is using some table (EKKO, EKPO,KONV and may be other for condition record) to get the value of the PO.
    now those table get updated only after you save the PO.
    That's the reason you are not getting any value in print preview before saving.

  • Send email when creating a Purchase Order

    Hi,
    I'd like to send an email once a Purchase Order is created. I just need to send basic information to the supplier, such as the number of the Purchase Order.
    I know how transaction NACE works, but I've just used it to Print Forms. I guess I have to use application EF but after that, I'd like to know if I can use an already existing message type and what steps I should follow to send the email properly.
    Thanks in advance,
    Gerard

    Hi,
    Read note 191470 - Purchase order as an e-mail
    Regards
    Sudheer

  • Error -1116 when creating a Sales Order via DI API

    Hi All,
    We have an developed EDI AddOn that creates Sales Orders in SBO 2007 PL13, in one of our clients.
    This AddOn is responsible for the creation up to 100 orders each day on SBO.
    However, sometimes (3 to 4%) during the Sales Order creation, the system return an error -1116 when the Sales Order is created - via oSalesOrder.Add() method.
    The problem is that the order is created anyway, although this error is raised.
    I've searched in the forums and it seems the solution is somehow related with SBO transactions.
    However, the AddOn only created the Sales Order, nothing more.
    Does any body know a solution for this problem?
    Regards,
    Manuel Dias

    Hi,
    see this links,
    Error -1116 when creating delivery note
    Could not commit transaction, ReturnCode:-1116
    Regards,
    siva

  • Deletion of Purchase order Via BAPI

    I want to delete a already created Purchase Order using a function module.
    Please guide.

    Hi
    Use BBP_PO_DELETE Function delete Purchase order.
    if you have more than one, then loop at table and call this function module to delete all PO's.
    or use BAPI_PO_DELETE_HISTORY
    Reward points if useful..
    Regards
    Nilesh

  • Error when creating a purchase order with reference

    Hi Experts,
    I am creating PO with reference to Contract
    Material A with price 5 rupees
    Before saving the po if click on print preview button to check if system is calculating the values correctly before saving the document.
    But is seems that right now system is not calculating the values well as by clicking on "Print Preview" values are displayed as zero.
    Also it is displaying the values once we save the po.
    Why it is not showing any value in print preview before saving the PO.
    Please help.
    Thanks in advance
    Prashanth

    HI,
    That means the PO print program is using some table (EKKO, EKPO,KONV and may be other for condition record) to get the value of the PO.
    now those table get updated only after you save the PO.
    That's the reason you are not getting any value in print preview before saving.

  • Automatic creation of intercompany PO when creating a Sales Order

    Hi Experts
    Is there a standard way of triggering an intercompany PO when creating a sales order to the final customer (or the other way around, triggering a sales order to the end customer upon creation of an intercompany PO)? Scenario: business has setup a logistics company (company code X), which its purpose is to deliver goods to the final customer (home customers). However, sales orders are created from seperate chain of stores which belong to another company code (company code Y). This chain of stores have one sales organisation (since there is over 1000 stores under a chain). I need a way to represent that a sale originated from a store/plant belonging to company Y to end customer A. Also, I need a billing document (intercompany) from company code X to store/plant beloning to company Y.
    Issues: in the intercompany config (assign intern customer numbers to sales org) - is there a way to assign a customer number at site/plant level so that when creating an intercompany billing it can be picked instead of the one assigned to the sales org and where can this be specified in the sales order (remember: in my scenario there are multiple stores/plants that belong to one sales organisation and it is not possible to use one customer number linked to the sales organisation.)
    Desired results:
    Sales order from store/plant YY belonging to company code Y to end customer A
    Intercompany billing from plant XX belonging to company code X to store/plant YY
    End customer billing from store/plant YY to end customer A
    Thank you in advance for your help.

    Hello Tsmash  
    I think you can acheive this with Regular Sales order + Inter Company STO combination.
    Maintain customer numbers for each of the Plants from Company Y for the sales area belonging to Company X.
    Then do the config for STO in MM using this menu path:
    SPRO/Materials Management/Purchasing/Purchase Order/Set up Stock Transport Order
    Here, in the activity 'Define Shipping Data for Plants',  enter each of the plant-customers and the Sales area belonging to Comany code Y. Carry out other activities in this area appropriately.
    Similarly set up Custom ( say Z1) Special Procurement type for Plant YY for stock transfer from XX using this menu path:
    SPRO/Production/Material Requirements Planning/Master Data/Define Special Procurement Type:
    Here maintain procurement type as F, Special procurement as U and plant as XX. You may need to repeat this config for each of the receiving plants (over 1000 stores under a chain)  from co code Y.
    In the material master MRP 2 for Plant YY,  maintain procurement type as F and Special Procurement as Z1.
    Sales order will be received under Co Code Y and sales area belonging to Y form customer A,
    Because of the MRP config, a PO (STO) requirement will be raised on Co code X and plant XX. XX will send the goods to YY via a STO delivery using the Shipping data from 'Set up STO' config,
    Plant YY will send the goods to A and bill that customer. Co Code X will raise an inter-comany bill on Co code Y.
    That's how it should work. Try it and revert with any issues.

  • To create service purchase order by giving material code

    hii
    experts
    can i create service purchase order by giving material code in service po.generally when i give material code in service purchase order the system doesnt accept it.is there any other way where i can create po for service material but my condition is that i should give material code.experts do u have any valuable inputs.
    warm regards
    thanks
    subhash kulkarni

    Hi
    Will you please let me know scenarion under which you want to create service PO with material code?
    Service PO is raised with item category D  and account assignment ( K, P etc) which does not permit to assign any material code, only description of service is mentioned at header and details of service is entered at item level. If service code is created in AC03, enter it at item level, all details mentioned in service master will be fetched else you will have to mention details of services manually.
    creation of service code is not mandatory and also not much useful. it helps in reporting and automatic GL determination which can be mapped with the help of material group.
    Hope, it must have enlighten some knowledge.
    Regards
    Susheel

Maybe you are looking for