Hiding selection screen fields upon clicking a button

Hi .
I have a requirement like we need to hide and bring back the selection screen fields upon clicking a button( Expand and collapse in the same button) .
in ABAP Query,we can maintain this,  for the variant we created.
We need this functionality on the selection-screen presently.
How to achieve this in the selection -screen?
Valuale pointers are desparately needful.
Regards,
SSR.

Hi,
SELECTION SECREEN (P_) Parameter
(S_) Select Options
SELECTION-SCREEN : BEGIN OF BLOCK BLK1 WITH FRAME TITLE TEXT-001,
BEGIN OF LINE,
COMMENT (26) C1 MODIF ID XYZ.
SELECT-OPTIONS : S_MATNR FOR MARA-MATNR MODIF ID XYZ NO-EXTENSION .
SELECTION-SCREEN : END OF LINE,
BEGIN OF LINE,
COMMENT (26) C2 MODIF ID XYZ.
SELECT-OPTIONS : S_MATKL FOR MARA-MATKL MODIF ID XYZ NO-EXTENSION .
SELECTION-SCREEN : END OF LINE.
PARAMETERS : R_MATNR RADIOBUTTON GROUP RAD1 DEFAULT 'X'
MODIF ID ABC USER-COMMAND MAT,
R_MATKL RADIOBUTTON GROUP RAD1.
SELECTION-SCREEN END OF BLOCK blk1.
INITIALIZATION.
C1 = 'Product Code'.
c2 = 'Product Group'.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-NAME0(7) = 'S_MATNR' OR SCREEN-NAME0(7) = 'S_MATKL'.
SCREEN-INPUT = '0'.
SCREEN-INVISIBLE = '1'.
ENDIF.
CASE SCREEN-NAME+0(7).
WHEN 'S_MATNR'.
IF R_MATNR = 'X'.
SCREEN-INPUT = '1'.
SCREEN-INVISIBLE = '0'.
ENDIF.
WHEN 'S_MATKL'.
IF R_MATKL = 'X'..
SCREEN-INPUT = '1'.
SCREEN-INVISIBLE = '0'.
ENDIF.
ENDCASE.
IF R_MATNR = 'X'.
IF SCREEN-NAME = 'C1'.
C1 = 'Product code'.
C2 = SPACE.
ENDIF.
ENDIF.
IF R_MATKL = 'X'.
IF SCREEN-NAME = 'C2'.
C2 = 'Product Group'.
C1 = SPACE.
ENDIF.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
Hope it helps.
best regards,
Nagaraj Kalbavi

Similar Messages

  • Selection Screen Depeon Upon Radio Button

    How to display Selection Screen depend upon the Radiobutton Flag.
    SELECTION-SCREEN BEGIN OF BLOCK OPTION WITH FRAME TITLE TEXT-T01.
    PARAMETERS: <b>CUSTOMER</b> LIKE KNA1-LOEVM DEFAULT 'X'
                                     RADIOBUTTON GROUP HIT.
    PARAMETERS: <b>VENDOR</b>   LIKE LFA1-LOEVM  RADIOBUTTON GROUP HIT.
    SELECTION-SCREEN END OF BLOCK OPTION.
    SELECTION-SCREEN SKIP 0.
    SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE TEXT-T02 .
    PARAMETERS    : P_BUKRS TYPE T001-BUKRS DEFAULT 'EIS' OBLIGATORY.
                                          "Company Code
    SELECT-OPTIONS:
                    S_LAND1 FOR T005-LAND1 DEFAULT 'IT' OBLIGATORY,
                                          "Country
                    S_SPMON FOR S031-SPMON,         "Period
              <b>      S_KUNNR FOR KNA1-KUNNR,         "Customer
                    S_LIFNR FOR LFA1-LIFNR,         "Vendor</b>                S_STCEG FOR KNA1-STCEG,         "VAT Registration Number
                    S_STCD1 FOR KNA1-STCD1,                     "TAX Code1
                    S_STCD2 FOR KNA1-STCD2.                     "TAX Code2
    SELECTION-SCREEN END OF BLOCK 1.
    I want to diaplay <b>S_KUNNR</b> or <b>S_LIFNR</b> depend upon Radiobutton Flag.
    Could any body help me.
    Thanx in Advance.<b></b><b></b>

    You can try this.
    report zrich_0001.
    tables: t005, s031, kna1, lfa1.
    selection-screen begin of block option with frame title text-t01.
    parameters: customer like kna1-loevm default 'X'
                     radiobutton group hit  user-command chk.   "<- ADD THIS
    parameters: vendor like lfa1-loevm radiobutton group hit.
    selection-screen end of block option.
    selection-screen skip 0.
    selection-screen begin of block 1 with frame title text-t02 .
    parameters : p_bukrs type t001-bukrs default 'EIS' obligatory.
    * "Company Code
    select-options:
    s_land1 for t005-land1 default 'IT' obligatory,
    * "Country
    s_spmon for s031-spmon,
    s_kunnr for kna1-kunnr modif id kun, "<- ADD THIS
    s_lifnr for lfa1-lifnr modif id lif, "<- ADD THIS
    s_stcd1 for kna1-stcd1,                                     "TAX Code1
    s_stcd2 for kna1-stcd2.                                     "TAX Code2
    selection-screen end of block 1.
    *  ADD ALL THIS
    at selection-screen output.
      loop at screen.
        if customer = 'X'
            and screen-group1 = 'LIF'.
          screen-active = '0'.
          modify screen.
        endif.
        if vendor = 'X'
            and screen-group1 = 'KUN'.
          screen-active = '0'.
          modify screen.
        endif.
      endloop.
    REgards,
    Rich Heilman

  • 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

  • Selection screen fields in query

    experts
    i have created a query with 5 selection screen fields, now i want to change the order of the fields in the selection screen.
    Earlier:
    Material
    order
    delivery
    qty
    amount
    Now i want
    order
    material
    delivery
    amount qty
    In sq01 i tried but there are possibility to change the output fields but not selection screen field sequence.

    Hi,
    In SQ01, enter the query name and click on the change button.
    Next click on the next screen (top left) arrow button until you reach Change query xxxxx: Selections.
    Here under the column No  enter the number like 1,2,3, 4 ... against the checked fields that want to see in order. Then save the query.
    Regards,

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

  • Auto Incrementation of  a Selection-Screen Field

    Hi Folks,
    How to Increment a Selection-Screen Field (Consider Parameter)..
    When we press a back button on Urs Output List.
    ( For Example : we have a slelction screen field (parameter) by name customer. When we enter 1000(say) in it then an output list is displayed.
    after we press the BACK button on the displayed list the next time the Selectio screen fieeld should Automatically Display an Incremented value of 1001 (instead if 1000).
    Plz help me..!!

    hi
    try this logic
    at user-command.
    case sy-ucomm.
    when 'BACK'.
    customer = customer + 1.
    leave to screen 100.
    endcase .
    Cheers

  • Selection-screen fields validation for dialog

    Hello ABAP Gurus
    Requirements: this is a report wherein , depending upon the correct select-options , user will pick some field values from table and some will be entered by the user in the next se51 custom screen for creation of a record in a ztable .
    the problem is :without validating select-options values , it calls the se51 screen 100.
    How to keep the cursor at the selection-screen field until & unless user enters the correct i/p s .if i/p are correct then only it should call screen 100 otherwise remain in the selection screen only .
    *& Report ZSD_REP_QUOT_BANK_CREATE *
    REPORT ZSD_REP_QUOT_BANK_CREATE NO STANDARD PAGE HEADING LINE-SIZE 255.
    TABLES: VBAK,VBAP,VBRK,ZSD_TABL_QOTBANK,MARA,KONV.
    DATA: OK_CODE LIKE SY-UCOMM,
    SAVE_OK_CODE LIKE SY-UCOMM,
    WA_ITAB LIKE ZSD_TABL_QOTBANK,
    ANSWER TYPE C,
    COPIED ,
    STS TYPE N,
    EMGRP LIKE MARA-EXTWG,
    QTY LIKE ZSD_TABL_QOTBANK-QTY,
    UPRICE LIKE ZSD_TABL_QOTBANK-UPRICE,
    TOT LIKE ZSD_TABL_QOTBANK-TOT,
    INO LIKE VBAP-POSNR.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-000.
    SELECT-OPTIONS: S_QTNO FOR ZSD_TABL_QOTBANK-QTNO
    NO INTERVALS NO-EXTENSION OBLIGATORY,
    S_ITNO FOR ZSD_TABL_QOTBANK-ITNO
    NO INTERVALS NO-EXTENSION OBLIGATORY.
    S_MATNO FOR ZSD_TABL_QOTBANK-MATNO
    NO INTERVALS NO-EXTENSION. "
    SELECTION-SCREEN END OF BLOCK b1.
    AT SELECTION-SCREEN.
    SELECT SINGLE VBTYP
    INTO VBAK-VBTYP
    FROM VBAK
    WHERE VBELN IN S_QTNO.
    IF SY-SUBRC EQ 0 AND VBAK-VBTYP NE 'B'.
    MESSAGE I005(ZQOTBANK).
    SET CURSOR FIELD S_QTNO-LOW.
    SUBMIT (SY-REPID) VIA SELECTION-SCREEN.
    ENDIF.
    CLEAR WA_ITAB.
    SELECT SINGLE QTNO ITNO
    INTO WA_ITAB
    FROM ZSD_TABL_QOTBANK
    WHERE QTNO IN S_QTNO
    AND ITNO IN S_ITNO.
    IF SY-SUBRC EQ 0.
    MESSAGE I001(ZQOTBANK).
    SET CURSOR FIELD S_QTNO-LOW.
    SET CURSOR FIELD S_ITNO-LOW.
    SUBMIT (SY-REPID) VIA SELECTION-SCREEN.
    ENDIF.
    *START-OF-SELECTION.
    END-OF-SELECTION.
    CALL SCREEN 0100.
    *& Module STATUS_0100 OUTPUT
    text
    MODULE STATUS_0100 OUTPUT.
    SET PF-STATUS '0100'.
    SET TITLEBAR '0100'.
    ZSD_TABL_QOTBANK-QTNO = S_QTNO-LOW.
    SELECT SINGLE BUKRS_VF VKORG VTWEG SPART KUNNR ERDAT BNDDT
    KNUMV
    INTO (ZSD_TABL_QOTBANK-CCODE,
    ZSD_TABL_QOTBANK-SORG,
    ZSD_TABL_QOTBANK-DISTCHAN,
    ZSD_TABL_QOTBANK-DIV,
    ZSD_TABL_QOTBANK-CUSTNO,
    ZSD_TABL_QOTBANK-QTDAT,
    ZSD_TABL_QOTBANK-QTVALDAT,
    VBAK-KNUMV)
    FROM VBAK
    WHERE VBELN IN S_QTNO
    AND VBTYP = 'B'.
    IF SY-SUBRC EQ 0.
    SELECT SINGLE KWMENG POSNR MATNR
    INTO (QTY , INO , ZSD_TABL_QOTBANK-MATNO)
    FROM VBAP
    WHERE VBELN IN S_QTNO.
    SELECT SINGLE EXTWG
    INTO EMGRP
    FROM MARA
    WHERE MATNR EQ ZSD_TABL_QOTBANK-MATNO.
    ZSD_TABL_QOTBANK-ITNO = INO.
    ZSD_TABL_QOTBANK-EMATGRP = EMGRP.
    ZSD_TABL_QOTBANK-QTY = QTY.
    SELECT SINGLE KBETR
    INTO UPRICE
    FROM KONV
    WHERE KNUMV = VBAK-KNUMV
    AND KPOSN = INO
    AND KSCHL = 'PR00'.
    ENDIF.
    ZSD_TABL_QOTBANK-UPRICE = UPRICE.
    TOT = QTY * UPRICE .
    ZSD_TABL_QOTBANK-TOT = TOT .
    CLEAR: QTY, UPRICE, TOT.
    QTY = ZSD_TABL_QOTBANK-CGL_QTY.
    UPRICE = ZSD_TABL_QOTBANK-CGL_UPRICE .
    TOT = QTY * UPRICE .
    ZSD_TABL_QOTBANK-CGL_TOT = TOT .
    CLEAR: QTY, UPRICE, TOT.
    QTY = ZSD_TABL_QOTBANK-BHEL_QTY.
    UPRICE = ZSD_TABL_QOTBANK-BHEL_UPRICE .
    TOT = QTY * UPRICE .
    ZSD_TABL_QOTBANK-BHEL_TOT = TOT .
    CLEAR: QTY, UPRICE, TOT.
    QTY = ZSD_TABL_QOTBANK-BHEL_QTY.
    UPRICE = ZSD_TABL_QOTBANK-BHEL_UPRICE .
    TOT = QTY * UPRICE .
    ZSD_TABL_QOTBANK-BHEL_TOT = TOT .
    CLEAR: QTY, UPRICE, TOT.
    QTY = ZSD_TABL_QOTBANK-ALSTOM_QTY.
    UPRICE = ZSD_TABL_QOTBANK-ALSTOM_UPRICE .
    TOT = QTY * UPRICE .
    ZSD_TABL_QOTBANK-ALSTOM_TOT = TOT .
    CLEAR: QTY, UPRICE, TOT.
    QTY = ZSD_TABL_QOTBANK-SIEMENS_QTY.
    UPRICE = ZSD_TABL_QOTBANK-SIEMENS_UPRICE .
    TOT = QTY * UPRICE .
    ZSD_TABL_QOTBANK-SIEMENS_TOT = TOT .
    CLEAR: QTY, UPRICE, TOT.
    QTY = ZSD_TABL_QOTBANK-TELK_QTY.
    UPRICE = ZSD_TABL_QOTBANK-TELK_UPRICE .
    TOT = QTY * UPRICE .
    ZSD_TABL_QOTBANK-TELK_TOT = TOT .
    CLEAR: QTY, UPRICE, TOT.
    QTY = ZSD_TABL_QOTBANK-OTH_QTY.
    UPRICE = ZSD_TABL_QOTBANK-OTH_UPRICE .
    TOT = QTY * UPRICE .
    ZSD_TABL_QOTBANK-OTH_TOT = TOT .
    CLEAR: QTY, UPRICE, TOT.
    ENDMODULE. " STATUS_0100 OUTPUT
    *& Module USER_COMMAND_0100 INPUT
    text
    MODULE USER_COMMAND_0100 INPUT.
    CASE OK_CODE.
    WHEN 'SAVE'.
    INSERT ZSD_TABL_QOTBANK.
    IF SY-SUBRC EQ 0.
    MESSAGE I000(ZQOTBANK).
    COMMIT WORK.
    CALL SELECTION-SCREEN 1000.
    ELSE.
    MESSAGE E001(ZQOTBANK).
    CALL SELECTION-SCREEN 1000.
    ENDIF.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_0100 INPUT
    *& Module EXIT_COMMAND INPUT
    text
    MODULE EXIT_COMAND INPUT.
    SAVE_OK_CODE = OK_CODE.
    CLEAR OK_CODE.
    CASE SAVE_OK_CODE.
    WHEN 'CANCEL'.
    CALL FUNCTION 'POPUP_TO_CONFIRM'
    EXPORTING
    TITLEBAR = 'Quotation Bank Entry'
    TEXT_QUESTION = 'Do you want to Cancel ?'
    TEXT_BUTTON_1 = 'Yes'
    TEXT_BUTTON_2 = 'No'
    DEFAULT_BUTTON = '2'
    IMPORTING
    ANSWER = ANSWER.
    IF ANSWER = '1'.
    LEAVE PROGRAM.
    ELSE.
    CALL SELECTION-SCREEN 1000.
    ENDIF.
    WHEN 'EXIT'.
    CALL FUNCTION 'POPUP_TO_CONFIRM'
    EXPORTING
    TITLEBAR = 'Quotation Bank Entry'
    TEXT_QUESTION = 'Do you want to Exit ?'
    TEXT_BUTTON_1 = 'Yes'
    TEXT_BUTTON_2 = 'No'
    DEFAULT_BUTTON = '2'
    IMPORTING
    ANSWER = ANSWER.
    IF ANSWER = '1'.
    LEAVE PROGRAM.
    ELSE.
    CALL SELECTION-SCREEN 1000.
    ENDIF.
    ENDCASE.
    ENDMODULE. " EXIT_COMMAND INPUT
    Thnx in Advance

    Put the statement
    CALL SCREEN 100
    in the event <b>AT SELECTION-SCREEN</b> and NOT in <b>END-OF-SELECTION</b>.
    Regards,
    Subramanian V.

  • Need help on search help on selection screen field

    Hi guyz,
    Please tell me how to pass the parameter or restrict the below search help.
    *s_bsart FOR ekko-bsart . " Doc. Type*
    For the above selection screen field i need to display the data only for cat = F if i click search help.
    Thanks,
    Mohamed Kaleel

    Hi,
    Use At selection-screen for value-request for s_bsart.
    SELECT_OTPIONS: s_bsart FOR ekko-bsart.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_bsart.
    CALL SCREEN 100 STARTING AT 10 5
    ENDING AT 50 10.
    MODULE value_list OUTPUT.
    SUPPRESS DIALOG.
    LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.
    SET PF-STATUS space.
    NEW-PAGE NO-TITLE.
    s_bsart-low = 'F' / 'CAT=F'.
    write :/ s_bsart-low.
    Hide: s_bsart-low
    clear s_bsart-low.
    ENDMODULE.
    AT LINE-SELECTION.
    LEAVE TO SCREEN 0.
    This will resolve the issue.
    Regards,
    Gurpreet

  • How to assign F1 help to the selection screen fields

    Hi All,
    I have a requirement.I have to create a button named "HELP" at the side of Execute button in the selection screen.If I place my cursor in the selection screen field and I press that "HELP" button, I should get the Documentation help for that field.
    Please suggest me on this.
    Thanks in advance.
    Sreeharsha Singuru

    Hi sreeharsha,
    here a short example:
    TABLES: MARA.
    TABLES: SSCRFIELDS.
    TYPE-POOLS: ICON.
    DATA: CURSORFIELD(20).
    SELECTION-SCREEN: BEGIN OF LINE.
    SELECT-OPTIONS: S_MATNR FOR MARA-MATNR.
    SELECTION-SCREEN: END   OF LINE.
    SELECTION-SCREEN: BEGIN OF LINE.
    SELECT-OPTIONS: S_MTART FOR MARA-MTART.
    SELECTION-SCREEN: END   OF LINE.
    SELECTION-SCREEN: SKIP 3.
    SELECTION-SCREEN: BEGIN OF LINE.
    SELECTION-SCREEN: PUSHBUTTON (10) PB01 USER-COMMAND HELP.
    SELECTION-SCREEN: END   OF LINE.
    AT SELECTION-SCREEN.
      GET CURSOR FIELD CURSORFIELD.
      CASE SSCRFIELDS.
        WHEN 'HELP'.
          CASE CURSORFIELD.
            WHEN 'S_MATNR-LOW'.
              CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT' "Make your own Text
                EXPORTING
                  TITEL        = 'Information'
                  TEXTLINE1    = 'Information for field:'
                  TEXTLINE2    = 'S_MATNR-LOW'
                  START_COLUMN = 10
                  START_ROW    = 15.
            WHEN 'S_MTART-LOW'.
              CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'  "Make your own Text
                EXPORTING
                  TITEL        = 'Information'
                  TEXTLINE1    = 'Information for field:'
                  TEXTLINE2    = 'S_MTART-LOW'
                  START_COLUMN = 10
                  START_ROW    = 15.
          ENDCASE.
      ENDCASE.
    INITIALIZATION.
      CONCATENATE ICON_INFORMATION 'Help' INTO PB01.
    START-OF-SELECTION.
      SELECT * FROM MARA WHERE MATNR IN S_MATNR.
        WRITE: / MARA-MATNR.
      ENDSELECT.
    Hope it helps.
    Regards, Dieter

  • Selection-screen (field from .Include structure)

    Hi all,
    I have a selection screen with several select-options. One of the select-option is
    select-options: s_vornr for afvc-vornr.
    Where 'vornr' is a .Include structure field in the table 'afvc'. Now my question is, in selection screen when I click on the box for this particular select-option I dont see the circle(from where we can select the existing input values) at the end of the box.
    Why is it so and how can get that circle option at the end of the box by sticking to the same table and field(afvc-vornr).
    Waiting for your help.
    Thanks

    hi,
    the field do not have nay value range with it.
    you can put the F4 help by using
    At Selection-Screen on Value-request <select-option>. event.
    e.g.
    DATA :  rt_values TYPE STANDARD TABLE OF type_values,
              rs_values TYPE type_values,
              rt_fields TYPE STANDARD TABLE OF type_fields,
              rs_fields TYPE type_fields.
      CLEAR    : rs_values,rs_fields.
      REFRESH  : rt_values,rt_fields.
    Creation of selection list
      rs_fields-tabname     = 'AFVC'.
      rs_fields-fieldname   = 'VORNR
      rs_fields-selectflag  = ' '.      
      APPEND rs_fields TO rt_fields.
       SELECT vornr form AFVC
                     INTO  TABLE t_vornr.
      SORT t_vornr.
      DELETE ADJACENT DUPLICATES FROM t_vornr.
      LOOP AT t_vornr INTO s_vornr.
        rs_values =  s_vornr-vornr.
        APPEND rs_values TO rt_values.
        CLEAR rs_values.
        ENDLOOP.
    FUNCTION 'HELP_VALUES_GET_WITH_TABLE'                   EXPORTING
          fieldname    = 'AFVC'
          tabname      = 'VORNR
          titel        = 'Counting
        IMPORTING
          select_value = <select-opion>
        TABLES
          fields       = rt_fields
          valuetab     = rt_values.
    amit
    Message was edited by: Amit Khare

  • 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

  • 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

  • F4 Help for the selection screen field

    Hi Gurus,
    I have to display F4 help for a selection screen field. i am using following code:
        CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
             EXPORTING
                  retfield        = 'CODE'
                  dynpprog        = lw_repid
                  dynpnr          = sy-dynnr
                  VALUE_ORG       = 'S'
             TABLES
                  value_tab       = gi_text
                 field_tab       = li_fields_tab
                  return_tab      = pi_return_tab
             EXCEPTIONS
                  parameter_error = 1
                  no_values_found = 2
                  OTHERS          = 3.
    My internal table gi_emp has two fields CODE & TEXT. When i select 1 particular value, it returns the CODE value in the pi_return_tab table.
    But my requirement is i have to capture the corresponding TEXT value for the Returned CODE. Ex: following is the F4 help being displayed: -
    001    test
    001    test1
    but is i select code 001(First Value), i also need to capture it's corresponding Text value. In return table pi_return_tab i have only Code value.
    Please help me out.
    Note: Based on return code i can't search into the internal table gi_code, because as shown in the example, code has multiple text.

    Sachin,
    I think this is what you need. The following code will return the key and the text (OR any other columns), if both columns are in the selection screen the selected values (both columns) will also be passed to the corresponding parameters. If you only need the text to be in the return table and not passed to the selection screen then set the parameter for text with NO-DISPLAY option.
    REPORT zktest01 .
    DATA :
      BEGIN OF value_tab OCCURS 0,
        field  LIKE e070-trkorr,
        text   LIKE e07t-as4text,
      END OF value_tab.
    DATA: t_fldtab LIKE dfies OCCURS 0 WITH HEADER LINE,
          t_rettab LIKE ddshretval OCCURS 0 WITH HEADER LINE,
          t_dynmap LIKE dselc OCCURS 0 WITH HEADER LINE.
    PARAMETERS : p_field  LIKE value_tab-field,
                 p_text   LIKE value_tab-text. "NO-DISPLAY.
    INITIALIZATION.
      t_fldtab-tabname   = 'VALUE_TAB'.
      t_fldtab-fieldname = 'FIELD'.
      t_fldtab-langu     = 'E'.
      t_fldtab-position  = 1.
      t_fldtab-offset    = 0.
      t_fldtab-fieldtext = 'Key'.
      t_fldtab-reptext   = 'Key'.
      t_fldtab-leng      = 20.
      t_fldtab-intlen    = 20.
      t_fldtab-outputlen = 20.
      t_fldtab-datatype  = 'CHAR'.
      t_fldtab-inttype   = 'C'.
      t_fldtab-headlen   = 20.
      t_fldtab-keyflag   = 'X'.
      t_fldtab-lowercase = ' '.
      APPEND t_fldtab.
      t_fldtab-tabname   = 'VALUE_TAB'.
      t_fldtab-fieldname = 'TEXT'.
      t_fldtab-position  = 2.
      t_fldtab-offset    = 20.
      t_fldtab-fieldtext = 'Text'.
      t_fldtab-reptext   = 'Text'.
      t_fldtab-leng      = 60.
      t_fldtab-intlen    = 60.
      t_fldtab-outputlen = 60.
      t_fldtab-headlen   = 60.
      t_fldtab-keyflag   = ' '.
      t_fldtab-lowercase = ' '.
      APPEND t_fldtab.
      value_tab-field = '101'.
      value_tab-text = 'dddd'.
      APPEND value_tab.
      value_tab-field = '202'.
      value_tab-text = 'aaaa'.
      APPEND value_tab.
      t_dynmap-fldname = 'FIELD'.
      t_dynmap-dyfldname = 'P_FIELD'.
      APPEND t_dynmap.
      t_dynmap-fldname = 'TEXT'.
      t_dynmap-dyfldname = 'P_TEXT'.
      APPEND t_dynmap.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_field.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield        = 'FIELD'
                dynpprog        = 'ZKTEST01'
                dynpnr          = '1000'
                dynprofield     = 'P_FIELD'
                value_org       = 'S'
           TABLES
                field_tab       = t_fldtab
                value_tab       = value_tab
                return_tab      = t_rettab
                dynpfld_mapping = t_dynmap
           EXCEPTIONS
                parameter_error = 1
                no_values_found = 2
                OTHERS          = 3.
      IF sy-subrc EQ 0.
      ENDIF.
    START-OF-SELECTION.
    Jeffrey Satriadi

Maybe you are looking for