Assigning HU to line items of Transfer Order

Hi ,
Can any one help me with a function module to assign destination storage unit number to line item of Transfer order.
Thanks ,
Kanchan.

L_TO_CONFIRM is the FM used to split the Transfer Order and assign different HUs to line items of TO.

Similar Messages

  • How to get Characteristic Values assigned to the line item of Sales Order?

    Hi,
    I want to get the Characteristic Values( Variant Configuration )assigned to First Line Item of Sales Order.
    I was using the Fn. Mod.: VC_I_GET_CONFIGURATION_IBASE,
    this fn. mod. giving all the Characters but not the assigned characteristic values.
    Is there any other way to find characteristic values of sales order.
    Thanks,
    vinayak.
    Message was edited by: vinayaga sundaram

    For example, please see this example program.
    It lists the characteristic names, the values, and the description of the values which are tied to a sales document.
    report zrich_0001.
    * Internal Table for Characteristic Data
    data: begin of i_char occurs 0.
            include structure comw.
    data: end of i_char.
    data: xcabn type cabn.
    data: begin of xcawn,
          atwtb type cawnt-atwtb,
          end of xcawn.
    data: xvbap type vbap.
    parameters: p_vbeln type vbap-vbeln,
                p_posnr type vbap-posnr.
    start-of-selection.
      select single * from vbap into xvbap
                 where vbeln = p_vbeln
                   and posnr = p_posnr.
      clear i_char.  refresh i_char.
    * Retrieve Characteristics.
      call function 'CUD0_GET_VAL_FROM_INSTANCE'
           exporting
                instance           = xvbap-cuobj
           tables
                attributes         = i_char
           exceptions
                instance_not_found = 1.
      loop at i_char.
        clear xcabn.
        select single * from cabn into xcabn
                 where atinn = i_char-atinn.
        clear xcawn.
        select single cawnt~atwtb into xcawn
                   from cawn
                     inner join cawnt
                       on cawn~atinn = cawnt~atinn
                      and cawn~atzhl = cawnt~atzhl
                          where cawn~atinn = i_char-atinn
                            and cawn~atwrt = i_char-atwrt.
        write:/ xcabn-atnam, i_char-atwrt, xcawn-atwtb.
      endloop.
    Regards,
    RIch Heilman

  • Report for deleted line-items in Transfer Orders

    Dear All,
    Please help me in writing the code for "Report for deleted line-items in Transfer Orders".
    regards,
    nishu

    Thanks. Repor completed.

  • Delete the line item in sales order in VA01/VA02 when the quantity is modif

    Hi SAP,
       I have requirement to delete a line item in sales order.Please suggest me to do the same.
      THe scenarios is , we are inserting a free good line item based on some condition and quantity, If the quantity is modified  the free good line item inserted needs to be deleted.
    Waiting for your responce
    Thanks,
        Billa
    Moderator message : Spec dumping is not allowed,search for available information. Thread locked.
    Edited by: Vinod Kumar on Nov 14, 2011 1:54 PM

    Hi,
    Can you also check the SALES LINE.
    Sales line is the combination of SALES ORGANISATION + DISTRIBTION CHANNEL +PLANT.
    Hope it was not maintained.
    Transaction code : OVX6
    PATH:  IMG->ENTERPRISE STRCTRE->ASSIGNMENT>SALES AND DISTRIBTION->ASSIGN SALES ORG- DISTRIBTION-PLANT.
    please revert if the error still exists.
    santosh

  • Unconfirmed Line items in Sales Orders in TP/VS

    While doing TP/VS process and moving the shipments from C to D status, certain shipments do not move to D status due to the reason that there are unconfirmed line items in the orders and are not converted to deliveries, thus preventing shipment status from changing to D after we trigger u201COLTP Generation of Deliveriesu201D.
    The shipments are assigned a truck type based on the items in B status but once we find that there are unconfirmed / partially confirmed line items, we unassign them from the shipments after u201Cundo shipment releaseu201D. This will lead to many cases where the truck type assigned becomes wrong due to the unassignment.
    We want that such unconfirmed items should not come to APO at all or if they come, they should not be optimized during the run. How is this pssible?
    Sunil Madhogarhia

    Hi Sunil,
    I don't think there is any straight forward way to do this. You may think of User Exit or enhancement in CIF. Other option is rather than just unassigning the deliveries, you can think of deleting the shipment and replanning the same so that system during next planning run automatically selects the appropriate vehicle type
    Regards
    Sandeep Patil

  • Automatically add line-items to Sales order

    Hello,
    Our client needs us to add line items to sales orders. The requirement is such that, when the users enter a material on a line item, they wish to see few more materials automatically added as new line items -- item category to be maintained as "Free" items. This appears similar to automatically getting BOM-sub-items for materials which have BOMs maintained. The client is not willing to maintain BOMs for materials in question. They instead have asked us to maintain sub-item materials in a Z-table and then fetch those to populate the subsequent line-items on the sales order.
    So far, we have tried to fiddle around with the XVBAK and XVBAP internal tables in sales exit (MV45AFZZ) and also tried to use BAPI within the same exit. Both methods do not work.
    Could you please guide us ? Thank you.
    Regards,

    Hi,
    I think you can try with product proposal(Item Proposal). T.Code:VA51.
    Using this one can create list of items to be proposed at the time sales order processing.
    Item proposal contains list of items with or without default quantities those were frequently ordered by the customer. You can create any no of items in an Item proposal.Like wise you can create any no.of item proposals.
    But,You can assign only one item proposal per customer in sales tab of the CMR.So that when ever you are creating order for that customer you can access those materials which are listed in an Item proposal completely or selectively,with or without default quantities.
    The items which are proposed from an Item proposal are always changeable.
    Item proposal makes sales order processing simple and fast.
    Only the thing here is it will not automatically explode like in case of BOM.You have to manually select those items from an item proposal.
    Regards,
    Revan
    Edited by: REVAN on Dec 23, 2008 10:55 AM

  • How can I add a new line item for production order?

    HI all,
    How can I add a new line item for production order through BAPI/FM? Thanks in advance.

    Hi Mil,
      Unfortunetly SAP is not in front of me.
    But if possible go to BAPI transaction , check for any production order's bapi for CHANGE purpose. Where you will be able to add your new line.
    Reward if useful!

  • Add Line Item In Sales Order VA01

    HI All,
    I  have new requirement in creation of sales order . Here we have free promotion sales . Here if customer buy one material then he will get some other material as free .In standard sap we can give only one line item as free not more than that .
    Here our requirement is more than one line item . I suggested them maintain all the free materials in one Ztable when ever the original material  will come for  sales order then i have to fetch these materials from ztable  automatically and it should create sales order. I started doing this using user exit  FORM USEREXIT_MOVE_FIELD_TO_VBAP.
    These are the below links i checked in our sdn.
    Adding Line items to sales order on creation using User-Exit in VA01.
    Please give me some idea on this .
    Regards,
    Madhu.

    Hi Asik,
    Thanks for your reply.In my case i can not got for Bom  because the schemes will change for every ten days. I think Bom  creation will fill a lot of data but it wont solve my issue.
    Regards,
    Madhu.

  • How to add 100 line item in sales order at one time

    Hello Guru's
    My requirement is to add 100 line items in sales order at once.
    what can be good approach to overcome this situation.Is there some kind of tool which can be useful?
    Let me know your suggestions
    Thanks a lot in Advance

    Hi,
    do configuration for Proposal Items tab - like -
    then create sales order using with Propose items button - VA01 - then system will accept more than 50 line of materials at a time
    Please Use BAPI -- creation of Sales order
    Thanking you
    Regards
    Mahesh

  • How to make the line items of sales order cannot be deleted.

    Hi All,
    Is there any Enhancement spots or user-exits which make the line items of sales order cannot be deleted if item category is 'TAN'.
    Thanks in Advance,
    Sudhakar Reddy .A

    Hi All,
    If you doesn't want to delete sales order line items then we have write in the Include Program which has mentioned below and in the form .....endform.
    Program Name :  Include MV45AFZB
    _Example:_
    form userexit_check_xvbap_for_delet using us_error
                                              us_exit.
    IF .......
      US_EXIT = CHARX.
    ENDIF.
    endform.

  • To add the line item in Sales Order

    Hi Experts,
    I have to insert  the line item between two line item in sales order dynamically.
    How should i do this.
    any idea??
    Thanks in Advance.

    Hi,
    I guess you are talking about BOM, sub-items or free goods, wherein after you put in one item the other material defined gets added automatically in the sales order.
    That is done with the help of Item Category config by functional person.
    Check here for more info
    [Item Category|Re: Item Category;
    You can also use user exit MV45AFZZ form user_exit_move_to_vbap for a specific logic defined at runtime.
    Regards,
    Amit
    Edited by: Amit Iyer on Aug 26, 2009 10:21 PM

  • Adding a batch to a line item in an Order with B1WS

    Hi,
    I am trying to create code which can update a batch in a line item in an order.  The updating works great, if the batch is already attached to the line item.  However, I am unable to add a batch if one doesn't already exist.
    Can you please have a look at this code and let me know what is wrong?
    I've tried various things, though am still unable to get it to work.
    Thank you very much!
    Mike
    using System;
    using System.Configuration;
    using System.Data;
    using System.Linq;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Xml.Linq;
    using orderWebRef;
    using System.Text;
    public partial class _Default : System.Web.UI.Page
        protected void Page_Load(object sender, EventArgs e)
            // B1BATCH performs batch operations on SAP via DISERVER and B1WS
            // The inputs are:
            // o = Order Number (this is the DocEntry value, NOT the DocNum value)
            // b = Batch Number
            // q = Quantity
            // i = Item Code
            // p = Project
            // debug = 1 or true if you want to see output messages
            // For some security, we will encode some values at the client,
            // and verify them here for consistency.
            // The "Secret Formula" is these variables, which will be passed to the URL
            // 1 = Order Number * 2 (encoded at the client)
            // 2 = Batch Number * 2 (encoded at the client)
            // To decode, we do this:
            // Correct decoding if ((1 = (o/2)) AND (2 = (b/2))
            string o = "";
            string b = "";
            string q = "";
            string i = "";
            string p = "";
            string v1 = "";
            string v2 = "";
            int orderNumber = 0; // This is the DocEntry value, NOT the DocNum value
            int batchNumber = 0;
            int quantity = 0;
            int v1int = 0;
            int v2int = 0;
            bool debugMode = false;
            bool allVarsPresent = true;
            bool allVarsValid = true;
            try
                o = Request.QueryString["o"].ToString();
            catch
                allVarsPresent = false;
            try
                b = Request.QueryString["b"].ToString();
            catch
                allVarsPresent = false;
            try
                q = Request.QueryString["q"].ToString();
            catch
                allVarsPresent = false;
            try
                i = Request.QueryString["i"].ToString().ToUpper();
            catch
                allVarsPresent = false;
            try
                p = Request.QueryString["p"].ToString().ToUpper();
            catch
                allVarsPresent = false;
            try
                v1 = Request.QueryString["1"].ToString();
            catch
                allVarsPresent = false;
            try
                v2 = Request.QueryString["2"].ToString();
            catch
                allVarsPresent = false;
            try
                string debug = Request.QueryString["debug"].ToString();
                if ((debug == "1") || (debug.ToLower() == "true"))
                    debugMode = true;
            catch
                debugMode = false;
            if (!allVarsPresent)
                WriteDebugMessage(debugMode, "All required variables are not in the request.");
                return;
            else
                // All variables are present, now check that they are valid.
                // First, check the v1 and v2 variables are correct
                // Then check that the order exists
                // Then check that the batch exists and has the appropraite quantity available
                try
                    orderNumber = Convert.ToInt32(o);
                    batchNumber = Convert.ToInt32(b);
                    quantity = Convert.ToInt32(q);
                    v1int = Convert.ToInt32(v1);
                    v2int = Convert.ToInt32(v2);
                    if ((v1int / 2) != orderNumber)
                        allVarsValid = false;
                    if ((v2int / 2) != batchNumber)
                        allVarsValid = false;
                catch
                    WriteDebugMessage(debugMode, "Error in processing variables.");
                    return;
                if (!allVarsValid)
                    WriteDebugMessage(debugMode, "Error in validating checksum.");
                    return;
                // All variables are present and valid!
                WriteDebugMessage(debugMode, "All variables are present and valid.");
            try
                loginWebRef.LoginService ls = new loginWebRef.LoginService();
                string sessionID = ls.Login("DBSERVER", "DBNAME", loginWebRef.LoginDatabaseType.dst_MSSQL2005, true, "sa", "PASSWORD", "manager", "managerPass", loginWebRef.LoginLanguage.ln_English, true, "LICENSE:30000");
                WriteDebugMessage(debugMode, "<BR><BR>SessionId: " + sessionID + "<BR><BR>");
                orderWebRef.MsgHeader msgHeader = new orderWebRef.MsgHeader();
                msgHeader.SessionID = sessionID;
                msgHeader.ServiceName = MsgHeaderServiceName.OrdersService;
                msgHeader.ServiceNameSpecified = true;
                orderWebRef.OrdersService order = new OrdersService();
                order.MsgHeaderValue = msgHeader;
                DocumentParams param = new DocumentParams();
                param.DocEntry = orderNumber;
                param.DocEntrySpecified = true;
                orderWebRef.Document document = new orderWebRef.Document();
                document = order.GetByParams(param);
                StringBuilder orderSb = new StringBuilder();
                orderSb.Append("Order " + document.DocNum.ToString() + "<BR><BR>");
                foreach (DocumentDocumentLine docLine in document.DocumentLines)
                    if ((docLine.ProjectCode == p) && (docLine.ItemCode == i))
                        orderSb.Append("Line Num:      " + docLine.LineNum + "<BR>");
                        orderSb.Append("Item Code:     " + docLine.ItemCode + "<BR>");
                        orderSb.Append("Project Code:  " + docLine.ProjectCode + "<BR>");
                        orderSb.Append("Description:   " + docLine.ItemDescription + "<BR>");
                        // Find the batch if it exists and update the quantity
                        // Add the batch if it doesn't exist
                        bool batchExistsInLineItem = false;
                        int batchCount = 0;
                        foreach (DocumentDocumentLineBatchNumber batch in docLine.BatchNumbers)
                            batchCount++;
                            if (batch.BatchNumber == b)
                                batchExistsInLineItem = true;
                                orderSb.Append("<BR>");
                                orderSb.Append("+++++ Batch exists in line item.  Updating.<BR><BR>");
                                orderSb.Append("+++++ Batch Line:   " + batchCount.ToString() + "<BR>");
                                orderSb.Append("+++++ Batch Num:    " + batchNumber + "<BR>");
                                orderSb.Append("+++++ Quantity:     " + quantity + "<BR>");
                                batch.Quantity = quantity;
                        if (!batchExistsInLineItem)
                            docLine.BatchNumbers = new DocumentDocumentLineBatchNumber[1];
                            DocumentDocumentLineBatchNumber batch = new DocumentDocumentLineBatchNumber();
                            batch.BatchNumber = b;
                            batch.Quantity = quantity;
                            docLine.BatchNumbers[0] = batch;
                            orderSb.Append("<BR>");
                            orderSb.Append("+++++ Batch does not exist in line item.  Adding.<BR><BR>");
                            orderSb.Append("+++++ Batch Line:   " + batchCount.ToString() + "<BR>");
                            orderSb.Append("+++++ Batch Num:    " + batchNumber + "<BR>");
                            orderSb.Append("+++++ Quantity:     " + quantity + "<BR>");
                try
                    order.Update(document);
                catch (Exception ex)
                    WriteDebugMessage(debugMode, "SAP Exception:  " + ex.Message.ToString());
                    return;
                WriteDebugMessage(debugMode, orderSb.ToString());
            catch (Exception ex)
                WriteDebugMessage(debugMode, "Error in processing the request.  Exception:<BR><BR>" + ex.Message);
                return;
        private void WriteDebugMessage(bool debugMode, string exitMessage)
            if (debugMode)
                Response.Write(exitMessage);

    Hi Everyone,
    I found the answer, you can find the code here: [B1WS Batch Manipulations with Orders|http://paste-it.net/public/dbbcea0/]
    Cheers,
    Mike

  • Display report : plan line items for internal orders

    When running the report with KOBP tcode, although i have some plan cost line items in the order, i have the message :
    No plan line items were selected
    Message no. KB421
    Could anyone advise?
    However, the report with KOB1 tcode works well and i have the results as expected for actual line items.

    this is may be config issue.
    can you explain with accounting entries for said line items and offsetting GL for each line?
    regards.
    ashok

  • Calculate sales tax based on all line items on the order

    My users have asked to determin tax on the sales order, based on all the line items on the order. For example, if all the items are for product only, or if all the line items are for labor only, or if there is a mix of product and labor,
    Order 1
    line 1 product flag as both for vertex
    line 2 labor flag as both for vertex
    Order 2
    line 1 product flag as product only
    line 2 product flag as product only
    Order 3
    line 1 labor flag as labor only
    line 2 labor flag as labor only
    I do not see away to do this while the order is being created. In the order 1 example above, line one is entered, priced, and taxed as product only (it is the only line on the order at that time and it is product only). Line two is entered, it is marked as both. But I cannot send line item one back through vertex marked as both. Vertex processing is already complete.
    I have looked at using both FYTX0001 and FYTX0002. With both of these exits I can only work with a single line item, i.e. once item one is processed it will not go through the exit when item two is added.
    Any assistance would be appreciated.
    Jay

    Hi WCG,
    Our business is located in California as well. California is a modified-origin state, where state, county, and city taxes are based on the origin of the sale, while district taxes are based on the destination of the sale. You only need to add Sales tax when your customer's billing address is in California. I do not believe that Catalyst currently supports district based sales tax. You could look into a third party solution like TaxJar and see if it could be integrated into Catalyst. We currently charge our California based customers exactly what we would charge them in our retail store.
    So you want to do something like this:
    -Ryan

  • Substitution and activated the same at the line item level in order to subs

    I have created a substitution and activated the same at the line item level in order to substitute the ZRSPL (Payment Block) field by a constant value and a vendor invoice is posted using Transaction FB60. But the same is not working. When I post a vendor invoice using FB60, Payment Block field is being shown as blank instead of the constant value which I want to substitute.
    >
    > My prerequsite is mentioned below :
    > BKPF-TCODE = &#39;FB60&#39; AND BKPF-BUKRS = &#39;ABC&#39; AND ( BKPF-BLART = &#39;KR&#39; OR
    > BKPF-BLART = &#39;KY&#39; ) AND BSEG-DMBTR &gt; &#39;10000&#39;

    Hi,
    I am not understanding the logic behind the prerequisites mentioned in your query.
    Payment block field exists only for vendor related line item.  However, you have not mentioned vendor reconciliation account in the prerequisites.  It means, this substitution will trigger for all the line items which is wrong.
    Or try following  options.....
    1) Substitution->Simulation
    2) Extras->Expert Trace
    Best Regards,
    Madhu

Maybe you are looking for