Skip to Content
author's profile photo
Former Member

save_dialog func module

hai abapers,

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • Best Answer
    author's profile photo
    Former Member
    Posted on Aug 22, 2005 at 12:08 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 22, 2005 at 11:29 AM

    Have a look in the gui_frontend_services class.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Aug 22, 2005 at 11:41 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Aug 22, 2005 at 12:03 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 23, 2005 at 03:44 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded