Table Maintaince with Transaction SM30 with selection Screen

Hi Friends,
I have a requirement for maintance of Z table "ABC" and it need to be maintanied.
This Ztable should have Ztransaction Code connecting to transaction SM30.
Also this should have a selection screen with 3 fields to filter the data and only the selected data needs to be used to enter the values in SM30 with the Maintain mode.
I have created the table and t code and below is the report .
REPORT  zrktest.
******************Declaration*************************
***Tables Declaration*******
TABLES : zkexxirac_calend.
DATA : gt_calend TYPE STANDARD TABLE OF zkexxirac_calend,
           wa_calend TYPE zkexxirac_calend.
***SELECTION SCREEN***
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-100.
SELECT-OPTIONS : s_burks   FOR zkexxirac_calend-bukrs ,
                s_zbukrs  FOR zkexxirac_calend-zzbukrs,
                s_partn   FOR zkexxirac_calend-partner_number.
SELECTION-SCREEN END OF BLOCK b1.
******************Start - Of - Selection*************************
START-OF-SELECTION.
******************Main Processing*************************
*&      Form  get_data
*      Get the Data from the table after satisfying
*          the condition form Selection Screen
*  -->  p1        text
*  <--  p2        text
******Select the data from the table***
  SELECT *
  FROM zkexxirac_calend
  INTO CORRESPONDING FIELDS OF TABLE gt_calend
  WHERE bukrs          EQ s_burks
  AND   zzbukrs        EQ s_zbukrs
  AND   partner_number EQ s_partn.
CALL TRANSACTION 'ZITXXIRACCALEND' AND SKIP FIRST SCREEN.
but when i execute the report it goes to the 1st screen of SM30 and gives the error message to selecting the option of No restriction , enter condition .. etc .
I have already ticked the Check box to skip initial Screen in the SM93, while creating the Transaction Code.
Let me know what chnages needs to be done and what code should i write.

Rabiya,
You actually do not need to do any data selection beforehand to accomplish this.  Just convert the select-options to a different format and then call FM 'VIEW_MAINTENANCE_CALL'.instead of CALL TRANSACTION.  The process is described here:
Add a Selection Screen to a Table Maintenance Dialog
Best,
Eric

Similar Messages

  • Modify Transaction CM02 u2013 Selection screen

    Hello,
    I have a requirement in which I want to modify Transaction CM02 u2013 Selection screen. Requirement is to be able to limit the selection by a Range of Projects or Applicant from a project. Can I create new Profile (based on CM02 Profile SAPA010 - Access via work center), with the following fields:
    u2022 Project Definition
    u2022 Applicant number
    u2022 Work Center
    u2022 Capacity Planner Group
    u2022 Plant
    An Add-on functionality required is - Multi selection and ranges for the all the above fields.
    I tried creating new sets, however the report writer table (CYFI1) does not have the fields Project Definition (PSPID) & Applicant Number (ASTNR).
    Is there a way that the above fields can be added in standard SAP or do I need to go for an enhancemenet. If the latter then pl suggest user exits, BADIs etc.
    <removed_by_moderator>
    Read the Rules of Engagement
    Rgds
    Deepak
    Edited by: Juan Reyes on Aug 24, 2009 1:45 PM

    Hello,
    I would suggest you to go for BADI,
    Follow the below steps to find out what all BADI's are called when you press any button in any transaction.
    1) Goto se24 (Display class cl_exithandler)
    2) Double click on the method GET_INSTANCE.
    3) Put a break point at Line no.25 (CASE sy-subrc).
    Now
    4) Execute SAP standard transaction
    5) Press the required button for which you need to write an exit logic, the execution will stop at the break point.
    6) Check the values of variable 'exit_name', it will give you the BADI name called at that time.
    7) This way you will find all the BADIs called on click of any button in any transaction.
    Regs,
    Venkat

  • Validate the data in the internal table with the date in selection screen

    Hi all,
    I want to validate the data in the internal table and get only the records with the input date in the selection screen.
    The date is in the select options and please let me know how to get the records only if it satisfies the input date in the selection screen.
    Regards,
    Shalem

    For Ex.
    SELECT-OPTIONS: S_DATE FOR VBAK-VDATU
    If you want to read one INTERNAL TABLE record
    READ TABLE it_tab(internal table name) WHERE vdatu(date field name in the internal table) = s_date
    If you want to move more then one
    LOOP AT it_tab WHERE vdatu = s_date.
    Take the field values in another table and append it. then end loop.
    you will get the records which only have the date in select option..
    If you want detail code give me internal table name and select option name i will write you the code.
    regards
    Yuvaram

  • Problem with checkbox in the selection screen

    Hi guys,
    I have a problem with the check box in the selection screen.When i select a check box then a field in the selection screen should be enabled for entering a value.Again if i unselect the checkbox then the field should be disabled for entering a value.I have written the code in at selection-screen output.
    The problem is when i select the check box ,the field is not enabled.But when i press enter after selecting the checkbox then the field is enabled for input.It is the same when i unselect the checkbox,after i press enter only the field is getting disabled.What could be the problem.Any suggestions please?
    Thanks.

    Hi d p
                 Please try this code . I think this code have some way that you would like.
    REPORT  zdownload_to_application_server.
    TABLES : caufvd, jest.
    I N C L U D E  P R O G R A M                                        *
    *INCLUDE znrpstnd.
    Selection Screen                                                    *
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-t03.
    PARAMETERS: p_outb RADIOBUTTON GROUP g1 USER-COMMAND outb DEFAULT 'X' ,
                p_inb RADIOBUTTON GROUP g1.
    SELECTION-SCREEN END OF BLOCK b3.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
    PARAMETERS : p_werks LIKE caufvd-werks MODIF ID a.        " Plant   "OBLIGATORY
    SELECT-OPTIONS  :  s_auart FOR caufvd-auart MODIF ID a,       " Order Type
                       s_aufnr FOR caufvd-aufnr MODIF ID a.       " Order number
    PARAMETERS: p_path TYPE string DEFAULT 'C:\SchedulerInterface-OutboundTextFile\' MODIF ID a,
                p_actual AS CHECKBOX MODIF ID a.                  " Transfer Actual
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t02.
    PARAMETERS : p_werks2 LIKE caufvd-werks MODIF ID b,   " Plant   "OBLIGATORY
                 p_path2 TYPE string DEFAULT 'C:\SchedulerInterface-InboundTextFile\' MODIF ID b,
                 p_path3 TYPE string DEFAULT 'C:\SchedulerInterface-InboundTextFile\' MODIF ID b,
                 p_sessio TYPE apqi-groupid MODIF ID b.   " BDC Session
    SELECTION-SCREEN END OF BLOCK b2.
    AT SELECTION-SCREEN OUTPUT.
      IF p_outb EQ 'X'.   " Outbound --> Hide inbound
        LOOP AT SCREEN.
          "IF screen-name = '%BT02011_BLOCK_1000'.
          IF screen-group2 = 'BLK'.
            screen-active = 1.
            MODIFY SCREEN.
          ENDIF.
          IF screen-group1 = 'A'.
            screen-active = 1.
            MODIFY SCREEN.
          ENDIF.
          IF screen-group1 = 'B'.
            screen-active = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ELSE.
        LOOP AT SCREEN.
          "IF screen-name = '%BT01004_BLOCK_1000'.
          IF screen-group3 = 'BLK'.
            screen-active = 1.
            MODIFY SCREEN.
          ENDIF.
          IF screen-group1 = 'A'.
            screen-active = 0.
            MODIFY SCREEN.
          ENDIF.
          IF screen-group1 = 'B'.
            screen-active = 1.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_path2.
      CALL FUNCTION 'WS_FILENAME_GET'
        EXPORTING
          def_path         = 'C:\SchedulerInterface-InboundTextFile\'
          mask             = ',Text Files,.txt,All files,.*.'
        IMPORTING
          filename         = p_path2
        EXCEPTIONS
          inv_winsys       = 1
          no_batch         = 2
          selection_cancel = 3
          selection_error  = 4
          OTHERS           = 5.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_path3.
      CALL FUNCTION 'WS_FILENAME_GET'
        EXPORTING
          def_path         = 'C:\SchedulerInterface-InboundTextFile\'
          mask             = ',Text Files,.txt,All files,.*.'
        IMPORTING
          filename         = p_path3
        EXCEPTIONS
          inv_winsys       = 1
          no_batch         = 2
          selection_cancel = 3
          selection_error  = 4
          OTHERS           = 5.
    TOP-OF-PAGE.
    START-OF-SELECTION.
    Regards
    Wiboon

  • Creating F4 help with customized values in selection screen

    Hi  Dear friends
             In my report  i have two input flds at selection screen i.e. sales order no and date description.Now based on sales order no the F4 help in the fld date description should change dynamically.eg. if there are two sales document number 001 and 002 and the corresponding date description for 001 are 123 and 234 and for 002 are 987 and 876 .Then if i select 001 the F4 help in date description should contain 123,234 and for 002 it should contain 987,876 before pressing the execute button.How to achieve this. Plz help me. i tried to use AT-SELECTION SCREEN ON VALUE REQUEST event but its not giving any out put as in the SELECT query i putted a WHERE condition where sales document of the database table equals to the sales order inserted in the selection screen. But when i debugg the input sales order parameter shows blank.

    Try this way
    REPORT ZVENKAT_F4_FOR_PARAMETERS MESSAGE-ID zmsg .
    TYPES:
       BEGIN OF t_t001w,
         werks       TYPE t001w-werks,
         name1       TYPE t001w-name1,
       END OF t_t001w,
       t_return_tab  TYPE ddshretval.
    DATA:
        w_t001w      TYPE t_t001w,
        w_return_tab TYPE t_return_tab.
    DATA:
        i_t001w      TYPE STANDARD TABLE OF t_t001w,
        i_return_tab TYPE STANDARD TABLE OF t_return_tab.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
    PARAMETERS :p_werks TYPE t001w-werks,
                p_name1 TYPE t001w-name1.
    SELECTION-SCREEN END OF BLOCK b1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_werks.
      PERFORM f4_help_for_palant.
    *&      Form  f4_help_for_palant
    FORM f4_help_for_palant.
      DATA:
          w_dynpfields TYPE dynpread,
          i_dynpfields LIKE STANDARD TABLE OF dynpread.
      IF i_t001w[] IS INITIAL.
        SELECT werks name1
        FROM t001w
        INTO TABLE i_t001w.
      ENDIF.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
        retfield               = 'WERKS'
        dynpprog               = sy-repid
        dynpnr                 = sy-dynnr
        dynprofield            = 'P_WERKS'
       value_org              = 'S'
        TABLES
          value_tab              = i_t001w
        return_tab             = i_return_tab.
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      READ TABLE i_return_tab INTO w_return_tab INDEX 1.
      p_werks = w_return_tab-fieldval.
      READ TABLE i_t001w INTO w_t001w WITH KEY werks = p_werks.
      IF sy-subrc = 0.
        w_dynpfields-fieldname    = 'P_NAME1'.
        w_dynpfields-fieldvalue   = w_t001w-name1.
        APPEND w_dynpfields TO i_dynpfields.
        CLEAR w_dynpfields.
        CALL FUNCTION 'DYNP_VALUES_UPDATE'
          EXPORTING
            dyname               = sy-repid
            dynumb               = sy-dynnr
          TABLES
            dynpfields           = i_dynpfields.
      ENDIF.
    ENDFORM.                    " f4_help_for_palant
    Thanks
    Venkat.O

  • Problem with User Defined Second Selection Screen

    Hi Gurus,
                       I have a problem with the selection  screen selections. My requirement is that , User when he selects a check box on the main selection screen ( which is 1000) then at the at-selection event, another screen (whose number is 2000) will be called and it has some parameters to enter values. My problem is that how to get the values from this second screen and use them in the in my program. There is an execute button on the second selection screen and when i click that, nothing is happening.
                       Can anybody suggest me how to get the values from this screen which we called, and entered values in that screen. How to use these values and is there any way that we can do this.
    Thanks in advance for helping me out.
    Regards,
    Srinivas.

    Use <b>DYNP_VALUES_READ</b> FM to read the values from your dynpro screen...
    Like this...
    DATA: ls_dyname     TYPE d020s-prog,
            ls_dynumb     TYPE d020s-dnum.
    gt_dynpfields TYPE STANDARD TABLE OF dynpread WITH HEADER LINE.
        ls_dynumb = '0112'.
        gt_dynpfields-fieldname = 'RF05A-NEWKO'.
        APPEND gt_dynpfields.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname               = ls_dyname
          dynumb               = ls_dynumb
        TABLES
          dynpfields           = gt_dynpfields
        EXCEPTIONS
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          invalid_parameter    = 7
          undefind_error       = 8
          double_conversion    = 9
          stepl_not_found      = 10
          OTHERS               = 11.
    Greetings,
    Blag.

  • Problem with Radio Buttons: At Selection-Screen

    Hi,
    i have two radio-buttons in my screen with coding
    PARAMETERS:
                      ST RADIOBUTTON GROUP rad1 DEFAULT 'X',         "stock transport
                      PR RADIOBUTTON GROUP rad1.                     "purchase return
    at selection-screen output.
    if PR = 'X'.
    perform f_selection_request_po_ret.
    endif.
    if ST = 'X'.
    perform f_selection_request_stck_trans.
    endif.
    at selection-screen on value-request for s_ebeln-low.
    perform f_f4_values.
    at selection-screen on value-request for s_ebeln-high.
    perform f_f4_values.
    I need to provide different values in drop-down of select-options according to the radio-button selected.
    Like if PR is selected s_ebeln-low and s_ebeln-high displayed will be different.
    and if ST is selected s_ebeln-low and s_ebeln-high displayed will be different.
    My problem is that the program is taking the values of that radio button which is set to Default. While running the program, if I click on the other radio-button, it is showing the same values, not different.
    Kindly, tell me where I am going wrong in the coding.
    Regards,
    Priyanka.

    Hi,
    For this requirement you have to use the following FM's
    <b>DYNP_VALUES_READ </b>  and DYNP_VALUES_UPDATE
    The one highlighted is the one you need to call in the selection screen events to get the values. Do a where used list on this FM and see how its being used.
      DATA : W_REPID    LIKE D020S-PROG,
             W_DYNNR    LIKE D020S-DNUM,
             I_DYNPREAD LIKE DYNPREAD OCCURS 0 WITH HEADER LINE.
      REFRESH: I_DYNPREAD.
      CLEAR  : I_DYNPREAD,
               W_FILE    .
      I_DYNPREAD-FIELDNAME = C_UXPATH.
      APPEND   I_DYNPREAD.
      CLEAR  : I_DYNPREAD.
      W_REPID = SY-REPID.
      W_DYNNR = C_1000.
      CALL FUNCTION 'DYNP_VALUES_READ'
           EXPORTING
                DYNAME               = W_REPID
                DYNUMB               = W_DYNNR
           TABLES
                DYNPFIELDS           = I_DYNPREAD
           EXCEPTIONS
                INVALID_ABAPWORKAREA = 1
                INVALID_DYNPROFIELD  = 2
                INVALID_DYNPRONAME   = 3
                INVALID_DYNPRONUMMER = 4
                INVALID_REQUEST      = 5
                NO_FIELDDESCRIPTION  = 6
                INVALID_PARAMETER    = 7
                UNDEFIND_ERROR       = 8
                DOUBLE_CONVERSION    = 9
                OTHERS               = 10.
      IF SY-SUBRC EQ 0.
    Successfully read screen. GET the values
        LOOP AT I_DYNPREAD.
          CASE I_DYNPREAD-FIELDNAME.
            WHEN C_UXPATH .
              W_FILE   = I_DYNPREAD-FIELDVALUE.
          ENDCASE.
        ENDLOOP.                "LOOP AT i_dynpread.
      ENDIF.                    "IF sy-subrc EQ 0.
    Cheers
    VJ
    Message was edited by:
            Vijayendra  Rao

  • Issue with tabbed block in selection screen

    Hi All,
    I have created a report program with the following code.
    SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
    PARAMETERS: p1 TYPE c LENGTH 10.
    SELECTION-SCREEN END OF SCREEN 100.
    SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.
    PARAMETERS: q1 TYPE c LENGTH 10.
    SELECTION-SCREEN END OF SCREEN 200.
    SELECTION-SCREEN: BEGIN OF TABBED BLOCK mytab FOR 10 LINES,
                      TAB (20) button1 USER-COMMAND push1,
                      TAB (20) button2 USER-COMMAND push2,
                      END OF BLOCK mytab.
    INITIALIZATION.
      button1 = 'Selection Screen 1'.
      button2 = 'Selection Screen 2'.
      mytab-prog = sy-repid.
      mytab-dynnr = 0100.
      mytab-activetab = 'PUSH1'.
    AT SELECTION-SCREEN.
      CASE sy-dynnr.
        WHEN 1000.
          CASE sy-ucomm.
            WHEN 'PUSH1'.
              mytab-dynnr = 100.
            WHEN 'PUSH2'.
              mytab-dynnr = 200.
          ENDCASE.
      ENDCASE.
    Execute the program and click on the second tab-page. Now, click on the 'Execute' button or press F8 (there is no specific functionality coded here).
    The issue now is that the first tab-page is displayed, instead of the second tab remaining displayed. I require the navigation to remain within the second tab-page after the EXECUTE button is clicked.
    Could someone help me out with this issue?
    Regards,
    Dinup
    Edited by: Dinup Sudhakaran on Feb 18, 2008 1:40 PM

    Hi,
    Go through below document with example code.
    It will help you.
    Tabstrip Controls on Selection Screens
    As with screens, you can now use tabstrip controls on selection screens. To do this, you must define a tabstrip area and the associated tab pages, and assign a subscreen to the tab pages. You do not have to (indeed, cannot) declare the tabstrip control or program the screen flow logic in your ABAP program, since both are automatically generated.
    To define a tabstrip area with tab pages, use the following statements in your selection screen definition:
    SELECTION-SCREEN: BEGIN OF TABBED BLOCK <tab_area> FOR <n> LINES,
                      TAB (<len>) <tab1> USER-COMMAND <ucom1>
                                  [DEFAULT [PROGRAM <prog>] SCREEN <scrn>],
                      TAB (<len>) <tab2> USER-COMMAND <ucom2>
                                  [DEFAULT [PROGRAM <prog>] SCREEN <scrn>],
                      END OF BLOCK <tab_area>.
    This defines a tabstrip control <tab_area> with size <n>. The tab pages <tab1>, <tab2>… are assigned to the tab area. <len> defines the width of the tab title. You must assign a function code <ucom> area to each tab title. You can find out the function code from the field SY-UCOMM in the AT SELECTION-SCREEN event.
    For each tab title, the system automatically creates a character field in the ABAP program with the same name. Before the selection screen is displayed, you can assign a text to the field. This then appears as the title of the corresponding tab page on the selection screen.
    You must assign a subscreen to each tab title. This will be displayed in the tab area when the user chooses that title. You can assign one of the following as a subscreen:
    A subscreen screen defined using the Screen Painter.
    A selection screen subscreen, defined in an ABAP program.
    You can make the assignment either statically in the program or dynamically at runtime. If, at runtime, one of the tab titles has no subscreen assigned, a runtime error occurs.
    Static assignment
    Use the DEFAULT addition when you define the tab title. You can specify an ABAP program and one of its subscreens. If you do not specify a program, the system looks for the subscreen in the current program. When the user chooses the tab title, it is activated, and the subscreen is assigned to the tabstrip area. The static assignment is valid for the entire duration of the program, but can be overwritten dynamically before the selection screen is displayed.
    Dynamic assignment
    For each tab area, the system automatically creates a structure in the ABAP program with the same name. This structure has three components – PROG, DYNNR, and ACTIVETAB. When you assign the subscreens statically, the structure contains the name of the ABAP program containing the subscreen, the number of the subscreen, and the name of the tab title currently active on the selection screen (and to which these values are assigned). The default active tab page is the first page. You can assign values to the fields of the structure before the selection screen is displayed, and so set a subscreen dynamically.
    If you assign a normal subscreen screen to a tab title, the dialog modules containing its flow logic must be defined in the current ABAP program. If the subscreen is a selection screen, user actions will trigger the AT SELECTION-SCREEN event and its variants (see Selection Screen Processing). This includes when the user chooses a tab title. If one selection screen is included on another, AT SELECTION-SCREEN will be triggered at least twice – firstly for the "included" selection screen, then for the selection screen on which it appears.
    REPORT demo_sel_screen_with_tabstrip.
    DATA flag(1) TYPE c.
    SUBSCREEN 1
    SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
    PARAMETERS: p1(10) TYPE c,
                p2(10) TYPE c,
                p3(10) TYPE c.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN END OF SCREEN 100.
    SUBSCREEN 2
    SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.
    PARAMETERS: q1(10) TYPE c OBLIGATORY,
                q2(10) TYPE c OBLIGATORY,
                q3(10) TYPE c OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN END OF SCREEN 200.
    STANDARD SELECTION SCREEN
    SELECTION-SCREEN: BEGIN OF TABBED BLOCK mytab FOR 10 LINES,
                      TAB (20) button1 USER-COMMAND push1,
                      TAB (20) button2 USER-COMMAND push2,
                      TAB (20) button3 USER-COMMAND push3
                                       DEFAULT SCREEN 300,
                      END OF BLOCK mytab.
    INITIALIZATION.
      button1 = text-010.
      button2 = text-020.
      button3 = text-030.
      mytab-prog = sy-repid.
      mytab-dynnr = 100.
      mytab-activetab = 'BUTTON1'.
    AT SELECTION-SCREEN.
      CASE sy-dynnr.
        WHEN 1000.
          CASE sy-ucomm.
            WHEN 'PUSH1'.
              mytab-dynnr = 100.
              mytab-activetab = 'BUTTON1'.
            WHEN 'PUSH2'.
              mytab-dynnr = 200.
              mytab-activetab = 'BUTTON2'.
          ENDCASE.
        WHEN 100.
          MESSAGE s888(sabapdocu) WITH text-040 sy-dynnr.
        WHEN 200.
          MESSAGE s888(sabapdocu) WITH text-040 sy-dynnr.
      ENDCASE.
    MODULE init_0100 OUTPUT.
      LOOP AT SCREEN.
        IF screen-group1 = 'MOD'.
          CASE flag.
            WHEN 'X'.
              screen-input = '1'.
            WHEN ' '.
              screen-input = '0'.
          ENDCASE.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    ENDMODULE.
    MODULE user_command_0100 INPUT.
      MESSAGE s888(sabapdocu) WITH text-050 sy-dynnr.
      CASE sy-ucomm.
        WHEN 'TOGGLE'.
          IF flag = ' '.
            flag = 'X'.
          ELSEIF flag = 'X'.
            flag = ' '.
          ENDIF.
      ENDCASE.
    ENDMODULE.
    START-OF-SELECTION.
      WRITE: / 'P1:', p1,'Q1:', q1,
             / 'P2:', p2,'Q2:', q2,
             / 'P3:', p3,'Q3:', q3.
    This program defines two selection screens – 100 and 200, as subscreens, and places a tabstrip control area with three tab pages on the standard selection screen. A subscreen screen 300 (from the same program) is assigned statically to the third tab page.
    The layout of screen 300 is:
    The input/output fields P1 to Q3 are defined by using the parameters from the ABAP program The pushbutton has the function code TOGGLE.
    The screen flow logic for screen 300 is as follows:
    PROCESS BEFORE OUTPUT.
      MODULE init_0100.
    PROCESS AFTER INPUT.
      MODULE user_command_0100.
    Both dialog modules are defined in the ABAP program.
    When you run the program, the standard selection screen appears. In the INITIALIZATION event, the texts are defined on the tab titles, the subscreen selection screen 100 is assigned to the tab area, and the first tab title is activated.
    User actions on the selection screen are processed in the AT SELECTION-SCREEN event block. In particular, it is here that the subscreens are assigned and tab titles activated when the user chooses one of the first two tab titles. This is not necessary for the third tab title, since the dynamic assignment (screen 300) is always placed in the structure MYTAB when the user chooses it.
    Before the subscreen screen is displayed, the PBO module INIT_100 is executed. User actions on the subscreen screen trigger the PAI module. This includes when the user chooses a tab title. After that, the AT SELECTION-SCREEN event is triggered.
    Messages in the status line show where an action has been processed.

  • How to create text box with multiple lines in selection screen.

    Hi,
    i need to create a text box to capture comment with 300 characters. i want to achive this without using module pool,is there any posibilities to that
    regards
    raja

    Since text on Report screens is limited basically to what's left on a line in the selection screen, you'll have to use Module Pool.
    however, you can call a screen from a report program and use the editor within a Custom Control on the screen.  Not a tough thing to do.

  • Odd behaviour with parameter id on selection screen

    Try this code
    PARAMETERS: p_fpath1 TYPE string LOWER CASE MEMORY ID rofile,
                p_fpath2 TYPE string LOWER CASE.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fpath1.
      PERFORM get_filepath CHANGING p_fpath1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fpath2.
      PERFORM get_filepath CHANGING p_fpath2.
    *---------Forms
    FORM get_filepath CHANGING x_filepath TYPE string.
      DATA: l_filepath TYPE string.
      cl_gui_frontend_services=>directory_browse( CHANGING selected_folder = l_filepath ).
    * If no filepath selected, leave the filepath unchanged
      IF l_filepath IS NOT INITIAL.
        x_filepath = l_filepath.
      ENDIF.
    ENDFORM.
    Run the program, and use F4 to choose a file path for p_fpath1 and another for p_fpath2.
    Hit execute
    Leave the program.
    Run the program again.
    Use F4 to choose the filepaths for the two parameters.
    For me, it's fine for p_fpath2, but for p_fpath1, I get no directory selector.  In fact, to get it working again, I have to log off and log back on.
    I'd like to know if anyone else gets the same problem, and also if anyone knows how to fix it!
    thanks
    matt

    The issue was with the STRING VARIABLE in parameters decelaration.I just changed it to RLGRAP-FILENAME it worked.
    Try these codes.
    PARAMETERS: p_fpath1 TYPE rlgrap-filename LOWER CASE MEMORY ID rofile,
                p_fpath2 TYPE rlgrap-filename LOWER CASE.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fpath1.
      PERFORM get_filepath CHANGING p_fpath1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fpath2.
      PERFORM get_filepath CHANGING p_fpath2.
    START-OF-SELECTION.
      WRITE : p_fpath1,p_fpath2.
    *---------Forms
    FORM get_filepath CHANGING x_filepath TYPE rlgrap-filename.
    *CALL METHOD cl_gui_cfw=>flush.
      DATA: l_filepath TYPE string.
      CLEAR :l_filepath,x_filepath.
      cl_gui_frontend_services=>directory_browse( CHANGING selected_folder = l_filepath ).
    * If no filepath selected, leave the filepath unchanged
      IF l_filepath IS NOT INITIAL.
        x_filepath = l_filepath.
      ENDIF.
    ENDFORM.                    "get_filepath
    LAST ENTERED VALUE WILL ALSO DISPLAY
    These codes work.
    Regards,
    Gurpreet

  • Problem with Hiding fields of selection screen which is called as subscreen

    Hello All,
    I have problem while hiding the selection screen which is called as subscreen.
    Flow of my logic:
    Selection-screen with one field and three buttons CREATE,DISPLAY and CHANGE in application toolbar.
    user enter some value in field and either he press change or dispaly
    When change i need to call selection screen when it is in dispaly i need to stop calling this selection screen.
    Upto my knowledge we can't stop calling selection screen in display mode so there is only one possibility is hiding the fields when it is in display mode.
    How can i hide the fields and where i need to hide fields?
    Please post some codes.
    Regards,
    Lisa

    you can refer the sample code which i mentioned in your previous post. that will solve the problem.

  • How to dispay report with layout option in selection screen?

    Hi all,
    I have designed a report which also has a list box in the selection screen for the type of saved  layout that users have saved. I want the report to be displayed in the  layout that the user has entered.
    Eg:  if user chooses \RP from the listbox in the selection screen; then the layout format for \RP should be displayed as output of the report.Can anyone tell me how to do this?Thanks in Advance.

    Hi ,
    parameters:p_vari type disvariant.
    data: v_save type c.
    v_save = 'A'.
    data:i_variant type disvariant.
    write the code in the At selection screen on value request p_vari.use the FM reuse_alv_variant_f4.
    then in the at selection screen check weather the selected variant is existed by using the FM reuse_alv_variant_existance
    and in the main GRID FM pass the variant internal table.
    or check BALV* in the Se38 for examples
    Regards,
    Bharani,

  • Designing the table grid in subscreen in a selection screen..

    Hi all,
    Actually my requirement is there is a check box in the selection screen,If its checked then we have to display a subscreen with the details
    "Emp type"      "Empname"        "Monthly"      "Yearly"
       PM                Glen                 50000         600000          
       SM                Cross               40000         480000          
       TM                Mary                40000         480000          
       GM                Hary                 60000         720000          
    should be dislayed as a table grid.
    I have designed the screen but its not possible to give the headers
    "Emp type"      "Empname"        "Monthly"      "Yearly"
    Can anyone solve this issue for me..Thanks in advance

    I know to call the window but my problem is
    I have defined subscreen as:
    SELECTION-SCREEN BEGIN OF SCREEN 300 AS WINDOW.
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-030.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS : c_air AS CHECKBOX MODIF ID sss USER-COMMAND ucom.
    SELECTION-SCREEN COMMENT 4(18) text-003 FOR FIELD p_air.
    PARAMETERS : p_air TYPE vbak-vbeln MODIF ID sss .
    **SELECTION-SCREEN COMMENT 34(10) text-004 FOR FIELD p_air1.
    **It is not accepting this
    PARAMETERS : p_air1 TYPE p DECIMALS 2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK b3.
    SELECTION-SCREEN END OF SCREEN 300.
    i am able to see one comment but can i display more than one comment

  • Transaction Variant for Selection Screen

    Hi, experts!
    A question regarding transaction variants: Is it possible to create screen variants and transaction variants via SHD0 for selection screens? I' ve created a customer report with one selection screen including parameters and select options and would like to provide the users with a variant transaction for this.
    Utilizing the "Save as variant" option from the selection screen itself works out perfectly, but this variant cannot be transported. And trying to create a transaction variant via SHD0 fails because values entered in the selection screen parameters and select options help screens are not saved and presented.
    Any hints are more than welcome!
    Regards,
    Thomas

    You wrote
    Utilizing the "Save as variant" option from the selection screen itself works out perfectly, but this variant cannot be transported.
    But, give the variant a name beginning with "CUS&" and this variant will be transported. Variant beginning with "CUS&" or "SAP&" are so-called "system variant" and are  transported automatically. You can then copy the transaction code and use this new variant in the new transaction.
    Regards,
    Raymond

  • Creating Transaction code for selection screen of one ztable

    Hi ,
        i have one Ztable in order see the data in it , he wants one new transaction . by executing tht transaction he wants to view the data inside the table.
    i have created one transaction code by taking the transaction type as report transaction and program name i gave the selection screen program of tht table.
    when i executed tht t code  selection screen of table contents should come and on executing it i have to get  data.
    but im not getting data on executing tht selection screen .
    why? for this scenario which tcode type i have to select.

    Hi Pavan,
    Check this,
    Step 1
    Create parameter transaction (i.e. via SE93)
    Select the fourth options
    Step 2
    Enter transaction details. Within the Proposed values section there are a number of value which
    can be setup, simply use drop down menu to view the list. The 2 values assigned in the following
    example are as follows:
                   VIEWNAME:        Set table name to maintained
                   UPDATE:               Open table for update
    Mohinder

Maybe you are looking for