LDB selection screen field mandatory

hi,
In LDB selection screen i want to make other period field as mandatory.
how to do it? if anyone knows please help me.
thanks in advance.
Suchithra.

Hi,
You can use following code to (AT SELECTION-SCREEN OUTPUT) in the LDB to make selection screen parameter mandatory.
AT SELECTION-SCREEN OUTPUT.
loop at screen.
  if screen-name = 'PNPBEGDA'.    "Give here the screen field name that you want make as manadatory
                                                    " to get the screen field name, press 'F1' on that field and get technical  
                                                    "information
    screen-required = 1.
    MODIFY SCREEN.
  endif.
endloop.
Hope this helps,
Shrinivas

Similar Messages

  • Selection screen field-mandatory

    Hai Experts,
    I have two fields bukrs and vkorg in two different blocks of a selection screen..
    my requirement is this:
    when bukrs is blank, the field vkorg should be mandatory.
    when bukrs is given value, vkorg should not be mandatory.
    how to do this.
    Following is the code wat i have written. but it is not satisfying the requirement.
    LOOP AT SCREEN.
        IF s_bukrs IS INITIAL.
          IF s_vkorg IS INITIAL.
            screen-group1 = 'MO1'.
            screen-required = '1'.
            MODIFY SCREEN.
            EXIT.
          ENDIF.
        ENDIF.
        IF s_bukrs IS NOT INITIAL.
          IF s_vkorg IS INITIAL.
            screen-group1 = 'MO1'.
            screen-required = '0'.
            MODIFY SCREEN.
            EXIT.
          ENDIF.
        ENDIF.
      ENDLOOP.
    Regards,
    Neela.

    you have to do like this and for achieving the requirement you have to press enter in the selection screen or any user interaction to trigger at selection-screen event.
    data : flag.
    at selection-screen output.
    if flag = 'X'.
    LOOP AT SCREEN.
    IF s_bukrs IS INITIAL.
    IF s_vkorg IS INITIAL.
    screen-group1 = 'MO1'.
    screen-required = '1'.
    MODIFY SCREEN.
    EXIT.
    ENDIF.
    ENDIF.
    IF s_bukrs IS NOT INITIAL.
    IF s_vkorg IS INITIAL.
    screen-group1 = 'MO1'.
    screen-required = '0'.
    MODIFY SCREEN.
    EXIT.
    ENDIF.
    ENDIF.
    ENDLOOP.
    clear flag.
    endif.
    at selection-screen.
    flag = 'X'.
    start-of-selection.
    regards
    shiba dutta

  • How to put Mandatory option for selection screen fields in ABAP Queries

    Hi Experts
    Can anyone tell me how to put mandatory option for the selection screen fields in ABAP Queries.
    Manually I had written code in the At Selection Screen  option in infoset to display error message if that field is blank.
    But I need to display the selection fields with the tick mark (obligatory mark).
    How to do this?
    Appropriate answers will be awarded

    Hi
    For parameter option
    parameters : p_kunnr type kna1-kunnr  obligatory.
    For select option
    select-options: s_date for vbak-erdat obligatory.
    Plz rewards points ,
    Regards ,
    Ganesh.

  • How to populate f4 values to standard pnp selection screen fields

    Hi Experts,
    my question is how to populate f4 values to standard pnp selection screen field. i am using LDB PNP for a report , it displays several fields with f4 values, i need to remove all the stadard f4 values and want to place my  f4 values in the selection screen

    Hi Venkat,
    To put ur own values in the F4 help of any field...all u have to do is.
    1st fetch all the records that u need to display in F4 help list...in one internal table.
    and then use the function module  'F4IF_INT_TABLE_VALUE_REQUEST'
    call function 'F4IF_INT_TABLE_VALUE_REQUEST'
    exporting
    retfield =
    value_org =
    tables
    value_tab =
    return_tab =
    exceptions
    parameter_error = 1
    no_values_found = 2
    others = 3.
    where retfield is the field for which u need to give the F4 help.
    and valu_tab is the internal table in which u have the list of records to be displayed.
    this would do the work...
    I dont have the system in front of me...as soon as i have...will try to send a piece of code, to make ur work easy.
    Till then hope this helps u...all the best
    Regards,
    Radhika

  • Selection screen fields in SAP Query

    HI friends,
    I have to make the seletion screen field as mandatory in SAP-Query.
    Please let me know the procedure to make field as mandatory or Let me know how to validate the selection-screen field in Query.
    Thanks in Advance,
    Ravi

    Go to SQ02
    Select your Infoset-->Change
    On next Screen.
    Select GoTo->Code->Initialization.
    Write there code
    LOOP AT SCREEN.
      IF screen-name EQ 'SP$00004'.
           screen-required = 1.
           MODIFY SCREEN.
      ENDIF.
    ENDLOOP.

  • Want to use ldb selection screen with select queries

    I want to use ldb selection screen with select queries since ldb having performance issue .How can I use the fields of the dynamic selection of LDB in the select queries

    Hi,
    Check the code snippet below: Here 'XXXX' is the table for your select query.
      DATA L_DS_CLAUSES TYPE RSDS_WHERE.
      MOVE 'XXXX' TO L_DS_CLAUSES-TABLENAME.
      READ TABLE DYN_SEL-CLAUSES WITH KEY L_DS_CLAUSES-TABLENAME
                                 INTO L_DS_CLAUSES.
      SELECT * FROM XXXX
              WHERE field1 IN ...
               AND   field2 ....
               AND (L_DS_CLAUSES-WHERE_TAB).
          PUT XXXX.
      ENDSELECT.
    You can also try using the FM 'RS_REFRESH_FROM_DYNAMICAL_SEL' passing SY-CPROG in curr_report and 'M'  for mode to get the dynamic selection screen values.
    Regards,
    Munesh.

  • LDB  SELECTION SCREEN HELP

    Hi,
    In ldb when when we go for selection system suggests
    1.nodes for which free selections are generated.
    2.nodes for which fields selections are to be generated
    please explain what does both option means.
    thanks in advance.

    Hi Manish
    Dynamic Selections
          The tables defined in the structure can have dynamic selections using the following
            code  in the Selections Include program
    SELECTION-SCREEN DYNAMIC  SELECTION FOR TABLE <tbnam>
      Field Selections
          The tables for which field selection is defined can be called from the ABAP/4 program
            using GET <tbnam> Fields <f1> ….<fn> addition . The code for field selection in the
    SELECTION-SCREEN FIELD SELECTION FOR TABLE <tbnam>
    regards
    kishore

  • Default value for selection screen field

    Hi all,
      I am using LDB PNPCE. I want to give default value for field Personnel area on selection screen.
    How can I do it?
    Thanks
    Rahul

    Hi Rahul,
    In the INITIALIZATION event we can set the default values for selection screen fields.
    INITIALIZATION.
    loop at screen.
    if screen-name = 'S_MATNR-LOW'.
    CLEAR S_MATNR.
    s_matnr-low = '1234'.
    s_matnr-option = 'EQ'.
    s_matnr-sign = 'I'.
    append s_matnr.
    CLEAR S_MATNR.
    s_matnr-high = '5678'.
    s_matnr-option = 'EQ'.
    s_matnr-sign = 'I'.
    append s_matnr
    clear s_matnr.
    endif.
    endloop.
    Hope it helps.
    Mark if useful
    Regards,
    Saumya

  • Making a Screen field mandatory

    Hi Experts,
    How ot make a screen field mandatory in Module pool Program. I have created a screen containing five fields and in that need to make 3 fields as mandatory.
    Please let me know and thanks in advance.
    Sunil Kumar

    In the Screen painter , Double click your field to display the properties.
    In the Attributes,  Go to 'Program' tab and in the 'Input' dropdown select the value as 'Required'

  • Truncation of selection screen field in reports

    Hi,
    Is there any way to avoid truncation of selection screen fields in ABAP reports? For eg, I declare:
    SELECT-OPTIONS: s_test FOR ztest-test_field NO INTERVALS
    The length of this field in the table is 30 chars. However, on displaying the field via selection screen, this gets truncated to around 18 or so. How do I avoid this as I need to display the full length of the field?

    Hi,
    Try this
    Tables : makt.
    select-options maknr for makt-maktx.
    now go to the screen painter of your program in change mode and move the Help buttons first to the Right each. now increasethe length of the Matnr Field length so that they are equal to 40 Char. in your program you have handle the length now if you want to restrict to 18 otherwise it will be ok
    if they don't fit you need incease the Size of the Screen Visible area both in the Screen Painter as well as in the
    Screen Attributes
    You also get an Information Message just ignore that.
    Just open your program in SE80 if you can't go to the screen painter in SE38. the other way just keep this program in Display mode and execute then take F1 help , take Technical Information and double click on the Screen number now go to the Screen Layout and go to Change mode here.
    Regards,
    Shirisha

  • Regarding Search help on selection-screen field

    Hi there,
    I am working on custom tables.
    I have a requirement to maintain search pattern on a selection-screen field.
    selection-screen parameter: p_name which is company name filed from Z table.
    By giving a string like Holl* and by  pressing F4 on the field p_name it has to popup a dialogbox having list of company names starting with Holl.
    Thanks in advance.
    -Tulasi

    Hi
    Go through the link given below :
    How to create a search help for my own fields in selection screen
    F4 search help on report selection screen
    also try :
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    DDIC_STRUCTURE = ' '
    RETFIELD = 'VKORG'
    PVALKEY = ' '
    DYNPPROG = SY-REPID
    DYNPNR = SY-DYNNR
    DYNPROFIELD = 'P_VKORG'
    STEPL = 0
    WINDOW_TITLE =
    VALUE = ' '
    VALUE_ORG = 'C'
    TABLES
    VALUE_TAB = T_TABLE1
    FIELD_TAB = field_tab
    RETURN_TAB = RET_TAB
    DYNPFLD_MAPPING = DYN_TAB
    EXCEPTIONS
    PARAMETER_ERROR = 1
    NO_VALUES_FOUND = 2
    OTHERS = 3
    With Regards
    Nikunj shah

  • Selection screen field problem

    Hello experts..
    i have a selection screen , in that i have a field   s_bwart for mseg-bwart.
    some times the user will input the data in the field and sometimes he wont. we have fixed movement types combination like
    11-21 , 13-24 , 13-56 , 101-543 , 101-544 etc.
    if the user did not input any thing in the selection screen , i am populating s_bwart in at-selection screen event with all the mvt types. after executing the report when user presses the back button to come to the selection screen, there the s_bwart field is containing all the mvt types in single values ie in the select options screen. So the user dont want that, if he comes back nothing should be there in the selection screen field s_bwart if he has not inputted anything. if he inputs only 11 mvt type then when he comes back after executing the report he should see only 11 in the select screen field ie s_bwart. Please send the replies on how to solve the problem.

    hi,
    in ur program try to display values for users in START-OF-SELECTION event as it triggers after the selection screen displayed for users. if user doesn't give any input then display default values in this event. and also create a variable
    for ex:
    data: ws_flag type c,
             p_value type i.
    after u display default values for users in selection screen assign the flag as ' X '
    ws_flag = 'X'.
    before leaving ur program based on flag try to do like this.
    if ws_flag = ' X '.
        clear s_data. // s_data is the select options for u.
    else.
         s_data = p_value. // the value which user gave in selection screen as i/p.
    endif.
    if helpful reward some points.
    with regards,
    Suresh Aluri.

  • Regarding Selection-Screen Field Display

    Hi All,
    I have issues with Selection-Screen field display.
    The Actual issue is i had declared a selection screen field as: <b>s_exgen FOR embk-exgen</b>.
    <b>EMBK-EXGEN</b> is actually <b>20</b> Char length field.
    But in output display it is being shown as <b>18</b> Char field though i can type in all <b>20</b> characters.
    But <b>display</b> restricted to <b>18</b> Characters only.
    Can anybody give me the solution for the same!
    Thanks in advance.
    Thanks & Regards,
    Prasad.

    Hi,
    You can decrease the visible length of the field but you can not increase more than database field length. check SAP help on this :
    select-options: s_exgen FOR embk-exgen VISIBLE LENGTH 5.
    ... VISIBLE LENGTH vlen
    Effect
    This addition allows you to shorten the visible length of the corresponding screen field on the selection screen to vlen.
    Variant 2
    SELECT-OPTIONS sel FOR (f).
    Additions as in variant 1.
    Effect
    In this variant, (f) must be a field containing the name of the actual reference field at runtime. The system creates the LOW and HIGH fields as character fields with length 45. However, their appearance on the selection <b>screen is inherited from the reference field whose name is contained in field f at runtime.</b>
    Regards
    Appana

  • Selection screen fields

    Hi,
    I want to group the selection screen fields. where should i group.
    I want to group using the modif Id
    T Y P E S
    TYPES:
    BEGIN OF TYVBAK,
    VBELN TYPE VBAK-VBELN,
    AUART TYPE VBAK-AUART,
    AUDAT TYPE VBAK-AUDAT,
    KUNNR TYPE VBAK-KUNNR,
    NETWR TYPE VBAK-NETWR,
    END OF TYVBAK.
    D A T A      D E C L A R A T I O N S
    DATA:
    STVBAK TYPE TYVBAK,
    ITVBAK TYPE TABLE OF TYVBAK.
    S E L E C T I O N    S C R E E N
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS:
    SKUNNR FOR STVBAK-KUNNR.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
    SELECT-OPTIONS:
    SVBELN FOR STVBAK-VBELN,
    SAUDAT FOR STVBAK-AUDAT.
    SELECTION-SCREEN END OF BLOCK B2.
    I N I T I A L I Z A T I O N
    *INITIALIZATION.
    FILLING SELECT OPTIONS WITH DEFAULTS
    SKUNNR-SIGN = 'I'.
    SKUNNR-OPTION = 'BT'.
    SKUNNR-LOW    = '1'.
    SKUNNR-HIGH   = '4000000'.
    APPEND SKUNNR.
    T O P   O F  P A G E
    TOP-OF-PAGE.
    WRITE:/1'SALES DOC',12 'DOC TYPE',20 'SALES DATE',32 'NETWORTH',60 'CUSTOMER'.
    *A T   S E L E C T I O N    S C R E E N    O U T P U T .
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'SVBELN-LOW'.
    SCREEN-INPUT = 0.
    MODIFY SCREEN.
    ENDIF.
    IF SCREEN-NAME = 'SVBELN-HIGH'.
    SCREEN-INPUT = 0.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    where should i group SBVELN and SAUDAT

    Hi
    Instead of SCREEN-NAME use SCREEN-GROUP1 and for your select options give MODIF ID.
    As follows
    SELECTION-OPTIONS: selcrt for dobj MODIF ID MOD1.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    CHECK SCREEN-GROUP1 = 'MOD1.
    SCREEN-REQUIRED = 1.
    MODIFY SCREEN.
    ENDLOOP.
    This is COZ when you use select-options you get TWO fileds on the INPUT screen LOW and HIGH so you have to check for selcrit-low and selctri-high you can avoid all this my assigning a MODIF ID.
    See this sample programs for this
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: pa_file TYPE rlgrap-filename MODIF ID abc,
    pa_lifnr TYPE lfa1-lifnr MODIF ID abc,
    pa_vkorg TYPE vbak-vkorg MODIF ID abc.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    PARAMETERS: pa_kunnr TYPE vbak-kunnr MODIF ID def.
    SELECT-OPTIONS: s_lifnr FOR gs_lfa1-lifnr MODIF ID def,
    s_date FOR gs_lfa1-erdat MODIF ID def,
    s_augru FOR gs_vbak-augru MODIF ID def,
    s_vbeln FOR gs_vbak-vbeln MODIF ID def.
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pa_upd RADIOBUTTON GROUP g1 USER-COMMAND uc01 DEFAULT 'X'."#EC *
    SELECTION-SCREEN COMMENT 3(60) text-004 FOR FIELD pa_upd.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pa_rep RADIOBUTTON GROUP g1 ."#EC *
    SELECTION-SCREEN COMMENT 3(60) text-005 FOR FIELD pa_rep.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK b3.
    IF pa_rep EQ gc_x.
    LOOP AT SCREEN.
    IF screen-group1 = gc_abc.
    screen-input = gc_zero_num.
    ELSEIF screen-group1 = gc_def.
    screen-active = gc_one_num.
    ENDIF.
    MODIFY SCREEN.
    ENDLOOP.
    ELSEIF pa_upd EQ gc_x.
    *For Reprocessing
    LOOP AT SCREEN.
    IF screen-group1 = gc_def.
    screen-input = gc_zero_num.
    ELSEIF screen-group1 = gc_abc.
    screen-active = gc_one_num.
    ENDIF.
    MODIFY SCREEN.
    CLEAR pa_upd.
    ENDLOOP.
    ENDIF.
    REPORT zrich_001.
    PARAMETERS: p_rad1 RADIOBUTTON GROUP grp1 DEFAULT 'X'
    user-command chk,
    p_rad2 RADIOBUTTON GROUP grp1.
    SELECT-OPTIONS: s_datum1 FOR sy-datum MODIF ID d1,
    s_datum2 FOR sy-datum MODIF ID d2.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    IF p_rad1 = 'X'
    AND screen-group1 = 'D2'.
    screen-active = '0'.
    ENDIF.
    IF p_rad2 = 'X'
    AND screen-group1 = 'D1'.
    screen-active = '0'.
    ENDIF.
    MODIFY SCREEN.
    ENDLOOP

  • How to schedule the background job using current selection screen field val

    Hello Friends,
    How to schedule the background job using current selection screen field values.
    after completion of the job the spool should be sent as a mail to SAP Inbox.
    Is there any way to create the variant dynamically by reading the current selection screen values.
    Thanks,
    Ravi

    Hi,
    To get the variant details you can use teh following FM.
    'RS_VARIANT_CONTENTS'.
    Regards,
    Ankur Parab

Maybe you are looking for

  • Looking for a 58mm protective or UV filter for a Canon Macro using a Cannon MR-14EX Macro Ring Lite.

    Looking for a 58mm protective or UV filter for a Canon Macro Lens EF using a Cannon MR-14EX Macro Ring Lite flash unit. The lens has an external groove for the ring flash pawls, but filters I've found do not.  The external diameter of the filters doe

  • Sumary report chart colours

    is there a way to change the chart colours in the summary report. The default colours that are assigned to the selection, are not very intuitive. If you had a question that gave a range of five possible answers ranging from poor to excellent, the col

  • Photoshop & Lightroom on iPad photo quality

    I am wondering why went to editing a photo through Photoshop on my iPad, the quality of the photo decreases dramatically? Wondering if I'm doing something wrong. Thanks

  • Auto duplexing printable area (C7280 but probably all auto-duplexing HP printers)

    I have a Photosmart C7280. One of the reasons I picked it was the standard autoduplexing feature. It has a major problem though: When not using the autoduplexer, the bottom margin of the printable area is quite close to the edge. However, when using

  • Help in Managing 16 iMac student lab

    I am responsible for a 16 iMac lab at a small school. I am looking for a way to manage all 16 from my Macbook (i.e. initiate updates, put files for kids to use, etc.). I also have 20 more iMacs spread across my campus that I would also like to manage