LSMW to create Sales Order refer to Quotation with multiple line items.

Hi Gurus,
I am new to LSMW, and my requirement is that, I have a file downloaded from another system, it is like this:
Quotation No.  Sold to party  data        item no.       material no.     quatity
556                         10000012                 10              19077                1
556                         10000012                 20              19078                1
557                         10000011                 10              19076                1
And it is required I need to create orders in VA01 refering to quotations, and then delete all the items from quotation, and add the items in the file. I am now doing it through transaction recording in VA01, but I came to a difficult part, that is how I can process line items. Because the items number will only be decided at runtime, so I can not record a BDC for that. And I have read some guides on LSMW, one of it said that transaction recording in LSMW can not deal with deep structures. So could any1 help on this?
Best regards,
Vincent

Dear SD Gurus n Experts,
I have solved the above problem. But there is another problem appearing regarding the date format. Now system generating a message: Date . . is not valid.
While I am using Date: YYYYMMDD format in flat file, which is SAP's Standard Format.
In SDN Link: LSMW upload Sales Order using VA01/VA02     I have found that there are some date fields which are mandatory to filled. Here I have mapped
VDATU - Requested delivery date,  BSTDK - Customer purchase order date,  PRSDT - Date for pricing and exchange rate,  BSTDK_E - Ship-to party's PO date, FKDAT - Billing Date, KORDT - Delivery Date,
and PRGRS - Date type is Constant = D
Can any one tell me, where is the priblem.
With thanks,
DSC

Similar Messages

  • Transfer Order for Inbound delivery with multiple line items...

    Hi All,
    <The flow of my report pgm is >
    PO creation using Transaction - me21n
    My report pick the PO created as per date given in selection screen-
    Creates outbound Deliveries using BAPI_OUTB_DELIVERY_CREATE_STO
    Create Transfer order FM L_TO_CREATE_DN
    Confirm Transfer order FM L_TO_CONFIRM
    GI is done - Inbound delivery is created
    Create Transfer order FM L_TO_CREATE_DN for Inbound delivery
    Confirm Transfer order FM L_TO_CONFIRM
    Goods receipt.
    If PO is having one item - the entire flow is working perfectly.
    if my PO is having multiple items,
    While creating TO for inbound deliveeies - i am facing the error.
    Before calling FM,
    I am assigining these values like
    wa_delit-nlpla  = wa_ltap_vb-vlpla.    "Source Storage Bin To Destination Bin
          wa_delit-nltyp  = wa_ltap_vb-vltyp.    "Source Storage Type To Destination Storage type
          wa_delit-anfme  = wa_ltap_vb-nsolm.    "Actual destination quantity
          wa_delit-letyp  = wa_ltap_vb-letyp.    "Storage Unit Type
          wa_delit-altme  = wa_ltap_vb-meins.    "Unit of measure
          LOOP AT i_lips INTO wa_lips WHERE vbeln = WA_VBFA-IN_DELIV.
            wa_delit-posnr =  wa_lips-posnr.
            APPEND wa_delit TO it_delit.
             ENDLOOP.
    As i am appending i am getting 2 line items in the tabke it_delit.
    Function module :
    CALL FUNCTION 'L_TO_CREATE_DN'
      EXPORTING
       i_lgnum                         = l_lgnum
       i_vbeln                         = wa_vbfa-in_deliv
       i_commit_work                   = 'X'
       i_bname                         = sy-uname
       it_delit                        = it_delit
    IMPORTING
       e_tanum                         = gv_tonum_1
    TABLES
       t_ltap_vb                       = i_ltap_vb_1
      EXCEPTIONS
       foreign_lock                     = 1
       dn_completed                     = 2
       partial_delivery_forbidden       = 3
       xfeld_wrong                      = 4
       ldest_wrong                      = 5
       drukz_wrong                      = 6
       dn_wrong                         = 7
       squit_forbidden                  = 8
       no_to_created                    = 9
       teilk_wrong                      = 10
       update_without_commit            = 11
       no_authority                     = 12
       no_picking_allowed               = 13
       dn_hu_not_choosable              = 14
       input_error                      = 15
       error_message = 16
       OTHERS = 32.
    Here i am getting as input error, i need to create only one TO for multplie items
    If i pass this i a loop - then it will create 2 Transfer order which is WRONG ...so please help me to over come this error.
    Thanks
    Senthil
    Edited by: Senthil Kumar on Dec 7, 2009 3:29 PM

    Hi,
    Please check FM L_TO_CREATE_MULTIPLE.
    Regards,
    Ferry Lianto

  • LSMW program to upload the sales order with multiple line items.

    Dear SD and PP Gurus,
    I am new to creating LSMW Program.
    I want to create a LSMW program to upload the sales order with multiple line items. I have read on SDN that it can be done on two phases. First Create Header Data than line items. IS IT TRUE??, Or
    Is there any procedure by which we can load the sales orders with multiple line items in a single run (part).
    I want to use Batch process, not a BAPI or IDOC procedure.
    I have created a program with
    object 0090
    Method 0000
    Program Name RVINVB10
    Program Type D
    Source Structure 1 - For Header and Source Structure 2  for Line Items.
    Mapped Field INDET (With Fix Value 1), ORDERTYPE, SALESORG, DISTCHANNEL, DIVISION, CUSTOMER, PONUMBER , DELVDATE, PRCGDATE, PMTTERM
    INCOT1 INCOT2 with Source Structure - 1 and
    Field INDENT (With Fix Value 2),  ITEMNO, MATCODE, MATQTY, SUOM, PLANT, BATCH, AMOUNT with Structure-2
    than maintained Structure relation ship, field Mapping, Specified Files, Assigned files, Read Data and other process,
    At final stage (Start Direct Input program RVINVB10) it is giving a message - Table name not allowed.
    Please tell me where I am wrong.
    Thanks in advance.
    DSC

    Dear SD Gurus n Experts,
    I have solved the above problem. But there is another problem appearing regarding the date format. Now system generating a message: Date . . is not valid.
    While I am using Date: YYYYMMDD format in flat file, which is SAP's Standard Format.
    In SDN Link: LSMW upload Sales Order using VA01/VA02     I have found that there are some date fields which are mandatory to filled. Here I have mapped
    VDATU - Requested delivery date,  BSTDK - Customer purchase order date,  PRSDT - Date for pricing and exchange rate,  BSTDK_E - Ship-to party's PO date, FKDAT - Billing Date, KORDT - Delivery Date,
    and PRGRS - Date type is Constant = D
    Can any one tell me, where is the priblem.
    With thanks,
    DSC

  • Create ecatt script for one sales order creation with multiple line items

    Hi ,
    I want to create a ecatt script for one sales order creation with multiple line items. Preferably SAP GUI.
    This selection of data will be from an external file/ variants which will have only one row of data in it.
    Firstly: I have to sort the external file having same PO Numbers in an order.Group them together.
    Second: I have to create sales order for those many line items having same PO Number.
    Best Regard
    Taranum

    Hi Micky
    Firstl you should upload the Line items for a particular sales Order in an Internal table
    and then pass that internal table to your BAPI during your coding corresponding to a particu;lar sales order
    In case of any issues pls revert back
    Reward points if helpful
    Regards
    Hitesh

  • Unable to create PO with multiple line items through LSMW-BAPI method

    Hi All,
    I have a requirement of creating PO through LSMW. I can't use LSMW standard batch input program since there are some fileds not available and also it has many limitations. I'm using LSMW-BAPI method ( Business object BUS2012) which create IDOC and uses BAPI_PO_CREATE1 to ultimately post the PO in the system. I am trying to create PO from a single file which contains both Header and Item data.
    Now my problem is that everytime PO is being created with Single line item only. Everytime I am giving multiple item data in the source file LSMW is preparing multiple IDOCs for multiple line items. As per my understanding this is happenng since header and item is in the same hierarchy level of IDOC type PORDCR102 and the control record is inserted for every line item in the source file.
    It seems that through LSMW-BAPI  it is not possible to create PO with multiple line items. Can anybody provide some input regarding this? Thanks in advance.
    BR,
    Atanu Mukherjee

    Solved by myself.
    Earlier the problem was that LSMW was not being able to recognize items under same header. It was creating new IDOCs every time it gets a new item. To enable this we need to create two structure HEADERDATA and ITEMDATA.  Two additional identifier fields with identifier value 'H' and 'I' should be added in these two structures respectively. Then we need one sequential file with the identifiers field followed by the header and Item data. Example:
    H~header data
    I~item data
    I~item data 
    This would help the standard program to understand what are the items under same header and ultimately create PO with multiple line items.
    BR,
    Atanu Mukherjee

  • Where/ how do I set SNP to create Planned orders with multiple line items?

    Hi
    Currently our SNP is generating planned orders on a daily basis, it creates a single order with a single line item per location.
    Where/ how do set SNP to create planned orders on a daily basis to generate a single order with multiple line items per location, so therefore one planned order with multiple line items for a single location.
    Thanx
    Keegan

    Hi Keegan,
                   In SNP (APO) it is not possible to create order with multiple line items.
    But you can do some settings so that while planning system can do aggregation and disaggregation.
    But your requirment should be set on Aggregation/Dis-aggregation logic.
    Please follow the follwing links:
    http://help.sap.com/saphelp_scm2007/helpdata/en/2c/c557e9e330cc46b8e440fb3999ca51/content.htm
    Aggregation:
    http://help.sap.com/saphelp_scm2007/helpdata/en/42/f731d078e73ee4e10000000a1553f6/content.htm
    Disaggregation:
    http://help.sap.com/saphelp_scm2007/helpdata/en/a6/ebefaf32e22e468355da304cc59387/content.htm
    Please be sure that the setting of this logic will be at planning area level.
    You can't change aggregation/disaggregation logic further.
    Regards,
    Santosh

  • Creating POs with multiple line items

    Hi,
    Is it possible to create a PO with multiple line items from the Sharepoint. The developer guide shows sales order creation with a single line item. If yes, please let me know how it can be done.
    Thanks,
    Pranil

    Hi Pranil,
    You can achieve the user case to create a PO with multiple line items in 1 step by creating a custom solution UI in SharePoint. This is not possible if you simply use the out of box UI (as depicted in the guide).
    It depends on how to define the ESR data type. You can create a data type with header details of PO and collection of items with cardinality as 0..n and create a complex BDC model using SPD --> then create a custom UI.
    Other option would be keep it as 2 lists (2 step action). First create a PO header and then add item by item in 2 steps as foreign key relationship. You can see the example of Account and Activity in pre-shipped contents to get an idea.
    Thanks,
    Girimurugan

  • Production order from sales order with multiple line item(for one material)

    Dear Gurus,
    I am working in MTO scenarios. If there is several line item in a sales order for one material, multiple production order( same as no. of sales order line item) is getting created against each of the line item.My requirement is,since the material code is same in each line item and sales order is one, one production order should be generated for all line item. please tell me how to do it.
    (Here for one material, multiple line item is required for some specific reason)
    Regards
    Rajib Pathak

    Hi,
    This is not possible.
    In Std SAP will create one production order for one sales order. The stock is also allocated to thet particular sales order only. Because each and every sales order may vary in any one of the parameters. Considering this, SAP has designed like this.
    Regards,
    V. Suresh

  • Different value in sales order and billing document for one line item

    Hi Experts,
    User created a sales order with three line items say line item 10, line item 20, line30 and he did the delivery and billing also. Line item 10 value is 5024.26 EUR in Sales order
    At the time of billing the value of a line item 10 is increased by 0.02 i.e. 5024.28
    I asked the user cancel that invoice and the post goods issue. He cancelled the invoice and post goods issue. Then he created the PGI and billing now the value of line item decrease by 0.01(5024.27) again he cancelled the invoice and post goods issue. he created the post goods issue and billing. Now the value is correct i.e. 5024.26.
    User is asking me the reason can any one help me in this
    Note: price is copying from delivery to billing

    Morning Sunina
    Now consider this scenario
    Item a - 10
    Item b - 20
    Item c - 30
    and the validity of condition rec for item C is 31st of Jan
    after 31st JAN the record changes or there isn't any.
    In Copy control the pricing type is 'B' i.e., carry out new pricing.
    Now if the document is created in January it will take all the above prices. and this document is then billed in Feb. Now the copycontrol, whilst copying the prices, will predetermine the same.
    Now your task is to check if there was user intervention, check the pricing in order and check what condition types got affected in order and in billing.
    If your scenario is still not amongst the above cases...
    I don't know what to do, if you figure out please let us also know, god know when we would face the same scenario....
    Take care

  • Difference amount in sales order and billing document (For one line item)

    Hi Experts,
    User created sales order with 3 line items and billing document. but problem is that there is difference in value of sale order and billing only for line item 10. The remaining items values are same in sales order & billing doc.if I check in sales order condition I found that VPRS condition is used and the value is 692.13and the amount is 3245.26in sales order. But if suppose I check the same value in billing doc the value is 0.69 and the amount is 3245.28. Can u suggest me which configuration I have to check for this.
    I also checked change lock but there is no change in sales and billing document & Material
    Regards
    Sunina agarwal

    Morning Sunina
    Now consider this scenario
    Item a - 10
    Item b - 20
    Item c - 30
    and the validity of condition rec for item C is 31st of Jan
    after 31st JAN the record changes or there isn't any.
    In Copy control the pricing type is 'B' i.e., carry out new pricing.
    Now if the document is created in January it will take all the above prices. and this document is then billed in Feb. Now the copycontrol, whilst copying the prices, will predetermine the same.
    Now your task is to check if there was user intervention, check the pricing in order and check what condition types got affected in order and in billing.
    If your scenario is still not amongst the above cases...
    I don't know what to do, if you figure out please let us also know, god know when we would face the same scenario....
    Take care

  • Create Quotation (ME41) with multiple lines item

    Hi All,
    Do you guys know how to create a quotation (ME41) with a multiple lines item with LSMW ?
    I'm considering create a LSMW with a BAPI just like "CREATEFROMDATA1 (for create PO)" so it has a HeaderData and also ItemData.
    I also looked on the BAPI, but couldn't find any BAPI for quotation.
    Any suggestion?
    Thx u

    Hope this could help u...
    BAPI for RFQ Creation (ME41)

  • Want to create 1 reciept with multiple line items under a header in APO

    Hi All,
    I am using BAPI_MOSRVAPS_SAVEMULTI3 to create In-Transit which is the reciept element. But it creates only for a single location/product.
    I have a requirement where I have to create multiple line items under 1 intransit order. Can somebody suggest me how to perform this using a BAPI in APO ??
    Best Regards,
    Chandan Dubey

    Hi Micky
    Firstl you should upload the Line items for a particular sales Order in an Internal table
    and then pass that internal table to your BAPI during your coding corresponding to a particu;lar sales order
    In case of any issues pls revert back
    Reward points if helpful
    Regards
    Hitesh

  • Create sales order with ref to quotation - usage of line items not copied

    hi
    i have created a quotation for which the first line item(higher level item) is a configurable item for which the value of the field use (vbap-vkaus) is blank  and the line items the use field is given as  'HIDE DISCOUNT'.
    when i created a order with reference to the above quotation i am not getting the value "HIDE DISCOUNT"  populated for the line items for usage field ..
    can any one knows any user exit / data transfer routine please suggest me
    thanks in advance
    rajani yeluri

    hi
    i have created a quotation for which the first line item(higher level item) is a configurable item for which the value of the field use (vbap-vkaus) is blank  and the line items the use field is given as  'HIDE DISCOUNT'.
    when i created a order with reference to the above quotation i am not getting the value "HIDE DISCOUNT"  populated for the line items for usage field ..
    can any one knows any user exit / data transfer routine please suggest me
    thanks in advance
    rajani yeluri

  • LSMW to create Sales Order using direct input RVINVB10

    Hi,
    I need advise on 2 parts of Sales Order creation using direct input program RVINVB10.
    1) How do I enter the WBS Element PS_POSID in the item line of Account Assignment tab? There does not seem to be a field in the direct input program structure to fill this in.
    2) How can I fill in item tab 'Billing Plan' that appears only when Item Category = 'Milestone Billing'?
    Thanks

    Nandan,
    Please go through the documentation of the BAPI. It gives you details of what needs to be filled in in which structure/parmater. Also, read the documentation associated with each structure, that will tell what to fill.
    It is really hard to explain it in simple terms as to what are required. But, you need the header, items and partners at the minimum. Also, with some of these structures there are also 'X' structures(like ORDER_ITEMS_INX for ORDER_ITEMS_IN) which should also be filled based on what fields you filled in the original structure. For example, if you filled 'MATERIAL' field on the ORDER_ITEMS_IN structure, you should also fill in the same field on the ORDER_ITEMS_INX structure with an 'X' in it.
    All this is well documented in the BAPI.
    Srinivas

  • Sales Order Credit Status Block with Schedule Line ATP Confirmed Quantity

    I would like to keep the Credit Status Block on a Sales Order when it is created and over the credit limit and at the same time be able to Confirm the Order Quantity (if inventory is available) on the Schedule Line.  Has anyone done this?  I'm using ECC 5.0
    In the IMG --> Sales and Distribution --> Basis Functions --> Credit Management/Risk Management --> Credit Management --> Define Automatic Credit Control --> If I remove the Status/Block indicator the schedule line does confirm the sales order quantity but the sales order is not blocked and a delivery can be created.
    Thanks.
    Donna

    Hello Donna,
    I think I solved your problem.
    There are two ways to block the sales order - one is to not confirm the Schedule line i.e. block delivery... block further action that can be taken. The second is to not let the person save the sales order.
    Another option is to get Just a warning message, that the credit limit has been exceeded, but able to save the sales order with a confirmed schedule line.
    The setting will be in OVA8.
    For the Document Value you make the setting C or A. and make sure the block is not set.
    Don't worry about the Open order or open delivery unless you want the system to perform a credit check considering the orders that are already existent. Same with open delivery. It will take into account all the cost of the orders that are open for delivery.
    Now here some options:
    Either consider a 'warning' by the system good enough and still be able to confirm the schedule line.
    (ii) Put in a Delivery Block in the Sales Document Types, in the Shipping tab. That way, you will be able to save the sales doc. but not be able to deliver it.
    (iii) Put a Billing Block in the Sales Doc type, in the Billing tab. You will be able to deliver but not bill.
    (iv) Create a new routine (with the help of an ABAP guy) and place it in the auto credit check, 'Reaction' field where it will place a Delivery Block.
    Do let me know what your thoughts are and what you decided to do.
    Thanks
    Noel

Maybe you are looking for

  • How can I remove snap do

    My computer (running windows) and browser has been infected by Snapdo and it is getting worse. Until now I have been able to fix it via the options menu in Firefox and the facility to reset the browser, but no snap do has been developed so that it pr

  • How do I transfer a specific backup from my external hard drive to my mac book air?

    How do I transfer a specific backup from my external hard drive to my mac book air? I downgraded my mac's software from Mavericks to Mountain Lion because of the computer's limations so I need to transfer all the info I had when Mavericks  and down t

  • KDE4.X - Does it work with small res?

    Hello, Installing Arch on a friends laptop. He has a laptop with 1280x800. How well does this resolution work with KDE4.2? Or do the icons and menus not "fit" well? Thanks. -Ghosty

  • Detecting the type of Internet Connection

    Hi.. I am trying ... build an application that detects the kind of internet connection (Dial-up, T1, DSL etc) that you are using and then disconnects it. This application, must then send a response to a server-side program containing information abou

  • No Sound on U205-S5002 After Windows 7 Install

    I tried replying to a similar thread on these forums, but the reply button was grayed out.  Anyway, I'm having the problem where my sound was set to mute when I installed Windows 7 over Windows XP on my U205-S5002, and now there is no sound output re