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: 

save_dialog func module

Former Member
0 Kudos

hai abapers,

i am having a requirement to call the func module of save dialog box in the prog.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Ateeq

Here is a simple example of same function module....

call function 'POPUP_TO_CONFIRM'

exporting

text_question = 'Do you want to carry out this

fantastic test?'(A02)

importing

answer = answer

exception

TEXT_NOT_FOUND = 1

others = 2.

Regards

Ashish Jain

5 REPLIES 5

rainer_hbenthal
Active Contributor
0 Kudos

Have a look in the gui_frontend_services class.

Former Member
0 Kudos

Hi,

CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG

call method cl_gui_frontend_services=>file_save_dialog

exporting

window_title = s_title

default_file_name = filename

file_filter = '*.XLS'

initial_directory = dir

changing

filename = s_loc_fn

path = s_loc_dir

fullpath = s_loc_dir

user_action = l_user_action

exceptions

cntl_error = 1

error_no_gui = 2

NOT_SUPPORTED_BY_GUI = 3

others = 4.

Svetlin

Former Member
0 Kudos

Hi Atteq

Do i interpret your question as: you want a function module which gives you a pop-up to confirm when you do something (any event) to save something?

If my interpretation is right, pls check:

POPUP_TO_CONFIRM

POPUP_TO_CONFIRM_STEP

These is a very generic function module, you can try searching more using keywords: popup or popupsave*

Example:

call function 'POPUP_TO_CONFIRM'

exporting

titel = 'Title for POPUP_TO_CONFIRM'(A01)

diagnose_object = 'TEXT1_ZUM_POPUP_TO_CONFIRM'

text_question = 'Do you want to carry out this

fantastic test?'(A02)

text_button_1 = 'Yes'(A03)

ICON_BUTTON_1 = 'ICON_OKAY'

text_button_2 = 'Cancel'(A04)

ICON_BUTTON_2 = 'ICON_CANCEL'

DEFAULT_BUTTON = '1'

DISPLAY_CANCEL = ''

userdefined_f1_help = 'TEST_TEXT_ZUR_SPO1'

START_COLUMN = 25

START_ROW = 6

importing

answer = answer

exception

TEXT_NOT_FOUND = 1

others = 2.

Regards

Ashish Jain

Former Member
0 Kudos

Hi Ateeq

Here is a simple example of same function module....

call function 'POPUP_TO_CONFIRM'

exporting

text_question = 'Do you want to carry out this

fantastic test?'(A02)

importing

answer = answer

exception

TEXT_NOT_FOUND = 1

others = 2.

Regards

Ashish Jain

Former Member
0 Kudos

Hi,

Try this one


FORM f9008_f4_hlp_for_pc_file.
  DATA: lv_path      TYPE string,
        lv_fullpath  TYPE string,
        lc_c         TYPE string.
      lc_c =  'C:'.

  CONCATENATE 'Creditek_credit_mgmt_' sy-datum '_' sy-uzeit+0(4) INTO lv_path.
  CONCATENATE lc_c lv_path INTO lv_fullpath.

  CALL METHOD cl_gui_frontend_services=>file_save_dialog
    EXPORTING
      window_title      = 'Select file for download'
      default_extension = '.xls'
      default_file_name = lv_path
*    FILE_FILTER       =
      initial_directory = lc_c
    CHANGING
      filename          = lv_path
      path              = lc_c
      fullpath          = lv_fullpath
*    USER_ACTION       =
    EXCEPTIONS
      cntl_error        = 1
      error_no_gui      = 2
      OTHERS            = 3
          .
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
               WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ELSE.
    v_fnam = lv_fullpath.
  ENDIF.

ENDFORM.                    " f9008_f4_hlp_for_pc_file.