Debugging in LSMW

Hi,
   How to debugg in LSMW? How error handling is done in LSMW?
How we can find error in LSMW?
Regards....
Arun.

Hi,
go to the 5th Step that is
"5 Maintain Field Mapping and Conversion Rules"
select this radio Button and execute then
you will maping your defining fields to source structure fields
then where ever you want to write validations
you just select that field and click on RULES tab
then select radio-button User defined routine
then you will get a window
you just click on continue button
then you will get a PERFORM opposite to your selected field
save and come back
then select the 6th radio button
that is " 6 Maintain Fixed Values, Translations, User-Defined Routines"
and execute
there you will find your user defind routine
you just double click on the routine
then you will get a editor for writing your code for validations
you just pass p_in as input and you will get the result in p_out parameter
then you will put a Break point or put command like "BREAK-POINT"
then it will automatically triggered while running this project.
Regards
Gaurav

Similar Messages

  • Debugging of lsmw tool

    hello friends,
    can anybody tell me how to debug the lsmw at the point where i put a brakpoint in the actual program of transaction
    here main problem is i did the lsmw processing for one transaction i got all the records poping when i press the enter key after processing of the session with recording but finally i am not finding the recoreds in the database
    i used the commitwork bapi also but i donno where the problem is occuring
    can anyone guide me in this regard thanks alot in advanse

    Naveen,
    You can debug any LSMW object (Read or Conversion) program in the usual way by putting a hard breakpoint or soft breakpoint.
    In your Field Mapping/conversion, you can code BREAK-POINT at the very first field. Then the program execution will break when it reaches there.
    You can also put soft break-points in the generated code. To view your generated code, you need to bring it up in the initial screen of your object. To do so, click on the User Menu button & check the <i>Display Read Progam</i> & <i>Display Conversion Program</i> checkboxes. Hit ENTER. Now you will see 2 additional options on the initial screen of your Object. Double clicking on the <i>Display Read Program</i> or <i>Display Conversion Program</i> will take you into the generated code. Place your soft break-point as you normally do.
    Happy Debugging !
    Regards,
    Homiar.

  • How to debug the LSMW coding???

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

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

  • Lsmw for mm01 is not working

    Hello experts,
    We are extending the material to another plant and storage location etc.
    so i want to do in lsmw. but it is not working fine .please help me.
    First in the lsmw i selected recording and done the recording for mm01.
    in the first screen i entered
    material abc,industry sector mech engi, material type wfinis and copy from material abc,then i pressed the
    enter and i selected the views Sales: Sales Org. Data 1,Sales: Sales Org. Data 2,
    Purchasing and Accounting 1.
    then i pressed enter and got the screen to enter plant, valuation type , sales org, cist channel. so i enterd
    plant ,sale org and dist channel in the organization levels and copy from fields.
    then i pressed enter and in the next screen i entered some required data and pressed enter and in another
    screen o entered and etc and finally saved . The recording is
    successful .then i completed all the lsmw steps when i run the session it is showing the error
    at the screen where we enter the orginational levels like plant, sales org etc.
    our flat file is a text file and it is in the same order as in
    the lsmw.
    I approched one senior consultant and he said we cant do lsmw bcuse
    the org level screen will be moving every time.
    so please kindly help me what to do to analyse this error.
    =>Can we debug the lsmw , if so how.
    =>In one moment previously 2 days back when i am doing lsmw i got a
    error with return code 13, please tell what actually means and where to see this one.
    Thank you so much for the replies.

    Shiva,
    First of all its not advisable to use the recording method in lsmw for uploading the material master data. It involves lot of views so if something goes wrong very much difficult to identify the error point, at the same time I will advise you to go with bapi or idoc method to do the same.
    When comes to you question regarding the debugging of lsmw you can debug it.
    From the usermenu tab take the generate conversion program step into u r list of steps
    then execute it and go into the program and put a break point then execute the convert data step directly you will get into the debugging mode you do debug the code.

  • LSMW VD51 , Validations in Begin of Transaction; how to Debug the code?

    Hi All,
    I have written code for validations i Begin of Transaction in the field mapping 5th step of LSMW for VD51.
    Now this code not getting triggered at the time of Conversion of Data. How to debug the code. I have put a static break point 'BREAK-POINT' still not getting triggered.
    Any suggestion / solution for this issue.
    Thanks and Regards,
    Narsimha Kulkarni

    Hi Narshimha,
    Make any mapping error during mapping and check the syntax of mapping it will drag you to the lsmw report there you can put your break point. You can check the report name from transaction code as well.
    Remember this mapping block will execute when you execute the step Convert Data in LSMW.
    Regards
    Dhirendra

  • LSMW DEBUG

    Hi All,
    How to Debug LSMW?
    How to test the data at runtime?
    Thanks
    Rajendra

    Rajendra,
    LSMW generates ABAP in the background. So you can debug it in the same way you debug any other ABAP. You can debug at READ as well as CONVERSION time. Both are different programs.
    Do this :
    Lets say you want to debug at the time the data is READ into <i>LSMW</i>. Select the radio button for Read data & hit execute. On the next screen, go to System => Status. This will give you the name of the generated ABAP. Double click on the program name to enter editor in display mode. Put a breakpoint (soft or hard) whereever you wish. Go back one screen & resume execution of the program. The process will stop at the point you set the breakpoint.
    Its the same at time of CONVERSION.
    Let me know how it went.
    Regards,
    Homiar.

  • LSMW testing and Debugging

    Hi
      I really need help about testing and debugging LSMW. I really appreciate  if anybody can provide me enough help on how to test LSMW and Debug in QA environment
    Pls help me

    Once you input the Project, Subproject and Objec on the initial screen and execute it.
    Here you are guided through the individual steps of data migration. Example: Maintain Object attribute...etc.
    on the application tool bar, click on the personal menu push button, you will list of all the steps. Check the Display conversion program.
    After you maintain the field mapping, read data and convert data. you can execute the Display conversion program step. This will display the generated progrom.
    Here you can set the <b>break point</b>.
    Other way is while doing the field mapping, you can set hard break-point.

  • Regarding LSMW validation & Debuging

    Hi,
    Is it possible to perform validations in LSMW?
    If yes, kindly send me detailed description.
    Waht is the procedure to debug LSMW?
    Thanks & Regards,
    sathish dasari.

    Yes, it is possible to perform the validations in LSMW.
    In the 5th step(Maintain field mapping), we have various processing blocks like Global data, begin of processing, begin of transaction, begin of record. You will get an abap screen when double click on the required block. write the what ever the code required for validations(like norma se38 program).
    suppose if you find that the record is an erroneous, skip that record for processing (there is global function available in lsmw skip_transaction), then populate all such error records into one internal table, and you can download the same in end of processing block.
    For every lsmw a conversion program will be generated, you can see the same by selecting the display conversion program in user menu.
    put the break-point where ever required, it will be triggered duting the convert data step.
    Thanks,
    Rajinikanth

  • Help required-LSMW.

    Hi,
      My requirement is that I will get a flat file in which one of the fields will be with 26 digits... I am using transaction KS01... So for the cost center creation the criteria is that I need to concatenate the company code, the 7-11 digits (of the 26 digit field) & zero '0'... I am able to do this for the first record ... but I am not able to get the same for the second record... the logic that i have written is as follows:-
    in the field mapping step under the cost center I written the following ABAP code.
    DATA : V_BUKRS LIKE CSKS-BUKRS.
    SELECT BUKRS
      INTO V_BUKRS
      FROM CSKS
      WHERE KOKRS = SOURCE-CONTROLLING_AREA.
    CONCATENATE V_BUKRS
                SOURCE-26DIGIT_CTCTR+6(5)
                '0'
          INTO TARGET-KOSTL.
    ENDSELECT.
    How do I debug this program in LSMW??
    Your help is appreciated.
    -Seema.

    Hi Seema,
    When you are in the initial screen of LSMW for the object(with all the radio-buttons), click on the 'Personal Menu' push button and select the checkbox for 'Display Conversion Program.'. Then you can simply select that action and put a break-point in the code section and debug it.
    But if I may comment, just based on the code piece given here, your 'SELECT statement may not be returning any records for your second record.
    Is your SOURCE-CONTROLLING_AREA field similar to CSKS-KOKRS? Otherwise a select like this might not return any values.
    Also, there is a potential for multiple records to be fetched from CSKS since you are passing only partial key. So, essentially you are moving your concatenated value into the TARGET-KOSTL based on your last record from that select.
    What is your requirement with regards to the BUKRS? Is it that you need to create cost centers for all BUKRS assigned to a given controlling area on the file?
    Please let us know.
    Srinivas

  • IDOC error when using LSMW+XIF to load business partner data

    Hi experts,
        i have configured the LSMW using idoc type 'CRMXIF_PARTNER_SAVE01', but it gives somes errors like below (LSMW_BP456 is the BP no)
    E  Partner LSMW_BP456 (4A01EE5D47261621E10000000A0A0ACB ): the following err
    W Partner data processed with key PartnerGUID 4A01EE5D47261621E10000000A0A0
    W Partner data processed with key PartnerID LSMW_BP456
    E No update is defined for BP role 000000
    E Validation error occurred: Module CRM_BUPA_MAIN_VAL , BDoc type BUPA_MAIN
    E Error status 'A ' calling validation service
    In fact i have loaded product succesfully using this interface, so i am sure the basic setting is done for XIF interface.
    And i found the error messages come when executing below code in fm 'CRMXIF_PARTNER_SAVE' in debug mode. I am not very familiar with BDOC and it seems that the error occured when processing bdoc.
    call MW flow service synchronous (error handled by caller)*
      IF lv_callmode = 'S' OR lv_callmode IS INITIAL.
        CALL METHOD cl_smw_mflow=>validate
    Any advice ? thanks

    Hi,
    I have looked into the issue. If you are trying to create the BP with general role 000000, i think it might not be possible via LSMW.
    The error message is correct, because role 000000 is indeed not relevant for update because if you can see in the customising Tx BUSD, 'FLAG - Do not update' will be active. This is the reason why you are getting the error message of 'No update is defined for the role 000000'.
    When you insert a partner in role "000000 General Business Partner",the error message "BP role cannot be updated" will be returned. This error message is very specific for this issue. You can create BP in different roles apart from the general role.
    Indeed if you try to change the 'Do not update' flag to inactive state and process the LSMW project you will be able to create the BP but it is strictly not recommended.
    This role is a technical role which exists for the creation of BP, and immediately you will fall back to other roles available for the partner.
    So i feel you need to change the role before you create BP with this role via LSMW.
    I hope this helps.
    Regards,
    Venkat

  • Issue with clearing previous record while uploading through LSMW

    Hi friends,
    I have created lsmw for hiring action using transaction PA40. i have a tab delimited flat file, when i run the lsmw script the first record is uploaded perfectly. However the upload halts for the second record, coz the previous record still remanins, is there an issue with the recording or do i need to clear anything?. How do i resolve  this one and continue uploading other records.
    Regards,
    Quavi

    Hi Friend,
    In the LSMW, Under the User menu you have Display Read Program and Display Conversion Program select this and open the respective program you feel having problem and put a break point in the Loop statement and debug. I will help you to identify the problem to resolve.
    Rgds,
    Jey

  • Customer master lsmw

    hi folks,
    iam doing lsmw standard input method  customer master ,iam able to populate all the fields except few fields AKONT ,ZTERM,KTGRD ,ALAND,TATYP AND TAXKD are these any special fields y arent they getting populated even KZAZU,AUTLF,KZTLF  arent getting populated can iknow reason ?i have done all  field mapping in proper  way ,do i need to use bapi method ?when should i use bapi method ?points will awarded if answer is reliable,thanking .

    Through direct input i mapped all those fields specified by you and it worked fine.
    Check ur field mapping once and check where it is failing. In importing the data or converting the data. based on that debug that import/conversion program to check where it is failing.
    i think it may be due to problem with field order in the file or something .

  • Sales based data migration through LSMW BAPI   (BUS1505) change

    Hi Everyone,
    keep getting this error message while trying to load sales based scenario.
    there is neither no term category in the sales rules's structure nor it is in reporting rule's structure.
    error message
    Term category 1410 cannot be used in sales rules
    Thanks in advance.
    Regards,
    John

    John,
    That is hilarious I know that feeling.
    Not sure why you are getting this error but try following -
    1. Make sure your file does not have data in cells which you don't use.
    2. Structures which you do not want to pass any values in, do not pass those structures at all. Means if you wish to change only business partner then user only 1 structure and one header record for identifying the contract that is it. Do not pass any other structure not even blank in the file.
    3. Make sure in source to target mapping you have made correct assignment if by mistake you have made incorrect assignment you will get bad data.
    4. When you read your data execute step display read data and review where you see 1410.
    5. Similarly when you execute Convert step in LSMW execute display converted data and you will see if 1410 was populated.
    last step if none of the above works ) Display the conversion program and put a debug point at this particulat field and see from where this value is being passed. This is no standard error so it has to be your LSMW/Input file.
    Let me know what it was
    Jag

  • SAP Retail : Article Master Data Transfer using LSMW/ARTMAS05: EAN Error

    Hi Bjorn Panter,
    I want to thank you for providing very informative articles on the Master Data of ERP Retail.
    We are currently loading articles to SAP from legacy and use your articles on ERP Retail as part of our knowledge warehouse.
    We have encountered an error which has stumped our conversion.
    We are getting an M3 535 error stating that "First specify the main EAN for the unit EA".  We are using LSMW (IDOC Method, Basic Type ARTMAS05).
    Our MARM segments have generic and variants.  The UPC and UPC category (set to UC) are filled for the variants and blank in the segment containing the generic.
    Our MEAN segments contain variants only with the UPC and UPC category (set to UC) filled.
    Our UC EAN category is configured with a blank check digit algorithm and a number range of 12 digits.  We are loading our variants with EANs that are 12 digits.
    When debugged IDOC_INPUT_ARTMAS, I noticed that :
    In routine  MARM_UEBERGEBEN (in function module BAPI_MATERIAL_MAINTAINDATA_RT), this code clears our MARMX indicators :
       LOOP AT UNITSOFMEASURE.
        ART_DATA_EXISTS = 'X'.    "JH/05.01.00/4.6C Entkopplung der MALG
        IF UNITSOFMEASURE-FUNCTION NE C_MSGFN_D.   ->>>> this checks if our function code is 003 (which is a delete).
    *     TMFIELDRES aufbauen
          CLEAR UNITSOFMEASUREX.                   ->>>> Since we are doing a create, it clears the indicators in unitsofmeasureX
    To bypass this clear, I debugged the program and overlayed the indicators and marked UPC and UPC category as 'X'.  This worked and we were able to post our IDOC successfully... THe UPCs showed in the MARM and MEAN tables.
    However, knowing that there are a lot of Retail companies loading articles into their SAP system, it would seem odd that no one has reported this as a bug or no one has posted this issue in SDN.  I could not find any OSS note related to this issue either.
    Can you please help us figure out what is wrong ? Have you encountered this error in the past ?  Is there something in config that we should check ?  Should we look at fields in our segments ?
    Any help from you would be greatly appreciated.
    Thanks,
    Sarah

    Dear Sarah,
    please open an OSS customer message.
    Put in a valid IDOC ARTMAS number with this error and open your system.
    I guess either it is a bug in IODC structure or you found a bug in software.
    My colleages will take care.
    Regards
    Björn

  • LSMW Read Data behaving differently in production and in ECC

    Hi All,
    I have writte a LSMW for CJ12 longtext and it is working fine in development but in production it giving error message at 13th step as BDC_INSERT, Transaction code .. is invalid and when i try to simulate the issue i found that in Read Data step i found the difference as transactions read in development are 399 where as the transactions read in production are 267 for the same file.And i debugged the Display Read program and observed that the read program used GUI_UPLOAD to read the data from the text file.and there itself the GUI_UPLOAD internal table contains 399 in development and 267 in production.I tried to simulate why this is happening but coldn't figure out.Can any one help me why this has happened.And we are using ECC6 with EHP4 in development and EHP3 in production and it has to upgrade to EHP4.

    if you are really certain about the source file (I doupt too) then there are only 2 more possibilities
    a) your LSMW object is different (transport it again from developement to production, only so you can be sure that LSMW object and source will be the same)
    b) a real SAP error because of different release levels. Open a ticket at SAP to get help.

Maybe you are looking for

  • Creation of maintenance order from notification

    Hi experts, Is there any standard settings available by which I can block to create maintenance order from a notification until & unless it's system status is "NOPR"?i.e when the system status of notification is OSNO ,system should not allow to creat

  • External Hard Drives: One for backup and one for storage

    Is it possible to have two external hard drives, one firewire and the other usb, using one as an additional hard drive, and the other as the backup drive, and backup from the external that is the additional hard drive to the the other which is the ex

  • What do i do i was downloading the ios7 to my iphone 4s and its frizzed it wont load or turn off

    what do i do i was downloading the ios7 to my iphone 4s and its frizzed it wont load or turn off and my last backup is from 2012 and i dont want to loose my contact information.

  • Debit memo Condition record exists (removed manually) MWBO Italy

    Currently I am working on an Italian pricing issue. Pricing V/08 Cond     Description            Fr. To. P  Req. Calc. BasT.                            LCIT     VAT license Italy      900     S  33   37  MWST     Output Tax                     S  10 

  • HP P7-1235 Video

    I have a P7-1235, and recently purchased a Radeon HD 7850, and a new Rosewill 500 Watt PS. I am having trouble disabling onboard video tho as it does not have the option in the BIOS, do I need to completely uninstall the existing video from onboard t