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

Similar Messages

  • 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

  • How to avoid default selection screen in HR interfaces(using pnp ldbs)

    How to avoid default selection screen in HR interfaces(using pnp ldbs)

    Dear Rakesh,
    The report category is used to change the selection screen of programs that use the 'PNP' logical database.
    See links bellow:
    http://www.sapdevelopment.co.uk/hr/hr_repcat.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/15/229357553611d3967f00a0c9306433/frameset.htm
    Report categories for selection screen in HR programming
    Also visit the following blog:
    /people/alvaro.tejadagalindo/blog/2006/02/19/how-to-deal-with-hr-payroll-reports
    Regards,
    Naveen.

  • Screen Saver does not use selected Screen Saver when activated

    Screen Saver does not use selected Screen Saver when activated. After "Start screen saver" elapse time has been reached, a blank black full screen is displayed. I can activate the selected screen saver by using the hot corners function. Any help with this matter will be greatfully received.

    Hi again sassey,
    You're assuming correctly. Simply change the settings so that your screen saver activates before the sleep settings.
    Hope this solves your problem...

  • How to add a field to the selection screen and when the user enters ...

    hi all,
    can any one plesase send the code of how to add a field to seletiion screen and when the user enters in the field , it should be store in the database table , the table is MKPF and the field is BKTXT.  Thanks.

    Hi Kripa,
       If u r using PNP ldb then the screen u will get is the screen for that ldb and if u want to add some more fields then u define using selection-screen..as follows
    SELECTION-SCREEN BEGIN OF BLOCK mysel WITH FRAME TITLE text-111.
    PARAMETERS: n_in_en  RADIOBUTTON GROUP g1,
                q_ev  RADIOBUTTON GROUP g1.
    SELECTION-SCREEN END OF BLOCK mysel.
    SELECTION-SCREEN BEGIN OF BLOCK mysel1 WITH FRAME TITLE text-222.
    PARAMETERS: r_date TYPE sy-datum DEFAULT sy-datum.
    SELECTION-SCREEN END OF BLOCK mysel1.
    SELECTION-SCREEN BEGIN OF BLOCK mysel2 WITH FRAME TITLE text-333.
    PARAMETERS:f_ver(3) TYPE c DEFAULT 1,
               c_no(10) TYPE c DEFAULT '9D0161',
               u_id(15) TYPE c,
               password(15) TYPE c,
               r_email(30) TYPE c DEFAULT PARAMETERS: s_not TYPE c AS CHECKBOX.
    PARAMETERS:t_run TYPE c  AS CHECKBOX.
    SELECTION-SCREEN END OF BLOCK mysel2.
    SELECTION-SCREEN BEGIN OF BLOCK mysel3 WITH FRAME TITLE text-444.
    SELECTION-SCREEN BEGIN OF BLOCK mysel4 WITH FRAME TITLE text-555.
    PARAMETERS: p_ser  RADIOBUTTON GROUP g2,
    a_ser  RADIOBUTTON GROUP g2.
    SELECTION-SCREEN END OF BLOCK mysel4.
    SELECTION-SCREEN BEGIN OF BLOCK mysel5 WITH FRAME TITLE text-666.
    PARAMETERS:p_path TYPE string.
    SELECTION-SCREEN END OF BLOCK mysel5.
    SELECTION-SCREEN END OF BLOCK mysel3.
    u will get this additional screen after the screen of ldb.
    I hope this will help u..
    Thanks & Regards
    Ashu Singh.

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

  • Selection-screen validations

    Hi Experts ,
    I have module pool program there in first screen user have choice to select screen if user select the first screen .The selection will be displayed with two parameters using key word
    selection-screen begin of screen 2002.
    parameters : p_date type sy-datum,
                         p_num  type kunnr.
    selection-screen end of screen 2002.
    call screen '2003'.
    now i want to do validations on these parameters ,
    please let me know how can i validate these selection-screen fields  there i try chain and endchain in screen 2003 , it says no fields in screen 2003. screen 2002 was developed dynamically by systemplease let me know  how to do validations i search it i cant find it plz solve issue .

    hi
    i think there are two methods two create selection screen
    1.  using layout here we can create selection screen with screen painter
    here we can validate using chain end endchain.
    Plz try this on
    Selection Screen
    Defined within an ABAP program; called by the runtime environment or using the CALL SELECTION-SCREEN statement; processed in event blocks of the corresponding ABAP program.
    in main screen we have 3 selections for screen 2002 ,2004, 2006.
    if sy-ucomm = 2002.
    2 .  selection-screen begin of screen 2002.
    parameters : .........
          selection-screen end of screen 2002.
    call selection-screen '2002'.
    once this was triggered after entering vales it return to the next step then
    call screen 2003.
    then it goes to PBO and PAI events.
    endif.
    if sy-ucomm = 2003.
    selection-screen begin of screen 2003.
    parameters : .........
          selection-screen end of screen 2003.
    call selection-screen '2003'.
    once this was triggered after entering vales it return to the next step then
    call screen 2004.
    then it goes to PBO and PAI events.
    endif.
    all these are done in initial screen PBO . and those are created dynamically now i want to do validations on selection-screen fields. we can;t use at selection-screen in module end end module .
    plz let me know if you know any thing more.

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

    This is my scenario:
    If program is executed in background, plant (in selection screen) is not mandatory.
    If program is executed directly, plant (in selection screen) needs to be filled (mandatory).
    I tried using sy-batch and coding at the AT SELECTION-SCREEN portion for validation but it seems that sy-batch is only populated after START-OF-SELECTION.
    How do i code it so that if user does not execute program in background, it will prompt an error message and prompt user to fill the plant field in the selection screen?

    HI,
    use sy-batch in start-of-selection. not in at selection-screen.
    start-of-selection.
    if sy-batch = ' X' . (If it runs in background)
    Then raise message.
    endif.
    This will work.
    Reward If helpful.

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

  • How to use PNP LDB

    Hi,
    can anybody provide me demo code for using PNP ldb?
    abc

    tables pernr.
    infotypes 0002.
    data: begin of itab occurs 0,
          vorna like pa0002-vorna,
          end of itab.
    data wa like line of itab.
    *write 'abc'.
    get pernr.
    provide * from p0002
               BETWEEN PNPbegda AND PNPENDDA.
    move p0002-vorna to itab-vorna.
    append itab.
    clear itab.
    endprovide.
    end-of-selection.
    loop at itab.
    write:/ itab-vorna.
    endloop.

  • IPhoto 6 Unable to Zoom in Full Screen Mode when using projector

    When in full screen mode in iPhoto 6 I am able to zoom quite nicely but when I attach a projector I lose the slide for zooming. How do I zoom in full screen mode when using a projector?
    Mac Book   Mac OS X (10.4.9)  

    ParkerT
    Given that the zoom works normally, this is not an iPhoto issue. The problem lies in the interaction between your MacBook and the Projector. You might have more luck posting on the MacBook forum
    Regards
    TD

  • How to select installation language when using silent install

    Hi,
    How can i select installation language when using silent install.
    Power management
    Presentation_Director
    System_Update
    EasyEject_Utility
    When i install those programs with silent install string it will install language i have select at windows regional options. I want thinkvantage software to be installed in english but now its finnish.
    So how to set default language EN with silent install?
    Cannot change windows regional options.

     No solution yet....?

  • How to get locked records of a pernr while using PNP LDB

    is there any way to retrieve locked records of a pernr
    while using PNP LDB??currently the get pernr event is unable to load locked records of a pernr.

    Hi,
    PL use this piece of code in your Program..
    INITIALIZATION.
    PNP-SW-IGNORELOCKEDRECORDS = 'N'.
    Regards,
    Suresh Datti

Maybe you are looking for

  • Error while building in LV8.2.1

    I have a .bld file from LabVIEW 7.1. I'v converted this build script into a LV8.2 project. and I can run my program's VIs. When I try to make an exe build, LabVIEW goes through the build process. It's a large project and takes about an hour to build.

  • How to get Adobe Air-apps to run *properly*? (Voddler ecpecially)

    First: I am running AMD64, and have installed the bin32-adob-air from AUR. The problem is, this does not work as it should. Air apps are never "installed" like they would be in Windows, or Ubuntu with the adobe-air from adobe installed. This causes p

  • Merging with Oracle BI Administration Tool

    I have specific question about merging with Oracle BI Administration Tool. At first, I copied rpd by merging with no common parent. After that, I renamed all objects in business layer and presentation layer, renamed name of database, name of connecti

  • What are some ways to remove shine from the face in portraits?

    What are some different methods that people use to remove shine from the face while still leaving enough for a subtle highlight? I would love to hear all the different options I have. Thanks!

  • Photos app sloowwww on MacBook Pro Retina

    I just tried to launch iPhoto and was informed that I needed to upgrade to the new Photos app. Big mistake apparently... after waiting for it to convert my entire photo collection, I found the application was extremely slow compared to iPhoto and the