Sunday, December 26, 2010
REPORT ZTEST_NOTEPAD.
DATA:G_SERVER TYPE C.

PARAMETERS:P_SERVER AS CHECKBOX USER-COMMAND UC1.
PARAMETERS:P_PATH TYPE  DXFIELDS-LONGPATH.
PARAMETERS:P_FILE TYPE DXFIELDS-LONGPATH.

AT SELECTION-SCREEN OUTPUT.
  CASE P_SERVER.
    WHEN 'X'.
      CLEAR P_FILE.
      G_SERVER = 'A'.
      P_PATH = '\usr\sap\tmp'.
    WHEN SPACE.
      CLEAR P_FILE.
      G_SERVER = 'P'.
      P_PATH = 'C:\'.
  ENDCASE.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.

  CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
    EXPORTING
      I_LOCATION_FLAG = G_SERVER
      I_SERVER        = ' '
      I_PATH          = P_PATH
      FILEMASK        = ' '
      FILEOPERATION   = 'R'
    IMPORTING
      O_PATH          = P_PATH.
  P_FILE = P_PATH.

START-OF-SELECTION.
  WRITE P_FILE.

0 comments:

Post a Comment

Your useful comments, suggestions are appreciated.Your comments are moderated.

Followers

Contact Form

Name

Email *

Message *

Web Dynpro ABAP Book

An SAP Consultant

Follow US


Want to Contribute ?

If you are interested in writing about the new stuff you learn everyday while working, please write to the.sap.consultants@gmail.com.

Click on Contribution for more details.