Path for Directory in Selection Screen

I have one field in selection screen Error log.
I have to pick path for dirctory in that parameter, so that I can save my error log there on that path.
how i can do it ?
F4 for the path is needed. how i will define that parameter in selection screen?

Hi
Check the below logic:
DATA :G_DIR1 TYPE STRING.
DATA : G_T_FILENAMES TYPE SETST_TYPE_STANDARD_TABLE,
       G_WA_FILES LIKE LINE OF G_T_FILENAMES.
PARAMETERS: P_FOLDER TYPE RLGRAP-FILENAME OBLIGATORY
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FOLDER.
  PERFORM F1000_GET_DIR.
START-OF-SELECTION.
  IF G_DIR IS INITIAL.
    G_DIR = P_FOLDER.
  ENDIF.
PERFORM F1100_GET_FILENAMES USING G_DIR.
FORM F1000_GET_DIR .
CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_BROWSE
    EXPORTING
      WINDOW_TITLE         = 'Folder for ADP Files'
      INITIAL_FOLDER       = G_DIR1
    CHANGING
      SELECTED_FOLDER      = G_DIR1
    EXCEPTIONS
      CNTL_ERROR           = 1
      ERROR_NO_GUI         = 2
      NOT_SUPPORTED_BY_GUI = 3
      OTHERS               = 4.
  IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ELSE.
    P_FOLDER = G_DIR1.
  ENDIF.
ENDFORM.
FORM F1100_GET_FILENAMES  USING    P_DIR.
  DATA : L_DIR TYPE STRING,
            L_COUNT TYPE I,
            L_COUNT1 TYPE I.
  DATA : L_T_FILES TYPE SETST_TYPE_STANDARD_TABLE,
         WA_FILES LIKE LINE OF L_T_FILES.
  L_DIR = P_DIR.
  CLEAR : G_T_FILENAMES[], G_T_FILENAMES.
  CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_LIST_FILES
    EXPORTING
      DIRECTORY                   = L_DIR
   FILTER                      = '.'
   FILES_ONLY                  =
   DIRECTORIES_ONLY            =
    CHANGING
      FILE_TABLE                  = L_T_FILES
      COUNT                       = L_COUNT
    EXCEPTIONS
      CNTL_ERROR                  = 1
      DIRECTORY_LIST_FILES_FAILED = 2
      WRONG_PARAMETER             = 3
      ERROR_NO_GUI                = 4
      NOT_SUPPORTED_BY_GUI        = 5
      OTHERS                      = 6
  IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  G_T_FILENAMES[] = L_T_FILES[].
  LOOP AT G_T_FILENAMES INTO G_WA_FILES.
    IF G_WA_FILES CS SY-DATUM.
      G_WA_FILES1 = G_WA_FILES.
      APPEND G_WA_FILES1 TO G_T_FILENAMES1.
    ENDIF.
  ENDLOOP.
Regards,
Ravinder

Similar Messages

  • How can i set dynamice for week on Selection screen..pls help me..Urgent

    Hi..All
    please Help me .. i am very  confused..
    i need to set a varient for week which is dynamic on selection screen.
    b) Week from current week to current week + 2. (<b>Dynamic selection)</b>how can i set dynamice for week on Selection screen,,
    how can i do this..i am alrady set dynamice variant for Date.. there is option for D.. but in case of week there is a no option.
    pls help me..urgent
    thamks in advance.
    mayukh

    Hi,
    I think the way out is use the dynamic select option while setting up the varinat and use sy-datum to sy-datum+9 which should essentially serve the purpose.
    While saving the variant, for that particular date field check the Selection variable checkbox, then Choose D
    option and then choose current days + or - option from there.
    Rgds,
    HR

  • 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

  • F4 help for file on selection screen thro objects

    Hi Every one,
    this report is working , but as i am working ECC6.0 it is showing the obsolete statements
    how to rectify it .
    pls anybody let me know,
    tables rlgrap.
    TYPES : BEGIN OF TAB,
    MATNR TYPE MATNR ,
    MTART TYPE MTART,
    END OF TAB.
    DATA : ITAB TYPE  STANDARD TABLE OF TAB ,
           WTAB TYPE TAB.
    data: it_tab type filetable,
          gd_subrc type i.
    data : file0 type string.
    selection-screen begin of block m with frame.
        select-options: so_fpath for rlgrap-filename.
    selection-screen end of block m.
    data wfile like line of so_fpath.
    at selection-screen on value-request for so_fpath-low.
    REFRESH: it_tab.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
        EXPORTING
            WINDOW_TITLE = 'Select File'
            DEFAULT_FILENAME = '*.txt'
            MULTISELECTION = 'X'
        CHANGING
            FILE_TABLE = it_tab
            RC = gd_subrc.
    loop at it_tab into so_fpath-low.
       so_fpath-sign = 'I'.
       so_fpath-option = 'EQ'.
           append  so_fpath.
    endloop.
    move so_fpath+3 to file0.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = FILE0
       FILETYPE                      = 'ASC'
       HAS_FIELD_SEPARATOR           = 'X'
      TABLES
        DATA_TAB                      = Itab
    EXCEPTIONS
       FILE_OPEN_ERROR               = 1
       FILE_READ_ERROR               = 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.
    end-of-selection.
    write :/ file0.
    loop at itab into  wtab.
    write :/ wtab-matnr.
    endloop.
    its urgent please...

    See the below ex:change file parameter type .
      DATA: VFILE TYPE STRING.
      DATA: FL(1).
    DATA: L_FILETAB     TYPE FILETABLE,
          L_FILETAB_H   TYPE FILETABLE WITH HEADER LINE,
          INITIAL_DIR_PATH TYPE STRING,
          L_RC          TYPE I.
    SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    *PARAMETERS: FNAME LIKE RLGRAP-FILENAME OBLIGATORY.
    PARAMETERS: FNAME TYPE LOCALFILE OBLIGATORY.
    SELECTION-SCREEN: END OF BLOCK B1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR FNAME.
    REFRESH L_FILETAB.
      INITIAL_DIR_PATH = 'C:\'.
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
        EXPORTING
        WINDOW_TITLE            = 'Select the Asset Master Data file'
       DEFAULT_EXTENSION       =
       DEFAULT_FILENAME        =
        FILE_FILTER             = 'Text Files (.TXT)|.TXT|'
        INITIAL_DIRECTORY       = INITIAL_DIR_PATH
          MULTISELECTION          = SPACE
       WITH_ENCODING           =
        CHANGING
          FILE_TABLE              = L_FILETAB
          RC                      = L_RC
       USER_ACTION             =
       FILE_ENCODING           =
        EXCEPTIONS
          FILE_OPEN_DIALOG_FAILED = 1
          CNTL_ERROR              = 2
          ERROR_NO_GUI            = 3
          NOT_SUPPORTED_BY_GUI    = 4
          OTHERS                  = 5
      IF SY-SUBRC <> 0.
        WRITE:/ 'Error while selecting the input file'.
      ELSE.
        LOOP AT L_FILETAB INTO L_FILETAB_H.
          FNAME = L_FILETAB_H-FILENAME.
          EXIT.
        ENDLOOP.
      ENDIF.
      FILE = FNAME.
    CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
         FILENAME                      = VFILE
         FILETYPE                      = 'ASC'
         HAS_FIELD_SEPARATOR           = 'X'
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
        DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
      VIRUS_SCAN_PROFILE            =
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
        TABLES
          DATA_TAB                      = I_TAB
       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.

  • How Can i SEt Dynamic Variant For WEEK on SELECTION Screen.pls help me..

    <b>Hi ALL..
    Pls Help Me for this Problem..i am very confused how can i do that...plese tell me proper process..
    i  want set Dynamice Varient for WEEK on Selection screen..
    I have ALrady SET Dynamice Varient for DATE on Selection Screen.ther isd option is D...but in case of WEEK there is a no option...
    Plese help me..
    thaks in advance..
    pls help me..</b>

    Hello,
    Define your select-option in TVARV (assume Z_THISWEEK). And use a program like:
    DATA:
      zlv_week TYPE KWEEK.
    call function 'DATE_GET_WEEK'       
       exporting date = syst-datum
       importing week = zlv_week.
    SELECT SINGLE *
          FROM tvarvc
         WHERE name = 'Z_THISWEEK'
           AND type = 'S'
           AND numb = '0000'.
    tvarvc-low = zlv_week.
    IF syst-subrc <> 0.
        tvarvc-name     = 'Z_THISWEEK'.
        tvarvc-type     = 'S'.
        tvarvc-opti     = 'EQ'.
        tvarvc-sign     = 'I'.
        tvarvc-numb     = '0000'.
        insert tvarvc.
    ELSE.
      update tvarc.
    ENDIF.
    Regards,
    John.

  • How to define f4 help for parameters in selection screen.

    Hi Folks,
    I have declared parametrs of type RLGRAP-FILENAME  and i want to select the path for the application server file by pressing f4 during run time , not like typing the path in the field input. Pls help me how to do that.
    Thanks in advance.
    Regards
    Rajesh

    Hai Rajesh
    DATA: I_FILETABLE TYPE FILETABLE,
          V_RC TYPE I.
    PARAMETERS: P_FILE LIKE RLGRAP-FILENAME.     "local file with contracts
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
       EXPORTING
         WINDOW_TITLE            = 'Find File'
         DEFAULT_EXTENSION       = 'C:\'
         DEFAULT_FILENAME        = ''
         FILE_FILTER             = ',..'
       INITIAL_DIRECTORY       =
       MULTISELECTION          =
       WITH_ENCODING           =
      CHANGING
        FILE_TABLE               = I_FILETABLE
        RC                       = V_RC
       USER_ACTION             =
       FILE_ENCODING           =
      EXCEPTIONS
        FILE_OPEN_DIALOG_FAILED = 1
        CNTL_ERROR              = 2
        ERROR_NO_GUI            = 3
        NOT_SUPPORTED_BY_GUI    = 4
        others                  = 5
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    READ TABLE I_FILETABLE INTO P_FILE INDEX 1.
    Thanks & regards
    Sreenivasulu P

  • How to create a F4 help for a report selection screen field

    hi,
    can any one guide me to create F4 help for a field in a selection screen in a report program,plz give me a sample code

    hi,
    Here are the following ways
    1.with the help of match code objects we can create the F4 Functionality for Field.
    Syntax is :
    PARAMETERS: p_org LIKE t527x-orgeh MATCHCODE OBJECT zorg.
    2. One more thing is we can do it with Search Help's also.
    3. Even we can do it HELP Views also.
    Help Views:
    You have to create a help view if a view with outer join is needed as selection method of a search help
    The selection method of a search help is either a table or a view. If you have to select data from several tables for the search help, you should generally use a database view as selection method. However, a database view always implements an inner join. If you need a view with outer join for the data selection, you have to use a help view as selection method.
    All the tables included in a help view must be linked with foreign keys. Only foreign keys that have certain attributes can be used here. The first table to be inserted in the help view is called the primary table of the help view. The tables added to this primary table with foreign keys are called secondary tables.
    The functionality of a help view has changed significantly between Release 3.0 and Release 4.0. In Release 3.0, a help view was automatically displayed for the input help (F4 help) for all the fields that were checked against the primary table of the help view. This is no longer the case in Release 4.0.
    As of Release 4.0, you must explicitly create a search help that must be linked with the fields for which it is offered (see Linking Search Helps with Screen Fields ).
    Existing help views are automatically migrated to search helps when you upgrade to a release higher than 4.0.
    A help view implements an outer join, i.e. all the contents of the primary table of the help view are always displayed. You therefore should not formulate a selection condition for fields in one of the secondary tables of the help view. If records of these secondary tables cannot be read as a result of this selection condition, the contents of the corresponding fields of the secondary table are displayed with initial value.
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Feb 15, 2008 3:15 PM

  • Authorization object for plant on selection-screen

    Hi All,
    I need to cehck the authorization object for plant on sleection screen..the palnt is select-options.
    I have written the code
    Declaration of local constants.
      CONSTANTS : lc_i(1)  TYPE c VALUE 'I',
                  lc_eq(2) TYPE c VALUE 'EQ'.
      REFRESH : r_werks.
      LOOP AT s_werks.
        IF s_werks-low IS NOT INITIAL.
          AUTHORITY-CHECK OBJECT 'M_MATE_WRK'                "Check if the user has autorization for the plant.
                               ID 'ACTVT' FIELD '03'
                               ID 'WERKS' FIELD s_werks-low.
          IF sy-subrc NE 0.
            r_werks-sign   = lc_i.
            r_werks-option = lc_eq.
            r_werks-low    = s_werks-low.
            APPEND r_werks.
          ENDIF.
        ENDIF.
      ENDLOOP.
      LOOP AT s_werks.
        IF s_werks-high IS NOT INITIAL.
          AUTHORITY-CHECK OBJECT 'M_MATE_WRK'                "Check if the user has autorization for the plant.
                               ID 'ACTVT' FIELD '03'
                               ID 'WERKS' FIELD s_werks-high.
          IF sy-subrc NE 0.
            r_werks-sign   = lc_i.
            r_werks-option = lc_eq.
            r_werks-low    = s_werks-high.
            APPEND r_werks.
          ENDIF.
        ENDIF.
      ENDLOOP.
    My doubt is will the authorization will check the plants in between 1001 and 2001..suppose i have pplants 1001,1002,1003,1004,2001..Now will the above code will check for all the plants or only 1001 and 2001 if i specify in the select-options.
    Regards,
    raj

    Hi Raj
    First no need to LOOP AT s_werks and check s_werks-high as it will always be present only once in the table s_werks.
    Do this
    SELECT werks FROM t001w INTO li_werks
    WHERE werks IN s_werks.
    LOOP AT li_werks.
    *check your authority thing here and fill the range
    ENDLOOP.
    Pushpraj

  • Enabling Key and text for the Variable Selection screen

    I need to display key and text for a characteristic when selecting the drop down menu in the variable selection screen of a web report. In the Business Explorer tab within the info-object, I changed the General Settings to display Key and text, but when I open the drop down menu for this characteristic, it is still displaying the key only. Is there some other place where this change needs to happen?

    Hi,
    Did you try to log out and log in again into BEx?
    Best regards,
    Eugene
    Message was edited by: Eugene Khusainov

  • Error message for ranges in selection screen

    Hi
    i have this select option statement
    SELECT-OPTIONS: s_fevor FOR afko-fevor.
    i have written this code for error message display...
    AT SELECTION-SCREEN ON S_FEVOR.
    I_FEVOR-SIGN = 'I'.
    I_FEVOR-OPTION = 'EQ'.
    I_FEVOR-LOW = S_FEVOR.
    I_FEVOR-HIGH = S_FEVOR.
    IF not I_FEVOR-LOW EQ s_FEVOR .
    SELECT  FEVOR
         FROM AFKO
           INTO S_FEVOR
             WHERE FEVOR = S_FEVOR.
                UP TO 1 ROWS.
    ENDSELECT.
    IF SY-SUBRC NE 0.
    MESSAGE E000.
    ENDIF.
    ENDIF.
    if i enter the correct data then also it is giving error message
    how to solve this?
    Regards
    Smitha

    Hi,
    Refer this code:-
    SELECT-OPTIONS: s_fevor FOR afko-fevor.
    DATA : BEGIN OF t_fevor OCCURS 0,
             fevor TYPE afko-fevor,
           END OF t_fevor.
    AT SELECTION-SCREEN FOR s_fevor.
      s_fevor-sign = 'I'.
      s_fevor-option = 'EQ'.
      s_fevor-low = S_FEVOR.
      s_fevor-high = S_FEVOR.
      APPEND s_fevor.
      CLEAR s_fevor.
      IF NOT s_fevor-low IN s_fevor.
        SELECT fevor
              FROM afko
              INTO TABLE t_fevor
              WHERE fevor IN s_fevor.
        IF sy-subrc NE 0.
          MESSAGE e000.
        ENDIF.
      ENDIF
    Hope this helps you.
    Regards,
    Tarun

  • F4 help for timestamp on selection screen

    Hi experts!
    I have this code in custom ALV report:
    selection-screen: begin of block b1 with frame title text-t01.
    DATA: w_aux_sc_created_at like ztable-sc_created_at.
    SELECT-OPTIONS s_sc_c02 for w_aux_sc_created_at.
    Ztable-sc_created_at is COMT_CREATED_AT_USR (data element)
    COMT_CREATED_AT_USR is standard data type (DEC, lenght 15) domain COM_TSTMP --> UTC Time Stamp Short Form (YYYYMMDDhhmmss) (Output sy-zonlo)
    Ok, I would like to show a calendar for select date in my SELECT-OPTIONS custom ALV report like MATCHCODE OBJECT.
    A lot of thanks in advance.
    Best regards.
    djlu
    Moderator message: please use more descriptive subject lines from now on, changed for you this time
    Edited by: Thomas Zloch on Nov 8, 2010 9:44 AM

    thanks you for your answer but I fixed it.
    I created a select-options in date form (with F4 help) and I convert it to timestamp for my select sentence.
    Regards

  • How to adjust mouse or trackpad parameters for the user selection screen?

    This is not critical, but annoying.  I can change the mouse or trackpad parameters by user, so anyone can use their own mouse or trackpad adjustment.  However I can not locate how to change this parameters for the welcome or user selection screen.  In my case I have two users, both of us use the trackpad with the one touch for click function, so no one press physically the trackpad for a click.  However, as the default parameter is the touch function deactivated we have to actually click the trackpad in that exclusive screen.
    Another example with mouse, normally we use the mouse with almost double of the default acceleration, but when in the user selection screen the mouse assumes default configuration and feels super SLOWWWWWWW.
    Again, this is not critical, but would be very nice to be able to modify this parameters in the welcome screen.
    Tyrone Carrion

    For the login screen, you are not associated with a normal user, but the system defaults...try logging in to the Admn account and change the behavior there...those settings should then apply to the login screen.

  • Need solution for the following(Selection Screen)

    Hi all,
    currently iam working with report program,there i need to populate one field in the selection screen based on the another parameter in the same selection screen.
    iam having field called work center as a parameter with the search help.
    This search help is providing the corresponding plant for the particular work center.
    Now what i need to do is,if i select the work center thru F4 help,i need the correseponding plant to get populated in the other textbox.
    Currently iam having that work center field as parameter,
    now i need another textbox for the plant adjacent to this workcenter textbox,in this textbox only i need that corresponding plant.
    Following is the code for that workcenter textbox.
    PARAMETERS:P_ARBPL LIKE CRHD-ARBPL MATCHCODE OBJECT CRAM.
    Note: The Serach help CRAM is having corresponding  plant with the workcenter.

    Hi swaminathan,
    1. If u want to DIRECTLY
       populate other fields
       based upon selection,
      then we have to use our own
      selection function.
    2. just copy paste this code in new program.
      ( it will display help for BUKRS
      and AS SOON AS the user selects some company code,
      the other fields
      get populated AUTOMATICALLY)
    3.
    REPORT abc.
    DATA : dd     LIKE     TABLE OF dselc WITH HEADER LINE. "*--- IMPORTANT
    DATA : ft     LIKE     TABLE OF dfies WITH HEADER LINE.
    DATA : t001 LIKE TABLE OF t001 WITH HEADER LINE.
    PARAMETERS : bukrs LIKE t001-bukrs .
    PARAMETERS : butxt LIKE t001-butxt.
    PARAMETERS : ort01 LIKE t001-ort01.
    PARAMETERS : waers LIKE t001-waers.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR bukrs.
       SELECT * FROM t001 INTO TABLE t001.
    IMPORTANT
       REFRESH dd.
       dd-fldname = 'BUTXT'.
       dd-dyfldname = 'BUTXT'.
       APPEND dd.
       dd-fldname = 'ORT01'.
       dd-dyfldname = 'ORT01'.
       APPEND dd.
       dd-fldname = 'WAERS'.
       dd-dyfldname = 'WAERS'.
       APPEND dd.
    *------- IMPORTANT
       REFRESH ft.
       ft-tabname  = 'T001'.
       ft-fieldname = 'BUTXT'.
       APPEND ft.
       ft-tabname  = 'T001'.
       ft-fieldname = 'WAERS'.
       APPEND ft.
       ft-tabname  = 'T001'.
       ft-fieldname = 'ORT01'.
       APPEND ft.
       CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
         EXPORTING
          ddic_structure  = 'T001'   "*----- IMPORTANT IF STANDARD STRUCT
           retfield        = 'BUKRS'
           dynpprog        = sy-repid
           dynpnr          = sy-dynnr
           dynprofield     = 'BUKRS'
           value_org       = 'S'
         TABLES
           field_tab       = ft "*---- IMPORTANT
           value_tab       = t001
           dynpfld_mapping = dd   "* IMPORTANT
         EXCEPTIONS
           parameter_error = 1
           no_values_found = 2
           OTHERS          = 3.
    regards,
    amit m.

  • User exists for changing the selection screen of the transaction CS11

    Hi,
    I want to change the selection screen of the transaction cs11 and modify the ALV output.
    I searched the old forums but not got satisfactry results.
    I want to change the plant and material from the parameter to the select option.
    i dont want to copy the transaction for the zcs11.
    any suggestion on this ?
    Regards,
    udupi

    one more requirement i have is that, i need to remove all the header fields such as material , plant etc and place that field in the item level. i can use the user exists PCSD0002 for the adding the customer field in the item. but how can i removed the header level field such as plant and material. whether we have any user exits for that?

  • F4 for field at selection screen

    Hi all.
    I have a field at selection screen without any standard F4 on it.
    SELECT-OPTIONS: S_EXCMSG FOR  T458A-AUSKT.        "Exception message
    How can I implement F4 for this field?
    Thanks,
    Rebeka

    Hi,
    Try using the FM " F4IF_INT_TABLE_VALUE_REQUEST "
    A Sample Examle:
    REPORT  Z_TEST_F4_HELP.
    TABLES: ZEMPLOYEE,MARA.
    DATA: BEGIN OF ITAB OCCURS 0,
           ENO LIKE ZEMPLOYEE-ENO,
           ENAME LIKE ZEMPLOYEE-ENAME,
           EAGE LIKE ZEMPLOYEE-EAGE,
           SALARY LIKE ZEMPLOYEE-SALARY,
           END OF ITAB.
    PARAMETERS: P_ENO LIKE ZEMPLOYEE-ENO,
                P_MATNR LIKE MARA-MATNR.
    TYPES: BEGIN OF ts_mara,
    matnr TYPE matnr,
    ersda TYPE ersda,
    ernam TYPE ernam,
    END OF ts_mara.
    DATA : lt_mara TYPE TABLE OF ts_mara.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MATNR.
    SELECT MATNR ERSDA ERNAM FROM MARA INTO TABLE LT_MARA UP TO 10 ROWS.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
      EXPORTING
      DDIC_STRUCTURE         = ' '
        RETFIELD               = 'MATNR'
      PVALKEY                = ' '
       DYNPPROG               = SY-CPROG
       DYNPNR                 = SY-DYNNR
       DYNPROFIELD            = 'P_MATNR '
      STEPL                  = 0
      WINDOW_TITLE           =
      VALUE                  = ' '
       VALUE_ORG              = 'S'
      MULTIPLE_CHOICE        = ' '
      DISPLAY                = ' '
      CALLBACK_PROGRAM       = ' '
      CALLBACK_FORM          = ' '
      MARK_TAB               =
    IMPORTING
      USER_RESET             =
      TABLES
        VALUE_TAB              = LT_MARA
      FIELD_TAB              =
      RETURN_TAB             =
      DYNPFLD_MAPPING        =
    EXCEPTIONS
       PARAMETER_ERROR        = 1
       NO_VALUES_FOUND        = 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.
    Regards,
    Ruthra

Maybe you are looking for

  • Filter Object with Filter Expression error.

    Hello everyone! I'm trying to put together the following expression for a filter to be used in a report: Order Date -> object name = M1 - (number, measure) Current Date -> object name = M2 - (number, measure) Comparison between the two: <EXPRESSION>

  • SunMC Console on a Mac?

    Hi there, Just wondering, did anybody try running the Console on a Mac with OSX? I'd love to be able to monitor the network with my Mac ;-) Regards, Emerald

  • Performance Monitoring and WLS 8.1 SP3

    I've already send this question to "weblogic.developer.interest.management" with no answer. Maybe it was the wrong group so I try again here. Should I open a case to BEA support ? I'm trying to use the performance monitoring tool on a WLS 8.1 SP3 ser

  • Using Powershell to attach PST files

    I have used PowerShell to attach PST files to outlook in the past. Is there a way to write a script that would attach all PST files in a target folder to outlook?

  • Export Windows Outlook 2003 notes into Entourage

    Is there a way to export notes from Windows outlook and import into Entourage. I tried Google for days. Its surprising that Microsoft would miss a feature like that. I have about 3977 important notes. I got an iMac to replace the windows machine. App