Odd behaviour with parameter id on selection screen

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

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

Similar Messages

  • Parameter on the selection screen

    Hi All,
    I have a check box and a parameter on the selection screen. If the checkbox is initial, the paramter shouldn't be editable but if the checkbox is ticked, the parameter should be made mandatory to be enetered with value. How can this be done ?
    Thanks in advance.

    Hi,
    Refer to the following code.In this change radiobuttons with the checkbox.
    SELECTION-SCREEN BEGIN OF BLOCK B1.
    parameters: p_erdat like zirpactivity-erdat modif id SC1 ,
                r1 radiobutton group RAD1 user-command ABC default 'X',
                r2 radiobutton group RAD1.
    SELECTION-SCREEN END OF BLOCK B1.
    AT SELECTION-SCREEN.
      check sy-ucomm = 'ABC'.
      check sy-ucomm = 'F8'.
    AT SELECTION-SCREEN OUTPUT.
      loop at screen.
        if  r1 = 'X' and screen-group1 = 'SC1' .
          screen-input = 0.
        ENDIF.
        IF r2 = 'X'.
               screen-group1 = 'SC1'  .
          screen-input = 1.
        endif.
        modify screen.
      endloop.
    Hope this helps.
    Reward if helpful.'
    Regards,
    Sipra

  • Report - parameter name in selection screen

    Hi,
    I am working with a report and in that I am using a parameter for my selection screen.
    Parameter : lifnr like lfa1-lifnr.
    My question is: when i execute the program i see in the selection sreen 'Lifnr'. How to get a text say 'Vendor no.' instead of LIFNR in selection screen.
    Thanks

    Hi,
    Go to the TEXT ELEMENTS of the program from the SE38 screen. Click on the SELECTION TEXTS tab, and you can give whatever desription you want for the selection screens here.
    If you want the description from the data dictionary just check the check box on the right hand side.
    Regards,
    Ravi
    Note : Please mark the helpful answers

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

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

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

  • Podcast exhibiting odd behaviour with bluetooth

    Ever since updating to iOS6 / iPhone 5 i've been experiencing odd behaviour with music playback. Now that the Podcasts app is a requirement, i'm not sure if this is directly related to the Podcasts app or if it's an iOS 6 quirk.
    My iPhone connects to my car's stereo head unit via bluetooth. When i start my car it automatically connects and music, phone calls, etc, are all forwarded to my car's speakers. When i would switch my car off, music would stop automatically and i'd get out of my car and go about my day.
    Everything worked absolutely perfectly in iOS 5 with the 4S.
    The issue now with iOS6/iP5 is that when i switch off my car and use Siri or make a phone call, after i stop using Siri or if i end my call, the Podcasts app automatically resumes playback of what ever i was listening to when i switched my car off... Essentially it blasts music at me through the internal iPhone speaker for absolutely no reason.
    Here is a step by step,
    1. Start car
    2. Play music
    3. Turn off car
    4. Music automatically stops
    5. (while at the office, away from my car) Use siri or make a phone call
    6. When i end the call or stop using Siri, music automatically resumes via the iPhone internal speaker
    Is there any way to fix this?? It's getting quite annoying to have my iPhone blast me with music in fairly inappropriate situations.

    Disregard, there is a thread about it here: https://discussions.apple.com/thread/4346946?tstart=0
    Can't see any way of deleting my thread unfortunately.

  • Set the parameter in the selection screen of a program from another program

    Hi ALL,
    I need to call the program RHALESMD from another program and the program RHALESMD takes from date as one of the input parameter.how do i set the from date from the calling program and call RHALESMD
    Thanks
    Bala Duvvuri

    i got the answer
    Program accessed
    REPORT report1.
    DATA text TYPE c LENGTH 10.
    SELECTION-SCREEN BEGIN OF SCREEN 1100.
      SELECT-OPTIONS: selcrit1 FOR text,
                      selcrit2 FOR text.
    SELECTION-SCREEN END OF SCREEN 1100.
    Calling program
    REPORT report2.
    DATA: text       TYPE c LENGTH 10,
          rspar_tab  TYPE TABLE OF rsparams,
          rspar_line LIKE LINE OF rspar_tab,
          range_tab  LIKE RANGE OF text,
          range_line LIKE LINE OF range_tab.
    rspar_line-selname = 'SELCRIT1'.
    rspar_line-kind    = 'S'.
    rspar_line-sign    = 'I'.
    rspar_line-option  = 'EQ'.
    rspar_line-low     = 'ABAP'.
    APPEND rspar_line TO rspar_tab.
    range_line-sign   = 'E'.
    range_line-option = 'EQ'.
    range_line-low    = 'H'.
    APPEND range_line TO range_tab.
    range_line-sign   = 'E'.
    range_line-option = 'EQ'.
    range_line-low    = 'K'.
    APPEND range_line TO range_tab.
    SUBMIT report1 USING SELECTION-SCREEN '1100'
                   WITH SELECTION-TABLE rspar_tab
                   WITH selcrit2 BETWEEN 'H' AND 'K'
                   WITH selcrit2 IN range_tab
                   AND RETURN.
    Thanks
    Bala Duvvuri

  • Input help required for parameter on the selection screen

    hi all,
    i have created two parameters on the selection screen.
    1. deptno
    2.empname
    so my requirement is if i input any deptno then i should get all
    the empname corresponding to that deptno in the parameter empname
    ie for deptno 10 there should be f4 help for empname.
    here i am pasting my code plz check where i am doing wrong--
    *& Report  ZTEST10
    *& Developer
    *& Date:   &DATE
    REPORT  ZTEST10.
    tables: zemployee1.
    parameters: p_deptno like zemployee1-deptno,
                p_empnam like zemployee1-empname.
    Data: begin of itab occurs 0,
           deptno like zemployee1-deptno,
           empname like zemployee1-empname,
           empno like zemployee1-empno,
           end of itab.
    At selection-screen on value-request for p_empnam.
    select empname
            from zemployee1
            into corresponding fields of table itab
            where deptno = p_deptno.
        CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
          EXPORTING
          DDIC_STRUCTURE         = ' '
            retfield               = 'empname'
          PVALKEY                = ' '
           DYNPPROG               = sy-repid
           DYNPNR                 = sy-dynnr
          DYNPROFIELD            = 'p_empnam'
          STEPL                  = 0
          WINDOW_TITLE           =
          VALUE                  = ' '
          VALUE_ORG              = 'C'
          MULTIPLE_CHOICE        = ' '
          DISPLAY                = ' '
          CALLBACK_PROGRAM       = ' '
          CALLBACK_FORM          = ' '
          MARK_TAB               =
        IMPORTING
          USER_RESET             =
          tables
            value_tab              = itab
          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.
    I will award ur efforts.
    Thanks
    sanjeev

    Hi Sanjeev,
    If you input any deptno and you should get all the empname corresponding then first you need to use CALL FUNCTION 'DYNP_VALUES_READ'.
    EXPORTING
        DYNAME                         = sy-repid
        DYNUMB                         = sy-dynnr
      TRANSLATE_TO_UPPER             = ' '
       REQUEST                        = 'A'
      PERFORM_CONVERSION_EXITS       = ' '
      PERFORM_INPUT_CONVERSION       = ' '
      DETERMINE_LOOP_INDEX           = ' '
      TABLES
        DYNPFIELDS                     = gt_dynp
    declare: DATA : gt_dynp LIKE dynpread OCCURS 0.
    loop at gt_dynp into wt_dynp where fieldname = 'P_SUPRID-LOW'.
      lv_low = wt_dynp-fieldvalue.
      endloop.
    Then while selecting use this p_superid-low instead of p_deptno.
    Then :
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    After this funtion module:
    write:
      IF sy-subrc = 0.
        READ TABLE itab
    INDEX 1.
        'p_empnam' = return_tab-fieldval.
    Declare return_tab as:
        DATA: return_tab   LIKE ddshretval OCCURS 0 WITH HEADER LINE.
    Thanks,
    Shweta
      ENDIF.

  • How to maximise the length of the Parameter text on Selection screen

    Hello,
    I am putting the text in the selection screen for a Parameter.
    Its text is long and it is not letting me to put the whole text in Text Symbol.
    In the report
    When I click on GOto--> Text Elements --> Selection Texts  
    I am sure there is a way we can maximise this...
    ANy suggestions will be apprecaiated.
    Regards,
    Kittu

    Hello,
    Thank you for all your response!
    Here is my code :
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME.
    PARAMETERS : BOTH  RADIOBUTTON GROUP RG1,
                 EXICLASS RADIOBUTTON GROUP RG1.
    SELECTION-SCREEN END OF BLOCK B2.
    Here for Both, I need to add the selction text as  'BOTH Existing and Non-existing Classifications'
    This is a parameter, can any body explain me how to do it with the Parameters.
    Any suggestions will be appreciated.......
    Regards,
    Kittu

  • Creating F4 help with customized values in selection screen

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

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

  • Ho to disabled the parameter on the selection screen

    Hi all,
    I have a parameter (p_matnr)  and two radiobutton b1 and b2 on the selection screen. Now what the requirement is if user selects radio button b2, the parameter should get disabled. I know it can be done by <b>loop at screen</b> and then modifying the screen but in this case start-of-seection is to be called. In my case as the user selects the radio button b2 the parameter should be appear disabled. the code which is given below will work in that case where user selects the b2 and then press F8. Bu i don't want the user to pres F8. He will only select the b2 and will find the parameter (p_matnr) disabled.
    Please suggest something.
    AT SELECTION-SCREEN outpu.
    IF b2 = 'X'.
    LOOP AT SCREEN.
    IF screen-name cs 'p1' .
    screen-input = 0.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    ENDIF.
    Thanks,
    Annup.

    Hi,
    Try this i have used this in my code
    SELECTION-SCREEN BEGIN OF BLOCK b_0 WITH FRAME TITLE text-002.
    SELECTION-SCREEN BEGIN OF BLOCK b_1 WITH FRAME TITLE text-000.
    PARAMETERS:      rb_img    RADIOBUTTON GROUP rad1 user-command rad.
    PARAMETERS:      rb_invo   RADIOBUTTON GROUP rad1.
    SELECTION-SCREEN BEGIN OF BLOCK b_2 WITH FRAME TITLE text-001.
    *PARAMETERS:      rb_img    RADIOBUTTON GROUP rad1.
    PARAMETERS:      p_from    like bkpf-bldat modif id gr2,
                     p_to      like bkpf-bldat modif id gr2.
    SELECT-OPTIONS:  s_arobj  FOR   toa01-ar_object modif id gr2.
    SELECTION-SCREEN END OF BLOCK b_2.
    SELECTION-SCREEN BEGIN OF BLOCK b_3 WITH FRAME TITLE text-001.
    *PARAMETERS:      rb_invo   RADIOBUTTON GROUP rad1.
    SELECT-OPTIONS:  s_bukrs   FOR bkpf-bukrs modif id gr1,
                     s_belnr   FOR bkpf-belnr modif id gr1,
                     s_gjahr   FOR bkpf-gjahr modif id gr1,
    SELECTION-SCREEN END OF BLOCK b_3.
    SELECTION-SCREEN END OF BLOCK b_0.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF screen-group1 = 'GR1'.   "Name field
          IF rb_invo  = space.
            screen-active = 0.
          ELSE.
            screen-active = 1.
          ENDIF.
          MODIFY SCREEN.
        ELSEIF screen-group1 = 'GR2'.
          IF rb_invo  = c_x.
            screen-active = 0.
          ELSE.
            screen-active = 1.
          ENDIF.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    START-OF-SELECTION.
    Thanks & Regards,
    Judith.

  • How to fill another parameter automatically on selection screen?

    Hello Friends,
    I have two parameters on selection screen.
    Date
    ID
    When I do F4 for Date parameter, By calling following function it gives me date and ID value
      CALL FUNCTION 'F4_ZAHLLAUF'
       EXPORTING
         F1TYP               = 'D'
         F1NME               = ' '
         F2NME               = 'F110V-LAUFI'
         DISPLAY_LAUFK       = 'X'
         EXPLAIN_LAUFK       = ' '
       IMPORTING
         LAUFD               = v_laufd
         LAUFI               = v_laufi.
    All I need is when I do F4, It should automatic fill the ID parameter.
    Note : Date parameter filled automatically by doing F4.
    Please give me an example.
    Regards,
    RH

    interesting... if I try than it works
    can you copy the code here?
    Again, again, again: the importing parameters (f1nme and f2nme) of the FM has to get the names of the two selection screen fields for the payment run and date, the DYNP_VALUE_UPDATE FM will be called inside the F4_ZAHLLAUF FM in this case
    modified source code of Max:
    PARAMETERS: V_LAUFD TYPE F110V-LAUFD,
                V_LAUFI TYPE F110V-LAUFI.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR V_LAUFD.
    *  DATA: DYNAME     LIKE  D020S-PROG,
    *        DYNUMB     LIKE  D020S-DNUM,
    *        DYNPFIELDS TYPE  TABLE OF DYNPREAD WITH HEADER LINE.
      CALL FUNCTION 'F4_ZAHLLAUF'
           EXPORTING
                F1TYP         = 'D'
                F1NME         = 'V_LAUFD'
                F2NME         = 'V_LAUFI'
                DISPLAY_LAUFK = 'X'
                EXPLAIN_LAUFK = ' '
           IMPORTING
                LAUFD         = V_LAUFD
                LAUFI         = V_LAUFI.
    *  DYNAME = SY-REPID.
    *  DYNUMB = SY-DYNNR.
    *  DYNPFIELDS-FIELDNAME  = 'V_LAUFI'.
    *  DYNPFIELDS-FIELDVALUE = V_LAUFI.
    *  APPEND DYNPFIELDS.
    *  CALL FUNCTION 'DYNP_VALUES_UPDATE'
    *       EXPORTING
    *            DYNAME     = DYNAME
    *            DYNUMB     = DYNUMB
    *       TABLES
    *            DYNPFIELDS = DYNPFIELDS.

  • Problem with checkbox in the selection screen

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

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

  • Issue with tabbed block in selection screen

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

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

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

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

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

  • Adding new parameter in ME28 selection screen

    Hi All,
    Did anyone know how to add in a new parameter(select-options) in ME28 selection screen?
    I'm only able found one enhancement for this requirement.
    In program
    i create a new implementation for ENHANCEMENT-POINT RM06EF00_02 and write the
    For eg:
    PARAMETERS:     p_matnr LIKE mara-matnr.
    The new parameter displayed in ME28.
    Anyhow, i'm not able to change the selection text from p_matnr to "Material Number" as there is no enhancement in INITIALIZATION for me to set the text dynamically. (i'm not able to change the text element via goto->text elements->selection texts as its standard sap).
    Can someone please share if you've done this enhancement before?
    Really appreciate your input and advise.
    Thanks.
    Regards,
    Sham.

    Hi Sham,
    I copy standard program of me28(RM06EF00) and implement the code.
    Regards,
    Quddus.

Maybe you are looking for

  • Best way to do slow-mo in FCS

    Further to the thread about Optical Retiming, I'm wondering what the best option for me is. I have a clip that's about 3 minutes long, and I want to reduce it to quarter speed - i.e. 25%. Given the comments in the Optical Flow thread, it looks like t

  • IPhoto sluggish and quirky

    Having just restored the iPhoto library to iPhoto (different thread; thanks, Brie Fly), we are finding iPhoto (2.0.1) very sluggish. It was already a bit sluggish before we lost all the photos from the iPhoto folders in iPhoto. Now it is REALLY slow,

  • Create Currency Decimal Places

    Hi Experts, Is it possible to create our own currency decimal places?  In my configuration(OY04)  only available standard decimal places 1, 3,4 & 5. now  I need decimal place 2.  e.g. I want to show amount as 101.26 Regards VS Rao

  • CSS11506 Client to server connection

    Hey guys, I currently have 1 CSS11506 terminating 2 SSL connections to 2 backend web servers. However when I sniff the traffic on the web servers I notice that the client is connected directly to them. Once the ARP for the CSS VIP has been completed,

  • Navigation between workset

    Dear  All, Is it possible navigate between the worksets in portal, If it is possible can any one guide me Regards Suresh