LSMW  CODING

Hi all,
i need to upload data for mm01 transaction using lsmw recording method,
in that my material group is 003 in text file, and after uploading i had to replace
003 by c003, for this i had to write logic for this in lsmw (concatenation)
where i need to write code how to write code

Hi,
In the Fifth Step ie.,<b>Maintain Field Mapping and Conversion Rules</b>, You <b>double click</b> that Field Name MATNR & Write Coding there.
Otherwise,<b>Position the Cursor</b> in the Source Field of that Field(Right Side of that Field.Make Sure that U already done the Field Mapping) & Press the Push Button <b>'Rule'</b> & Select the RadioButton <b>'Prefix'</b>.It will generate the Codings Automatically.
Regards,
Padmam.

Similar Messages

  • How to debug the LSMW coding???

    Hi Experts,
    Any one please tell how to debug the lSMW codings?
    Thnx,
    Mohana

    Hi,
    Go to the 5th Step that is
    "5 Maintain Field Mapping and Conversion Rules"
    select this radio Button and execute then
    you will maping your defining fields to source structure fields
    then where ever you want to write validations
    you just select that field and click on RULES tab
    then select radio-button User defined routine
    then you will get a window
    you just click on continue button
    then you will get a PERFORM opposite to your selected field
    save and come back
    then select the 6th radio button
    that is " 6 Maintain Fixed Values, Translations, User-Defined Routines"
    and execute
    there you will find your user defind routine
    you just double click on the routine
    then you will get a editor for writing your code for validations
    you just pass p_in as input and you will get the result in p_out parameter
    then you will put a Break point or put command like "BREAK-POINT"
    then it will automatically triggered while running this project.
    To view your generated code, you need to bring it up in the initial screen of your object.To do so,
    click on the User Menu button & check the Display Read Program & Display Conversion Program will take
    you into the generated code. Place your soft breakpoint as you normally do.
    Another option: go to the step DISPLAY READ PROGRAM or DISPLAY CONVERTION PROGRAM.
    Now you will see the ABAP editor with the code. Place the breakpoint (soft break point using STOP button on application tool bar) where ever you desire.
    Regards.

  • I want in LSMW SAME CODING. THIS IS USING BDC CALL TRANSACTION

    REPORT  ZXX_BDC_PRA NO STANDARD PAGE HEADING LINE-COUNT 20
                                                LINE-SIZE 150 .
    Program Name  :ZXX_BDC_PRA                             *
    Object Id     :                                        *
    Develper Name : praveen                                *
    Start Date    : 25.06.07                               *
    Description   : uploading flat file to sap system      *
    *--structure for Data Uploading.
    DATA: BEGIN OF IT_STR ,
            VKORG LIKE RF02D-VKORG,
            VTWEG LIKE RF02D-VTWEG,
            SPART LIKE RF02D-SPART,
            KTOKD LIKE RF02D-KTOKD,
            NAME1 LIKE KNA1-NAME1,     
            SORTL LIKE  KNA1-SORTL,     
            ORT01 LIKE KNA1-ORT01,     
            PSTLZ     LIKE KNA1-PSTLZ,     
            LAND1 LIKE KNA1-LAND1,     
            SPRAS LIKE KNA1-SPRAS,
            END OF IT_STR.
    *--Internal Table for Data Uploading.
    DATA: ITAB  LIKE IT_STR OCCURS 0.
    *--Internal Table to sucessfull Records.
    DATA:   ITAB1 LIKE IT_STR OCCURS 0.
    *--Internal Table to Store Error Records.
    DATA:    ITAB2 LIKE STANDARD TABLE OF IT_STR WITH HEADER LINE.
    *--Internal Table for Storing the BDC data.
    DATA: BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
    *--Internal Table for storing the messages.
    DATA:   MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    DATA:   COUNT TYPE I VALUE 1,
            S VALUE 0, E VALUE 0.
    Selection screen *
    SELECTION-SCREEN BEGIN OF BLOCK b1
                     WITH FRAME TITLE TEXT-001.
    PARAMETERS: P_FILE TYPE IBIPPARMS-PATH.
    SELECTION-SCREEN END OF BLOCK B1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
    *functionality to use drill down list
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          PROGRAM_NAME  = SYST-CPROG
          DYNPRO_NUMBER = SYST-DYNNR
        IMPORTING
          FILE_NAME     = P_FILE.
    Start-of-selection *
    START-OF-SELECTION.
      DATA FILENAME TYPE STRING.
      FILENAME = P_FILE.
    *-- Form to upload flatfile data into the internal table.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME                = FILENAME
          FILETYPE                = 'ASC'
          HAS_FIELD_SEPARATOR     = 'X'
        TABLES
          DATA_TAB                = ITAB
        EXCEPTIONS
          FILE_OPEN_ERROR         = 1
          FILE_READ_ERROR         = 2
          NO_BATCH                = 3
          GUI_REFUSE_FILETRANSFER = 4
          INVALID_TYPE            = 5
          NO_AUTHORITY            = 6
          UNKNOWN_ERROR           = 7
          BAD_DATA_FORMAT         = 8
          HEADER_NOT_ALLOWED      = 9
          SEPARATOR_NOT_ALLOWED   = 10
          HEADER_TOO_LONG         = 11
          UNKNOWN_DP_ERROR        = 12
          ACCESS_DENIED           = 13
          DP_OUT_OF_MEMORY        = 14
          DISK_FULL               = 15
          DP_TIMEOUT              = 16
          OTHERS                  = 17.
    *--Generating the BDC table for the fields of the internal table.
      LOOP AT ITAB INTO IT_STR.
        PERFORM BDC_DYNPRO      USING 'SAPMF02D' '0107'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'RF02D-KTOKD'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM BDC_FIELD       USING 'RF02D-VKORG'
                                      IT_STR-VKORG.
        PERFORM BDC_FIELD       USING 'RF02D-VTWEG'
                                       IT_STR-VTWEG.
        PERFORM BDC_FIELD       USING 'RF02D-SPART'
                                      IT_STR-SPART.
        PERFORM BDC_FIELD       USING 'RF02D-KTOKD'
                                        IT_STR-KTOKD.
        PERFORM BDC_DYNPRO      USING 'SAPMF02D' '0110'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'KNA1-SPRAS'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM BDC_FIELD       USING 'KNA1-NAME1'
                                    IT_STR-NAME1.
        PERFORM BDC_FIELD       USING 'KNA1-SORTL'
                                        IT_STR-SORTL.
        PERFORM BDC_FIELD       USING 'KNA1-ORT01'
                                        IT_STR-ORT01.
        PERFORM BDC_FIELD       USING 'KNA1-PSTLZ'
                                      IT_STR-PSTLZ.
        PERFORM BDC_FIELD       USING 'KNA1-LAND1'
                                      IT_STR-LAND1.
        PERFORM BDC_FIELD       USING 'KNA1-SPRAS'
                                        IT_STR-SPRAS.
        PERFORM BDC_DYNPRO      USING 'SAPMF02D' '0120'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'KNA1-TXJCD'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM BDC_DYNPRO      USING 'SAPMF02D' '0125'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'KNA1-NIELS'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM BDC_DYNPRO      USING 'SAPMF02D' '0360'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'KNVK-NAMEV(01)'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=ENTR'.
        PERFORM BDC_DYNPRO      USING 'SAPMF02D' '0310'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'KNVV-BEGRU'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM BDC_DYNPRO      USING 'SAPMF02D' '0324'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'KNVP-PARVW(01)'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=ENTR'.
    *--Calling the transaction 'Vd01'.
        CALL TRANSACTION 'VD01' USING BDCDATA MODE 'N' UPDATE 'S'
        MESSAGES INTO MESSTAB.
        PERFORM MESSAGES.
        REFRESH : BDCDATA, MESSTAB.
      ENDLOOP.
    END-OF-SELECTION.
    *--Populating the Success records internal table.
      IF ITAB1[] IS NOT INITIAL.
    format color 5.
        WRITE: /'SUCCESSFUL RECORDS'.
        format color off.
        LOOP AT ITAB1 INTO IT_STR.
          WRITE:/ IT_STR-VKORG,IT_STR-VTWEG,
                  IT_STR-SPART,IT_STR-KTOKD,
                  IT_STR-NAME1,IT_STR-SORTL,     
                  IT_STR-ORT01,
                  IT_STR-PSTLZ,
                  IT_STR-LAND1,      
                  IT_STR-SPRAS.
          S = S + 1.
        ENDLOOP.
    REFRESH : ITAB1.
        WRITE:/ 'TOTAL RECORDS',S.
      ENDIF.
    *--Populating the error records internal table.
      IF ITAB2[] IS NOT INITIAL.
    FORMAT COLOR 3.
        WRITE :/ 'ERRORS RECORDS ARE'.
    FORMAT COLOR OFF.
        LOOP AT ITAB2.
          WRITE:/ ITAB2-VKORG,
                  ITAB2-VTWEG,
                  ITAB2-SPART,ITAB2-KTOKD,
                  ITAB2-NAME1,ITAB2-SORTL,     
                  ITAB2-ORT01,
                  ITAB2-PSTLZ,
                  ITAB2-LAND1,      
                  ITAB2-SPRAS.
            E = E + 1.
        ENDLOOP.
    REFRESH : ITAB2.
        WRITE: / 'TOTAL RECORDS',E.
    REFRESH : ITAB2.
      ENDIF.
    End of Selection *
    END-OF-SELECTION.
    TOP-OF-PAGE *
    TOP-OF-PAGE.
      WRITE:/ SY-ULINE.
      WRITE:/10 'REPORT ID',21 SY-REPID,35 'USERNAME',46 SY-UNAME,
      60 'SYSTEM DATE',70 SY-DATUM,80 'SYSTEM TIME',90 SY-UZEIT,
      100 'PAGE NO',108 SY-PAGNO.
      WRITE:/ SY-ULINE.
    FOrm to Populate the BDC table.
           Start new screen                                              *
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      CLEAR BDCDATA.
      BDCDATA-PROGRAM  = PROGRAM.
      BDCDATA-DYNPRO   = DYNPRO.
      BDCDATA-DYNBEGIN = 'X'.
      APPEND BDCDATA.
    ENDFORM.                    "BDC_DYNPRO
           Insert field                                                  *
    FORM BDC_FIELD USING FNAM FVAL.
      IF FVAL <> SPACE.
        CLEAR BDCDATA.
        BDCDATA-FNAM = FNAM.
        BDCDATA-FVAL = FVAL.
        APPEND BDCDATA.
      ENDIF.
    ENDFORM.                    "BDC_FIELD
    *&      Form  messages
    FORM MESSAGES .
      LOOP AT MESSTAB.
        IF MESSTAB-MSGTYP = 'I'.
         WRITE : / MESSTAB-MSGV1.
        ELSEIF
    MESSTAB-MSGTYP = 'S'.
          INSERT LINES OF ITAB FROM COUNT TO COUNT INTO TABLE ITAB1 .
          COUNT = COUNT + 1.
         WRITE : / MESSTAB-MSGV1.
        ELSEIF
        MESSTAB-MSGTYP = 'E'.
          INSERT LINES OF ITAB FROM COUNT TO COUNT INTO TABLE ITAB2.
          COUNT = COUNT + 1.
         WRITE : / MESSTAB-MSGV1.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " messages

    Hi
    Go through the doc and do the same using LSMW
    BDC is the way to transfer data by writing a batch input program which can use either session or call transaction method.
    LSMW used to transfer data without/less code.
    What type of data we transfer using LSMW?
    LSMW is best suited for transferring master data.
    Actually BDC and LSMW are not comparable at all.
    for example LSMW itself can use BDC as a way of mass data transfer.
    BDC is a mass data transfer technique via screen logic of existing SAP Data entry transactions. It behaves as if you are manually making thousand of entires into sap system as a background job. And that is probably the reason why BAPI's are preffered over BDC's.
    On the other hand LSMW is a tool to facilitate DATA migration from other legacy systems ... It contains step by step procedure for data migration.
    Like Managing Data Migration Projects , Creating Source Structures , Mapping Source structures wid Target structures , etc etc
    LSMW internally might well be using the following techniqes for data transfer..
    1. IDOX
    2. Direct Input / BDC
    4. BAPI's
    LSMW is an encapsulated data transfer tool. It can provide the same functionality as BDC infact much more but when coming to techinical perspective most the parameters are encapulated. To listout some of the differences :
    LSMW is basicaly designed for a fuctional consultant who do not do much coding but need to explore the fuctionality while BDC is designed for a technical consultant.
    LSMW offers different techinque for migrating data: Direct input ,BAPI,Idoc,Batch input recording. While bdc basically uses recording.
    LSMW mapping is done by SAP while in BDC we have to do it explicitly .
    LSMW is basically for standard SAP application while bdc basically for customized application.
    Coding can be done flexibly in BDC when compared to LSMW
    1. Maintain Attributes:
    Here you have to choose the second option and you can do the recording how this should work. Then assign the same to the Batch Input Recording name.
    2. Maintain Source structure:
    Create a structure name
    3. Maintain Source field:
    In this you have to create a structure same as that of the input file
    eg: name
    age
    4. Maintain structure relations:
    This will link the structure to the input file.
    5. Maintain field mapping and conversion rules:
    Here is the place where you can do coding, depending upon the code you have written or assignment you have done the values will get picked up from the file and get processed.
    6. Maintain field mapping and conversion rules:
    If you have any fixed values you can define here.
    7. Specify files:
    Specify the input file path and type.
    8. Assign files:
    This will assign ur file to the Input file
    9. Read Data:
    This will read ur data from teh file.
    10. Dispaly Read Data:
    You can see the uploaded data
    11. Convert Data
    This will convert the data to the corresponding format for processing
    12. Display Converted data:
    13. Create batch input session
    Here this will create a batch input session for processing
    14. Run Batch Input session:
    By clicking on the session and process the same you can do teh needfu.
    http://www.sapbrain.com/TOOLS/LSMW/SAP_LSMW_steps_introduction.html
    http://esnips.com/doc/8e732760-5548-44cc-a0bb-5982c9424f17/lsmw_sp.ppt
    http://esnips.com/doc/f55fef40-fb82-4e89-9000-88316699c323/Data-Transfer-Using-LSMW.zip
    http://esnips.com/doc/1cd73c19-4263-42a4-9d6f-ac5487b0ebcb/LSMW-with-Idocs.ppt
    http://esnips.com/doc/ef04c89f-f3a2-473c-beee-6db5bb3dbb0e/LSMW-with-BAPI.ppt
    http://esnips.com/doc/7582d072-6663-4388-803b-4b2b94d7f85e/LSMW.pdf
    for Long texts Upload
    Please take a look at this..
    http://help.sap.com/saphelp_erp2005/helpdata/en/e1/c6d30210e6cf4eac7b054a73f8fb1d/frameset.htm
    Reward points for useful Answers
    Regards
    Anji

  • ABAP coding in LSMW

    Hi All,
    A)Is it possible to  write ABAP coding in LSMW, if yes where can we do this. and
    B)During the First Step of LSMW we come across 1. Standard/Batch Direct Input
                                                                          2.Batch input recording
                                                                          3.Business Object Method (BAPI)
                                                                          4.IDOC(intermediate document)
    which one to use and when to use?
    C) what are the advantages/disadvantages of LSMW compared to other data transfer methods like BDC.
    please let me know the answers for above.
    useful answers will be rewarded for the same.
    Regards,
    Yellappa.

    hi
    for q posed to ashvinder, its used only for validation of the input records and their corresponding processing, i will explain a simple scenario,
    1. if u want to transfer data a part of which has already been created in the system. You
    want to decide at runtime whether the data is created or changed.
    u can write this coding in corresponding field
    2. You want to "skip" a record depending on a certain condition, i.e. this record shall not be converted and transferred to the output file.
    3. Duplicate a Record
    If want complex pricing procedures u cant do that in LSMW, u need to go for BDC's
    for ur question about what to use, BAPI or IDOC, check this link
    http://www.sap-img.com/abap/ale-bapi.htm
    http://searchsap.techtarget.com/generic/0,295582,sid21_gci1089362,00.html?bucket=ETA&topic=299357
    award points if found helpful
    Message was edited by:
            Rahul Kavuri

  • Coding Block in LSMW recording via MB1C

    Doing Inventory load by LSMW, when recording with T.Code MB1C, in 2nd screen getting a "coding Block". How to go around it it.

    through LSMW the MB1C Recording not support, you can go for below standard methods like
    Batch Input
    Object               0110   Goods movement
    Method               0000
    Program Name         RM07MMBL
    Program Type         B   Batch Input
    or BAPI method
    Business Object      BUS2017      Goods Movement
    Method               CREATEFROMDATA              Post Goods Movement
    Message Type         MBGMCR                      Post goods movements with MB1c
    Basic Type           MBGMCR03                    Post Goods Movements with MB1C

  • Coding block error in LSMW

    Hi Guys,
    I am using RFBIBL00 standard program in LSMW (Direct Input method). All the steps are executing fine and the data is mapped accordingly. When i am running the session in Foreground, I am getting a error msg "Account 53012000 requires an assignment to a CO object". The problem is, when the data is posted in FB01 screens, the Profit segment button is not getting triggered and the remaining data is not getting posted in those screens. I have checked the technical setting of that button, but couldnot find the field in the program.
    If any one encounted this situation, plz help me...
    Can ask for any clarification..
    Bye,
    kamal.

    Check out this thread
    Unexpected  u0093Coding Blocku0094 pop-up in RFBIBL00

  • Regarding coding in lsmw..

    Hi ALL,
                 Where we can write code in lsmw .
    thanks ,
    adithya.

    HI,
    you can write code in Field mapping and conversion rules step.
    Go to change mode and double click on the Field that u have mapped. screen editor will be opened and u can code there.
    and if u want to code seperately, then u can create sub routines and code in that.
    u can create sub routines in the Maintain Fixed Values, Translations, User-Defined Routines step.
    Regards,
    Asif Ali Khan

  • Use of global variables like g_cnt_transactions_transferred in the LSMW

    Hi SapAll.
    when i had a look at the some of the LSMW's whic use IDOC as the object of uploading data into SAP from external Files i have found in the coding under the step "Maintain Field Mapping and Conversion Rules" that they use some of the global variables like below
    .if p_trfcpt = yes or sy-saprl >= '46A'.
      EDI_DC40-DOCNUM = g_cnt_transactions_transferred + 1.
    endif.
    .EDI_DC40-CIMTYP = g_cimtyp.
    .EDI_DC40-MESTYP = g_mestyp.
    .EDI_DC40-MESCOD = g_mescod.
    .if p_filept = yes.
      EDI_DC40-SNDPOR = g_fileport.
    elseif p_trfcpt = yes.
      EDI_DC40-SNDPOR = g_trfcport.
    endif.
    my doubt is where i can find these variables 'g_cnt_transactions_transferred ','g_cimtyp','g_mescod','g_fileport','g_trfcport' in the LSMW and what is the use of the variable  'g_cnt_transactions_transferred ' in the LSMW.
    I have treid to find out the above listed variables looking in step 'Maintain Field Mapping and Conversion Rules' under global variabels list and the other lists also but i couldnt found.
    can any one help me in this ?
    regards.
    Seetha.

    Hi Seetha,
               In the LSMW Workbench go to the option user menu.  And check the option display conversion program.
    Now when you execute with the radio button on dislplay conversion program, you ll see the code that got generated in the background while you built your LSMW.
    The global variables that you have mentioned are bound to be there in this program generated in the background..
    You can put a break point here and see for yourself what the value of these global variables are at runtime.
    File port, TRFC port , no. of transactions executed by one run of the LMSW Idoc program , message type are some of the fields that you have asked for .
    Regards,
    Arun

  • Problem while handling items in LSMW for VA01

    Hi All,
    I am doing an LSMW using the BAPI method for uploading sales order data(VA01).I am using the BAPI method.
    The problem that I am facing is I am unable to handle the item details properly.I have done some coding part for that in LSMW but it is only updating the first item details and neglecting the latter ones without even throwing an error.
    Please do suggest me a way of how can I handle the items(material info which we see in a table control in VA01 transaction)
    Expecting response at your earliest convinience.
    Its an urgency for me.
    Thanks in advance,
    with Regards,
    Daya.

    Hi,
    Would you tell me which BAPI you are using to create the sales order and are you facing problem only with item creation?

  • Initial Stock Upload T code MB1C and Movement Type 561through LSMW - Error

    Hi,
    Trying to Upload the Initial Stock, Transaction Code MB1C and Movement Type 561 through LSMW.
    While recording the fileds, system giving a message of Code Block.
    Please let us know about Code Block while uploading the Initial Stock.
    Thanks
    Siddu.

    Check this thread
    [Re: Coding Block in LSMW recording via MB1C|Coding Block in LSMW recording via MB1C;
    thanks
    G. Lakshmipathi

  • In lsmw

    hi
    how  can we control screen resloution in LSMW ?
    Thanks in advance
    kumar

    HI kumar,
    you can use ctu_params.
    This is for Default screen size for CALL TRANSACTION. It signifies the screen size will be constant irrespective of the screen resolution(which can vary for different user). The importance of this lies in programs(module pool) that contain table controls. With default screen size we can control the no of rows in the table control which otherwise may vary depending on the screen resolution.
    DEFSIZE is the Selection as to whether the screens of the called transaction are displayed in the standard screen size. Values "X" (standard size), " " (current size).
    sample.
    data : x_ctu_params type ctu_params.
    To have default screen size, mode and update
    x_ctu_params-defsize = 'X'.
    x_ctu_params-dismode = 'X'.
    x_ctu_params-updmode = 'X'.
    call transaction tscode using bdcdata
    options from x_ctu_params
    or
    Check this coding.
    WA_CTU_PARAMS type ctu_params.
    WA_CTU_PARAMS-DISMODE = 'N'. "no screen mode
    WA_CTU_PARAMS-UPDMODE = 'S'. "synchronus update
    WA_CTU_PARAMS-NOBINPT = 'X'.
    WA_CTU_PARAMS-NOBIEND = 'X'.
    WA_CTU_PARAMS-DEFSIZE = 'X'. "Default size
    CALL TRANSACTION 'VA01' USING it_bdcdata
    OPTIONS FROM WA_CTU_PARAMS
    MESSAGES INTO it_mesg.
    Default size will play good role in terms of resoultion. in one system in table control you can see 10rows, but in others system it will show 20 records. it depends on resoultion. but when you set the default size then it will take same (default screen size) in all the systems when you run BDC.
    Hope this resolves your query.
    Regards,
    karthik
    reward me points if usefull

  • Sales Order Creation using LSMW IDOC method.. ( Custome Interface)

    Hi ABAP'rs,
                     Please provide me LSMW steps for creating Sales Order using IDOC method.
                            Thanks and Regards,
                                                  Param.

    LSMW-IDOC in General
    LSMW – Step by Step Guide: Legacy System Migration Workbench is an R/3 Based tool for data transfer from legacy to R/3 for one time or periodic transfer.
    Basic technique is Import data from Spreadsheet / Sequential file, convert from source format to target format and import into R/3 database. LSMW not part of standard R/3, if we need this product email [email protected]
    Advantages of LSMW:
    • Most of the functions are within R/3, hence platform independence.
    • Quality and data consistency due to standard import techniques.
    • Data mapping and conversion rules are reusable across projects.
    • A variety of technical possibilities of data conversion.
    • Generation of the conversion program on the basis of defined rules
    • Interface for data in spreadsheet format.
    • Creation of data migration objects on the basis of recorded transactions.
    • Charge-free for SAP customers and partners.
    Working With LSMW:
    Use TCODE LSMW
    Objects of LSMW:
    •Project – ID with max of 10 char to Name the data transfer project.
    • Subproject – Used as further structuring attribute.
    • Object – ID with max of 10 Characters, to name the Business object .
    • Project can have multiple sub projects and subprojects can have multiple objects.
    • Project documentation displays any documentation maintained for individual pop ups and processing steps
    User Guide: Clicking on Enter leads to interactive user guide which displays the Project name, sub project name and object to be created.
    Object type and import techniques:
    • Standard Batch / Direct input.
    • Batch Input Recording
       o If no standard programs available
       o To reduce number of target fields.
       o Only for fixed screen sequence.
    • BAPI
    • IDOC
    o Settings and preparations needed for each project 
    Preparations for IDOC inbound processing:
    • Choose settings -> IDOC inbound processing in LSMW
    • Set up File port for file transfer, create port using WE21.
    • Additionally set up RFC port for submitting data packages directly to function module IDoc_Inbound_Asynchronous, without creating a file during data conversion.
    • Setup partner type (SAP recommended ‘US’) using WE44.
    • Maintain partner number using WE20.
    • Activate IDOC inbound processing.
    • Verify workflow customizing.
    Steps in creating LSMW Project:
    • Maintain attributes – choose the import method.
    • Maintain source structure/s with or without hierarchical relations. (Header, Detail)
    • Maintain source fields for the source structures. Possible field types – C,N,X, date, amount and packed filed with decimal places.
    • Fields can be maintained individually or in table form or copy from other sources using upload from a text file
    • Maintain relationship between source and target structures.
    • Maintain Field mapping and conversion rules
    • For each Target field the following information is displayed:
    o Field description
    o Assigned source fields (if any)
    o Rule type (fixed value, translation etc.)
    o Coding.
    o Some fields are preset by the system & are marked with Default setting.
    • Maintain Fixed values, translations, user defined routines – Here reusable rules can be processed like assigning fixed values, translation definition etc.
    • Specify Files
    o Legacy data location on PC / application server
    o File for read data ( extension .lsm.read)
    o File for converted data (extension .lsm.conv)
    • Assign Files – to defined source structures
    • Read data – Can process all the data or part of data by specifying from / to transaction numbers.
    • Display read data – To verify the input data being read 
    Convert Data – Data conversion happens here, if data conversion program is not up to date, it gets regenerated automatically.
    • Display converted data – To verify the converted data
    Import Data – Based on the object type selected
    • Standard Batch input or Recording
    o Generate Batch input session
    o Run Batch input session
    • Standard Direct input session
    o Direct input program or direct input transaction is called
    BAPI / IDOC Technique:
    • IDOC creation
    o Information packages from the converted data are stored on R/3 Database.
    o system assigns a number to every IDOC.
    o The file of converted data is deleted.
    • IDOC processing
    o IDOCS created are posted to the corresponding application program.
    o Application program checks data and posts in the application database.
    Finally Transport LSMW Projects:
    • R/3 Transport system
    o Extras ->Create change request
    o Change request can be exported/imported using CTS
    • Export Project
    o Select / Deselect part / entire project & export to another R/3 system
    • Import Project
    o Exported mapping / rules can be imported through PC file
    o Existing Project data gets overwritten
    o Prevent overwriting by using
    ‘Import under different name
    • Presetting for Inbound IDOC processing not transportable.
    Reward if useful.
    regards
    santhosh reddy

  • Lsmw - How to mark a check-box

    Hi,
    I am creating a very simply LSMW using transaction MBST.
    I need to select a specific item to be cancel.
    In order to do that, at some point of the recording I need to mark a check-box.
    When I execute the BI session the action of "click" the check-box fail.
    Any advise?
    Thanks in advance

    >
    Alex Santana Almeida wrote:
    > Hi,
    >
    > I am creating a very simply LSMW using transaction MBST.
    >
    > I need to select a specific item to be cancel.
    >
    > In order to do that, at some point of the recording I need to mark a check-box.
    >
    > When I execute the BI session the action of "click" the check-box fail.
    >
    > Any advise?
    >
    > Thanks in advance
    This description is a bit short.
    when you execute MBST, then all items are checked by default.
    so you probably remove all and then want to set it for one item.
    Can you post your coding (just this one line) where you moved the X to the box?

  • Material Master upload problem (LSMW)

    Hi
      I am using Standard Batch input program (RMDATIND)  for MM upload i need to validate the old material number if it is already existed in MARA it should throw an error at the end of the processing saying that "Old material number" already existing in MARA . Flat file will have thousands of records.
    One solution like, we can move all the error records in one internal table in code of Filed mapping conversion rule step , but the problem is where we can write the error records?
    Another question when we use Standard program for conversion is it possible to show error log at the end of the processing?
    Its very urgent  Kindly help me ........
    Rgds,
    bhanu.......

    Hi,
      YOu can populate error messages in LSMW. To achieve this you add code in LSMW.  Follow the below procedure to add code in LSMW.
    In Display FieldMapping and Conversion rule Step of LSMW click the button Display Variant. A screen will pop up. Check the boxes - Global Definitions and ABAP Sub Programs. This will allow you to add code in LSMW.
    At check the error records follow the below mentioned procedure...
    <b>Error messages in the conversion log</b>
    How can user-defined error messages be added to the conversion log?
    1.     Use of  WRITE  command in the Coding
    a.     Example: WRITE: ‚Error during conversion of field xxx’
    2.     In the editor use ‚Insert -> Message’ to use a message already existing in the SAP system.
    a.     Example (Coding after using the menu function and filling the fields):
    WA_ERRORTAB-ID = '/SAPDMC/LSMW'.
    WA_ERRORTAB-MSGNO = 012.                         
    WA_ERRORTAB-PAR1 = 'A'.                          
    WA_ERRORTAB-PAR2 = 'B'.                          
    WA_ERRORTAB-PAR3 = 'C'.                          
    WA_ERRORTAB-PAR4 = 'D'.                          
    INSERT WA_ERRORTAB INTO TABLE G_ERROR_TAB. 
    The message will be added to the log.
    For further reference click the link below
    http://www.erpgenie.com/sapgenie/docs/Lsmw.zip.
    Regards,
    Vara

  • Lsmw issue plz help its urgent

    Hi Experts ,
    i need to create a LSMW using batch input .
    but the requirement is on the basis of conditions my recording need to be changed .
    dat means
    3127POL09 3127POL09-1 CTR 3127-1003E 100 FUL
    3127POL09 3127POL09-2 WBS 3127POL01 60 FUL
    for ctr i ill have to post data in screen number 200
    and for wbs i ill have to post data in screen number 400 .
    can we put some conditions in recording in lsmw ?
    i no we can create multiple recording but how can we use them to fullfill my requirement .
    plz help its urgent
    thanx in advance

    Hi,
    Within LSMW, there is an option to write our own code wherein this code can be incorporated.
    This is in the Field Mapping Option...
    Just go to the Menu Extras->Layout
    and click on the check box Form Routines
    Global Data.
    Here you can define Global Variables and also perform your ABAP Coding.
    Regards,
    Balaji.

Maybe you are looking for

  • I spilled a jar of water on my macbook

    Okay. So I know there are a thousand posts about this but I cannot seem to find one that describes this situation. I spilled a large glass of water on my macbook keyboard. After just staring in absolute shock for a second or two the screen turned int

  • Reading dynamic table column based on user selection

    Hi there, I am having a problem of reading and manipulating the data stored in a standard SAP table. The following example simulates the table and what i am trying to do: Table: Storing sales data for sales person SALES_PERSON    REGION   YEAR   MTH_

  • Exporting MPEG2's????

    I am using an uncompressed quicktime graphic within final cut that I have to take into dvd studio pro to create a dvd. When I export an mpeg2 and burn my dvd the graphic seems to look like I have lost Alot of contrast. The quality has been greatly lo

  • Can you pass a local file address to be opened when firefox is started?

    I want to view an html file edited in Bluefish. Bluefish provides several start commands for browsers, but does not include one for firefox. I tried "firefox %s&" but that had no effect.

  • What controls the space above 'maincontent' in CSS layout with header?

    In a freshly-downloaded CSS page layout with header (twoColHybLtHdr or similar), there is a space of about 20px between the bottom of the header box and the top of the maincontent box.   Because of this space, when a bottom border is added to the hea