Handle Line item in LSMW

I have to create BDC for MB1C.
for specific plant, storage location , movement type, I  have 4 material details. How should I record and program this using <b>LSMW (not with SHDB).</b>
Sayantan

Hai Das
Go to Tcode "LSMW"
give Project Name
     Subproject Name
     object Name
Press Enter -
Press Execute Button
It gives 20 radio-Button Options
do the following 15 steps as follows
1) select radio-Button 1 and execute
   Maintain Object Attributes
select the Radio Button : Batch Input Recording
then go to the main menu and click on GOTO Tab there you will click 
Recordings Overview
Select the recordings and click on Create Button(Press F5)
you just pass Recording Name : ZMB1C
and give Description for the Recording : XXXXXXXXXXXXXX
press enter
give Transaction Code is : MB1C
here the system will take you at SHDB Tcode
here you will record your fields and save the Tcode
then you will come back
you will give the Recording Name as ZMB1C and save and come back
you will proceed for the next 14 steps
Regards
Sreeni

Similar Messages

  • How to handle multiple line items in lsmw

    hi all,
    how can i handle multiple line items in lsmw either by using direct input method or BDC recording.
    first preference is Bdc recording in lsmw . can u tell me the steps in detail.
    thanks,
    harini.c

    Hi Harini,
    Check this link.
    BDC - Header with multiple line items.
    Regards,
    Arun

  • 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

  • Multiple line item in LSMW

    hi,
    How to load multiple material in line item level for a sales order conversion.step wise explanation would be appreciated.
    cheers,
    sanjay

    Hi Sanjay,
    Lets assume ur file structure for header and item is like this.
    Header : ORDERNO ORDERTYPE field1 field2.
    Item : ORDERNO VORNR MATNR QTY.
    As u can see in the input file the header and item orders are linked through the common field ORDERNO. In most of SAP systems external numbering for sales order is not allowed even though it is necessary to maintain a common field between the header and item files even if they are not mapped to sap database. Ur input file contains entries like-
    Header : 1000 OR 100.00 20.00
             1001 RT 50.00 10.00
    Item : 1000 0010 Material1 10.00
           1000 0020 Material2 10.00
           1001 0010 Material1 10.00
    Please fallow the fallowing steps.
    1. Create a structure for header with all the necessay header fields.
    2. Create a structure for item below the header in the hierarchy level and use a common field from header into the item. ( both of them should have same name and should be the first field in the structure).
    3. After mapping it to the standard lsmw or custom program structure create two flat files with structure similar to the structure mentioned above and upload the data.
    I hope my info helps u in some way.
    Sharath Kumar.

  • Handling line items in bdc

    hi,please tell me how to handle the line items i.e the header data and item data in bdc?
    provide me a clear vision?

    go with this sample code
    REPORT zsowja NO STANDARD PAGE HEADING LINE-SIZE 255.
    DATA: bdcdat LIKE bdcdata OCCURS 0 WITH  HEADER LINE.
    DATA: BEGIN OF record OCCURS 0,
    data element: ELIFN
            lifnr(010),
    data element: EKORG
            ekorg(004),
    data element: BKGRP
            ekgrp(003),
    data element: EMATNR
            ematn(018),
    data element: BSTMG
            menge(017),
    data element: EWERK
            werks(004),
          END OF record.
    DATA : BEGIN OF head_itab OCCURS 0,
    data element: ELIFN
            lifnr(010),
    data element: EKORG
            ekorg(004),
    data element: BKGRP
            ekgrp(003),
       END OF head_itab.
    DATA : BEGIN OF item_itab OCCURS 0,
    data element: ELIFN
            lifnr(010),
    data element: EMATNR
            ematn(018),
    data element: BSTMG
            menge(017),
    data element: EWERK
            werks(004),
       END OF item_itab.
    CALL FUNCTION 'WS_UPLOAD'
        EXPORTING
            CODEPAGE                = ' '
             filename                = 'c:/hello.txt'
             filetype                = 'ASC'
            HEADLEN                 = ' '
            LINE_EXIT               = ' '
            TRUNCLEN                = ' '
            USER_FORM               = ' '
            USER_PROG               = ' '
            DAT_D_FORMAT            = ' '
       IMPORTING
            FILELENGTH              =
         TABLES
              data_tab                = record
       EXCEPTIONS
            CONVERSION_ERROR        = 1
            FILE_OPEN_ERROR         = 2
            FILE_READ_ERROR         = 3
            INVALID_TYPE            = 4
            NO_BATCH                = 5
            UNKNOWN_ERROR           = 6
            INVALID_TABLE_WIDTH     = 7
            GUI_REFUSE_FILETRANSFER = 8
            CUSTOMER_ERROR          = 9
            OTHERS                  = 10
    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 record.
      ON CHANGE OF record-lifnr.
        head_itab-lifnr = record-lifnr.
        head_itab-ekorg = record-ekorg.
        head_itab-ekgrp = record-ekgrp.
        APPEND head_itab.
        CLEAR head_itab.
      ENDON.
    TO HAVE LINK BETWEEN HEADER AND ITEM TABLE USE LIFNR AS LINKER
      item_itab-lifnr = record-lifnr.
      item_itab-ematn = record-ematn.
      item_itab-menge = record-menge.
      item_itab-werks = record-werks.
      APPEND item_itab.
      CLEAR item_itab.
    ENDLOOP.
    *TO CHECH THE DATA IN HEADET ITAB AND DETAIL/ITEM ITAB
    *loop at head_itab.
    *write :/ head_itab.
    *endloop.
    *skip 2.
    *loop at item_itab.
    *write:/ item_itab.
    *endloop.
    SORT head_itab BY lifnr ekorg ekgrp.
    SORT item_itab BY lifnr.
    DATA linecount TYPE i.
    START-OF-SELECTION.
      LOOP AT head_itab.
        ON CHANGE OF head_itab-lifnr.
          REFRESH bdcdat.
          CLEAR bdcdat.
          PERFORM bdc_dynpro      USING 'SAPMM06E' '0100'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'EKKO-LIFNR'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '/00'.
          PERFORM bdc_field       USING 'EKKO-LIFNR'
                          head_itab-lifnr.
          PERFORM bdc_field       USING 'EKKO-EKORG'
                                        head_itab-ekorg.
          PERFORM bdc_field       USING 'EKKO-EKGRP'
                                        head_itab-ekgrp.
          linecount = 0.
    <b>
          LOOP AT item_itab WHERE lifnr = head_itab-lifnr.
            linecount = linecount + 1.
            IF linecount = 1.</b>
              PERFORM bdc_dynpro      USING 'SAPMM06E' '0120'.
              PERFORM bdc_field       USING 'BDC_CURSOR'
                                            'EKPO-WERKS(01)'.
              PERFORM bdc_field       USING 'BDC_OKCODE'
                                            '/00'.
              PERFORM bdc_field       USING 'EKPO-EMATN(01)'
                                            item_itab-ematn.
              PERFORM bdc_field       USING 'EKPO-MENGE(01)'
                                            item_itab-menge.
              PERFORM bdc_field       USING 'EKPO-WERKS(01)'
                                            item_itab-werks.
              PERFORM bdc_dynpro      USING 'SAPMM06E' '0120'.
            ELSE.
              PERFORM bdc_field       USING 'BDC_CURSOR'
                                            'EKPO-WERKS(02)'.
              PERFORM bdc_field       USING 'BDC_OKCODE'
                                            '=NP'.
              PERFORM bdc_field       USING 'EKPO-EMATN(02)'
                                            item_itab-ematn.
              PERFORM bdc_field       USING 'EKPO-MENGE(02)'
                                            item_itab-menge.
              PERFORM bdc_field       USING 'EKPO-WERKS(02)'
                                            item_itab-werks.
              PERFORM bdc_dynpro      USING 'SAPMM06E' '0120'.
            ENDIF.
            AT END OF lifnr.
              PERFORM bdc_field       USING 'BDC_OKCODE'
                                            '=BU'.
            ENDAT.
          ENDLOOP.
        ENDON.
        CALL TRANSACTION 'ME21' USING bdcdat MODE 'A'.
        REFRESH bdcdat.
      ENDLOOP.
    FORM bdc_dynpro USING value(a) value(b).
      bdcdat-program = a.
      bdcdat-dynpro = b.
      bdcdat-dynbegin = 'X'.
      APPEND bdcdat.
      CLEAR bdcdat.
    ENDFORM.
    FORM bdc_field USING value(c) value(d).
      bdcdat-fnam = c.
      bdcdat-fval = d.
      APPEND bdcdat.
      CLEAR bdcdat.
    ENDFORM.

  • How to handle line item for posting a document

    Hello,
    I am using a function module to post a document, so far I have hard coded all the values in the test program. I am passing two internal tables to the function module, one which has header data and the other which has line item data. So far I have written the following code to get the line item details:
    it_bseg-BUKRS = '001'.
    it_bseg-GJAHR = u20182010u2019.
    it_bseg-BUZEI = '001'.
    it_bseg-BSCHL = '31'.
    it_bseg-WRBTR = '900'.
    it_bseg-PSWSl = 'USD'.
    it_bseg-SAKNR = u20180000123456u2019.
    it_bseg-HKONT = u20180000123456u2019.
    it_bseg-LIFNR = u2018001234567u2019.
    append it_bseg to lt_temp_bseg.
    clear it_bseg.
    it_bseg-BUKRS = '001'.
    it_bseg-GJAHR = '2010'.
    it_bseg-BUZEI = '002'.
    it_bseg-BSCHL = '40'.
    it_bseg-WRBTR = '900''.
    it_bseg-PSWSL = 'USD'.
    it_bseg-KOSTL = '1111871234'.
    it_bseg-XKRES = 'X'.
    it_bseg-HKONT = '0000564738'.
    it_bseg-FISTL = '1234556000'.
    it_bseg-GEBER = '0000001'.
    it_bseg-fkber = '0'.
    append it_bseg to lt_temp_bseg.
    clear it_bseg.
    Now I want to get rid of the way I am handling the line item and want to handle it based on what user enters. For example right now only line item is being considered but if user enters two line items then what should be the approach.
    Thank you,
    Rajeev Gupta

    Any Suggestion.

  • Regarding Line Items posting in LSMW

    Hi
       Can You let me know the procedure that how we can post the data realted to the line items using LSMW technique.
    Regards,
    kumar

    LSMW cannot be used for data involving table control. U need to go in for a BDC session method for better performance .

  • How to load long text in BOM line item

    Hello Experts
    How do i load Long text in BOM Line item using LSMW
    Thanks
    S
    Edited by: Alvaro Tejada Galindo on Jan 31, 2008 5:11 PM

    Use Read_text function module.
    you need to pass
    ID
    LANGUAGE
    NAME
    OBJECT   to the function moduel
    To find the Text id name language and object these are the following steps. Example: FB02
    1. goto FB02, Enter Document number
    2. from menuselect Goto>Header-->header Text..... New window will be displayed 
    3. select the Header Text. here you can see all the text. 
    4. click on the TEXT (which you want to know the Text id) , then press log ICON (you can find in bottom right of the text window) it looks like a rolled paper. 
    5. in the Next window you will find Text Name. Text ID, Language. etc...
    Regards,
    Lalit Mohan Gupta.

  • Problem in AR Line Item IDOC method

    Hello Guys ,
    iam migrating open AR Line Items using lsmw Idoc method.when i uploaded the flat file and converted the file .at step 10 display converted data it is not displaying the values for the field  net duedate(FAEDN) and amount(BETRW)  but when iam processing the idoc ,the values are displayed in data records .can anybody explain what is the reason for this.your valuablae  answer is greatly appreciated.
    Regards
    Janapathi

    hi,
    to load open ar item , the best method is to use FRBIBL00. you can put in the additional coding logic in begin of processing events.
    this will give you good control over the loading as well.
    pls reward points if found usefull.
    regards
    pragya

  • 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)

  • Data conversion- GL , GL Open Line Item Upload

    Hi,
    For Objects GL Upload , GL Line item Upload  : LSMW- BAPI,IDOC Methods possible .Is any standard Bapi , Idoc available.
    And also share the advantage and disadvantage in using  Ecatt for dataconversions.
    Please share link which gives details  for doing  standard master data conversions.

    in LSMW we have Idoc method and batch input method
    IDOC
    Message Type         GLMAST                      Master data G/L accounts
    Basic Type           GLMAST01                    Master data G/L accounts:
    Enhancement
    Batch Input
    Object               0010   GL A/C Master Record
    Method               0002   Flat structure
    Program Name         RFBISA00
    Program Type         B   Batch Input

  • Line Items with B1WS

    Hello,
    I am probably missing something very simple but I have not come to grips with handling line items in B1WS at all. For example, a stock transfer in VB.net;
    Dim _Service As StockTransferService
    Dim _Params As StockTransferParams = Nothing
    Dim _Transfer As StockTransfer = New StockTransfer
    Dim _TransferLine As StockTransferStockTransferLine = New StockTransferStockTransferLine
    _TransferLine.ItemCode = "something"
    _TransferLine.WarehouseCode = "01"
    _Params = Service.Add(Transfer)
    Return _Params
    But at no point have I added _TransferLine to the lines collection of _Transfer nor can I see how to do it.
    Your help would be appreciated, thank you.

    Hi,
    StockTransferService works as any other service in B1WS with collections inside their properties. You can ahve a look to B1WS samples like for example Messages to see how it works.
    I have also tested StockTransfer for you and here you have some lines creating a StockTransfer with 1 line:
    Dim stService As StockTransferWebRef.StockTransferService = New StockTransferWebRef.StockTransferService
          Dim stParams As StockTransferWebRef.StockTransferParams
          Dim st As StockTransferWebRef.StockTransfer = New StockTransferWebRef.StockTransfer()
          st.CardCode = "TestC"
          st.StockTransferLines = New StockTransferWebRef.StockTransferStockTransferLine(1) {}
          st.StockTransferLines(0) = New StockTransferWebRef.StockTransferStockTransferLine
          st.StockTransferLines(0).ItemCode = "TEST"
          st.StockTransferLines(0).Quantity = 1
          st.StockTransferLines(0).QuantitySpecified = True
          stParams = stService.Add(st)
    Hope it helps
    Trinidad.

  • Line items are clubbed in Handling Unit's

    There are two line items in delivery for same material , while packing  I am selecting single line item  and packing it . But when I select line item 10 and try to pack it, line item 20 also automatically getting clubbed with line item 10 and getting packed together .
    For this material , rounding profile has been maintained .I canu2019t delete this rounding profile because when we process single line item for this material , system has to round off . Suppose , material is rounded off for 30 units in material master and  rounding profile has been assigned for this material.
    My requirement is handling unit need to be created for single line item , system should not consider 2nd line item while creating handling unit for first line item even though first and second line items consume same material .
    In delivery, suppose , there are two line items for same material . for first line item quantity is 20 and  for second line item , it   is 23 .  
    When I try to pack it manually , system should create 2 handling units with quantity of  20 and 23 nos .  System   should not create handling units with quantity of 30 and 13 .
    What configuration change I need to make in handling unit management .
    Thanks In Advance
    Jaya

    Hi Pratyush
    I have checked up in  both the places, POP2 and POF2,  target quantity was mentioned as 1 only for this material  .
    still ,Why is system not considering only one line item's quantity while packing . why is it clubbing both line items .
    Pls help me ........

  • Line item wise Qty in Handling Unit Management

    Dear All,
    I am working and testing Handling Unit Management. As per the client requirement, he wants Multilevel Packaging (Manually) for materials as-
    E.g. 100 Pieces will be packed in 1 Small Carton.
           100 Small Cartons will be packed in 1 Big Carton.
           10 Big Cartons will be packed in 1 Pallet.
    Now while creating delivery I packed 2 materials separately. And in the item level it is showing as a whole, means total 1100 PC packed in 11 Small carton, 11 Small cartons packed in 5 Big cartons and 5 Big cartons packed in 2 Pallets. Please find the below screen shot.
    Now when I check this delivery number in tables LIPS-VBELN, it is showing the entire qty of Small carton, Big carton and Pallets as 11, 5, 2 respectively. But actually it has show each material or line item wise No. of Small carton, Big carton and pallet used.
    E.g. For 1st material Small Boxes = 5
                                   Big Carton = 2
                                   Pallet = 1
          For 2nd material Small Boxes = 6
                                   Big Carton = 3
                                   Pallet = 1
    My question is, is there any table or logic where I can fetch all these details for all material that how many packaging material and qty has been used. Because in packing list the same needs to get printed each line item wise. I checked in VEPO and VEKP table as well but not getting any input.
    Kindly help.
    Regards:
    Abhishek

    First of all, why you don't have any quantities assigned against Small cartons, big cartons and pallets?
    Well, for your requirement. As functional consultant, you should be smart enough to interpret & analysis the data when you have tables and data in hand. Anyways, in your case,
    As Pallet is the highest level pack material.
    Pass HU no of pallet in VEKP- EXIDV, in your case for one of the pallet, it is 1000013558.
    For that you will get, Internal HU no. VEKP-VENUM, say, 86.
    Pass VEKP-VENUM = VEPO-VENUM.
    With that you will get Lower-level HU, VEPO-UNVEL, that will be internal HU No for Big Cartons & VEPO-VEANZ for packing material quantity.
    Then pass VEPO-UNVEL = VEPO-VENUM, by this you will get internal HU No for Small Cartons in VEPO-UNVEL & VEPO-VEANZ for packing material quantity.
    Again, pass VEPO-UNVEL = VEPO-VENUM, by this you will get following info:
    Table - Fields
    Field Desc
    VEPO-VEPOS
    HU item
    VEPO-VBELN
    Delivery
    VEPO-POSNR
    Delivery Item
    VEPO-VEMNG
    Packed quantities
    Try and share your feedback.
    Thanks, JP

  • 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

Maybe you are looking for

  • How can I link to an article in different issue?

    What is the best way to make a link from article A in issue x to article B in issue y? Every day we refer to articles published in the past, and it would be great to be able to tap the reference, and get the referred article/folio.

  • UI5 Table control Cellclick event exception

    Hi, I have rendered "Table" control with the data. After populating the data when I clicked on Table Cell getting the below error in the Chrome browser console. (In the code I haven't hook CellClick event to the table control) Uncaught Error: Syntax

  • "Client" property set to "No", application deployment not working (issue with registering to MP?)

    Dear all, We're running an SCCM 2012 SP1 environment. All users have a thin client and are running virtual desktop in our VDI environment. Thin clients are deployed via an SCCM task sequence. Since a few months, software deployment (i.e. updated syst

  • Yahoo Stattracker

    I keep getting a message when clicking on Yahoo Stattracker that I need to dowload Flash Player 11 even though I have it already installed and enabled.   I am currently running on Windows 7 operating system, with IE 11 and with Adobe Flash Player 11

  • Editing free version of Adobe Reader 10.1.8.

    I have the free version of Adobe Reader 10.1.8.  Using Google Chrome I was able to download a PDF document from the internet and save it as a PDF document on my computer.  I now want to delete pages in that document and save the modified document as