Creating header in printout of ALV report in WD4A
Hi
I have created one alv report in WD4A. When I click on the "print version" button, the report appears in pdf format.
I want to create header on that pdf output. Please let me know how can i do that ? . it is coming on alv but not on pdf.
The code follows:
DATA: l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
l_ref_cmp_usage = wd_this->wd_cpuse_ztime( ).
IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
l_ref_cmp_usage->create_component( ).
ENDIF.
DATA: l_ref_interfacecontroller TYPE REF TO iwci_salv_wd_table .
l_ref_interfacecontroller = wd_this->wd_cpifc_ztime( ).
DATA:
l_value TYPE REF TO cl_salv_wd_config_table.
l_value = l_ref_interfacecontroller->get_model(
*set header for the table
data: lr_table_settings type ref to if_salv_wd_table_settings.
data: lr_header type ref to CL_SALV_WD_HEADER.
lr_table_settings ?= l_value.
lr_header = lr_table_settings->get_header( ).
lr_header->set_text( 'ATTANDENCE LIST' ).
*PDF output header
data: pdf_header TYPE REF TO IF_SALV_WD_PDF_SETTINGS.
pdf_header ?= l_value.
data: lv_head type abap_bool.
call METHOD pdf_header->set_export_no_tol( 'X' ).
lv_head = pdf_header->get_export_no_tol( ).
regards
Vishal kapoor
Message was edited by:
vishal kapoor
if you're still having this problem, try this (given your own code sample):
data:
lv_header type string.
pdf_header ?= l_value .
CONCATENATE 'My header text' INTO lv_header RESPECTING BLANKS .
pdf_header->set_header_left_freetext( lv_header ).
pdf_header->set_header_left( if_salv_wd_c_pdf_settings=>text_free ).
Similar Messages
-
Creating Header and Footer in ALV
hi,
can anyone please tell how will you create Header and Footer in ALv and Classical Report.Hi,
In classical report use events 'top-of-page' for header and 'end-of-page' for footer.
in ALV
follow this link
http://www.sap-img.com/abap/test-alv-display-with-header-footer.htm
http://sap.ittoolbox.com/groups/technical-functional/sap-dev/header-footer-display-in-alv-grid-for-layout-description-344391
Regards and Best wishes. -
How to create user defined button in alv report
how to create user defined button in alv report
thnks in advance.Hi,
U can define it the the PF-STATUS ( Menu for ALV ).
For that u have to define it in the EVENTCAT.
form z_eventcat using p_i_eventcat type slis_t_event.
data: i_event type slis_alv_event.
call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = p_i_eventcat
exceptions
list_type_wrong = 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.
endif.
clear i_event.
read table p_i_eventcat with key name = slis_ev_top_of_page into
i_event.
if sy-subrc = 0.
move 'TOP_OF_PAGE' to i_event-form.
append i_event to p_i_eventcat.
endif.
read table p_i_eventcat with key name = slis_ev_pf_status_set into i_event.
if sy-subrc = 0.
move 'SET_PF_STATUS' to i_event-form.
append i_event to p_i_eventcat.
endif.
clear i_event.
read table p_i_eventcat into i_event with key name = slis_ev_user_command .
if sy-subrc = 0.
move 'USER_COMMAND' to i_event-form.
append i_event to p_i_eventcat.
endif.
And in the DISPLAY
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = v_progname
i_callback_pf_status_set = 'SET_PF_STATUS'
i_callback_user_command = 'USER_COMMAND'
i_callback_top_of_page = 'TOP_OF_PAGE'
i_grid_title = v_gridtitle
i_save = 'A'
is_layout = i_layout
it_fieldcat = i_fieldcat[]
it_sort = i_sortinfo
it_events = i_eventcat
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
tables
t_outtab = it_final
exceptions
program_error = 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.
endif.
*MENU SETTINGS.
form set_pf_status using rt_extab type slis_t_extab.
set pf-status 'ALV_MENU'.
endform. "SET_PF_STATUS
endform. " Z_EVENTCAT
Now double click on ALV MENU nad u can create a button in the application bar.
Regards,
Pritha. -
How to create a radio button in ALV Reports
Hi all,
Best wishes to all..
Kindly reply me to this question... that is "How to create a radio button in ALV Report"
Thanks and Regards
AnjaliHI
here is an example :
PROGRAM ZUS_SDN_BCALV_GRID_DEMO_2.
Based on: BCALV_GRID_DEMO.
TYPE-POOLS: icon.
TYPES: BEGIN OF ty_s_sflight.
INCLUDE TYPE sflight.
TYPES: button1 TYPE lvc_emphsz.
TYPES: button2 TYPE lvc_emphsz.
TYPES: button3 TYPE lvc_emphsz.
TYPES: button4 TYPE lvc_emphsz.
TYPES: END OF ty_s_sflight.
DATA:
gt_sflight TYPE STANDARD TABLE OF ty_s_sflight,
gt_fcat TYPE lvc_t_fcat.
DATA: ok_code LIKE sy-ucomm,
gt_sflight TYPE TABLE OF sflight,
g_container TYPE scrfname VALUE 'BCALV_GRID_DEMO_0100_CONT1',
grid1 TYPE REF TO cl_gui_alv_grid,
g_custom_container TYPE REF TO cl_gui_custom_container.
CLASS lcl_eventhandler DEFINITION
CLASS lcl_eventhandler DEFINITION.
PUBLIC SECTION.
CLASS-DATA:
md_cnt TYPE i.
CLASS-METHODS:
handle_hotspot_click FOR EVENT hotspot_click OF cl_gui_alv_grid
IMPORTING
e_row_id
e_column_id
es_row_no
sender.
ENDCLASS. "lcl_eventhandler DEFINITION
CLASS lcl_eventhandler IMPLEMENTATION
CLASS lcl_eventhandler IMPLEMENTATION.
METHOD handle_hotspot_click.
define local data
FIELD-SYMBOLS:
<ls_entry> TYPE ty_s_sflight,
<ld_fld> TYPE ANY.
READ TABLE gt_sflight ASSIGNING <ls_entry> INDEX es_row_no-row_id.
CHECK ( <ls_entry> IS ASSIGNED ).
Set all radio buttons "unselected"
<ls_entry>-button1 = icon_wd_radio_button_empty.
<ls_entry>-button2 = icon_wd_radio_button_empty.
<ls_entry>-button3 = icon_wd_radio_button_empty.
<ls_entry>-button4 = icon_wd_radio_button_empty.
ASSIGN COMPONENT e_column_id-fieldname OF STRUCTURE <ls_entry>
TO <ld_fld>.
IF ( <ld_fld> IS ASSIGNED ).
Set selected radio button "selected".
<ld_fld> = icon_wd_radio_button.
ENDIF.
Force PAI followed by refresh of table display in PBO
CALL METHOD cl_gui_cfw=>set_new_ok_code
EXPORTING
new_code = 'DUMMY'
IMPORTING
RC =
ENDMETHOD. "handle_hotspot_click
ENDCLASS. "lcl_eventhandler IMPLEMENTATION
START-OF-SELECTION.
MAIN *
PERFORM select_data.
CALL SCREEN 100.
MODULE PBO OUTPUT *
MODULE pbo OUTPUT.
SET PF-STATUS 'MAIN100'.
IF g_custom_container IS INITIAL.
CREATE OBJECT g_custom_container
EXPORTING container_name = g_container.
CREATE OBJECT grid1
EXPORTING i_parent = g_custom_container.
PERFORM build_fieldcatalog.
CALL METHOD grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'SFLIGHT'
CHANGING
it_fieldcatalog = gt_fcat
it_outtab = gt_sflight.
Set event handler for event TOOLBAR
SET HANDLER:
lcl_eventhandler=>handle_hotspot_click FOR grid1.
else.
CALL METHOD grid1->refresh_table_display
EXPORTING
IS_STABLE =
I_SOFT_REFRESH =
EXCEPTIONS
FINISHED = 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.
ENDIF.
ENDIF.
ENDMODULE. "PBO OUTPUT
MODULE PAI INPUT *
MODULE pai INPUT.
to react on oi_custom_events:
CALL METHOD cl_gui_cfw=>dispatch.
CASE ok_code.
WHEN 'EXIT'.
PERFORM exit_program.
WHEN OTHERS.
do nothing
ENDCASE.
CLEAR ok_code.
ENDMODULE. "PAI INPUT
FORM EXIT_PROGRAM *
FORM exit_program.
CALL METHOD G_CUSTOM_CONTAINER->FREE.
CALL METHOD CL_GUI_CFW=>FLUSH.
LEAVE PROGRAM.
ENDFORM. "EXIT_PROGRAM
*& Form BUILD_FIELDCATALOG
text
--> p1 text
<-- p2 text
FORM build_fieldcatalog .
define local data
DATA:
ls_fcat TYPE lvc_s_fcat,
ls_hype TYPE lvc_s_hype.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
I_BUFFER_ACTIVE =
i_structure_name = 'LVC_S_FCAT'
I_CLIENT_NEVER_DISPLAY = 'X'
I_BYPASSING_BUFFER =
I_INTERNAL_TABNAME =
CHANGING
ct_fieldcat = gt_fcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 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.
ENDIF.
DELETE gt_fcat WHERE ( fieldname <> 'EMPHASIZE' ).
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
I_BUFFER_ACTIVE =
i_structure_name = 'SFLIGHT'
I_CLIENT_NEVER_DISPLAY = 'X'
I_BYPASSING_BUFFER =
I_INTERNAL_TABNAME =
CHANGING
ct_fieldcat = gt_fcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 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.
ENDIF.
READ TABLE gt_fcat INTO ls_fcat
WITH KEY fieldname = 'EMPHASIZE'.
IF ( syst-subrc = 0 ).
DELETE gt_fcat INDEX syst-tabix.
ENDIF.
ls_fcat-fieldname = 'BUTTON4'.
ls_fcat-icon = 'X'.
ls_fcat-hotspot = 'X'.
INSERT ls_fcat INTO gt_fcat INDEX 4.
ls_fcat-fieldname = 'BUTTON3'.
INSERT ls_fcat INTO gt_fcat INDEX 4.
ls_fcat-fieldname = 'BUTTON2'.
INSERT ls_fcat INTO gt_fcat INDEX 4.
ls_fcat-fieldname = 'BUTTON1'.
INSERT ls_fcat INTO gt_fcat INDEX 4.
LOOP AT gt_fcat INTO ls_fcat.
ls_fcat-col_pos = syst-tabix.
MODIFY gt_fcat FROM ls_fcat INDEX syst-tabix.
ENDLOOP.
ENDFORM. " BUILD_FIELDCATALOG
*& Form SELECT_DATA
text
--> p1 text
<-- p2 text
FORM select_data .
define local data
DATA:
ls_sflight TYPE ty_s_sflight.
SELECT * FROM sflight INTO CORRESPONDING FIELDS OF TABLE gt_sflight.
ls_sflight-button1 = icon_wd_radio_button.
ls_sflight-button2 = icon_wd_radio_button_empty.
ls_sflight-button3 = icon_wd_radio_button_empty.
ls_sflight-button4 = icon_wd_radio_button_empty.
MODIFY gt_sflight FROM ls_sflight
TRANSPORTING button1 button2 button3 button4
WHERE ( carrid IS NOT INITIAL ).
ENDFORM. " SELECT_DATA
Regards,
Prasanth
Reward all helpful answers -
I want to display header information of My ALV Report center Aligned.
Hi all,
I want to display header information of My ALV Report center Aligned. How can I do it..Also I want to show two different Layout display of ALV report according to the Radio Button Present in the selection screen.. Pls help me out in this.Hi,
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
Form top-of-page.
*ALV Header declarations
data: t_header type slis_t_listheader,
wa_header type slis_listheader,
t_line like wa_header-info,
ld_lines type i,
ld_linesc(10) type c.
Title
wa_header-typ = 'H'.
wa_header-info = ' EKKO Table Report '. Leave Space such that it comes to Center
append wa_header to t_header.
clear wa_header.
Date
wa_header-typ = 'S'.
wa_header-key = 'Date: '.
CONCATENATE sy-datum+6(2) '.'
sy-datum+4(2) '.'
sy-datum(4) INTO wa_header-info. "todays date
append wa_header to t_header.
clear: wa_header.
Total No. of Records Selected
describe table it_ekko lines ld_lines.
ld_linesc = ld_lines.
concatenate 'Total No. of Records Selected: ' ld_linesc
into t_line separated by space.
wa_header-typ = 'A'.
wa_header-info = t_line.
append wa_header to t_header.
clear: wa_header, t_line.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = t_header.
i_logo = 'Z_LOGO'.
endform. -
Calling an existing ALV report in WD4A
Im going to try to call an existing ALV report using WD4A.
Was wondering if anybody has used the "SUBMIT <report> EXPORTING LIST TO MEMORY" option to get the results table, then after IMPORTING from memory, display this in ALV in Webdynpro abap?I was able to acomplish the following way...
My WD4A component has an assistance class, has a method fetch_results, in that method, I pass my selection criteria which calls a function.
The function does this...
SUBMIT REPORTXYZ
USING SELECTION-SET lv_variant
AND RETURN
WITH pnppernr IN pnppernr
WITH pnpbegps EQ act_begda
WITH pnpendps EQ act_endda
WITH pnpbegda EQ act_begda
WITH pnpendda EQ act_endda
WITH pnptimed EQ blank
WITH p_layout EQ '/MGR SEP'
WITH p_portal EQ 'X'.
My p_portal parameter is a flag that REPORTXYZ will use to export the it_output to memory.
I then import that table to the function module which returns to WD4A alv.
IMPORT zit_output TO tbl_output FROM MEMORY ID
lv_flag. -
Heading with parameter in ALV report
hi
i want to add heading to my ALV report which i created using factory method.
in my code i wrote:
data:gr_display type ref to cl_salv_display_settings.
gr_display = gr_table->get_display_settings( ).
gr_display ->set_striped_pattern( cl_salv_display_settings=>true).
gr_display->set_list_header( 'this alv report has' X <-- here i want to add variable)
how can i add variable ( which is global variable ) insted of the X ??
thankshi,
use this.
DATA:
gd_headr type char100.
concatenate 'this alv report has' <variable>
into gd_headr separated by space.
gr_display->set_list_header( gd_headr ).
regards,
Peter -
Column heading change in print ALV report
Hi,
when i see ALV report output that time column heading is correct. but when i see print preview it's give another column heading.
like
column heading - Delivery Challan no it's come in print preview only delivery.
Thanks in Advance.
regards.
Sam.Hi,
thanks.
I have already use this in report.
like.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-COL_POS = POS.
WA_FIELDCAT-FIELDNAME = 'VBELN'.
WA_FIELDCAT-REF_TABNAME = 'LIPS'.
WA_FIELDCAT-SELTEXT_M = 'DELIVERY CHALLAN NO'.
WA_FIELDCAT-OUTPUTLEN = 20.
APPEND WA_FIELDCAT TO T_FIELDCAT.
Regard
Sam -
Hello All,
Does any one have any idea how to create 2 Header lines in an ALv report
as in 1 cummulative header and under that 2nd detailed header.
Please help me out.
Cheers,
Deepthee KasalHi,
It is not possible to have 2 detailed headers in ALV reports.
Regards,
Satish -
Displaying Header Text in ALV report.
HI Gurus,
I have one sales order which has header Text.
I am displaying that Header Text in my ALV report.
But while displaying in the ALV grid, the text is not coming full.
I have taken the datatype of the column of the ALV grid is string, Still the Header text is not come full.
Please help me.
Thanks in advance.Hi,
If the header text is morethan 60 characters, you can't print with REUSE_ALV_COMMENTARY_WRITE. To overcome above limit we can use dynamic document, which can be implemented through the class CL_DD_DOCUMENT. As dynamic documents use HTML viewer control so instead of triggering the TOP_OF_PAGE event we should trigger event of HTML TOP_OF_PAGE.
First create a subroutine for top of page in HTML format and send that name in I_CALLBACK_HTML_TOP_OF_PAGE parameter of ALV function module. The input parameter for this subroutine will be a variable of class CL_DD_DOCUMENT.
* FORM html_top_of_page *
FORM html_top_of_page USING top TYPE REF TO cl_dd_document.
data: l_text(255) type c.
l_text = '*******************************Hellooooooooooooooooooo************************'.
CALL METHOD top->add_text EXPORTING text = 'Hello world '
sap_style = 'heading' .
CALL METHOD top->add_gap EXPORTING width = 200.
CALL METHOD top->add_picture EXPORTING picture_id = 'ENJOYSAP_LOGO'.
CALL METHOD top->NEW_LINE( ).
CALL METHOD top->add_text EXPORTING
text = l_text.
ENDFORM.
* Display ALV grid
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_html_top_of_page = 'HTML_TOP_OF_PAGE' " Use this event
i_callback_program = g_repid
i_structure_name = 'STRUCTURE'
TABLES
t_outtab = gt_outtab.
Regards
Bala Krishna -
How to create Status in ALV reports?
Hi experts,
I need to create a status in a alv report. but i am not getting how to create it. i have declared a variable type slis_formname. and appended the events with it. now how to create the status in form.answers will be rewarded.
Thanks in advance,
RamanaHello Venkat,
Copy the standard pf status of the ALV in SE41 and do the following.
DATA: IT_EVENTS TYPE SLIS_T_EVENT,
WA_EVENTS LIKE LINE OF IT_EVENTS.
REFRESH: IT_EVENTS.
CLEAR: WA_EVENTS,IT_EVENTS.
WA_EVENTS-NAME = 'PF_STATUS_SET'.
WA_EVENTS-FORM = 'STATUS'.
APPEND WA_EVENTS TO IT_EVENTS .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = IT_VARIANT-REPORT
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IT_FIELDCAT = IT_FIELDCAT
I_SAVE = 'A'
IS_VARIANT = IT_VARIANT
IT_SORT = IT_SORT
IT_EVENTS = IT_EVENTS
TABLES
T_OUTTAB = G_T_OUTTAB
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
FORM status *
FORM STATUS USING RT_EXTAB TYPE SLIS_T_EXTAB.
SET PF-STATUS 'STANDARD' EXCLUDING RT_EXTAB.
ENDFORM.
If useful reward.
Vasanth -
End-of-page event in alv report
Hi all,
I want to create end-of-page in alv report i have used event also
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' * "
EXPORTING *
i_callback_program = sy-repid * "
i_callback_user_command = 'USER_COMMAND' * "
i_callback_top_of_page = 'TOP_OF_PAGE' * "
I_STRUCTURE_NAME = * "
it_fieldcat = fcat[] * "
it_events = it_event[] * "
TABLES
t_outtab = gtbl_pohead * "
EXCEPTIONS
program_error = 1 * "
OTHERS = 2 "
FORM end_of_page. *
DATA: listwidth TYPE i, *
ld_pagepos(10) TYPE c, *
ld_page(10) TYPE c. *
WRITE: sy-uline(50). "
SKIP 3.
WRITE:/40 'Page No',sy-pagno. "
ENDFORM. "END_OF_PAGE "hi
Search in SDN.You can find the solution for this.Before posting please search in SDN.
You have to use this FM 'REUSE_ALV_EVENTS_GET'
[End-Of-Page|http://www.sapdev.co.uk/reporting/alv/alvgrid_events.htm]
[Endo Of Page|http://www.sdn.sap.com/irj/scn/advancedsearch?query=alvend-of-pageevent+] -
To display the date in ALV report
Hi All,
In the header part of the ALV report, how to write a particular date by the day,month & year and simultaneously how to get the orders due for the week with displaying the weekend date..by the day, month & year.
example :
monday, december 16 2007
orders for the weekend : sunday, december 22 2007.
**and the orders will be displayed here..**
How to get it? is there any function module to display as such, <REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Feb 21, 2008 10:42 AMHi,
Please refer to the below code:
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
i_save = 'X'
tables
t_outtab = it_ekko
exceptions
program_error = 1
others = 2.
Form top-of-page.
*ALV Header declarations
data: t_header type slis_t_listheader,
wa_header type slis_listheader,
t_line like wa_header-info,
ld_lines type i,
ld_linesc(10) type c.
*Use FM DATE_TO_DAY to get the day, month and year by specifying the date.
*Date
wa_header-typ = 'H'.
wa_header-info = <variable>.
append wa_header to t_header.
clear wa_header.
* Time
wa_header-typ = 'H'.
wa_header-info = <variable>.
append wa_header to t_header.
clear wa_header.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = t_header.
* i_logo = 'Z_LOGO'.
endform.
Thanks,
Sriram Ponna. -
Display a Long Text in ALV report
Hi,
I want to display the PO header long text in ALV Report that is 255 character width.
Please help me out how to do this.
please it is very urgent
Thanks and regards
KrishnaUse READ_TEXT and concatenate the first lines of the text.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = 'F01'
language = sy-langu
name = lv_name " purchase order with leading zeroes
object = 'EKKO'
TABLES
lines = t_lines
EXCEPTIONS
OTHERS = 8.
Regards -
Run alv report without selection screen in background
Hello Every body,
i programmed a ALV Report without selection screen, and i want to create a job for this alv report.
Any help?
Thank u.
Ouail.Hi Steve,
Can you tell me where i have to put your code?
this is my abap code:
START-OF-SELECTION.
p_filref = '\\SAPSERVER\f\SAFT\ivat\FI_Extract_1000_20140709_102346_910.XML'.
PERFORM copy_from_xml_to_itab TABLES it_ref_file
ref_xml_data
USING p_filref.
**Begin Extraction File
SUBMIT ZZ_FI_IVAT_EXTRACTOR
WITH p_bukrs EQ '1000'
WITH p_gjahr EQ '1998'
WITH filepath EQ '\\SAPSERVER\f\SAFT\iVAT_Extractie\'
WITH cldata eq space
AND RETURN.
DATA: FILE_TABLE TYPE TABLE OF SDOKPATH,
DIR_TABLE TYPE TABLE OF SDOKPATH.
CALL FUNCTION 'TMP_GUI_DIRECTORY_LIST_FILES'
EXPORTING
DIRECTORY = '\\SAPSERVER\f\SAFT\iVAT_Extractie\'
FILTER = '*.*'
TABLES
FILE_TABLE = FILE_TABLE
DIR_TABLE = DIR_TABLE
EXCEPTIONS
CNTL_ERROR = 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.
ENDIF.
"get file name
LOOP AT FILE_TABLE INTO p_filref.
ENDLOOP.
CONCATENATE '\\SAPSERVER\f\SAFT\iVAT_Extractie\' p_filref INTO path.
PERFORM copy_from_xml_to_itab TABLES t_ext_file
ext_xml_data
USING path.
PERFORM fill_xml_tab_in .
perform build_fieldcatalog.
PERFORM compare_data_ref_ext.
PERFORM send_email.
perform display_alv_report.
PERFORM delete_extraction_file.
in the perform copy_from_xml_to_itab TABLES it_ref_file......, i use this code:
CREATE OBJECT gcl_xml.
*Upload XML File
CALL METHOD gcl_xml->import_from_file
EXPORTING
filename = p_filref
RECEIVING
retcode = gv_subrc.
IF gv_subrc = 0.
CALL METHOD gcl_xml->render_2_xstring
IMPORTING
retcode = gv_subrc
stream = gv_xml_string
size = gv_size.
IF gv_subrc = 0.
REFRESH gt_xml_data[].
* Convert XML to internal table
CALL FUNCTION 'SMUM_XML_PARSE'
EXPORTING
xml_input = gv_xml_string
TABLES
xml_table = gt_xml_data
return = gt_return.
ENDIF.
ENDIF.
Maybe you are looking for
-
10.8.2 Supplemental update crashes?
Hi All, How are you getting on with the 10.8.2 supplemental update? Mine results in yet more problems. After the update and subsequent restart, all was fine for about 4 hours, then total lock-up. I had to force restart my MBA and on boot-up I got loa
-
IPhoto Galleries not appearing in Aperture's Moblie Me.
How do import iPhoto 08 web gallery albums into aperture 2? When I go to Preferences-> Moblie Me I don't see the galleries which have been published from iPhoto.
-
how do I open and use this app after I have paid for my subscription? I previously downloaded Primeir Pro CC for the trial and when I try to open the app it says my trial has ended and there is no other option to sign in and use the app?
-
I just bought macbook air yesterday. Do I need to buy OS X Moutain Lion from App store?
Please becase I saw from app store there hv a osx lion. Do i need to buy it to my new macbook air?
-
Elements 12 will not allow me to enter serial number on installation
elements 12 will not allow me to enter serial number on installation