ABAP : how to select folder in abap selection screen?

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS    P_FOLDER  TYPE STRING LOWER CASE DEFAULT 'C:\'.
SELECTION-SCREEN END OF BLOCK B1.

 


AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FOLDER.
  CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_BROWSE
    CHANGING
      SELECTED_FOLDER      P_FOLDER
    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.
  ENDIF.
 
0 comments:

Post a Comment

message

Labels

NuffNang

Search google

Blog Archive

My Blog List

Twitter

Message

Followers