Pace eterna
di Joe Haldeman
Editore: Mondadori (Urania)
Lingua: Italiano | Numero di pagine: 360 | ISBN-10: A000009358 | Data di pubblicazione: 24/05/1998 | Traduttore: Lela Campi | Genere: Narrativa & Letteratura - Fantascienza - Scienze Sociali
giovedì 31 agosto 2017
Pace eterna, Joe Haldeman
Pubblicato da F/\B!O alle 14:19 Commenta per primo!
Etichette: letture digitali, libri
martedì 22 agosto 2017
Alba d'inchiostro, Cornelia Funke
Alba d'inchiostro
di Cornelia Funke
Editore: Mondadori
Lingua: Italiano | Numero di pagine: 597 | ISBN-13: 9788804580379 | Data di pubblicazione: 01/01/2008 | Traduttore: Roberta Magnaghi | Genere: Narrativa & Letteratura - Fantasy - Adolescenti
di Cornelia Funke
Editore: Mondadori
Lingua: Italiano | Numero di pagine: 597 | ISBN-13: 9788804580379 | Data di pubblicazione: 01/01/2008 | Traduttore: Roberta Magnaghi | Genere: Narrativa & Letteratura - Fantasy - Adolescenti
Pubblicato da F/\B!O alle 13:56 Commenta per primo!
Etichette: letture cartacee, libri
mercoledì 16 agosto 2017
Anteprima nella dynpro di un PDF sull'Application Server
*----------------------------------------------------------------------* * DECLARATIONS * *----------------------------------------------------------------------* DATA: BEGIN OF gs_out, name LIKE epsfili-name, datum TYPE crdate, uzeit LIKE sy-uzeit, pdf TYPE icon_d, END OF gs_out. DATA: gt_out LIKE STANDARD TABLE OF gs_out. DATA: gv_dirnam LIKE epsf-epsdirnam, gv_url(255) TYPE c, gv_content TYPE xstring, gv_fatt TYPE zflag_fatt, gv_lett TYPE zflag_lett, gv_canc TYPE zflag_canc. DATA: go_container_r TYPE REF TO cl_gui_container, go_container_l TYPE REF TO cl_gui_container, go_docking TYPE REF TO cl_gui_docking_container, go_splitter TYPE REF TO cl_gui_splitter_container, go_gui_html_viewer TYPE REF TO cl_gui_html_viewer, go_alv TYPE REF TO cl_salv_table. CLASS lcl_handle_events DEFINITION DEFERRED. DATA: go_events TYPE REF TO lcl_handle_events. DATA: ok_code TYPE syucomm. *---------------------------------------------------------------------* * CLASS lcl_handle_events DEFINITION * *---------------------------------------------------------------------* CLASS lcl_handle_events DEFINITION. PUBLIC SECTION. METHODS: on_user_command FOR EVENT added_function OF cl_salv_events_table IMPORTING e_salv_function, on_single_click FOR EVENT link_click OF cl_salv_events_table IMPORTING row column. ENDCLASS. *---------------------------------------------------------------------* * CLASS lcl_handle_events IMPLEMENTATION * *---------------------------------------------------------------------* CLASS lcl_handle_events IMPLEMENTATION. METHOD on_user_command. DATA: lv_answer TYPE c, lv_url(255) TYPE c, lo_selections TYPE REF TO cl_salv_selections, lt_rows TYPE salv_t_row, ls_row TYPE i, ls_cell TYPE salv_s_cell. CHECK e_salv_function = '&DEL'. lo_selections = go_alv->get_selections( ). lt_rows = lo_selections->get_selected_rows( ). CHECK lt_rows[] IS NOT INITIAL. CALL FUNCTION 'POPUP_TO_CONFIRM' EXPORTING text_question = 'Sicuro di voler eliminare i file?' IMPORTING answer = lv_answer. CHECK lv_answer = '1'. LOOP AT lt_rows INTO ls_row. READ TABLE gt_out INTO gs_out INDEX ls_row. CONCATENATE gv_dirnam gs_out-name INTO lv_url. DELETE DATASET lv_url. CLEAR gs_out-name. MODIFY gt_out FROM gs_out INDEX ls_row TRANSPORTING name. CHECK lv_url = gv_url. lv_answer = 'D'. ENDLOOP. DELETE gt_out WHERE name IS INITIAL. CLEAR lt_rows[]. lo_selections->set_selected_rows( lt_rows[] ). ls_cell-row = 1. ls_cell-columnname = 'NAME'. lo_selections->set_current_cell( ls_cell ). go_alv->refresh( ). CHECK lv_answer = 'D'. PERFORM preview_pdf USING 1. ENDMETHOD. METHOD on_single_click. CASE column. WHEN 'NAME'. PERFORM preview_pdf USING row. WHEN 'PDF'. PERFORM view_pdf USING row. ENDCASE. ENDMETHOD. ENDCLASS. *----------------------------------------------------------------------* * LAYOUT * *----------------------------------------------------------------------* SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE TEXT-001. SELECTION-SCREEN SKIP. SELECT-OPTIONS: so_datum FOR sy-datum. SELECTION-SCREEN SKIP. SELECTION-SCREEN: BEGIN OF LINE, COMMENT (30) TEXT-002 MODIF ID id3, END OF LINE. PARAMETERS: rb_fad RADIOBUTTON GROUP rbg1 MODIF ID id1, rb_lnd RADIOBUTTON GROUP rbg1 MODIF ID id2, rb_lsd RADIOBUTTON GROUP rbg1 MODIF ID id2. SELECTION-SCREEN SKIP. SELECTION-SCREEN: BEGIN OF LINE, COMMENT (30) TEXT-003 MODIF ID id3, END OF LINE. PARAMETERS: rb_fai RADIOBUTTON GROUP rbg1 MODIF ID id1, rb_lni RADIOBUTTON GROUP rbg1 MODIF ID id2, rb_lsi RADIOBUTTON GROUP rbg1 MODIF ID id2. SELECTION-SCREEN END OF BLOCK b1. *----------------------------------------------------------------------* * EVENTS * *----------------------------------------------------------------------* AT SELECTION-SCREEN OUTPUT. LOOP AT SCREEN. IF screen-group1 = 'ID1' AND gv_fatt IS INITIAL. screen-output = 0. screen-input = 0. screen-active = 0. MODIFY SCREEN. ENDIF. IF screen-group1 = 'ID2' AND gv_lett IS INITIAL. screen-output = 0. screen-input = 0. screen-active = 0. MODIFY SCREEN. ENDIF. IF screen-group1 = 'ID3'. screen-intensified = 1. MODIFY SCREEN. ENDIF. ENDLOOP. *----------------------------------------------------------------------* * INIT * *----------------------------------------------------------------------* INITIALIZATION. SELECT SINGLE flag_fatt flag_lett flag_canc FROM zfbc_monitor_aut INTO (gv_fatt, gv_lett, gv_canc) WHERE uname = sy-uname. *----------------------------------------------------------------------* * PROGRAM BODY * *----------------------------------------------------------------------* START-OF-SELECTION. PERFORM dir_list. END-OF-SELECTION. CHECK gt_out[] IS NOT INITIAL. CALL SCREEN 100. *----------------------------------------------------------------------* * * * ####### ####### ####### * * ### ### ### ### #### #### * * ### ### ### ### ### ### * * ####### ####### ### ### * * ### ### ### ### ### * * ### ### ### #### #### * * ### ####### ####### * * * *----------------------------------------------------------------------* *&---------------------------------------------------------------------* *& Module STATUS_0100 OUTPUT *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* MODULE status_0100 OUTPUT. SET PF-STATUS 'D0100'. PERFORM output_alv. ENDMODULE. *----------------------------------------------------------------------* * * * ####### ###### ### * * ### ### ### ### ### * * ### ### ### ### ### * * ####### ######## ### * * ### ### ### ### * * ### ### ### ### * * ### ### ### ### * * * *----------------------------------------------------------------------* *&---------------------------------------------------------------------* *& Module USER_COMMAND_0100 INPUT *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* MODULE user_command_0100 INPUT. PERFORM user_command. ENDMODULE. *----------------------------------------------------------------------* * * * ######## ####### ####### #### #### ######## * * ######## #### #### ### ### ##### ##### ######## * * ###### ### ### ### ### ########### ##### * * ###### ### ### ####### ########### ######## * * ### ### ### ### ### ### ### ### ##### * * ### #### #### ### ### ### ### ######## * * ### ####### ### ### ### ### ######## * * * *----------------------------------------------------------------------* *----------------------------------------------------------------------* * FORM DIR_LIST * *----------------------------------------------------------------------* FORM dir_list. CONSTANTS lc_days1980 TYPE i VALUE 3652. DATA: BEGIN OF lt_dirlist OCCURS 0. INCLUDE STRUCTURE epsfili. DATA: END OF lt_dirlist. DATA: lv_pit TYPE i, lv_mtime(12) TYPE c. CASE 'X'. WHEN rb_fad. CONCATENATE '/IFR/' sy-sysid '/EXPORT/FATTURE/' INTO gv_dirnam. WHEN rb_lnd. CONCATENATE '/IFR/' sy-sysid '/EXPORT/LETTERE_NOTIFICA/' INTO gv_dirnam. WHEN rb_lsd. CONCATENATE '/IFR/' sy-sysid '/EXPORT/LETTERE_SOLLECITO/' INTO gv_dirnam. WHEN rb_fai. CONCATENATE '/IFR/' sy-sysid '/EXPORT/SENT/FATTURE/' INTO gv_dirnam. WHEN rb_lni. CONCATENATE '/IFR/' sy-sysid '/EXPORT/SENT/LETTERE_NOTIFICA/' INTO gv_dirnam. WHEN rb_lsi. CONCATENATE '/IFR/' sy-sysid '/EXPORT/SENT/LETTERE_SOLLECITO/' INTO gv_dirnam. ENDCASE. CALL FUNCTION 'EPS_GET_DIRECTORY_LISTING' EXPORTING dir_name = gv_dirnam TABLES dir_list = lt_dirlist EXCEPTIONS invalid_eps_subdir = 1 sapgparam_failed = 2 build_directory_failed = 3 no_authorization = 4 read_directory_failed = 5 too_many_read_errors = 6 empty_directory_list = 7. IF sy-subrc <> 0 OR lt_dirlist[] IS INITIAL. MESSAGE i208(00) WITH 'Nessun documento trovato'. EXIT. ENDIF. gs_out-pdf = '@IT@'. LOOP AT lt_dirlist WHERE name CP '*.PDF'. CALL FUNCTION 'EPS_GET_FILE_ATTRIBUTES' EXPORTING file_name = lt_dirlist-name dir_name = gv_dirnam IMPORTING file_mtime = lv_mtime EXCEPTIONS read_directory_failed = 1 read_attributes_failed = 2 OTHERS = 3. IF sy-subrc = 0. gs_out-name = lt_dirlist-name. lv_pit = lv_mtime. CALL FUNCTION 'POINT_IN_TIME_CONVERT' EXPORTING point_in_time = lv_pit IMPORTING date = gs_out-datum time = gs_out-uzeit EXCEPTIONS OTHERS = 1. SUBTRACT lc_days1980 FROM gs_out-datum. CHECK gs_out-datum IN so_datum. APPEND gs_out TO gt_out. ENDIF. ENDLOOP. IF gt_out[] IS INITIAL. MESSAGE i208(00) WITH 'Nessun documento trovato'. EXIT. ELSE. SORT gt_out. ENDIF. ENDFORM. *----------------------------------------------------------------------* * FORM OUTPUT_ALV * *----------------------------------------------------------------------* FORM output_alv. CLEAR: go_docking, go_splitter, go_container_l, go_container_r. CREATE OBJECT go_docking EXPORTING repid = sy-repid dynnr = '0100' ratio = '95'. "--max container length * Create a splitter with 1 row and 2 column CREATE OBJECT go_splitter EXPORTING parent = go_docking rows = 1 columns = 2. ** Right Container go_splitter->get_container( EXPORTING row = 1 column = 2 RECEIVING container = go_container_r ). ** Left Container go_splitter->get_container( EXPORTING row = 1 column = 1 RECEIVING container = go_container_l ). CREATE OBJECT go_gui_html_viewer EXPORTING parent = go_container_r. PERFORM preview_pdf USING 1. TRY. cl_salv_table=>factory( EXPORTING r_container = go_container_l IMPORTING r_salv_table = go_alv CHANGING t_table = gt_out ). PERFORM set_settings. go_alv->display( ). CATCH cx_salv_msg. " error handling RETURN. ENDTRY. ENDFORM. *----------------------------------------------------------------------* * FORM SET_SETTINGS * *----------------------------------------------------------------------* FORM set_settings. DATA: ls_key TYPE salv_s_layout_key, lo_cols TYPE REF TO cl_salv_columns_table, lo_col TYPE REF TO cl_salv_column_table, lo_funcs TYPE REF TO cl_salv_functions_list, lo_layout TYPE REF TO cl_salv_layout, lo_display TYPE REF TO cl_salv_display_settings, lo_selections TYPE REF TO cl_salv_selections, lo_events TYPE REF TO cl_salv_events_table. *Events lo_events = go_alv->get_event( ). CREATE OBJECT go_events. SET HANDLER go_events->on_user_command FOR lo_events. SET HANDLER go_events->on_single_click FOR lo_events. *Columns lo_cols = go_alv->get_columns( ). TRY. lo_col ?= lo_cols->get_column( 'NAME' ). lo_col->set_cell_type( if_salv_c_cell_type=>hotspot ). lo_col ?= lo_cols->get_column( 'PDF' ). lo_col->set_cell_type( if_salv_c_cell_type=>button ). CATCH cx_salv_error. " error handling RETURN. ENDTRY. *Layouts ls_key-report = sy-repid. lo_layout = go_alv->get_layout( ). lo_layout->set_key( ls_key ). lo_layout->set_default( 'X' ). lo_layout->set_save_restriction( ). *Functions lo_funcs = go_alv->get_functions( ). lo_funcs->set_all( ). IF ( rb_fad = 'X' OR rb_lnd = 'X' OR rb_lsd = 'X' ) AND gv_canc = 'X'. TRY. lo_funcs->add_function( name = '&DEL' icon = '@11@' text = '' tooltip = 'Eliminare' position = if_salv_c_function_position=>right_of_salv_functions ). CATCH cx_salv_wrong_call. " error handling RETURN. ENDTRY. ENDIF. *Display Settings lo_display = go_alv->get_display_settings( ). lo_display->set_striped_pattern( 'X' ). *Selections lo_selections = go_alv->get_selections( ). lo_selections->set_selection_mode( if_salv_c_selection_mode=>row_column ). ENDFORM. *----------------------------------------------------------------------* * FORM USER_COMMAND * *----------------------------------------------------------------------* FORM user_command. CASE ok_code. WHEN 'BACK' OR 'EXIT' OR 'CANC'. SET SCREEN 0. LEAVE SCREEN. ENDCASE. ENDFORM. *----------------------------------------------------------------------* * FORM PREVIEW_PDF * *----------------------------------------------------------------------* FORM preview_pdf USING pf_row TYPE i. DATA: lv_url(255) TYPE c, lt_data TYPE STANDARD TABLE OF x255. READ TABLE gt_out INTO gs_out INDEX pf_row. CONCATENATE gv_dirnam gs_out-name INTO gv_url. OPEN DATASET gv_url FOR INPUT IN BINARY MODE. CHECK sy-subrc = 0. READ DATASET gv_url INTO gv_content. CLOSE DATASET gv_url. CALL FUNCTION 'SCMS_XSTRING_TO_BINARY' EXPORTING buffer = gv_content TABLES binary_tab = lt_data. go_gui_html_viewer->load_data( EXPORTING type = 'application' subtype = 'pdf' IMPORTING assigned_url = lv_url CHANGING data_table = lt_data EXCEPTIONS dp_invalid_parameter = 1 dp_error_general = 2 cntl_error = 3 OTHERS = 4 ). go_gui_html_viewer->show_url( url = lv_url in_place = 'X' ). ENDFORM. *----------------------------------------------------------------------* * FORM VIEW_PDF * *----------------------------------------------------------------------* FORM view_pdf USING pf_row TYPE i. DATA: lv_url(255) TYPE c, lv_content TYPE xstring. READ TABLE gt_out INTO gs_out INDEX pf_row. CONCATENATE gv_dirnam gs_out-name INTO lv_url. IF lv_url <> gv_url. OPEN DATASET lv_url FOR INPUT IN BINARY MODE. CHECK sy-subrc = 0. READ DATASET lv_url INTO lv_content. CLOSE DATASET lv_url. ELSE. lv_content = gv_content. ENDIF. CALL FUNCTION 'ISH_DALE_PDF_DISPLAY' EXPORTING i_pdf = lv_content. ENDFORM. *----------------------------------------------------------------------*
Pubblicato da F/\B!O alle 14:13 Commenta per primo!
Etichette: ABAP
venerdì 11 agosto 2017
Il libro dei sogni, Jack Vance
Il libro dei sogni
Di Jack Vance
Editore: Mondadori (Urania Classici)
Lingua: Italiano | Numero di pagine: 268 | ISBN-10: A000053291 | Data di pubblicazione: 01/12/2002 | Traduttore: Roberta Rambelli | Illustrazione di copertina: Pierluigi Longo | Genere: Fantascienza
Di Jack Vance
Editore: Mondadori (Urania Classici)
Lingua: Italiano | Numero di pagine: 268 | ISBN-10: A000053291 | Data di pubblicazione: 01/12/2002 | Traduttore: Roberta Rambelli | Illustrazione di copertina: Pierluigi Longo | Genere: Fantascienza
Pubblicato da F/\B!O alle 10:00 Commenta per primo!
Etichette: letture digitali, libri
martedì 1 agosto 2017
Iscriviti a:
Post (Atom)