How to put values from selection screen to  ztable

hi all,
i have created a ztable.
now i want to put data through se38.
i have given 5 parameters in selection screen same as there in ztable.
now if i put values in selection screen then it should put that values to my ztable .
how can i put values into my ztable.
i used insert but not workiing.

Hi,
Try this.
TABLES : ztable.
SELECTION-SCREEN:BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
PARAMETER : p_field1 TYPE field1_in_ztable,
                        p_field2 TYPE field2_in_ztable.
                        p_field3 TYPE field3_in_ztable.
                        p_field4 TYPE field4_in_ztable.
                        p_field5 TYPE field5_in_ztable.
SELECTION-SCREEN:END OF BLOCK b1.
DATA : itab TYPE TABLE ztable,
             wa_itab TYPE ztable.
AT SELECTION-SCREEN.
      MOVE p_field1 TO wa_itab-field1.
      MOVE p_field2 TO wa_itab-field2.
      MOVE p_field3 TO wa_itab-field3.
      MOVE p_field4 TO wa_itab-field4.
      MOVE p_field5 TO wa_itab-field5.
INSERT ztable FROM wa_itab.
IF sy-subrc = 0.
MESSAGE 'Successfully saved' TYPE 'I'.
ENDIF.
Thanks,
Sri.
Edited by: Sri on Jul 28, 2009 4:15 PM

Similar Messages

  • Problem in getting parameter value from selection screen in web dynpro abap

    Hi,
    I am facing problem in getting parameter value from selection screen.
    Please find my code below:
    DATA LT_PAR_ITEM TYPE IF_WD_SELECT_OPTIONS=>TT_SELECTION_SCREEN_ITEM.
    FIELD-SYMBOLS:<FS_PAR_ITEM> LIKE LINE OF LT_PAR_ITEM,
                                 <FS_OBJ_USAGE>    TYPE REF TO data.
      WD_THIS->M_HANDLER->GET_PARAMETER_FIELDS( IMPORTING ET_FIELDS = LT_PAR_ITEM ).
      LOOP AT LT_PAR_ITEM ASSIGNING <FS_PAR_ITEM>.
        CASE <FS_PAR_ITEM>-M_ID.
          WHEN `OBJ_USAGE`.
             ASSIGN <FS_PAR_ITEM>-M_VALUE->* TO <FS_OBJ_USAGE>.      
    [ Here, sy-subrc is 4,  <FS_OBJ_USAGE> is not assigning.]
        ENDCASE.
      ENDLOOP. 
    So, can any one solve this problem.
    Thanks in advance,
    Radhika

    Hi Radhika,
    Try using GET_RANGE_TABLE_OF_SEL_FIELD...
    Please Refer below code..
       DATA: NODE_FLIGHTS TYPE REF TO IF_WD_CONTEXT_NODE.
      DATA: RT_CARRID TYPE REF TO DATA.
      DATA: ISFLIGHT TYPE TABLE OF SFLIGHT.
      DATA: WSFLIGHT TYPE SFLIGHT.
      FIELD-SYMBOLS: <FS_CARRID> TYPE TABLE.
    Retrieve the data from the select option
      RT_CARRID = WD_THIS->M_HANDLER->GET_RANGE_TABLE_OF_SEL_FIELD( I_ID = 'S_CARR_ID' ).
    Assign it to a field symbol
      ASSIGN RT_CARRID->* TO <FS_CARRID>.
      CLEAR ISFLIGHT. REFRESH ISFLIGHT.
      SELECT * INTO CORRESPONDING FIELDS OF TABLE ISFLIGHT FROM SFLIGHT
                           WHERE CARRID IN <FS_CARRID>.
      NODE_FLIGHTS = WD_CONTEXT->GET_CHILD_NODE( NAME = `FLIGHTS` ).
      NODE_FLIGHTS->BIND_ELEMENTS( ISFLIGHT ).
    Thanks,
    Regards,
    Kiran

  • How to refresh value in selection screen field

    Hi Experts,
    I have a requirement to refresh the value in selection screen.while i run the report in selection screen i selecting one variant for look the output if i use some other field value with same variant without save its working fine i am avle to see the data but while i come back to again selection screen and selecting some other variant that extra add value is not getting refresh its showing with new variant.Its happening for only one variant not for all if i select some other variant then its getting refresh value in same field.Any one can help me for this issue.
    Thanks.

    Hi,
    That means, I believe - the value that is "not changing" is saved in the particular variant. You can easily verify it by starting the report without variant and then selecting the variant in question. Remove the value from screen and save the variant again. Don't forget to check of variant needs to be transported from development system...
    cheers
    Janis

  • Unable to retreive values from selection screen built using WDR_SELEC_OPTIO

    Hi All,
    I have created a selection screen as below
    lr_field = wd_this->m_handler->create_range_table( 'YFMTFLOW' ).
    *  ASSIGN lr_field->* TO <fs_range>.
    *  ls_date-sign   = 'I'.
    *  ls_date-option = 'EQ'.
    *  ls_date-low    = 'US'.
    *  APPEND ls_date TO <fs_range>.
    * Add the select-option to the group
      wd_this->m_handler->add_selection_field(
        i_id           = 'FLOW'
        i_within_block = 'PROC'
        i_no_intervals = abap_true
        it_result      = lr_field ).
    If i enter some value  and click a button to retireve the values as below
    DATA
        lt_sel_item TYPE if_wd_select_options=>tt_selection_screen_item.
    types: ty_flow type range of yfmtflow.
      FIELD-SYMBOLS:
        <fs_sel_item> LIKE LINE OF lt_sel_item,
        <fs_process>   TYPE yfmtprocess,
        <fs_flow>   TYPE ty_flow.
    * Get the selection-screen items
      l_handler->get_selection_screen_items(
        IMPORTING et_selection_screen_items = lt_sel_item ).
    * Retrieve the values from the select-options items
      LOOP AT lt_sel_item ASSIGNING <fs_sel_item>.
        CASE <fs_sel_item>-m_id.
          WHEN `PROCESS`.
            ASSIGN <fs_sel_item>-m_value->* TO <fs_process>.
          WHEN 'FLOW'.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_flow>.
        ENDCASE.
      ENDLOOP.
    <fs_flow> is empty
    but after I enter value and then press enter and then click the button to retrieve the values I am able to get low value <fs_flow> not the sign and option
    Is it the standard functionality ,if yes how can we overcome
    Thanks
    Bala Duvvuri

    Am giving clear coding of select options.
    nOTE: S_CARR_ID IS THE DATA ELEMENT OF CARR ID  FIELD,
    FOR THAT I AM APPLYING SELECT OPTIONS IN BELOW CODING.
    WRITE THE BELOW CODE IN WDDOINT( ) METHOD OF
    REQUIRED VIEW
    Data: lt_range_table type ref to data,
         read_only type abap_bool.
    WD_THIS->M_WD_SELECT_OPTIONS = WD_THIS-
    >WD_CPIFC_SELECT_OPTIONS( ).
    WD_THIS->M_HANDLER = WD_THIS->M_WD_SELECT_OPTIONS-
    >INIT_SELECT_SCREEN( ).
    WD_THIS->M_HANDLER->SET_GLOBAL_OPTIONS(
         I_DISPLAY_BTN_CANCEL = ABAP_FALSE
         I_DISPLAY_BTN_CHECK = ABAP_FALSE
         I_DISPLAY_BTN_RESET = ABAP_FALSE
         I_DISPLAY_BTN_EXECUTE = ABAP_FALSE ).
    LT_RANGE_TABLE = WD_THIS->M_HANDLER-
    >CREATE_RANGE_TABLE( I_TYPENAME = 'S_CARR_ID' ).
    WD_THIS->M_HANDLER->ADD_SELECTION_FIELD(
              I_ID = 'S_CARR_ID'
              IT_RESULT = LT_RANGE_TABLE
              I_READ_ONLY = READ_ONLY ).
    BELOW CODE IN REQUIRED ACTION( SAY IN SOME BUTTON
    ACTION WHICH WILL RETRIEVE THE DATA FROM DATABASE TABLE
    USING SELECTI OPTIONS VALUES)
    fIRST THE GET REFERENCE TO NODE( CTRL F7--->READ
    CONTEXTB---FLIGHT NODE )
    ***THEN BELOW CODE
    DATA: RT_CARRID TYPE REF TO DATA.
    DATA:IS_FLIGHT TYPE TABLE OF SFLIGHT.
    FIELD_SYMBOLS: <FS_CARRID> TYPE TABLE.
    RT_CARRID = WD_THIS-> M_HANDLER-
    >GET_RANGE_TABLE_OF_SEL_FIELD( I_ID = 'S_CARR_ID' ).
    ASSIGN RT_CARRID-> TO <FS_CARRID>.*
    SELECT * INTO CORRRESPONDING FIELDS OF TABLE IS_FLIGHT
       FROM SFLIGHT WHERE CARRID IN <FS_CARRID>
    NODE_FLIGHT->BIND_TABLE( IS_FLIGHT ).

  • How to put icon in selection screen

    Hello All,
    Can any one tell how to put icons ICON_EXPAND and ICON_COLLAPSE in selection screen and to use.
    Good Answers will be appreciated.
    Thanks in advance.
    Best Regards,
    Sasidhar Reddy Matli.

    hi check his..
    REPORT zalv_sel_screen .TABLES: mara.DATA: BEGIN OF i_alv OCCURS 0,
          matnr TYPE mara-matnr,
          mtart TYPE mara-mtart,
          matkl TYPE mara-matkl,
          groes TYPE mara-groes,
          maktx TYPE makt-maktx,
          END OF i_alv.DATA: alv_container  TYPE REF TO cl_gui_docking_container.
    DATA: alv_grid       TYPE REF TO cl_gui_alv_grid.
    DATA: layout    TYPE lvc_s_layo.
    DATA: fieldcat  TYPE lvc_t_fcat.PARAMETERS: p_check.INITIALIZATION.  PERFORM get_data.AT SELECTION-SCREEN OUTPUT.  DATA: variant TYPE  disvariant.
      DATA: repid TYPE sy-repid.  repid = sy-repid.  variant-report = sy-repid.
      variant-username = sy-uname.  layout-zebra = 'X'.
      layout-edit_mode = 'X'.  CHECK alv_container IS INITIAL.  CREATE OBJECT alv_container
                  EXPORTING repid     = repid
                            dynnr     = sy-dynnr
                            side      = alv_container->dock_at_left
                            extension = 1500.  CREATE OBJECT alv_grid
             EXPORTING
                   i_parent          =  alv_container.*  ALV Specific. Data selection.
    Populate Field Catalog
      PERFORM get_fieldcatalog.  CALL METHOD alv_grid->set_table_for_first_display
        EXPORTING
          is_layout        = layout
          is_variant       = variant
          i_save           = 'U'
          i_structure_name = 'I_ALV'
        CHANGING
          it_outtab        = i_alv[]
          it_fieldcatalog  = fieldcat[].
    START-OF-SELECTION.
    FORM GET_DATA
    FORM get_data.  SELECT * INTO CORRESPONDING FIELDS OF TABLE i_alv
            FROM mara
              INNER JOIN makt
                ON maramatnr = maktmatnr
                       UP TO 100 ROWS
                   WHERE makt~spras = sy-langu.  SORT i_alv ASCENDING BY matnr.ENDFORM.                    "get_data***************************************************************
         Form  Get_Fieldcatalog - Set Up Columns/Headers
    FORM get_fieldcatalog.  DATA: ls_fcat TYPE lvc_s_fcat.
      REFRESH: fieldcat.  CLEAR: ls_fcat.
      ls_fcat-reptext    = 'Material Number'.
      ls_fcat-fieldname  = 'MATNR'.
      ls_fcat-ref_table  = 'I_ALV'.
      ls_fcat-outputlen  = '18'.
      ls_fcat-fix_column = 'X'.
      ls_fcat-key        = 'X'.
      ls_fcat-col_pos    = '1'.
      APPEND ls_fcat TO fieldcat.  CLEAR: ls_fcat.
      ls_fcat-reptext    = 'Material Type'.
      ls_fcat-fieldname  = 'MTART'.
      ls_fcat-ref_table  = 'I_ALV'.
      ls_fcat-outputlen  = '10'.
      ls_fcat-fix_column = 'X'.
      ls_fcat-key        = 'X'.
      ls_fcat-col_pos    = '2'.
      APPEND ls_fcat TO fieldcat.  CLEAR: ls_fcat.
      ls_fcat-reptext    = 'Material Group'.
      ls_fcat-fieldname  = 'MATKL'.
      ls_fcat-ref_table  = 'I_ALV'.
      ls_fcat-outputlen  = '12'.
      ls_fcat-col_pos    = '3'.
      APPEND ls_fcat TO fieldcat.  CLEAR: ls_fcat.
      ls_fcat-reptext    = 'Size'.
      ls_fcat-fieldname  = 'GROES'.
      ls_fcat-ref_table  = 'I_ALV'.
      ls_fcat-outputlen  = '30'.  ls_fcat-col_pos    = '4'.
      APPEND ls_fcat TO fieldcat.  CLEAR: ls_fcat.
      ls_fcat-reptext    = 'Material Description'.
      ls_fcat-fieldname  = 'MAKTX'.
      ls_fcat-ref_table  = 'I_ALV'.
      ls_fcat-outputlen  = '40'.  ls_fcat-col_pos    = '5'.
      APPEND ls_fcat TO fieldcat.ENDFORM.                    "get_fieldcatalog

  • Passing the values from selection screen to screen painter

    Hello Friends,
    I'm making one report program in which im calling  one screen which i have designed, in my selection screen there is a select option for customer  tht accepts value range now i want to select all the customers entered in select options and pass these values in screen(screen painter).
    pls guide me how this can be done.
    Regards,
    Sunny

    Screen painter is a tool in ABAP dev workbench used to create the screens using the
    T-code SE51. In the screen painter, you can define the following interface elements with their associated attributes.
    1. Input/Output Fields
    2. Field Names
    3. Checkboxes
    4. Radio Buttons
    5. Group Boxes
    6. Sub screens.
    7. Pushbuttons with No Fixed Position
    Create a Z program in tcode SE38.
    Go to transaction SE51.
    Enter the created program name and screen number.
    Click on flowlogic tab. 
    Uncomment the statement u201C MODULE STATUS_0100 u201C. 
    CASE SY-UCOMM.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
        WHEN 'BACK'.
          LEAVE PROGRAM.
        WHEN 'DISPLAY'.
          SELECT SINGLE Fileds to selsct
               INTO (interanl table or tablename-fileds)
          WHERE Condition.    WHEN 'CLEAR'.
          CLEAR table.
      ENDCASE.
    ENDMODULE.

  • How to read value from select list

    Hi,
    i'm using jdev 10.1.3.1.0, adf, jsp and struts.
    i've made a simple viewobject 'bestyrer' (danish for department) and it contains a list of all available department in my organization.
    it appears in my jsp page as a dropdown list and when the user chose a specific department all employees in that department are shown as a master detail relationship.
    It works and its standard drag'n'drop in JDev.
    I need to know which department the user have chosen because the information i show to the user depends on it.
    my view look like this:
    SELECT KBestyrer.BESTYRER,
    KBestyrer.NAVN
    FROM K_BESTYRER KBestyrer
    bestyrer is a number and navn is the name of the department.
    the code generated in my jsp based on drag and drop is:
    <html:select property="KBestyrerView"
    disabled="${!bindings[\'KBestyrerView\'].updateable}"
    onchange="DataForm.submit();">
    <html:optionsCollection label="prompt" value="index"
    property="KBestyrerView.displayData" />
    </html:select>
    and the corresponding HTML generated is:
    <select name="KBestyrerView" onchange="DataForm.submit();"><option value="0" selected="selected">0 Vejdirektoratet</option>
    <option value="1">101 København</option>
    <option value="2">147 Frederiksberg</option>
    <option value="3">151 Ballerup</option>
    <option value="4">153 Brøndby</option>
    <option value="5">155 Dragør</option>
    <option value="6">157 Gentofte</option>
    <option value="7">159 Gladsaxe</option>
    <option value="8">161 Glostrup</option>
    <option value="9">163 Herlev</option>
    <option value="10">165 Albertslund</option>
    <option value="104">999 Andet</option></select>
    First of all i don't want the indexed values as values of my individual options but the real values as seen in fron of the name. i.e. 101 147 151 and so on.
    how do i obtain this and how do i read the value the user have chosen?
    hope to receive some help.
    thanks
    br
    kim gabrielsen

    Ok,
    thanks for the pointer. it clearifies a bit but i cannot make it work.
    I've created a second binding as described in the dokument which gives me another binding in the pagedef file:
    <attributeValues IterBinding="KBestyrerViewIterator" id="Bestyrer">
    <AttrNames>
    <Item Value="Bestyrer"/>
    </AttrNames>
    </attributeValues>
    i guess i should be able to reference this binding using 'Bestyrer' as the id.
    in my JSP page i insert the following:
    <html:select property="KBestyrerView"
    disabled="${!bindings[\'KBestyrerView\'].updateable}"
    onchange="inspect(this.form)" >
    <html:optionsCollection label="prompt" value="#{bindings.Bestyrer.getInputValue()}"
    property="KBestyrerView.displayData" />
    </html:select>
    but it fails with an error:
    org.apache.commons.beanutils.NestedNullException: Null property value for '#{bindings'     at org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty(PropertyUtilsBean.java:669)     at org.apache.commons.beanutils.PropertyUtilsBean.getProperty(PropertyUtilsBean.java:715)     at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:290)
    I've tried #{bindings.Bestyrer} and #{bindings.Bestyrer.inputValue()}
    but they fail too.
    so there is clearly something i don't understand regarding this binding stuff.
    Assuming i get this to work how do i actually accesss the value chosen by the user?
    as far as i recall in plain HTML i gave the select list a name like:
    name=MyList
    and called a javascript function like this:
    onchange="inspect(this.form)"
    in my JS function i could access the value like this:
    function inspect(form){
    alert(form.MyList.options[form.MyList.selectedIndex].text)
    but when i name the select list i receive an error:
    javax.servlet.jsp.JspException: Cannot find bean under name MyList     at org.apache.struts.taglib.html.SelectTag.calculateMatchValues(SelectTag.java:301)     at org.apache.struts.taglib.html.SelectTag.doStartTag(SelectTag.java:244)     at brugeroversigt.jspService(_brugeroversigt.java:75)     [brugeroversigt.jsp]
    I'm a bit confused here so any input would be appreciated.
    br
    kim gabrielsen

  • No values from selection screen

    Hi ppl,
    I have written a report program which has 3 parameters on the selection screen (Personnel number - pernr, trip number - reinr and status - abrec).
    I have a subroutine to check for the validity of the personnel number entered on the screen. The other two parameters do not have any validity check.
    I am using these 3 parameters in my SELECT statement. But, the problem is that when I execute it, at runtime, only the parameter for personnel number shows the value entered on the selection screen. The other two parameters show initial value at runtime though an entry has been made on the selection screen. Thus, it returns a subrc value of 4 though there are matching entries.
    Has anybody face such a problem? Please advise.
    Thanks.

    Hi David,
    Mentioning the event AT SELECTION SCREEN should resolve your problem.
    This will ensure that the values are picked from the selection sreen for all the parameters.
    (Else, if you do not use this event, your SELECT statement will not execute successfully the first time. But, if you execute your program again, it will fetch correct values.)
    Hope it solves your problem.
    Thanks,
    Dawood.

  • Post values from selection screen into vkm5 transaction

    Hi all,
    i need to create a report , when user enters values in the selection screen of that report, that values must be transported into a transaction VKM5 and then that transported values must be updated in a ztable.
    ex:
    in selection screen if user enter doc no:xxxxxx
                                                         date:  20.09.2011
                                                         Reason for release: some text
    then that doc no: xxxxx must be transported into vkm5 transaction and that values(selection screen values) must be uploaded into a ztable.
    i tried the below code
    TABLES: ZVKM5.
    data: IT_ZVKM5 type standard table of ZVKM5,
          WA_ZVKM5 type ZVKM5.
    PARAMETERS    : S_VBELN LIKE ZVKM5-VBELN ,
                    s_date LIKE  zvkm5-bldat ,
                    s_text LIKE  zvkm5-text .
    call transaction 'VKM5'.
    *LOOP AT IT_ZVKM5 INTO WA_ZVKM5.
       WA_ZVKM5-VBELN = S_VBELN.
       WA_ZVKM5-bldat = S_DATE.
       WA_ZVKM5-text  = S_TEXT .
       modify ZVKM5 from table IT_ZVKM5.
      if sy-subrc = 0.
      endif.
    *ENDLOOP.
    Kindly suggest me,
    thanks in advance,
    ben2012.

    Thanks to all ,
    Solved by me.
    REPORT  ZVKM5.
    TABLES: ZVKM5, vbuk.
    types: begin of ty_zvkm5 ,
           vbeln type VBELN_VL,
           BLDAT type BLDAT,
           TEXT type TEXT,
           UNAME TYPE CDUSERNAME,
      end of ty_zvkm5.
    TYPES: BEGIN OF TY_CDHDR,
           OBJECTID TYPE CDOBJECTV,
    END OF TY_CDHDR.
    DATA: IT_CDHDR TYPE TABLE OF TY_CDHDR,
          WA_CDHDR TYPE TY_CDHDR.
    data: IT_ZVKM5 like ZVKM5 occurs 0 with header line,
          WA_ZVKM5 type ty_ZVKM5.
      DATA: bdcdata_wa  TYPE bdcdata,
            bdcdata_tab TYPE TABLE OF bdcdata.
    data: date type STRING.
    PARAMETERS    : S_VBELN LIKE ZVKM5-VBELN ,
                    s_date LIKE  zvkm5-bldat ,
                    s_text LIKE  zvkm5-text .
          CLEAR bdcdata_wa.
          bdcdata_wa-program  = 'RVKRED05'.
          bdcdata_wa-dynpro   = '1000'.
          bdcdata_wa-dynbegin = 'X'.
          APPEND bdcdata_wa TO bdcdata_tab.
          CLEAR bdcdata_wa.
          bdcdata_wa-fnam = 'BDC_CURSOR'.
          bdcdata_wa-fval = 'VBELN-LOW'. " pass the field name
          APPEND bdcdata_wa TO bdcdata_tab.
          CLEAR bdcdata_wa.
          bdcdata_wa-fnam = 'VBELN-LOW'. " pass the field name
          bdcdata_wa-fval =  S_VBELN. " pass the date here
          APPEND bdcdata_wa TO bdcdata_tab .
    call transaction 'VKM5' using bdcdata_tab .
    REFRESH IT_ZVKM5.
    SELECT  OBJECTID
            FROM CDHDR INTO TABLE IT_CDHDR.
    LOOP AT IT_CDHDR INTO WA_CDHDR.
    IF WA_CDHDR-OBJECTID  = S_VBELN.
    move s_vbeln to it_zvkm5-vbeln.
    move S_date to it_zvkm5-bldat.
    move s_text to it_zvkm5-text.
    MOVE SY-UNAME TO IT_ZVKM5-UNAME.
    append it_zvkm5 to it_zvkm5.
    modify zvkm5 from  table it_zvkm5.
    UPDATE zvkm5.
    ENDIF.
    ENDLOOP.
    CLEAR: S_VBELN, S_DATE, S_TEXT.

  • How to put Layouts in selection screen for ALV

    Dear All,
    I have developed an ALV report . The users will create many layouts and save it. The requirement is that:
    In the selection screen , they need to get the list of saved layouts and select one from that so that they need not have to select layout after running the report.
    That means .. they want to select the layout before running the report.
    Hope that you understood my problem and will help me out...
    Thanking you,
    Shankar

    Hi,
    PARAMETERS P_LAYOUT LIKE DISVARIANT-VARIANT.
    INITIALIZATION.
    *Get Default display variant
    PERFORM F100_DISPLAY_DEFAULT_VARIANTS.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_LAYOUT.
    *Value Help for Layouts
    PERFORM F1001_VALUE_REQUEST.
    *&      Form  F100_DISPLAY_DEFAULT_VARIANTS
         Initializing ALV Values                                        *
    FORM f100_display_default_variants.
      w_variant-report   = sy-repid.
      w_variant-handle   = c_handle.
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
           EXPORTING
                i_save        = c_a
           CHANGING
                cs_variant    = w_variant
           EXCEPTIONS
                wrong_input   = 1
                not_found     = 2
                program_error = 3
                OTHERS        = 4.
      IF sy-subrc EQ 0.
        p_layout = w_variant-variant.
      ENDIF.
    ENDFORM.
    *&      Form  F1001_VALUE_REQUEST
          Get the values for the layout.
    form F1001_VALUE_REQUEST.
      DATA:  lv_exit        TYPE c,
             lw_variant    LIKE w_variant.
      w_variant-report   = sy-repid.
      w_variant-username = sy-uname.
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
           EXPORTING
                is_variant    = w_variant
                i_save        = c_a
           IMPORTING
                e_exit        = lv_exit
                es_variant    = lw_variant
           EXCEPTIONS
                not_found     = 1
                program_error = 2
                OTHERS        = 3.
      IF sy-subrc IS INITIAL.
        IF lv_exit IS INITIAL.
          p_layout = lw_variant-variant.
        ENDIF.
      ELSE.
        MESSAGE i029."No layouts found
      ENDIF.
    endform.                    " F1001_VALUE_REQUEST
    Hope this helps.
    Regards,
    J.Jayanthi

  • How to get values of selection screen fields in the POV event

    I have two radio buttons r1,r2 and a field file_name on  selection screen.
    I have written At selection screen on value-request for the field file_name. Based on the selection of radio buttons I have to display different screens when f4 for field_name is pressed.
    Unfortunately the values of r1 or r2 are not populated in the AT selection screen on value-request event.
    Can any one tell me if there is a way to obtain the values of r1 or r2 in the AT selection  screen on value-request event.

    Hi..
    Try out this.
    REPORT  ZH_TEST4                                .
    CONSTANTS : c_x                TYPE char01 VALUE 'X',
                c_rg1(4)        TYPE c      VALUE 'RG1',
                c_gr2(3)        TYPE c      VALUE 'GR2',
                c_gr3(3)        TYPE c      VALUE 'GR3',
                c_zero          TYPE n      VALUE '0',
                c_neg(2)        TYPE c      VALUE '-1'.
    data: w_sscrfields_ucomm1   TYPE sscrfields-ucomm.
    SELECTION-SCREEN : BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
    PARAMETERS       : p_back   RADIOBUTTON GROUP rg1
                                     USER-COMMAND pc,
                       p_fore   RADIOBUTTON GROUP rg1
                                          DEFAULT 'X'.
    SELECTION-SCREEN : END OF BLOCK blk1.
    SELECTION-SCREEN : BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002.
    PARAMETERS : p_phif LIKE rlgrap-filename  MODIF ID gr2,
                 p_ahif LIKE rlgrap-filename  MODIF ID gr3.
    SELECTION-SCREEN : END OF BLOCK blk2.
    AT SELECTION-SCREEN OUTPUT.
      IF p_fore EQ c_x.
        w_sscrfields_ucomm1 = c_rg1.
      ELSE.
        w_sscrfields_ucomm1 = space.
      ENDIF.
      LOOP AT SCREEN.
        IF w_sscrfields_ucomm1 EQ space.
          IF screen-group1 = c_gr2.
            screen-active = c_zero.
          ENDIF.
        ELSE.
          IF screen-group1 = c_gr3.
            screen-active = c_zero.
          ENDIF.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    also try out function module POPUP_WITH_TABLE_DISPLAY.
    Plz reward points if this helps by clicking on star!1
    Good Luck!!
    Cheers,
    Rajeev

  • How to Captured Value into Select-Options Range Table Without "Enter"

    Hi,
    I defined a set of Select-Options in the Web Dynpro. I found that the value for the Select-Options will not be captured whenever I manually type in the value instead of choosing it from F4 Help Drop Down.
    However, this problem can be resolved if I manually type in the value for Select-Options in the Selection Field and I press "Enter". Without pressing "Enter" value will not be captured.
    Any solution for this issue? Please help.

    Hi Kris,
    My problem is only when the user key in the value themselves rather than choosing it from Select-Options drop down value. Most of the time user will know what value to key in and will skip the step to choose from the Drop Down List. Thus, if this happen, the value keyed in by the user will not be able to capture into the range table.
    I am using this logic to capture the value for selection item:
      wd_this->m_helper->get_selection_screen_items(
        IMPORTING et_selection_screen_items = lt_sel_item ).
    * Values From Selection Screen
      LOOP AT lt_sel_item ASSIGNING <fs_sel_item>.
        CASE <fs_sel_item>-m_id.
          WHEN `PERNR`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_pernr>.
          WHEN `BUKRS`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_bukrs>.
          WHEN `STAT2`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_stat2>.
          WHEN `WERKS`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_werks>.
          WHEN `BTRTL`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_btrtl>.
          WHEN `PERSG`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_persg>.
          WHEN `PERSK`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_persk>.
          WHEN `ABKRS`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_abkrs>.
          WHEN `BEGDA`.
            ASSIGN <fs_sel_item>-m_value->* TO <fs_begda>.
        ENDCASE.
      ENDLOOP.
    E.g. User key in the BUKRS without using the Drop Down Value provided by the Select-Options. For this case, <fs_bukrs> table will be initial as no value is captured.
    Edited by: Girish Nabar on Apr 21, 2011 8:55 AM

  • How to add ranges of selection screen

    hi experts.
    I have selection screen :
    eg. SELECT-OPTIONS :SPLGL FOR BSID-UMSKZ,
    ie. Special GL indicators. now if person enters A to Z in this  and 9 in single range on screen.
    I want to store A,B,C...Z  and 9 in an internal table. , what would be the  the easiest way for doing it ?
    Thanks in advance.
    PD

    Hello
    Try this code:
    select-options: splgl for bsid-umskz.
    data: abcde like sy-abcde,
    beg type i,
    end type i,
    div type i,
    counter type i.
    data: begin of itab occurs 0,
          splgl like bsid-umskz,
          end of itab.
    abcde = sy-abcde.
    loop at splgl.
      case splgl-option.
        when 'BT'.
          search abcde for splgl-low.
          if sy-subrc = 0.
            beg = sy-fdpos.
          endif.
          search abcde for splgl-high.
          if sy-subrc = 0.
            end = sy-fdpos.
          endif.
          div = end - beg + 1.
          counter = beg.
          do div times.
            itab-splgl = abcde+counter(1).
            append itab.
            counter = counter + 1.
          enddo.
        when 'EQ'.
          itab-splgl = splgl-low.
          append itab.
      endcase.
    endloop.
    In itab you will have all values from selection screen.

  • Populate values at selection screen

    Hi All,
    My requirement is:
    There are 2 radio buttons and 2 parameter fields.
    By default, one radio button is selected and the two fields are populated with some values at the selection screen.
    If the other radio button is selected, we need to pass different values to the two parameter fields.
    Can you please suggest me how to populate values at selection screen.
    I have tried populating them using AT SELECTION SCREEN OUTPUT, but didn't work.
    Any pointers are helpful.
    Thanks & Regards
    Gowthami

    Hi Gowthami,
        Try it this way:
    PARAMETERS:
      R1 RADIOBUTTON group rad USER-COMMAND ABC default 'X',
      R2 RADIOBUTTON group rad.
    Parameters:
      char1(10) type c,
      char2(10) type c.
    Initialization.
      char1 = 'radio1'.
      char2 = 'radio1'.
    At Selection-screen output.
      if r2 = 'X'.
    *    loop at screen.
          char1 = 'radio2'.
          char2 = 'radio2'.
    *      modify screen.
    *    endloop.
      elseif r1 = 'X'.
    *    loop at screen.
          char1 = 'radio1'.
          char2 = 'radio1'.
    *      modify screen.
    *    endloop.
      endif.
    With luck,
    Pritam.
    Edited by: Pritam Ghosh on Feb 24, 2009 11:54 AM

  • How to pass a default value in selection screen of logical database pnpce

    Dear All,
    Can any one tell me how to pass a default value in selection screen of logical database pnpce .
    Regards
    Rakesh Singh

    Hi Rakesh,
    Go to SE36 (logical database Builder).First enter PNPCE in Logical Database and press documentation,here you will get the details of exactly what is PNPCE and how it works.After that select selections in subojects in se36 only and enter display ,there you have the include from where you acn get the idea.
    Regards,
    Rahul

Maybe you are looking for

  • Frozen Macbook desktop?

    Hey I have Recently Installed Lion on my Macbook pro and untill recently i have had no problems Changing my desktop Wallpaper. Now whenever i try to change it, it will freeze up in system preferences and manually nothing will happen at all. Help!

  • How do you change the backdrop in final cut pro from a blue screen?

    How do you edit a blue screen clip?

  • Can I use faster memory in Mid-2007 iMac?

    I currently have factory spec (1 GB) memory in my 20" (Mid-2007) iMac. Specs for memory in this machine say I need pc2-5300, unbuffered, non-parity, 200-pin, 667MHz DDR2 SDRAM. I noticed my hardware has an 800 Mhz bus. 1) Can I use 800 Mhz RAM that i

  • Business Intelligence Components

    Hi, does anybody knows if some kind of BI oriented component is available from third parties or planned for the final release? I'm looking for a pivot table component, drillable charts and data connector/provider for OLAP servers (MS Analysis Service

  • Archive log not found

    Hi, I want to run the RMAN backup, but I lost some of the archivers. How to take the backup excluding those lost archivers? Thanks, GK