*&---------------------------------------------------------------------* *& Report Name : /EUTIN/DEMO_READ_PDF_ADS *& Title : Demo: Read Content From Adobe Document Server-PDF Formular *& Developer : Michael Eutin - 01.05.2019 *& Development Class : /EUTIN/TOOLS *& Description : *& Read content from PDF formular file (ADS) and display content in ALV grid *& *&---------------------------------------------------------------------* *& CHANGE HISTORY *&---------------------------------------------------------------------* *& Date Description *&---------------------------------------------------------------------* *& *& *& *&---------------------------------------------------------------------* REPORT /eutin/demo_read_pdf_ads NO STANDARD PAGE HEADING. *---------------------------------------------------------------------- * Local Classes *---------------------------------------------------------------------- *---------------------------------------------------------------------- * CLASS lcl_main Definition *---------------------------------------------------------------------- CLASS lcl_main DEFINITION FINAL. PUBLIC SECTION. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TYPES: BEGIN OF ts_alv, line TYPE string, END OF ts_alv, tt_alv TYPE STANDARD TABLE OF ts_alv WITH DEFAULT KEY. *--- static methods * CLASS-METHODS event_init. * CLASS-METHODS event_pbo_1000. CLASS-METHODS event_pov_1000 IMPORTING iv_fieldname TYPE dd03l-fieldname CHANGING cv_value TYPE any. * CLASS-METHODS event_pai_1000. CLASS-METHODS event_start IMPORTING iv_filename TYPE string iv_display TYPE abap_bool. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - PRIVATE SECTION. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CLASS-METHODS upload_pdf IMPORTING iv_filename TYPE string iv_display TYPE abap_bool EXPORTING et_alv TYPE tt_alv. CLASS-METHODS alv_display IMPORTING iv_title TYPE any OPTIONAL CHANGING ct_table TYPE STANDARD TABLE. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENDCLASS. " lcl_main Definition *---------------------------------------------------------------------- * CLASS lcl_main Implementation *---------------------------------------------------------------------- CLASS lcl_main IMPLEMENTATION. * METHOD event_init. ** - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ** - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * ENDMETHOD. "event_init * METHOD event_pbo_1000. ** - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ** - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * ENDMETHOD. "event_pbo_1000 METHOD event_pov_1000. DATA: lt_dynpread TYPE STANDARD TABLE OF dynpread WITH DEFAULT KEY, lt_server TYPE STANDARD TABLE OF msxxlist WITH DEFAULT KEY, ls_dynpread LIKE LINE OF lt_dynpread, lv_path TYPE dxlpath, lv_location_flag TYPE dxlocation, lv_server TYPE msxxlist-name. FIELD-SYMBOLS: LIKE LINE OF lt_server. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IF iv_fieldname EQ 'P_FILE'. CLEAR: lt_dynpread[], ls_dynpread, lv_location_flag, lv_path, lv_server. ls_dynpread-fieldname = 'P_FILE'. APPEND ls_dynpread TO lt_dynpread. ls_dynpread-fieldname = 'P_APPL'. APPEND ls_dynpread TO lt_dynpread. ls_dynpread-fieldname = 'P_PRES'. APPEND ls_dynpread TO lt_dynpread. *--- get location of the requested file upload *--- presentation server or application server CALL FUNCTION 'DYNP_VALUES_READ' EXPORTING dyname = sy-repid dynumb = sy-dynnr * TRANSLATE_TO_UPPER = ' ' * REQUEST = ' ' * PERFORM_CONVERSION_EXITS = ' ' * PERFORM_INPUT_CONVERSION = ' ' * DETERMINE_LOOP_INDEX = ' ' * START_SEARCH_IN_CURRENT_SCREEN = ' ' * START_SEARCH_IN_MAIN_SCREEN = ' ' * START_SEARCH_IN_STACKED_SCREEN = ' ' * START_SEARCH_ON_SCR_STACKPOS = ' ' * SEARCH_OWN_SUBSCREENS_FIRST = ' ' * SEARCHPATH_OF_SUBSCREEN_AREAS = ' ' TABLES dynpfields = lt_dynpread[] EXCEPTIONS invalid_abapworkarea = 1 invalid_dynprofield = 2 invalid_dynproname = 3 invalid_dynpronummer = 4 invalid_request = 5 no_fielddescription = 6 invalid_parameter = 7 undefind_error = 8 double_conversion = 9 stepl_not_found = 10 OTHERS = 11. IF sy-subrc NE 0. MESSAGE 'Technical error occured: FUNC DYNP_VALUES_READ'(001) TYPE 'S' DISPLAY LIKE 'E'. RETURN. ENDIF. LOOP AT lt_dynpread INTO ls_dynpread ##INTO_OK. "here we have got just three entries!!! CASE ls_dynpread-fieldname. WHEN 'P_FILE'. lv_path = ls_dynpread-fieldvalue. WHEN 'P_APPL'. CASE ls_dynpread-fieldvalue. WHEN abap_true. lv_location_flag = 'A'. "application server WHEN OTHERS. lv_location_flag = 'P'. "presentation server ENDCASE. WHEN 'P_PRES'. CASE ls_dynpread-fieldvalue. WHEN abap_true. lv_location_flag = 'P'. "presentation server WHEN OTHERS. lv_location_flag = 'A'. "application server ENDCASE. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. IF lv_path IS INITIAL. *--- default first path CASE lv_location_flag. WHEN 'A'. "default for application server lv_path = '/opt'. *-- determine current application server CALL FUNCTION 'TH_SERVER_LIST' TABLES list = lt_server[] EXCEPTIONS no_server_list = 1 OTHERS = 2. IF sy-subrc EQ 0. READ TABLE lt_server ASSIGNING INDEX 1. IF sy-subrc EQ 0. lv_server = -name. UNASSIGN . CLEAR lt_server[]. ENDIF. ENDIF. WHEN OTHERS. "default for presentation server lv_path = 'C:\'. ENDCASE. ENDIF. *--- provide F4 help to choose the file incl. path CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION' EXPORTING i_location_flag = lv_location_flag i_server = lv_server i_path = lv_path * FILEMASK = '*.*' fileoperation = 'R' IMPORTING * O_LOCATION_FLAG = * O_SERVER = o_path = lv_path * ABEND_FLAG = EXCEPTIONS rfc_error = 1 error_with_gui = 2 OTHERS = 3. IF sy-subrc NE 0. RETURN. ENDIF. cv_value = lv_path. ENDIF. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENDMETHOD. "event_pov_1000 * METHOD event_pai_1000. ** - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ** - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * ENDMETHOD. "event_pai_1000 METHOD event_start. DATA: lt_alv TYPE tt_alv, lv_title TYPE lvc_title. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IF iv_filename IS INITIAL. MESSAGE 'File name must not be initial'(002) TYPE 'I' DISPLAY LIKE 'E'. RETURN. ENDIF. upload_pdf( EXPORTING iv_filename = iv_filename iv_display = iv_display IMPORTING et_alv = lt_alv[] ). IF iv_display EQ abap_true. IF lt_alv[] IS INITIAL. MESSAGE 'File is empty'(003) TYPE 'S' DISPLAY LIKE 'W'. RETURN. ENDIF. lv_title = 'Content of uploaded PDF file'(004). alv_display( EXPORTING iv_title = lv_title CHANGING ct_table = lt_alv[] ). ENDIF. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENDMETHOD. "event_start METHOD upload_pdf. TYPES: tv_char132 TYPE c LENGTH 132, BEGIN OF ts_encoded, content TYPE tv_char132, END OF ts_encoded. DATA: lo_if_fp TYPE REF TO if_fp, lo_fp_pdf_object TYPE REF TO if_fp_pdf_object, lo_abap_conv TYPE REF TO cl_abap_conv_in_ce, lt_cont_hex TYPE STANDARD TABLE OF solix WITH DEFAULT KEY, lt_return TYPE STANDARD TABLE OF bapiret2 WITH DEFAULT KEY, lt_smum_xmltb TYPE STANDARD TABLE OF smum_xmltb WITH DEFAULT KEY, lt_encoded TYPE STANDARD TABLE OF ts_encoded WITH DEFAULT KEY, ls_encoded LIKE LINE OF lt_encoded, lv_xml_data TYPE xstring, lv_xstring TYPE xstring, lv_string TYPE string, lv_message TYPE c LENGTH 50, lv_subrc TYPE sysubrc, lv_title TYPE lvc_title, lv_encoding TYPE abap_encoding, lv_error TYPE abap_bool, lv_length TYPE i. FIELD-SYMBOLS: LIKE LINE OF lt_cont_hex. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CLEAR et_alv[]. IF iv_filename IS INITIAL. RETURN. ENDIF. *--- upload the PDF file in binary file format CLEAR lt_cont_hex[]. cl_gui_frontend_services=>gui_upload( EXPORTING filename = iv_filename filetype = 'BIN' * has_field_separator = SPACE * header_length = 0 * read_by_line = 'X' * dat_mode = SPACE * codepage = SPACE * ignore_cerr = ABAP_TRUE * replacement = '#' * virus_scan_profile = * isdownload = SPACE * IMPORTING * filelength = * header = CHANGING data_tab = lt_cont_hex[] * isscanperformed = SPACE EXCEPTIONS file_open_error = 1 file_read_error = 2 no_batch = 3 gui_refuse_filetransfer = 4 invalid_type = 5 no_authority = 6 unknown_error = 7 bad_data_format = 8 header_not_allowed = 9 separator_not_allowed = 10 header_too_long = 11 unknown_dp_error = 12 access_denied = 13 dp_out_of_memory = 14 disk_full = 15 dp_timeout = 16 not_supported_by_gui = 17 error_no_gui = 18 OTHERS = 19 ). IF sy-subrc NE 0. lv_subrc = sy-subrc. IF sy-msgty IS NOT INITIAL. MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno DISPLAY LIKE sy-msgty WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDIF. CASE lv_subrc. WHEN 1. lv_message = 'FILE_OPEN_ERROR'. WHEN 2. lv_message = 'FILE_READ_ERROR'. WHEN 3. lv_message = 'NO_BATCH'. WHEN 4. lv_message = 'GUI_REFUSE_FILETRANSFER'. WHEN 5. lv_message = 'INVALID_TYPE'. WHEN 6. lv_message = 'NO_AUTHORITY'. WHEN 7. lv_message = 'UNKNOWN_ERROR'. WHEN 8. lv_message = 'BAD_DATA_FORMAT'. WHEN 9. lv_message = 'HEADER_NOT_ALLOWED'. WHEN 10. lv_message = 'SEPARATOR_NOT_ALLOWED'. WHEN 11. lv_message = 'HEADER_TOO_LONG'. WHEN 12. lv_message = 'UNKNOWN_DP_ERROR'. WHEN 13. lv_message = 'ACCESS_DENIED'. WHEN 14. lv_message = 'DP_OUT_OF_MEMORY'. WHEN 15. lv_message = 'DISK_FULL'. WHEN 16. lv_message = 'DP_TIMEOUT'. WHEN 17. lv_message = 'NOT_SUPPORTED_BY_GUI'. WHEN 18. lv_message = 'ERROR_NO_GUI'. WHEN OTHERS. lv_message = 'OTHERS'. ENDCASE. MESSAGE e252(s#) "&1 &2 &3 &4 WITH 'CLAS CL_GUI_FRONTEND_SERVICES' 'METH GUI_UPLOAD' 'EXCEPTION' lv_message. ENDIF. *--- empfy file? IF lt_cont_hex[] IS INITIAL. MESSAGE 'FILE_IS_EMPTY' TYPE 'I' DISPLAY LIKE 'W'. RETURN. ENDIF. CLEAR: lt_encoded[], ls_encoded, lv_xml_data, lv_xstring, lv_string. LOOP AT lt_cont_hex ASSIGNING . CONCATENATE lv_xstring -line INTO lv_xstring IN BYTE MODE. ENDLOOP. UNASSIGN . CLEAR lt_cont_hex[]. TRY. lv_error = abap_true. lo_if_fp = cl_fp=>get_reference( ). IF lo_if_fp IS BOUND. *--- get PDF instantiate lo_fp_pdf_object = lo_if_fp->create_pdf_object( connection = 'ADS' ). *--- set document content lo_fp_pdf_object->set_document( EXPORTING pdfdata = lv_xstring ). *--- define action extract data from PDF object lo_fp_pdf_object->set_extractdata( ). *--- execute the call to ADS lo_fp_pdf_object->execute( ). *--- retreive PDF data in XML format lo_fp_pdf_object->get_data( IMPORTING formdata = lv_xml_data ). lv_error = abap_false. ENDIF. IF lv_xml_data IS NOT INITIAL. *--- parse MXL structure of the PDF file CLEAR: lt_return[], lt_smum_xmltb[]. CALL FUNCTION 'SMUM_XML_PARSE' EXPORTING xml_input = lv_xml_data TABLES xml_table = lt_smum_xmltb[] return = lt_return[]. IF iv_display EQ abap_true AND lt_smum_xmltb[] IS NOT INITIAL. lv_title = 'Content of the uploaded PDF formular'(005). alv_display( EXPORTING iv_title = lv_title CHANGING ct_table = lt_smum_xmltb[] ). ENDIF. RETURN. ENDIF. CATCH cx_fp_runtime_internal. lv_error = abap_true. CLEAR: lt_smum_xmltb[], lt_return[], lv_xml_data. CATCH cx_fp_runtime_system. lv_error = abap_true. CLEAR: lt_smum_xmltb[], lt_return[], lv_xml_data. CATCH cx_fp_runtime_usage. lv_error = abap_true. CLEAR: lt_smum_xmltb[], lt_return[], lv_xml_data. CATCH cx_root ##CATCH_ALL. "pragma or pseudo comment CATCH_ALL: okay, one to catch them all! *--- error tolerant mode: do not cause catchable runtime errors! lv_error = abap_true. CLEAR: lt_smum_xmltb[], lt_return[], lv_xml_data. ENDTRY. IF lv_error EQ abap_true. *--- convert from binary into character mode and display content of the encoded PDF file TRY. lv_encoding = 'DEFAULT'. CALL METHOD cl_abap_conv_in_ce=>create EXPORTING encoding = lv_encoding input = lv_xstring RECEIVING conv = lo_abap_conv. IF lo_abap_conv IS BOUND. lo_abap_conv->read( IMPORTING data = lv_string ). IF lv_string IS INITIAL. RETURN. ENDIF. DO. IF lv_string IS INITIAL. EXIT. ENDIF. lv_length = strlen( lv_string ). IF lv_length GE 132. ls_encoded-content = lv_string+0(132). SHIFT lv_string LEFT BY 132 PLACES. ELSE. ls_encoded-content = lv_string. CLEAR lv_string. ENDIF. APPEND ls_encoded TO lt_encoded. ENDDO. ENDIF. CATCH cx_parameter_invalid_type. lv_error = abap_true. CLEAR lv_string. CATCH cx_parameter_invalid_range. lv_error = abap_true. CLEAR lv_string. CATCH cx_sy_conversion_codepage. lv_error = abap_true. CLEAR lv_string. CATCH cx_sy_codepage_converter_init. lv_error = abap_true. CLEAR lv_string. CATCH cx_root ##CATCH_ALL. "pragma or pseudo comment CATCH_ALL: okay, one to catch them all! *--- error tolerant mode: do not cause catchable runtime errors! lv_error = abap_true. CLEAR lv_string. ENDTRY. ENDIF. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENDMETHOD. "upload_pdf METHOD alv_display. DATA: lo_alv_table TYPE REF TO cl_salv_table, lo_functions_list TYPE REF TO cl_salv_functions_list, lo_columns_table TYPE REF TO cl_salv_columns_table, lo_column_table TYPE REF TO cl_salv_column_table, lo_display_settings TYPE REF TO cl_salv_display_settings, lo_header_info TYPE REF TO cl_salv_form_header_info, lo_tabledescr TYPE REF TO cl_abap_tabledescr, lo_structdescr TYPE REF TO cl_abap_structdescr, lx_salv_msg TYPE REF TO cx_salv_msg, lx_salv_not_found TYPE REF TO cx_salv_not_found, lx_salv_data_error TYPE REF TO cx_salv_data_error, lx_salv_existing TYPE REF TO cx_salv_existing, lx_root TYPE REF TO cx_root, lt_componentdescr TYPE STANDARD TABLE OF abap_componentdescr WITH DEFAULT KEY, lv_error TYPE string, lv_counts TYPE i, lv_title TYPE lvc_title, lv_header_count TYPE c LENGTH 20, lv_header_text TYPE string, lv_columnname TYPE lvc_fname, lv_scrtext_s TYPE scrtext_s, lv_scrtext_m TYPE scrtext_m, lv_scrtext_l TYPE scrtext_l. FIELD-SYMBOLS: LIKE LINE OF lt_componentdescr. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TRY. *--- create ALV table cl_salv_table=>factory( IMPORTING r_salv_table = lo_alv_table CHANGING t_table = ct_table[] ). *--- activate all standard functions lo_functions_list = lo_alv_table->get_functions( ). lo_functions_list->set_all( if_salv_c_bool_sap=>true ). *--- set optimized column size lo_columns_table = lo_alv_table->get_columns( ). lo_columns_table->set_optimize( if_salv_c_bool_sap=>true ). *--- set zebra layout lo_display_settings = lo_alv_table->get_display_settings( ). lo_display_settings->set_striped_pattern( if_salv_c_bool_sap=>true ). *--- set title IF iv_title IS NOT INITIAL. lv_title = iv_title. lo_display_settings->set_list_header( lv_title ). ENDIF. *--- set header and display number of displayed entries DESCRIBE TABLE ct_table LINES lv_counts. WRITE lv_counts TO lv_header_count LEFT-JUSTIFIED. CONCATENATE 'Number of lines:'(006) lv_header_count INTO lv_header_text SEPARATED BY space. CREATE OBJECT lo_header_info EXPORTING text = lv_header_text. IF lo_header_info IS BOUND. lo_alv_table->set_top_of_list( EXPORTING value = lo_header_info ). ENDIF. *--- populate column header (short/medium/long) with technical field name CLEAR lt_componentdescr[]. lo_tabledescr ?= cl_abap_tabledescr=>describe_by_data( ct_table ). lo_structdescr ?= lo_tabledescr->get_table_line_type( ). IF lo_structdescr IS BOUND. lt_componentdescr[] = lo_structdescr->get_components( ). LOOP AT lt_componentdescr ASSIGNING . lv_columnname = -name. lv_scrtext_s = -name. lv_scrtext_m = -name. lv_scrtext_l = -name. lo_column_table ?= lo_columns_table->get_column( lv_columnname ). lo_column_table->set_short_text( lv_scrtext_s ). lo_column_table->set_medium_text( lv_scrtext_m ). lo_column_table->set_long_text( lv_scrtext_l ). ENDLOOP. ENDIF. *--- display table lo_alv_table->display( ). *--- error handling CATCH cx_salv_msg INTO lx_salv_msg. CLEAR lv_error. lv_error = lx_salv_msg->if_message~get_text( ). IF lv_error IS NOT INITIAL. MESSAGE lv_error TYPE 'I' DISPLAY LIKE 'E'. ENDIF. MESSAGE 'METH DISPLAY: Exception CX_SALV_MSG was caught' TYPE 'E' ##NO_TEXT. "pragma or pseudo comment NO_TEXT: Okay, technical error message CATCH cx_salv_not_found INTO lx_salv_not_found. CLEAR lv_error. lv_error = lx_salv_not_found->if_message~get_text( ). IF lv_error IS NOT INITIAL. MESSAGE lv_error TYPE 'I' DISPLAY LIKE 'E'. ENDIF. MESSAGE 'METH DISPLAY: Exception CX_SALV_NOT_FOUND was caught' TYPE 'E' ##NO_TEXT. "pragma or pseudo comment NO_TEXT: Okay, technical error message CATCH cx_salv_data_error INTO lx_salv_data_error. CLEAR lv_error. lv_error = lx_salv_data_error->if_message~get_text( ). IF lv_error IS NOT INITIAL. MESSAGE lv_error TYPE 'I' DISPLAY LIKE 'E'. ENDIF. MESSAGE 'METH DISPLAY: Exception CX_SALV_DATA_ERROR was caught' TYPE 'E' ##NO_TEXT. "pragma or pseudo comment NO_TEXT: Okay, technical error message CATCH cx_salv_existing INTO lx_salv_existing. CLEAR lv_error. lv_error = lx_salv_existing->if_message~get_text( ). IF lv_error IS NOT INITIAL. MESSAGE lv_error TYPE 'I' DISPLAY LIKE 'E'. ENDIF. MESSAGE 'METH DISPLAY: Exception CX_SALV_EXISTING was caught' TYPE 'E' ##NO_TEXT. "pragma or pseudo comment NO_TEXT: Okay, technical error message CATCH cx_root INTO lx_root ##CATCH_ALL. "pragma or pseudo comment CATCH_ALL: okay, one to catch them all! *--- error tolerant mode: do not cause catchable runtime errors! CLEAR lv_error. lv_error = lx_root->if_message~get_text( ). IF lv_error IS NOT INITIAL. MESSAGE lv_error TYPE 'I' DISPLAY LIKE 'E'. ENDIF. MESSAGE 'METH DISPLAY: Exception CX_ROOT was caught' TYPE 'E' ##NO_TEXT. "pragma or pseudo comment NO_TEXT: Okay, technical error message ENDTRY. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENDMETHOD. "display_alv ENDCLASS. " lcl_main Implementation *---------------------------------------------------------------------- *--- Selection-Screen 1000 *---------------------------------------------------------------------- SELECTION-SCREEN: FUNCTION KEY 1. SELECTION-SCREEN BEGIN OF BLOCK sel WITH FRAME TITLE TEXT-sel. PARAMETERS: p_file TYPE string OBLIGATORY LOWER CASE, p_appl RADIOBUTTON GROUP sev ##NEEDED, "check METH event_pov_1000!!! p_pres RADIOBUTTON GROUP sev ##NEEDED. "check METH event_pov_1000!!! SELECTION-SCREEN END OF BLOCK sel. SELECTION-SCREEN BEGIN OF BLOCK opt WITH FRAME TITLE TEXT-opt. PARAMETERS: p_disp AS CHECKBOX DEFAULT 'X'. SELECTION-SCREEN END OF BLOCK opt. *---------------------------------------------------------------------- *--- Event INITIALIZATION *---------------------------------------------------------------------- INITIALIZATION. PERFORM init. *---------------------------------------------------------------------- *--- Event Screen 1000: Process on Value Request (POV) *---------------------------------------------------------------------- AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file. PERFORM pov_1000 CHANGING p_file. *---------------------------------------------------------------------- *--- Event START-OF-SELECTION *---------------------------------------------------------------------- START-OF-SELECTION. PERFORM main. *---------------------------------------------------------------------- *--- Event END-OF-SELECTION *---------------------------------------------------------------------- END-OF-SELECTION. RETURN. *---------------------------------------------------------------------- *--- FORM-Routinen *---------------------------------------------------------------------- *&---------------------------------------------------------------------* *& Form INIT *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* FORM init. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *--- default selection parameters p_disp = abap_true. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENDFORM. " INIT *&---------------------------------------------------------------------* *& Form POV_1000 *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* FORM pov_1000 CHANGING cv_filename TYPE string. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - lcl_main=>event_pov_1000( EXPORTING iv_fieldname = 'P_FILE' CHANGING cv_value = cv_filename ). * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENDFORM. " PBO_1000 *&---------------------------------------------------------------------* *& Form MAIN *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* FORM main. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - lcl_main=>event_start( iv_filename = p_file iv_display = p_disp ). * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENDFORM. " MAIN *--- The End!