Report into xls format
Hi All,
i want to convert a report int xls format....how can i do that????
if anyone has the links which will give the step by step process the please help me....
Here you go..
http://htmldb.oracle.com/pls/otn/f?p=31517:108
Regards,
Shijesh
Similar Messages
-
Regarding conversion of PDF Reports into .XLS or .XLSX format report in SAP MII
Hi,
Is there any way out within the scope of SAP MII to convert PDF Reports into .XLS or .XLSX formatted output.
It is possible to convert PDF Reports into .CSV format through SAP MII, but I am not sure about .XLS format.
Can anyone help me doing this?Hi Sue,
I would like to assist! I just reached out to you directly. It will come from: [email protected]
Let's see what we can figure out!
Kind regards, Stacy -
How to Export SSRS report into Excel format using query string
Hello all,
I am new to SSRS world.
Last night i was trying to add a hyperlink on the SSRS report (.rdl) file, by clicking which we can export the report into "Excel" format, but with no luck.
Can anybody tell me how to form the hyperlink, so that we can export the report with its current content ( I mean the report content generated by selecting some parameter values)Hi Suman85,
Based on your scenario, you want to add a link on the SSRS report file, and then click it you can export the report into “Excel” format.
Just as kishan1901 said , you can add a textbox to your report and type in the words “Click here and export the report
to excel” .Then right-click the textbox and select Properties. Switch to Navigation tab, click the radiobutton of ‘Jump to URL’ and type in the expression ,here is just a example:
="http://vyof1884200/ReportServer$youhoo?/My+Adventure+Works/Product+Sales+and+Profitability+by+Month&rs:Command=Render&rs:Format=excel"
Then preview the report ,you will see
Click here and export the report to excel
when you move the mouse to it ,the mouse will become a hand ,then left-click, it will jump out a dialog box to indicate user whether the excel file should be saved , opened or canceled.
I think this is what you want, if you have any further requirement, could you please describe it in more detail? We would give you some resolution or workaround.
Regards,
Challen Foo -
Isuue: Exporting Data into xls format
Hi,
I've connected to DB via Jdeveloper!!
I tried using "export" function from Oracle DB Table,
Its exporting only sql scripts, I would like to know is there way to export the data(metadata) from DB tables into xls format.
Thanks!!!!I tried using "export" function from Oracle DB Table,
Its exporting only sql scripts, I would like to know is there way to export the data(metadata) from DB tables into xls format.
Wrong forum! You need to post the question in a JDeveloper forum.
https://community.oracle.com/community/developer/english/development_tools/application_development_in_java/jdeveloper_and_adf
If you use the free Oracle sql developer (based on JDeveloper) you could just write a simple query to get data in CSV (not xls) format:
SELECT /*csv*/ * from myTable
See this article by Jeff Smith
http://www.thatjeffsmith.com/archive/2012/05/formatting-query-results-to-csv-in-oracle-sql-developer/ -
Conveting a BO report into XML format
Post Author: Gunjan
CA Forum: Integrated Solutions
Hi,
We have a requirement to convert BO Report into XML format.
Could you please help if there is any tool available to directly convert BO report into an XML based on a predefind XSD.
Thanks
GunjanPost Author: Gunjan
CA Forum: Integrated Solutions
Hi,
We have a requirement to convert BO Report into XML format.
Could you please help if there is any tool available to directly convert BO report into an XML based on a predefind XSD.
Thanks
Gunjan -
Hi Frns,
I wanna convert webi report into html format...
Is there any possibility in bo???
I'm using sap bo 4.1 sp2
Regards
RiazHi Riaz,
As per my knowledge Webi report export to HTML format is not possible in BI 4.1
You can raise a request in SAP IDEA's place
Refer the below links for workaround solution
[WebI XI 3.x] Export report to HTML or XML
Does BOE XI 3.1 supports exporting WebI to XML format? -
Modification in report into ALV Format
Hi Experts
How can I modify this report in ALV Format with Top of page and Parameters should be display on runtime.
Can anyone modify my program please
Thanks in advanced.
REPORT FZEL LINE-SIZE 220 LINE-COUNT 75
NO STANDARD PAGE HEADING.
TABLES : equi,
equz,
imptt,
imrg,
eqkt,
iloa.
TYPES: BEGIN OF ty_data ,
equnr type equnr, " Euipment no
eqktx type eqkt-eqktx, " Equipment Text
eqfnr type iloa-eqfnr, " Equipment Sort field
idate type imrg-idate, " Measuring Date
recdu type imrg-recdu, " Unit of measuring ='KM','L','H'
recdv type imrg-recdv, " Counter reading data
cancl type imrg-cancl,
END OF ty_data.
TYPES: BEGIN OF ty_final,
equnr type equnr, " Equipment no
eqktx type eqkt-eqktx, " Equipment Text
eqfnr type iloa-eqfnr, " Equipment Sort field
idate type imrg-idate, " Measuring Date
min_date_km type imrg-idate, " Min Date
min_km type imrg-recdv, " Max Km
max_date_km type imrg-idate,
max_km type imrg-recdv, " Min km
t_max_min_km type imrg-recdv, " Total min_km-max_km
min_date_hr type imrg-idate, " Max Date
min_hr type imrg-recdv, " Max hr
max_date_hr type imrg-idate,
max_hr type imrg-recdv, " Min hr
t_max_min_hr type imrg-recdv, " Total min_hr-max_hr
min_date_lit type imrg-idate,
min_lit type imrg-recdv, " Min lit
max_date_lit type imrg-idate,
max_lit type imrg-recdv, " Max lit
fuel_con type imrg-recdv, " Total_hrs / t_max_min_hr
fuel_con2 type imrg-recdv, " Total_hrs / t_max_min_hr
km_l type imrg-recdv, " t max_min_km / t_max_min_lit
l_p type imrg-recdv , " t_max_min_lit / t_max_min_hr
l_p2 type imrg-recdv ,
END OF ty_final.
DATA: i_data TYPE TABLE OF ty_data, " internal table
wa_data TYPE ty_data, " work area
i_final TYPE TABLE OF ty_final, " internal table
wa_final TYPE ty_final. " work area
SELECTION-SCREEN BEGIN OF BLOCK blk WITH FRAME.
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: p_equnr FOR equi-equnr OBLIGATORY, "no-extension no intervals,
p_idate FOR imrg-idate. "NO-EXTENSION NO INTERVALS OBLIGATORY,
"p_recdu FOR imrg-recdu." NO-EXTENSION NO INTERVALS ."default 'M3'" OBLIGATORY.
SELECTION-SCREEN END OF BLOCK blk1.
SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002.
SELECTION-SCREEN END OF BLOCK blk2.
SELECTION-SCREEN END OF BLOCK blk.
TOP-OF-PAGE.
FORMAT INTENSIFIED ON.
WRITE:/55(40) ' WAGNERS INVESTMENT LIMITED '.
WRITE:/50(40) ' VEHICLE FUEL CONSUMPTION REPORT ' CENTERED ,
2 'Page', sy-pagno.
FORMAT INTENSIFIED OFF.
WRITE:/50(40) '----
' CENTERED .
FORMAT INTENSIFIED ON.
WRITE:/2 sy-datum COLOR 3, sy-uzeit .
"WRITE:/1 S903-SPMON ."p_yearf.
ULINE.
"CENTERED.
write: /2 'Equipment No :'left-justified,p_equnr-low color 2 , ' to ' , p_equnr-high color 2.
write: /2 'Date From :', p_idate-low color 2 , ' to ' , p_idate-high color 2.
"write: /2 'Sort Field:'left-justified,p_eqfnr-low color 2 , ' to ' , p_eqfnr-high color 2.
SKIP.
ULINE.
WRITE:/1 sy-vline,
2 ' EQUIP#', 10 sy-vline ,
11 ' NAME', 40 sy-vline,
41 ' SORT', 60 sy-vline,
61 ' START DATE', 74 sy-vline,
75 ' END DATE', 87 sy-vline,
88 ' START KM', 100 sy-vline,
101 ' END KM' , 113 sy-vline,
114 ' TOTAL KM', 126 sy-vline,
127 ' START HR', 139 sy-vline,
140 ' END HR', 152 sy-vline,
153 ' TOTAL HR', 167 sy-vline,
168 ' FUEL CON ', 180 sy-vline,
181 ' KM L', 193 sy-vline,
194 ' LIT PER HR ', 206 sy-vline,
207 ' EQUIP NO', 220 sy-vline,
223 'KM L', 232 sy-vline,
233 'LIT PER KM', 245 sy-vline,
246 'TOTAL L/HR', 258 sy-vline.
FORMAT COLOR 3 ON.
ULINE.
END-OF-PAGE.
START-OF-SELECTION.
select aequnr deqktx feqfnr eidate erecdu erecdv
into table i_data
from equi AS a
inner join equz as b
on aequnr = bequnr
inner join iloa as f
on biloan = filoan
inner join imptt as c
on aobjnr = cmpobj
inner join eqkt as d
on aequnr = dequnr
inner join imrg as e
on epoint = cpoint
where a~equnr in p_equnr
and
e~idate in p_idate and
e~cancl ne 'X'.
loop at i_data into wa_data.
CLEAR: wa_final.
READ TABLE i_final into wa_final
with key equnr = wa_data-equnr." BINARY SEARCH.
if sy-subrc EQ 0.
PERFORM F_GET_MAX_DATA.
PERFORM F_GET_MAX_HOURS.
PERFORM F_GET_MAX_LIT.
PERFORM prepare_final_rec USING'M'. " Modify Existing Record
ElSE.
PERFORM prepare_final_rec USING'A'. " Append New Record.
ENDIF.
ENDLOOP.
LOOP AT i_final into wa_final.
on change of wa_final-equnr.
WRITE:/1 sy-vline,
2 wa_final-equnr , 10 sy-vline,
11 wa_final-eqktx , 40 sy-vline,
41 wa_final-eqfnr , 60 sy-vline,
61 wa_final-min_date_km color 2 , 74 sy-vline,
75 wa_final-max_date_km color 2 LEFT-JUSTIFIED , 87 sy-vline,
88 wa_final-min_km EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED color 3 , 100 sy-vline,
101 wa_final-max_km EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED color 3 , 113 sy-vline,
114 wa_final-t_max_min_km EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED , 126 sy-vline,
127 wa_final-min_hr EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED color 4 , 139 sy-vline,
140 wa_final-max_hr EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED color 4 , 152 sy-vline,
153 wa_final-t_max_min_hr EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED , 167 sy-vline,
168 wa_final-fuel_con2 EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED , 180 sy-vline,
181 wa_final-km_l EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED ,193 sy-vline,
194 wa_final-l_p2 EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED color 2 , 206 sy-vline,
207 wa_final-equnr ,220 sy-vline.
endon.
endloop.
refresh i_final.
clear i_final.
FORM F_GET_MAX_DATA.
select single MAX( eidate ) Min( eidate ) MAX( erecdv ) MIN( erecdv )
into corresponding fields of (wa_final-max_date_km,wa_final-min_date_km,wa_final-max_km ,wa_final-min_km)
from equi AS a
inner join equz as b
on aequnr = bequnr
inner join iloa as f
on biloan = filoan
inner join imptt as c
on aobjnr = cmpobj
inner join eqkt as d
on aequnr = dequnr
inner join imrg as e
on epoint = cpoint
where a~equnr in p_equnr
and
e~idate in p_idate
and
e~cancl ne 'X' and
e~recdu = 'KM'
AND a~equnr = wa_data-equnr.
ENDFORM.
FORM F_GET_MAX_HOURS.
select single MAX( erecdv ) MIN( erecdv )
into corresponding fields of (wa_final-max_hr, wa_final-min_hr)
from equi AS a
inner join equz as b
on aequnr = bequnr
inner join iloa as f
on biloan = filoan
inner join imptt as c
on aobjnr = cmpobj
inner join eqkt as d
on aequnr = dequnr
inner join imrg as e
on epoint = cpoint
where a~equnr in p_equnr
and
e~idate in p_idate
and
e~cancl ne 'X' and
e~recdu = 'H'
AND a~equnr = wa_data-equnr .
ENDFORM.
FORM F_GET_MAX_LIT.
select SUM( e~recdv )
into corresponding fields of (wa_final-fuel_con2)
from equi AS a
inner join eqkt as b
on bequnr = aequnr
inner join imptt as c
on cmpobj = aobjnr
inner join imrg as e
on epoint = cpoint
where a~equnr in p_equnr
and
e~idate in p_idate
and
e~cancl ne 'X' and
e~recdu = 'L'
AND a~equnr = wa_data-equnr.
ENDFORM.
FORM prepare_final_rec USING p_mode TYPE char1.
wa_final-t_max_min_km = wa_final-max_km - wa_final-min_km .
wa_final-t_max_min_hr = wa_final-max_hr - wa_final-min_hr.
if wa_final-t_max_min_km <> 0 .
wa_final-km_l = ( wa_final-max_km - wa_final-min_km ) / ( wa_final-fuel_con2 ) .
ELSE.
wa_final-km_l = 0.
endif.
if wa_final-t_max_min_hr <> 0 .
wa_final-l_p2 = ( wa_final-fuel_con2 ) / ( wa_final-t_max_min_hr ) .
ELSE.
wa_final-l_p2 = 0.
endif.
IF p_mode = 'A'.
wa_final-equnr = wa_data-equnr.
wa_final-eqktx = wa_data-eqktx.
wa_final-eqfnr = wa_data-eqfnr.
wa_final-t_max_min_km = wa_final-min_km - wa_final-max_km .
wa_final-t_max_min_hr = wa_final-max_hr - wa_final-min_hr.
wa_final-km_l = ( wa_final-max_km - wa_final-min_km ) / ( wa_final-fuel_con2 ).
wa_final-l_p2 = ( wa_final-fuel_con2 ) / ( wa_final-t_max_min_hr ) .
APPEND wa_final TO i_final .
ELSE.
MODIFY i_final FROM wa_final
TRANSPORTING
eqfnr
max_date_km
min_date_km
max_date_lit
min_date_lit
max_date_hr
min_date_hr
max_km
min_km
max_hr
min_hr
t_max_min_km
t_max_min_hr
fuel_con2
km_l
l_p2
where equnr = wa_data-equnr.
ENDIF.
ENDFORM. " PREPARE_FINAL_RECHi Guys
Thanks for your reply, I know how to implement the FM for ALV but little confused where to call , See my correction below it is displaying the result in different way that ie...first displaying Equipment no, name,.correctly but the other values such as km,L,HR all are displaying zero first, when I press back then it is displying the value twice thrise........keep on displaying duplicate records continuesly when back back is press can anyone correct this please
REPORT XYZ LINE-SIZE 220 LINE-COUNT 75
NO STANDARD PAGE HEADING.
TABLES : equi,
equz,
imptt,
imrg,
eqkt,
iloa.
type-pools: slis. "ALV Declarations
TYPES: BEGIN OF ty_data ,
equnr type equnr, " Euipment no
eqktx type eqkt-eqktx, " Equipment Text
eqfnr type iloa-eqfnr, " Equipment Sort field
idate type imrg-idate, " Measuring Date
recdu type imrg-recdu, " Unit of measuring ='KM','L','H'
recdv type imrg-recdv, " Counter reading data
cancl type imrg-cancl,
END OF ty_data.
TYPES: BEGIN OF ty_final,
equnr type equnr, " Equipment no
eqktx type eqkt-eqktx, " Equipment Text
eqfnr type iloa-eqfnr, " Equipment Sort field
idate type imrg-idate, " Measuring Date
min_date_km type imrg-idate, " Min Date
min_km type P DECIMALS 2, " Max Km
max_date_km type imrg-idate,
max_km type P DECIMALS 2, " Min km
t_max_min_km type P DECIMALS 2, " Total min_km-max_km
min_date_hr type imrg-idate, " Max Date
min_hr type P DECIMALS 2, " Max hr
max_date_hr type imrg-idate,
max_hr type P DECIMALS 2, " Min hr
t_max_min_hr type P DECIMALS 2, " Total min_hr-max_hr
min_date_lit type imrg-idate,
min_lit type P DECIMALS 2, " Min lit
max_date_lit type imrg-idate,
max_lit type P DECIMALS 2, " Max lit
fuel_con type P DECIMALS 2, " Total_hrs / t_max_min_hr
fuel_con2 type P DECIMALS 2, " Total_hrs / t_max_min_hr
km_l type P DECIMALS 2, " t max_min_km / t_max_min_lit
l_p type P DECIMALS 2 , " t_max_min_lit / t_max_min_hr
l_p2 type P DECIMALS 2 ,
END OF ty_final.
*ALV data declarations
data: fieldcatalog type slis_t_fieldcat_alv with header line,
gd_tab_group type slis_t_sp_group_alv,
gd_layout type slis_layout_alv,
gd_repid like sy-repid.
DATA: i_data TYPE TABLE OF ty_data, " internal table
wa_data TYPE ty_data, " work area
i_final TYPE TABLE OF ty_final, " internal table
wa_final TYPE ty_final. " work area
SELECTION-SCREEN BEGIN OF BLOCK blk WITH FRAME.
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: p_equnr FOR equi-equnr OBLIGATORY, "no-extension no intervals,
p_idate FOR imrg-idate. "NO-EXTENSION NO INTERVALS OBLIGATORY,
"p_recdu FOR imrg-recdu." NO-EXTENSION NO INTERVALS ."default 'M3'" OBLIGATORY.
SELECTION-SCREEN END OF BLOCK blk1.
SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002.
SELECTION-SCREEN END OF BLOCK blk2.
SELECTION-SCREEN END OF BLOCK blk.
TOP-OF-PAGE.
FORMAT INTENSIFIED ON.
WRITE:/55(40) ' WAGNERS INVESTMENT LIMITED '.
WRITE:/50(40) ' VEHICLE FUEL CONSUMPTION REPORT ' CENTERED ,
2 'Page', sy-pagno.
FORMAT INTENSIFIED OFF.
WRITE:/50(40) '----
' CENTERED .
FORMAT INTENSIFIED ON.
WRITE:/2 sy-datum COLOR 3, sy-uzeit .
"WRITE:/1 S903-SPMON ."p_yearf.
ULINE.
"CENTERED.
write: /2 'Equipment No :'left-justified,p_equnr-low color 2 , ' to ' , p_equnr-high color 2.
write: /2 'Date From :', p_idate-low color 2 , ' to ' , p_idate-high color 2.
END-OF-PAGE.
START-OF-SELECTION.
select aequnr deqktx feqfnr eidate erecdu erecdv
into table i_data
from equi AS a
inner join equz as b
on aequnr = bequnr
inner join iloa as f
on biloan = filoan
inner join imptt as c
on aobjnr = cmpobj
inner join eqkt as d
on aequnr = dequnr
inner join imrg as e
on epoint = cpoint
where a~equnr in p_equnr
and
e~idate in p_idate and
e~cancl ne 'X'.
loop at i_data into wa_data.
CLEAR: wa_final.
READ TABLE i_final into wa_final
with key equnr = wa_data-equnr." BINARY SEARCH.
if sy-subrc EQ 0.
PERFORM F_GET_MAX_DATA.
PERFORM F_GET_MAX_HOURS.
PERFORM F_GET_MAX_LIT.
PERFORM prepare_final_rec USING'M'. " Modify Existing Record
ElSE.
PERFORM prepare_final_rec USING'A'. " Append New Record.
perform build_fieldcatalog.
perform build_layout.
perform display_alv_report.
ENDIF.
ENDLOOP.
refresh i_final.
clear i_final.
FORM F_GET_MAX_DATA.
select single MAX( eidate ) Min( eidate ) MAX( erecdv ) MIN( erecdv )
into corresponding fields of (wa_final-max_date_km,wa_final-min_date_km,wa_final-max_km ,wa_final-min_km)
from equi AS a
inner join equz as b
on aequnr = bequnr
inner join iloa as f
on biloan = filoan
inner join imptt as c
on aobjnr = cmpobj
inner join eqkt as d
on aequnr = dequnr
inner join imrg as e
on epoint = cpoint
where a~equnr in p_equnr
and
e~idate in p_idate
and
e~cancl ne 'X' and
e~recdu = 'KM'
AND a~equnr = wa_data-equnr.
ENDFORM.
FORM F_GET_MAX_HOURS.
select single MAX( erecdv ) MIN( erecdv )
into corresponding fields of (wa_final-max_hr, wa_final-min_hr)
from equi AS a
inner join equz as b
on aequnr = bequnr
inner join iloa as f
on biloan = filoan
inner join imptt as c
on aobjnr = cmpobj
inner join eqkt as d
on aequnr = dequnr
inner join imrg as e
on epoint = cpoint
where a~equnr in p_equnr
and
e~idate in p_idate
and
e~cancl ne 'X' and
e~recdu = 'H'
AND a~equnr = wa_data-equnr .
ENDFORM.
FORM F_GET_MAX_LIT.
select SUM( e~recdv )
into corresponding fields of (wa_final-fuel_con2)
from equi AS a
inner join eqkt as b
on bequnr = aequnr
inner join imptt as c
on cmpobj = aobjnr
inner join imrg as e
on epoint = cpoint
where a~equnr in p_equnr
and
e~idate in p_idate
and
e~cancl ne 'X' and
e~recdu = 'L'
AND a~equnr = wa_data-equnr.
ENDFORM.
FORM prepare_final_rec USING p_mode TYPE char1.
wa_final-t_max_min_km = wa_final-max_km - wa_final-min_km .
wa_final-t_max_min_hr = wa_final-max_hr - wa_final-min_hr.
if wa_final-t_max_min_km <> 0 .
wa_final-km_l = ( wa_final-max_km - wa_final-min_km ) / ( wa_final-fuel_con2 ) .
ELSE.
wa_final-km_l = 0.
endif.
if wa_final-t_max_min_hr <> 0 .
wa_final-l_p2 = ( wa_final-fuel_con2 ) / ( wa_final-t_max_min_hr ) .
ELSE.
wa_final-l_p2 = 0.
endif.
IF p_mode = 'A'.
wa_final-equnr = wa_data-equnr.
wa_final-eqktx = wa_data-eqktx.
wa_final-eqfnr = wa_data-eqfnr.
wa_final-t_max_min_km = wa_final-min_km - wa_final-max_km .
wa_final-t_max_min_hr = wa_final-max_hr - wa_final-min_hr.
wa_final-km_l = ( wa_final-max_km - wa_final-min_km ) / ( wa_final-fuel_con2 ).
gd_repid = sy-repid.
wa_final-l_p2 = ( wa_final-fuel_con2 ) / ( wa_final-t_max_min_hr ) .
APPEND wa_final TO i_final .
ELSE.
MODIFY i_final FROM wa_final
TRANSPORTING
eqfnr
max_date_km
min_date_km
max_date_lit
min_date_lit
max_date_hr
min_date_hr
max_km
min_km
max_hr
min_hr
t_max_min_km
t_max_min_hr
fuel_con2
km_l
l_p2
where equnr = wa_data-equnr.
ENDIF.
ENDFORM. " PREPARE_FINAL_REC
*& Form BUILD_FIELDCATALOG
Build Fieldcatalog for ALV Report
form build_fieldcatalog.
I.e. Field type may be required in-order for
the 'TOTAL' function to work.
fieldcatalog-fieldname = 'EQUNR'.
fieldcatalog-seltext_m = 'Equip no'.
fieldcatalog-tabname = 'i_final'.
fieldcatalog-col_pos = 0.
fieldcatalog-outputlen = 10.
fieldcatalog-emphasize = 'X'.
fieldcatalog-key = 'X'.
fieldcatalog-do_sum = 'X'.
fieldcatalog-no_zero = 'X'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'EQKTX'.
fieldcatalog-seltext_m = 'Description'.
fieldcatalog-tabname = 'i_final'.
fieldcatalog-col_pos = 1.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'EQFNR'.
fieldcatalog-seltext_m = 'Sortfield'.
fieldcatalog-tabname = 'i_final'.
fieldcatalog-col_pos = 2.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MIN_DATE_KM'.
fieldcatalog-seltext_m = 'Min Date'.
fieldcatalog-tabname = 'i_final'.
fieldcatalog-col_pos = 3.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MAX_DATE_KM'.
fieldcatalog-seltext_m = 'Max Date'.
fieldcatalog-tabname = 'i_final'.
fieldcatalog-col_pos = 4.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MIN_KM' .
fieldcatalog-seltext_m = 'Min KM'.
fieldcatalog-tabname = 'i_final'.
fieldcatalog-col_pos = 5.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MAX_KM' .
fieldcatalog-seltext_m = 'Max KM'.
fieldcatalog-tabname = 'i_final'.
fieldcatalog-col_pos = 6.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'T_MAX_MIN_KM' .
fieldcatalog-tabname = 'i_final'.
fieldcatalog-seltext_m = 'Total KM'.
fieldcatalog-col_pos = 7.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MIN_HR' .
fieldcatalog-seltext_m = 'Min Hr'.
fieldcatalog-tabname = 'i_final'.
fieldcatalog-col_pos = 8.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MAX_HR' .
fieldcatalog-seltext_m = 'Max Hr'.
fieldcatalog-tabname = 'i_final'.
fieldcatalog-col_pos = 9.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'T_MAX_MIN_HR' .
fieldcatalog-seltext_m = 'Total HR'.
fieldcatalog-tabname = 'i_final'.
fieldcatalog-col_pos = 10.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'FUEL_CON2' .
fieldcatalog-seltext_m = 'Km/L'.
fieldcatalog-tabname = 'i_final'.
fieldcatalog-col_pos = 11.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'L_P2' .
fieldcatalog-seltext_m = 'Lit/HR'.
fieldcatalog-tabname = 'i_final'.
fieldcatalog-col_pos = 12.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
endform. " BUILD_FIELDCATALOG
*& Form BUILD_LAYOUT
Build layout for ALV grid report
form build_layout.
gd_layout-no_input = 'X'.
gd_layout-colwidth_optimize = 'X'.
gd_layout-totals_text = 'Totals'(201).
gd_layout-totals_only = 'X'.
gd_layout-f2code = 'DISP'. "Sets fcode for when double
"click(press f2)
gd_layout-zebra = 'X'.
gd_layout-group_change_edit = 'X'.
gd_layout-header_text = 'helllllo'.
endform. " BUILD_LAYOUT
*& Form DISPLAY_ALV_REPORT
Display report using ALV grid
form display_alv_report.
gd_repid = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
i_callback_user_command = 'USER_COMMAND'
i_grid_title = outtext
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
it_special_groups = gd_tabgroup
IT_EVENTS = GT_XEVENTS
i_save = 'X'
is_variant = z_template
tables
t_outtab = i_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.
endform. " DISPLAY_ALV_REPORT -
Hi Experts,
I have written a classical report with write statements and when i am downloading in excel the format is mismatching and now i want to convert into PDF format.
How to convert into PDF format from Classical report ?
YusufHi yusuf,
please find the below report,,
please make two include programs before executing it,
there codes are pasted below,
INCLUDE zimpr_data_declaration.
INCLUDE zimpr_performs_wrap.
REPORT zimpr_word_wrap NO STANDARD PAGE HEADING LINE-SIZE 115..
INCLUDE for DATA DECLARATION *
INCLUDE zimpr_data_declaration.
INCLUDE for all performs. *
INCLUDE zimpr_performs_wrap.
TOP-OF-PAGE--
TOP-OF-PAGE.
PERFORM f_top_page. "TOP OF THE REPORT PAGE,I.E. HEADER.
START-OF-SELECTION.
SET PF-STATUS 'SEL_SCREEN'. "PF-STATUS OF THE SELECTION SCREEN.
PERFORM f_data_retrieval. "PERFORM FOR ALL SELECT STATEMENTS.
PERFORM f_report_display. "REPORT DISPLAY,WRITE STATEMENTS.
--Define the actions to be performed for pf-status-----
AT USER-COMMAND.
wf_ok_code = sy-ucomm.
wf_save_ok = wf_ok_code.
CLEAR wf_ok_code.
CASE wf_save_ok.
WHEN 'PDF'. "WHEN PDF ICON IS CLICKED,REPORT WILL CONVERT INTO PDF.
loc_repid = sy-repid. "PROGRAM NAME
--THIS FM SETS THE PARAMETERS FOR LAYOUT OF PDF OUTPUT--
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
layout = loc_paart "LANDSCAPE LAYOUT
line_size = loc_linsz "CHARACTER WIDTH OF REPORT
no_dialog = 'X'
user = sy-uname "USERNAME
IMPORTING
out_parameters = loc_print_parms "OUTPUT PARAMETERS WILL BE COLLECTED HERE.
valid = loc_valid
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
--FOR GENERATING THE SPOOL NUMBER--
NEW-PAGE PRINT ON NO DIALOG PARAMETERS loc_print_parms. " This allocates the spool no
"to the screen without the dialog screen.
PERFORM f_top_page.
PERFORM f_report_display.
NEW-PAGE PRINT OFF. "This marks the end of the screen for which the spool no was generated.
wf_id = sy-spono. " This assign the spool no of the screen to the variable.
--PERFORM FOR GETTING THE PDF OUTPUT--
PERFORM f_pdf_display.
--PERFORM FOR DOWLOADING FILE TO A LOCAL DISK--
PERFORM f_download_local.
WHEN 'BACK'.
LEAVE PROGRAM.
ENDCASE.
include data declaration----
*& Include ZIMPR_DATA_DECLARATION
TYPE-POOLS : shlp.
DATA : wf_ordert TYPE aufk-auart. "ORDER TYPE
DATA : wf_order TYPE aufk-aufnr. "ORDER NUMBER
DATA : wf_bdate TYPE afko-gstrp. "BASIC START DATE
DATA : wf_status(4) TYPE c ."rihea-i_astatin. "STATUS
DATA : wf_objnr TYPE jest-objnr VALUE 'OR%'. "Object number
DATA : wf_aufnr TYPE aufk-aufnr.
DATA : wf_name TYPE thead-tdname. "NAME TO PASS IN FM READ_TEXT
DATA : wf_date1(12) TYPE c. "DATE
DATA : wf_i1(3) TYPE n,wc_i1(3) TYPE n VALUE '1'. "COUNTERS FOR REPORT DISPLAY
DATA : wf_i2(3) TYPE n,wc_i2(3) TYPE n VALUE '1'.
DATA : wf_kopf TYPE tdid VALUE 'KOPF',wf_aufk TYPE tdobject VALUE 'AUFK'.
DATA : wf_save_ok TYPE sy-ucomm ,wf_ok_code TYPE sy-ucomm.
DATA: wf_id TYPE tsp01-rqident , " For storing Spool request number
wf_bytes TYPE i . " For storing the bytes of data to be converted to PDF.
DATA : wf_langu(2) TYPE c VALUE 'EN'.
DATA: wf_pripar TYPE pri_params, " Structure for Passing Print Parameters
wf_rcpar TYPE arc_params. " ImageLink structure
DATA : wf_statu TYPE dfies-fieldname VALUE 'STATUS',
wf_field TYPE help_info-dynprofld VALUE 'S_STATUS'.
&--SELECTION SCREEN--
SELECTION-SCREEN BEGIN OF BLOCK b_1 WITH FRAME TITLE text-000.
SELECTION-SCREEN SKIP 1.
SELECT-OPTIONS: s_ordert FOR wf_ordert . "ORDER TYPE
SELECT-OPTIONS: s_order FOR wf_order OBLIGATORY. "ORDER NUMBER
SELECT-OPTIONS: s_bdate FOR wf_bdate. "BASIC START DATE
SELECT-OPTIONS: s_status FOR wf_status matchcode object zei_sys . "SYSTEM STATUS
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN END OF BLOCK b_1.
*--INTERNAL TABLES--
TYPES : BEGIN OF ty_aufk,
aufnr TYPE aufk-aufnr, "OREDR NUMBER
auart TYPE aufk-auart, "ORDER TYPE
objnr TYPE aufk-objnr, "OBJECT NUMBER
ktext type aufk-ktext, "SHORT TEXT
gstrp TYPE afko-gstrp, "BASIC START DATE
END OF ty_aufk.
TYPES : BEGIN OF ty_tj02t,
objnr TYPE aufk-objnr, "OBJECT NUMBER
txt04 TYPE tj02t-txt04, "STATUS
istat TYPE tj02t-istat, "Object status
spras TYPE tj02t-spras, "LANGUAGE KEY
END OF ty_tj02t.
TYPES : BEGIN OF ty_temp,
objnr TYPE aufk-objnr,
status(300) TYPE c,
END OF ty_temp.
TYPES : BEGIN OF ty_wrap,
line(54) TYPE c, "LONG TEXT
END OF ty_wrap.
TYPES : BEGIN OF ty_wrap2,
line(25) TYPE c, "STATUS
END OF ty_wrap2.
TYPES : BEGIN OF ty_f4,
txt04 TYPE tj02t-txt04,
txt30 TYPE tj02t-txt30,
END OF ty_f4.
types : begin of ty_sta,
istat type tj02t-istat,
objnr type jest-objnr,
end of ty_sta.
data : int_sta type table of ty_sta with header line.
DATA : int_f4 TYPE TABLE OF ty_f4 WITH HEADER LINE.
DATA: int_pdf TYPE TABLE OF tline WITH HEADER LINE. "TABLE FOR PDF CONVERSION
DATA: int_wrap TYPE TABLE OF ty_wrap WITH HEADER LINE. "TABLE FOR LONGTEXT
DATA: int_wrap2 TYPE TABLE OF ty_wrap2 WITH HEADER LINE. "TABLE FOR STATUS
DATA: int_temp TYPE TABLE OF ty_temp WITH HEADER LINE. "Table for concatenation of system status.
DATA: int_aufk TYPE TABLE OF ty_aufk WITH HEADER LINE.
DATA: int_tj02t TYPE TABLE OF ty_tj02t WITH HEADER LINE.
DATA: int_tline TYPE STANDARD TABLE OF tline WITH HEADER LINE. "TABLE FOR READ_TEXT.
DATA : int_fld TYPE TABLE OF dfies ,wa_fld LIKE LINE OF int_fld. " Field Type for FM for F4 help
DATA :int_return TYPE TABLE OF ddshretval WITH HEADER LINE .
DATA:
loc_print_parms LIKE pri_params, "PRINT PARAMETERS
loc_valid(1) TYPE c,
loc_file type SDOK_CHTRD,
loc_bytecount TYPE i, "NUMBER OF BYTES TRANSFERRED
loc_length TYPE i, "LINE-LENGTH
loc_rqident LIKE tsp01-rqident, "SPOOL NUMBER
loc_rq2name(12) TYPE c.
DATA: loc_filename LIKE rlgrap-filename. "FILENAME
DATA:loc_repid LIKE sy-repid, " Report to execute
loc_linsz LIKE sy-linsz VALUE 115, " Line size
loc_paart LIKE sy-paart VALUE 'X_65_132'. " Paper Format
Include ZIMPR_PERFORMS_WRAP----
*& Include ZIMPR_PERFORMS_WRAP
*& Form f_top_page
top-of the page
--> p1 text
<-- p2 text
FORM f_top_page .
*--HEADER--
FORMAT COLOR 1 .
WRITE : text-010.
FORMAT COLOR 1 OFF.
WRITE : / text-011,sy-datum NO-GAP.
WRITE : / text-012,sy-uzeit NO-GAP,90 text-013,101 sy-uname.
ULINE .
FORMAT COLOR 1 INTENSIFIED OFF .
WRITE : 1 sy-vline, "HEADINGS
2 text-014 NO-GAP,
7 sy-vline,
8 text-015 NO-GAP,
20 sy-vline,
21 text-016 NO-GAP,
76 sy-vline,
77 text-017 NO-GAP,
88 sy-vline,
89 text-018 NO-GAP,
115 sy-vline.
WRITE : /1 sy-vline,
2 text-019 NO-GAP,7 sy-vline,
20 sy-vline,76 sy-vline,77 text-020 NO-GAP,88 sy-vline,115 sy-vline.
ULINE.
FORMAT COLOR 1 OFF.
ENDFORM. " f_top_page
*& Form f_data_retrieval
select statements
--> p1 text
<-- p2 text
FORM f_data_retrieval .
SELECTING ORDER TYPE,ORDER NO.,OBJECT NO. AND BASIC START DATE
SELECT p~aufnr
p~auart
p~objnr
p~ktext
r~gstrp
FROM ( aufk AS p INNER JOIN afko AS r ON raufnr = paufnr )
INTO TABLE int_aufk
WHERE p~aufnr IN s_order AND
p~auart IN s_ordert AND
r~gstrp IN s_bdate AND
p~objnr LIKE wf_objnr.
IF sy-subrc <> 0.
MESSAGE s101(zipm). "no values found for selection criteria.
STOP.
ENDIF.
SORT int_aufk BY aufnr.
DELETE ADJACENT DUPLICATES FROM int_aufk.
SELECT q~istat
p~objnr
FROM ( jest AS p INNER JOIN tj02t AS q ON pstat = qistat )
INTO TABLE int_sta
FOR ALL ENTRIES IN int_aufk
WHERE p~objnr = int_aufk-objnr
AND q~txt04 IN s_status and
q~spras = wf_langu and
p~inact = ''.
IF sy-subrc <> 0.
MESSAGE s101(zipm). "no values found for selection criteria.
STOP.
ENDIF.
SORT int_sta BY objnr.
DELETE ADJACENT DUPLICATES FROM int_sta.
*--SELECTING OBJECT NO.,STATUS AND LANGUAGE--
IF int_sta[] IS NOT INITIAL.
SELECT p~objnr
q~txt04
q~istat
q~spras
FROM ( jest AS p INNER JOIN tj02t AS q ON pstat = qistat )
INTO TABLE int_tj02t
FOR ALL ENTRIES IN int_sta
WHERE p~inact = '' AND
p~objnr = int_sta-objnr AND
q~spras = wf_langu AND
q~txt04 IN s_status AND
p~objnr LIKE wf_objnr.
IF sy-subrc <> 0.
MESSAGE s101(zipm). "no values found for selection criteria.
STOP.
ENDIF.
ENDIF.
ENDFORM. " f_data_retrieval
*& Form f_report_display
report display
--> p1 text
<-- p2 text
FORM f_report_display .
LOOP AT int_tj02t. "concatenating the status into a internal table
AT NEW objnr.
CLEAR int_temp-status.
ENDAT.
CONCATENATE int_temp-status int_tj02t-txt04 INTO int_temp-status SEPARATED BY space.
AT END OF objnr.
int_temp-objnr = int_tj02t-objnr. "key field.
APPEND int_temp.
CLEAR int_temp.
ENDAT.
CLEAR int_tj02t.
ENDLOOP.
LOOP AT int_aufk.
CONCATENATE sy-mandt int_aufk-aufnr INTO wf_name . "concatenating client number and order number
*--THIS FM CAPTURES THE LONG TEXT AND STORES IT IN INTERNAL TABLE--
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = wf_kopf "TEXT ID
language = sy-langu "LANGUAGE
name = wf_name "TEXT NAME
object = wf_aufk "TEXT OBJECT
TABLES
lines = int_tline "LINES OF LONG TEXT.
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
IF sy-subrc <> 0.
int_tline-tdline = int_aufk-ktext.
APPEND int_tline.
CLEAR :int_tline.
ENDIF.
LOOP AT int_tline.
*--THIS FM WRAPS THE LONG TEXT INTO 54 CHARACTERS EACH--
CALL FUNCTION 'RKD_WORD_WRAP'
EXPORTING
textline = int_tline-tdline "LONG TEXT LINE
outputlen = 54 "OUTPUT LENGTH
TABLES
out_lines = int_wrap "INTERNAL TABLE
EXCEPTIONS
outputlen_too_large = 1
OTHERS = 2.
IF sy-subrc <> 0.
CLEAR :int_tline.
ENDIF.
ENDLOOP.
*-- THIS FM WRAPS THE STATUS INTO 25 CHARACTERS EACH--
READ TABLE int_temp WITH KEY objnr = int_aufk-objnr.
CALL FUNCTION 'RKD_WORD_WRAP'
EXPORTING
textline = int_temp-status
outputlen = 25
TABLES
out_lines = int_wrap2
EXCEPTIONS
outputlen_too_large = 1
OTHERS = 2.
IF sy-subrc <> 0.
CONTINUE.
ENDIF.
IF NOT int_wrap2[] IS INITIAL.
ULINE AT (115).
ENDIF.
DESCRIBE TABLE int_wrap LINES wf_i2. "COUNTING THE NO. OF LINES FOR TABLE INT_WRAP
DESCRIBE TABLE int_wrap2 LINES wf_i1. "COUNTING THE NO. OF LINES FOR TABLE INT_WRAP2
WHILE ( wc_i1 LE wf_i1 OR wc_i2 LE wf_i2 ).
IF ( wc_i2 LE wf_i2 ).
READ TABLE int_wrap INDEX wc_i2 . "READING THE INTERNAL TABLE INT_WRAP WITH INDEX
wc_i2 = wc_i2 + 1.
ENDIF.
IF ( wc_i1 LE wf_i1 ).
READ TABLE int_wrap2 INDEX wc_i1 . "READING THE INTERNAL TABLE INT_WRAP2 WITH INDEX
wc_i1 = wc_i1 + 1.
ENDIF.
*--THIS FM CONVERTS THE DATE FROM SYSTEM FORMAT TO OUTPUT FORMAT--
CALL FUNCTION 'CONVERSION_EXIT_SDATE_OUTPUT'
EXPORTING
input = int_aufk-gstrp
IMPORTING
output = wf_date1.
IF NOT int_wrap2[] IS INITIAL .
*--REPORT DISPLAY--
WRITE : /1 sy-vline, 2 int_aufk-auart COLOR = 4 INTENSIFIED OFF NO-GAP ,
7 sy-vline ,8 int_aufk-aufnr COLOR = 4 INTENSIFIED OFF NO-GAP,
20 sy-vline,21 int_wrap-line,
76 sy-vline ,77 wf_date1 ,
88 sy-vline ,89 int_wrap2-line,
115 sy-vline.
*--CLEARING THE VARIABLES--
wf_date1 = ''.
CLEAR: int_aufk,int_temp,int_wrap2-line,int_wrap-line.
ENDIF.
ENDWHILE.
wc_i1 = 1.
wc_i2 = 1.
CLEAR :int_wrap,int_wrap2.
REFRESH : int_wrap,int_wrap2,int_tline.
ENDLOOP.
ULINE AT (115).
ENDFORM. " f_report_display
*& Form F_PDF_DISPLAY
pdf conversion
--> p1 text
<-- p2 text
FORM f_pdf_display .
*--THIS FM CONVERTS THE SPOOL REQUEST INTO PDF REPORT--
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = wf_id "SPOOL NUMBER
no_dialog = space
pdf_destination = 'X'
IMPORTING
pdf_bytecount = loc_bytecount "NUMBER OF BYTES TRANSFERRED
TABLES
pdf = int_pdf "TABLE FOR PDF REPORT
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12.
ENDFORM. " F_PDF_DISPLAY
*& Form f_download_local
download to local system
--> p1 text
<-- p2 text
FORM f_download_local .
---------------------THIS FM DOWNLOADS THE PDF REPORT INTO LOCAL MACHINE
data loc_ret TYPE iwerrormsg.
CALL FUNCTION 'IW_C_GET_SAPWORKDIR'
IMPORTING
SAPWORKDIR = loc_file
ERROR_MSG = loc_ret
loc_filename = loc_file.
if loc_ret is initial.
concatenate loc_filename '\work order header long text_ ' sy-timlo '.pdf' into loc_filename.
endif.
CALL FUNCTION 'DOWNLOAD'
EXPORTING
bin_filesize = loc_bytecount "NO. OF BYTES
filename = loc_filename "DEFAULT FILE NAME
filetype = 'BIN'
IMPORTING
act_filename = loc_filename
TABLES
data_tab = int_pdf.
ENDFORM. " f_download_local
if you have any doubts,,
please revert
Regards,
Talwinder -
How to export report to xls format ?
hi guys,
i am running apex 3.2.1.00.
I came across this in the documenation
You can download an interactive report back by selecting Download from the Actions menu. Available download formats depend upon your installation and report definition but may include comma-delimited file (CSV) format, Microsoft Excel (XLS) format, Adobe Portable Document Format (PDF), and Microsoft Word Rich Text Format (RTF).
I am able to download only in csv and pdf form. So when do i enable during installation for XLS format ?
Rgds,
Noobhi jarola,
sorry to post a different question here, but i would really seek you attention to this question as i have been finding the solutions for days...
from this thread >> Re: multiple reports in a single report region ?
is it possible to export several reports in a page as a whole ?
e.g
on a page, ii have 5 regions, each region has 1 report.
can i do a export on 1 csv or pdf which contain all the 5 reports together as one ?
or is it possible for me to squeeze 5 report together in 1 region ? so i do a export for the 5 report as a whole at one time ?
thank you so much!
Rgds,
Noob
Edited by: user12050668 on May 19, 2010 2:02 AM
Edited by: user12050668 on May 19, 2010 2:02 AM -
Hi Experts
I am new in ALV ......
How can I make this report in ALV Grid Format, please help to change it and revert me back if possible
I need the top of page which should shows parameters also
regards
Piroz
REPORT Z_ESLP_ZROLE LINE-SIZE 90 LINE-COUNT 300
NO STANDARD PAGE HEADING.
TABLES : agr_tcodes,agr_users,tstct.
TYPES: BEGIN OF ty_data ,
agr_tcodes type agr_tcodes-tcode , " Transaction code A
agr_name type agr_tcodes-agr_name, " Role Name B
agr_uname type agr_users-uname, " Short User Name B
ttext type tstct-ttext, " Description Name C
sprsl type tstct-sprsl , " Language c
END OF ty_data.
DATA: i_data TYPE TABLE OF ty_data, " internal table
wa_data TYPE ty_data. " work area
SELECTION-SCREEN BEGIN OF BLOCK blk WITH FRAME.
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: p_tcode FOR agr_tcodes-tcode , "OBLIGATORY, "no-extension no intervals,
u_name for agr_users-uname,
r_name for agr_users-uname .
SELECTION-SCREEN END OF BLOCK blk1.
SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002.
SELECTION-SCREEN END OF BLOCK blk2.
SELECTION-SCREEN END OF BLOCK blk.
TOP-OF-PAGE.
FORMAT INTENSIFIED ON.
WRITE:/25(40) ' GNG INVESTMENT LIMITED '.
WRITE:/20(40) ' USER TRANSACTION CODE REPORT ' CENTERED ,
2 'Page', sy-pagno.
FORMAT INTENSIFIED OFF.
WRITE:/20(40) '----
' CENTERED .
FORMAT INTENSIFIED ON.
WRITE:/2 sy-datum COLOR 3, sy-uzeit .
ULINE.
write: /2 'Transaction Code :'left-justified,p_tcode-low color 2 , ' to ' , p_tcode-high color 2.
write: /2 'User Name :'left-justified,u_name-low color 2 , ' to ' , u_name-high Color 2.
write: /2 'Role Name :'left-justified,r_name-low color 2 , ' to ' , r_name-high Color 2.
ULINE.
ULINE.
WRITE:/1 sy-vline,
2 'USER', 15 sy-vline ,
16 'ROLE NAME', 30 sy-vline,
31 'TRANS CODE', 50 sy-vline,
51 'DESCRIPTION', 90 sy-vline.
FORMAT COLOR 3 ON.
ULINE.
END-OF-PAGE.
START-OF-SELECTION.
select agr_tcodestcode agr_tcodesagr_name agr_usersuname tstctttext tstct~sprsl
into table i_data
from agr_tcodes
inner join agr_users
on agr_tcodesagr_name = agr_usersagr_name
inner join tstct
on agr_tcodestcode = tstcttcode
where
agr_tcodes~tcode in p_tcode
and
agr_users~uname in u_name
and
agr_tcodes~agr_name in r_name
and
tstct~sprsl eq 'E'.
loop at i_data into wa_data.
format color off.
WRITE:/1 sy-vline,
2 wa_data-agr_uname , 15 sy-vline ,
16 wa_data-agr_name , 30 sy-vline,
31 wa_data-agr_tcodes , 50 sy-vline,
51 wa_data-ttext, 90 sy-vline.
ULINE.
endloop.Hi Piroz,
Check this sample program to create ALV program. Steps are provided every step in the program.
report zvenkat_alv_2_grid_description.
types:
begin of t_mard,
werks type mard-werks,
lgort type mard-lgort,
matnr type mard-matnr,
insme type mard-insme,
einme type mard-einme,
speme type mard-speme,
end of t_mard.
data:
w_mard type t_mard.
data:
i_mard type standard table of t_mard.
" ALV Declarations
" ALV internal tables and Structures
" To refer ALV tables(slis tables) and structures.SLIS must be
" declared under TYPE-POOLS(see below).SLIS is a Type group which is
" defined in Dictionary.Internal tables and structures and constants
" are defined under type group.(Double click on SLIS).
* Types Pools
type-pools:
slis.
* Types
types:
t_fieldcat type slis_fieldcat_alv,
t_events type slis_alv_event,
t_layout type slis_layout_alv.
* Workareas
data:
w_fieldcat type t_fieldcat,
w_events type t_events,
w_layout type t_layout.
* Internal Tables
data:
i_fieldcat type standard table of t_fieldcat,
i_fieldcat1 type standard table of t_fieldcat,
i_events type standard table of t_events.
*& START-OF-SELECTION
start-of-selection.
perform get_data_from_database .
" END-OF-SELECTION
" Steps to create simple ALV program
" 1. Pass an internal table with the set of output information
" 2. Pass a field catalog as an internal table
" 3. Pass a structure with general list layout details
end-of-selection.
perform build_fieldcatalog.
perform build_events.
perform build_layout.
perform display_data.
" Form build_fieldcatalog
" Fieldcatalog Internal table
" 1. It contains descriptions of the list output fields
" (usually a subset of the internal output table fields).
" 2. A field catalog is required for every ALV list output.
form build_fieldcatalog .
clear :
w_fieldcat,
i_fieldcat[].
perform build_fcat using:
"Field Int.Table Column headings
'WERKS' 'I_MARD' 'WERKS',
'LGORT' 'I_MARD' 'LGORT',
'MATNR' 'I_MARD' 'MATNR',
'INSME' 'I_MARD' 'INSME',
'EINME' 'I_MARD' 'EINME',
'SPEME' 'I_MARD' 'SPEME'.
endform. " build_fieldcatalog
*& Form display_data
form display_data .
data :program like sy-repid value sy-repid.
call function 'REUSE_ALV_LIST_DISPLAY'
exporting
i_callback_program = program
is_layout = w_layout
it_fieldcat = i_fieldcat
it_events = i_events
tables
t_outtab = i_mard.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
endform. " display_data
*& Form get_data_from_database
* text
form get_data_from_database .
clear :i_mard,
i_mard[].
select werks lgort matnr insme einme speme
from mard
into corresponding fields of table i_mard
up to 100 rows.
endform. " get_data_from_database
*& Form top_of_page
* text
form top_of_page.
data :
i_header type slis_t_listheader,
w_header like line of i_header.
data:l_date1 type datum,
l_date2 type datum.
w_header-typ = 'S'.
w_header-info = sy-title.
append w_header to i_header.
clear w_header.
w_header-typ = 'H'.
w_header-info = sy-repid.
append w_header to i_header.
clear w_header.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = i_header
i_logo = 'ENJOYSAP_LOGO'.
endform. "top_of_page
*& Form BUILD_FCAT
form build_fcat using l_field l_tab l_text.
w_fieldcat-fieldname = l_field.
w_fieldcat-tabname = l_tab.
w_fieldcat-seltext_m = l_text.
append w_fieldcat to i_fieldcat.
clear w_fieldcat.
endform. " BUILD_FCAT
" Form build_events
" Events
" 1. When we use ALV,certain events TOP-OF-PAGE ,END-OF-PAGE,
" AT LINE-SELECTION,AT USER-COMMANDs are not triggered.
" 2. To perform those Functions ,we have to build Events table and
" pass this table through REUSE_ALV_LIST_DISPALY Function.
form build_events .
clear :
w_events,i_events[].
w_events-name = 'TOP_OF_PAGE'.
w_events-form = 'TOP_OF_PAGE'.
append w_events to i_events.
clear w_events.
endform. " build_events
"& Form build_layout
" Layouts
" Use :We change the display of our list using layouts.
" ===
" Features
" ========
" The layouts that you can use vary according to the type of list:
" 1-->In all lists, you can do the following:
" (a).Choose one of the std layouts supplied with the std system.
" (b).Change the current layout of the list .
" 2-->In lists that use only the standard layouts in the std system
" you cannot save your changes to the current layout.When you
" choose the layouts, only the standard layouts will be proposed.
" 3-->In some lists, you can also save the layouts that you have
" defined as our own layouts.
" User-defined layouts are generally saved for all users. They can
" then be used by all users. All users will be able to choose from
" the user-defined layouts as well as the standard layouts.
" 4-->In some lists, you can also save user-specific layouts that you
" have defined . When you choose the current layout,only these
" layouts are available to you.
" 5-->You can delete or transport layouts, or define them as initial
" layouts
" 6-->STRUCTURE :SLIS_LAYOUT_ALV.
form build_layout .
clear:
w_layout.
w_layout-colwidth_optimize = 'X'.
endform. " build_layout
Regards,
Venkat.O -
Exporting Cystal Reports into CSV format
Hi,
I wanted to export some reports in CSV format with following options checked in Crystal 2008:
These options are given under separated Values exports options:
1. Mode = Standard Mode
2. Isolate Report/Page sections and Isolate Group Scctions check boxes checked
I could not find properties in CR object to set as per above requirement in VB6 code.
I am searching these properties in ReportObj.ExportOptions
Can anyone please advise in this regard.
Thanks in advance.
Regards-
BhoopendraHi Bhoopendra,
The Report Designer Component (RDC) COM component has been retired with the release of CR2008. Using CR2008 in VB6 is not supported, and it's not expected to work.
The recommended upgrade path is to migrate to the Crystal Reports .NET SDK. You can find getting started information in the [.NET Development - Crystal Reports|SAP Crystal Reports, version for Visual Studio; forum.
Sincerely,
Dan Kelleher -
How to export a report in .xls format
<p><font face="arial,helvetica,sans-serif" size="2">For my current project I have to take existing Crystal Report files and export them into Excel. I cannot use a .csv file, it has to be a .xls file in order to preserve the formatting. Does the Crystal plugin for Eclipse support this feature? I know it can export to .csv but how do I export to .xls? </font><font face="arial,helvetica,sans-serif" size="2">Thanks in Advance, </font><font face="Arial" size="2">Dave Amundsen</font></p>
<p>Hi Dave,</p><p> Unfortunately this feature is not currently supported with the Java engine which ships with Crystal Reports for Eclipse. There is a thread under the Feedback/Enhancement Requests section of the Forum where I would encourage you to add your opinions. You can find the thread here:</p><p><a href="/node/642"><u><strong>http://diamond.businessobjects.com/node/642 </strong></u></a></p><p>The only solution I can offer at this time is to look at one of our server solutions (e.g. Crystal Reports Server) if you need formatted Excel exporting with your Crystal Reports files. From what I hear, converting our existing Excel export functionality to a 100% Java environment requires a sizeable development effort, which is why we were not able to get this feature into the initial release of Crystal Reports for Eclipse.</p><p>If you are interested in more information around our Crystal Reports Server product or wish to download a free trial of the product, check out this link:</p><p><a href="http://www.businessobjects.com/products/reporting/crystalreports/server/default.asp"><u><strong>http://www.businessobjects.com/products/reporting/crystalreports/server/default.asp</strong></u></a> <br /></p><p>I should also mention that our server solutions do come with a complete Java SDK, which has a very similar object model to the one used by the Java Reporting Component shipped with Crystal Reports for Eclipse. </p><p>Regards,<br />Sean Johnson (CR4E Product Manager) </p>
-
Converting a report into other format
Hello everybody,
I'm having a problem when I try to convert any report to any other format.
From the report previewer I click the command at File\Generate to File, and whatever format I choose (PDF, HTML, RTF, ...), a Save dialog box appears to enter the file name. I enter the file name and click "Save". I always get an error message "Unimplemented Error", and the conversion doesn't perform.
Could anybody help me, please.
Note: At the server side I have Windows 2000 Server and Oracle 9i, and at the workstation side I have Windows XP and Oracle Forms/Reports Builder 6i.Hello,
This problem has been reported as a bug in the First versions of Reports 6i.
It has been fixed in the Patchset 3.
Have you applied the latest patchset available for Reports 6i ?
Regards -
Download of a report into the PDF is not giving me all the Columns
Hi all,
I have a report in BI publisher with 10 columns .But when i try to download that report into PDF FORMAT, then i am able to see only 3 columns in a single page but i can see the remaining columsn in next page .
ACTUAL REPORT :
a b c d e f g h i j k l
NAME 1 2 3 4 5 6 7 8 9 0 1 2
So when i download this Report into PDF i am getting like this
page 1 :
a b c
NAME 1 2 3
Page 2 :
d e f
NAME: 4 5 6
page 3:
g h i
NAME: 7 8 9
page 4:
j k l
NAME: 0 1 2
I am getting PDF output like this .
I am supposed to get all these values in a single page right ..
Can any one help me with this.
Edited by: Xavier on Aug 15, 2011 11:35 AM
Edited by: Xavier on Aug 15, 2011 11:40 AMYes, BI Pub,
I am using a pivot table in the RTF Template .So i need to change the table properties in the RTF template RI8
Thanks
Xavier
Edited by: Xavier on Aug 15, 2011 12:58 PM -
How to subscribe the report into one excel multiple sheets in ssrs
Hi Team,
I have a requirement where i pull my report in one excel with multiple sheets,
1.I have a Emp_Report where i could subscribe my report into excel format,but here i want to subscribe this into multiple sheets in one excel form.
2.Is it possible to subscribe the two reports in one excel with mulitiple sheets.i need this also.
please guide me hw we can achive me ,so that i can start working on that .
am using sql server 2008R2 sql server edition.
pls help me out for thisHi Ychinnari,
According to your description, you want to perform subscription for one report or two reports into multiple sheets within a Excel file.
In Reporting Services, when we add a page break within the report, those pages will be exported into separated sheets in Excel.
For first requirement, subscribe one report into multiple sheets in one Excel file. We can add a page break within a group, then the report will display on multiple sheets when subscribe into Excel format.
For second requirement, subscribe one report into multiple sheets in one Excel file. You can add one report as a subreport into the main report, then add pagebreak between main report and subreport.
If you have any question, please feel free to ask.
Best regards,
Qiuyun Yu
Qiuyun Yu
TechNet Community Support
Maybe you are looking for
-
Hi, Want to configure e a warning message for Duplicate Vendor master creation. I can see a message F2144 configred, but this is only applicable if we create Vendor from FK01. In spro>Logistics general>Business partner>Vendor> message control for
-
No valid payment procedure (F110)
Hi, When I am running F110, I am getting below error. "Payment with currency INR, payment method 1: No valid payment procedure" I defined correctly Payment method. I did all the necessary setting. Pl be specific to the query. Regards, Krishna
-
Hi All, I have an requirement to create an additional tab at the detail level with some custom field in IB51( IBASE - Install base ) transaction.Please guide me how can i achieve the same keepin in mind the prespective of SAP CRM 4.0 or 5.0 system Do
-
Error in Qbe with ComboBoxes.
I've a JClient app. Executing a Query by Example in a form with a combo I can use the combo to select the data I want : great. However if I try to "clear" the criteria I setted I can't. I can, in fact, clear the combo but the value is realy still the
-
Ultra 60 console port gives OK Illegal Instruction
I've got an Ultra 60 whose video no longer displays. The ethernet port had died a couple of weeks previously. I had been trying to swap in a couple of base 100 ethernet pci cards into, to see if they were recognized. I had installed one last week, bu