At selection-screen regarding

hi all,
i have a seletion screen in my report with two different blocks
begin of block b1.
select-options: s_date like sy-datum.
end of block b1.
and the date is in the format like 200801
and i have another block
begin of block b2.
parameters : p_date as checkbox default no.
select-options: o_print like pbed-perxx.
end of block b2.
and the requirement is like when i enter the date in s_date in 200801 format then the last two values should be automatically
filled in o_print.
like as follows
s_date      200801   to  200812
o_print      01      to     12
please help me in this regard i have tried with at selection-screen output but its not relevent.
thanks in advance.
anupama

Hi,
Use the below code.
data: v_date(6) type n.
SELECTION-SCREEN BEGIN OF BLOCK B1 with frame.
SELECT-OPTIONS: S_DATE FOR v_date.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN BEGIN OF BLOCK B2 with frame.
parameters : p_date as checkbox user-command rusr.
SELECT-OPTIONS: O_PRINT FOR PBED-PERXX.
SELECTION-SCREEN END OF BLOCK B2.
AT SELECTION-SCREEN OUTPUT.
if p_date = 'X'.
  IF NOT S_DATE[] IS INITIAL.
    O_PRINT-SIGN  = 'I'.
    O_PRINT-OPTION  = 'BT'.
    O_PRINT-LOW = S_DATE-LOW+4(2).
    O_PRINT-HIGH  = S_DATE-HIGH+4(2).
    APPEND O_PRINT.
    CLEAR O_PRINT.
  ENDIF.
else.
   refresh o_print.
endif.
Note: After entering the dates in S_DATE, select the check box
then only you can see the values in o_print. if you deselect the check box then the values in o_print will be deleted

Similar Messages

  • Selection screen regarding

    hi all,
    there is a selection screen
    Number of storage occupied  
       and the criterial should be less than, more than, different
    can any one help me with this
    thanks
    anupama

    Hi,
          try this  value-options
    SELECT-OPTIONS - value_options
    Syntax
    ... [DEFAULT val1 [TO val2] [OPTION opt] [SIGN sign]]
        [LOWER CASE]
        [MATCHCODE OBJECT search_help]
        [MEMORY ID pid] ... .
    Extras:
    1. ... DEFAULT val1 [TO val2] [OPTION opt] [SIGN sign]
    2. ... LOWER CASE
    3. ... MATCHCODE OBJECT search_help
    4. ... MEMORY ID pid
    Effect
    These additions allow you to specify a start value, allow lower case, and integrate a search help or a SET/GET parameter.
    Addition 1
    ... DEFAULT val1 [TO val2] [OPTION opt] [SIGN sign]
    Effect
    This addition defines start values for the columns in the first line of the selection table . Without the addition DEFAULT, initial values of the corresponding type are used as start values.
    val1 and val2 are used to define start values for columns low and high. These start values can either be specified as literals or as previously defined data objects. If the data type of the specified start values does not match the data type of the columns, these are converted according to the conversion rules.
    The addition OPTION is used to define the start value for the option column. If the addition TO is not specified, you must specify one of the expressions eq, ne, ge, gt, le, lt, cp, or np directly for opt. If the addition TO is specified, you must either specify bt or nb. If the addition OPTION is not used, the content of the option column is set to "EQ" or "BT". If you specify cp or np, the start value in val1 must contain at least one of the wildcard characters "" oder "+" when data transfer takes place to the selection table, otherwise the program terminates.*
    The addition SIGN is used to define the start value for the sign column. You must either specify i or e directly for sign. If the addition SIGN is not used, the content of column sign is changed to "I".
    The times at which the start values are transferred to the first position in the selection table are processed in the same way as with the addition DEFAULT to the PARAMETERS statement. If the selection table is not empty when the transfer takes place, the start values are not transferred to the first position. Only the header line in the selection table is filled with these values, which does not influence the selection criterion.
    Note
    The corresponding input fields on the selection screen are only filled with the start values if the first line in the selection table is not changed before the selection screen is sent. The system displays the value contained in the selection table when the event AT SELECTION-SCREEN OUTPUT has been processed. Start values for multiple selection can only be defined by inserting lines in the selection table.
    Addition 2
    ... LOWER CASE
    Effect
    This addition prevents the content of character-like fields from being converted to block capitals when the data is transported from the input fields on the selection screen to the selection table.
    Addition 3
    ... MATCHCODE OBJECT search_help
    Effect
    This addition links the input fields for the selection criterion to a search help search_help from the ABAP Dictionary. You must specify the name of the search help directly. The addition has the same effect on the input fields as when it is used with a PARAMETERS statement for an input field for a parameter.
    Addition 4
    ... MEMORY ID pid
    Effect
    This addition links the first input field to a SET/GET parameter in the SAP Memory. You must specify the name of the SET/GET parameter directly and it can only contain a maximum of 20 characters. The addition has the same effect on the first input field as when it is used with a PARAMETERS statement for an input field for a parameter.
    reward  if helpful
    Edited by: Ashish Paliwal on Apr 2, 2008 12:52 PM

  • Need selection screen values in Search help user exit in same report

    Hi Experts,
    I am using Logical Data Base PNP.
    Created a custom search help to validate the records for IT000 based on the selection screen dates.
    Enter the DATEs for Data Selection Period and Person selection period in the selection screen.
    When I for search help for PERNR field in the same report, I need the selectin screen DATE values to be in user-exit of search help.
    This will help me in validating the records for specific employees within the date range of given DATE in selectin period.
    As of now it's picking the employees based on the DATE selection of selection screen,
    Regards,
    Prasad

    Hi,
    Go Ahead as mentioned by Satyesh T - (Option two).
    Reading Select Options from DYNP_VALUES_READ
    reffer the above link for getting more clarity for using  'DYNP_VALUES_READ'
    Regards.
    Arun

  • Hide the Range Option in Multiple Selection screen

    Hai,
    I Give the values In single Values In Selection Option Screen.
    I want to need Hide the Range Option Include or Exclude In Multiple selection screen.
    Regards,
    Geetha

    just check this it may help you
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/840ad679-0601-0010-cd8e-9989fd650822">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/840ad679-0601-0010-cd8e-9989fd650822</a>
    here restricting the selection screen
    regards
    shiba dutta

  • Selection screen while using PNP

    Dear Freinds,
                    I have one question relating to logical database PNP. If i use the logical databasePNP we willget the default screen with fields PERNR,EmploymentStatus,CompanyCode , Payroll area etc. But i can see that for the above feilds i will
    not get the range but i will geting the parameters.
    Could any body let me know how i can make on the selection
    screeen for the pernr, company code etc select-options so that the user can enter the pernr , company code range on the selection screen.
    regards
    syamala

    Hi syamala,
    from release 4.5 on the decision was not to have LOW and HIGH fields on the standard screen but only the LOW.
    But by simply clicking on the white arrow behind you should be able to enter ranges.
    If something is entered the system shows a green arrow.
    Regards,
    Michael

  • At selection-screen problem: triggering an error message...

    Hello experts,
    I have 3 radiobuttons and 1 parameter in my selection screen. it works in such a way that whenever the user clicks on the 3rd radiobutton the parameter will be inputtable. Now, what I want to do is that whenever the 3rd radiobutton is clicked and the user forgot to put a value in the paramater an error message will be triggered saying 'please put a value'.
    Now, creating a code for that is easy but here is the problem: whenever I click on any of the radiobuttons the message triggers. Anyway, below is my code:
    SELECTION-SCREEN BEGIN OF BLOCK box1 WITH FRAME TITLE text-001.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pr_upld RADIOBUTTON GROUP grp MODIF ID id3
                                              USER-COMMAND ucomm.
    SELECTION-SCREEN COMMENT 2(20) text-007 FOR FIELD pr_upld.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 03(15) text-a11 FOR FIELD p_flnme MODIF ID id3.
    PARAMETERS: p_flnme LIKE rlgrap-filename DEFAULT 'C:\' MODIF ID id3.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(22) text-002 FOR FIELD p_dcode MODIF ID id1.
    PARAMETERS: p_dcode LIKE vbak-kunnr MODIF ID id1,
                p_name1 LIKE kna1-name1 MODIF ID id1.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pr_list RADIOBUTTON GROUP grp MODIF ID id4.
    SELECTION-SCREEN COMMENT 2(7) text-003 FOR FIELD pr_list MODIF ID id4.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pr_add  RADIOBUTTON GROUP grp MODIF ID id2.
    SELECTION-SCREEN COMMENT 2(3) text-005 FOR FIELD pr_add MODIF ID id2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pr_edit RADIOBUTTON GROUP grp MODIF ID id5.
    SELECTION-SCREEN COMMENT 2(4) text-006 FOR FIELD pr_edit MODIF ID id5.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 03(20) text-a12 FOR FIELD p_code MODIF ID id2.
    *PARAMETERS: p_kunnr LIKE zts0001-kunnr.
    PARAMETERS: p_code LIKE zts0001-cdseq MODIF ID id6.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK box1.
    AT SELECTION-SCREEN OUTPUT.
    IF v_compflag EQ space.
        LOOP AT SCREEN.
          IF screen-group1      = 'ID1'.
            screen-input        = '0'.
            screen-output       = '1'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID2'.
            screen-active       = '1'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID3'.
            screen-active       = '0'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID4'.
            screen-active       = '1'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID5'.
            screen-active       = '1'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID6'.
            screen-active       = '1'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ELSEIF v_compflag NE space.
        LOOP AT SCREEN.
          IF screen-group1      = 'ID1'.
            screen-active       = '0'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID2'.
            screen-active       = '0'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID3'.
            screen-active       = '1'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID4'.
            screen-active       = '1'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID5'.
            screen-active       = '0'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID6'.
            screen-active       = '0'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    *for users that are not controllers
      LOOP AT SCREEN.
        IF screen-name   = 'P_CODE'.
          screen-input   =  '0'.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
      IF pr_list = 'X' OR
         pr_add  = 'X'  OR
         pr_upld = 'X'.
        LOOP AT SCREEN.
          IF screen-group1   =  'ID6'.
            screen-input     =  '0'.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      ELSEIF pr_edit  =  'X'.
        LOOP AT SCREEN.
          IF screen-group1   =  'ID6'.
            screen-input     =  '1'.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF.
    *for controllers
      IF pr_upld = 'X'.
        LOOP AT SCREEN.
          IF screen-name      = 'P_FLNME'.
            screen-input     = '1'.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      ELSEIF pr_list = 'X'.
        LOOP AT SCREEN.
          IF screen-name      = 'P_FLNME'.
            screen-input     = '0'.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF.
    AT SELECTION-SCREEN.
      IF pr_edit = 'X' AND p_code IS INITIAL.
        MESSAGE e008 WITH 'Please specify Code.'.
      ENDIF.
    Again, thank you guys and have a nice day!

    Hi viraylab,
    1. Such validations can be handled in the event
       START-OF-SELECTION.
    2. We should them and other such validations,
       using this logic
    START-OF-SELECTION.
    IF ERRORCONDIDTION.
    <b>MESSAGE 'PLEASE ENTER ' TYPE 'S'
    LEAVE LIST-PROCESSING.</b>
    ENDIF.
      WRITE :/ 'ABC'.
    3.
    The most important statements are
    A) message should be of type I, or S, or W
       (and not error E)
    b) LEAVE LIST-PROCESSING
      (it discontinues the further list showing,
       and again, re-displays, the selection screen)
    regards,
    amit m.

  • Select-options on selection-screen type char100 problem

    Hi friends! I created on selection-screen a select-options:
    SELECT-OPTIONS: zzcduc     FOR      equi-ZZCDUC.
    The field  equi-ZZCDUC is a CHAR100 field. The problem is when I run program, in this field user can't input more of 46 characters. This is a serial number with 100 characters, why I can input 100 characters?
    Thanks for any help.

    Hi, this is copied from SELECT-OPTION documentation:
    The LOW and HIGH fields of a selection option are displayed in a length up to 18 bytes long (scrollable up to 45 bytes). If you define a length longer than 45, fields are truncated on the selection screen after the 45th character. This affects the first line of the SELECT-OPTIONS table. You can, however, use SUBMIT to pass longer selection options to a report if they are specified with the addition NO-DISPLAY and thus do not appear on the selection screen. Without NO-DISPLAY, the fields are then truncated whenever the selection screen is processed in the background ( SUBMIT without VIA SELECTION-SCREEN).
    regards,

  • Selection screen problem in module pool

    Hi friends,
    I am working on module pool programming, I need to put select screen on the screen of the module pool porgramming. I used Input/Output field to do that and activated. But I am getting message invalid field format (screen error) can any one tell me why I am not able to run the seletion screen when I am using input/output field, also please let me know how to solve this problem.
    Regards,
    Line

    Hello,
    Think that this is useful for u/
    SELECTION-SCREEN - Defining selection screens
    Variants:
    1a. SELECTION-SCREEN BEGIN OF SCREEN scr.
    1b. SELECTION-SCREEN END   OF SCREEN scr.
    2. SELECTION-SCREEN BEGIN OF SCREEN scr AS SUBSCREEN.
    Effect
    Defines a selection screen with the number scr. scr may be up to 4 digits.
    SELECTION-SCREEN BEGIN OF SCREEN scr.
    Additions:
    (zu SELECTION-SCREEN BEGIN OF SCREEN scr) 1. ... TITLE title
    2. ... AS WINDOW
    Notes
    In reports (type 1 programs), a selection screen with number 1000 is created automatically when you use the SELECT-OPTIONS, PARAMETERS and SELECTION-SCREEN statments. This selection screen appears when you SUBMIT the report.
    In any type of program (apart from subroutine pools - type S), you can define further selection screens using SELECT-OPTIONS, PARAMETERS and SELECTION-SCREEN. You enclose these statements between the SELECTION-SCREEN BEGIN OF SCREEN and SELECTION-SCREEN END OF SCREEN statements.
    You call these screens using the CALL SELECTION-SCREEN statement.
    Screen number 1000 is not allowed (reserved for standard selection screen).
    When you generate the program, all user-defined selection screens are also generated.
    Within a report (type 1 program), all SELECT-OPTIONS, PARAMETERS and SELECTION-SCREEN statements outside a SELECTION-SCREEN BEGIN/END OF SCREEN block form part of selection screen 100 (standard selection screen)
    Regards,
    LIJO JOHN.

  • AT SELECTION-SCREEN - Urgent

    Could anybody tell me what does the event( AT SELECTION-SCREEN ) only do ? I am asking only about AT SELECTION-SCREEN
                                                           Regards,
                                                           SAURAV  LAHIRY

    hI,
    At selection-screen is the event of a report program in which we have to validate the selection screen fields.
    SELECTION SCREEN
    Selection screens are special screens that are defined with the help of ABAP statements. As programmers do not have access to the flow logic of selection screens, they cannot define dialog modules for selection screens. The ABAP runtime environment fully controls the processing flow of selection screens. To allow programmers to modify the selection screen before it is called (PBO) and react to user actions on the selection screen (PAI), the ABAP runtime environment generates a number of special selection screen events before the selection screen is displayed and after the user has executed actions on the selection screen
    AT SELECTION-SCREEN OUTPUT
    This event is executed at PBO of the selection screen every time the user presses ENTER - in contrast to INITIALIZATION . Therefore, this event is not suitable for setting selection screen default values. Also, since AT SELECTION-SCREEN OUTPUT is first executed after the variant is imported (if a variant is used) and after adopting any values specified under SUBMIT in the WITH clause, changing the report parameters or the selection options in AT SELECTION-SCREEN OUTPUT would destroy the specified values.
    Here, however, you can use LOOP AT SCREEN or MODIFY SCREEN to change the input/output attributes of selection screen fields.
    Example
    SELECT-OPTIONS NAME FOR SY-REPID MODIF ID XYZ.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    CHECK SCREEN-GROUP1 = 'XYZ'.
    SCREEN-INTENSIFIED = '1'.
    MODIFY SCREEN.
    ENDLOOP.
    AT SELECTION-SCREEN ON VALUE-REQUEST
    The event is triggered when the user calls the F4 help for the field field. If no corresponding event block has been defined, no possible values help or values list from the Dictionary is displayed. If a corresponding event block exists, it takes precedence over the default possible values help mechanism. It is then up to the programmer to ensure in the event block that an appropriate list of values is displayed, and that the user can choose a value from it.
    No event block AT SELECTION-SCREEN ON VALUE-REQUEST can be created for input fields on the selection screen that are declared within the logical database used. You cannot override the input help mechanism of the logical database within the executable program. You can define separate help within the logical database program using the VALUE-REQUEST option in the PARAMETERS and SELECT-OPTIONSstatements.
    Example
    INCLUDE DBXYZSEL
    PARAMETERS PL_TYPE LIKE SAPLANE-PLANETYPE VALUE-REQUEST.
    REPORT SAPDBXYZ DEFINING DATABASE XYZ.
    TABLES SAPLANE.
    FORM PL_TYPE_VAL.
    CALL FUNCTION ...
    ENDFORM.
    AT SELECTION-SCREEN ON HELP-REQUEST
    If the data type of an input field declared in an executable program is defined in the ABAP Dictionary, the documentation of the underlying data element is automatically displayed if the user positions the cursor in that field and presses F1. To create help for input fields that have no Dictionary reference, or to override the help normally linked to the field, you can create an event block for the event
    AT SELECTION-SCREEN ON HELP-REQUEST FOR <field>
    The event is triggered when the user calls the F1 help for the field <field>. If no corresponding event block has been defined, the help from the ABAP Dictionary is displayed, or none at all if the field has no Dictionary reference. If a corresponding event block exists, it takes precedence over the default help mechanism. It is then up to the programmer to ensure that appropriate help is displayed.
    You cannot declare the event block AT SELECTION-SCREEN ON HELP-REQUEST for input fields on the selection screen that are declared within a logical database. You cannot override the help mechanism of a logical database within the program. You can define separate help within the logical database program using the HELP-REQUEST option in the PARAMETERS and SELECT-OPTIONS statements.
    REPORT SELECTION_SCREEN_F1_DEMO.
    PARAMETERS: P_CARR_1 TYPE S_CARR_ID,
    P_CARR_2 TYPE S_CARR_ID.
    AT SELECTION-SCREEN ON HELP-REQUEST FOR P_CARR_2.
    CALL SCREEN 100 STARTING AT 10 5
    ENDING AT 60 10.
    This program declares a selection screen with two parameters that both refer to the data element S_CARR_ID in the ABAP Dictionary. The documentation from the ABAP Dictionary is used for P_CARR_1, and a help screen 100 is called for P_CARR_2. The help screen is defined in the Screen Painter as a modal dialog box with next screen 0. It contains the help text defined as help texts. The screen does not require any flow logic.
    AT SELECTION-SCREEN ON field
    In the PAI event of the selection screen, the event
    AT SELECTION-SCREEN ON field
    event is triggered. The input field field can be checked in the corresponding event block. If an error message occurs within this event block, the corresponding field is made ready for input again on the selection screen.
    Example:
    REPORT event_demo.
    NODES spfli.
    AT SELECTION-SCREEN ON city_fr.
    IF carrid-low EQ 'AA' AND city_fr NE 'NEW YORK'.
    MESSAGE e010(hb).
    ENDIF.
    If the user enters “AA” in the first input field, but not NEW YORK for the departure city, an error message is displayed in the status line until the user enters the correct city.
    AT SELECTION-SCREEN ON RADIOBUTTON
    In the PAI event of the selection screen, the event
    AT SELECTION-SCREEN ON RADIOBUTTON GROUP <radi>
    is triggered when the contents of all of the fields in a radio button group are passed from the selection screen to the ABAP program. To define a radio button group <radi>, use the addition RADIOBUTTON GROUP <radi> in the corresponding PARAMETERS statements. This event block allows you to check the whole group. If an error message occurs within this event block, the radio button group is made ready for input again on the selection screen. The individual fields of radio button groups do not trigger the event AT SELECTION-SCREEN ON <field>.
    REPORT EVENT_DEMO.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
    PARAMETERS: R1 RADIOBUTTON GROUP RAD1 DEFAULT 'X',
    R2 RADIOBUTTON GROUP RAD1,
    R3 RADIOBUTTON GROUP RAD1.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME.
    PARAMETERS: R4 RADIOBUTTON GROUP RAD2 DEFAULT 'X',
    R5 RADIOBUTTON GROUP RAD2,
    R6 RADIOBUTTON GROUP RAD2.
    SELECTION-SCREEN END OF BLOCK B2.
    AT SELECTION-SCREEN ON RADIOBUTTON GROUP RAD1.
    IF R1 = 'X'.
    MESSAGE W040(HB).
    ENDIF.
    AT SELECTION-SCREEN ON RADIOBUTTON GROUP RAD2.
    IF R4 = 'X'.
    MESSAGE W040(HB).
    ENDIF.
    If the user does not change one of the radio button groups, a warning is displayed.
    AT SELECTION-SCREEN ON BLOCK
    In the PAI event of the selection screen, the event
    AT SELECTION-SCREEN ON BLOCK <block>
    is triggered when the contents of all of the fields in a block are passed from the selection screen to the ABAP program. You define a block by enclosing the declarations of the elements in the block between the statements SELECTION-SCREEN BEGIN OF BLOCK <block> and SELECTION-SCREEN END OF BLOCK <block>. You can use this event block to check the consistency of the input fields in the block. If an error message occurs within this event block, the fields in the block are made ready for input again on the selection screen.
    Reward Points if found helpfull..
    Cheers,
    Chandra Sekhar.

  • How to display selected options in lookup F4  query selection screen

    i have to provide selected options  infoprovider specific than all values from database.

    in our company let there is PMACTIVITY TYPE and there is 140 activities, for aspecific group of our manager /users reports designed
    they have specific list of activities ,can i restrict by some ways to show only those relevant options in F4 selection screen
    Regards
    satish

  • Going back to selection screen from Change mode in ALV.

    Hello Gurus,
    I am working on a issue related to ALV where ALV becomes editable when user clicks on change button.  The Change button is a custom button defined in application toolbar of ALV display.
    case ucomm.
    WHEN 'TBACK'.
         leave to screen 0.
    when 'CHNG'.
            loop at it_apst01.
                  WA_FIELD_LST-EDIT = 'X'.
    *             Then some field symbol stuff is there
                  MODIFY FIELD_LST from wa_field_lst transporting edit
                         where FIELDNAME = <FS5>.
                ENDIF.
              endif.
            endloop.
          ENDIF.
          describe table gt_alv lines c_hits.
          c_alv_hits = c_hits.
          concatenate text-010 c_alv_hits 'hits' into c_alv_title separated
          by space.
          perform display_report tables gt_alv USING c_alv_title.
    form display_report tables p_outtab using p_title.
    call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program       = lv_progname
                i_callback_pf_status_set = 'ALV_STATUS'
                i_callback_user_command  = 'ALV_UCOMM'
    *            i_callback_top_of_page   = 'TOP_OF_PAGE'
                is_layout                = is_layout
                it_fieldcat              = field_lst
    *            is_variant               = g_variant
                it_event_exit            = gt_event_exit
                i_save                   = 'A'
                it_sort                  = it_sort
                i_screen_start_column    = i_start_col
                i_screen_start_line      = i_start_ln
                i_screen_end_column      = i_end_col
                i_screen_end_line        = i_end_ln
           tables
                t_outtab                 = p_outtab
           exceptions
                program_error            = 1
                others                   = 2.
    endform.
    Everything is working ok. But when I click on Back button,the screen goes first to the ALV display mode from edit mode, then user has to click one time more the back button to go to selection screen because the FM 'REUSE_ALV_GRID_DISPLAY' is called once again when user clicks
    on change button because I am making the EDIT flag = 'X' and then calling FM again.
    Is there a way that when user clicks on Back button, he will directly go to Change Screen -> Selection screen instead of going to Change screen -> Display screen -> Selection screen
    Regards,
    Rajesh.

    You must not call the FM 'REUSE_ALV_GRID_DISPLAY' again to make it editable. Instead you can call the FM REUSE_ALV_GRID_LAYOUT_INFO_GET and REUSE_ALV_GRID_LAYOUT_INFO_SET to make your grid editable / non-editable.
    Like this:
    REPORT grid_edit.
    TYPE-POOLS: slis.
    * Data to be displayed
    DATA: gt_sflight TYPE TABLE OF sflight.
    DATA: gs_layout TYPE slis_layout_alv.
    parameters: p_test type flag.
    start-of-selection.
    * Selection
    SELECT * FROM sflight INTO CORRESPONDING FIELDS OF TABLE gt_sflight.
    * Eingabebereit
    gs_layout-edit = 'X'.
    * Call ABAP List Viewer (ALV)
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        i_callback_program      = sy-cprog
        i_callback_user_command = 'USER_COMMAND'
        i_structure_name        = 'SFLIGHT'
        is_layout               = gs_layout
      TABLES
        t_outtab                = gt_sflight.
    *&      Form  user_command
    FORM user_command USING r_ucomm TYPE sy-ucomm
                            rs_selfield TYPE slis_selfield.
      DATA: ls_layout TYPE slis_layout_alv.
      IF r_ucomm = '&DATA_SAVE'.
        MESSAGE i000(0k) WITH text-001.
        CALL FUNCTION 'REUSE_ALV_GRID_LAYOUT_INFO_GET'
          IMPORTING
            es_layout = ls_layout.
        IF sy-subrc <> 0.
        ENDIF.
        ls_layout-edit = ' '.
        CALL FUNCTION 'REUSE_ALV_GRID_LAYOUT_INFO_SET'
          EXPORTING
            is_layout = ls_layout.
      ENDIF.
    ENDFORM.                    "user_command
    In this example, when you SAVE, it will give you one Information message and than make the Layout to non-editable mode. When you press back button, it will get you back to selection screen.
    Regards,
    Naimesh Patel

  • Difference between standard selection screen and selection screen

    hi guyz,
    im asking this because in the table D010SINF there are two fields  sdate and idate which has different dates in it for some programs and same dates for some..bit confused:(
    thanks

    hi BrightSide 
    standard Selection means
    suppose if you are using parameters means system defaultly generate one screen under the Screen Number 1000
    Selection Screen means you are creating a screen using
    stament SElection-Screen begin of screen 100..
    this is the difference whatever the screen other than '1000' is selection Screen, where as 1000 is Standard Selection Screen
    Regards
    Deva

  • Include and selection screen

    Hi Experts ,
         i have a problem regarding include and selection screen.
    i have an include program , in which i have  defined my selection screen. and this include has been called in many program .
      but problem is that i have to maintain selection text and text element for every program .
    is there any way ....that i have a single selection text and text element for every program ...in which that include called .
    Thanks and Regards
    Priyank Dixit

    Hi again,
    1. I tried the same thing - include bdcrecx1
       and it only provides radiobuttons, parameters and checkboxes.
       The labels/text elements are totally empty.
    PS: Only after we GOTO--->Text Elements
         and again activate them, (by ticking the 'dictionary checkbox or entering some appropriate text);
    do they appear properly in the selection screen.
    regards,
    amit m.

  • How to make selection screen display only

    hi all ,
    is there a way can only display the selection screen  , but not modifiable  , i don't want to create a new screen but use the selection screen.
    regards
    Kevin

    Hi,
    Use the Loop at screen...End loop in At selection-screen output event.
    Screen-name should be your selection screen Field names...
    Refer to this link...
    Loop at screen
    try the below code.
    AT SELECTION-SCREEN OUTPUT.
    loop at screen.
    IF screen-name = 'FIELD2' .
    screen-input = 0.
    screen-output = 0.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    loop at screen.
    IF screen-name = 'FIELD1' .
    screen-input = 0.
    screen-output = 0.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    Edited by: avinash kodarapu on Dec 8, 2008 12:15 PM

  • How to pass selection screen value to LDB dynamic field.

    Hello everybody,
    In my program, I am using standard LDB(PSJ) for getting data. And there is a requirement that I have to display some dynamic fields on my selection screen like plant , person responsible ( which are mandatory also ) etc. and inside the program I have to fill those dynamic fields for which the user has entered the value in selection screen.
    Could you please tell me how to pass some of selection screen values to ldb dynamic fields before GET statement.
    Thanks !!!
    Regards,
    Mitra

    >
    Pavan Bhamidipati wrote:
    > Hi,
    >
    >
    I have to fill those dynamic fields for which the user has entered the value in selection screen.
    >
    >
    > This means that the user is going to enter the values in the selection screen for the dynamic field values so
    >
    > SET PARAMETERID 'XYZ' FIELD p_field.
    >
    > where p_field is a parameter on the selection screen
    >
    > Regards
    > Pavan
    You can capture the values selected through the dynamic selections using some of the functions modules below, just search the forum for the below FM's, perhaps you can find some sample code
    FREE_SELECTIONS_EX_2_RANGE
    FREE_SELECTIONS_EX_2_WHERE
    FREE_SELECTIONS_RANGE_2_EX
    FREE_SELECTIONS_RANGE_2_WHERE
    FREE_SELECTIONS_WHERE_2_EX
    FREE_SELECTIONS_WHERE_2_RANGE

Maybe you are looking for

  • Outer Join logic

    The following code is an example of how to perform an outer join, in this case with ReportQuery (thanks Doug):         ExpressionBuilder eb = new ExpressionBuilder();         ReportQuery rq = new ReportQuery(Employee.class, eb);         rq.addAttribu

  • How to be able to change a variable used by an actived method?

    a JDialogBox controls the sleep time (int rate). a button listener uses this variable in thread.sleep() Problem: client cannot change rate while button listener is processing. How can i change my code in order to change the sleep time instantaneously

  • Urgent: OE_ORDER_PUB API Error

    Hi all, When I tried to create Sales orders using OE_ORDER_PUB api, it throws this error, FLEX-NULL SEGMENT Values have not been entered for one or more required segments. This is my piece of code I am using for order creation, vReturnStatus VARCHAR2

  • Technical names of infoobjects in infosets

    Hi, I have create an Infoset through several ODS and cubes. System automatically generates technical names starting with F, at design screen for each infoobject in ODS or cubes. But i want to see and use original tech. names of objects especialy on t

  • Upgrade to CS4 from CS2 - worth it?

    Hi, Good afternoon, I wonder if anybody can advise me on the core difference between Creative Suite 2 (Premium) and upgrading to the CS4 version of the software. Is there signicant difference? I am now on Windows 7. We are a small charity and use InD