Selection Screen skipped in RSRT/BEX

We have upgraded our systems to BI7. In the upgrade checkouts - we are facing this issue -
While running a query through RSRT or BEX, the selection screen is skipped and the results in an error saying.. 'Variables contain invalid..' However it runs fine through Web.
Am I missing something? Your inputs will be highly appreciated.
Thanks.

Hi,
Same Problem was faced by me. It was faced after i installed Internet Explorer 7.0
And as soon i uninstalled it and reverted back to old version of IE it started working fine. Selection screen started appearing
I dont know if its the same case with u guys.
Regards,
Sampat

Similar Messages

  • How to pass selection screen parameters to a BEx IView?

    Hi Experts,
    I have added BI Reports in EP and I want to pass the default input parameters to the BI IView as soon as its accessed in EP.
    Can some one tell me how can I achieve this? Is there a way to pass the input parameters in the "Application Parameters" property of the BEx Iview?
    Regards,
    Shobhit

    don't you mean he other way around. Assign text-elements (selection texts) to select options?
    This you do in the menu where you can find text-elements, selection texts.
    menu Goto->text elements->selection texts.
    Edited by: Micky Oestreich on May 10, 2008 2:45 PM

  • BEX Selection Screen Authorisations

    Hi all,
    I have developed a new authorisation role for a demand planner in APO. Part of its function is to allow the user to run a BEX report on a remote cube. This is working, apart from the selection screen when running the BEX query does not appear. This is NOT due to personalisation of variables.
    When I grant the same user the SAP_ALL profile, the selection screen appears when repeating this test. I have ran traces and gone through the SAP_ALL profile and ensured that every BW object I could see existed in my new role.
    Sadly I have not reached an answer as to what is missing in my role. Any ideas?
    I appreciate any help you can give on this matter.
    Kind regards,
    Nick

    Hi Ravi,
    There is one characteristic in the query that I've made authorisation relevant, 'Sales Org'. I have added the associated authorisation object to the role and as a test I've also given full access to this object in PFCG. This is why I would still expect it to prompt me with a selection screen.
    Sadly this is not the case. Do you have any other ideas? I do believe it is to do with at least 1 other SAP standard authorisation object, I just can't find which one it is.
    Thanks, Nick

  • What's the sense of "NOT" in the BEx-Analyzer selection-screen?

    Hi specialists,
    the selection-screen Queries in the BEx-Anlyzer presents the following selection-options:
    "="
    "<="
    ">"
    ">="
    "<"
    as well as their inverses:
    "not"
    "not ="
    "not <="
    "not >"
    "not >="
    "not <"
    "not []"
    "not *"
    While most of this options are redundant (because "not <=" is the same as ">") I absolutely cannot find any case where the above maked "not" makes any sense.
    In other words: Could somebody please gimme a hint what's the difference between "not" and "not =".

    Hi Stefan,
    I'm not sure weather we are talking about the same thing.
    When I use the the "more"-button (multselection-screen) of the selelection-screen, then I can comprehend your eplaination: The tab's are "and" connected - while the rows within a tab are "or" connected.
    But without the multiselection-dialog, there's still the option "not" in the drop-down list left to the value-field on the selection-screen. But I can't see any possibilty to filter the same variable multiple times here. So the example you mentioned doesn't fit here.
    Perhaps in some different way:
    If I choose "NOT" for the salesorg-variable, without providing a value followed by [enter]/check, then the "not" option is changed to "".
    If I choose "NOT" for the salesorg-variable, providing a value followed by [enter]/check, then the "not" option is changed to "=".
    In which case does the "not"-option "survive" the check without beeing corrected to any other option?
    (btw: I miss a possibilty for attaching images in the sdn-forum! - That would make some explainations much easier)

  • Selection Screen Bug :: Drop Down List.

    Hi
    I have created the following ABAP Report. I am new at this and I have just hit an issue. I have two drop down boxes linked to transactions. Now when I select a report from Drop Down 1 and click it it goes to the transaction. Now if I also have a selection in Drop Down 2 it actually runs both transactions.
    How can i fix this?
    Thanks
    Adeel
    REPORT TEST.
    *TYPE POOLS DECLARATIONS
    TYPE-POOLS: vrm.
    TABLES: sscrfields.
    *SELECTION SCREEN FIELDS
    *DATA: c(20) TYPE c.
    ***********SELECTION-SCREENS**********************
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-tt1.
    PARAMETERS: one(20) AS LISTBOX VISIBLE LENGTH 40.
    PARAMETERS: two(20) AS LISTBOX VISIBLE LENGTH 40.
    * ADD Afer 40 to show text "DEFAULT 'PLEASE SELECT'"
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN END OF BLOCK blk1.
    *********DROP DOWN SELECTION WITH DESCP******************
    AT SELECTION-SCREEN OUTPUT.
    PERFORM ONE.
    PERFORM TWO.
    *&      Form  ONE
    *       text
    FORM one.
      DATA: name  TYPE vrm_id,
          list  TYPE vrm_values,
          value LIKE LINE OF list.
      name = 'ONE'.
      value-key = '1 ::'.
      value-text = 'Stock Report'.
      APPEND value TO list.
      CLEAR value.
      value-key = '2 ::'.
      value-text = 'Open Sales Order Report'.
      APPEND value TO list.
      CLEAR value.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = name
          values          = list
        EXCEPTIONS
          id_illegal_name = 1
          OTHERS          = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    "ONE
    *&      Form  TWO
    *       text
    FORM two.
      DATA: name  TYPE vrm_id,
          list  TYPE vrm_values,
          value LIKE LINE OF list.
      name = 'TWO'.
      value-key = '1 ::'.
      value-text = 'AS Stock Report'.
      APPEND value TO list.
      CLEAR value.
      value-key = '2 ::'.
      value-text = 'AS Open Sales Order Report'.
      APPEND value TO list.
      clear value.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = name
          values          = list
        EXCEPTIONS
          id_illegal_name = 1
          OTHERS          = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    "TWO
    ***********LINKS TO ABOVE SELECTION**********************
    START-OF-SELECTION.
    IF ONE = '&IC1'.
      CASE one.
        WHEN '1 ::'.
          CALL TRANSACTION 'MB5L' AND SKIP FIRST SCREEN.
        WHEN '2 ::'.
          CALL TRANSACTION 'ZSOD'.
      ENDCASE.
    ENDIF.
    IF TWO = '&IC1'.
      CASE two.
        WHEN '1 ::'.
          CALL TRANSACTION 'MB52' AND SKIP FIRST SCREEN.
        WHEN '2 ::'.
          CALL TRANSACTION 'ZSOD'.
      ENDCASE.
    ENDIF.

    Hi Now try this one,.
    *TYPE POOLS DECLARATIONS
    TYPE-POOLS: vrm.
    TABLES: sscrfields.
    *SELECTION SCREEN FIELDS *
    DATA: c(20) TYPE c.
    **********SELECTION-SCREENS*********************
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-tt1.
    PARAMETERS: one(20) AS LISTBOX VISIBLE LENGTH 40.
    PARAMETERS: two(20) AS LISTBOX VISIBLE LENGTH 40.
    ADD Afer 40 to show text "DEFAULT 'PLEASE SELECT'"
    SELECTION-SCREEN SKIP. SELECTION-SCREEN END OF BLOCK blk1.
    ********DROP DOWN SELECTION WITH DESCP*****************
    AT SELECTION-SCREEN OUTPUT.
      PERFORM one.
      PERFORM two.
    *& Form ONE
    text ----------------------------------------------------------------------
    FORM one.
      DATA: name TYPE vrm_id,
            list TYPE vrm_values,
            value LIKE LINE OF list.
      name = 'ONE'.
      value-key = '1'.
      value-text = 'Stock Report'.
      APPEND value TO list.
      CLEAR value.
      value-key = '2'.
      value-text = 'Open Sales Order Report'.
      APPEND value TO list.
      CLEAR value.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = name
          values          = list
        EXCEPTIONS
          id_illegal_name = 1
          OTHERS          = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM. "ONE
    *& Form TWO
    text ----------------------------------------------------------------------
    FORM two.
      DATA: name TYPE vrm_id,
            list TYPE vrm_values,
            value LIKE LINE OF list.
      name = 'TWO'.
      value-key = '1'.
      value-text = 'AS Stock Report'.
      APPEND value TO list.
      CLEAR value.
      value-key = '2'.
      value-text = 'AS Open Sales Order Report'.
      APPEND value TO list.
      CLEAR value.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = name
          values          = list
        EXCEPTIONS
          id_illegal_name = 1
          OTHERS          = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.      "TWO
    **********LINKS TO ABOVE SELECTION*********************
    START-OF-SELECTION.
      CASE one.
        WHEN '1'.
          CALL TRANSACTION 'MB5L'AND SKIP FIRST SCREEN.
        WHEN '2'.
          CALL TRANSACTION 'MM01'.
      ENDCASE.
      CASE two.
        WHEN '1'.
          CALL TRANSACTION 'MB52' AND SKIP FIRST SCREEN.
        WHEN '2'.
          CALL TRANSACTION 'MM01'.
      ENDCASE.
    Give the 1:: as 1 and 2:: as 2 it will work...
    Regards,
    Bharani
    Edited by: SeethaRamaiah Bharani on Dec 18, 2009 8:10 PM

  • Tooltip on pushbutton on alv report selection screen

    Hi Experts,
    I have a selection screen with two pushbuttons i want to provide tooltip on this button when user takes his cursor on it .. some part of my code
    Selection screen:
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
    SELECTION-SCREEN: BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(20) text-t02 FOR FIELD p_info.
    PARAMETERS: p_info TYPE string.
    SELECTION-SCREEN: PUSHBUTTON 68(10) but1 USER-COMMAND cli1.
    SELECTION-SCREEN : END OF LINE.
    PARAMETERS:      r_exe_im  RADIOBUTTON GROUP rb1.
    PARAMETERS:      r_st  RADIOBUTTON GROUP rb1.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN: PUSHBUTTON /1(20) exec1 USER-COMMAND cli2.
    SELECTION-SCREEN: FUNCTION KEY 1.
    SELECTION-SCREEN END OF BLOCK b1.
    please tell me on these selection fields how to display tool tip.
    Thanks and regards,
    Roshan.

    Hi,
    After completing your executable program in SE38, activate it and goto SE51(Screen painter).
    Here give the name of your program and screen number as 1000.
    Click on Change.
    Goto Element List Tab.
    Here you will find all your elements from your program.
    Select the required element and click on Properties.
    Here you will find a Tooltip Text property. Click on the button 'Text' of this property.
    You will be given 2 options 1) Text from Text element 2) Text from Variable
    Enter as per requirement
    Save and Activate.
    Hope this will be useful
    Regards
    Bhupal

  • Need to have pop up window in selection screen and capture the user action.

    Hello Friends,
                         I have a requirement, that need to show a pop up window after execution, and to get the action from user using a Push button.
    I create a selection screen and a sub screen as window.
    After user execute from the selection screen, I am popping up this window.
    Window contains some input values to be entered and push button to identify the user action.
    I try to capture the user action using sy-ucomm, but it does not hold any value when user press the button.
    How to overcome this issue.
    Here is the definition of the window.
    Pop Up Window for getting values
    SELECTION-SCREEN BEGIN OF SCREEN 500 AS WINDOW TITLE title .
    PARAMETER : p_vdate LIKE t9aa01-validfrom,
                p_dcggt LIKE t9aa01-hkont,
                p_dcgst1 LIKE t9aa01-hkont,
                p_dcgst2 LIKE t9aa01-hkont,
                p_na LIKE t9aa01-hkont.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN POSITION 20.
    SELECTION-SCREEN PUSHBUTTON 2(10) text-001 USER-COMMAND SVE.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF SCREEN 500.
    Cheers,
    Senthil
    Edited by: Senthil on Jan 7, 2008 11:03 AM

    Hi,
    Try using the below code.
           data : w_var type string.
           CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
             EXPORTING
              DEFAULTOPTION        = 'Y'
               textline1            = 'test '
             TEXTLINE2            = ' '
               titel                = 'check'
             START_COLUMN         = 25
             START_ROW            = 6
             CANCEL_DISPLAY       = 'X'
            IMPORTING
              ANSWER               = w_var.
                     if w_var = 'J'.
                     else.
                     endif.
    Comments : J indicates Yes and N indicates No
    Regards,
    Jeswanth

  • At selection screen output problem when a field is obligatory

    Hi All,
    I have two radiobuttons on the selection screen and when I select first radiobutton one screen should display and the other should not be displayed and vice-versa. It is working fine if I do not have a mandatory field.I am pasting my code here.Can anyone please help me how to handle this situation when we have some mandatory fields on one of these screens.
    TABLES : mara,marc.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS : p_meth1 RADIOBUTTON GROUP g1 USER-COMMAND g1,
                 p_meth2 RADIOBUTTON GROUP g1.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK matnr WITH FRAME TITLE text-002.
    SELECTION-SCREEN SKIP 1.
    SELECT-OPTIONS : so_matnr FOR marc-matnr MODIF ID m1 obligatory.
    SELECTION-SCREEN SKIP 1.
    SELECT-OPTIONS : so_werks FOR marc-werks MODIF ID m1 .
    SELECTION-SCREEN END OF BLOCK matnr.
    SELECTION-SCREEN BEGIN OF BLOCK file WITH FRAME TITLE text-003.
    SELECTION-SCREEN SKIP 1.
    PARAMETERS: p_fpath TYPE ibipparms-path MODIF ID m2 LOWER CASE.
    SELECTION-SCREEN END OF BLOCK file.
    SELECTION-SCREEN BEGIN OF BLOCK date WITH FRAME TITLE text-004.
    SELECTION-SCREEN SKIP 1.
    PARAMETERS : p_date TYPE datuv.
    SELECTION-SCREEN END OF BLOCK date.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    CASE screen-group1.
    WHEN 'M1'.
    IF p_meth1 = 'X'.
    screen-active = 1.
    ENDIF.
    IF p_meth2 = 'X'.
    screen-active = 0.
    ENDIF.
    WHEN 'M2'.
    IF p_meth2 = 'X'.
    screen-active = 1.
    ELSE.
    screen-active = 0.
    ENDIF.
    IF p_meth1 = 'X'.
    screen-active = 0.
    ENDIF.
    ENDCASE.
    MODIFY SCREEN.
    ENDLOOP.
    Thanks in advance
    Sandeep

    Obligatory fields with your requirement will not work, reason : The GUI checks obligatory fields before passing the control back to the program (i.e Before triggering the PAI )
    If you check for empty fields and give appropriate error message in the PAI, the program will not allow you to switch to the other radio button until you fill something in the fields because the moment you select a radiobutton, it will validate the field and issue the error message.
    So it is like a catch 22 situation.
    All you can really do is to check see which radio button is clicked and then do your processing. Also make sure to assign a user command to the radiobutton and query it in the AT SELECTION SCREEN and based on the radiobutton selected, decide which fields should be validated.
    " Additon...
    INITIALIZATION  " Default values
    p_meth1 = 'X'.
    AT SELECTION-SCREEN.  " General PAI
    if p_meth1 EQ 'X'.
    "validate fields for meth1.
    elseif p_meth2 EQ 'X'.
    " validate fields for meth2.
    endif.
    regards,
    Advait

  • Selection-screen design

    Hi everyone,
    I am working on a project for which I have to design a selection-screen.
    The requirement is such that there are 3 obligatory fields to be filled by the user, which are as follows:
    P_LAUFD(parameter,obligatory-date),
    P_LAUFI(parameter,obligatory-id),
    P_FILENM(parameter,obligatory-filename),
    P_LOKAAL(checkbox).
    The requirement is such that when the user does not check the checkbox the search help for P_FILENM should show the files from the application server,and when it is checked the files from the presentation server should be shown.
    The code that I have written is listed below, but there is  a problem with it.
    When I don't enter  anything in the first 2 fields, the search field for the 3rd field functions as required, but if I first enter something in the first 2 fields and then click on the checkbox, the search help for P_FILENM does not function as reaquired.
    Please advise.
    Also if possible could you'll  kindly   explain the sequence of events that is getting triggered?
    *&  Include           Z6890_PROJINCLUDE_SEL_SCREEN                     *
    TABLES : SSCRFIELDS.
    DATA: FILE LIKE DXFIELDS-LONGPATH.
    DATA V_FILENAME LIKE IBIPPARMS-PATH.
    DATA: TMP TYPE SSCRFIELDS-UCOMM.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETERS: P_LAUFD TYPE  D OBLIGATORY,
                P_LAUFI(6) TYPE C OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
    PARAMETERS: P_FILENM(128) TYPE C OBLIGATORY.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN POSITION 33.
    PARAMETER: P_LOKAAL AS CHECKBOX USER-COMMAND SRC.
    SELECTION-SCREEN COMMENT 35(6) TEXT-003.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK B2.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-004.
    PARAMETERS: P_DEL(2) TYPE C .
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(12) TEXT-005 FOR FIELD P_APPL.
    SELECTION-SCREEN POSITION 33.
    PARAMETERS:  P_APPL(3) TYPE C.
    SELECTION-SCREEN POSITION 37.
    PARAMETERS: P_APDESC(40) TYPE C.
    SELECTION-SCREEN END OF LINE.
    PARAMETERS: P_MKDT(8) TYPE N,
                P_NOINV(6) TYPE N.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(12) TEXT-006 FOR FIELD P_TOAMNT.
    SELECTION-SCREEN POSITION 33.
    PARAMETERS: P_TOAMNT(13) TYPE N.
    SELECTION-SCREEN POSITION 47.
    PARAMETERS: P_TEKEN(1) TYPE C.
    SELECTION-SCREEN END OF LINE.
    PARAMETERS: P_DESC(60) TYPE C.
    SELECTION-SCREEN END OF BLOCK B3.
    ***********************************************************************************************REPORT  Z6890_PROJ_REPORT_DRAFT                 .
    DATA: BEGIN OF GW_LINE,
          TEXT(700) TYPE C,
          END OF GW_LINE.
    DATA: GIN_FILE LIKE TABLE OF GW_LINE.
    INCLUDE Z6890_PROJINCLUDE_SEL_SCREEN.
    AT SELECTION-SCREEN.
      CASE SY-UCOMM.
        WHEN  'EXEC'.
          IF P_LOKAAL = 'X'.
            PERFORM MV_DATA_FRM_PRES_INT .
          ELSE.
            PERFORM OPEN_FILE_ONAPP_SERVER.
          ENDIF.
          LOOP AT SCREEN.
            IF SCREEN-NAME = 'P_DEL'.
              SCREEN-INPUT = 0.
              SCREEN-OUTPUT = 1.
              P_DEL = 'HI'.
            ENDIF.
            IF SCREEN-NAME = 'P_APPL'.
              SCREEN-INPUT = 0.
              SCREEN-OUTPUT = 1.
              P_APPL = 'CHF'.
            ENDIF.
            MODIFY SCREEN.
          ENDLOOP.
        WHEN 'BACK'.
          LEAVE PROGRAM.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
        WHEN 'CANCEL'.
          LEAVE PROGRAM.
      ENDCASE.
    AT SELECTION-SCREEN  OUTPUT.
      SET PF-STATUS 'PROJ'.
      LOOP AT SCREEN.
        IF SCREEN-NAME = 'P_DEL'.
          SCREEN-INPUT = 0.
          SCREEN-OUTPUT = 1.
        ENDIF.
        IF SCREEN-NAME = 'P_APPL'.
          SCREEN-INPUT = 0.
          SCREEN-OUTPUT = 1.
        ENDIF.
        IF SCREEN-NAME = 'P_APDESC'.
          SCREEN-INPUT = 0.
          SCREEN-OUTPUT = 1.
        ENDIF.
        IF SCREEN-NAME = 'P_MKDT'.
          SCREEN-INPUT = 0.
          SCREEN-OUTPUT = 1.
        ENDIF.
        IF SCREEN-NAME = 'P_NOINV'.
          SCREEN-INPUT = 0.
          SCREEN-OUTPUT = 1.
        ENDIF.
        IF SCREEN-NAME = 'P_TOAMNT'.
          SCREEN-INPUT = 0.
          SCREEN-OUTPUT = 1.
        ENDIF.
        IF SCREEN-NAME = 'P_TEKEN'.
          SCREEN-INPUT = 0.
          SCREEN-OUTPUT = 1.
        ENDIF.
        IF SCREEN-NAME = 'P_DESC'.
          SCREEN-INPUT = 0.
          SCREEN-OUTPUT = 1.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_LAUFD.
      CALL FUNCTION 'F4_DATE'
       EXPORTING
         DATE_FOR_FIRST_MONTH               = SY-DATUM
         DISPLAY                            = ' '
        FACTORY_CALENDAR_ID                = ' '
        GREGORIAN_CALENDAR_FLAG            = ' '
        HOLIDAY_CALENDAR_ID                = ' '
        PROGNAME_FOR_FIRST_MONTH           = ' '
       IMPORTING
         SELECT_DATE                        = P_LAUFD
        SELECT_WEEK                        =
        SELECT_WEEK_BEGIN                  =
        SELECT_WEEK_END                    =
      EXCEPTIONS
        CALENDAR_BUFFER_NOT_LOADABLE       = 1
        DATE_AFTER_RANGE                   = 2
        DATE_BEFORE_RANGE                  = 3
        DATE_INVALID                       = 4
        FACTORY_CALENDAR_NOT_FOUND         = 5
        HOLIDAY_CALENDAR_NOT_FOUND         = 6
        PARAMETER_CONFLICT                 = 7
        OTHERS                             = 8
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILENM.
      IF TMP = SSCRFIELDS-UCOMM.
        CLEAR SSCRFIELDS-UCOMM.
        CLEAR TMP.
      ELSE.
        SSCRFIELDS-UCOMM = 'SRC'.
      ENDIF.
      CASE SSCRFIELDS-UCOMM.
        WHEN 'SRC'.
          TMP = SSCRFIELDS-UCOMM.
          CALL FUNCTION '/SAPDMC/LSM_F4_FRONTEND_FILE'
    EXPORTING
       PATHNAME               =
               CHANGING
                 PATHFILE               = V_FILENAME
             EXCEPTIONS
               CANCELED_BY_USER       = 1
       SYSTEM_ERROR           = 2
       OTHERS                 = 3
          IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
            IF SY-SUBRC = 1.
              MESSAGE I000(Z6890_PROJ) .
            ENDIF.
          ENDIF.
          P_FILENM = V_FILENAME.
          CLEAR SSCRFIELDS-UCOMM.
        WHEN OTHERS.
          CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
               EXPORTING
                 I_LOCATION_FLAG       = 'A'
                 I_SERVER              = 'ides47_i47_00'
                 I_PATH                = 'D:\usr\sap\'
                 FILEMASK              = '.'
                 FILEOPERATION         = 'R'
               IMPORTING
          O_LOCATION_FLAG       =
          O_SERVER              =
                 O_PATH                = FILE
          ABEND_FLAG            =
        EXCEPTIONS
          RFC_ERROR             = 1
          ERROR_WITH_GUI        = 2
          OTHERS                = 3
          IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
          P_FILENM = FILE.
         CLEAR SSCRFIELDS-UCOMM.
      ENDCASE.
    *&      Form  MV_DATA_FRM_PRES_INT
          text
    -->  p1        text
    <--  p2        text
    FORM MV_DATA_FRM_PRES_INT .
      DATA: F_NAME TYPE STRING.
      F_NAME = P_FILENM.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME                      = F_NAME
         FILETYPE                      = 'ASC'
      HAS_FIELD_SEPARATOR           = ' '
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
        TABLES
          DATA_TAB                      = GIN_FILE
    EXCEPTIONS
       FILE_OPEN_ERROR               = 1
      FILE_READ_ERROR               = 2
      NO_BATCH                      = 3
      GUI_REFUSE_FILETRANSFER       = 4
      INVALID_TYPE                  = 5
      NO_AUTHORITY                  = 6
      UNKNOWN_ERROR                 = 7
      BAD_DATA_FORMAT               = 8
      HEADER_NOT_ALLOWED            = 9
      SEPARATOR_NOT_ALLOWED         = 10
      HEADER_TOO_LONG               = 11
      UNKNOWN_DP_ERROR              = 12
      ACCESS_DENIED                 = 13
      DP_OUT_OF_MEMORY              = 14
      DISK_FULL                     = 15
      DP_TIMEOUT                    = 16
      OTHERS                        = 17
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      IF SY-SUBRC = 1.
       LEAVE TO LIST-PROCESSING.
       WRITE: / 'Error: File could not be opened!'.
        MESSAGE I001(Z6890_PROJ) WITH P_FILENM.
      ENDIF.
      BREAK-POINT.
    ENDFORM.                    " MV_DATA_FRM_PRES_INT
    *&      Form  OPEN_FILE_ONAPP_SERVER
          text
    -->  p1        text
    <--  p2        text
    FORM OPEN_FILE_ONAPP_SERVER  .
    ENDFORM.

    Hi Piyush,
    Add the below code in your program.
    *Note: you have to take two parameters for files.
    If you select check box then p_pc parameter is visible.
    if you dont select check box then p_app parameter is visible.
    PARAMETERS: p_chk1 AS CHECKBOX USER-COMMAND rusr.
    SELECTION-SCREEN: BEGIN OF BLOCK blk1 WITH FRAME.
    PARAMETERS: p_pc  LIKE rlgrap-filename MODIF ID abc.
    PARAMETERS: p_app LIKE rlgrap-filename MODIF ID def.
    SELECTION-SCREEN: END OF BLOCK blk1.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF screen-group1 = 'ABC'.
          CLEAR: p_pc, p_app.
          IF p_chk1 = 'X'.
            screen-active = 1.
          ELSE.
            screen-active = 0.
          ENDIF.
          MODIFY SCREEN.
        ENDIF.
        IF screen-group1 = 'DEF'.
          CLEAR: p_pc, p_app.
          IF p_chk1 <> 'X'.
            screen-active = 1.
          ELSE.
            screen-active = 0.
          ENDIF.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_app.
      PERFORM get_fname_app.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_pc.
      CALL FUNCTION 'F4_FILENAME'
        IMPORTING
          file_name = p_pc.
    *&      Form  get_fname_app
          text
    FORM get_fname_app.
      DATA: c_fnh_mask TYPE dxfields-filemask VALUE '.',
      search_dir TYPE dxfields-longpath VALUE '/sapglobal/users',
      file_path LIKE dxfields-longpath.
      CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
        EXPORTING
          i_location_flag = 'A'
          i_server        = ' '
          i_path          = search_dir
          filemask        = c_fnh_mask
          fileoperation   = 'R'
        IMPORTING
          o_path          = file_path
        EXCEPTIONS
          rfc_error       = 1
          OTHERS          = 2.
      IF sy-subrc EQ 0.
        p_app = file_path.
      ENDIF.
    ENDFORM.                    "get_fname_app

  • Report should executed based on the radio buttons on the selection screen

    Hi everyone,
    Greets....................
    My scenario is I have 2 selection screen blocks on same screen..
    One selection screen block contains input parameters as follows
    Company Code  -  S_BUKRS
    Business Area -  S_GSBER
    Customer Code -  S_KUNNR
    Fiscal Area  -   S_GJAHR
    GL Account - S_HKONT
    Posting Date  -S_ZFBDT
    Ledger Type  -P_RLDNR
    Open Item Key Date -  P_ZFBDT
    Another selection screen block contains 2 radio buttons with the option as follows
    Collection Plan
    *Credit days summary.
    If i click Collection plan the report output should come based on the input parameters in first selection-screen block.
    If i click Credit days summary the report output should come based on the input parameters in first selection-screen block.
    Pls send me the sample code for this.
    Thanks in Advance
    Regards
    Raj kumar

    See the below folling example : it will have radio buttons and depends on radio button it will show output.
    REPORT ZPPR_BOM_INFOL_REPORT no standard page heading
                     line-size 160
                     line-count 60.
    ======================================================================
    Program Name : ZPPR_BOM_INFOL_REPORT
    Description  : This Program would be used for BOM List for a material*
                   and the component's where used list                   *
    Author       : Seshu                                                 *
    Date         : 07/24/2006                                            *
    MODIFICATION HISTORY                                                 *
    DATE    | AUTHOR   | CHANGE #   | DESCRIPTION OF MODIFICATION        *
    |----
    |----
    |----
    *12/04/06 | Seshu    | DEVK921821 | Removed new page for each material *
    ======================================================================
    Table definition                                                    *
    TABLES: mast,
            stko,
            stpo,
            T418,
            makt.
    TYPE - POOLS
    TYPE-POOLS: slis.
    Constants
    constants : c_tcode(4) type c value 'CS03',
                gc_formname_top_of_page TYPE slis_formname
                VALUE 'TOP_OF_PAGE'.
    Variables
    data : v_maktx like makt-maktx,
           wa_stko like stko.
    DATA:
    Objekttyp 'Material'
       otyp_mat(1) TYPE c VALUE '1',
       ootyp_mat(1) TYPE c VALUE 'M',
    Objekttyp 'kein Objekt'
       otyp_noo(1) TYPE c VALUE '2',
    Objekttyp 'Dokument'
       otyp_doc(1) TYPE c VALUE '3',
    Objekttyp 'Klasse'
       otyp_kla(1) TYPE c VALUE '4',
    Objekttyp 'Intramaterial'
       otyp_ntm(1) TYPE c VALUE '5'.
    maximal anzeigbare Menge
    data:   max_num(7)  TYPE p DECIMALS 3 VALUE '9999999999.999',
            ueberl_kz(1) TYPE c VALUE '*',
            min_num(7)  TYPE p DECIMALS 3 VALUE '9999999999.999-',
            b_flag(1) TYPE c VALUE 'X',
            ecfld(250) TYPE c,
            v_flag type c.
    ALV Variables
    DATA: gt_fieldcat TYPE slis_t_fieldcat_alv,
          gs_layout   TYPE slis_layout_alv,
          gs_keyinfo  TYPE slis_keyinfo_alv,
          gt_sp_group TYPE slis_t_sp_group_alv,
          gt_events   TYPE slis_t_event.
    DATA: g_repid LIKE sy-repid.
    DATA: gt_list_top_of_page TYPE slis_t_listheader,
                g_tabname_header TYPE slis_tabname,
                g_tabname_item   TYPE slis_tabname,
                g_save(1) TYPE c,
                gx_variant LIKE disvariant,
                g_variant LIKE disvariant,
                g_default(1) TYPE c,
                g_exit(1) TYPE c.
    Includes                                                             *
    INCLUDE .
    Internal Table Declaration                                           *
    DATA: t_mast LIKE STANDARD TABLE OF mast WITH HEADER LINE.
    *DATA: t_makt LIKE STANDARD TABLE OF makt WITH HEADER LINE.
    BOM Function module Related
    DATA: t_matcat  LIKE cscmat OCCURS 0 WITH HEADER LINE.
    Internal Table for Level by Level Function module
    DATA: t_stb  LIKE stpox OCCURS 0 WITH HEADER LINE.
    Get the Relevant data from FM
    DATA: BEGIN OF hd_tab OCCURS 0,
             stufe LIKE stpox-stufe,
             vwegx LIKE stpox-vwegx,
          END OF hd_tab.
    Final Output
    DATA: BEGIN OF alv_stb OCCURS 0.
            INCLUDE STRUCTURE stpox_alv.
    DATA:   info(3)   TYPE c,
          END OF alv_stb.
    DATA: BEGIN OF stb_orig.
            INCLUDE STRUCTURE stpox.
    DATA: END OF stb_orig.
    DATA: BEGIN OF stb_add.
            INCLUDE STRUCTURE stpol_add.
    DATA: END OF stb_add.
    Internal Table for STPO
    *-- BOM Line item
    TYPES: BEGIN OF ty_stpo,
           stlty TYPE stpo-stlty,
           stlnr TYPE stpo-stlnr,
           stlkn TYPE stpo-stlkn,
           stpoz TYPE stpo-stpoz,
           idnrk TYPE stpo-idnrk,
           meins TYPE stpo-meins,
           menge TYPE stpo-menge, "Component Qty
           END OF ty_stpo.
    DATA: t_stpo TYPE STANDARD TABLE OF ty_stpo WITH HEADER LINE.
    *-- BOM Header
    TYPES: BEGIN OF ty_stko,
           stlty TYPE stko-stlty,
           stlnr TYPE stko-stlnr,
           stlal TYPE stko-stlal,
           stkoz TYPE stko-stkoz,
           bmein TYPE stko-bmein,
           bmeng TYPE stko-bmeng,
           END OF ty_stko.
    DATA: t_stko TYPE STANDARD TABLE OF ty_stko WITH HEADER LINE .
    data : t_makt like makt occurs 0 with header line.
    DATA: BEGIN OF cl_clstab OCCURS 0,                          "YHG079407
             class LIKE klah-class,                             "YHG079407
             klart LIKE klah-klart,                             "YHG079407
             chked LIKE csdata-xfeld,                           "YHG079407
             noobj LIKE csdata-xfeld,                           "YHG079407
             dsply LIKE csdata-xfeld,                           "YHG079407
          END OF cl_clstab.
    *-- Header table
    TYPES: BEGIN OF ty_main_material,
           matnr TYPE mast-matnr, "Material
           werks TYPE mast-werks, "Plant
           maktx TYPE makt-maktx, "Description
           stlal TYPE mast-stlal, "Alternative BOM
           stlnr TYPE stko-stlnr, "BOM Number
           bmein TYPE stko-bmein, "UOM
           bmeng TYPE stko-bmeng, "Base Qty
           expand(1) TYPE c,      "Expanding Field
           END OF ty_main_material.
    DATA: t_main_material TYPE STANDARD TABLE OF ty_main_material WITH
          HEADER LINE.
    *-- Item (Component) Table
    TYPES: BEGIN OF ty_item_material,
           matnr TYPE mast-matnr, "Material
           werks TYPE mast-werks, "Plant
           idnrk TYPE stpo-idnrk, "Component (Material)
           maktx TYPE makt-maktx, "Description
           stlal TYPE mast-stlal, "Alternative BOM
           stlnr TYPE stpo-stlnr, "BOM Number
           meins TYPE stpo-meins, "UOM
           menge TYPE stpo-menge, "Base Qty
           END OF ty_item_material.
    DATA: t_item_material TYPE STANDARD TABLE OF ty_item_material WITH
          HEADER LINE.
    Selection Screen                                                     *
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: p_werks LIKE marc-werks DEFAULT '1000' OBLIGATORY.
    SELECT-OPTIONS s_stlal FOR mast-stlal .
    SELECT-OPTIONS s_stlan FOR mast-stlan DEFAULT '1'.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    SELECTION-SCREEN SKIP.
    PARAMETERS: p_bomlst RADIOBUTTON GROUP g1 DEFAULT 'X'.
    SELECT-OPTIONS s_matnr FOR mast-matnr.
    SELECTION-SCREEN SKIP.
    PARAMETERS: p_compon RADIOBUTTON GROUP g1.
    SELECT-OPTIONS: s_idnrk FOR stpo-idnrk.
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN END OF BLOCK b1.
    selection-screen begin of block b03 with frame title text-b03.
    selection-screen begin of line.
    selection-screen comment 1(40) text-005.
    parameters: p_all radiobutton group r1 default 'X'.
    selection-screen end of line.
    selection-screen begin of line.
    selection-screen comment 1(40) text-006.
    parameters: p_one radiobutton group r1 .
    selection-screen end of line.
    selection-screen end of block b03.
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
    PARAMETERS: p_vari LIKE disvariant-variant.
    SELECTION-SCREEN END OF BLOCK b3.
    At slection screen events                                            *
    *-- Process on value request
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
      PERFORM f4_for_variant.
    Intitialisation
    INITIALIZATION.
      g_repid = sy-repid.
      g_tabname_header = 'T_MAIN_MATERIAL'.
      g_tabname_item   = 'T_ITEM_MATERIAL'.
    *-- define keyinformation
      CLEAR gs_keyinfo.
      gs_keyinfo-header01 = 'MATNR'.
      gs_keyinfo-item01   = 'MATNR'.
      PERFORM e03_eventtab_build USING gt_events[].
      PERFORM e04_comment_build  USING gt_list_top_of_page[].
      PERFORM e07_sp_group_build USING gt_sp_group[].
      PERFORM e08_layout_build   USING gs_layout.
    Set Options: save variants userspecific or general
      g_save = 'A'.
      PERFORM variant_init.
    Get default variant
      gx_variant = g_variant.
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
           EXPORTING
                i_save     = g_save
           CHANGING
                cs_variant = gx_variant
           EXCEPTIONS
                not_found  = 2.
      IF sy-subrc = 0.
        p_vari = gx_variant-variant.
      ENDIF.
    S T A R T - O F - S E L E C T I O N *******************
    start-of-selection.
      if p_all = 'X'.
    Get the data from MAST and MAKT Table
        if p_bomlst = 'X'.
      Get the data Based On Material #
          perform get_data.
        else.
      Get the data Based On Component
          perform get_data_component.
        endif.
      else.
    Get the Single Level Report
    *-- Moved the fiedl catalog here inorder to change the layout based on
    *-- Selection
        PERFORM e01_fieldcat_init  USING gt_fieldcat[].
        PERFORM select_data.
      endif.
    E N D - O F - S  E  L  E  C  T  I  O  N *******************
    end-of-selection.
      if p_one = 'X'.
        perform alv.
      endif.
    User Command
    at line-selection.
    Interactive to CS03 Transaction
      case sy-ucomm.
        when 'PICK' or 'F2'.
          if not alv_stb-idnrk is initial .
            if not alv_stb-werks is initial.
              if not alv_stb-objty is initial.
                SET PARAMETER ID 'MAT' FIELD alv_stb-idnrk.
                SET PARAMETER ID 'WRK' FIELD alv_stb-werks.
                SET PARAMETER ID 'CSV' FIELD alv_stb-OBJTY.
                call transaction c_tcode and skip first screen.
              endif.
            endif.
          endif.
          clear alv_stb.
      endcase.
    *&      Form  get_data
          Get data from MAST and MAKT Table
    FORM get_data.
      data : wa_lines type sy-index.
      REFRESH : T_MAST,
                t_STB,
                t_MATCAT,
                alv_STB.
      CLEAR : T_MAST,
                t_STB,
                t_MATCAT,
                alv_STB.
    Get the data from MAST Table
    Get all the information from MAST - BOM Table
      SELECT * FROM mast INTO TABLE t_mast WHERE matnr IN s_matnr AND
                                                 werks = p_werks  AND
                                                 stlan IN s_stlan AND
                                                 stlal IN s_stlal.
      describe table t_mast lines  wa_lines.
      if wa_lines is initial.
        Write:/2 'List contains no data'.
        stop.
      endif.
      loop at t_mast.
        clear : v_maktx.
    Start of change  Seshu
    Reason - Remove the new page option
        if sy-tabix ne 1.
          skip 1.
        endif.
    End of Change  Seshu
    Get the material Description
        select single maktx from makt into  v_maktx
                                 where matnr = t_mast-matnr
                                 and   spras = 'E'.
    Get the material details from STKO Table
        select single * from stko into wa_stko
                        where STLTY = 'M'
                        and   STLNR = t_mast-stlnr
                        and   STLAL = t_mast-stlal.
    Main Header for Each Material
        format color 5 on.
        write:/2 'Material',20 'Material Description',65 'Alternative BOM',
             90 'Base Qty', 115 'Base Unit'.
        format color 5 off.
        format color 1 on.
        write:/2 t_mast-matnr,20 v_maktx,65 wa_stko-STLAL, 85 wa_stko-BMENG,
               115 wa_stko-BMEIN.
        format color 1 off.
    Use the Function Module and get the format level by level
        perform get_level_level.
      endloop.
    ENDFORM.                    " get_data
    Top of page                                                  *
    top-of-page.
      perform report_header .
    *&      Form  report_header
          text
    -->  p1        text
    <--  p2        text
    FORM report_header.
      new-page line-size 160 .
      format color col_heading intensified on.
      write:/ sy-uline(160) .
    *--- Write Company Name.
      perform calc_col_and_write using    text-h00
                                          sy-linsz.
    *--- Write Report Title.
      perform calc_col_and_write using    sy-title
                                          sy-linsz.
    *--- Write User Id, Date / Time, Program Id, Page etc.
      perform write_other_hdr_details.
      write:/ sy-uline(160) .
    ENDFORM.                    " report_header
    *&      Form  calc_col_and_write
          text
         -->P_TEXT_H00  text
         -->P_SY_LINSZ  text
    FORM calc_col_and_write USING    P_TEXT
                                     P_LINSZ.
      data: col1 type i,
             col2 type i,
              len  type i,
              str  type i.
      str  = strlen( p_text ).
      col1 = ( p_linsz / 2 ) - ( str / 2 ) .
      len  = p_linsz - col1 - 2.
      write: at  /1  '|'.
      write: at  col1 p_text,
             at  sy-colno(len) space.
      write  at  160 '|'.
    ENDFORM.                    " calc_col_and_write
    *&      Form  write_other_hdr_details
          text
    -->  p1        text
    <--  p2        text
    FORM write_other_hdr_details.
      data: col1 type i,
              col2 type i,
              len  type i.
      col1 = 3.
      write:/1 '|'.
      write: at  col1 'UserId  : ',
                      sy-uname.
      len = sy-linsz - 1.
      write at sy-colno(len) space.
      col2 = sy-linsz - 18.
      write: at col2 'Date: ',
                     sy-datum mm/dd/yyyy.
      write: at sy-linsz '|'.
      write:/1 '|'.
      write: at  col1 'ReportId: ',
                      sy-repid.
      write at sy-colno(len) space.
      col2 = sy-linsz - 18.
      write: at col2 'Page: ',
                      sy-pagno.
      write: at sy-linsz '|'.
    ENDFORM.                    " write_other_hdr_details
    *&      Form  get_data_component
          Get the data based on Component level
    FORM get_data_component.
      data wa_lines type i.
    *-- Get the BOM item details
      SELECT  stlty stlnr stlkn stpoz idnrk meins menge
              FROM stpo
              INTO TABLE t_stpo
      WHERE   idnrk IN s_idnrk.
      IF sy-subrc = 0.
        CLEAR wa_lines.
        DESCRIBE TABLE t_stpo LINES wa_lines.
        IF wa_lines > 0.
          SELECT  stlty stlnr stlal stkoz bmein bmeng
                  FROM stko
                  INTO TABLE t_stko
                  FOR ALL ENTRIES IN t_stpo
          WHERE stlnr = t_stpo-stlnr.
          CLEAR wa_lines.
          DELETE ADJACENT DUPLICATES FROM t_stko COMPARING ALL FIELDS.
          DESCRIBE TABLE t_stko LINES wa_lines.
          IF wa_lines > 0.
    *-- Get the BOM item details
            SELECT * FROM mast INTO TABLE t_mast FOR ALL ENTRIES IN t_stko
                                                WHERE werks = p_werks  AND
                                                  stlnr = t_stko-stlnr
                                                  and stlal in s_stlal.
          ENDIF.
        ENDIF.
      else.
        Write:/2 'List contains no data'.
        stop.
      endif.
      loop at t_mast.
        clear : v_maktx.
    Start of change  Seshu
    Reason - Remove the new page option
        if sy-tabix ne 1.
          skip 1.
        endif.
    End of change    Seshu
    Get the material Description
        select single maktx from makt into  v_maktx
                                 where matnr = t_mast-matnr
                                 and   spras = 'E'.
    Get the material details from STKO Table
        select single * from stko into wa_stko
                        where STLTY = 'M'
                        and   STLNR = t_mast-stlnr
                        and   STLAL = t_mast-stlal.
    Main Header for Each Material
        format color 5 on.
        write:/2 'Material',20 'Material Description',65 'Alternative BOM',
             90 'Base Qty', 115 'Base Unit'.
        format color 5 off.
        format color 1 on.
        write:/2 t_mast-matnr,20 v_maktx,65 wa_stko-STLAL, 85 wa_stko-BMENG,
               115 wa_stko-BMEIN.
        format color 1 off.
    Use the Function Module and get the format level by level
        perform get_level_level.
        clear : t_mast.
      endloop.
    ENDFORM.                    " get_data_component
    *&      Form  obj_ident
          text
    FORM obj_ident.
    weder Mat noch Doc
      CHECK: T_stb-objty NE otyp_mat,
             T_stb-objty NE ootyp_mat,
             T_stb-objty NE otyp_doc,
             T_stb-objty NE otyp_ntm.
    ?T418-WA schon ok
    nein
      IF T_stb-postp NE t418-postp.
        T418 einlesen
        PERFORM t418_lesen USING T_stb-postp.
      ENDIF.
      PERFORM cl_clstab_maint.
    ?MatNr-Eingabe bei diesem PosTyp moeglich
      und keine Textposition
    trifft zu
      IF     t418-matin NE '-'
         AND t418-txpos IS INITIAL.
        aktuelles Objekt ist Material NLAG
        T_stb-objty = '1'.
        PosKurztext in ObjKurztext uebernehmen.
        T_stb-ojtxp = T_stb-potx1.
        MODIFY T_stb.
      ELSE.
        IF T_stb-objty IS INITIAL.
          T_stb-objty = '2'.
          MODIFY T_stb.
        ENDIF.
      ENDIF.
    ENDFORM.                    " obj_ident
    *&      Form  t418_lesen
          text
         -->P_T_STB_POSTP  text
    FORM t418_lesen USING   lkl_postp LIKE stpo-postp.
    T418-WA initialisieren
      CLEAR:
         t418.
    Key angeben
      t418-postp = lkl_postp.
    PosTypDefinition lesen
      READ TABLE t418.
    ENDFORM.                    " t418_lesen
    *&      Form  cl_clstab_maint
          text
    FORM cl_clstab_maint.
    nur fuer Klassenpositionen
      CHECK t_STB-OBJTY EQ OTYP_KLA.
    Teilkey der Klassenpositionentabelle
      CL_CLSTAB-CLASS = t_STB-CLASS.
      CL_CLSTAB-KLART = t_STB-KLART.
    Klassenpositionentabelle lesen
      READ TABLE CL_CLSTAB
         WITH KEY CL_CLSTAB(21)
         BINARY SEARCH.
    aktuelle Klassenposition bereits in Klassenpositionentabelle
    nein
      IF SY-SUBRC <> 0.
        Klassenposition in Klassenpositionentabelle hinzufuegen
        INSERT CL_CLSTAB INDEX SY-TABIX.
      ENDIF.
    ENDFORM.                    " cl_clstab_maint
    *&      Form  alv_stb_prep
          Printing the data as LEVEL BY LEVEL
    FORM alv_stb_prep.
      CLEAR:
          alv_stb,
          stb_orig,
          stb_add.
      IF t_stb-hdnfo IS INITIAL.
        stb_orig = t_stb.
        IF t_stb-mngko >= max_num.
          stb_add-ovfls = ueberl_kz.
        ELSE.
          IF t_stb-mngko <= min_num.
            stb_add-ovfls = ueberl_kz.
          ELSE.
            CLEAR: stb_add-ovfls.
          ENDIF.
        ENDIF.
        IF NOT t_stb-xtlnr IS INITIAL.
          stb_add-bomfl = b_flag.
        ENDIF.
        IF    NOT t_stb-knobj IS INITIAL
           OR NOT t_stb-class IS INITIAL
           OR NOT t_stb-kzclb IS INITIAL.
          stb_add-knofl = 'X'.
        ENDIF.
      ELSE.
        CHECK t_stb-stufe > 1.
        alv_stb-info = 'C30'.
        IF t_stb-ttidx <> t_matcat-index.
          READ TABLE t_matcat INDEX t_stb-ttidx.
        ENDIF.
        stb_orig-hdnfo = t_stb-hdnfo.
        stb_orig-stufe = t_stb-stufe - 1 .
        stb_orig-ojtxp = t_stb-ojtxb.
        IF NOT t_stb-altst IS INITIAL.
          stb_orig-stlal = t_stb-stlal.
          IF stb_orig-stlal(1) EQ '0'.
            stb_orig-stlal(1) = ' '.
          ENDIF.
        ENDIF.
        stb_orig-idnrk = t_matcat-matnr.
      ENDIF.
      CLEAR:
        stb_add-dobjt,
        stb_add-objic.
      CASE t_stb-objty.
        WHEN otyp_mat.
          WRITE: stb_orig-idnrk TO ecfld.
          stb_add-objic = '@A6@'.
        WHEN 'M'.
          WRITE: stb_orig-idnrk TO ecfld.
          stb_add-objic = '@A6@'.
        WHEN otyp_noo.
          WRITE: stb_orig-potx1 TO ecfld.
          stb_add-objic = '@0Q@'.
        WHEN otyp_doc.
          write stb_orig-doknr to ecfld.                        "note 489354
          IF ecfld CP '*# '. ENDIF.                             "note 489354
          sy-fdpos = sy-fdpos + 1.                              "note 489354
          CONCATENATE
    *d      stb_orig-doknr                                      "note 489354
            stb_orig-dokar
            stb_orig-doktl
            stb_orig-dokvr
    *d      INTO ecfld                                          "note 489354
            INTO ecfld+sy-fdpos                                 "note 489354
            SEPARATED BY space.
          stb_add-objic = '@AR@'.
        WHEN otyp_kla.
          CONCATENATE
            stb_orig-class
            stb_orig-klart
            INTO ecfld
            SEPARATED BY space.
          stb_add-objic = '@7C@'.
        WHEN otyp_ntm.
          WRITE: stb_orig-intrm TO ecfld.
        WHEN OTHERS.
      ENDCASE.
    *d CONDENSE ecfld.                                          "note 515408
      stb_add-dobjt = ecfld(40).
      CLEAR: ecfld.
      WRITE stb_orig-stufe TO stb_add-dstuf NO-SIGN.
    *d  MOVE-CORRESPONDING stb_orig TO alv_stb.                 "note 331962
      MOVE-CORRESPONDING stb_add TO alv_stb.
      MOVE-CORRESPONDING stb_orig TO alv_stb.                   "note 331962
      APPEND alv_stb.
    ENDFORM.                    " alv_stb_prep
    *&      Form  get_level_level
          text
    FORM get_level_level.
      REFRESH : T_STB,
                T_MATCAT,
                ALV_STB.
      CLEAR : T_STB,
              T_MATCAT,
              ALV_STB.
      CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
           EXPORTING
                capid                 = 'PP01'
                datuv                 = sy-datum
                mktls                 = 'X'
                mehrs                 = 'X'
                mtnrv                 = t_mast-matnr
                stlal                 = '01'
                stlan                 = '1'
                stpst                 = 0
                svwvo                 = 'X'
                werks                 = p_werks
                vrsvo                 = 'X'
           TABLES
                stb                   = t_stb
                matcat                = t_matcat
           EXCEPTIONS
                alt_not_found         = 1
                call_invalid          = 2
                material_not_found    = 3
                missing_authorization = 4
                no_bom_found          = 5
                no_plant_data         = 6
                no_suitable_bom_found = 7
                conversion_error      = 8
                OTHERS                = 9.
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CLEAR: hd_tab.
            Entry der KlassenstatusTab. initialisieren
             cl_clstab,
            Entry 'Objekte von Klassen' initialisieren
             cl_objmemo.
      REFRESH: hd_tab.
      SORT t_matcat BY index ASCENDING.
    Get the All levels
      loop at t_stb.
        IF NOT t_stb-hdnfo IS INITIAL.
          EXIT.
        ENDIF.
    Object Identification
        PERFORM obj_ident.
        READ TABLE hd_tab
            WITH KEY stufe = t_stb-stufe
                     vwegx = t_stb-vwegx
            BINARY SEARCH
            TRANSPORTING NO FIELDS.
        ?gibt es diesen Satz schon
        nein
        IF sy-subrc <> 0.
           dann in SFP-Infosatzverweistab. aufnehmen
    *d       APPEND HD_TAB.                                       "HGH054648
          hd_tab-stufe = t_stb-stufe.
                                                                "HGH054648
          hd_tab-vwegx = t_stb-vwegx.
                                                                "HGH054648
          INSERT hd_tab                                         "HGH054648
            INTO hd_tab                                         "HGH054648
            INDEX sy-tabix.                                     "HGH054648
           PosNr initialisieren
          CLEAR: t_stb-posnr.
           SFP-InfosatzKz setzen
          t_stb-hdnfo = 'X'.
            stb-objty = otyp_mat.
                                                                "HGE246532
           als SFP-Infosatz in die STB aufnehmen
          append t_stb.
        ENDIF.
    *del  ENDIF.
        clear t_stb.
      endloop.
      SORT t_stb ASCENDING BY stufe
                  index ASCENDING
    *del        POSNR ASCENDING.                                  "HGC062735
                  posnr ASCENDING                               "HGC062735
                  hdnfo DESCENDING.
      LOOP AT t_stb.
        T_stb-index = sy-tabix.
        MODIFY T_stb.
        PERFORM alv_stb_prep.
      ENDLOOP.
    Displays the Value as Level by Level
      loop at ALV_stb.
        if sy-tabix = 1.
          format color 3 on.
          write:/2 'Level',12 'Item',22 'Component',
          42 'Material Description',82 'Base Qty',
          107 'Base Unit',120 'Assembly Indicator'.
          format color 3 on.
        endif.
        if alv_stb-MEINs is initial.
          v_flag = 'X'.
        endif.
        if v_flag = 'X'.
          format color 5 on.
          write:/2 ALV_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
                 42 alv_stb-OJTXP.
          format color 1 off.
        else.
          if alv_stb-STUFE = '1'.
            format color 1 on.
            write:/2 ALV_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
                   42 alv_stb-OJTXP,72 alv_stb-mngko,
                   107 alv_stb-MEINs, 120 alv_stb-bomfl .
            format color 1 off.
          elseif alv_stb-STUFE = '2'.
            format color 2 on.
            write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
                   42 alv_stb-OJTXP,72 alv_stb-mngko,
                   107 alv_stb-MEINs,120 alv_stb-bomfl.
            format color 2 off.
          elseif alv_stb-STUFE = '3'.
            format color 3 on.
            write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
                    42 alv_stb-OJTXP,72 alv_stb-mngko,
                    107 alv_stb-MEINs,120 alv_stb-bomfl .
            format color 3 off.
          elseif alv_stb-STUFE = '4'.
            format color 4 on.
            write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
                    42 alv_stb-OJTXP,72 alv_stb-mngko,
                    107 alv_stb-MEINs,120 alv_stb-bomfl .
            format color 4 off.
          elseif alv_stb-STUFE = '5'.
            format color 5 on.
            write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
                    42 alv_stb-OJTXP,72 alv_stb-mngko,
                    107 alv_stb-MEINs,120 alv_stb-bomfl .
            format color 5 off.
          elseif alv_stb-STUFE = '6'.
            format color 7 on.
            write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
                   42 alv_stb-OJTXP,72 alv_stb-mngko,
                   107 alv_stb-MEINs,120 alv_stb-bomfl.
            format color 6 off.
          elseif alv_stb-STUFE = '7'.
            format color 7 on.
            write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
                   42 alv_stb-OJTXP,72 alv_stb-mngko,
                   107 alv_stb-MEINs,120 alv_stb-bomfl .
            format color  7 off.
          else.
            format color 1 on.
            write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
                    42 alv_stb-OJTXP,72 alv_stb-mngko,
                    107 alv_stb-MEINs,120 alv_stb-bomfl .
            format color  1 off.
          endif.
        endif.
        hide: alv_stb.
        clear : alv_stb.
        clear v_flag.
      endloop.
    ENDFORM.                    " get_level_level
    *&      Form  f4_for_variant
          text
    FORM f4_for_variant.
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
             EXPORTING
                  is_variant          = g_variant
                  i_save              = g_save
                  i_tabname_header    = g_tabname_header
                  i_tabname_item      = g_tabname_item
              it_default_fieldcat =
             IMPORTING
                  e_exit              = g_exit
                  es_variant          = gx_variant
             EXCEPTIONS
                  not_found = 2.
      IF sy-subrc = 2.
        MESSAGE ID sy-msgid TYPE 'S'      NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
        IF g_exit = space.
          p_vari = gx_variant-variant.
        ENDIF.
      ENDIF.
    ENDFORM.                    " f4_for_variant
          FORM E03_EVENTTAB_BUILD                                       *
    -->  E03_LT_EVENTS                                                 *
    FORM e03_eventtab_build USING e03_lt_events TYPE slis_t_event.
      DATA: ls_event TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
           EXPORTING
                i_list_type = 0
           IMPORTING
                et_events   = e03_lt_events.
      READ TABLE e03_lt_events WITH KEY name = slis_ev_top_of_page
                               INTO ls_event.
      IF sy-subrc = 0.
        MOVE gc_formname_top_of_page TO ls_event-form.
        APPEND ls_event TO e03_lt_events.
      ENDIF.
    ENDFORM.
          FORM E04_COMMENT_BUILD                                        *
    -->  E04_LT_TOP_OF_PAGE                                     

  • 'SET PF-STATUS EXCLUDING fcode' not working in Selection Screen event

    Hi all,
    I am trying to set PF-Status dynamically in Selection Screen based on Radio button.
    For that i have inserted following code under event --> AT SELECTION-SCREEN OUTPUT
    * SELECTION SCREEN
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECTION-SCREEN SKIP 1.
    PARAMETERS: s_inc  RADIOBUTTON GROUP rad DEFAULT 'X'
                       USER-COMMAND inc MODIF ID mod,
                p_inc(10) MODIF ID m1,
                s_lbr  RADIOBUTTON GROUP rad,
                p_lbr(10) MODIF ID m2.
    SELECTION-SCREEN END OF BLOCK b1.
    *  AT SELECTION-SCREEN OUTPUT
    AT SELECTION-SCREEN OUTPUT.
      REFRESH fcode.
      IF s_inc IS INITIAL.
        APPEND 'CRTE' TO fcode.
        APPEND 'CHNG' TO fcode.
        APPEND 'DISP' TO fcode.
        APPEND 'PRNI' TO fcode.
        APPEND 'CRTL' TO fcode.
        SET PF-STATUS 'STATUS_IN' EXCLUDING fcode.
      ELSE.
        SET PF-STATUS 'STATUS_IN'.
      ENDIF.
    Though s_inc is initial, i can see all the buttons from Status 'STATUS_IN' after execution of above code. EXCLUDING statement is not taking any effect which we normally get in Module pool program.
    Please tell me what went wrong in above code?

    Problem solved ......Thanks Keshav,
    Giving code correction -->
    * SELECTION SCREEN
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECTION-SCREEN SKIP 1.
    PARAMETERS: s_inc  RADIOBUTTON GROUP rad DEFAULT 'X'
                       USER-COMMAND inc MODIF ID mod,
                p_inc(10) MODIF ID m1,
                s_lbr  RADIOBUTTON GROUP rad,
                p_lbr(10) MODIF ID m2.
    SELECTION-SCREEN END OF BLOCK b1.
    *  AT SELECTION-SCREEN OUTPUT
    AT SELECTION-SCREEN OUTPUT.
      REFRESH fcode.
      IF s_inc IS INITIAL.
        APPEND 'CRTI' TO fcode.
        APPEND 'CHGI' TO fcode.
        APPEND 'DISI' TO fcode.
        APPEND 'DELI' TO fcode.
        APPEND 'PRNI' TO fcode.
        APPEND 'CRTL' TO fcode.
        APPEND 'DATA' TO fcode.
      ELSE.
        APPEND 'CHGL' TO fcode.
        APPEND 'DISL' TO fcode.
        APPEND 'PRNL' TO fcode.
      ENDIF.
      CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
        EXPORTING
          p_status        = 'STATUS_IN'
          P_PROGRAM       = sy-repid
        TABLES
          p_exclude       = fcode

  • Steps to create tabstrip for subscreen in selection screen

    hi,
    can let me know the steps taken to create subscreen in selection screen and put in tabstrip?
    i need to have 3 screens. 1000 being the tabstrip, 2000 being first subscreen and 3000 being the second subscreen.
    i have the abap code but i do not know the steps to create especially 1000 screen.
    for 2000 and 3000, once i activated the program, these 2 screens added but i do not know where can i create the 1000 screen.
    also, should i use wizard to create tabstrip?
    please advise. thanks
    SELECTION-SCREEN BEGIN OF SCREEN 2000 AS SUBSCREEN.        SELECTION-SCREEN BEGIN OF BLOCK x WITH FRAME TITLE text-001.
    SELECT-OPTIONS: para1 FOR  field1 ,     
                                  para2 FOR field2.            
    SELECTION-SCREEN END OF BLOCK x.
    SELECTION-SCREEN END OF SCREEN 2000.
    SELECTION-SCREEN BEGIN OF SCREEN 3000 AS SUBSCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK y WITH FRAME TITLE text-002.
    SELECT-OPTIONS: para3 FOR  field3 ,     
                                  para4 FOR field4.      
    SELECTION-SCREEN END OF BLOCK y.
    SELECTION-SCREEN:SKIP.
    SELECTION-SCREEN END OF SCREEN 3000.

    e_l,
      See the total doc.. with example.
    Assigning a Subscreen Area to a Tab Title
    You must assign a subscreen area to each tab title. There are two ways of doing this:
    Paging in the SAPgui
    You need to assign a separate subscreen area to each tab title, and define the function codes of the tab titles with type P (local GUI function). In the screen flow logic, you call all the subscreens in the PBO event. This means that all of the tab pages reside locally on the SAPgui.
    When the user chooses a tab title, paging takes place within the SAPgui. In this respect, the tabstrip control behaves like a single screen. In particular, the PAI event is not triggered when the user chooses a tab title, and no data is transported. While this improves the performance of your tabstrip control, it also has the negative effect that when the user does trigger the PAI event, all of the input checks for all of the subscreens are performed. This means that when the user is working on one tab page, the input checks may jump to an unfilled mandatory field on another page.
    Local paging at the SAPgui is therefore most appropriate for screens that display data rather than for input screens.
    Paging on the Application Server
    One subscreen area is shared by all tab titles and called in the PBO event. You define the function codes of the individual tab titles without a special function type. When the user chooses a tab page, the PAI event is triggered, and you must include a module in your flow logic that activates the appropriate tab page and assigns the correct subscreen to the subscreen area.
    Since the PAI event is triggered each time the user chooses a tab title, this method is less economical for the application server, but the input checks that are performed only affect the current tab page.
    Procedure in Either Case
    You create the subscreen areas within the tabstrip area. You assign the subscreen areas to one or more tab titles in the Screen Painter by selecting one or more titles. You can also assign a subscreen area to a tab title in the tab title attributes by entering the name of the subscreen area in the Reference field attribute.
    The procedure for the alphanumeric Screen Painter is described under Creating Tabstrip Controls.
    If you are paging at the SAPgui, create a subscreen area for each tab title. If you are paging at the application server, select all tab titles and create a single subscreen area. The subscreen areas may not cover the top line of the tab area. However, within a tab area, more than one subscreen area can overlap.
    Programming the Flow Logic
    In the flow logic, all you have to do by hand is include the correct subscreens. The screen flow and data transport to the ABAP program is the same as for normal subscreens. There are two ways of programming the screen flow logic, depending on how you have decided to page through the tabstrip control.
    Paging in the SAPgui
    When you page in the SAPgui, you must include a subscreen for each subscreen area:
    PROCESS BEFORE OUTPUT.
      CALL SUBSCREEN: <area1> INCLUDING [<prog 1>] <dynp 1>,
                      <area2> INCLUDING [<prog 2>] <dynp 2>,
                      <area3> INCLUDING [<prog 3>] <dynp 3>,
    PROCESS AFTER INPUT.
      CALL SUBSCREEN: <area1>,
                      <area2>,
                      <area3>,
    Paging on the Application Server
    When you page on the application server, you only have to include a subscreen for the one subscreen area:
    PROCESS BEFORE OUTPUT.
      CALL SUBSCREEN <area> INCLUDING [<prog>] <dynp>.
    PROCESS AFTER INPUT.
      CALL SUBSCREEN <area>.
    Handling in the ABAP Program
    Before you can use a tabstrip control in your ABAP program, you must create a control for each control in the declaration part of your program using the following statement:
    CONTROLS <ctrl> TYPE TABSTRIP.
    where <ctrl> is the name of the tabstrip area on a screen in the ABAP program. The control allows the ABAP program to work with the tabstrip control. The statement declares a structure with the name <ctrl> . The only component of this structure that you need in your program is called ACTIVETAB.
    Use in the PBO event
    Before the screen is displayed, you use the control to set the tab page that is currently active. To do this, assign the function code of the corresponding tab title to the component ACTIVETAB:
    <ctrl>-ACTIVETAB = <fcode>.
    When you page at the SAPgui, you only need to do this once before the screen is displayed. This initializes the tabstrip control. The default active tab page is the first page. After this, the page activated when the user chooses a tab title is set within SAPgui.
    When you page on the application server, you must assign the active page both before the screen is displayed for the first time, and each time the user pages. At the same time, you must set the required subscreen screen.
    You can suppress a tab page dynamically by setting the ACTIVE field of table SCREEN to 0 for the corresponding tab title.
    Use in the PAI event
    In the PAI event, ACTIVETAB contains the function code of the last active tab title on the screen.
    When you page in the SAPgui, this allows you to find out the page that the user can currently see. When you page at the application server, the active tab page is controlled by the ABAP program anyway.
    The OK_CODE field behaves differently according to the paging method:
    Paging in the SAPgui
    When you page in the SAPgui, the PAI event is not triggered when the user chooses a tab title, and the OK_CODE field is not filled. The OK_CODE field is only filled by user actions in the GUI status or when the user chooses a pushbutton either outside the tabstrip control or on one of the subscreens.
    Paging on the application server
    If you are paging at the application server, the PAI event is triggered when the user chooses a tab title, and the OK_CODE field is filled with the corresponding function code.
    To page through the tabstrip control, you must assign the function code to the ACTIVETAB component of the control:
    <ctrl>-ACTIVETAB = <ok_code>.
    This statement overwrites the function code of the last active tab page with that of the new tab title. At the same time, you must ensure that the correct subscreen is inserted in the subscreen area.
    Otherwise, tabstrip controls are handled like normal subscrens in ABAP programs, that is, the ABAP program of a subscreen screen must contain the dialog modules called from the flow logic of the subscreen.
    Examples
    Tabstrip control, paging at SAPgui
    REPORT DEMO_DYNPRO_TABSTRIP_LOCAL.
    CONTROLS MYTABSTRIP TYPE TABSTRIP.
    DATA: OK_CODE TYPE SY-UCOMM,
          SAVE_OK TYPE SY-UCOMM.
    MYTABSTRIP-ACTIVETAB = 'PUSH2'.
    CALL SCREEN 100.
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
    ENDMODULE.
    MODULE CANCEL INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE USER_COMMAND INPUT.
      SAVE_OK = OK_CODE.
      CLEAR OK_CODE.
      IF SAVE_OK = 'OK'.
        MESSAGE I888(SABAPDOCU) WITH 'MYTABSTRIP-ACTIVETAB ='
                                      MYTABSTRIP-ACTIVETAB.
      ENDIF.
    ENDMODULE.
    The next screen (statically defined) for screen 100 is itself. It has the following layout:
    The screen contains a tabstrip area called MYTABSTRIP with three tab titles PUSH1, PUSH2 and PUSH3. The function codes have the same name, and all have the function type P. One of the subscreen areas SUB1 to SUB3 is assigned to each tab title. The pushbutton has the name BUTTON and the function code ‘OK’.
    In the same ABAP program, there are three subscreen screens 110 to 130. Each of these fits the subscreen area exactly. The layout is:
    The screen flow logic for screen 100 is as follows:
    PROCESS BEFORE OUTPUT.
      MODULE STATUS_0100.
      CALL SUBSCREEN: SUB1 INCLUDING SY-REPID '0110',
                      SUB2 INCLUDING SY-REPID '0120',
                      SUB3 INCLUDING SY-REPID '0130'.
    PROCESS AFTER INPUT.
      MODULE CANCEL AT EXIT-COMMAND.
      CALL SUBSCREEN: SUB1,
                      SUB2,
                      SUB3.
      MODULE USER_COMMAND.
    The screen flow logic of subscreens 110 to 130 does not contain any module calls.
    When you run the program, a screen appears on which the second tab page is active, since the program sets the ACTIVETAB component of the structure MYTABSTRIP to PUSH2 before the screen is displayed. The user can page through the tabstrip control without the PAI event being triggered. One of the three subscreens is included on each tab page.
    When the user chooses Continue, the PAI event is triggered, and an information message displays the function code of the tab title of the page that is currently active.
    Tabstrip control with paging on the application server.
    REPORT DEMO_DYNPRO_TABSTRIP_LOCAL.
    CONTROLS MYTABSTRIP TYPE TABSTRIP.
    DATA: OK_CODE TYPE SY-UCOMM,
          SAVE_OK TYPE SY-UCOMM.
    DATA  NUMBER TYPE SY-DYNNR.
    MYTABSTRIP-ACTIVETAB = 'PUSH2'.
    NUMBER = '0120'.
    CALL SCREEN 100.
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
    ENDMODULE.
    MODULE CANCEL INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE USER_COMMAND INPUT.
      SAVE_OK = OK_CODE.
      CLEAR OK_CODE.
      IF SAVE_OK = 'OK'.
        MESSAGE I888(SABAPDOCU) WITH 'MYTABSTRIP-ACTIVETAB ='
                                      MYTABSTRIP-ACTIVETAB.
      ELSE.
        MYTABSTRIP-ACTIVETAB = SAVE_OK.
        CASE SAVE_OK.
          WHEN 'PUSH1'.
            NUMBER = '0110'.
          WHEN 'PUSH2'.
            NUMBER = '0120'.
          WHEN 'PUSH3'.
            NUMBER = '0130'.
        ENDCASE.
      ENDIF.
    ENDMODULE.
    The statically-defined next screen for screen 100 is itself, and its layout is the same as in the above example. However, the function codes of the three tab titles have the function type <blank> and they all share a single subscreen area SUB.
    The same subscreen screens 110 to 130 are defined as in the last example.
    The screen flow logic for screen 100 is as follows:
    PROCESS BEFORE OUTPUT.
      MODULE STATUS_0100.
      CALL SUBSCREEN SUB INCLUDING SY-REPID NUMBER.
    PROCESS AFTER INPUT.
      MODULE CANCEL AT EXIT-COMMAND.
      CALL SUBSCREEN SUB.
      MODULE USER_COMMAND.
    In this example, the program includes a subscreen screen in the subscreen area SUB dynamically during the PBO event.
    The screen flow logic of subscreens 110 to 130 does not contain any module calls.
    This example has the same function as the previous example, but the paging within the tabstrip control is implemented on the application server. Each time the user chooses a tab title, the function code from the OK_CODE field is assigned to the ACTIVETAB component of structure MYTABSTRIP. At the same time, the variable NUMBER is filled with the screen number of the subscreen that has to be displayed in the subscreen area SUB of the tabstrip control
    Pls. reward if useful

  • Dynamic selectionof selection-screen

    parameters table1.
    parameters input.
    i have enter dynamic text into table1
    like table1 = vbak.
    i like to see instead of input as table1(i.e vbak) on selection-screen
    when user dynamically gives value of table1 
    help me plz
    <b></b><b></b><b></b><b></b>
    Message was edited by:
            shravan ramidi

    Hi Shravan
    declare like this
    PARAMETERS : COMPANY LIKE BSEG-BUKRS.
    or you can declare like this
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECTION-SCREEN SKIP 2.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 25(23) text-002.
    SELECT-OPTIONS: S_ebelp FOR eKPO-ebelp.
    PARAMETERS:p_lifnr LIKE ekko-lifnr .
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK b1.
    and on the editor goto Text elements then goto change mode and there goto selection texts there u declare your name which you want to display outside for user
    Reward all helpfull answers
    Regards
    Pavan

  • Issue with selection screen

    Hi ,
    I had a custom program. There i have one parameter and one select option. But when i try clicking on multiple selections it is giving me a message in the status bar saying 'Place the cursor on a selection'. And it doesn't opens up the window to enter multiple selections.
    When i double clicked on the message i get the message no DB655.
    What can be the possible error for this ??
    Thanks & Regards,
    Anuj Srivastava

    Hi Anuj,
    I tried with the same code in ECC6.0 but i am able to get the multiple selection window.How it is not working for you?Do you maintain any conditions inside the logic.
    tables:USR02.
    SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE text-h08.      "LC006++
    PARAMETERS    : p_frggr LIKE ekko-frggr OBLIGATORY.
    SELECT-OPTIONS: s_class FOR usr02-class NO INTERVALS OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK 1.                                  "LC006++
    SELECTION-SCREEN SKIP 1.                                          "LC006++
    SELECTION-SCREEN BEGIN OF BLOCK 2 WITH FRAME TITLE text-h09.       "LC006++
    LC002++
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN POSITION 40.
    PARAMETER: p_config AS CHECKBOX.
    SELECTION-SCREEN COMMENT 01(37) text-h05 FOR FIELD p_config.
    SELECTION-SCREEN END OF LINE.
    LC002++
    LC006++
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN POSITION 40.
    PARAMETER: p_grptxt AS CHECKBOX.
    SELECTION-SCREEN COMMENT  01(37) text-h07 FOR FIELD p_grptxt.
    SELECTION-SCREEN END OF LINE.
    LC006++
    SELECTION-SCREEN END OF BLOCK 2.
    Thanks.
    Ramya.

  • Can I define a vertical SELECTION-SCREEN block ?

    Hi, I started getting to know the SELECTION-SCREEN statements now, I was wondering if there's a way to define a vertical screen block instead of an horizontal one.
    Also, can I set the size of a given block ? Let's say I don't want it to extend to the right margin of the screen. Can I limit it to the middle, for instance ?
    Here's a code excerpt so you can understand a little what I'm intending to do (I want to place the operators vertically on the screen).
    SELECTION-SCREEN BEGIN OF BLOCK BOX1 WITH FRAME TITLE S_TBOX1.
      SELECTION-SCREEN BEGIN OF LINE.
        SELECTION-SCREEN COMMENT 20(10) S_COMM.
      SELECTION-SCREEN END OF LINE.
      SELECTION-SCREEN BEGIN OF BLOCK BOX2 WITH FRAME TITLE S_TBOX2.
        SELECTION-SCREEN BEGIN OF LINE.
          SELECTION-SCREEN PUSHBUTTON (3) S_PB1 USER-COMMAND 'XXX'.
          SELECTION-SCREEN PUSHBUTTON (3) S_PB2 USER-COMMAND 'XXX'.
          SELECTION-SCREEN PUSHBUTTON (3) S_PB3 USER-COMMAND 'XXX'.
          SELECTION-SCREEN PUSHBUTTON (3) S_PB4 USER-COMMAND 'XXX'.
        SELECTION-SCREEN END OF LINE.
      SELECTION-SCREEN END OF BLOCK BOX2.
      SELECTION-SCREEN BEGIN OF LINE.
        SELECTION-SCREEN PUSHBUTTON (3) S_PB5 USER-COMMAND 'XXX'.
      SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK BOX1.
    INITIALIZATION.
      S_COMM = 'CALCULATOR'.

    Ok, I thought of that but... now I need the answer for the 2nd question I posted: is it possible to limit the extension of the block, so it ends right after the 4 buttons column ?
    SELECTION-SCREEN BEGIN OF BLOCK BOX1 WITH FRAME TITLE S_TBOX1.
      SELECTION-SCREEN BEGIN OF LINE.
        SELECTION-SCREEN COMMENT 20(10) S_COMM.
      SELECTION-SCREEN END OF LINE.
      SELECTION-SCREEN BEGIN OF BLOCK BOX2 WITH FRAME TITLE S_TBOX2.
        SELECTION-SCREEN BEGIN OF LINE.
          SELECTION-SCREEN PUSHBUTTON (3) S_PB1 USER-COMMAND 'XXX'.
        SELECTION-SCREEN END OF LINE.
        SELECTION-SCREEN SKIP.
        SELECTION-SCREEN BEGIN OF LINE. 
          SELECTION-SCREEN PUSHBUTTON (3) S_PB2 USER-COMMAND 'XXX'.
        SELECTION-SCREEN END OF LINE. 
        SELECTION-SCREEN SKIP.
        SELECTION-SCREEN BEGIN OF LINE. 
          SELECTION-SCREEN PUSHBUTTON (3) S_PB3 USER-COMMAND 'XXX'.
        SELECTION-SCREEN END OF LINE. 
        SELECTION-SCREEN SKIP.
        SELECTION-SCREEN BEGIN OF LINE.
          SELECTION-SCREEN PUSHBUTTON (3) S_PB4 USER-COMMAND 'XXX'.
        SELECTION-SCREEN END OF LINE.
      SELECTION-SCREEN END OF BLOCK BOX2.
      SELECTION-SCREEN BEGIN OF LINE.
        SELECTION-SCREEN PUSHBUTTON (3) S_PB5 USER-COMMAND 'XXX'.
      SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK BOX1.
    INITIALIZATION.
      S_COMM = 'CALCULATOR'.

Maybe you are looking for

  • How to Search for a specific element in a MultiGraph?

    Hi there Im trying to implement a Multigraph ADT in Java. Multigraph is a graph that has multible edges connecting a node. I assume you all know what a Graph ADT looks like. So i think ive got all the basic methods functions of a normal graph/mulitgr

  • Regarding spool to pdf

    Hi All i have a doubt When i am converting my spool to pdf is working fine no issue but one thing i got is in my pdf doc after every some 32 char i am getting one space between my data. Can anyone tell me what can be the reason and how to rectify it.

  • FMS Service STOPS!

    Hello, This is pissing me off actually, the service is automatically stopping! FMS version is 2.0.1, i am using windows XP. I am having this problem since today only! i thought that it might be services conflict issue, so i stopped most of the servic

  • Fox-function: MAX/MIN

    Hi, I have a question on MAX/MIN-function. It is possible to find the maximum date in a column ( 0calmonth). And other problem that I don't know the syntax of the max-function. The SAP-help isn't significant. Thanks. Holger

  • Why do apps on iPad keep quitting

    OS is up to date (afraid if I check OS, I will loose page) History and cookies have been cleared. Facebook was real slow to open. Apps quit on me and screen returns to home page. battery is at 98%and the zagg keyboard is fairly new. Any ideas?