LSMW - Periodic Data Transfer - wildcards in filename

Hello,
I have the following problem: The file, which has to be periodically read in is specifed for identification date + time e.g. DATAFILE_200820071250.txt
In the step 'Specifiy Files ' I entered:
serverDATAFILE_*.txt.
In the step ' Frame Program for Periodic Data Transfer' I entered in 'Value for Wildcard (*)' the following interval: 0000000000000000 - 99999999999999999.
During execution now (as a job with variant or directly) I receive always the same error message (/SAPDMC/LSMW524): "Specified values for wildcard (*) have not been defined" .
How I have to define the filename with wildcard (*) of a file which is peridically read in by LSMW?????
Thanks for your help!
Atentamente le saluda / Mit freundlichen Grüssen / Yours sincerely
Nicole Miosga

Hi Nicole,
As of my knowledge the way u have assigned the file name is incorrect,
just check it once, and in SPECIFY FILES  there is values for wildcard ,
i want to know what u did here.
Thanks
Naveen khan

Similar Messages

  • Creat Job for LSMW (periodical data transfer)- idoc BLAORD

    Hi,
    We are trying to create job for LSMW (thru frame program for periodic data transfer) for idoc BLAORD (Purchasing contract)
    When I am running the job that I created, the job is cancelled and the error is:
    "Upload from front-end is not possible in batch mode.
    Message no. /SAPDMC/LSMW_OBJ_070 020"
    How can I correct that? so I will be able to run a job (the job mast run background?)
    Thanks,
    Tal Sasson

    Hello,
    I was also receiving the same message /SAPDMC/LSMW_OBJ_070 020 even though I specified in /SAPDMC/SAP_LSMW_INTERFACE the server path. The problem was that in LSMW->Specify Files you have to delete the definition of front-end files and define application server files.
    That Flag File (Path and Name) (field /SAPDMC/LSOINP-FILENAME in program /SAPDMC/SAP_LSMW_INTERFACE) is kind of useless since it is ignored anyway and files defined in LSMW object are imported and they have to be read anyway if you use more than one file.
    Regards,
    Peter

  • Advantages of using BAPI over LSMW for data transfer

    Hellow,
    Can anybody please give an input for advantages of using BAPIs in data transfer compare to LSMW. If we use BAPI for data transfer of master and transaction data how it is more usefull compare to LSMWs developed.
    Thanks in advance
    Raghav

    Hi Raghavendra,
    Refer the links..may help.....
    [http://www.*******************/search?q=BAPIandLSMW+comparision]
    [http://www.*******************/search?q=bapi]
    Regards,
    Mdi.Deeba

  • Data transfer thru lsmw via bapi

    how to perform data transfer thru lsmw via bapi.
    Thanks.
    Regards
    Rama

    HI
    BAPI stands for Business API(Application Program Interface).
    A BAPI is remotely enabled function module ie it can be invoked from remote programs like standalone JAVA programs, web interface etc..
    You can make your function module remotely enabled in attributes of Function module but
    A BAPI are standard SAP function modules provided by SAP for remote access. Also they are part of Businees Objest Repository(BOR).
    BAPI are RFC enabled function modules. the difference between RFc and BAPI are business objects. You create business objects and those are then registered in your BOR (Business Object Repository) which can be accessed outside the SAP system by using some other applications (Non-SAP) such as VB or JAVA. in this case u only specify the business object and its method from external system in BAPI there is no direct system call. while RFC are direct system call Some BAPIs provide basic functions and can be used for most SAP business object types. These BAPIs should be implemented the same for all business object types. Standardized BAPIs are easier to use and prevent users having to deal with a number of different BAPIs. Whenever possible, a standardized BAPI must be used in preference to an individual BAPI.
    The following standardized BAPIs are provided:
    Reading instances of SAP business objects
    GetList ( ) With the BAPI GetList you can select a range of object key values, for example, company codes and material numbers.
    The BAPI GetList() is a class method.
    GetDetail() With the BAPI GetDetail() the details of an instance of a business object type are retrieved and returned to the calling program. The instance is identified via its key. The BAPI GetDetail() is an instance method. BAPIs that can create, change or delete instances of a business object type
    The following BAPIs of the same object type have to be programmed so that they can be called several times within one transaction. For example, if, after sales order 1 has been created, a second sales order 2 is created in the same transaction, the second BAPI call must not affect the consistency of the sales order 2. After completing the transaction with a COMMIT WORK, both the orders are saved consistently in the database.
    Create( ) and CreateFromData! ( )
    The BAPIs Create() and CreateFromData() create an instance of an SAP business object type, for example, a purchase order. These BAPIs are class methods.
    Change( )
    The BAPI Change() changes an existing instance of an SAP business object type, for example, a purchase order. The BAPI Change () is an instance method.
    Delete( ) and Undelete( ) The BAPI Delete() deletes an instance of an SAP business object type from the database or sets a deletion flag.
    The BAPI Undelete() removes a deletion flag. These BAPIs are instance methods.
    Cancel ( ) Unlike the BAPI Delete(), the BAPI Cancel() cancels an instance of a business object type. The instance to be cancelled remains in the database and an additional instance is created and this is the one that is actually canceled. The Cancel() BAPI is an instance method.
    Add<subobject> ( ) and Remove<subobject> ( ) The BAPI Add<subobject> adds a subobject to an existing object inst! ance and the BAPI and Remove<subobject> removes a subobject from an object instance. These BAPIs are instance methods.
    BAPI-step by step
    http://www.sapgenie.com/abap/bapi/example.htm
    list of all bapis
    http://www.planetsap.com/LIST_ALL_BAPIs.htm
    for BAPI's
    http://www.sappoint.com/abap/bapiintro.pdf
    http://www.sappoint.com/abap/bapiprg.pdf
    http://www.sappoint.com/abap/bapiactx.pdf
    http://www.sappoint.com/abap/bapilst.pdf
    http://www.sappoint.com/abap/bapiexer.pdf
    http://service.sap.com/ale
    http://service.sap.com/bapi
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
    http://www.planetsap.com/Bapi_main_page.htm
    http://www.topxml.com/sap/sap_idoc_xml.asp
    http://www.sapdevelopment.co.uk/
    http://www.sapdevelopment.co.uk/java/jco/bapi_jco.pdf
    Also refer to the following links..
    www.sappoint.com/abap/bapiintro.pdf
    www.sap-img.com/bapi.htm
    www.sap-img.com/abap/bapi-conventions.htm
    www.planetsap.com/Bapi_main_page.htm
    www.sapgenie.com/abap/bapi/index.htm
    Checkout !!
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    http://techrepublic.com.com/5100-6329-1051160.html#
    http://www.sap-img.com/bapi.htm
    http://www.sap-img.com/abap/bapi-conventions.htm
    http://www.sappoint.com/abap/bapiintro.pdf
    u can check the below the material also
    Example Code
    U need to give the step_nr, item_nr, cond_count and cond_type so the correct conditon will be updated. If no condition exists for the given parameters, a new condition will be created.
    U can find these parameters for a particular condition type in table KONV.
    *& Form saveTransactionJOCR
    text
    --> p1 text
    <-- p2 text
    FORM saveTransactionJOCR .
    data: salesdocument like BAPIVBELN-VBELN,
    order_header_inx like bapisdh1x,
    order_header_in like bapisdh1,
    return type standard table of bapiret2 with header line,
    conditions_in type standard table of bapicond with header line,
    conditions_inx type standard table of bapicondx with header line,
    logic_switch like BAPISDLS,
    step_nr like conditions_in-cond_st_no,
    item_nr like conditions_in-itm_number,
    cond_count like conditions_in-cond_count,
    cond_type like conditions_in-cond_type.
    salesdocument = wa_order_information-VBELN.
    LOGIC_SWITCH-COND_HANDL = 'X'.
    order_header_inx-updateflag = 'U'.
    conditions
    clear conditions_in[].
    clear conditions_inx[].
    clear: step_nr,
    item_nr,
    cond_count,
    cond_type.
    step_nr = '710'.
    item_nr = '000000'.
    cond_count = '01'.
    cond_type = 'ZCP2'.
    CONDITIONS_IN-ITM_NUMBER = item_nr.
    conditions_in-cond_st_no = step_nr.
    CONDITIONS_IN-COND_COUNT = cond_count.
    CONDITIONS_IN-COND_TYPE = cond_type.
    CONDITIONS_IN-COND_VALUE = 666.
    CONDITIONS_IN-CURRENCY = 'EUR'.
    append conditions_in.
    CONDITIONS_INX-ITM_NUMBER = item_nr.
    conditions_inx-cond_st_no = step_nr.
    CONDITIONS_INX-COND_COUNT = cond_count.
    CONDITIONS_INX-COND_TYPE = cond_type.
    CONDITIONS_INX-UPDATEFLAG = 'U'.
    CONDITIONS_INX-COND_VALUE = 'X'.
    CONDITIONS_INX-CURRENCY = 'X'.
    append conditions_inx.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
    EXPORTING
    SALESDOCUMENT = salesdocument
    ORDER_HEADER_IN = order_header_in
    ORDER_HEADER_INX = order_header_inx
    LOGIC_SWITCH = logic_switch
    TABLES
    RETURN = return
    CONDITIONS_IN = conditions_in
    CONDITIONS_INX = conditions_inx
    if return-type ne 'E'.
    commit work and wait.
    endif.
    ENDFORM. " saveTransactionJOCR
    Bdc to Bapi
    The steps to be followed are :
    1. Find out the relevant BAPI (BAPI_SALESORDER_CHANGE for VA02).
    [for VA01 use BAPI_SALESORDER_CREATEFROMDAT2]
    2. Create a Z program and call the BAPi (same as a Funtion module call).
    2. Now, if you see this BAPi, it has
    -> Importing structures.
    eg: SALESDOCUMENT: this will take the Sales order header data as input.
    -> Tables parameters:
    eg: ORDER_ITEM_IN: this will take the line item data as input.
    Note :
    Only specify fields that should be changed
    Select these fields by entering an X in the checkboxes
    Enter a U in the UPDATEFLAG field
    Always specify key fields when changing the data, including in the checkboxes
    The configuration is an exception here. If this needs to be changed, you need to complete it again fully.
    Maintain quantities and dates in the schedule line data
    Possible UPDATEFLAGS:
    U = change
    D = delete
    I = add
    Example
    1. Delete the whole order
    2. Delete order items
    3. Change the order
    4. Change the configuration
    Notes
    1. Minimum entry:
    You must enter the order number in the SALESDOCUMENT structure.
    You must always enter key fields for changes.
    You must always specify the update indicator in the ORDER_HEADER_INX.
    2. Commit control:
    The BAPI does not run a database Commit, which means that the application must trigger the Commit so that the changes are read to the database. To do this, use the BAPI_TRANSACTION_COMMIT BAPI.
    For further details... refer to the Function Module documentation for the BAPi.
    Bapi to VB(Visual Basic)
    Long back I had used the following flow structure to acheive the same.
    Report -> SM59 RFC destination -> COM4ABAP -> VB.exe
    my report uses the rfc destination to create a COM session with com4abap. com4abap calls the vb.exe and manages the flow of data between sap and vb exe.
    You need to have com4abap.exe
    If com4abap is installed you will find it in sapgui installatin directory , C:\Program Files\SAPpc\sapgui\RFCSDK\com4abap.
    else refer OSS note 419822 for installation of com4abap
    after making the settings in com4abap to point to the vb program and setting up rfc destination in sm59 to point to com4abap session , you can use the following function modules to call the vb code.
    for setting up com4abap and rfc destination please refer to the documentation for com4abap.
    Invoke NEW DCOM session
    call function 'BEGIN_COM_SESSION'
    exporting
    service_dest = service_dest "(this will be a RFC destination created in SM59)
    importing
    worker_dest = worker_dest
    exceptions
    connect_to_dcom_service_failed = 1
    connect_to_dcom_worker_failed = 2
    others = 3.
    call function 'create_com_instance' destination worker_dest
    exporting
    clsid = g_c_clsid
    typelib = g_c_typelib
    importing
    instid = g_f_oid
    exceptions
    communication_failure = 1 message g_f_msg
    system_failure = 2 message g_f_msg
    invalid_instance_id = 3
    others = 4.
    call function 'com_invoke' destination worker_dest
    exporting
    %instid = g_f_oid
    %method = 'UpdatePDF'
    sntemp = g_v_const_filent
    snsysid = sy-sysid
    snflag = 'N'
    tables
    rssaptable = g_t_pdfdetail1
    %return = g_t_pdfdetail1 "t_test
    exceptions
    communication_failure = 1 message g_f_msg
    system_failure = 2 message g_f_msg
    invalid_instance_id = 3
    others = 4.
    then close the com session , using
    FM delete_com_instance
    FM END_COM_SESSION
    http://help.sap.com/saphelp_nw2004s/helpdata/en/7e/5e114a4a1611d1894c0000e829fbbd/frameset.htm
    http://www.sapgenie.com/abap/bapi/example.htm
    http://help.sap.com/saphelp_46c/helpdata/en/9b/417f07ee2211d1ad14080009b0fb56/frameset.htm
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    http://techrepublic.com.com/5100-6329-1051160.html#
    http://www.sap-img.com/bapi.htm
    http://www.sap-img.com/abap/bapi-conventions.htm
    http://www.sappoint.com/abap/bapiintro.pdf
    http://www.sapgenie.com/abap/bapi/example.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
    http://techrepublic.com.com/5100-6329-1051160.html#
    http://www.sap-img.com/bapi.htm
    http://www.sap-img.com/abap/bapi-conventions.htm
    http://www.sappoint.com/abap/bapiintro.pdf
    BAPI - BAPIs (Business Application Programming Interfaces) are the standard SAP interfaces. They play an important role in the technical integration and in the exchange of business data between SAP components, and between SAP and non-SAP components. BAPIs enable you to integrate these components and are therefore an important part of developing integration scenarios where multiple components are connected to each other, either on a local network or on the Internet.
    BAPIs allow integration at the business level, not the technical level. This provides for greater stability of the linkage and independence from the underlying communication technology.
    LSMW- No ABAP effort are required for the SAP data migration. However, effort are required to map the data into the structure according to the pre-determined format as specified by the pre-written ABAP upload program of the LSMW.
    The Legacy System Migration Workbench (LSMW) is a tool recommended by SAP that you can use to transfer data once only or periodically from legacy systems into an R/3 System.
    More and more medium-sized firms are implementing SAP solutions, and many of them have their legacy data in desktop programs. In this case, the data is exported in a format that can be read by PC spreadsheet systems. As a result, the data transfer is mere child's play: Simply enter the field names in the first line of the table, and the LSM Workbench's import routine automatically generates the input file for your conversion program.
    The LSM Workbench lets you check the data for migration against the current settings of your customizing. The check is performed after the data migration, but before the update in your database.
    So although it was designed for uploading of legacy data it is not restricted to this use.
    We use it for mass changes, i.e. uploading new/replacement data and it is great, but there are limits on its functionality, depending on the complexity of the transaction you are trying to replicate.
    The SAP transaction code is 'LSMW' for SAP version 4.6x.
    Check your procedure using this Links.
    BAPI with LSMW
    http://esnips.com/doc/ef04c89f-f3a2-473c-beee-6db5bb3dbb0e/LSMW-with-BAPI
    For document on using BAPI with LSMW, I suggest you to visit:
    http://www.****************/Tutorials/LSMW/BAPIinLSMW/BL1.htm
    What are the methods to migrate data from a legacy system to SAP?
    LSMW is used for migrating data from a legacy system to SAP system, or from one SAP system to another.
    Apart from standard batch/direct input and recordings, BAPI and IDocs are available as additional import methods for processing the legacy data.
    The LSMW comprises the following main steps:
    Read data (legacy data in spreadsheet tables and/or sequential files).
    Convert data (from the source into the target format).
    Import data (to the database used by the R/3 application.
    But, before these steps, you need to perform following steps :
    Define source structure : structure of data in the source file.
    Define target structure : structure of SAP that receives data.
    Field mapping: Mapping between the source and target structure with conversions, if any.
    Specify file: location of the source file
    Of all the methods used for data migration like BDC, LSMW , Call Transaction which one is used most of the time?
    How is the decision made which method should be followed? What is the procedure followed for this analysis?
    All the 3 methods are used to migrate data. Selection of these methods depends on the scenario, amount of data need to transfer. LSMW is a ready tool provided by SAP and you have to follow some 17 steps to migrate master data. While in BDCs Session method is the better choice because of some advantages over call transaction. But call transaction is also very useful to do immediate updation of small amout of data. (In call transaction developer has to handle errors).
    SO Bottom line is make choice of these methods based of real time requirements.
    These methods are chosen completely based on situation you are in. Direct input method is not available for all scenario, else, they are the simplest ones. In batch input method ,you need to do recording for the transaction concerned. Similarly, IDoc, and BAPI are there, and use of these need to be decided based on the requirement.
    Try to go through the some material on these four methods, and implement them. You will then have a fair idea about when to use which
    You can create lsmw for data migration as follows (using session method):
    Example for xk01 (create vendor)
    Initially there will be 20 steps but after processing 1 step it will reduced to 14 for session method.
    1. TCode : LSMW.
    2. Enter Project name, sub project name and object name.
    Execute.
    3. Maintain object attributes.
    Execute
    select Batch Input recording
    goto->Recording overview
    create
    recording name.
    enter transaction code.
    start recording
    do recording as per ur choice.
    save + back.
    enter recording name in lsmw screen.
    save + back
    Now there will be 14 steps.
    2. MAINTAIN SOURCE STRUCTURES.
    Here you have to enter the name of internal table.
    display change
    create
    save + back
    3. MAINTAIN SOURCE FIELDS.
    display change
    select structure
    source_fields->copy fields.
    a dialogue window will come .
    select -> from data file
    apply source fields
    enter No. of fields
    length of fields
    attach file
    save + back
    4. MAINTAIN STRUCTURE RELATIONS
    display change
    save + back
    5. MAINTAN FIELD MAPPING & CONVERSION RULE
    display change
    click on source field, select exact field from structue and enter
    repeat these steps for all fields.
    save+back
    6. MAINTAIN FIXED VALUES, TRANSACTION, USER DEFINED
    execute
    save + back
    7. SPECIFY FILES.
    display change
    click on legacy data
    attah flat file
    give description
    select tabulatore
    enter
    save + back
    8. ASSIGN FILE
    execute
    display change
    save + back
    9. IMPORT DATA.
    execute
    display change
    save + back
    10. DISPLAY IMPORTED DATA
    enter ok, it willl show records only.
    back
    11. CONVERT DATA
    execute
    display change
    save + back
    12. DISPLAY CONVERTED DATA
    execute
    display change
    save + back
    13. CREATE BATCH INPUT SESSION
    tick keep batch input folder
    F8
    back
    14. RUN BATCH INPUT SESSION.
    sm35 will come
    Object name will be shown here
    select object & process
    Regards
    Pavan

  • N95 8GB reboots periodically in data transfer mode

    I have a new N95 8GB running firmware v20. Unfortunately, when I use the genuine USB cable and select "Data Transfer Mode" the phone reboots 60 seconds after I connect the cable (and thereafter each 60 seconds when I don't touch the phone).
    I have tried with a non-genuine cable and the behaviour is the same.
    Coincidentally the "Power Save Time-out" is set to 60 seconds. When I change this to another value, say 40 seconds, then the above rebooting happens every 40 seconds.
    This appears to be a phone bug and makes it extremely difficult to use data transfer mode, unless you can transfer files within the power save time-out period, or unless you are prepared to press a button on the phone within this period.
    **Nokia please fix this**
    See related post: /discussions/board/message?board.id=smartphones&thread.id=81967&view=by_date_ascending&page=1

    Well,rotateme works perfectly for me and i have a n95 8gb too.So there are two things that might happening.
    1.You are doing something wrong with the whole installation(does rotateme works when you install it?)
    2.You downloaded your self a corrapted or somekind of a virus or a bug .sis file and installed it to your phone.
    Why dont you try to download one other rotateme file for you?You can find plenty rotateme from a lot of users.I can send you mine,if you want send me an e-mail and i`ll send to you the .sis file that i used and as i said,it works fine for me.
    Peace
    Message Edited by noslien on 06-Feb-2008 07:47 AM
    Eykleidis

  • Periodic Data Trasfer using LSMW

    Dear All,
    How to do periodic Data trasfer using LSMW?
    For this, is it necessary to use File from Application Server only (& not from PC)?
    How the Last Extra Step will be processed?
    Please help.
    Thanks in advance.
    Kind Regards,
    Prasad

    Hi,
      refer
    https://forums.sdn.sap.com/click.jspa?searchID=10949951&messageID=5211212
    Regards
    Kiran Sure

  • Data Transfer using LSMW IDOC processing with multiple segments

    we need to post the document data (Header structure, BP item structure, G/L item structure..etc) using LSMW IDOC processing.
    is it possible to transfer data for all these structures (Segments) in single file?

    Thanks for the reply.
    I am assuming when we are specifying the file in LSMW we are going to give the option to generate the file with include all structures.
    could you please elaborate further is there any thing specific we need to do while configuring LSMW to get the file for all segments in the IDOC with field names which we are going to populate with data, so that we can use it for data transfer.
    any help document will  be helpful.

  • Different methods of data transfer in LSMW?v

    Different methods of data transfer in LSMW?v
    could u plz explain clearly

    please visit the following link
    https://wiki.sdn.sap.com/wiki/display/HOME/LSMW                                        
    http://www.scmexpertonline.com/downloads/SCM_LSMW_StepsOnWeb.doc                                        
    There are four method!
    1-Direct Input Method
    2-BDC
    3-BAPI
    4-IDOC
    Please reward me point as way of thanks

  • Data Transfer Workbech - XML File

    Hi,
    I pretend use the Task Scheduler for importation data to the SAP Business One System. For this, I created a batch file with information:
    cd "C:\Program Files (x86)\SAP\Data Transfer Workbench"
    DTW -S C:\Temp\DTW_ScheduleItemImport.xml
    Also, I exported for xml file the data to import in the system through Data Transfer Workbench. The content of xml file is:
    <DTW><BOM><BO><AdmInfo><Object>13</Object><Version>2</Version></AdmInfo><Documents><row><CardCode>C1001</CardCode><DocDate>20050223</DocDate><DocDueDate>20050223</DocDueDate><Series>1000</Series><TaxDate>20050223</TaxDate></row></Documents><Document_Lines><row><ItemCode>A1008</ItemCode><Price>8</Price><Quantity>2</Quantity><WarehouseCode>01</WarehouseCode></row></Document_Lines></BO></BOM></DTW>
    When I schedule a task in Task Scheduler runs the same but the data are not imported.
    I believe that not import due to the fact that in the XML file will not be exported data on BD certified in Data Transfer Workbench.
    Anyone help me?
    Thanks.
    Sandra Pereira

    Hello Sandra,
    I trust you.
    >The objective this process is to schedule of importing data into the system using the mapping in xml, right?
    Yes, and all the login information, file information, etc. the filename should be the same each time to import the data.
    Maybe you are using older version of DTW than it knows.  You may try to upgrade to the latest DTW, or at least B1 2007 SP 01 version (i have DTW 2005.0.30)
    my xml file looks like
    <Transfer>
    - <Logon>
      <UserName>manager</UserName>
      <Password>tCmKcJvLfKqJ</Password>
      <Company>FRMARPSAPHU</Company>
      <Server>(local)sqlexpress</Server>
      <UserAuthentication>True</UserAuthentication>
      <Language></Language>
      <LicenseServer></LicenseServer>
      <ChooseDB>False</ChooseDB>
      <DBType>4</DBType>
      <DBUser></DBUser>
      <SybasePort></SybasePort>
      <DBPassword></DBPassword>
      </Logon>
      <ObjectCode>oItems</ObjectCode>
    - <FileExtractor>
    - <Extorlogin>
      <ExID></ExID>
      <ExDSN></ExDSN>
      </Extorlogin>
      <FilesTypes>2</FilesTypes>
    - <Files>
      <Items>C:SBOProjectsBio-RAD2010Service Implementationitems.txt</Items>
      </Files>
      </FileExtractor>
    etc
    Regards
    János

  • Data transfer method

    Hai gurus,
    I am new to Abap field.
    Kindly confirm whether i had to use LSMW or BDC for the following data transfer.
    Production and Planning:
    1) Bill of material creation-
    2) Recipe creation-
    3) Resource creation-
    Quality Control.
    1) Quality plan
    2) Quality sampling procedure.
    3) Quality info record.
    4) Master Inspection Characteristics.
    5) List of material with inspection status
    6) Inspection Method.
    7) Sampling plan
    waiting for the positive reply.
    Regards,
    sc

    Hi Sekar,
    If you have huge number of records & the process is onetime process, you can go for LSMW, no ABAP knowledge is required for this.
    Hope this helps.
    Rdgs,
    Sripal

  • Possible network issues preventing successful application data transfer?

    Hello all.
    We are having a few issues with a specific set up here at work involving Oracle 11, and Oracle 9 databases and I was hoping someone with a fair idea of how Oracle configurations work when it comes to network connectivity and data transfer would mind sharing their opinion on the matter.
    First off, a bit of background. I'm a network security engineer by trade and my experience when it comes to the application side of things, specifically databases is inherently weak; so I apologise if my terminology or logic is slightly off here.
    Basically what I'm trying to determine is where a fault lies between our users using a terminal server and a remote Oracle SQL database that should service their requests.
    The problem lies wherein the user will utilise the 'sqlplus' application invoked from a Windows command prompt window, and expect to be able login and query a database. I believe we have two versions available to use, version 9 which is not actually in production but able to be used for testing and version 11 which is active in production.
    When accessing Oracle 11 servers will hang where we expect to see a successful connection followed by a healthy looking "SQL>" prompt data transfer appears to stall as follows:
    C:\>sqlplus username/[email protected]
    SQL*Plus: Release 10.2.0.1.0 - Production on Wed Sep 22 18:12:17 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    *hangs here*If we try on the Oracle 9 setup things look fine initially:
    C:\>sqlplus username/[email protected]
    SQL*Plus: Release 10.2.0.1.0 - Production on Wed Sep 22 18:19:20 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.6.0 - ProductionHowever once connected to the Oracle 9 box; if we run a query similar to:
    sqlplus username/[email protected]
    select * from <database> where rownum < 10;This will again hang.
    That said however, if we try and run a query similar to:
    sqlplus username/[email protected]
    select * from <database> where rownum < 5;This will return 4 rows of usable data, without issue.
    Our systems engineer provided me with a SQLNET trace from the server side and believes he's identified where it occurs:
    [21-SEP-2010 16:06:42:989] nsdo: entry
    [21-SEP-2010 16:06:42:989] nsdo: cid=0, opcode=85, *bl=0, *what=0, uflgs=0x0, cflgs=0x3
    [21-SEP-2010 16:06:42:989] nsdo: rank=64, nsctxrnk=0
    [21-SEP-2010 16:06:42:990] nsdo: nsctx: state=8, flg=0x420c, mvd=0
    [21-SEP-2010 16:06:42:990] nsdo: gtn=156, gtc=156, ptn=10, ptc=2011
    [21-SEP-2010 16:06:42:990] nsdo: switching to application buffer
    [21-SEP-2010 16:06:42:990] nsrdr: entry
    [21-SEP-2010 16:06:42:990] nsrdr: recving a packet
    [21-SEP-2010 16:06:42:990] nsprecv: entry
    [21-SEP-2010 16:06:42:990] nsprecv: reading from transport...
    [21-SEP-2010 16:06:42:990] nttrd: entry
    #    HANG OCCURS HERE
    [21-SEP-2010 16:10:13:347] ntt2err: entry
    [21-SEP-2010 16:10:13:347] ntt2err: soc 25 error - operation=5, ntresnt[0]=517, ntresnt[1]=131, ntresnt[2]=0
    [21-SEP-2010 16:10:13:347] ntt2err: exit
    [21-SEP-2010 16:10:13:347] nttrd: exit
    [21-SEP-2010 16:10:13:347] nsprecv: transport read error
    [21-SEP-2010 16:10:13:347] nsprecv: error exit
    [21-SEP-2010 16:10:13:347] nserror: entry
    [21-SEP-2010 16:10:13:347] nserror: nsres: id=0, op=68, ns=12547, ns2=12560; nt[0]=517, nt[1]=131, nt[2]=0; ora[0]=0, ora[1]=0, ora[2]=0
    [21-SEP-2010 16:10:13:348] nsrdr: error exit
    [21-SEP-2010 16:10:13:348] nsdo: nsctxrnk=0
    [21-SEP-2010 16:10:13:348] nsdo: error exit
    [21-SEP-2010 16:10:13:348] nioqrc:  wanted 1 got 0, type 0
    [21-SEP-2010 16:10:13:348] nioqper:  error from nioqrc
    [21-SEP-2010 16:10:13:348] nioqper:    nr err code: 0
    [21-SEP-2010 16:10:13:348] nioqper:    ns main err code: 12547
    [21-SEP-2010 16:10:13:348] nioqper:    ns (2)  err code: 12560
    [21-SEP-2010 16:10:13:348] nioqper:    nt main err code: 517
    [21-SEP-2010 16:10:13:348] nioqper:    nt (2)  err code: 131
    [21-SEP-2010 16:10:13:349] nioqper:    nt OS   err code: 0
    [21-SEP-2010 16:10:13:349] nioqer: entry
    [21-SEP-2010 16:10:13:349] nioqer:  incoming err = 12151
    [21-SEP-2010 16:10:13:349] nioqce: entry
    [21-SEP-2010 16:10:13:349] nioqce: exit
    [21-SEP-2010 16:10:13:349] nioqer:  returning err = 3113
    [21-SEP-2010 16:10:13:349] nioqer: exit
    [21-SEP-2010 16:10:13:349] nioqrc: exit
    [21-SEP-2010 16:10:13:349] nioqds: entry
    [21-SEP-2010 16:10:13:349] nioqds:  disconnecting...
    [21-SEP-2010 16:10:13:349] nsdo: entry
    [21-SEP-2010 16:10:13:349] nsdo: cid=0, opcode=67, *bl=0, *what=1, uflgs=0x2, cflgs=0x3
    [21-SEP-2010 16:10:13:350] nsdo: rank=64, nsctxrnk=0
    [21-SEP-2010 16:10:13:350] nsdo: nsctx: state=1, flg=0x420c, mvd=0
    [21-SEP-2010 16:10:13:350] nsdo: nsctxrnk=0
    [21-SEP-2010 16:10:13:350] nsdo: error exitFrom the client log side, it looks like this:
    [21-SEP-2010 16:06:42:886] nsdo: entry
    [21-SEP-2010 16:06:42:886] nsdo: cid=0, opcode=84, *bl=0, *what=1, uflgs=0x20, cflgs=0x3
    [21-SEP-2010 16:06:42:886] nsdo: rank=64, nsctxrnk=0
    [21-SEP-2010 16:06:42:886] nsdo: nsctx: state=8, flg=0x400d, mvd=0
    [21-SEP-2010 16:06:42:886] nsdo: gtn=127, gtc=127, ptn=10, ptc=2011
    [21-SEP-2010 16:06:42:886] nsdofls: entry
    [21-SEP-2010 16:06:42:886] nsdofls: DATA flags: 0x0
    [21-SEP-2010 16:06:42:886] nsdofls: sending NSPTDA packet
    [21-SEP-2010 16:06:42:886] nspsend: entry
    [21-SEP-2010 16:06:42:886] nspsend: plen=17, type=6
    [21-SEP-2010 16:06:42:886] nttwr: entry
    [21-SEP-2010 16:06:42:886] nttwr: socket 1724 had bytes written=17
    [21-SEP-2010 16:06:42:886] nttwr: exit
    [21-SEP-2010 16:06:42:886] nspsend: packet dump
    [21-SEP-2010 16:06:42:886] nspsend: 00 11 00 00 06 00 00 00  |........|
    [21-SEP-2010 16:06:42:886] nspsend: 00 00 03 05 1C 01 01 01  |........|
    [21-SEP-2010 16:06:42:886] nspsend: 0F                       |.       |
    [21-SEP-2010 16:06:42:886] nspsend: 17 bytes to transport
    [21-SEP-2010 16:06:42:886] nspsend: normal exit
    [21-SEP-2010 16:06:42:886] nsdofls: exit (0)
    [21-SEP-2010 16:06:42:886] nsdo: nsctxrnk=0
    [21-SEP-2010 16:06:42:886] nsdo: normal exit
    [21-SEP-2010 16:06:42:886] nsdo: entry
    [21-SEP-2010 16:06:42:886] nsdo: cid=0, opcode=85, *bl=0, *what=0, uflgs=0x0, cflgs=0x3
    [21-SEP-2010 16:06:42:886] nsdo: rank=64, nsctxrnk=0
    [21-SEP-2010 16:06:42:886] nsdo: nsctx: state=8, flg=0x400d, mvd=0
    [21-SEP-2010 16:06:42:886] nsdo: gtn=127, gtc=127, ptn=10, ptc=2011
    [21-SEP-2010 16:06:42:886] nsdo: switching to application buffer
    [21-SEP-2010 16:06:42:886] nsrdr: entry
    [21-SEP-2010 16:06:42:886] nsrdr: recving a packet
    [21-SEP-2010 16:06:42:886] nsprecv: entry
    [21-SEP-2010 16:06:42:886] nsprecv: reading from transport...
    [21-SEP-2010 16:06:42:886] nttrd: entry
    #    HANG OCCURS HERE
    #    Need to <CTRL C> twice to kill
    #I've tried searching the net for similar occurrences of some of the interesting looking trace data but there appears to be limited information available, none of which is terribly helpful.
    What I'm really after is either someone who has had this issue before, or someone who can better interpret the error output from the trace files and perhaps give me an idea of what's causing it to occur. Specifically whether that error text above relates to a failed connection on the underlying network connectivity side of things or whether it may be something on a higher level within the application layers. We have done packet dumps on firewalls to check the traffic as it traverses the firewall but there are no anomalies that I can see which may be contributing to the issue at hand.
    I have organised for some testing to occur within the next 24 hours as there is a Cisco ASA Firewall that sits in the network path that is performing inspection on packets travelling through it. The inspection for SQLNET specifically is disabled, but we intend to enable this once more for testing to see whether it makes a difference. I'm not entirely confident it will however, and until we do get a chance to test any constructive input or alternate ideas will be greatly appreciated. I'm trying to cover as many bases as possible here.
    Cheers,
    Josh.

    So some further testing doesn't show anything interesting. But that said here's a look at a TCP Dump for the Oracle 11 session that hangs:
    SNORT01:~ # tcpdump -nni bond0 -vvv vlan and host 125.x.x.x and host 172.x.x.x -c 10000
    tcpdump: WARNING: bond0: no IPv4 address assigned
    tcpdump: listening on bond0, link-type EN10MB (Ethernet), capture size 68 bytes
    21:55:43.781596 IP (tos 0x0, ttl 126, id 24439, offset 0, flags [DF], proto: TCP (6), length: 48) 125.x.x.x.62008 > 172.x.x.x.1521: S, cksum 0x4d0a (correct), 2416392635:2416392635(0) win 64512 <mss 1380,nop,nop,sackOK>
    21:55:43.782454 IP (tos 0x0, ttl  59, id 50281, offset 0, flags [DF], proto: TCP (6), length: 48) 172.x.x.x.1521 > 125.x.x.x.62008: S, cksum 0xc0ae (correct), 3123579836:3123579836(0) ack 2416392636 win 49680 <mss 1460,nop,nop,sackOK>
    21:55:43.783311 IP (tos 0x0, ttl 126, id 24440, offset 0, flags [DF], proto: TCP (6), length: 40) 125.x.x.x.62008 > 172.x.x.x.1521: ., cksum 0xb382 (correct), 1:1(0) ack 1 win 64512
    21:55:43.787142 IP (tos 0x0, ttl 126, id 24441, offset 0, flags [DF], proto: TCP (6), length: 284) 125.x.x.x.62008 > 172.x.x.x.1521: P 1:245(244) ack 1 win 64512
    21:55:43.788504 IP (tos 0x0, ttl  59, id 50282, offset 0, flags [DF], proto: TCP (6), length: 40) 172.x.x.x.1521 > 125.x.x.x.62008: ., cksum 0xed72 (correct), 1:1(0) ack 245 win 49436
    21:55:43.859023 IP (tos 0x0, ttl  59, id 50283, offset 0, flags [DF], proto: TCP (6), length: 48) 172.x.x.x.1521 > 125.x.x.x.62008: P, cksum 0xe166 (correct), 1:9(8) ack 245 win 49680
    21:55:43.860392 IP (tos 0x0, ttl 126, id 24445, offset 0, flags [DF], proto: TCP (6), length: 284) 125.x.x.x.62008 > 172.x.x.x.1521: P 245:489(244) ack 9 win 64504
    21:55:43.861773 IP (tos 0x0, ttl  59, id 50284, offset 0, flags [DF], proto: TCP (6), length: 40) 172.x.x.x.1521 > 125.x.x.x.62008: ., cksum 0xeb82 (correct), 9:9(0) ack 489 win 49680
    21:55:43.861908 IP (tos 0x0, ttl  59, id 50285, offset 0, flags [DF], proto: TCP (6), length: 72) 172.x.x.x.1521 > 125.x.x.x.62008: P 9:41(32) ack 489 win 49680
    21:55:43.865341 IP (tos 0x0, ttl 126, id 24446, offset 0, flags [DF], proto: TCP (6), length: 196) 125.x.x.x.62008 > 172.x.x.x.1521: P 489:645(156) ack 41 win 64472
    21:55:43.867017 IP (tos 0x0, ttl  59, id 50286, offset 0, flags [DF], proto: TCP (6), length: 167) 172.x.x.x.1521 > 125.x.x.x.62008: P 41:168(127) ack 645 win 49680
    21:55:43.874836 IP (tos 0x0, ttl 126, id 24447, offset 0, flags [DF], proto: TCP (6), length: 77) 125.x.x.x.62008 > 172.x.x.x.1521: P 645:682(37) ack 168 win 64345
    21:55:43.876405 IP (tos 0x0, ttl  59, id 50287, offset 0, flags [DF], proto: TCP (6), length: 226) 172.x.x.x.1521 > 125.x.x.x.62008: P 168:354(186) ack 682 win 49680
    21:55:43.995921 IP (tos 0x0, ttl 126, id 24451, offset 0, flags [DF], proto: TCP (6), length: 1420) 125.x.x.x.62008 > 172.x.x.x.1521: . 682:2062(1380) ack 354 win 64159
    21:55:43.995978 IP (tos 0x0, ttl 126, id 24452, offset 0, flags [DF], proto: TCP (6), length: 671) 125.x.x.x.62008 > 172.x.x.x.1521: P 2062:2693(631) ack 354 win 64159
    21:55:43.999910 IP (tos 0x0, ttl  59, id 50288, offset 0, flags [DF], proto: TCP (6), length: 40) 172.x.x.x.1521 > 125.x.x.x.62008: ., cksum 0xe18d (correct), 354:354(0) ack 2693 win 49680
    21:55:44.015402 IP (tos 0x0, ttl 126, id 24455, offset 0, flags [DF], proto: TCP (6), length: 326) 125.x.x.x.62008 > 172.x.x.x.1521: P 2693:2979(286) ack 354 win 64159
    21:55:44.020491 IP (tos 0x0, ttl  59, id 50289, offset 0, flags [DF], proto: TCP (6), length: 1420) 172.x.x.x.1521 > 125.x.x.x.62008: . 354:1734(1380) ack 2979 win 49680
    21:55:44.020789 IP (tos 0x0, ttl  59, id 50290, offset 0, flags [DF], proto: TCP (6), length: 671) 172.x.x.x.1521 > 125.x.x.x.62008: P 1734:2365(631) ack 2979 win 49680
    21:55:44.021015 IP (tos 0x0, ttl  59, id 50291, offset 0, flags [DF], proto: TCP (6), length: 355) 172.x.x.x.1521 > 125.x.x.x.62008: P 2365:2680(315) ack 2979 win 49680
    21:55:44.022489 IP (tos 0x0, ttl 126, id 24457, offset 0, flags [DF], proto: TCP (6), length: 40) 125.x.x.x.62008 > 172.x.x.x.1521: ., cksum 0x9ea4 (correct), 2979:2979(0) ack 2365 win 64512
    21:55:44.148236 IP (tos 0x0, ttl 126, id 24461, offset 0, flags [DF], proto: TCP (6), length: 215) 125.x.x.x.62008 > 172.x.x.x.1521: P 2979:3154(175) ack 2680 win 64197
    21:55:44.152125 IP (tos 0x0, ttl  59, id 50292, offset 0, flags [DF], proto: TCP (6), length: 187) 172.x.x.x.1521 > 125.x.x.x.62008: P 2680:2827(147) ack 3154 win 49680
    21:55:44.174040 IP (tos 0x0, ttl 126, id 24462, offset 0, flags [DF], proto: TCP (6), length: 1054) 125.x.x.x.62008 > 172.x.x.x.1521: P 3154:4168(1014) ack 2827 win 64050
    21:55:44.732635 IP (tos 0x0, ttl 126, id 24482, offset 0, flags [DF], proto: TCP (6), length: 1054) 125.x.x.x.62008 > 172.x.x.x.1521: P 3154:4168(1014) ack 2827 win 64050
    21:55:44.735346 IP (tos 0x0, ttl  59, id 50294, offset 0, flags [DF], proto: TCP (6), length: 40) 172.x.x.x.1521 > 125.x.x.x.62008: ., cksum 0xcefc (correct), 3632:3632(0) ack 4168 win 49680
    21:56:17.076742 IP (tos 0x0, ttl 126, id 25631, offset 0, flags [DF], proto: TCP (6), length: 40) 125.x.x.x.62008 > 172.x.x.x.1521: R, cksum 0x942e (correct), 4168:4168(0) ack 2827 win 0
    *SQL session hangs here*The 'RESET' occurs when I kill the client using CTRL+C after a long period of inactivity, not during the session itself.
    And then.. Here's a successful login and query of 7 rows on the Oracle 9 database from a network perspective:
    SNORT01:~ # tcpdump -nni bond0 -vvv vlan and host 125.x.x.x and host 172.x.x.x -c 10000
    tcpdump: WARNING: bond0: no IPv4 address assigned
    tcpdump: listening on bond0, link-type EN10MB (Ethernet), capture size 68 bytes
    21:53:27.598450 IP (tos 0x0, ttl 126, id 19396, offset 0, flags [DF], proto: TCP (6), length: 48) 125.x.x.x.61937 > 172.x.x.x.1521: S, cksum 0xc9b4 (correct), 2519356327:2519356327(0) win 64512 <mss 1380,nop,nop,sackOK>
    21:53:27.612189 IP (tos 0x0, ttl  53, id 46015, offset 0, flags [DF], proto: TCP (6), length: 48) 172.x.x.x.1521 > 125.x.x.x.61937: S, cksum 0x1cdb (correct), 1010936359:1010936359(0) ack 2519356328 win 49680 <mss 1460,nop,nop,sackOK>
    21:53:27.612905 IP (tos 0x0, ttl 126, id 19398, offset 0, flags [DF], proto: TCP (6), length: 40) 125.x.x.x.61937 > 172.x.x.x.1521: ., cksum 0x0faf (correct), 1:1(0) ack 1 win 64512
    21:53:27.616233 IP (tos 0x0, ttl 126, id 19399, offset 0, flags [DF], proto: TCP (6), length: 321) 125.x.x.x.61937 > 172.x.x.x.1521: P 1:282(281) ack 1 win 64512
    21:53:27.629987 IP (tos 0x0, ttl  53, id 46016, offset 0, flags [DF], proto: TCP (6), length: 40) 172.x.x.x.1521 > 125.x.x.x.61937: ., cksum 0x4886 (correct), 1:1(0) ack 282 win 49680
    21:53:27.692135 IP (tos 0x0, ttl  53, id 46017, offset 0, flags [DF], proto: TCP (6), length: 48) 172.x.x.x.1521 > 125.x.x.x.61937: P, cksum 0x3d6e (correct), 1:9(8) ack 282 win 49680
    21:53:27.693603 IP (tos 0x0, ttl 126, id 19402, offset 0, flags [DF], proto: TCP (6), length: 321) 125.x.x.x.61937 > 172.x.x.x.1521: P 282:563(281) ack 9 win 64504
    21:53:27.707460 IP (tos 0x0, ttl  53, id 46018, offset 0, flags [DF], proto: TCP (6), length: 40) 172.x.x.x.1521 > 125.x.x.x.61937: ., cksum 0x4765 (correct), 9:9(0) ack 563 win 49680
    21:53:27.707883 IP (tos 0x0, ttl  53, id 46019, offset 0, flags [DF], proto: TCP (6), length: 72) 172.x.x.x.1521 > 125.x.x.x.61937: P 9:41(32) ack 563 win 49680
    21:53:27.711950 IP (tos 0x0, ttl 126, id 19403, offset 0, flags [DF], proto: TCP (6), length: 196) 125.x.x.x.61937 > 172.x.x.x.1521: P 563:719(156) ack 41 win 64472
    21:53:27.725971 IP (tos 0x0, ttl  53, id 46020, offset 0, flags [DF], proto: TCP (6), length: 167) 172.x.x.x.1521 > 125.x.x.x.61937: P 41:168(127) ack 719 win 49680
    21:53:27.734468 IP (tos 0x0, ttl 126, id 19405, offset 0, flags [DF], proto: TCP (6), length: 77) 125.x.x.x.61937 > 172.x.x.x.1521: P 719:756(37) ack 168 win 64345
    21:53:27.748270 IP (tos 0x0, ttl  53, id 46021, offset 0, flags [DF], proto: TCP (6), length: 199) 172.x.x.x.1521 > 125.x.x.x.61937: P 168:327(159) ack 756 win 49680
    21:53:27.878720 IP (tos 0x0, ttl 126, id 19409, offset 0, flags [DF], proto: TCP (6), length: 1110) 125.x.x.x.61937 > 172.x.x.x.1521: P 756:1826(1070) ack 327 win 64186
    21:53:28.994991 IP (tos 0x0, ttl 126, id 19443, offset 0, flags [DF], proto: TCP (6), length: 1110) 125.x.x.x.61937 > 172.x.x.x.1521: P 756:1826(1070) ack 327 win 64186
    21:53:29.010680 IP (tos 0x0, ttl  53, id 46023, offset 0, flags [DF], proto: TCP (6), length: 40) 172.x.x.x.1521 > 125.x.x.x.61937: ., cksum 0x3d83 (correct), 1276:1276(0) ack 1826 win 49680
    21:53:32.561849 IP (tos 0x0, ttl  53, id 46024, offset 0, flags [DF], proto: TCP (6), length: 989) 172.x.x.x.1521 > 125.x.x.x.61937: P 327:1276(949) ack 1826 win 49680
    21:53:32.710661 IP (tos 0x0, ttl 126, id 19550, offset 0, flags [DF], proto: TCP (6), length: 223) 125.x.x.x.61937 > 172.x.x.x.1521: P 1826:2009(183) ack 1276 win 63237
    21:53:32.724384 IP (tos 0x0, ttl  53, id 46025, offset 0, flags [DF], proto: TCP (6), length: 40) 172.x.x.x.1521 > 125.x.x.x.61937: ., cksum 0x3ccc (correct), 1276:1276(0) ack 2009 win 49680
    21:53:32.732636 IP (tos 0x0, ttl  53, id 46026, offset 0, flags [DF], proto: TCP (6), length: 133) 172.x.x.x.1521 > 125.x.x.x.61937: P 1276:1369(93) ack 2009 win 49680
    21:53:32.739922 IP (tos 0x0, ttl 126, id 19553, offset 0, flags [DF], proto: TCP (6), length: 947) 125.x.x.x.61937 > 172.x.x.x.1521: P 2009:2916(907) ack 1369 win 63144
    21:53:32.763266 IP (tos 0x0, ttl  53, id 46027, offset 0, flags [DF], proto: TCP (6), length: 329) 172.x.x.x.1521 > 125.x.x.x.61937: P 1369:1658(289) ack 2916 win 49680
    21:53:32.770925 IP (tos 0x0, ttl 126, id 19555, offset 0, flags [DF], proto: TCP (6), length: 78) 125.x.x.x.61937 > 172.x.x.x.1521: P 2916:2954(38) ack 1658 win 64512
    21:53:32.784774 IP (tos 0x0, ttl  53, id 46028, offset 0, flags [DF], proto: TCP (6), length: 218) 172.x.x.x.1521 > 125.x.x.x.61937: P 1658:1836(178) ack 2954 win 49680
    21:53:32.787455 IP (tos 0x0, ttl 126, id 19556, offset 0, flags [DF], proto: TCP (6), length: 149) 125.x.x.x.61937 > 172.x.x.x.1521: P 2954:3063(109) ack 1836 win 64334
    21:53:33.478760 IP (tos 0x0, ttl 126, id 19578, offset 0, flags [DF], proto: TCP (6), length: 149) 125.x.x.x.61937 > 172.x.x.x.1521: P 2954:3063(109) ack 1836 win 64334
    21:53:33.492256 IP (tos 0x0, ttl  53, id 46030, offset 0, flags [DF], proto: TCP (6), length: 40) 172.x.x.x.1521 > 125.x.x.x.61937: ., cksum 0x34ce (correct), 2268:2268(0) ack 3063 win 49680
    21:53:36.820908 IP (tos 0x0, ttl  53, id 46031, offset 0, flags [DF], proto: TCP (6), length: 472) 172.x.x.x.1521 > 125.x.x.x.61937: P 1836:2268(432) ack 3063 win 49680
    21:53:36.824225 IP (tos 0x0, ttl 126, id 19733, offset 0, flags [DF], proto: TCP (6), length: 57) 125.x.x.x.61937 > 172.x.x.x.1521: P 3063:3080(17) ack 2268 win 63902
    21:53:36.837345 IP (tos 0x0, ttl  53, id 46032, offset 0, flags [DF], proto: TCP (6), length: 40) 172.x.x.x.1521 > 125.x.x.x.61937: ., cksum 0x34bd (correct), 2268:2268(0) ack 3080 win 49680
    21:53:36.838015 IP (tos 0x0, ttl  53, id 46033, offset 0, flags [DF], proto: TCP (6), length: 110) 172.x.x.x.1521 > 125.x.x.x.61937: P 2268:2338(70) ack 3080 win 49680
    21:53:36.839520 IP (tos 0x0, ttl 126, id 19734, offset 0, flags [DF], proto: TCP (6), length: 79) 125.x.x.x.61937 > 172.x.x.x.1521: P 3080:3119(39) ack 2338 win 63832
    21:53:36.853507 IP (tos 0x0, ttl  53, id 46034, offset 0, flags [DF], proto: TCP (6), length: 218) 172.x.x.x.1521 > 125.x.x.x.61937: P 2338:2516(178) ack 3119 win 49680
    21:53:36.855886 IP (tos 0x0, ttl 126, id 19735, offset 0, flags [DF], proto: TCP (6), length: 160) 125.x.x.x.61937 > 172.x.x.x.1521: P 3119:3239(120) ack 2516 win 63654
    21:53:36.870292 IP (tos 0x0, ttl  53, id 46035, offset 0, flags [DF], proto: TCP (6), length: 99) 172.x.x.x.1521 > 125.x.x.x.61937: P 2516:2575(59) ack 3239 win 49680
    21:53:36.879557 IP (tos 0x0, ttl 126, id 19738, offset 0, flags [DF], proto: TCP (6), length: 79) 125.x.x.x.61937 > 172.x.x.x.1521: P 3239:3278(39) ack 2575 win 63595
    21:53:36.893506 IP (tos 0x0, ttl  53, id 46036, offset 0, flags [DF], proto: TCP (6), length: 218) 172.x.x.x.1521 > 125.x.x.x.61937: P 2575:2753(178) ack 3278 win 49680
    21:53:36.895884 IP (tos 0x0, ttl 126, id 19739, offset 0, flags [DF], proto: TCP (6), length: 292) 125.x.x.x.61937 > 172.x.x.x.1521: P 3278:3530(252) ack 2753 win 63417
    21:53:36.911464 IP (tos 0x0, ttl  53, id 46037, offset 0, flags [DF], proto: TCP (6), length: 305) 172.x.x.x.1521 > 125.x.x.x.61937: P 2753:3018(265) ack 3530 win 49680
    21:53:36.913580 IP (tos 0x0, ttl 126, id 19740, offset 0, flags [DF], proto: TCP (6), length: 79) 125.x.x.x.61937 > 172.x.x.x.1521: P 3530:3569(39) ack 3018 win 63152
    21:53:36.927515 IP (tos 0x0, ttl  53, id 46038, offset 0, flags [DF], proto: TCP (6), length: 218) 172.x.x.x.1521 > 125.x.x.x.61937: P 3018:3196(178) ack 3569 win 49680
    21:53:36.938328 IP (tos 0x0, ttl 126, id 19742, offset 0, flags [DF], proto: TCP (6), length: 315) 125.x.x.x.61937 > 172.x.x.x.1521: P 3569:3844(275) ack 3196 win 64512
    21:53:36.953008 IP (tos 0x0, ttl  53, id 46039, offset 0, flags [DF], proto: TCP (6), length: 183) 172.x.x.x.1521 > 125.x.x.x.61937: P 3196:3339(143) ack 3844 win 49680
    21:53:36.961020 IP (tos 0x0, ttl 126, id 19743, offset 0, flags [DF], proto: TCP (6), length: 79) 125.x.x.x.61937 > 172.x.x.x.1521: P 3844:3883(39) ack 3339 win 64369
    21:53:36.974890 IP (tos 0x0, ttl  53, id 46040, offset 0, flags [DF], proto: TCP (6), length: 218) 172.x.x.x.1521 > 125.x.x.x.61937: P 3339:3517(178) ack 3883 win 49680
    21:53:36.977183 IP (tos 0x0, ttl 126, id 19744, offset 0, flags [DF], proto: TCP (6), length: 208) 125.x.x.x.61937 > 172.x.x.x.1521: P 3883:4051(168) ack 3517 win 64191
    21:53:36.991461 IP (tos 0x0, ttl  53, id 46041, offset 0, flags [DF], proto: TCP (6), length: 110) 172.x.x.x.1521 > 125.x.x.x.61937: P 3517:3587(70) ack 4051 win 49680
    21:53:36.993439 IP (tos 0x0, ttl 126, id 19747, offset 0, flags [DF], proto: TCP (6), length: 79) 125.x.x.x.61937 > 172.x.x.x.1521: P 4051:4090(39) ack 3587 win 64121
    21:53:37.007199 IP (tos 0x0, ttl  53, id 46042, offset 0, flags [DF], proto: TCP (6), length: 218) 172.x.x.x.1521 > 125.x.x.x.61937: P 3587:3765(178) ack 4090 win 49680
    21:53:37.011239 IP (tos 0x0, ttl 126, id 19748, offset 0, flags [DF], proto: TCP (6), length: 183) 125.x.x.x.61937 > 172.x.x.x.1521: P 4090:4233(143) ack 3765 win 63943
    21:53:37.025767 IP (tos 0x0, ttl  53, id 46043, offset 0, flags [DF], proto: TCP (6), length: 210) 172.x.x.x.1521 > 125.x.x.x.61937: P 3765:3935(170) ack 4233 win 49680
    21:53:37.027455 IP (tos 0x0, ttl 126, id 19750, offset 0, flags [DF], proto: TCP (6), length: 79) 125.x.x.x.61937 > 172.x.x.x.1521: P 4233:4272(39) ack 3935 win 63773
    21:53:37.041382 IP (tos 0x0, ttl  53, id 46044, offset 0, flags [DF], proto: TCP (6), length: 218) 172.x.x.x.1521 > 125.x.x.x.61937: P 3935:4113(178) ack 4272 win 49680
    21:53:37.044708 IP (tos 0x0, ttl 126, id 19751, offset 0, flags [DF], proto: TCP (6), length: 75) 125.x.x.x.61937 > 172.x.x.x.1521: P 4272:4307(35) ack 4113 win 63595
    21:53:37.058388 IP (tos 0x0, ttl  53, id 46045, offset 0, flags [DF], proto: TCP (6), length: 56) 172.x.x.x.1521 > 125.x.x.x.61937: P 4113:4129(16) ack 4307 win 49680
    21:53:37.060398 IP (tos 0x0, ttl 126, id 19752, offset 0, flags [DF], proto: TCP (6), length: 75) 125.x.x.x.61937 > 172.x.x.x.1521: P 4307:4342(35) ack 4129 win 63579
    21:53:37.073926 IP (tos 0x0, ttl  53, id 46046, offset 0, flags [DF], proto: TCP (6), length: 56) 172.x.x.x.1521 > 125.x.x.x.61937: P 4129:4145(16) ack 4342 win 49680
    21:53:37.088056 IP (tos 0x0, ttl 126, id 19753, offset 0, flags [DF], proto: TCP (6), length: 40) 125.x.x.x.61937 > 172.x.x.x.1521: ., cksum 0xf23e (correct), 4342:4342(0) ack 4145 win 63563
    21:53:56.309909 IP (tos 0x0, ttl 126, id 20509, offset 0, flags [DF], proto: TCP (6), length: 176) 125.x.x.x.61937 > 172.x.x.x.1521: P 4342:4478(136) ack 4145 win 63563
    21:53:56.325783 IP (tos 0x0, ttl  53, id 46047, offset 0, flags [DF], proto: TCP (6), length: 398) 172.x.x.x.1521 > 125.x.x.x.61937: P 4145:4503(358) ack 4478 win 49680
    21:53:56.329152 IP (tos 0x0, ttl 126, id 20511, offset 0, flags [DF], proto: TCP (6), length: 57) 125.x.x.x.61937 > 172.x.x.x.1521: P 4478:4495(17) ack 4503 win 63205
    21:53:56.557234 IP (tos 0x0, ttl 126, id 20519, offset 0, flags [DF], proto: TCP (6), length: 57) 125.x.x.x.61937 > 172.x.x.x.1521: P 4478:4495(17) ack 4503 win 63205
    21:53:56.570496 IP (tos 0x0, ttl  53, id 46049, offset 0, flags [DF], proto: TCP (6), length: 40) 172.x.x.x.1521 > 125.x.x.x.61937: ., cksum 0x24ea (correct), 4904:4904(0) ack 4495 win 49680
    21:53:58.561449 IP (tos 0x0, ttl  53, id 46051, offset 0, flags [DF], proto: TCP (6), length: 441) 172.x.x.x.1521 > 125.x.x.x.61937: P 4503:4904(401) ack 4495 win 49680
    21:53:58.602228 IP (tos 0x0, ttl 126, id 20579, offset 0, flags [DF], proto: TCP (6), length: 79) 125.x.x.x.61937 > 172.x.x.x.1521: P 4495:4534(39) ack 4904 win 64512
    21:53:58.615281 IP (tos 0x0, ttl  53, id 46052, offset 0, flags [DF], proto: TCP (6), length: 40) 172.x.x.x.1521 > 125.x.x.x.61937: ., cksum 0x24c3 (correct), 4904:4904(0) ack 4534 win 49680
    21:53:58.616571 IP (tos 0x0, ttl  53, id 46053, offset 0, flags [DF], proto: TCP (6), length: 218) 172.x.x.x.1521 > 125.x.x.x.61937: P 4904:5082(178) ack 4534 win 49680
    21:53:58.745531 IP (tos 0x0, ttl 126, id 20584, offset 0, flags [DF], proto: TCP (6), length: 40) 125.x.x.x.61937 > 172.x.x.x.1521: ., cksum 0xead2 (correct), 4534:4534(0) ack 5082 win 64334
    21:54:01.476582 IP (tos 0x0, ttl 126, id 20707, offset 0, flags [DF], proto: TCP (6), length: 53) 125.x.x.x.61937 > 172.x.x.x.1521: P 4534:4547(13) ack 5082 win 64334
    21:54:01.492998 IP (tos 0x0, ttl  53, id 46054, offset 0, flags [DF], proto: TCP (6), length: 53) 172.x.x.x.1521 > 125.x.x.x.61937: P 5082:5095(13) ack 4547 win 49680
    21:54:01.499924 IP (tos 0x0, ttl 126, id 20709, offset 0, flags [DF], proto: TCP (6), length: 50) 125.x.x.x.61937 > 172.x.x.x.1521: P, cksum 0xe469 (correct), 4547:4557(10) ack 5095 win 64321
    21:54:01.500558 IP (tos 0x0, ttl 126, id 20710, offset 0, flags [DF], proto: TCP (6), length: 40) 125.x.x.x.61937 > 172.x.x.x.1521: F, cksum 0xeaba (correct), 4557:4557(0) ack 5095 win 64321
    21:54:01.513561 IP (tos 0x0, ttl  53, id 46055, offset 0, flags [DF], proto: TCP (6), length: 40) 172.x.x.x.1521 > 125.x.x.x.61937: F, cksum 0x23ec (correct), 5095:5095(0) ack 4557 win 49680
    21:54:01.513628 IP (tos 0x0, ttl  53, id 46056, offset 0, flags [DF], proto: TCP (6), length: 40) 172.x.x.x.1521 > 125.x.x.x.61937: ., cksum 0x23eb (correct), 5096:5096(0) ack 4558 win 49680
    21:54:01.514175 IP (tos 0x0, ttl 126, id 20713, offset 0, flags [DF], proto: TCP (6), length: 40) 125.x.x.x.61937 > 172.x.x.x.1521: ., cksum 0xeab9 (correct), 4558:4558(0) ack 5096 win 64321The above is obviously fine, but it's really quite strange. I can get the Oracle 9 queries to hang if I select over 7 rows (8 being the point at which it dies).
    So I can run
    Sqlplus user/[email protected]
    Select * from <blah> where rownum < 7;Over and over again, as many times as I like without issue.
    But!.. As soon as I run
    Sqlplus user/[email protected]
    Select * from <blah> where rownum < 8;The session will hang, and from a network perspective there are no packets being transferred in either direction. It looks exactly like the Oracle 11 session in that the session is still ESTABLISHED from a client perspective but no data is flowing in either direction..
    Does anyone have any idea why '8' is the magic number that would be causing it to hang? I'm really stuggling to see from a network perspective how this may be occuring, as above the TCPDump looks clean.
    Unfortunately I don't have access do a dump on the client/server itself however, just on the network path. I guess that may be where we need to be looking next.
    Thanks for the ideas so far all, much appreciated.
    Josh.

  • Flat files in Data transfer

    Iam able to do tutorials for Direct input and batch input method.I tried doing BAPI and IDOCs too.The point where Iam getting strucked is with flat file.
    For example If i want to transfer Purcharse order or vendor master information,I need to put valid data in text file.Lets say for material master, the valide material type is 'XYZ',if i put '123' in flat file,it throws the error that 123 is not valid material type(during the session processing).So I need to put only valid data in the flat text file.How to go about this?
    Hope you understood my question.
    Another question is that does ALE deals with creating segments.In my understanding
    LSMW is a tool which helps in data transfer with following ways
    i)Direct input method
    ii)Batch input method - recording
    iii)BAPI - using built in business objects
    iv)Idcos - using inbout idoc processing where we create ports.
    BDC is another tool like LWMW,where the ways are call transaction and session.
    Is what I understood correct?Any changes?

    Hi Gopi
    For the First Question:
    We should always havea valid data in the input file for successful processing. otherwise by very nature of the program the LSMW throw an error saying that the data is invalid and I believe that this is the functionality that is required.
    I am not sure abt ALE part
    BDC is not a tool in SAP but its a programming done which is similar to the recording method in LSMW. instead of Autmatic generation of the code we write a custome code to upload the data using the recording done either by call transaction or session method. in short its not a tool but one kid of programming logi to upload the data.
    Santosh

  • Data transfer from sap r/3 into excel sheet for mi01

    hi gurus,
       as i  am a xi consultant i got requirement to write a program for data transfer from sap r/3 into excel sheet for MI01.can any body help me by giving sample code or example for this requirement.please help me.

    Hi Rohit,
    This is an upload program and it has used both function modules to upload from an excel to R3 and to download from R3 onto excel.
    GUI_UPLOAD
    GUI_DOWNLOAD
    are the function modules used.
    Hope this helps,
    *Output:        Downloads error records onto presentation server,
    *               Displays report with number of success and error records
    REPORT ZMCG047CONTR NO STANDARD PAGE HEADING
                                   LINE-SIZE 255
                                   MESSAGE-ID ZM.
    *&       Table declarations
    TABLES : T001W,     "Plants/Branches
             T024E,     "Purchasing Organizations
             T001.      "Company Codes
    *              TYPE-POOLS  DECLARATION
    TYPE-POOLS : SLIS.
    *                       Types  Declaration                            *
    TYPES: BEGIN OF T_RECORD,    "record storing contract info
            LIFNR(010),      "Vendor Number
            EVART(004),      "Agreement Type
            EKORG(004),      "Purchasing Organization
            EKGRP(003),      "Purchasing Group
            WERKS(004),      "Plant
            LGORT(004),      "Storage Location
            KDATB(010),      "Valid start Date
            KDATE(010),      "Valid End Date
            ZTERM(004),      "Payment Terms
            KTWRT(020),      "Target Value
            EPSTP(001),      "Item Category
            EMATN(018),      "Material Number
            KTMNG(017),      "Target Quantity
            NETPR(014),      "Net Price
            PEINH(006),      "Net Price Unit
            BPRME(003),      "Net Price Order Price Unit
            IDNLF(035),      "Vendor Material number
            WEBRE(001),      "GR Based-IV
            MEPRF(001),      "Pricing Date Category
            LTEX1(040),      "Info Text
            DATAB(010),      "Valid From
            DATBI(010),      "Valid To
            KSCHL(004),      "Condition Type
            KBETR(016),      "Condition Rate if scale is not given
            KONWA(005),      "Currency
            KPEIN(005),      "Condition Pricing Unit
            KMEIN(003),      "Condition Unit of Measure
            KSTBM(019),      "Scale
            KBETR_01(016),   "Scale Rate
            DEL_FLAG,        "Delete Flag Indicator
            ERR_MSG(100),    "Error Message
          END OF T_RECORD,
          BEGIN OF T_ERR_RECORD,   "to have error records stored
             LIFNR(010),      "Vendor Number
             EVART(004),      "Agreement Type
             EKORG(004),      "Purchasing Organization
             EKGRP(003),      "Purchasing Group
             WERKS(004),      "Plant
             LGORT(004),      "Storage Location
             KDATB(010),      "Valid start Date
             KDATE(010),      "Valid End Date
             ZTERM(004),      "Payment Terms
             KTWRT(020),      "Target Value
             EPSTP(001),      "Item Category
             EMATN(018),      "Material Number
             KTMNG(017),      "Target Quantity
             NETPR(014),      "Net Price
             PEINH(006),      "Net Price Unit
             BPRME(003),      "Net Price Order Price Unit
             IDNLF(035),      "Vendor Material number
             WEBRE(001),      "GR Based-IV
             MEPRF(001),      "Pricing Date Category
             LTEX1(040),      "Info Text
             DATAB(010),      "Valid From
             DATBI(010),      "Valid To
             KSCHL(004),      "Condition Type
             KBETR(016),      "Condition Rate if scale is not given
             KONWA(005),      "Currency
             KPEIN(005),      "Condition Pricing Unit
             KMEIN(003),      "Condition Unit of Measure
             KSTBM(019),      "Scale
             KBETR_01(016),   "Scale Rate
             DEL_FLAG,        "Delete Flag Indicator
             ERR_MSG(100),    "Error Message
          END OF T_ERR_RECORD,
          BEGIN OF T_LOEKZ,    "To have deletion indicators for materials
              LOEKZ(001),    "Deletion indicator in purchasing document
              EMATN(018),    "Material Number
              WERKS(004),    "Plant
              LGORT(004),    "Storage Location
              BSTYP(001),    "Purchasing document category
          END OF T_LOEKZ,
          BEGIN OF T_MATNR,  " Type definition to store details of materials
               MATNR(018),    "Material Number
          END OF T_MATNR,
          BEGIN OF T_T001,   " Type definition for company codes
              BUKRS(004),    " Company Code
          END OF T_T001,
          BEGIN OF T_ZMVXREF,   "Cross-Reference table type
              D_ALTKN(10),      "Legacy Vendor Number
              D_BUKRS(4),       "Legacy Company Code
              M_ALTKN(10),      "SAP Company Code
          END OF T_ZMVXREF,
          BEGIN OF T_LFA1,    "Master data of vendors
              LIFNR(10),      "Vendor Number
          END OF T_LFA1,
    *  Type Declaration for T024E (Company Codes)
           BEGIN OF T_T024E,
             EKORG   LIKE   T024E-EKORG,     "Purchasing organization
             BUKRS   LIKE   T024E-BUKRS,     "Company Code
           END OF T_T024E,
    *  Type Declaration for t001w (Plant)
           BEGIN OF T_T001W,
             WERKS  LIKE  T001W-WERKS,            "Plant
           END OF T_T001W,
    *  Type Declatation for String Line
           BEGIN OF T_STR1,                                     "#EC NEEDED
             SLINE(6000) TYPE C,
           END OF T_STR1.
    TYPES:  BEGIN OF T_BDCDATA.  "BDC Data
            INCLUDE STRUCTURE BDCDATA.
    TYPES:  END OF T_BDCDATA.
    *       Internal Tables  Declaration                                  *
    DATA:
    *      Internal table to store input file data
           I_RECORD TYPE STANDARD TABLE OF T_RECORD INITIAL SIZE 0,
    *      Internal table to capture errors
           I_ERR_REC TYPE STANDARD TABLE OF T_ERR_RECORD INITIAL SIZE 0,
    *      Internal table to check for deletion indicators
           I_LOEKZ TYPE STANDARD TABLE OF T_LOEKZ INITIAL SIZE 0,
    *      Internal table to check for material numbers
           I_MATNR TYPE STANDARD TABLE OF T_MATNR INITIAL SIZE 0,
    *      Internal table used for storing Cross-Reference data of Vendor
           I_ZMVXREF TYPE STANDARD TABLE OF T_ZMVXREF INITIAL SIZE 0,
    *      Internal table for holding Vendor Numbers from Master table
           I_LFA1 TYPE STANDARD TABLE OF T_LFA1 INITIAL SIZE 0,
    *      Internal table for holding Purchase Org and Company Codes
           I_T024E TYPE STANDARD TABLE OF T_T024E INITIAL SIZE 0,
    *      Internal table for holding Plants
           I_T001W TYPE STANDARD TABLE OF T_T001W INITIAL SIZE 0,
    *      Internal table for storing a list of Company Codes
           I_T001 TYPE STANDARD TABLE OF T_T001 INITIAL SIZE 0,
    *      Internal table used for ALV Reporting
           I_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
    *      Internal table used for holding List Header
           I_LISTHEADER TYPE SLIS_T_LISTHEADER,    "EC NEEDED
    *      Internal table to hold ALV Event
           I_ALV_EVENT TYPE SLIS_T_EVENT,
    *      Internal table to hold Sort Info for ALV Report
           I_SORT TYPE SLIS_T_SORTINFO_ALV,
    *      Internal table for BDC Data
           I_BDCDATA TYPE STANDARD TABLE OF T_BDCDATA INITIAL SIZE 0,
    *      Internal table for messages
           I_MESSTAB TYPE TABLE OF BDCMSGCOLL,
    *      Internal table for String line
           I_STR1 TYPE STANDARD TABLE OF T_STR1 INITIAL SIZE 0.
    *       Work Area Declaration                                         *
    DATA:
    *  Work Area to hold data for the Open Contract
          WA_RECORD TYPE T_RECORD,
    *  Work Area to hold previous record data
          WA_RECORDPREV TYPE T_RECORD,
    *  Work Area to hold errors
          WA_ERR_REC TYPE T_ERR_RECORD,
    *  Work Area to hold the Deletion Indicator of materials
          WA_LOEKZ TYPE T_LOEKZ,
    *  Work Area to hold Material numbers of required materials
          WA_MATNR TYPE T_MATNR,      "EC NEEDED
    *  Work Area to hold errors occured while performing BDC
          WA_MESSTAB TYPE BDCMSGCOLL,
    *  Work Area to hold field catalog for ALV Reports
          WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
    *  Work Area to hold list header data for ALV reports
          WA_LISTHEADER TYPE SLIS_LISTHEADER,
    *  Work Area to hold ALV Event
          WA_ALV_EVENT LIKE LINE OF I_ALV_EVENT,  "EC NEEDED
    *  Work Area to hold Layout of ALV Report
          WA_LAYOUT TYPE SLIS_LAYOUT_ALV,
    *  Work Area to hold Cross-Reference data of Vendor
          WA_ZMVXREF TYPE T_ZMVXREF,
    *  Work Area to hold Vendor Numbers from Master table
          WA_LFA1 TYPE T_LFA1,    "EC NEEDED
    *  Work Area to hold Purchase Org and Company Codes
          WA_T024E TYPE T_T024E,
    *  Work Area to hold Company Codes
          WA_T001 TYPE T_T001,
    *  Work Area to hold Plants
          WA_T001W TYPE T_T001W,
    *  Work Area to hold Sort Info for ALV Report
          WA_SORT TYPE SLIS_SORTINFO_ALV,
    *  Work Area to hold BDC Data
          WA_BDCDATA TYPE T_BDCDATA,
    *  Work Area for String line
          WA_STR1 TYPE T_STR1.
    *       Variables  Declaration                                        *
    DATA: V_ERRMSG(500),           "To temporarily store the error message
          V_CONV_DATE(10) TYPE C,  "To capture the converted date format
          V_DATE LIKE SY-DATUM,
          V_REPID LIKE SY-REPID,   "holds report id
          V_CROSS_REFERENCE_ERROR TYPE I,  " cross-reference error
          V_INPUTERROR_FLAG VALUE '',      " input error status
          V_FILENAME TYPE STRING,          " File Name
          VEN_FLAG(1),                       " at new status
          MAT_FLAG(1),                      " at new status
          V_IND(2) TYPE N,                 " index of table control
          V_IND2(2) TYPE N,                " index of table control
          V_IND3(2) TYPE N,                " index of table control
          V_EVRTP1(20),
          V_EPSTP1(20),
          V_EMATN1(20),
          V_KTMNG1(20),
          V_NETPR1(20),
          V_PEINH1(20),
          V_BPRME1(20),
          V_TCSELFLAG1(20),
          V_KSCHL2(20),
          V_KBETR2(20),
          V_KONWA2(20),
          V_KPEIN2(20),
          V_KMEIN2(20),
          V_SELKZ2(20),
          V_KBETR3(20),
          V_KSTBM3(20),
          V_LINE TYPE I,
          V_STR TYPE X VALUE '09',
          V_EXIST TYPE C,
          V_EXIST1 TYPE C,
          V_ISDIR TYPE C,
          V_ISDIR1 TYPE C.
    *       Constants  Declaration                                        *
    CONSTANTS: C_TCODE(5) VALUE 'ME31K', "Trx code - Open Contract Creation
               C_TRUE     VALUE 'X',       " Del_Flag indicator
               C_LOEKZ_MARKED VALUE 'X',   "Deletion indicator for material
               C_INPUTERROR_FLAG_YES VALUE 'X',  "Input File Indicator
               C_VEN_ERR1 VALUE 1,    "Error Indicator
               C_16(2)    VALUE '16',
               C_VEN_ERR2 VALUE 2,    "Error Indicator
               C_VEN_ERR3 VALUE 3,    "Error Indicator
               C_VEN_SUCS VALUE 0,    "Success Indicator
               C_SUCCESS  LIKE SY-SUBRC VALUE '0',
               C_STRUE    VALUE 'S',  "Del_flag for SAP Errors
               C_YTRUE    VALUE 'Y',  "Del_flag for Success Records
               C_MSGTYP_E VALUE 'E',  "holds error message type
               C_MSGTYP_S VALUE 'S',  "holds success message type
               C_BSTYP    VALUE 'K',  "Purchasing Document type is Contract
               C_BACKGROUND VALUE 'N', "Background mode
               C_FOREGROUND VALUE 'A', "All Screen mode
               C_ERRORS   VALUE 'E',   "Error screen mode
               C_WK(2)    VALUE 'WK'. "Value Contract
    *        Selection Screen                                             *
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-033.
    SELECTION-SCREEN SKIP.
    SELECT-OPTIONS:
    *              Plant
                   S_WERKS FOR T001W-WERKS OBLIGATORY,
    *              Purchase Organization
                   S_EKORG FOR T024E-EKORG OBLIGATORY.
    *              Company Code
    PARAMETER      P_BUKRS LIKE T001-BUKRS OBLIGATORY.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN ULINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN POSITION 3.
    PARAMETER RB_SERVE RADIOBUTTON GROUP RBX DEFAULT 'X' USER-COMMAND U1.
    SELECTION-SCREEN COMMENT 6(19)  TEXT-036.
    SELECTION-SCREEN POSITION 37.
    PARAMETER RB_LOCAL RADIOBUTTON GROUP RBX.
    SELECTION-SCREEN COMMENT 40(13) TEXT-035.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN SKIP.
    PARAMETERS:
    *    Parameter holding Input File name
              P_FILE LIKE RLGRAP-FILENAME
                     OBLIGATORY
                     LOWER CASE
                     DEFAULT 'C:\'
                     MODIF ID G1,
              P_FILE1 LIKE RLGRAP-FILENAME
                      OBLIGATORY
                      LOWER CASE
                      DEFAULT '/celestica/interface/corp/in/work/'
                      MODIF ID G2,
    *    Parameter specifying Mode of calling the Transaction.
              P_MODE DEFAULT 'N' OBLIGATORY,
    *    Check box used to test the input file.
              P_TEST AS CHECKBOX DEFAULT 'X',
    *    Parameter holding Filename for holding Input File Errors
              P_IPERR LIKE RLGRAP-FILENAME
                      OBLIGATORY
                      LOWER CASE
                      DEFAULT 'C:\'
                      MODIF ID G1,
              P_IPERR1 LIKE RLGRAP-FILENAME
                     OBLIGATORY
                     LOWER CASE
                     DEFAULT '/celestica/interface/corp/in/work/047_Err.txt'
                     MODIF ID G2.
    SELECTION-SCREEN END OF BLOCK B2.
    *        AT Selection Screen  Events                                  *
    *  Loop the screen to activate relative paths
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF RB_SERVE = C_TRUE AND SCREEN-GROUP1 = 'G1'.
          SCREEN-OUTPUT = 0.
          SCREEN-ACTIVE = 0.
          SCREEN-INPUT = 0.
        ELSEIF RB_LOCAL = C_TRUE AND SCREEN-GROUP1 = 'G2'.
          SCREEN-OUTPUT = 0.
          SCREEN-ACTIVE = 0.
          SCREEN-INPUT = 0.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    AT SELECTION-SCREEN ON BLOCK B2.
    *  Checking Access Authorization for the user
      CALL FUNCTION 'ZU_DATA_ACCESS_AUTH_CHECK'
           EXPORTING
                ACTVT        = C_16
                P_BUKRS      = P_BUKRS
           TABLES
                S_WERKS      = S_WERKS
                S_EKORG      = S_EKORG
           EXCEPTIONS
                BUKRS_FAILED = 1
                VKORG_FAILED = 2
                VTWEG_FAILED = 3
                EKORG_FAILED = 4
                WERKS_FAILED = 5
                LGNUM_FAILED = 6
                OTHERS       = 7.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    AT SELECTION-SCREEN ON P_BUKRS.
      IF NOT P_BUKRS IS INITIAL.
        SELECT SINGLE BUKRS INTO T001
                            FROM T001
                            WHERE BUKRS EQ P_BUKRS.
        IF SY-SUBRC NE 0.
          MESSAGE I000 WITH TEXT-089.
          STOP.
        ENDIF.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
    * Search Help to select Input File path.
      PERFORM GET_FILE_NAME USING P_FILE.
    * Check for the existence of the file.
      IF RB_LOCAL EQ C_TRUE.
        CALL FUNCTION 'TMP_GUI_GET_FILE_EXIST'
             EXPORTING
                  FNAME          = P_FILE
             IMPORTING
                  EXIST          = V_EXIST
                  ISDIR          = V_ISDIR
             EXCEPTIONS
                  FILEINFO_ERROR = 1
                  OTHERS         = 2.
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        IF V_ISDIR IS INITIAL.
          IF V_EXIST IS INITIAL.
            MESSAGE I000 WITH TEXT-018.
            STOP.
          ENDIF.
        ELSEIF V_ISDIR EQ C_TRUE.
          MESSAGE I000 WITH TEXT-068.
          STOP.
        ENDIF.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_IPERR.
    * Search Help to select Input Error File path.
      PERFORM GET_FILE_NAME USING P_IPERR.
    AT SELECTION-SCREEN.
    * Validate Transaction Mode
      IF  P_MODE <> C_BACKGROUND AND
          P_MODE <> C_FOREGROUND AND
          P_MODE <> C_ERRORS.
        MESSAGE I000 WITH TEXT-034.
        STOP.
      ENDIF.
    START-OF-SELECTION.
    * Get the Input File Data
      V_FILENAME = P_FILE.
      PERFORM UPLOAD_FLATFILE_DATA TABLES I_RECORD
                                   USING V_FILENAME.
    * Sorting the data by all fields
      SORT I_RECORD.
    * Ensuring the padding of the empty spaces before the vendor No
      CLEAR WA_RECORD.
      LOOP AT I_RECORD INTO WA_RECORD.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
             EXPORTING
                  INPUT  = WA_RECORD-LIFNR
             IMPORTING
                  OUTPUT = WA_RECORD-LIFNR.
        MODIFY I_RECORD FROM WA_RECORD
                        INDEX SY-TABIX
                        TRANSPORTING LIFNR.
        CLEAR WA_RECORD.
      ENDLOOP.
    * Input file validation
      PERFORM VALIDATE_FLATFILE_DATA.
      IF P_TEST = C_TRUE.
        IF I_ERR_REC[] IS INITIAL.
          MESSAGE I000 WITH TEXT-032.
          STOP.
        ELSE.
    *  Display all the error records at the input level.
          PERFORM DISPLAY_INPERR_RECORDS.
    *  Download Error File
          PERFORM DOWNLOAD_ERROR_FILE.
        ENDIF.
      ELSE.
    * Build BDC Data
        PERFORM BUILD_BDC_DATA.
    * Download Error File
        PERFORM DOWNLOAD_ERROR_FILE.
    * Display the status report.
        PERFORM DISPLAY_PROCESSED_RECORDS.
      ENDIF.
    END-OF-SELECTION.
      REFRESH:  I_RECORD,
                I_ERR_REC,
                I_LOEKZ,
                I_MATNR,
                I_ZMVXREF,
                I_LFA1,
                I_T024E,
                I_FIELDCAT,
                I_LISTHEADER,
                I_ALV_EVENT,
                I_SORT,
                I_BDCDATA,
                I_MESSTAB,
                I_STR1.
      FREE: I_RECORD,
            I_ERR_REC,
            I_LOEKZ,
            I_MATNR,
            I_ZMVXREF,
            I_LFA1,
            I_T024E,
            I_FIELDCAT,
            I_LISTHEADER,
            I_ALV_EVENT,
            I_SORT,
            I_BDCDATA,
            I_MESSTAB,
            I_STR1.
    *&      Form  GET_file_name
    *       Fetches the file and path from the presentation system
    *  -->  p1        Path along with the file name
    FORM GET_FILE_NAME USING L_FILE LIKE RLGRAP-FILENAME.
      CALL FUNCTION 'WS_FILENAME_GET'
           EXPORTING
                MASK             = ',*.TXT,*.txt.'
                MODE             = 'O'
                TITLE            = TEXT-011
           IMPORTING
                FILENAME         = L_FILE
           EXCEPTIONS
                INV_WINSYS       = 1
                NO_BATCH         = 2
                SELECTION_CANCEL = 3
                SELECTION_ERROR  = 4
                OTHERS           = 5.
      CASE SY-SUBRC.
        WHEN 1.
          MESSAGE I000 WITH TEXT-084.
          STOP.
        WHEN 2.
          MESSAGE I000 WITH TEXT-085.
          STOP.
        WHEN 3.
          MESSAGE I000 WITH TEXT-086.
          STOP.
        WHEN 4.
          MESSAGE I000 WITH TEXT-087.
          STOP.
      ENDCASE.
    ENDFORM.                    " GET_file_name
    *&      Form  upload_flatfile_data
    *       Uploading data from Flat File
    FORM UPLOAD_FLATFILE_DATA
                          TABLES I_L_RECORD STRUCTURE WA_RECORD
                          USING L_FILENAME TYPE STRING.
      DATA WA_L_RECORD TYPE T_RECORD.
    * Upload the Flat file data
      IF RB_LOCAL EQ C_TRUE. "File is on the Local System
        CALL FUNCTION 'GUI_UPLOAD'
             EXPORTING
                  FILENAME                = L_FILENAME
                  FILETYPE                = 'ASC'
                  HAS_FIELD_SEPARATOR     = 'X'
             TABLES
                  DATA_TAB                = I_L_RECORD
             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.
        CASE SY-SUBRC.
          WHEN 0.
            DESCRIBE TABLE I_L_RECORD LINES V_LINE.
            IF V_LINE EQ 0.
              MESSAGE I000 WITH TEXT-065.
              STOP.
            ENDIF.
          WHEN 1.
            MESSAGE I000 WITH TEXT-068.
            STOP.
          WHEN 2.
            MESSAGE I000 WITH TEXT-069.
            STOP.
          WHEN 3.
            MESSAGE I000 WITH TEXT-070.
            STOP.
          WHEN 4.
            MESSAGE I000 WITH TEXT-071.
            STOP.
          WHEN 5.
            MESSAGE I000 WITH TEXT-072.
            STOP.
          WHEN 6.
            MESSAGE I000 WITH TEXT-073.
            STOP.
          WHEN 7.
            MESSAGE I000 WITH TEXT-074.
            STOP.
          WHEN 8.
            MESSAGE I000 WITH TEXT-075.
            STOP.
          WHEN 9.
            MESSAGE I000 WITH TEXT-076.
            STOP.
          WHEN 10.
            MESSAGE I000 WITH TEXT-077.
            STOP.
          WHEN 11.
            MESSAGE I000 WITH TEXT-078.
            STOP.
          WHEN 12.
            MESSAGE I000 WITH TEXT-079.
            STOP.
          WHEN 13.
            MESSAGE I000 WITH TEXT-080.
            STOP.
          WHEN 14.
            MESSAGE I000 WITH TEXT-081.
            STOP.
          WHEN 15.
            MESSAGE I000 WITH TEXT-082.
            STOP.
          WHEN 16.
            MESSAGE I000 WITH TEXT-083.
            STOP.
        ENDCASE.
        CLEAR V_LINE.
      ELSEIF RB_SERVE EQ C_TRUE. "File is on the Application Server
        P_MODE = C_BACKGROUND.
        OPEN DATASET P_FILE1 FOR INPUT IN TEXT MODE.
        CHECK SY-SUBRC EQ C_SUCCESS.
        CLEAR WA_STR1.
        DO.
          READ DATASET P_FILE1 INTO WA_STR1.
          IF SY-SUBRC <> 0.      " NE SUCCESS.
            EXIT.
          ELSEIF SY-SUBRC EQ C_SUCCESS.
            APPEND WA_STR1 TO I_STR1.
            CLEAR WA_STR1.
          ENDIF.                  " ENDIF on SY-SUBRC 0 Check.
        ENDDO.                    " ENDDO
        DELETE I_STR1 WHERE SLINE EQ ' '.
        DESCRIBE TABLE I_STR1 LINES V_LINE.
        IF V_LINE EQ 0.
          MESSAGE S000 WITH TEXT-065.
          STOP.
        ENDIF.
        LOOP AT I_STR1 INTO WA_STR1.
          CLEAR: WA_L_RECORD.
          SPLIT WA_STR1-SLINE AT V_STR
          INTO WA_L_RECORD-LIFNR
               WA_L_RECORD-EVART
               WA_L_RECORD-EKORG
               WA_L_RECORD-EKGRP
               WA_L_RECORD-WERKS
               WA_L_RECORD-LGORT
               WA_L_RECORD-KDATB
               WA_L_RECORD-KDATE
               WA_L_RECORD-ZTERM
               WA_L_RECORD-KTWRT
               WA_L_RECORD-EPSTP
               WA_L_RECORD-EMATN
               WA_L_RECORD-KTMNG
               WA_L_RECORD-NETPR
               WA_L_RECORD-PEINH
               WA_L_RECORD-BPRME
               WA_L_RECORD-IDNLF
               WA_L_RECORD-WEBRE
               WA_L_RECORD-MEPRF
               WA_L_RECORD-LTEX1
               WA_L_RECORD-DATAB
               WA_L_RECORD-DATBI
               WA_L_RECORD-KSCHL
               WA_L_RECORD-KBETR
               WA_L_RECORD-KONWA
               WA_L_RECORD-KPEIN
               WA_L_RECORD-KMEIN
               WA_L_RECORD-KSTBM
               WA_L_RECORD-KBETR_01
               WA_L_RECORD-DEL_FLAG
               WA_L_RECORD-ERR_MSG.
          APPEND WA_L_RECORD TO I_L_RECORD.
          CLEAR: WA_L_RECORD,
                  WA_STR1.
        ENDLOOP.
        REFRESH I_STR1.
        CLOSE DATASET P_FILE1.
      ENDIF.
    ENDFORM.
    *&      Form  BDC_DYNPRO
    *       Data populated into i_bdcdata table for program
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      CLEAR WA_BDCDATA.
      WA_BDCDATA-PROGRAM  = PROGRAM.
      WA_BDCDATA-DYNPRO   = DYNPRO.
      WA_BDCDATA-DYNBEGIN = C_TRUE.
      APPEND WA_BDCDATA TO I_BDCDATA.
    ENDFORM.
    *&      Form  BDC_FIELD
    *       Data populated into i_bdcdata table for fields
    FORM BDC_FIELD USING FNAM FVAL.
      CLEAR WA_BDCDATA.
      WA_BDCDATA-FNAM = FNAM.
      WA_BDCDATA-FVAL = FVAL.
      APPEND WA_BDCDATA TO I_BDCDATA.
    ENDFORM.
    *&      Form  convert_date
    *       Converting the data from the file format to mm/dd/yyyy format
    *      <--P_wa_record_kdatb  Source Date
    *      <--p_l_conv_date      Target Date
    FORM CONVERT_DATE USING L_DATE
                            L_TAR_DATE.
      CONCATENATE L_DATE+0(2)
                  L_DATE+3(2)
                  L_DATE+6(4)
                  INTO L_TAR_DATE.
    ENDFORM.                    " convert_date
    *&      Form  validate_flatfile_data
    *       Validating the input file
    FORM VALIDATE_FLATFILE_DATA.
      DATA: L_TODAY LIKE SY-DATUM,
            L_STARTDATE_C LIKE SY-DATUM,
            L_ENDDATE_C LIKE SY-DATUM,
            L_ENDDATE_C1 LIKE SY-DATUM,
            L_STARTDATE_C1 LIKE SY-DATUM,
            L_STARTDATE(8),
            L_ENDDATE(8).
    * Fetch indicator for all records on the material, plant & storage
    * location combination.
      IF NOT I_RECORD[] IS INITIAL.
        REFRESH I_LOEKZ.
        SELECT EMATN            " Material Number
               WERKS            " Plant
               LGORT            " Storage Location
               BSTYP            " Purchasing Document Category
               LOEKZ            " Deletion indicator
          INTO TABLE I_LOEKZ
          FROM EKPO
          FOR ALL ENTRIES IN I_RECORD
          WHERE EMATN = I_RECORD-EMATN
            AND WERKS = I_RECORD-WERKS
            AND LGORT = I_RECORD-LGORT
            AND BSTYP = C_BSTYP
            AND LOEKZ = C_LOEKZ_MARKED.
        IF SY-SUBRC EQ 0.
          SORT I_LOEKZ BY EMATN WERKS LGORT BSTYP LOEKZ.
        ENDIF.
    * Fetching Plants for all entries in the selection screen
        REFRESH I_T001W.
        SELECT WERKS  "Plant
            INTO TABLE I_T001W
            FROM T001W
            WHERE WERKS IN S_WERKS.
        IF SY-SUBRC EQ 0.
          SORT I_T001W BY WERKS.
        ENDIF.
    * Fetching materials for the plants listed in flat file
        REFRESH I_MATNR.
        SELECT MATNR          " Material Number
          INTO TABLE I_MATNR
          FROM MARC
          FOR ALL ENTRIES IN I_RECORD
          WHERE WERKS = I_RECORD-WERKS.
        IF SY-SUBRC EQ 0.
          SORT I_MATNR BY MATNR.
        ENDIF.
    * Fetching Company Codes for repective Purchase Organizations
        REFRESH I_T024E.
        SELECT EKORG       "  Purchase Organization
               BUKRS       "  Company Code
            INTO TABLE I_T024E
            FROM T024E
            WHERE EKORG IN S_EKORG.
        IF SY-SUBRC EQ 0.
          SORT I_T024E BY EKORG.
        ENDIF.
    * Fetching SAP Data using Legacy Data.
        REFRESH I_ZMVXREF.
        SELECT D_ALTKN
               D_BUKRS
               M_ALTKN
            INTO TABLE I_ZMVXREF
            FROM ZMVXREF
            FOR ALL ENTRIES IN I_RECORD
            WHERE D_ALTKN = I_RECORD-LIFNR.
        IF SY-SUBRC EQ 0.
          SORT I_ZMVXREF BY D_ALTKN D_BUKRS.
        ENDIF.
    * Fetching Vendors from LFA1
        IF NOT I_ZMVXREF[] IS INITIAL.
          REFRESH I_LFA1.
          SELECT LIFNR
             INTO TABLE I_LFA1
             FROM LFA1
             FOR ALL ENTRIES IN I_ZMVXREF
             WHERE LIFNR = I_ZMVXREF-M_ALTKN.
          IF SY-SUBRC EQ 0.
            SORT I_LFA1 BY LIFNR.
          ENDIF.
        ENDIF.
    * Start Validating the flat file
        CLEAR: WA_RECORD,
               WA_T024E,
               WA_ZMVXREF,
               WA_LFA1,
               WA_LOEKZ,
               WA_MATNR.
        LOOP AT I_RECORD INTO WA_RECORD.
          L_TODAY = SY-DATUM.
          L_STARTDATE = WA_RECORD-KDATB.
          L_ENDDATE = WA_RECORD-KDATE.
          IF WA_RECORD-DEL_FLAG IS INITIAL.
            READ TABLE I_T001W INTO WA_T001W
                               WITH KEY WERKS = WA_RECORD-WERKS
                               BINARY SEARCH.
            IF SY-SUBRC EQ 0.
    *   Cross-Reference check performed for the given Vendors
              READ TABLE I_T024E INTO WA_T024E
                                 WITH KEY EKORG = WA_RECORD-EKORG
                                 BINARY SEARCH.
              IF SY-SUBRC NE 0.
                V_CROSS_REFERENCE_ERROR = C_VEN_ERR3.
              ELSE.
                READ TABLE I_ZMVXREF INTO WA_ZMVXREF
                            WITH KEY D_ALTKN = WA_RECORD-LIFNR
                                     D_BUKRS = P_BUKRS
                            BINARY SEARCH.
                IF SY-SUBRC EQ 0.
                  READ TABLE I_LFA1 INTO WA_LFA1
                             WITH KEY LIFNR = WA_ZMVXREF-M_ALTKN
                             BINARY SEARCH.
                  IF SY-SUBRC EQ 0.
                    V_CROSS_REFERENCE_ERROR = C_VEN_SUCS.
                  ELSE.
                    V_CROSS_REFERENCE_ERROR = C_VEN_ERR2.
                  ENDIF.
                ELSE.
                  V_CROSS_REFERENCE_ERROR = C_VEN_ERR1.
                ENDIF.
              ENDIF.
    * Legacy Vendor could not be mapped
              IF V_CROSS_REFERENCE_ERROR EQ C_VEN_ERR1.
            V_INPUTERROR_FLAG = C_INPUTERROR_FLAG_YES. "Inp.file err. occurd
                WA_RECORD-DEL_FLAG = C_TRUE.
                WA_RECORD-ERR_MSG = TEXT-007.
                MODIFY I_RECORD FROM WA_RECORD
                                TRANSPORTING DEL_FLAG
                                             ERR_MSG
                                WHERE LIFNR = WA_RECORD-LIFNR.
    * Legacy Vendor is mapped but the obtained SAP vendor doesn't exist.
              ELSEIF V_CROSS_REFERENCE_ERROR EQ C_VEN_ERR2.
    *           Inp.file err. occurd
                V_INPUTERROR_FLAG = C_INPUTERROR_FLAG_YES.
                WA_RECORD-DEL_FLAG = C_TRUE.
                WA_RECORD-ERR_MSG = TEXT-008.
                MODIFY I_RECORD FROM WA_RECORD
                                TRANSPORTING DEL_FLAG
                                             ERR_MSG
                                WHERE LIFNR = WA_RECORD-LIFNR.
    * Purchase Organization doesn't exist in T024E.
              ELSEIF V_CROSS_REFERENCE_ERROR EQ C_VEN_ERR3.
    *             Inp.file err. occurd
                V_INPUTERROR_FLAG = C_INPUTERROR_FLAG_YES.
                WA_RECORD-DEL_FLAG = C_TRUE.
                WA_RECORD-ERR_MSG = TEXT-014.
                MODIFY I_RECORD FROM WA_RECORD
                                TRANSPORTING DEL_FLAG
                                             ERR_MSG
                                WHERE EKORG = WA_RECORD-EKORG.
    * Vendor is mapped and validated successfully
              ELSEIF V_CROSS_REFERENCE_ERROR EQ C_VEN_SUCS.
    * Checking for the deletion indicator for that record
                CONCATENATE WA_RECORD-KDATB+6(4)
                            WA_RECORD-KDATB+3(2)
                            WA_RECORD-KDATB+0(2)
                            INTO
                            L_STARTDATE.
                MOVE L_STARTDATE TO L_STARTDATE_C.
                CONCATENATE WA_RECORD-KDATB+6(4)
                            WA_RECORD-KDATB+0(2)
                            WA_RECORD-KDATB+3(2)
                            INTO
                            L_STARTDATE_C1.
                CONCATENATE WA_RECORD-KDATE+6(4)
                            WA_RECORD-KDATE+3(2)
                            WA_RECORD-KDATE+0(2)
                            INTO
                            L_ENDDATE.
                MOVE L_ENDDATE TO L_ENDDATE_C.
                CONCATENATE WA_RECORD-KDATE+6(4)
                            WA_RECORD-KDATE+0(2)
                            WA_RECORD-KDATE+3(2)
                            INTO
                            L_ENDDATE_C1.
                READ TABLE I_LOEKZ INTO WA_LOEKZ WITH KEY
                                                 EMATN = WA_RECORD-EMATN
                                                 WERKS = WA_RECORD-WERKS
                                                 LGORT = WA_RECORD-LGORT
                                                 BINARY SEARCH.
                IF SY-SUBRC EQ 0.
    *             Inpfle err.occured
                  V_INPUTERROR_FLAG = C_INPUTERROR_FLAG_YES.
                  WA_RECORD-ERR_MSG = TEXT-003.
                  WA_RECORD-DEL_FLAG = C_TRUE.    "marking the record
                  MODIFY I_RECORD FROM WA_RECORD
                                  TRANSPORTING DEL_FLAG
                                                ERR_MSG
                                  WHERE LIFNR = WA_RECORD-LIFNR
                                    AND EVART = WA_RECORD-EVART
                                    AND EKORG = WA_RECORD-EKORG
                                    AND EKGRP = WA_RECORD-EKGRP
                                    AND WERKS = WA_RECORD-WERKS
                                    AND LGORT = WA_RECORD-LGORT
                                    AND KDATB = WA_RECORD-KDATB
                                    AND KDATE = WA_RECORD-KDATE
                                    AND ZTERM = WA_RECORD-ZTERM
                                    AND KTWRT = WA_RECORD-KTWRT
                                    AND EPSTP = WA_RECORD-EPSTP
                                    AND EMATN = WA_RECORD-EMATN.
    * Validating the Purchasing Organization for Blank/Null
                ELSEIF WA_RECORD-EKORG IS INITIAL.
    *             Inpfle err.occured
                  V_INPUTERROR_FLAG = C_INPUTERROR_FLAG_YES.
                  WA_RECORD-ERR_MSG = TEXT-010.
                  WA_RECORD-DEL_FLAG = C_TRUE.
                  MODIFY I_RECORD FROM WA_RECORD
                                  TRANSPORTING DEL_FLAG
                                               ERR_MSG
                                  WHERE LIFNR = WA_RECORD-LIFNR
                                    AND EVART = WA_RECORD-EVART
                                    AND EKORG = WA_RECORD-EKORG
                                    AND EKGRP = WA_RECORD-EKGRP
                                    AND WERKS = WA_RECORD-WERKS
                                    AND LGORT = WA_RECORD-LGORT
                                    AND KDATB = WA_RECORD-KDATB
                                    AND KDATE = WA_RECORD-KDATE
                                    AND ZTERM = WA_RECORD-ZTERM
                                    AND KTWRT = WA_RECORD-KTWRT
                                    AND EPSTP = WA_RECORD-EPSTP
                                    AND EMATN = WA_RECORD-EMATN.
    * Validating the Plant for Blank/Null
                ELSEIF WA_RECORD-WERKS IS INITIAL.
    *             Inpfle err.occured
                  V_INPUTERROR_FLAG = C_INPUTERROR_FLAG_YES.
                  WA_RECORD-ERR_MSG = TEXT-039.
                  WA_RECORD-DEL_FLAG = C_TRUE.
                  MODIFY I_RECORD FROM WA_RECORD
                                  TRANSPORTING DEL_FLAG
                                               ERR_MSG
                                  WHERE LIFNR = WA_RECORD-LIFNR
                                    AND EVART = WA_RECORD-EVART
                                    AND EKORG = WA_RECORD-EKORG
                                    AND EKGRP = WA_RECORD-EKGRP
                                    AND WERKS = WA_RECORD-WERKS
                                    AND LGORT = WA_RECORD-LGORT
                                    AND KDATB = WA_RECORD-KDATB
                                    AND KDATE = WA_RECORD-KDATE
                                    AND ZTERM = WA_RECORD-ZTERM
                                    AND KTWRT = WA_RECORD-KTWRT
                                    AND EPSTP = WA_RECORD-EPSTP
                                    AND EMATN = WA_RECORD-EMATN.
    * Validating the Contract Validity Start Date
                ELSEIF L_STARTDATE_C1 GT L_TODAY.             "#EC PORTABLE
    *             Inpfle err.occured
                  V_INPUTERROR_FLAG = C_INPUTERROR_FLAG_YES.
                  WA_RECORD-ERR_MSG = TEXT-004.
                  WA_RECORD-DEL_FLAG = C_TRUE.      "marking the record
                  MODIFY I_RECORD FROM WA_RECORD
                                  TRANSPORTING DEL_FLAG
                                               ERR_MSG
                                  WHERE LIFNR = WA_RECORD-LIFNR
                                    AND EVART = WA_RECORD-EVART
                                    AND EKORG = WA_RECORD-EKORG
                                    AND EKGRP = WA_RECORD-EKGRP
                                    AND WERKS = WA_RECORD-WERKS
                                    AND LGORT = WA_RECORD-LGORT
                                    AND KDATB = WA_RECORD-KDATB.
    * Validating the Contract Validity End Date
                ELSEIF L_ENDDATE_C1 LE L_TODAY.               "#EC PORTABLE
    *             Inpfle err.ocrd
                  V_INPUTERROR_FLAG = C_INPUTERROR_FLAG_YES.
                  WA_RECORD-ERR_MSG = TEXT-005.
                  WA_RECORD-DEL_FLAG = C_TRUE.    "marking the record
                  MODIFY I_RECORD FROM WA_RECORD
                                  TRANSPORTING DEL_FLAG
                                               ERR_MSG
                                  WHERE LIFNR = WA_RECORD-LIFNR
                                    AND EVART = WA_RECORD-EVART
                                    AND EKORG = WA_RECORD-EKORG
                                    AND EKGRP = WA_RECORD-EKGRP
                                    AND WERKS = WA_RECORD-WERKS
                                    AND LGORT = WA_RECORD-LGORT
                                    AND KDATB = WA_RECORD-KDATB
                                    AND KDATE = WA_RECORD-KDATE.
    * Checking for Material under the Plant for Agreement Type 'WK'
                ELSEIF WA_RECORD-EVART = C_WK.
                  READ TABLE I_MATNR INTO WA_MATNR
                                     WITH KEY MATNR = WA_RECORD-EMATN
                                     BINARY SEARCH.
                  IF SY-SUBRC NE 0.
                 V_INPUTERROR_FLAG = C_INPUTERROR_FLAG_YES. "Inpfle err.ocrd
                    WA_RECORD-ERR_MSG = TEXT-006.
                    WA_RECORD-DEL_FLAG = C_TRUE.   "marking the record
                    MODIFY I_RECORD FROM WA_RECORD
                                    TRANSPORTING DEL_FLAG
                                                 ERR_MSG
                                    WHERE LIFNR = WA_RECORD-LIFNR
                                      AND EVART = WA_RECORD-EVART
                                      AND EKORG = WA_RECORD-EKORG
                                      AND EKGRP = WA_RECORD-EKGRP
                                      AND WERKS = WA_RECORD-WERKS
                                      AND LGORT = WA_RECORD-LGORT
                                      AND KDATB = WA_RECORD-KDATB
                                      AND KDATE = WA_RECORD-KDATE
                                      AND ZTERM = WA_RECORD-ZTERM
                                      AND KTWRT = WA_RECORD-KTWRT
                                      AND EPSTP = WA_RECORD-EPSTP
                                      AND EMATN = WA_RECORD-EMATN.
                  ENDIF.
                ENDIF.  " checking of deletion indicator
              ENDIF.   " checking for success of vendor cross reference
            ELSE.
              V_INPUTERROR_FLAG = C_INPUTERROR_FLAG_YES. "Inpfle err.ocrd
              WA_RECORD-ERR_MSG = TEXT-041.
              WA_RECORD-DEL_FLAG = C_TRUE.   "marking the record
              MODIFY I_RECORD FROM WA_RECORD
                              TRANSPORTING DEL_FLAG
                                           ERR_MSG
                              WHERE WERKS = WA_RECORD-WERKS.
            ENDIF. " Plant checked to selection screen
          ENDIF.  " the records for which del_flag is initial
          CLEAR: WA_RECORD,
                 WA_T024E,
                 WA_ZMVXREF,
                 WA_LFA1,
                 WA_LOEKZ,
                 WA_MATNR,
                 L_TODAY,
                 L_STARTDATE_C,
                 L_ENDDATE_C,
                 L_STARTDATE,
                 L_ENDDATE.
        ENDLOOP.
        LOOP AT I_RECORD INTO WA_RECORD.
          IF WA_RECORD-DEL_FLAG = C_TRUE.
            APPEND WA_RECORD TO I_ERR_REC.
            CLEAR WA_RECORD.
          ENDIF.
        ENDLOOP.
      ELSE.
        MESSAGE E000 WITH TEXT-013.  " no records in the flat file
        STOP.
      ENDIF.
    ENDFORM.                    " validate_flatfile_data
    *&      Form  DOWNLOAD_ERROR_FILE
    *       Downloads all records along with the records encountering the
    *       input file validation error
    FORM DOWNLOAD_ERROR_FILE.
      DATA L_ISDIR TYPE C.
      IF V_INPUTERROR_FLAG = C_INPUTERROR_FLAG_YES.
        V_FILENAME = P_IPERR.
    * Check for the existence of the file.
        IF RB_LOCAL EQ C_TRUE.
          CALL FUNCTION 'TMP_GUI_GET_FILE_EXIST'
               EXPORTING
                    FNAME          = P_IPERR
               IMPORTING
                    ISDIR          = L_ISDIR
               EXCEPTIONS
                    FILEINFO_ERROR = 1
                    OTHERS         = 2.
          IF SY-SUBRC <> 0.
            MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
          IF L_ISDIR EQ C_TRUE.
            MESSAGE I000 WITH TEXT-088.
            STOP.
          ENDIF.
        ENDIF.
        IF RB_LOCAL EQ C_TRUE.
    * Download the Input Error File.
          CALL FUNCTION 'GUI_DOWNLOAD'
               EXPORTING
                    FILENAME                = V_FILENAME
                    FILETYPE                = 'ASC'
                    WRITE_FIELD_SEPARATOR   = '#'
               TABLES
                    DATA_TAB                = I_ERR_REC
               EXCEPTIONS
                    FILE_WRITE_ERROR        = 1
                    NO_BATCH                = 2
                    GUI_REFUSE_FILETRANSFER = 3
                    INVALID_TYPE            = 4
                    NO_AUTHORITY            = 5
                    UNKNOWN_ERROR           = 6
                    HEADER_NOT_ALLOWED      = 7
                    SEPARATOR_NOT_ALLOWED   = 8
                    FILESIZE_NOT_ALLOWED    = 9
                    HEADER_TOO_LONG         = 10
                    DP_ERROR_CREATE         = 11
                    DP_ERROR_SEND           = 12
                    DP_ERROR_WRITE          = 13
                    UNKNOWN_DP_ERROR        = 14
                    ACCESS_DENIED           = 15
                    DP_OUT_OF_MEMORY        = 16
                    DISK_FULL               = 17
                    DP_TIMEOUT              = 18
                    FILE_NOT_FOUND          = 19
                    DATAPROVIDER_EXCEPTION  = 20
                    CONTROL_FLUSH_ERROR     = 21
                    OTHERS                  = 22.
          IF SY-SUBRC <> 0.
            MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
        ELSEIF RB_SERVE EQ C_TRUE.
          OPEN DATASET P_IPERR1 FOR OUTPUT IN TEXT MODE.
          CHECK SY-SUBRC EQ 0.
          CLEAR WA_ERR_REC.
          LOOP AT I_ERR_REC INTO WA_ERR_REC.
            IF WA_ERR_REC-DEL_FLAG = C_TRUE.
              TRANSFER WA_ERR_REC TO P_IPERR1.
            ENDIF.
            CLEAR WA_ERR_REC.
          ENDLOOP.
          CLOSE DATASET P_IPERR1.
        ENDIF.
      ENDIF.
    ENDFORM.                    " DOWNLOAD_ERROR_FILE
    *&      Form  BUILD_BDC_DATA
    * Populates BDC for all the fields neccessary for Open Contract Creation
    FORM BUILD_BDC_DATA.
      DATA: L_MAT_INDEX TYPE I,
            L_CON_INDEX TYPE I,
            L_SCA_INDEX TYPE I.
      CLEAR   WA_BDCDATA.
      REFRESH: I_BDCDATA,
               I_MESSTAB.
    * Processing the bdc
      CLEAR: WA_RECORD,
             WA_RECORDPREV,
             VEN_FLAG,
             MAT_FLAG.
      LOOP AT I_RECORD INTO WA_RECORD.
    *    Checks for the del_flag of the record.
        IF     WA_RECORD-DEL_FLAG EQ C_TRUE
            OR WA_RECORD-DEL_FLAG EQ C_STRUE.
          CLEAR WA_RECORD.
          CONTINUE.
        ELSE.
          IF  WA_RECORDPREV-LIFNR NE WA_RECORD-LIFNR
           OR WA_RECORDPREV-EVART NE WA_RECORD-EVART
           OR WA_RECORDPREV-EKORG NE WA_RECORD-EKORG
           OR WA_RECORDPREV-EKGRP NE WA_RECORD-EKGRP
           OR WA_RECORDPREV-WERKS NE WA_RECORD-WERKS
           OR WA_RECORDPREV-LGORT NE WA_RECORD-LGORT
           OR WA_RECORDPREV-KDATB NE WA_RECORD-KDATB
           OR WA_RECORDPREV-KDATE NE WA_RECORD-KDATE
           OR WA_RECORDPREV-ZTERM NE WA_RECORD-ZTERM
           OR WA_RECORDPREV-KTWRT NE WA_RECORD-KTWRT.
            PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0200'.
            PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                          'RM06E-LGORT'.
            PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                          '/00'.
    *   Cross-Reference check performed for the given Vendors
            CLEAR WA_T024E.
            READ TABLE I_T024E INTO WA_T024E
                               WITH KEY EKORG = WA_RECORD-EKORG
                               BINARY SEARCH.
            IF SY-SUBRC EQ 0.
              CLEAR WA_ZMVXREF.
              READ TABLE I_ZMVXREF INTO WA_ZMVXREF
                          WITH KEY D_ALTKN = WA_RECORD-LIFNR
                                   D_BUKRS = P_BUKRS
                          BINARY SEARCH.
              IF SY-SUBRC EQ 0.
                PERFORM BDC_FIELD   USING 'EKKO-LIFNR'
                                           WA_ZMVXREF-M_ALTKN.
              ENDIF.
              CLEAR WA_ZMVXREF.
            ENDIF.
            CLEAR WA_T024E.
            PERFORM BDC_FIELD       USING 'RM06E-EVART'
                                          WA_RECORD-EVART.
            PERFORM BDC_FIELD       USING 'EKKO-EKORG'
                                          WA_RECORD-EKORG.
            PERFORM BDC_FIELD       USING 'EKKO-EKGRP'
                                          WA_RECORD-EKGRP.
            PERFORM BDC_FIELD       USING 'RM06E-WERKS'
                                          WA_RECORD-WERKS.
            PERFORM BDC_FIELD       USING 'RM06E-LGORT'
                                          WA_RECORD-LGORT.
            PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0201'.
            PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                          'EKKO-KTWRT'.
            PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                          '=AB'.
            PERFORM CONVERT_DATE USING WA_RECORD-KDATB V_CONV_DATE.
            PERFORM BDC_FIELD       USING 'EKKO-KDATB'
                                          V_CONV_DATE.
            PERFORM CONVERT_DATE USING WA_RECORD-KDATE V_CONV_DATE.
            PERFORM BDC_FIELD       USING 'EKKO-KDATE'
                                          V_CONV_DATE.
            PERFORM BDC_FIELD       USING 'EKKO-ZTERM'
                                          WA_RECORD-ZTERM.
            PERFORM BDC_FIELD       USING 'EKKO-KTWRT'
                                            WA_RECORD-KTWRT.
            VEN_FLAG = 1.
            L_MAT_INDEX = 1. "index for table-control of material
          ENDIF.
    *          "first check for itemline
          IF  WA_RECORDPREV-EPSTP NE WA_RECORD-EPSTP
           OR WA_RECORDPREV-EMATN NE WA_RECORD-EMATN
           OR WA_RECORDPREV-KTMNG NE WA_RECORD-KTMNG
           OR WA_RECORDPREV-NETPR NE WA_RECORD-NETPR
           OR WA_RECORDPREV-PEINH NE WA_RECORD-PEINH
           OR WA_RECORDPREV-BPRME NE WA_RECORD-BPRME
           OR WA_RECORDPREV-IDNLF NE WA_RECORD-IDNLF
           OR WA_RECORDPREV-WEBRE NE WA_RECORD-WEBRE
           OR WA_RECORDPREV-MEPRF NE WA_RECORD-MEPRF
           OR WA_RECORDPREV-LTEX1 NE WA_RECORD-LTEX1
           OR VEN_FLAG EQ 1.
            V_IND = L_MAT_INDEX.
            IF V_IND GT 1.
              V_IND = 2.
            ENDIF.
            CONCATENATE 'RM06E-EVRTP(' V_IND ')' INTO V_EVRTP1.
            CONCATENATE 'RM06E-EPSTP(' V_IND ')' INTO V_EPSTP1.
            CONCATENATE 'EKPO-EMATN(' V_IND ')' INTO V_EMATN1.
            CONCATENATE 'EKPO-KTMNG(' V_IND ')' INTO V_KTMNG1.
            CONCATENATE 'EKPO-NETPR(' V_IND ')' INTO V_NETPR1.
            CONCATENATE 'EKPO-PEINH(' V_IND ')' INTO V_PEINH1.
            CONCATENATE 'EKPO-BPRME(' V_IND ')' INTO V_BPRME1.
            CONCATENATE 'RM06E-TCSELFLAG(' V_IND ')' INTO V_TCSELFLAG1.
            PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0220'.
            PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                          '=NP'.
            PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0220'.
            PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                          V_EVRTP1.
            PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                          '=DETA'.
            PERFORM BDC_FIELD       USING V_EPSTP1
                                          WA_RECORD-EPSTP.
            PERFORM BDC_FIELD       USING V_EMATN1
                                          WA_RECORD-EMATN.
            PERFORM BDC_FIELD       USING V_KTMNG1
                                          WA_RECORD-KTMNG.
            PERFORM BDC_FIELD       USING V_NETPR1
                                          WA_RECORD-NETPR.
            PERFORM BDC_FIELD       USING V_PEINH1
                                          WA_RECORD-PEINH.
            PERFORM BDC_FIELD       USING V_BPRME1
                                          WA_RECORD-BPRME.
            PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0211'.
            PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                          'EKPO-WEBRE'.
            PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                          '=DETZ'.
            PERFORM BDC_FIELD       USING 'EKPO-IDNLF'
                                          WA_RECORD-IDNLF.
            TRANSLATE WA_RECORD-EVART TO UPPER CASE.
            IF WA_RECORD-EVART EQ C_WK.
              PERFORM BDC_FIELD       USING 'EKPO-WEBRE' 'X'.
            ENDIF.
            PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0212'.
            PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                          'EKPO-MEPRF'.
            PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                          '=TXP'.
            PERFORM BDC_FIELD       USING 'EKPO-MEPRF'
                                          WA_RECORD-MEPRF.
            IF NOT WA_RECORD-LTEX1 IS INITIAL. "NE space.
              PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0106'.
              PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                            'RM06E-SELKZ(02)'.
              PERFORM BDC_FIELD 

  • Any info about EDT (External Data transfer)

    Hi,
    I am working in insurance module of SAP. There is a business object called Business Partner which we need to migrate from legacy to R/3.
    Now for migration of Business partner generally LSMW is not used. People here use EDT (External data transfer).
    Does some one know about EDT as data transfer tools ?
    Regards,
    Rajesh.

    Hi Rajesh,
    Please check this EDT online document.
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CADATA/CADATA.pdf
    Hope this will help.
    Regards,
    Ferry Lianto
    Please reward points if helpful.

  • Data transfer using BAPI'S

    please get me the detailed procedure  ( including code) of any data transfer program using BAPI's

    check the sample code....it is used to transfer the data to MM01 tcode.
    *TO CREATE MATERIAL USING BAPI.
    STRUCTURE DECLARATIONS *
    TABLES: BAPIMATHEAD, "Headerdata
    BAPI_MARA, "Clientdata
    BAPI_MARAX, "Clientdatax
    BAPI_MARC, "Plantdata
    BAPI_MARCX, "Plantdatax
    BAPI_MAKT, "Material description
    BAPI_MBEW, "VALUATION DATA
    BAPI_MBEWX,
    BAPI_MARM,
    BAPI_MARMX,
    bapi_mean,
    BAPIRET2. "Return messages
    DATA:V_FILE TYPE STRING. "input data file
    DATA:
    BEGIN OF LSMW_MATERIAL_MASTER,
    MATNR(018) TYPE C, "Material number
    MTART(004) TYPE C, "Material type
    MBRSH(001) TYPE C, "Industry sector
    WERKS(004) TYPE C, "Plant
    MAKTX(040) TYPE C, "Material description
    DISMM(002) TYPE C, "Extra Field Added In the Program as itsrequired
    MEINS(003) TYPE C, "Base unit of measure
    MATKL(009) TYPE C, "Material group
    SPART(002) TYPE C, "Division
    LABOR(003) TYPE C, "Lab/office
    PRDHA(018) TYPE C, "Product hierarchy
    MSTAE(002) TYPE C, "X-plant matl status
    MTPOS_MARA(004) TYPE C, "Gen item cat group
    BRGEW(017) TYPE C, "Gross weight
    GEWEI(003) TYPE C, "Weight unit NTGEW(017) TYPE C, "Net weight
    GROES(032) TYPE C, "Size/Dimensions
    MAGRV(004) TYPE C, "Matl grp pack matls
    BISMT(018) TYPE C, "Old material number
    WRKST(048) TYPE C, "Basic material
    PROFL(003) TYPE C, "DG indicator profile
    KZUMW(001) TYPE C, "Environmentally rlvt
    BSTME(003) TYPE C, "Order unit
    VABME(001) TYPE C,
    EKGRP(003) TYPE C, "Purchasing group
    XCHPF(001) TYPE C, "Batch management
    EKWSL(004) TYPE C, "Purchasing key value
    WEBAZ(003) TYPE C, "GR processing time
    MFRPN(040) TYPE C, "Manufacturer part number
    MFRNR(010) TYPE C, "Manufacturer number
    VPRSV(001) TYPE C, "Price control indicator
    STPRS(015) TYPE C, "Standard price
    BWPRH(014) TYPE C, "Commercial price1
    BKLAS(004) TYPE C, "Valuation class
    bwkey(004) type c,
    END OF LSMW_MATERIAL_MASTER.
    INTERNAL TABLE DECLARATIONS *
    *to store the input data
    DATA:
    BEGIN OF it_matmaster OCCURS 0.
    INCLUDE STRUCTURE LSMW_MATERIAL_MASTER.
    DATA:
    END OF it_matmaster.
    *for material description
    DATA:BEGIN OF IT_MATERIALDESC OCCURS 0.
    INCLUDE STRUCTURE BAPI_MAKT .
    DATA:END OF IT_MATERIALDESC.
    *FOR gross wt
    data: begin of it_uom occurs 0.
    include structure BAPI_MARM.
    data:end of it_uom.
    DATA: BEGIN OF IT_UOMX OCCURS 0.
    INCLUDE STRUCTURE BAPI_MARMX.
    DATA:END OF IT_UOMX.
    data:begin of it_mean occurs 0.
    include structure bapi_mean.
    data:end of it_mean.
    DATA:BEGIN OF IT_MLTX OCCURS 0.
    INCLUDE STRUCTURE BAPI_MLTX.
    DATA:END OF IT_MLTX.
    *to return messages
    DATA:BEGIN OF IT_RETURN OCCURS 0.
    INCLUDE STRUCTURE BAPIRET2.
    DATA:END OF IT_RETURN.
    SELECTION SCREEN *
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-002.
    PARAMETERS:P_FILE LIKE RLGRAP-FILENAME OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK B1 .
    AT SELECTION SCREEN *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
    PROGRAM_NAME = SYST-CPROG
    DYNPRO_NUMBER = SYST-DYNNR
    FIELD_NAME = 'P_FILE'
    IMPORTING
    FILE_NAME = P_FILE.
    TO UPLOAD THE DATA *
    START-OF-SELECTION.
    V_FILE = P_FILE.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = V_FILE
    FILETYPE = 'ASC'
    HAS_FIELD_SEPARATOR = 'X'
    HEADER_LENGTH = 0
    READ_BY_LINE = 'X'
    DAT_MODE = ' '
    IMPORTING
    FILELENGTH =
    HEADER =
    tables
    data_tab = IT_MATMASTER
    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
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *ELSE.
    *DELETE IT_MATMASTER INDEX 1.
    ENDIF.
    DATA POPULATIONS *
    LOOP AT IT_MATMASTER.
    *HEADER DATA
    BAPIMATHEAD-MATERIAL = IT_MATMASTER-MATNR.
    BAPIMATHEAD-IND_SECTOR = IT_MATMASTER-Mbrsh.
    BAPIMATHEAD-MATL_TYPE = IT_MATMASTER-Mtart.
    BAPIMATHEAD-BASIC_VIEW = 'X'.
    BAPIMATHEAD-PURCHASE_VIEW = 'X'.
    BAPIMATHEAD-ACCOUNT_VIEW = 'X'.
    *CLIENTDATA
    BAPI_MARA-MATL_GROUP = IT_MATMASTER-MATKL.
    BAPI_MARA-DIVISION = IT_MATMASTER-SPART.
    BAPI_MARA-DSN_OFFICE = IT_MATMASTER-LABOR.
    BAPI_MARA-PROD_HIER = IT_MATMASTER-PRDHA.
    BAPI_MARA-PUR_STATUS = IT_MATMASTER-MSTAE.
    BAPI_MARA-ITEM_CAT = IT_MATMASTER-MTPOS_MARA.
    BAPI_MARA-NET_WEIGHT = IT_MATMASTER-NTGEW.
    BAPI_MARA-PO_UNIT = 'KG'.
    BAPI_MARA-UNIT_OF_WT_ISO = 'KG'.
    BAPI_MARA-UNIT_OF_WT = 'KG'.
    BAPI_MARA-PACK_VO_UN = 'KG'.
    BAPI_MARA-BASE_UOM_ISO = 'KG'.
    bapi_mara-size_dim = it_matmaster-groes.
    BAPI_MARA-MAT_GRP_SM = IT_MATMASTER-MAGRV.
    BAPI_MARA-OLD_MAT_NO = IT_MATMASTER-BISMT.
    BAPI_MARA-BASE_UOM = IT_MATMASTER-MEINS.
    BAPI_MARA-BASIC_MATL = IT_MATMASTER-WRKST.
    BAPI_MARA-HAZMATPROF = IT_MATMASTER-PROFL.
    BAPI_MARA-ENVT_RLVT = IT_MATMASTER-KZUMW.
    BAPI_MARA-PO_UNIT = IT_MATMASTER-BSTME.
    BAPI_MARA-VAR_ORD_UN = IT_MATMASTER-VABME.
    BAPI_MARA-PUR_VALKEY = IT_MATMASTER-EKWSL.
    BAPI_MARA-MANU_MAT = IT_MATMASTER-MFRPN.
    BAPI_MARA-MFR_NO = IT_MATMASTER-MFRNR.
    BAPI_MARAX-MATL_GROUP = 'X'.
    BAPI_MARAX-DIVISION = 'X'.
    BAPI_MARAX-DSN_OFFICE = 'X'.
    BAPI_MARAX-PROD_HIER = 'X'.
    BAPI_MARAX-PUR_STATUS = 'X'.
    BAPI_MARAX-ITEM_CAT = 'X'.
    BAPI_MARAX-NET_WEIGHT = 'X'.
    BAPI_MARAX-UNIT_OF_WT = 'X'.
    BAPI_MARAX-UNIT_OF_WT_ISO = 'X'.
    bapi_maraX-size_dim = 'X'.
    BAPI_MARAX-MAT_GRP_SM = 'X'.
    BAPI_MARAX-OLD_MAT_NO = 'X'.
    BAPI_MARAX-BASE_UOM = 'X'.
    BAPI_MARAX-BASE_UOM_ISO = 'X'.
    BAPI_MARAX-BASIC_MATL = 'X'.
    BAPI_MARAX-MFR_NO = 'X'.
    BAPI_MARAX-HAZMATPROF = 'X'.
    BAPI_MARAX-ENVT_RLVT = 'X'.
    BAPI_MARAX-PO_UNIT = 'X'.
    BAPI_MARAX-PACK_VO_UN = 'X'.
    BAPI_MARAX-VAR_ORD_UN = 'X'.
    BAPI_MARAX-PUR_VALKEY = 'X'.
    BAPI_MARAX-MANU_MAT = 'X'.
    BAPI_MARAX-MFR_NO = 'X'.
    *PLANT DATA
    BAPI_MARC-PLANT = IT_MATMASTER-WERKS.
    BAPI_MARC-PUR_GROUP = IT_MATMASTER-EKGRP.
    BAPI_MARC-BATCH_MGMT = IT_MATMASTER-XCHPF.
    BAPI_MARC-GR_PR_TIME = IT_MATMASTER-WEBAZ.
    BAPI_MARCX-PLANT = IT_MATMASTER-WERKS.
    BAPI_MARCX-PUR_GROUP = 'X'.
    BAPI_MARCX-BATCH_MGMT = 'X'.
    BAPI_MARCX-GR_PR_TIME = 'X'.
    *VALUATION DATA
    BAPI_MBEW-PRICE_CTRL = IT_MATMASTER-VPRSV.
    BAPI_MBEW-STD_PRICE = IT_MATMASTER-STPRS.
    BAPI_MBEW-COMMPRICE1 = IT_MATMASTER-BWPRH.
    BAPI_MBEW-VAL_AREA = IT_MATMASTER-BWKEY.
    BAPI_MBEW-VAL_CLASS = IT_MATMASTER-BKLAS.
    BAPI_MBEWX-PRICE_CTRL = 'X'.
    BAPI_MBEWX-STD_PRICE = 'X'.
    BAPI_MBEWX-COMMPRICE1 = 'X'.
    BAPI_MBEWX-VAL_AREA = IT_MATMASTER-BWKEY.
    BAPI_MBEWX-VAL_CLASS = 'X'.
    IT_MATERIALDESC-LANGU = 'EN'.
    IT_MATERIALDESC-MATL_DESC = IT_MATMASTER-MAKTX.
    append IT_materialdesc.
    IT_UOM-GROSS_WT = IT_MATMASTER-BRGEW.
    IT_UOM-ALT_UNIT = 'KG'.
    IT_UOM-ALT_UNIT_ISO = 'KG'.
    IT_UOM-UNIT_OF_WT = IT_MATMASTER-GEWEI.
    APPEND IT_UOM.
    IT_UOMX-GROSS_WT = 'X'.
    IT_UOMX-ALT_UNIT = 'KG'.
    IT_UOMX-ALT_UNIT_ISO = 'KG'.
    IT_UOMX-UNIT_OF_WT = 'X'.
    APPEND IT_UOMX.
    it_mean-unit = 'KD3'.
    append it_mean.
    it_mltx-langu = 'E'.
    it_mltx-text_name = it_matmaster-matnr.
    APPEND IT_MLTX.
    CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
    EXPORTING
    headdata = BAPIMATHEAD
    CLIENTDATA = BAPI_MARA
    CLIENTDATAX = BAPI_MARAx
    PLANTDATA = BAPI_MARc
    PLANTDATAX = BAPI_MARcx
    FORECASTPARAMETERS =
    FORECASTPARAMETERSX =
    PLANNINGDATA =
    PLANNINGDATAX =
    STORAGELOCATIONDATA =
    STORAGELOCATIONDATAX =
    VALUATIONDATA = BAPI_MBEW
    VALUATIONDATAX = BAPI_MBEWX
    WAREHOUSENUMBERDATA =
    WAREHOUSENUMBERDATAX =
    SALESDATA =
    SALESDATAX =
    STORAGETYPEDATA =
    STORAGETYPEDATAX =
    FLAG_ONLINE = ' '
    FLAG_CAD_CALL = ' '
    IMPORTING
    RETURN = IT_RETURN
    TABLES
    MATERIALDESCRIPTION = IT_MATERIALDESC
    UNITSOFMEASURE = IT_UOM
    UNITSOFMEASUREX = IT_UOMX
    INTERNATIONALARTNOS = it_mean
    MATERIALLONGTEXT = IT_MLTX
    TAXCLASSIFICATIONS =
    RETURNMESSAGES =
    PRTDATA =
    PRTDATAX =
    EXTENSIONIN =
    EXTENSIONINX =
    read table it_return with key TYPE = 'S'.
    if sy-subrc = 0.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    WAIT =
    IMPORTING
    RETURN =
    *else.
    *CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'
    IMPORTING
    RETURN =
    endif.
    WRITE:/ IT_RETURN-TYPE,
    2 IT_RETURN-ID,
    22 IT_RETURN-NUMBER,
    25 IT_RETURN-MESSAGE.
    IT_RETURN-LOG_NO,
    IT_RETURN-LOG_MSG_NO,
    IT_RETURN-MESSAGE_V1,
    IT_RETURN-MESSAGE_V2,
    IT_RETURN-MESSAGE_V3,
    IT_RETURN-MESSAGE_V4,
    IT_RETURN-PARAMETER,
    IT_RETURN-ROW,
    IT_RETURN-FIELD,
    IT_RETURN-SYSTEM.
    ENDLOOP.[/code]
    Reward if useful.
    Dara.

Maybe you are looking for

  • FLASH BIOS MSI K7N2 Delta-ILSR ????????

    I am trying to flash the BIOS of my K7N2 Delta-ILSR board. I follwed all the instructions from the MSI Web but I can't get it going. I booted from Win ME & Win98 but could not get into C: drive. So I used Command Prompt from Window to get  into the C

  • Oracle 10g express edition recovery catalog

    whether oracle 10g express edition spoort recovery catalog?

  • Sccm enterprise by site overview compliance report

    in Config mgr 2007 i had a query that would pull basic compliance ratings for all the sub collections of a single parent collection, displaying the breakdown in a per site bar graph percentage compliance report With the migration to CM12 and it not h

  • Where on this site can I find NI-DAQ downloads ?

    I just simply wish to find out what versions are they up to now. Also want a version for Win XP. Cannot find an actual download here ! Best regards, Manfred. Why is NI-DAQ nowhere listed ?

  • Implementing BADI TRIP_WEB_NUMBER, problem reading a field

    Hi All, Have anyone implemented BADI TRIP_WEB_NUMBER before, Interface : IF_EX_TRIP_WEB_NUMBER Method:     USER_EXIT_NUMBER_INTERNAL I need a help. In this method i have exporting parameter NUMBER_RANGE TYPE INRI-NRRANGENR so my requirement is just t