LSMW - Error Capturing

Hi
1.Using the LSMW interface i want to upload my Purchase order data from the flat file .
And i want to Capture the Error Records which is to be displayed in ALV format ,
Success Records in SAP Script.
Provide me the sample code or links which will guide me to proceed further .
2. Kindly tell in detail with code how to link LSMW with Report Program (SE38).
Regards
Vel.

Hi,
In the 5th step (Maintain field mapping and conversion routines) we can write the code, in this step we will get normal abap editor.
here you can declared the fileds, internal tables and you can call function modules.
You can capture the records into the internaltable then you can populate the same
Thanks
Ramakrishna Pathi

Similar Messages

  • Is there a custom function available which can be used for logging errors captured in a sp in a sql table

    Is there a custom function  available which can be used for logging errors captured in a sp during and after execution in a sql table?
    Basically we  would like to utilize such function  in every sp and log errors of each sp in a error log table
    Mudassar

    Thanks .
    I was able to write this however I am thinking I am missing something
    CREATE FUNCTION testfunction1()
    RETURNS @temp_error TABLE (
    id int identity(1,1),
    procedure_name varchar(255),
    line_number int,
    error_number int,
    error_message varchar(max),
    error_state int,
    error_severity int,
    occurence_datetime datetime default current_timestamp,
    user_name sysname default suser_name(),
    login_name sysname default suser_name()
    AS
    BEGIN
    insert @temp_error(procedure_name,line_number,error_number,error_message,error_state,error_severity)
    select error_procedure(),error_line(),error_number(),error_message(),error_state(),error_severity()
    RETURN;
    END;
    CREATE TYPE test_type AS TABLE(
    id int identity(1,1),
    procedure_name varchar(255),
    line_number int,
    error_number int,
    error_message varchar(max),
    error_state int,
    error_severity int,
    occurence_datetime datetime default current_timestamp,
    user_name sysname default suser_name(),
    login_name sysname default suser_name()
    GO
    create proc usp_error_test
    @test_type AS test_type READONLY
    as
    begin
    begin try
    select 1/0
    end try
    begin catch
    select * from testfunction1(@test_type)
    end catch
    end
    Mudassar

  • LSMW Error - You have not fully maintained the descriptions

    Hi Experts,
    I was trying to Extend the materials to plant by using Direct input menthod where prog - RMDATIND.
    When I execute final step i.e "Start Direct Input Program" I faced with an error " You have not fully maintained the descriptions".
    I know this error with regards to Language Key and Description.
    I executed Display converted data under structure BMMH5, where Language key is blank.
    Kindly guide me why this language key is not captured, and also how to default the Language key as EN.
    Thanks nd Regards,
    Laxmi.........

    LSMW u2013 Legacy System Migration Workbench
    1.        Maintain object attributes
    2.        Maintain source structures
    3.        Maintain source fields
    4.        Maintain structure relations
    5.        Maintain field mapping and conversion rules
    6.        Maintain fixed values, translations, user-defined routines
    7.        Specify files
    8.        Assign files
    9.        Read data
    10.     Display read data
    11.     Convert data
    12.     Display converted data
    13.     Create batch input session
    14.     Run Batch Input session

  • LSMW Error in loading ROUTINGS

    Hi Experts,
    I am getting a error at step 13 while creating Batch input session using LSMW as "No Profile with entry tool task list N 1 session ROUTING".
    I tried to use the default value for BIPKO-PRFIDNETZ = (default value tht i was given).still it says same error.
    any idea...plz help me out...
    I'm using 0170 RCPTRA01 prg.
    Thanks
    Sony

    Hi,
    Maintain a profile in which the entry tool is activated in field BIPKO-PROFIDNETZ of the input file.
    You make settings for the entry tool in the control data for routings within Customizing under Production -> Basic Data -> Routing -> Control Data -> Define profiles with default values.
    Activate the entry tool
    Save the long text and set it to active.
    Cheers
    VJ
    Do a search in OSS notes you will find more info

  • Spool Error capture question

    Hi,
    I am trying to spool data from tables into flat files. I am using the following scripts to accomplish it
    1. A cmd file (windows) that makes a call to a sql file
    2. The SQL file which generates another query file at the run time, depending upon the table name passed to it
    3. The run time query file , that executes the final query and spools the data into a txt file | delimited
    For eg:
    Actual command passed C:\Spool_utility\spool_utility TABLE_NAME
    Eg of the spool utility file :
    @echo off
    SET dbuser=XX@YY
    SET dbpw=xxxx
    echo %date% - %time% - Start > %1%log.txt
    echo START
    sqlplus -s %dbuser%/%dbpw% @spool_utility.sql %1>%1.txt
    echo %date% - %time% - Done >> %1%log.txt
    echo DONE
    Eg of the spool_utility.sql
    set echo off
    SET newpage 0
    SET feedback off
    SET linesize 32767
    set pagesize 0
    SET wrap off
    SET recsep off
    SET con off
    SET trim on
    SET trims on
    set verify off
    SET doc off
    SET termout off
    SET arraysize 5000
    SET HEADING off
    set colsep "|"
    spool &1.sql;
    Prompt Select * from &1 where some condition
    spool off
    set termout ON
    @ &1
    EXIT
    The above file generates a table_name.sql file with the actual table name at run time and gets executed and the output is written to the table_name.txt file.
    This works perfectly fine. But the issue is when someone passes some wrong table name or if there is a actual run time error while executing the query , the error with details itself itself gets written to the end spool file.
    For eg : if i do this just to generate an error and execute it from command line, the query generates an error and writes the error to the spool file , but at the command prompt where I executed the command I do not see any error and the process seems to have run perfectly well
    set xxx on xxx off as above
    spool &1.sql;
    Prompt Select * from &1 where rownum><10---this will cause the issue
    spool off
    set termout ON
    @ &1
    EXIT
    Eg of spool file generated :
    from     table_name WHERE rownum><=10 *
    ERROR at line 62:
    ORA-00936: missing expression
    My question is, is there any way i can capture this runtime error and return this error to my calling sql script spool_utility.sql and then propagate it to the calling command file and do some tasks for eg removing the spool file and writing the actual error to a log file . Basically any way to know at my OS calling level that the entire spooling operation was unsuccessful.
    Thanks

    Thanks for the reply.
    Querying the data dictionary will work only when the issue is a invalid table name. My question is can i capture any run time error, not only incorrect table name.
    If there is any run time error (for eg the one I showed where I used a >< sign which is a invalid operator) the error gets written to my spool file, but there is no way I am able to capture that in my calling sql script and subsequently in the calling command file so that I can do something with the error. For eg if a spool file may get written with error messages, some batch process or user may pick up the spool file and start processing which i dont want to happen. i would like to trap that error or at least be notified of the error at my outer calling sql file or outer command file level, so that I can write the error to a log file and delete the erroneous spool file etc.

  • LSMW Error while Transporting

    Hi All
    Hi All
    I have configured LSMW in Quality for which i have only 1 Project under which there are 13 sub Project & under each sub project there is only one Object . Totally there are 13 objects  .
    Now i want to transport all of them in to a production . so i been to T.code : LSMW then to menu path  Extras -> Generate Change Request   . After this i have created one Request . Now am getting a error as mentioned below in bold letters .
    The object R3TR TABU /SAPDMC/LSMCUST is client-specific.
    The client in which you are currently working is set as follows:
    You can make changes to client-specific objects, but these changes are not recorded. You cannot include these objects in a request and then release them.
    To solve this go through the below steps :
    Delete the object from the request.
    Change the setting for client-specific objects in this client (Transaction SM30, table T000).
    I went through the SM30 > Table T000 but it is not related to the transporting the LSMW .
    Can any one help me . how to solve this issue .
    Please let me know at the earliest .
    Thanks in Advance .

    Hi,
    just export projects on desk enough, again import another desired client.
    When you export all the sub projects select directly project, if don't wont deselect the sub projects only then under export rules export the project on desk with same name(system will provide you) txt file.
    same like import another client.. no need to any modifications..
    You can use directly.

  • Issue in lsmw ; error in read file step

    hi,
    i 'm facing some really strange issue in lsmw..
    i have created one header structure and 3 sub structures.
    until now its working fine
    but when i created 4th sub structure and in the read file step, its giving the following error :
    "Generation aborted. Reason: No fields with equal names"
    again if i delete that extra structure, its working fine..
    i really don't understand whats the problem... is there any restriction on number of structures?
    i need ur help guys
    Thanks in advance
    shekhar

    In step 13 Create Batch Input Session .....select Keep Batch input folder check box and goto step14 Run batch Input Session ....
    Slect your session name and click on Process....it will give one window and select Display Errors Only....then it will execute without press enter every screen...if any error is there it will stop and display error screen.
    Mohan

  • Lsmw error 'Specify Files first' while executing option 'Read Data'.

    Hi All,
    while trying to create mass users through LSMW, i am gettign the error 'Specify Files first' while executing option 'Read Data'.
    I have specified file (.txt), manually created (with'1 tab space' between each term). i have used option 'On the PC(Frontend)'. No error while saving.
    Next- i have executed 'Assign Files', where the file appeared automatically.
    Next- Here, when i try to execute 'Read Data', i get the error 'Specify Files first'.
    Can anyone help in resolving this error.

    Hello Plaban,
    What is your purpose? Are you tring to upload the data with more file variant?                                                                               
    There are two possibilities to make file names more variable:                                                                               
    1.If you choose system dependent file names by setting the according flag (in the first step 'Maintain object attributes'), you can define file names for each system in step 'Specify files' by assigning the files to a specific system ID (with a double-click on the specified file).                                                                               
    2.You can use wildcards in the file names where you can assign several values.                                                               
    I hope this helps you.
    Regards,
    Blanca

  • Lsmw Error during the specify files

    While doing Material master upload thru lsmw...using Batch input method
    During the specify files step i am getting this error
    File Name 'Converted Data': Max. 45 Characters. Remaining data saved.
    Message no. /SAPDMC/LSMW_OBJ_060028
    Pls Guide me.......

    Hi,
    How you save your source file?  Need to be saved in  as TAB delimited file
    OK. Check link:
    http://www.sap123.com/a/98/#loading-material-masters-with-lsmw-direct-input-method
    http://www.slideshare.net/arun_bala1/sap-sd-lsmw-legacy-system-migration-workbench
    Regards,
    Biju K

  • LSMW ERROR --PLZ HELP

    Hi.. am trying to create a Sales order ..and i have assigned the source structure.
    when i run the last step( direct input method)..it is giving me the below error.
    as ..Date / /  is not valid.
    not sure what the error is.
                                                                                    Test run w/o updating data base                                                                               
    Start of processing                              
                                   V1                   091                         
    Date / / is not valid                                                                               
    Data from this document has not been saved ***
                                                                                    File path name................ ZSORDER_ZSORDE_ZSORDE.lsmw.conv                  
    Number of header records......          1                                       
    Number of partner records.....          1                                       
    Number of item records........          1                                       
    Number of saved documents.....          0                                       
    Number of incorrect documents.          1                                       
    lsmw with direct input method...could u plz also let me know what are the mandatory fields for creation of Sales order in lsmw?
    Thanks in advance.
    Suresh.

    need to assign 0's in date fields

  • Lsmw error

    hi
    experts,
      here the issue, i am uploading sales orers and delviery ordrrs through lsmw, in 9th step after specifying files and when i try to
    press read data it shows an error stating that, "unable to write to file f/lsmw/sales orders va01rec.lsmw .read.
    any help on this will be highly appreciated.
    thanks

    hi
      after trying with other path, still its shows the same issue, could you give other alternative for this.
    eagerly awaited for your response.
    thanks

  • LSMW - Error BDC_INSERT, Transaction code .. is invalid XD01

    Dear all.
    I have done the following Steps:
    1 - Maintain Object Attributes. Chose the Object type Batch Recording, then created a Record using the name (CLI_PMR). And created the Batch record and then assign the fields name.
    2 - Maintain Source Structures – Created the Struture (CLI_PMR1)
    3 - Maintain Source Fields – Assign the fields name and length that I used in my program. (CLI_PMR1).
    4 - Maintain Structure Relations – Assign the Struture (CLI_PMR1 to CLI_PMR)
    5 - Maintain Field Mapping and Conversion Rules – The normal thing in this point.
    6 - Specify Files - Specified the Legacy Data, path for the file.
    7 - Generate Read Program – Generated the Program.
    8 – Read Data – Executed this Step and every thing is correct
    9 - Generate Conversion Program – Generated the program
    10 - Convert Data – Convert data
    11 - Display Converted Data – Every thing is fine, with no errors
    12 - Create Batch Input Session- At this the error message appears Error BDC_INSERT, Transaction code .. is invalid  time.
    At the time we have created other LSMW programs for this T-Code and every thing is OK.
    I'm using the T-CODE=XD01
    Best Regards
    Pedro Miguel Rodrigues

    Hi, I had the same problem in LSMW when generating a batch input for trx IE01. The cause was that there were tab/newline-characters in my text file (some descriptions contained tab-characters). Since I used a tab delimited file, these tabs/newlines in the fields messed up my file.
    The excel file contained multiple lines per cell in some description fields. When this was exported to tab delimited text, it contained additional tabs. After checking the contents and removing the tabs/newlines from Excel and performed a new export to txt-file, it was solved.
    Best regards,
    Jan-Peter Molenaar
    SAP EAM Consultant

  • LSMW error Transaction: 0000000001 Matl no.:

    Hi
    I am rajesh found some error while uploading data LSMW  std direct input 
    geting error material not  observibng in MM03
    Transaction: 0000000001 Matl no.:
    Message no. BL001
    Transaction: 0000000001 Matl no.:
    Transaction 0000000001: Taxes for sales org.  cannot be transferred
    Transaction 0000000001: no plant data exists
    The data for the maintenance statuses ABCDFGPSV cannot be transferred
    You have transferred only general fields and no single status fields
    The field MARA-MEINS is defined as a required field; it does not contain an entry
    please let me come out of this help me
    Thanks
    Rajesh

    Dear Rajesh,
    You will have to pass Basic Unit of Measure (MARA-MEINS). It is mandatory field for creating Material Master.
    You would atleast need to pass basic unit of measure and material description.
    Regards,
    Naveen.

  • Error Capturing in PI 7.1

    Hi Experts
    I am working on a File to Proxy scenario in PI 7.1 , In one of the field length is 12 char, In some instances Field value will be greater than 12 char, however it passes through the mapping (I have declared as Data type as String with Max length 12) without any error
    and It fails in the proxy side, before calling the BAPI
    I want to capture the error in PI and send out an email to the user saying that field value is greater than 12
    How can I do it in PI
    Thanks
    PR
    Edited by: PR on Jun 27, 2011 12:24 PM

    YOu can use XML Validation in both adapter engine and integration engine to validate the length > 12 . But downside is enabling xml validation might slow down the performance too.
    You can do the following...
    In the mapping check the length and if it greater than 12 then decide your receiver is smtp system not proxy.  Based on the length of that field you decide target is either smtp or proxy. 
    Use this [link |http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90dcc6f4-0829-2d10-b0b2-c892473f1571?quicklink=index&overridelayout=true]and follow the topic Mulitple inbound service interfaces.

  • LSMW error in MM01- problem

    Hello experts
    plz solve my problem
    I am entering material in material mASTER through MM01 t-code, I have taken the following
    five fields for the material creation through LSMW
    Material Number (MATNR)
    Industry sector (MBRSH)
    Material Type   (MTART)
    Material Description (MAKTX)
    Base Unit Of Measure (MEINS)
    after that I have created a raw .txt file with material fields and proceed successfully
    till step-13(Create Batch Input Session) and also execute the step-14(Run Batch Input Session)
    after that the batch is shifted for Background processing and then execute the batch input
    session from there which will be finished without any error, at last when I check the data
    in MM01 I haven't get my material in there, I check LSMW when then it shows the session status with Error.
    The following is the  log error for all  the transaction copied in the making og bat input session
    record 21 DEF_SKIP does not exit in the table
    So please Solve this problem as soon as possible this will be a great help
    With Regards

    Try programming the following recording:
                                   T              MM01                                                                               
    SAPLMGMM     0060     X                                                                               
    BDC_CURSOR     RMMG1-MATNR
                                                                BDC_OKCODE     /00
                                                                RMMG1-MATNR     Yourmaterial
                                                                RMMG1-MBRSH     industry type
                                                                RMMG1-MTART     material type
    SAPLMGMM     0070     X                                                                               
    BDC_CURSOR     MSICHTAUSW-DYTXT(01)
                                                                BDC_OKCODE     =ENTR
                                                                MSICHTAUSW-KZSEL(01)     X
    SAPLMGMM     4004     X                                                                               
    BDC_OKCODE     =BU
                                                                BDC_CURSOR     MAKT-MAKTX
                                                                MAKT-MAKTX     sample material
                                                                MARA-MEINS     ea
                                                                MARA-MTPOS_MARA     NORM

Maybe you are looking for

  • HT5517 Airplay (or Home Sharing) MacBook & ATV

    Is my 2008 MacBook able to airplay my 2nd gen Apple TV?

  • How can I buy more iCloud space when my ipad won't sync and has jammed

    How can I buy more icloud space when my ipad won't sync and has jammed.  I cannot press settings or close and cannot even turn off?

  • Help getting new note from iphone to icloud

    If i create a new note on my mac, or on icloud, it shows up in all devices including on my iphone, but if i create a new note on my iphone, it does not show up in icloud or on my mac. help?

  • Updating my ipad with itunes

    I am trying to update my ipad from 4.3.3 to iOs7, but when I try to update with itunes it says "This version of iTunes (10.6.3) is the current version." even though I am not updating itunes. Any help wwould be much appreciated.

  • BP Relationship is missing

    Hello All,   All of sudden many users were getting error saying " No BP XXXXXXXXXX data found " when creating SC or posting confirmation. When i see the inconsistency for the user/BP, i am getting message saying "Relationship between Employee BP and