LSMW Validation

Hi Friends,
I have a query in LSMW.
I am creating Materials using the recording of MM01.
I need to check a material already exists in SAP , before the session is called .
If material exists then that particular record from Excel should not be processed. I dont want to see the log for non processed items.It should be skipped at the LSMW level.
Please advice
Thanks and Regards,
Anoop

LSMW==> Maintain field mapping and conversion rules => For the session there is an event <b>__BEGIN_OF_TRANSACTION__</b>.
You could write your <b>select * from mara where matnr = source-matnr.</b> and validate the material exist or not.
If exists you can skip that loop using <b>continue</b>.
Hope this helps you.
Best wishes,
TM

Similar Messages

  • 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

  • In LSMW need field validation

    Hi,
    My requirement is adding fields to an existing structure in LSMW batch input method and performing validations on those fields as follows
           1.  Alternative Priority                  should be numeric
           2.  Alternative Starategy              should be numeric
                                                             and valid values are  ‘1’  ‘2’.
            3.  Alt. Usage Probability             should be numeric with no decimals
                                                                  and valid values are 0-100
    Thanking u inadvance,

    if you go to field mapping section(in change mode)
    double clik on the field(where you see the mapping of your source field and the target field) which you need to write the condition, it will open up the editor to write the code. play around there you will get some idea.
    if still you have problems let me know

  • Validity date of condition records (creation of info records using LSMW)

    Hello gurus,
    we would like to create info records using LSMW with one condition record (PB00). This works fine, we just are not able to influence the validity of the condition record, it's always "creation date until 31.12.9999".
    We tried to maintain the fields BKONP-DATAB and BKONP-DATBI, but that did not change anything.
    Any ideas on this?
    Thanks
    Alicia

    Hello Jürgen
    and thank you!
    One additional question: When I import info records using LSMW, one condition record (PB00) is created automatically. Is it possible to change the validity of that condition record using LSMW, too? Or can I only create new condition records?
    Thanks again
    Alicia

  • "No valid material component found" when Routing upload using LSMW RCPTRA02

    I want to upload routings through LSMW RCPTRA02 incluing routing headers, sequences, operations and component allocations. But systems appears error CM 101 "No valid material component found" . Does anybody occurs the same error before?
    The materials truly exists in BOM component.
    Sincerely thanks,
    Alina

    Hi,
    What is the status of the BOM? There should not be any problem if the material BOM exists.
    Regards,
    Krishnendu.

  • How to handle in LSMW the validation if 01 and 35 for two values

    in lsmw if we are having in flat file as 01 one entry and other 34.
    size of the field is only two character .
    As of now iam checking to put 0 before one if the value 01 however iam
    getting problem in the case of 34
    case 1 ) if iam having 01 the below code works perfectly
    Concatenate '0' flat_0034  into flat_0034.
    case 2) if iam haivng in the flat file as 35 the code
    concatenate '0' flat_0034  into flat_0034 going into wrong
    as in front of the value
    could any one please let me know how to handle this scenario.
    regards
    syamla

    Dear Naresh Nelapatla 
                   Can you please give me validation example please as it is little urgent.
    thanks &regards
    syamla

  • 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

  • Error in LSMW : Enter a Valid Value

    Dear All,
    I am Creating a LSMW for MM01 Transaction using Direct Batch Input Method
    I got an error in LSMW while I start uploading saying "Enter a Valid Value" .
    I am selecting 14 Views in a single LSMW.
    Basic Data1 / Data2 , Purchasing , Foreign Trade : Import Data, MRP1,2,3 , General Plant 1/2 , Accounting 1 & 2 , Costing 1 & 2.
    Can anybody tell me why I am getting that error.
    Thanks in Advance.
    Tulasi

    Perform theses steps
    - In LSMW read and convert only one entry from file
    - go to SM35 -> select your session with that one entry
    - select process , option process/foreground
    - choose process
    You will have that batch input run in the foreground, so you can see all the values entered to certain input fields and all the actions which take place in that screens. This way you should see which step excatly creates the error.
    Regards
    Marcin

  • Validating material types in LSMW

    Hi Experts,
        How do we vaqlidate material types in LSMW.
    what are the kind of problems generally we get doing LSMW.
    Thanks,
    Naren,

    material types are stored in table T134.
    so we will write a SELECT to know,its a valid or not.
    SELECT SINGLE MTART INTO V_MTART
                  FROM T134
                  WHERE MTART = ZSOURCE-MTART.
    IF SY-SUBRC = 0.
    *--ITs a valid Material type
    BMMOO-MTART = ZSOURCE-MTART.
    else.
    *--Invalid material type,its an error.
      SKIP_RECORD. <--this SKPS the current record,as there is no meaning to process this error record.
    ENDIF.
    Regards,
    Srikanth
    Message was edited by: Srikanth Kidambi

  • Validation in lsmw

    hi all,
    plzz let me know how to perform these validations in LSMW:
    1)EKORG     should be either of the two:     JP10/ICP5 in the txt file
    2)NORMB     or LOHNB  Mandatory
    It has to be set either one of them.means any one of them must be present in input txt file
    3)MEINS should be set optional

    Hi,
    do validation in 5th step .
    once u enter the 5th step double click on the field i.e EKORG once u double click then it will take to the ABAP aditor once editor is open then write u r code as u want.
    in the 5th step otself there is one button called RULE in that also we can write the code

  • Validations at LSMW

    Shall we make validations in LSMW? IF yes where we can make ?

    hi,
    check out step 6..
    In this step you can process the reusable rules of a project:
    Fixed value: Here you can specify length, type, flag for lowercase/uppercase and value in addition to the description.
    Translation: Here you can enter information on the source field and the target field:
    If you are creating a new translation you have to save data before you can change to Control information.
    Control information: Here you can define the translation type. You can specify which of the two translation tables will be searched for a value first and which alternative will be selected, if no suitable entry is found:
    1:1 translation values: Here you specify the value table to be used during translation. You may also upload the values from a PC file (text separated by tabs). In addition, F4 help is available in column "New value".
    important
    During translation, only values for which the OK flag was set are included.
    Interval translation values: Here you specify the value table to be used during translation by intervals. You may also upload the values from a PC file (text separated by tabs). In addition, F4 help is available in column "New value".
    important
    During translation, only values for which the OK flag was set are included.
    http://sapabap.iespana.es/sapabap/manuales/pdf/lsmw.pdf
    regards,
    pankaj singh
    <b>**** reward if helpful</b>

  • Pricing How to shorten validity period of conditon record throgh LSMW ?

    Friends:
    We have to shorten validity period of conditon record.  We have records expiring in 2015. We have new pricing which i am planning to load through LSMW but before i load new prices i need to clean up reocrds expiring in 2015 through LSMW. Does any know how to clean up these records or shorten this records ?
    Vanbills

    Hi Vanbills,
    You need not do anything to shorten the pricing validity dates.
    Just upload your new prices using LSMW.  System will automatically shorten the validity dates.
    Example :
    Existing Pricing record     -  PR00 - 100 USD  - from 01.01.2008 to 31.12.2015
    if you are creating a new pricing record today - PR00 - 120 USD - from 01.05.2009 to 31.12.2010
    system will automatically shorten the previous record.
    It means your existing record will become - PR00 - 100 USD - from 01.01.2008 to 30.04.2009 and
    new record will be                                     PR00 - 120 USD -  from 01.05.2009 to 31.12.2010
    Hence just upload new prices....forget about shortening the old dates.
    Regards
    Krishnam Raju

  • Reg Selectin screen validations in LSMW

    Hi All,
             I am using LSMW batch input method. In this i have defined some fields as selection-screen fields in the Maintain Source fields step, such that these fiels would appear at the Read Data Step.
          Now I have to do validations for these fields which are defined as selection-screen fields.
         Can i know where these validations can be done and how?
    Thanks & Regards
    Rajesh.

    The validations can be done during the 'Convert Data' step.
    The code for validation should be entered in the 'Maintain Field Mapping and Conversion Rules' step. When you are in this mapping screen press CTRL + F7. Now select all the checkboxes in the popup and press enter. Now, you would see the processing-time blocks such as BEGIN_OF_PROCESSING, BEGIN_OF_TRANSACTION etc. You can put all your validations inside the BEGIN_OF_PROCESSING block.
    > Hi All,
    >  
    > I am using LSMW batch input method. In this i
    > have defined some fields as selection-screen fields
    > in the Maintain Source fields step, such that these
    > fiels would appear at the Read Data Step.
    >
    > Now I have to do validations for these fields
    >  which are defined as selection-screen fields.
    > Can i know where these validations can be done
    >  and how?
    >
    > Thanks & Regards
    > Rajesh.

  • How to add a new validity period to A016/KONP using LSMW?

    Experts:
    Now I have a problem,
    I need to add a new  period in Contract(ME33K),
    I already have a period item in contract like 01/01/2011~12/31/9999, 100,100.
    I need to use LSMW,
    1.change the period to 01/01/2011~01/01/2012,100,100
    2.add a new period :01/02/2012~12/31/9999,100,105
    I can do the first step beacuse there has value in table A016/KONP,but I can't do the second step,the field KNUMH is autocreated by system? I  use BUS2014/PURCONTRACT_CHANGE
    Please help!

    Thanks for reply,
    I have used these strcture for update,
    E1BPMEOUTVALIDITY
    E1BPMEOUTVALIDITYX
    E1BPMEOUTCONDITION
    E1BPMEOUTCONDITIONX
    But there is a field SERIAL_ID I don't know what value I should put in.
    Is it possible to use any function to create a serial_id? I konw it should be unique.
    If I put space in,it doesn't work
    Edited by: MF Z on Oct 12, 2011 4:50 AM

  • LSMW to create Sales Order refer to Quotation with multiple line items.

    Hi Gurus,
    I am new to LSMW, and my requirement is that, I have a file downloaded from another system, it is like this:
    Quotation No.  Sold to party  data        item no.       material no.     quatity
    556                         10000012                 10              19077                1
    556                         10000012                 20              19078                1
    557                         10000011                 10              19076                1
    And it is required I need to create orders in VA01 refering to quotations, and then delete all the items from quotation, and add the items in the file. I am now doing it through transaction recording in VA01, but I came to a difficult part, that is how I can process line items. Because the items number will only be decided at runtime, so I can not record a BDC for that. And I have read some guides on LSMW, one of it said that transaction recording in LSMW can not deal with deep structures. So could any1 help on this?
    Best regards,
    Vincent

    Dear SD Gurus n Experts,
    I have solved the above problem. But there is another problem appearing regarding the date format. Now system generating a message: Date . . is not valid.
    While I am using Date: YYYYMMDD format in flat file, which is SAP's Standard Format.
    In SDN Link: LSMW upload Sales Order using VA01/VA02     I have found that there are some date fields which are mandatory to filled. Here I have mapped
    VDATU - Requested delivery date,  BSTDK - Customer purchase order date,  PRSDT - Date for pricing and exchange rate,  BSTDK_E - Ship-to party's PO date, FKDAT - Billing Date, KORDT - Delivery Date,
    and PRGRS - Date type is Constant = D
    Can any one tell me, where is the priblem.
    With thanks,
    DSC

Maybe you are looking for