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

Similar Messages

  • 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

  • Regarding tablecontrol in lsmw

    hi
       please can any one tell me how to do table control in lsmw?
    Regards
    srujana

    Hi,
    LSMW will have a Indicator for headr and itam, i do not remember the correct field, but it will have an indicator, check the fields, there will be a single charecter lenght field, that should be the indicator, and using that we can write the logic.
    check that single charecter field, it that is X that means the header record is processed, and do the items.
    and, this is another way, try this out also
    YOu can do this in "Define Source Structures" step,
    the HEADER is defined first,
    then the DETAIL below the HEADER.
    add the fields to the structures.
    Both should have some common key field
    Please take care that the name of the common field is the same.
    Once you do this it is linked. The you have a header and item corresponding to that header. then run the LSMW as you would.
    Check the threads -
    Re: Table control in LSMW
    Re: how can we handle table control in LSMW
    Re: Table control in LSMW
    how can we handle table control in LSMW
    Re: UGRENT !!! Filling a table control through LSMW
    Regards,
    Padmam.

  • Regarding  VK11 for lsmw........Batch input standard program

    Hi friends,
       I am wokring on LSMW for VK11 transaction. I have to use batch input standard  program....
    can any body help me  in this regard.
    Regards,
    Jayan

    Hi
    a) For Standard Batch/Direct Input i believe we can assign 2 files (structures) , but it is possible for batch input recording ?
    b) If this is possible, how can i assign the second file (detail structure) to C201 recording ?
    In [this post|Re: LSMW load Customer data with Table like file with Header and Item records ?] you can read a good discussion about a problem like yours (header, item):
    I believe you can use both solutions: single or double files.
    c) How can i mapping the detail file fields to recording fields (PLPOD-ARBPL(01), PLPOD-ARBPL(02),..) ?
    Just as Breakpoint said you can check if there's a chance in order to place the record to the top line, else it could be a problem
    Max

  • Help regarding coding stored procedure

    Dear All,
    i am new in oracle. i have to develop an application for a store, where some material In and Out on daily basis.
    and i want to see current status any time.
    any one give me any idea how to do that means coding of stored procedure, on whose basis i can create material IN and OUT form.
    If Any one have such application please Please share
    thanks,
    Sachin

    I've never done this before, but on this google search
    http://www.google.com/search?sourceid=navclient&ie=UTF-8&oe=UTF-8&q=%22java+stored+procedure%22+hello
    This was the first hit
    http://otn.oracle.com/oramag/oracle/03-jan/o13java.html
    and after 30 seconds of looking at it, I noticed this line
    loadjava -user scott/tiger Hello.class
    was specifing .class instead of your .java
    Could that be the problem?????

  • Regarding coding

    Hi Everybody,
    Please tell me whether this coding is correct or not if not? what modifications i have to do to get values into 0FISCPER.
    I am not getting values in to 0fiscper.Please send me the solution.Its very urgent.
    When '0CO_PC_PCP_01'.
    TABLES : KEKO.
      DATA : WA_KKBW_PCP1 like KKBW_PCP1.
        lOOP AT C_T_DATA into WA_KKBW_PCP1.
        l_tabix = sy-tabix.
        SELECT SINGLE POPER BDATJ
                  INTO KEKO
                  FROM KEKO
                  WHERE KADKY = WA_KKBW_PCP1-KADKY.
        concatenate KEKO-BDATJ KEKO-POPER into wa_KKBW_PCP1-ZZFISCPER.
        wa_KKBW_PCP1-ZZFISCVARNT = 'Z1'.
        move WA_KKBW_PCP1 to C_T_DATA.
      modify C_T_DATA from WA_KKBW_PCP1 index l_tabix.
        EndLoop.
    Thanks,
    Devi

    Hi Everybody,
    Please tell me whether this coding is correct or not if not? what modifications i have to do to get values into 0FISCPER.
    I am not getting values in to 0fiscper.Please send me the solution.Its very urgent.
    When '0CO_PC_PCP_01'.
    TABLES : KEKO.
      DATA : WA_KKBW_PCP1 like KKBW_PCP1.
        lOOP AT C_T_DATA into WA_KKBW_PCP1.
        l_tabix = sy-tabix.
        SELECT SINGLE POPER BDATJ
                  INTO KEKO
                  FROM KEKO
                  WHERE KADKY = WA_KKBW_PCP1-KADKY.
        concatenate KEKO-BDATJ KEKO-POPER into wa_KKBW_PCP1-ZZFISCPER.
        wa_KKBW_PCP1-ZZFISCVARNT = 'Z1'.
        move WA_KKBW_PCP1 to C_T_DATA.
      modify C_T_DATA from WA_KKBW_PCP1 index l_tabix.
        EndLoop.
    Thanks,
    Devi

  • Regarding coding with the sequential files

    hi experts,
                in my company i hvnt worked on the sequential files dats y i request u to all experts,to send me the small sample program for uploading from the apllication server,,,,,,plz send me the file format also.........and how to save on the application server.....i know it will take some time but plz help me.....

    hi Ravi,
    Use this sample code as an example for ur problem.
    table declaration
    tables: mara.
    *data declaration
    data: begin of it_lfa1 occurs 0,
    vendor like lfa1-lifnr,
    land1 like lfa1-land1,
    name1 like lfa1-name1,
    ort01 like lfa1-ort01,
    end of it_lfa1.
    selection screen
    selection-screen: begin of block b1 with frame.
    parameters: p_file type rlgrap-filename obligatory.
    selection-screen: end of block b1.
    at selection screen
    at selection-screen on value-request for p_file.
    *& start-of-selection
    start-of-selection.
    perform transfer_file using p_file.
    perform write.
    *& Form transfer_file
    text
    -->P_P_FILE text
    form transfer_file using p_p_file.
    data: l_message(30) type c.
    ***opening dataset for reading
    open dataset p_p_file for input in text mode encoding default message
    l_message.
    if sy-subrc ne 0.
    message i001(zerr2) with p_p_file.
    endif.
    *******transferring data from file to app server.
    do.
    read dataset p_p_file into it_lfa1.
    if sy-subrc = 0.
    append it_lfa1.
    clear it_lfa1.
    else.
    exit.
    endif.
    enddo.
    *******closing dataset
    close dataset p_p_file.
    endform. " transfer_file
    *& Form write
    text
    --> p1 text
    <-- p2 text
    form write .
    loop at it_lfa1.
    write:/ it_lfa1-vendor,
    it_lfa1-land1,
    it_lfa1-name1,
    it_lfa1-ort01.
    endloop.
    endform. " write
    Please check this link also for sample code.
    http://www.sapdevelopment.co.uk/file/file_uptabsap.htm
    Plz reward points if useful....
    Regards,
    Mandeep.

  • Lsmw for sales order upload

    Dear Friends,
                 I am trying to upload sales order data using transaction VA01 by Batch Input Recording method in LSMW. But I am not able to get line items due to the fact that I am not able to assign two source structures. So i am trying to upload by Abap Coding in LSMW. But still I am not able to get the Item Data. So Kindly help me in this.
    With Regards,
    H.Krishnan

    use the first method (Direct Input)
    Object : 0090  (Sales)
    Method : 0000
    Programname: RVINVB10
    In structure relations u can find header and line itemas.
    before that define 2 structures.
    ===================================================
    After creattion of one structure..
    again click on create button> now it will ask samelevel/lowerlevel..give ur option>then u can add the fields in the next step.
    pls.reward if it helps u and close this thread
    Thanks
    Eswar
    Message was edited by: Eswar Kanakanti

  • Two questions about the query and lsmw .

    Hi Experts ,
    Could you tell me how to download the query to local driver ? is it possible to do that ?
    I hear somebody introduce lsmw this t-code . it can transfer the data from non-sap/r3 system ? has somebody can fully expain this t-code ?
    Many thanks !!!
    Best Regards,
    Carlos Z

    Hi,
          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.
    Regards

  • ECATT vs LSMW

    Dear Gurus
    could pls tell me the difference between eCATT Vs LSMW, because both are uploading the master file is it any difference in that.
    regards
    mohammed renu

    hi,
    LSMW-
    The LSM Workbench is an R/3-based tool that supports you when transferring data from non-SAP systems ("Legacy Systems") to R/3 once or periodically.
    The tool supports conversion of data of the legacy system in a convenient way. The data can then be imported into the R/3 system via
    1. Batch input.
    2. Direct input.
    3. BAPIs or IDocs.
    The LSM Workbench was developed on the basis of the following principles:
    1. Most of the functions should reside in R/3. No collection of individual programs on different platforms.
    2. The quality and consistence of the data imported into R/3 should be more important than speed and performance of data migration.
    3. Existing knowledge and coding should be used.
    4. The developed "mapping" and rules should be reusable and thus be used repeatedly in projects.
    The main functions of the LSM Workbench are:
    1. Import data (legacy data in spreadsheet tables and/or sequential files)
    2. Convert data (from source format to target format)
    3. Import data (into the database of the R/3 application)
    The following items should be considered:
    1. Make sure that R/3 customizing is finished.
    2. Determine the data contained in your legacy system and which of the data will be required in the future (with respect to business operation).
    3. Decide whether it makes sense to use this tool with respect to the data volume to be transferred.
    Preconditions
    1. Identify the transaction(s) in R/3 via which you want to import the data into your SAP system.
    2. Map the fields in advance in written form: Assign the source fields to the target fields.
    3. Determine the form in which non-SAP data will be transferred into the SAP system (e.g. via "Move" or according to a rule).
    4. In which way will the data be extracted from the non-SAP system? Note: The LSMW does not extract data.
    5. In which form is the legacy data available? Determine accordingly which of the LSMW functions will be applied.
    CATT-
    1. What CATT does is record you performing the actual transaction once.
    2. You then identify the fields that you wish to change in that view.
    3. Then export this data to a spreadsheet to populate with the data required.
    4. This is uploaded and executed saving you keying in the data manually.
    5. To perform CATT, it has to be enabled in your production environment (your systems administrator should be able to do this - SCC4).
    6. You will also need access to your development system to create the CATT script.
    The use of CATT is for bulk uploading of data.  Although CATT is primarily a testing tool, it can be used for the mass upload of data.  The way CATT works is like a real user actually inputting on the SAP screen.  You prepare a set of data that are required to be input into the system and execute what you called a Test Case and CATT will do the boring task of keying for you.
    regards
    bhaskar

  • LSMW to upload Business Partner through IDOC

    Hello,
    I have requirement to upload Business partner  through IDOC. I am using below message type and IDOC type.
    1:- Message Type :- CRMXIF_PARTNER_SAVE_M
    2:- Basic Type :- CRMXIF_PARTNER_SAVE_M02
    Could you please tell me what configuration I need to do for this? Like creating partner profile, port etc
    Also I need to extend this IDOC segment to take care of my Z fields.
    After extending the IDOC segment do I need to write code in order to update this Z filed or it will be take care and also how to extend existing IDOC.
    If any one have has done this before then please share the logic.
    Kindly help.
    Regards
    Sachin

    Hi,
    Try LSMW with the IDOC method.
    Message type: BUPAFS_FS_CREATE_FRM_DATA2
    Basic type: BUPAFS_FS_CREATE_FRM_DATA201
    You will need to setting for IDOC: port, partner type, etc.
    Manish

  • LSMW - Logical Path for PIR

    I am working on creating LSMW - sample conversion for PIR. I struck up in the u201CSpecify filesu201D step by creating Logical Path.
    Step  1 : I have done it thru T.Code : FILE  in  that first by creating Logical File path.
    Step 2 : Assignment of Physical Paths to Logical Path
    I have maintained Syntax Group as WINDOWS NT and given the Physical path as C:\TEMP\<FILENAME>
    Step 3 : Logical File Name Definition , Cross Client
    I have maintained Logical File, Name, Physical File , Data Format ,App Area , Logical Path.
    After maintaining I am getting the error message u201C LOGICAL PATH PUR_INFO_RECORD DOES NOT EXISTu201D.
    Please help me out to solve this issue.
    Thanks & Regards,
    Mani

    specific to LSMW there is OSS note 753511 that describes what to do.
    If you have authority for x-client customizing then you can directly type a name for logical path and file name
    e.g. LSMWLOGPATH and LSMWLOGFILE, hit enter and LSMW will create the logical path and file name for you.and you dont need to do it with transaction FILE.
    Go into the step "Specify files".
    place cursor onto line "converted data"
    click change button.
    you get a pop-up with the logical path.
    Just hit enter and LSMW will create the path itself.

  • Requesting all to help me how to create lsmw using idoc method

    hi
    thanx for ur answer
    requesting every body in the forum to help me how to create lsmw using idoc method.
    regards,
    balaji

    Hi Balaji,
    LSMW using IDOC is similar to using flat file method. Here you are getting data from IDOC container and mapping data with Idoc segments insted of flatfile column.
    Hope this is what you are looking for. If helpful then don’t forget to reward me for that
    Darshan

  • Regarding Migrating data from Legacy to SAP

    Hi All,
    We are in Migration Project. We have to upload data from legacy to SAP, either using BDC or Cross-Applications in the following SD scenario's.
    1. Customer Master
    2. Inquiries
    3. Quotations
    4. Proposals
    5. Sales Order
    6. Goods Issue
    I would like to know, which concept is better for each of the above scenario. Each option have advantages and disadvantages. So, I need suggestion regarding this.
    Regards,
    Sathya.

    hi
    LSMW and BDC are vastly different.
    BDC (Batch Data Communication) is a technology used for data transfer. it is meant for transferring data thru SAP transactions itself. when u use BDC for data transfer, the sequence of steps is the same as when u use standard sap transaction screens for data upload. the only difference is that u can use different options for foreground/backgrou nd processing.
    LSMW on the other hand is a tool that helps migrate data from a legacy system (non-sap system ) to SAP system. it offers u various options to use either batch input, direct input, BAPIs or idocs. it involves a series of some 17-18 steps to migrate data.
    BDC:
    Batch Data Communication (BDC) is the process of transferring data from one SAP System to another SAP system or from a non-SAP system to SAP System.
    Features :
    BDC is an automatic procedure.
    This method is used to transfer large amount of data that is available in electronic medium.
    BDC can be used primarily when installing the SAP system and when transferring data from a legacy system (external system).
    BDC uses normal transaction codes to transfer data.
    Types of BDC :
    CLASSICAL BATCH INPUT (Session Method)
    CALL TRANSACTION
    BATCH INPUT METHOD:
    This method is also called as ‘CLASSICAL METHOD’.
    Features:
    Asynchronous processing.
    Synchronous Processing in database update.
    Transfer data for more than one transaction.
    Batch input processing log will be generated.
    During processing, no transaction is started until the previous transaction has been written to the database.
    CALL TRANSACTION METHOD :
    This is another method to transfer data from the legacy system.
    Features:
    Synchronous processing. The system performs a database commit immediately before and after the CALL TRANSACTION USING statement.
    Updating the database can be either synchronous or asynchronous. The program specifies the update type.
    Transfer data for a single transaction.
    Transfers data for a sequence of dialog screens.
    No batch input processing log is generated.
    LSMW:
    The LSM Workbench is an R/3-based tool that supports You when transferring data from non-SAP systems ("Legacy Systems") to R/3 once or periodically.
    The tool supports conversion of data of the legacy system in a convenient way. The data can then be imported into the R/3 system via batch input, direct input, BAPIs or IDocs.
    Furthermore, the LSM Workbench provides a recording function that allows to generate a "data migration object" in an entry or change transaction.
    The main advantages of the LSM Workbench:
    • Part of R/3 and thus independent of individual platforms
    • A variety of technical possibilities of data conversion:
    • Data consistency due to standard import techniques:
    Batch input
    Direct input
    BAPIs (Business Application Programming Interfaces)
    IDocs (Intermediate Documents)
    The import technique to be used in an individual case depends on the business object.
    • Generation of the conversion program on the basis of defined rules
    • Clear interactive process guide
    • Interface for data in spreadsheet format
    • Creation of data migration objects on the basis of recorded transactions
    • Charge-free for SAP customers and SAP partners
    also check this link:
    Diff. between LSMW & BDC
    Re: bdc and lsmw
    plz reward points if it helps
    rgds.

  • Infoset (coding in additional field added )

    Hi
    I need some help regarding coding for the additional fields added to the infoset.
    As a data source I have selected a direct read from table MARA. I need to display the description in all languages for the material chosen on the selection screen when the Query is executed in sq01.
    I could have used a join between MARA and MAKT, but instead I have chosen to add an additional field
    with the head 'material description' and coded the select for the material description as per matnr in the coding section.
    The basic list display, only dislays one description, the last one and not all the possible descriptions in all languages.
    What should be the probable code and where should i place that code for such an implementation.
    Please suggest.
    Smriti

    You can do loading of master data text for achieving the material descriptions.
    Regards

Maybe you are looking for