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

F4 Help for Presentation Server Folder Name .

0 Likes
954

Hi Experts,

I want show the F4 help on the presentation server.

If the file is selected REquirement is that , on clicking the F4, the dialog box should open.

If we choose the file , then file should be selected , but if we select the folder then folder should be selected.

Normal function modules or methods present in SAP opens the folder containt  in the folder.

Kindly provide anyFM name or class method name o achieve the functiknality .

Thanks in advance.

3 REPLIES 3
Read only

Former Member
0 Likes
700

HI,

Please paste this code,You will get F4 help.

   DATAlt_filetable  TYPE filetable,
           lwa_filetable TYPE file_table,
           l_rc          TYPE i.
  REFRESH lt_filetable[].
  CLEAR:lwa_filetable.

* Open file
  CALL METHOD cl_gui_frontend_services=>file_open_dialog
    CHANGING
      file_table              = lt_filetable
      rc                      = l_rc
    EXCEPTIONS
      file_open_dialog_failed = 1
      cntl_error              = 2
      error_no_gui            = 3
      not_supported_by_gui    = 4
      OTHERS                  = 5.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
               WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ELSE.
    READ TABLE lt_filetable INTO lwa_filetable INDEX 1.
    IF sy-subrc = 0.
      p_sap1 = lwa_filetable-filename.
    ENDIF.
  ENDIF.

Read only

0 Likes
700

Thanks Shakeer,

But this is not the requirement

This functionality goes upto the file level of the folder.My requirement is that , If i want to choose the folder , then that folder should be selected, but if want to choose file , then file should be selected.

I want both the functionality in the at the same time .

Regards,

Vaibhav

Read only

0 Likes
700

PARAMETERS:pa TYPE localfile.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR pa.

  CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'

    EXPORTING

      directory        = ' '

      filemask         = ' '

    IMPORTING

      serverfile       = pa

    EXCEPTIONS

      canceled_by_user = 1

      OTHERS           = 2.

  IF sy-subrc <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

else.

concatenate pa '/' into pa.

  ENDIF.