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.

Similar Messages

  • Problem in AT selection screen validation

    Hi,
    I am having problem in AT SELECTION SCREEN Validation.
    I have 2 radiobutton and 6 parameter. if i click first radio button  all the 6 radiobutton should enable and take the user input, that is working fine for me.
    if i click second radiobutton , out of 6 , 3 parameter should disable and remaining 3 should enable. thats also working fine.
    My problem is program has written the validation for this 3 parameter in the AT SELECTION SCREEN.
    For first radioutton all the validation working  fine, for second validation as soon as i press the radiobutton it will display error message. Based on 2 parameter user is filling value for 3 rd parameter.
    I want the same validation to be done for second radio button after user pressing enter.
    PARAMETER: p_single RADIOBUTTON GROUP rad1 DEFAULT 'X' USER-COMMAND f1,
               p_multi RADIOBUTTON GROUP rad1.
    PARAMETERS: s_pwwrk LIKE plaf-pwwrk.          
    PARAMETERS: p_lgort LIKE plaf-lgort.
    PARAMETERS: p_kostl LIKE cobl-kostl.
    here is my code:
    AT SELECTION SCREEN.
    CLEAR t001w.
      CLEAR t001k.
      CLEAR marv.
      SELECT SINGLE * FROM t001w WHERE werks EQ s_pwwrk.
      IF sy-subrc NE 0.
        MESSAGE e999 WITH 'Plant' s_pwwrk 'does not exist'.
      ELSE.
        SELECT SINGLE * FROM t001k WHERE bwkey EQ t001w-bwkey.
        SELECT SINGLE * FROM marv WHERE bukrs EQ t001k-bukrs.
        IF p_budat0(4) NE marv-lfgja OR p_budat4(2) NE marv-lfmon
    IF marv-xruem IS NOT INITIAL.
            IF p_budat0(4) NE marv-vmgja OR p_budat4(2) NE marv-vmmon.
    MESSAGE e999 WITH p_budat4(2) p_budat0(4)
                                'is closed.
                                            Please try again.'.
            ENDIF.
          ELSE.
            MESSAGE e999 WITH p_budat4(2) p_budat0(4)
                              'is closed.
                                          Please try again.'.
          ENDIF.
        ENDIF.
      ENDIF.

    For your Case ,
    If i understand clearly,You can do the validation when you want on AT SELECTION SCREEN ON WP_FIELD.
    If you say your validation to be done only for Selection of Second Radio Button, then..
    AT SELECTION SCREEN.
    if p_multi  eq 'X'. "<- Make Validation to be done only if user select Second Button
    CLEAR t001w.
    CLEAR t001k.
    CLEAR marv.
    SELECT SINGLE * FROM t001w WHERE werks EQ s_pwwrk.
    IF sy-subrc NE 0.
    MESSAGE e999 WITH 'Plant' s_pwwrk 'does not exist'.
    ELSE.
    SELECT SINGLE * FROM t001k WHERE bwkey EQ t001w-bwkey.
    SELECT SINGLE * FROM marv WHERE bukrs EQ t001k-bukrs.
    IF p_budat+0(4) NE marv-lfgja OR p_budat+4(2) NE marv-lfmon
    IF marv-xruem IS NOT INITIAL.
    IF p_budat+0(4) NE marv-vmgja OR p_budat+4(2) NE marv-vmmon.
    MESSAGE e999 WITH p_budat+4(2) p_budat+0(4)
    'is closed.
    Please try again.'.
    ENDIF.
    ELSE.
    MESSAGE e999 WITH p_budat+4(2) p_budat+0(4)
    'is closed.
    Please try again.'.
    ENDIF.
    ENDIF.
    ENDIF.
    endif.

  • HOW TO IMPLEMENT SCREEN VALIDATION IN LDB?

    Hi,
    I am making use of Logical Database in my report, and I want to do screen validation with the screen which already exists in the system? Is it possible to do so? If yes, then how? The LDB, I am using is PSJ.
    Also, I would like to know, can we define our own selection screen incase of LDB? How is that possible if the answer is yes to it.BUt here I am not talking about dynamic selection screen. What I mean to say is that..., can we restrict the selection screen in LDB, by defining the fields which are required in the selection screen on execution of the report?
    Someone, please guide.
    Points will be rewarded for a satisfactory answer.
    Thanks & Regards,
    Ravi

    Hi Ravi,..
    Chk out the link - http://help.sap.com/saphelp_erp2005/helpdata/en/60/183d78163011d2953c0000e8353423/frameset.htm
    Yes, we can define our own selection screen and that will come right below your LDB selection screen.
    AND also LDB selection screen can be restricted ..for this you have to code in PBO of report for hiding the elements which u don't required.
    Regards
    Mithlesh

  • Selection-screen validation

    Hi Experts,
          Please can any one give me the details ..
      1)What is the actual use of selection screen  validation?
    2) When we use Selection-screen validation?
    3)If we are not written the selection-screen validation is there any effect?
    I know how to write the validation for a selection screen. But why i am asking above questions is I am very new to ABAP .My Functionl people also new to ABAP. They told me one report.I asked me what are the validation for selection screen . At that time they told there is no validation.
         Thats the reason to ask above questions..
      please tell me the details..
    Thanks In Advance..
    Thanks and Regards
    Siri..

    Abhi,
    Selection Screen Validation are used for correct input processing.
    Selection screen elements are used further in select queries to fetch data. if user enters some wrong input
    we will unnecessarily hit the data base with wrong values and select will fail , hence validation of the input
    will avoid unnecessary data base hit.
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Feb 27, 2008 12:26 PM

  • Help me with Screen shots of LSMW

    Dear All
    Please send me the Screen shots of LSMW for step by step process
    Thanking you
    Regards
    karthikeyan

    Hi Karthi,
        Send u r mail Id.
    Regards
    Alfred.

  • Slection Screen Validations

    Hi Experts,
        Could any one provide me the material for selection screen validations
    Ex: In selection Initial screen, I have 2 radio buttons. Based on selecting the radio button, the input selection screen should be displayed below the radio buttons?
    like these  provide me diff examples and also provide me the materials for these
    Thanks,
    Sanju

    Hi Sanjana,
    U can use the AT SELECTION-SCREEN event to do the necessary validation and checks..so in your case if a particular is mandatory for rd1 and not for rd2..in that case please take out the obligatory clause from the parameter and do the validation in the above event..basically if rd1 is selected and the particular parameter is blank ..display an error message.
    check this sample code.
    REPORT  ztest.
    TABLES: mara,vbak.
    PARAMETERS: r_m  RADIOBUTTON GROUP g1 DEFAULT 'X' USER-COMMAND ABC,
                r_s  RADIOBUTTON GROUP g1.
    parameters: p_matnr like mara-matnr,
                    p_vbeln like vbak-vbeln.
    AT SELECTION-SCREEN OUTPUT.
      IF r_m = 'X'.
        LOOP AT SCREEN.
          IF screen-name = 'P_VBELN'.
            screen-input = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ELSE.
        LOOP AT SCREEN.
          IF screen-name = 'P_MATNR'.
            screen-input = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    AT SELECTION-SCREEN.
    <b>  IF sy-ucomm = 'ONLI'.</b>
        IF r_m = 'X'.
          IF P_matnr IS INITIAL.
            MESSAGE e000(zz) WITH 'error'.
          ENDIF.
        ENDIF.
      ENDIF.
    Regards,
    Priyanka.<b></b>

  • Problem in selection screen validation.

    Hi All,
    I am having the following in the selection screen:
    PARAMETERS : p_r1 RADIOBUTTON GROUP grp DEFAULT 'X' USER-COMMAND dlvy,
                 p_r2 RADIOBUTTON GROUP grp .
    SELECTION-SCREEN BEGIN OF BLOCK b1 with frame title text-001.
    SELECT-OPTIONS: s_vbeln FOR lips-vbeln             MODIF ID dly.
    SELECT-OPTIONS: s_lfart FOR likp-lfart  OBLIGATORY MODIF ID dly.
    SELECT-OPTIONS: s_vstel FOR likp-vstel             MODIF ID dly.
    SELECT-OPTIONS: s_matnr FOR lips-matnr             MODIF ID dly.
    SELECT-OPTIONS: s_wadat FOR likp-wadat  OBLIGATORY MODIF ID dly.
    SELECT-OPTIONS: s_wbsta FOR vbup-wbsta             MODIF ID dly.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 with frame title text-002.
    SELECT-OPTIONS: s1_matnr FOR lips-matnr MODIF ID mat.
    SELECT-OPTIONS: s_extwg  FOR mara-extwg MODIF ID mat.
    SELECT-OPTIONS: s_werks  FOR marc-werks MODIF ID mat.
    SELECTION-SCREEN END OF BLOCK b2.
    If I choose Radio Button 1, only option 1 should be triggered,
    If I choose Radio Button 2, only option 2 should be triggered,
    For this I have:
    AT SELECTION-SCREEN OUTPUT.
      IF p_r1 = 'X'.
        blk_hide = 'MAT'.
        blk_show = 'DLY'.
      ELSE.
        blk_hide = 'DLY'.
        blk_show = 'MAT'.
      ENDIF.
      LOOP AT SCREEN.
        IF screen-group1 = blk_hide.
          screen-active = 0.
        ELSE.
          IF screen-group1 = blk_show.
            screen-active = 1.
          ENDIF.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    Now I need to validate the selection Screen, I am facing issue in doing selection screen validation:
    Can any one help me in how to go about this?
    Thanks,
    Debrup.

    pls. replace the AT SELECTION-SCREEN OUTPUT event with this one:
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        CASE 'X'.
          WHEN p_r1.
            CASE screen-group1.
              WHEN 'DLY'.
                screen-active = '1'.
              WHEN 'MAT'.
                screen-active = '0'.
            ENDCASE.
          WHEN p_r2.
            CASE screen-group1.
              WHEN 'DLY'.
                screen-active = '0'.
              WHEN 'MAT'.
                screen-active = '1'.
            ENDCASE.
        ENDCASE.
        MODIFY SCREEN.
      ENDLOOP.

  • Raising Exception in Selection screen validation

    Hi All,
    I am doing a selection screen validation in BI report using the CMOD. If my validation fails i need to raise a error message instead showing the report. How can i perform that. How should i handle this using abap.
    Thanks in advance
    Prem

    Hi,
    But this does not stop the execution of the report, the error message which i have given is been displayed in the report top and still the report gets executed.
    Please suggest how to stop the report execution and to stay on the same selelction screen page.
    Thanks
    Prem

  • Selection Screen Validation for Character

    Hi All
    My query is regarding the selection screen validation for character.
    I am using a Select-option: S_ORDER FOR VBAK-VBELN OBLIGATORY.
    and S_order should be only having the numeric field.
    Please help how to validate it for character field.

    Hi,
    Do as below :
    at selection-screen.
    if not s_order[] is initial.
       if s_order-low CA 'ABCDEF.............Z'.
         message 'Enter only numerics only' type 'E'.
      endif.
    "similarly for s_order-high also.
    endif.
    Thanks,
    Sriram Ponna.

  • Screen validations

    Hi Experts,
    How can i do the screen validations with Ranges. The below is the Description in the Func. Specs.
    Posting date-FAGLFLEXA-BUDAT-Range with F4 help on date. Single Multiple values should also work
    G/L Account-FAGLFLEXA-RACCT-Range with F4 help. Single Multiple values should also work
    Validation: Verify that this FAGLFLEXA-RACCT is maintained as KONTS in the table T030K. The chart of account T030K-KTOPL required to access this table can be found by entering Company code BUKRS into table V_001_S and pick up V_001_S-KTOPL.
    Thanks & Regards,
    Ramana

    As per your question u are using select-option.
    select-option is nothing but it creates internal table.
    suppose if u r using S_date then it creates internal table of same name containing sign,opt,low, high columns
    If you put range then s_date-low contains <lower limit>  & s_date-high higher <higher limit>
    i.e.
    s_date = 01.05.2008  to 05.05.2008
    then
    s_date-low = 01.05.2008
    s_date-high = 05.05.2008
    like that
    and if you put multiple values like diffrent dates
    then i appends that multiple date in to s_date-low
    ie 
    s_date = 01.05.2008
                  03.05.2008
                  06.05.2008
    then it will appear as
    sign     opt       low             high
      I         EQ     01.05.2008
      I         EQ     03.05.2008
      I         EQ     06.05.2008
    in select option.
    Now i guess u will clear with the select option concept
    Accordingly you can use LOOP STATEMENT on S_DATE
    either  in AT-SELECTION screen or in INITIALIZATION
    Hope you will get an Answer
    Regards ,
    Swarup

  • 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>

  • Screen validation for BAPI_ENTRYSHEET_CREATE

    Hi All,
    We are using BAPI_ENTRYSHEET_CREATE to create entry sheet  for work orders,
    we are passing WBS element to table parameter 'entrysheetaccountassignment 'and entry sheet created successful,
    if we passing incorrect WBS element,BAPI is not validating(through transaction it's validating),
    Entry sheet created succecdully but , if we check in transaction ML83 the WBS field is blank,
    how to check screen validation,
    Regards,
    Suresh.D
    Edited by: suresh dameruppula on Apr 23, 2010 2:37 PM

    Hi,
    this BAPI does not perform validation. It just converts WBS from external format into internal format. In case of invalid conversion it clears WBS element field. Hence if you want to have a WBS validation then you need to do it by yourself using BAPI BAPI_PROJECT_EXISTENCECHECK.
    Cheers

  • Selection screen validation in HR ad hoc query

    Hi Experts,
    I have created a query in SQ01. My infoset is created using Logical database PNPCE. Selection criteria contains Fields  Personnel Number and Employment status. so when the query will be run, I want to display error message if invalid personnel number or Employment status is entered. Please let me know, How do I achieve it.
    Thanks in advane.
    Regards.

    Hi
    After declaring selection screen fields.
    select the field to handle validation and click on the button 'Check coding for
    Element' .
    you will get a block to handle the validation.

  • Selection screen validation when using PNP LDB

    Hi guys,
    I want to validate my selection screen parameters.Thats is if somebody wants to run the program without giving any input parameters to the selection screen(trying to run the report with a blank screen) I want to pop up an error/information message so that it will return the selection screen.I am using PNP Logical database for my selection screen.Please help.Thanks in advance.
    Thanks,
    Karthik.

    Welcome to SDN.
    If you are using PNP logical data base then validating the fields will be little tricky...
    You canc check all the other fields in START-OF-SELECTION and if they are empty return eroor. Remember all the field s on the scree... so I will suggest you to choose HR report Category accordingly.
    Also,when it comes to date field then you need to check for the start and end dates rather than blank fields as SAP defaulted them to system start and end date.
    Still, I will prefer to create a HE Report Category for the PNP database and use the screen while validating....that will be easy...

Maybe you are looking for

  • Plan material from Maintenance Order

    How i can plan from Maintenance order a material with accaunt category Q(special stock) for create a RDA Thank you

  • OPA 10.4.2 Compatibility with PeopleTools 8.52

    Hi, We would like to inquire if OPA 10.4.2 will work with PeopleTools 8.52. Thanks! Regards, Ann Miranda

  • Converting cmyk to rgb

    I have about 200 .psd files with a customized CMYK profile (used for press) that I have covert to Adobe RGB (1998).   Amazon recommends this for Look Inside, because CMYK fails when they OCR the PDFs. The only way I know to do this is one .psd at a t

  • After Effects cs6 crashs on almost everything after new install

    Hi, I bought a new SSD to install Windows 7 64 bit and the software I'm used to working with on. After that install After Effect crashes as soon as I import a file. I've read other treads about the temp file paths but there all at %USERPROFILE%\AppDa

  • Giant FAIL for Time Machine

    Dear Apple, Here's a word problem which you appear to have utterly failed: User buys a new Mac. User transfers account from old Mac to new Mac. User sells/retires/recycles old Mac. Two weeks later, User needs a file from the old Mac which Time Machin