Application Development 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: 

How do I add a selection screen parameter to get a application server file

Former Member
0 Kudos

Hi All..

Can you please suggest how can we add a selection screen parameter to get a application server file ?

Thanx in Advance...

Regards,

Deepak

4 REPLIES 4

Former Member
0 Kudos
  • File Name on Appl. Server

PARAMETERS:

PA_AFILE TYPE PFEFLNAMEL MODIF ID APP LOWER CASE

DEFAULT 'USR1/INTERNAL/LINX/LXMASTER.TXT'.

0 Kudos

Hi Jyothi...

Thanx for reply...

But my requriment is different...

i want to add a parameter through which i can browse and select a file from Application serevr...

Regards,

Deepak

0 Kudos

PARAMETERS: P_APPL LIKE FILENAME-FILEINTERN LOWER CASE DEFAULT './sap_out/'.

raymond_giuseppi
Active Contributor
0 Kudos

<b>Parameter def :</b>

SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 02(30) text-005 FOR FIELD p_xlfil.
PARAMETERS: p_xlfil LIKE rlgrap-filename OBLIGATORY.
SELECTION-SCREEN END OF LINE.

<b>Browse</b>

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_xlfil.
  PERFORM ws_get_filename USING p_xlfil.
*
FORM ws_get_filename USING p_xlfil.
  CALL FUNCTION 'WS_FILENAME_GET'
       EXPORTING
            def_path         = 'C:'
            mask             = ',Excel,*.xls,All,*.*.'(100)
            mode             = 'O'
            title            = 'Title'(101)
       IMPORTING
            filename         = p_xlfil
       EXCEPTIONS
            inv_winsys       = 1
            no_batch         = 2
            selection_cancel = 3
            selection_error  = 4
            OTHERS           = 5.
  IF sy-subrc NE 0.
    CLEAR p_xlfil.
  ENDIF.
ENDFORM. " WS_GET_FILENAME

Regards

***********

<b>Oops i did not read "application server"</b>

Use FM F4_FILENAME_SERVER and not F4_FILENAME/WS_GET_FILENAME.

Message was edited by:

Raymond Giuseppi