Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Urgent

Former Member
0 Likes
796

Hi,

When I press push button in selection screen then one pop up should display

& in that popup field FILE NAME should appaear. I need to set the F4 functionality for

field FILE NAME. Any suggestion for this??

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
774

Hi,

Create another Selection screen with a field File Name.While Pressing that Push Button call that screen with STARTING AT ....ENDING AT addition.

Write F4 functionality for that File Name Field.

Regards,

Padmam.

Hi,

When I press push button in selection screen then one pop up should display

& in that popup field FILE NAME should appaear. I need to set the F4 functionality for

field FILE NAME. Any suggestion for this??

6 REPLIES 6
Read only

Former Member
0 Likes
774
data: ifiletable type filetable.
data: xfiletable like line of ifiletable.
data: rc type i.
 
parameters: p_file1 type localfile default'C:test.txt'.
 
at selection-screen on value-request for p_file1.
 
call method cl_gui_frontend_services=>file_open_dialog
   EXPORTING
*    WINDOW_TITLE            =
*    DEFAULT_EXTENSION       =
*    DEFAULT_FILENAME        =
*    FILE_FILTER             =
     INITIAL_DIRECTORY       = 'C:'
*    MULTISELECTION          =
  changing
    file_table              = ifiletable
    rc                      = rc
*    USER_ACTION             =
  EXCEPTIONS
    FILE_OPEN_DIALOG_FAILED = 1
    CNTL_ERROR              = 2
    ERROR_NO_GUI            = 3
    others                  = 4.
        .
 read table ifiletable into xfiletable index 1.
 if sy-subrc = 0.
  p_file1 = xfiletable-FILENAME.
 endif.
Read only

Former Member
0 Likes
775

Hi,

Create another Selection screen with a field File Name.While Pressing that Push Button call that screen with STARTING AT ....ENDING AT addition.

Write F4 functionality for that File Name Field.

Regards,

Padmam.

Read only

0 Likes
774

Hi Padam,

Can u pls tell me the sample code for it??

Read only

0 Likes
774

hi neha,

create 1 selection screen with number as 9000.

in this screen create parameter for file.

and if u press push button trigger the screen 9000.

call selection-screen 9000 starting at 25 ending at 50.

if u press f4 on fiel parameter trigger at selection screen on value request for file.

call this method for opening file.

call cl_gui_frontend_services->file_open_dialog.

Reward points if helpful.

Kiran.M

Read only

Former Member
0 Likes
774

parameters:p_file TYPE IBIPPARMS-PATH obligatory.

at selection-screen on value-request for p_file.

perform get_f4help.

form get_f4help .

CALL FUNCTION 'F4_FILENAME'

EXPORTING

PROGRAM_NAME = SYST-CPROG

DYNPRO_NUMBER = SYST-DYNNR

  • FIELD_NAME = ' '

IMPORTING

FILE_NAME = P_FILE

.

endform.

Read only

Former Member
0 Likes
774

Hi here is the program ..

i created one more screen in it as 100 .

MY Selection screen is 500 . when you press pushbutton it goes to 100 screen which has popup .

only field as input with F4 help . file name.

REPORT ZUSR02 NO STANDARD PAGE HEADING LINE-SIZE 120
              LINE-COUNT 90(3).

DATA  : P_FILE type localfile VALUE 'C:test.txt'.
TABLES sscrfields.
TYPE-POOLS icon.
SELECTION-SCREEN:
  BEGIN OF SCREEN 500 AS WINDOW TITLE TIT,
    BEGIN OF LINE,
      PUSHBUTTON 2(10) BUT1 USER-COMMAND CLI1,
    END OF LINE,
  END OF SCREEN 500.

AT SELECTION-SCREEN.

  CASE SSCRFIELDS.
WHEN  'CLI1'.
CALL SCREEN 100   STARTING AT  10 10.
  ENDCASE.


START-OF-SELECTION.
  tit  = 'Push button'.
  but1 = 'Button 1'.

  CALL SELECTION-SCREEN '0500' .


MODULE VALUE_CARRIER INPUT.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
       EXPORTING
            tabname     = 'ROVERTABLE'
            fieldname   = 'P_FILE'
            dynpprog    =     'ZTSTEWR1'
            dynpnr      = '100'
            dynprofield = 'P_FILE' .
CALL FUNCTION 'WS_FILENAME_GET'
       EXPORTING
            def_filename     = P_FILE
            mask             = ',*.txt.'
            mode             = 'O'
            title            = 'Upload File'(078)
       IMPORTING
            filename         = P_FILE
       EXCEPTIONS
            inv_winsys       = 1
            no_batch         = 2
            selection_cancel = 3
            selection_error  = 4
            OTHERS           = 5.

ENDMODULE.

reward points if it is usefull ....

Girish