How to Fetch Sales Order Item Quantity from Customer table(ztable)?

Dear Guru's,
My scenario:
While creating Sales order the item quantity should be fetched from a Ztable. So iam using the Userexit "V46H0001 - - Customer functions for resource-related billing", in that i have implemented my code in the Function Exit - EXIT_SAPLV46H_001 and the FM documentation says
This function module allows you to change item information for generating a new item.
In order to achieve this, you must change the relevant field in the structure C_VBAPKOM.
So i activated that exit and wrote the following code to test it as follows;
break-point.
C_VBAPKOM-zmeng = 10.
But it seems not working, even it doesn't stop at the break-point when i type the material number for the item in the sales order and press enter...
Please guide me in this regard, am i correct in choosing the User-Exit? what else have to be done in order to fetch the item quantity from the ztable....
Please suggest if there is some other way to do this, i also heard that we can do this through Routines...
Thanks in Advance...
Regards
Karthik D

I have solved this  and you can found how i solved in the last reply of the following thread....
[SD UserExit - V46H0001 - Customer functions for resource-related billing|SD UserExit - V46H0001 - Customer functions for resource-related billing]
Thanks
Karthik D

Similar Messages

  • Sales order item quantity update based on goods issue quantity

    Could any one explain me how to achieve the below functionality in SAP.
    Sales order item quantity needs to be updated based on the goods issue quantity when goods issue happens. 
    Tried to achieve the above functionality thru user exit.  But I could not found any user exit.  Could any one help me in finding out the user exit for a delivery which gets triggered when goods issue happens? 
    Or is there any other way thru which we can achieve the above functionality?  For example by using copy control, or requirement stuff. 
    Your inputs are highly appreciated.
    Thanks in advance.

    I dont y u got such type 0f requirement.Do one thing find out BADI it should be activated only when we are going PGI , in that badi try to chage Sales order <b>BAPI_SALESORDER_CHANGE</b>.
    for BADI search in SPRO / Se80.
    Regards
    Prabhu

  • How to configure Sales order item text copy to Purchase requisition item

    Hi,
    How to configure sales order item text copy to Purchase requisition text then copy to PO item text.
    Regards
    Jack

    Hi Rajesha,
    Thanks for your reply, some of the items in sales order are procured externally by us and our customer maintains text related to price and specification in the item details of the sales order, MRP creates planned order for these materials and these planned orders are always converted in pur requisition, we want that text from the sales order item details should be copied in to the purchase requisitions converted from planned orders.
    is there any user exit which can be called at the time of saving a purchase req or user exit for converting planned order in to pur req.?
    if there is any such exit available, then I think I can read the pegged requirement of the planned order where sales order item will be found then read the text in the item then copy this text in pur req then save pur req may work.
    but this will be a bulky development, please let me know if we can shorten the development.
    Thanks again
    Anand

  • 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

  • How to Cancell Sales Order Items......

    Hi Experts,
    How to Cancell Sales Order Items ?
    Presently I am deleteing Indidually Items in Sales Order but I am getting records through Report.
    Is there any proper way to Cancel Sales Order Items / Full Sales Order and also I can get report of which items has been cancelled and so on.
    Pl. reply.
    Yusuf

    you can not cancel sales order.. SAP has not given that option.. only opition you have is delete the line items by going to VA02, if its open sales order or blocking the sale order..
    reward if it helps..
    ramki

  • Tax code entry in sales order item conditions  from excel template

    Hi experts ,
    I have a requirement , in which  tax code in sales order item conditions should be determined from an excel template.
    A Z transaction will fetch values from the template & create sales order in which tax code will be detrmined from the template only, irrespective of the value maintained in condition records.
    Kindly suggest the way, how this can be implemented. Currently tax code field in item conditions of sales order is greyed out and hence cann't be maintained directly in sales order.
    Is there any user exit which can take values from excel template & populate tax code in sales order, bypassing condition records?
    Thanks in advance,
    Vimal

    Hi Vimal,
        I don't understand why you want to read tax code from excel, bcoz what ever criteria you are trying to determine the tax code from excel sheet you can build a condition table and arrive at the appropriate tax code with condition technique.
    Just think, if you some how achieve to get the tax code to pick up from the excel sheet, what will happen if you want to change the order after few days or create a subsequent document? the system will try to read the record from the condition records and may go for a toss.
    My opinion is, suggest the user/business to use the condition technique and build your condition tables with all possible options and arrive at the tax rate and tax code.
    If you still want to go ahead with bespoke develpoment, request you to further specify your requirment so that someone can help you.
    I don't think it is the right idea to reinvent the wheel again.
    Regards
    Raj

  • Sales order item quantity not rounded and allowing decimals with UoM EA

    Hi gentlemens,
    I noticed something strange in our SAP ERP system.
    When we enter a material in a new sales order item, we are allowed to enter quantity 1,5 EA (1 and half Each).
    But when I check the config of the UoM EA in table T006, the number of decimals (field DECAN) is 0 and the decimal place for rounding (field ANDEC) is also 0.
    As far as I remember from other other SAP system, there should be an error message when entering the quantity 1,5 EA saying that decimals are not allowed for this unit of measure.
    Can someone help and tell me wich error message or which rounding program should normally be active when entering decimals with uom EA ?
    Thanks and regards,
    BDT

    Hi Mani,
    Thanks for the thread reference. I found the related OSS notes yesterday evening but this was for procurement.
    Here the question I have is more for a sales item.
    The strange case we are facing is:
    In a sales order, we can enter a particular material as a standalone item with a quantity of 1.5 EA without any problem.
    But if we create the same new item as a sub-item of a previous one (filling UEPOS), with qty 1,5 EA, then a rounding is triggered by the system based on the T006 config.
    I am wondering if this is a problem with the SAP standard program or if we did anything wrong in the past in our system?
    Best regards,
    BDT

  • How to upload Sales Orders into B1 from an excel file?

    Hi,
      I'm a new comer. I'm looking for a program of uploading Sales Orders into B1 from an excel file. Where can I find a reference book for it? Or I appreciate if someone could offer a program sample.
      Thanks
      ZAP

    Hello ZAP.
    I do not have such code, but i this link /people/janos.nagy/blog/2010/01/25/exporting--importing-authorization-using-ms-excel-in-sap-b1 you can find an excel example about authorization, and using Single Sign On (SAP B1 must have run with excel)
    The method is similar, you can run any DI API operation from excel.
    Here is an example to add a sales order
    Dim oDoc As SAPbobsCOM.Documents = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders)
            oDoc.CardCode = CUSTOMER_CODE
            oDoc.DocDate = Today
            oDoc.DocDueDate = Today
            oDoc.Lines.SetCurrentLine(0)
            oDoc.Lines.ItemCode = ITEMCODE
            oDoc.Lines.Quantity = QTY
            oDoc.Lines.UnitPrice = PRICE
            If oDoc.Add <> 0 Then
                MsgBox("Error " + oCompany.GetLastErrorDescription())
            Else
                MsgBox("SAles order added")
            End If
    You can repeat the setcurrentline section as many time as lines you have in the SO:
    Regards,
    J.
    Ps: Reference: SDK help and sample programs, which included in every patch.
    Edited by: János Nagy on Feb 10, 2010 9:50 AM

  • Fetch Sales Order number VBELN from Purchase requisition number BANFN

    Hi,
    I'm not able to find a suitable method to fetch the sales order number(VBELN) from the purchase requisition number(BANFN).
    I tried using VBEP table to fetch the data, but it is giving serious performance issues, as in for fetching one record it is taking approx 20 seconds!!!
    Kindly suggest a suitable method for this.
    I've used the query as folllows:
    select single vbeln banfn
    from vbep
    into (wa_vbep-vbeln, wa_vbep-banfn)
    where banfn eq wa_eban_zdd1_x-banfn.
    where: wa_vbep is the workarea having two fields vbeln and banfn, and wa_eban_zdd1_x-banfn is the reference preq number.
    Scenario in brief described below:
    Whenever a direct delivery sales order is created on a supply chain plant, a dummy purchase requisition without source of supply is created automatically at preferred supplying plant for the customer in the sales order. Direct Delivery Sales Orders which are still in Open status and for the associated dummy purchase requisitions with these sales order, the deletion flag set has to be unchecked.
    in this case, only one sales order is created corresponding to a preq..
    BAPI: BAPI_PR_GETDETAIL is not giving entries for the table as this is a special case of direct delivery from the production plant directly to the customer, bypassing the warehouse / distribution center...
    selection screen has input fields preq, matnr(product) and plant. we fetch entries depending on the data filled in selection screen and also they should be of document type(BSART in EBAN table) ZDD1 and deletion indicator is set(LOEKZ in EBAN).
    then we check if the sales order corresponding to the preq is in open status...
    for this i need to programmatically fetch the sales order number corresponding to the preq...
    this is causing a performance issue as i could find only one way -- fetching sales order number from VBEP table corresponding to BANFN... indexing for easier also didnt work...
    no other way i could find to fetch sales order number corresponding to the preq number....
    there is a bapi: BAPI_PR_GETDETAIL, but this is not fetching entries to the changing tables related to sales order...
    also EBKN table doesnt have any entries as this is a special case of direct delivery preq..
    Guess i couldnt find anyother way...
    Thanks.

    I'm not sure as to why the select query was still throwing performance issues. I could see that the index had been created on only BANFN in the DB. Prior to creating the index, it was taking approx 20 seconds per entry, but after creating the index, it took 13seconds approx.
    I used the select query as follows:
    select single vbeln banfn
    from vbep
    into (wa_vbep-vbeln, wa_vbep-banfn)
    where banfn eq wa_eban_zdd1_x-banfn.
    where: wa_vbep is the workarea having two fields vbeln and banfn, and wa_eban_zdd1_x-banfn is the reference preq number.
    I tried a few other combinations also, but  those also didnt work effectively:
    select vbeln banfn
    from vbep
    into (wa_vbep-vbeln, wa_vbep-banfn)
    where banfn eq wa_eban_zdd1_x-banfn.
    without using SINGLE in the select query as the select query would implicitly pickup only a single record,
    select vbeln banfn
    from vbep
    into wa_vbep
    where banfn eq wa_eban_zdd1_x-banfn.
    and another query where the INTO statement was directed directly to a workarea.
    But unfortunately, nothing seemed to be working.
    The index i had created was on BANFN alone in the VBEP table.

  • How to copy sales order item text in to purchase requisition

    Hi Experts,
    We enter text for the sales order items in the sales order item details.
    we have done settings for the purchase requision to copy text from sales order into purchase requisition and this works for purchase requisitions automatically created from sales order.
    we need to get text from sales order to be copied in purchase requisitions which are created by converting the planned order.
    we have tried SPRO settings SPRO->Materials Management>purchasing--->text for purchase requisition.
    but this settings does not works for Pur Req. created by converting the planned order.
    is this because planned order does not have segment for text like sales order and purchase requisition?
    Please let me know if it is possible through standard SAP or with the lease development, any help will be appreciated.
    Thanks
    Anand

    Hi Rajesha,
    Thanks for your reply, some of the items in sales order are procured externally by us and our customer maintains text related to price and specification in the item details of the sales order, MRP creates planned order for these materials and these planned orders are always converted in pur requisition, we want that text from the sales order item details should be copied in to the purchase requisitions converted from planned orders.
    is there any user exit which can be called at the time of saving a purchase req or user exit for converting planned order in to pur req.?
    if there is any such exit available, then I think I can read the pegged requirement of the planned order where sales order item will be found then read the text in the item then copy this text in pur req then save pur req may work.
    but this will be a bulky development, please let me know if we can shorten the development.
    Thanks again
    Anand

  • Update Purchase order number in Sales order item level from inbound ORDCHG iDoc

    Hi Gurus,
    I want to update purchase order number from the iDoc 'ORDCHG' to sales order item level (sold to party purchase order number) i.e, VBAK-BSTKD.
    Which exit I need to use?  where to update?  Can you please help.
    Thank you in advance.
    Regards,
    San

    Finally Resolved the problem by writing 2 exits.
    one exit 'EXIT_SAPLVEDB_007'  for identify correct item in the sales order by updating the customer purchase order item number i.e., VBAP-POSEX.  if we update the POSEX field then it wont create new item instead, it will update the item which it is referring to .
    2nd exit for updating the purchase order number. 
    I have tried to pass the program name, screen number, field name, field value etc to bdcdata in the exit 'EXIT_SAPLVEDB_002'. but I observed that it is not going to that screen in the debugging.
    when I try E1EDP02 with QUALF '044' it will update ship-to party's purchase order number.  so to update ship-to party's purchase order number it is going to that screen. 
    so I have used that thing to update purchase order number in sold-to party's purchase order number.
    so when it is going that screen iam changing the field name 'VBKD-BSTKD_E' to 'VBKD-BSTKD' in bdcdata.  Then it is worked.
    This is the solution I found in my time.
    Any way it is solved.  Hope it will be helpful for others who will get this problem.

  • How to get sales order item information

    Hello All,
       I ahve defined a new, custom condition type and created a routine in alternate condition type.
       While creating a sales order, when the routine is getting executed, i need the sales order item information. i.e. i need to access VABP table. but when i put a break point, in the routine, i cant see the detials of item.
    can some one tell me how to get item data, in the routine.
    (p.s. this is while creating sales order)
    thanks a lot in advance
    Best Regards
    Amarender Reddy B

    Hi
    I suppose you're speaking about pricing condition, if it's so all information u can have are in structure KOMP and KOMK. The condition record data should be in the internal table XKOMV.
    If there informations u need aren't there u should enanche those structure.
    Max

  • How to read Sales order Item Text of item node?

    Hi Sap Guru's,
    I have urgent requirement, i want to read Sales order item text of item node.
    can anybody give detail code.
    Thanks in Advance,
    Venkat

    hi venkat,
    take a look at this code
    data:
      git_line type standard table of tline.
    data:
      gwa_head type thead,
      gwa_line type tline.
    data:
      v_first type c.
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
      CLIENT                        = SY-MANDT
        id                            = '0002'
        language                      = sy-langu
        name                          = '1000000122000010'
        object                        = 'VBBP'
      IMPORTING
        HEADER                        = gwa_head
      tables
        lines                         = git_line
    EXCEPTIONS
       ID                            = 1
       LANGUAGE                      = 2
       NAME                          = 3
       NOT_FOUND                     = 4
       OBJECT                        = 5
       REFERENCE_CHECK               = 6
       WRONG_ACCESS_TO_ARCHIVE       = 7
       OTHERS                        = 8.
    loop at git_line into gwa_line.
      at first.
        move 'X' to v_first.
      endat.
      if v_first eq 'X'.
        write: / gwa_line-tdline+10.
        clear v_first.
      else.
        write: / gwa_line-tdline.
      endif.
    endloop.

  • Fetch Sales order & item from Prod ord to TR Header text when staging mat

    Hello
    We have a need to see Sales order and item number in TR header text when selecting TR to be processed in transaction LB10.
    TR´s are created via transaction LP10. Is there any solution to get Sales order number from Production order to be automatically pasted to TR header text field when generating TR?
    SO & item is always available in Production order General data.
    Thanks for answers!
    -A
    Edited by: A_R_FIN on Feb 5, 2010 8:34 AM

    Hi,
    I hope the below link will help you.
    Help needed with BAPI_SALESORDER_CREATEFROMDAT1 parameters
    Thanks,
    Khushboo.

  • Sales order item quantity is not copied to delivery order quantity

    hi,
    i am trying to make a delivery order w.r.t. sales order which have 10 quantity for a certian material. when i create it, all the data on sales order is copied to the delivery order automatically EXCEPT the material quantity which was 10. it was working perfect and i dont know what mistake i made. is there any way out?
    thanks

    Hi,
    While creating delivery, r u getting the following error..
    An item with no delivery quantity is not permitted. Item will be deleted.
    If so, you are maintainig picking location determination for that particular plant and shipping point combination.
    i.e.,
    in OVL3 , for ur plant , Shipping point, Storage condition(Taken from Material master- Plant/Stor1 View)
    you will be maintaining some storage location.
    But for that storage location, you do not maintain a stock..
    If you specify the storage location in sale order, the error won't come..
    Otherwise add stock to the storage location assigned in OVL3..
    It'll work..
    I have also got the same error..
    Hope it may be useful to you..
    Thanks & Regards,
    Venkatesh.S.P

Maybe you are looking for

  • Text element of sales order form

    I have a question about the text element of sales order printing form. i run a sales order with some price condition (ZKFA) -  VA03 and want to print it out before i print it without ZKFA price, it's correct when printing , after input the ZKFA price

  • Production DB and Testing DB (Solaris 9 Oracle 9i)

    I've got a production database but I want to have a testing environment. I've got a spare server that I can use. But how can I duplicate this. Thanx.

  • Nexus5K cannot update Radius config

    Hello I am trying to update the radius configuration on our Nexus5K.  I simply need to add another radius host and remove the current one.  However when I attempt to add the new one I get this message: When attempting to add the new host: sw5K1(confi

  • Configure WCCP on a 4510 switch

    I have to configure an instance of a WCCP on a 4510 switch and I have to admit  have read the examples given by Cisco but dont have understanding of the example config Router(config)# ip wccp web-cache group-address 224.1.1.100 password alaska1 I hav

  • Confused after 10.1 install

    On my intel mac, I have the Flash Player 9 app that came with Adobe Master Collection.  I was expecting the Flash Player 10 upgrade to replace that app with a new one.  I searched and found that one of the Flash Player plug-ins is 10.1  Everything se