10-03-2007 12:56 PM
hi all,
Any body knows about the class <b>CL_DOPR_WRITER</b>? what is the purpose of this class hw can we use it?
<b>useful answers rewared</b>
cheers,
sunil kumar
10-03-2007 9:49 PM
Hello Sunil
The class is basically a list writer. Have a look at my sample report <b>ZUS_SDN_CL_DOPR_WRITER</b>. Just play around with the class methods to understand their functionality.
*&---------------------------------------------------------------------*
*& Report ZUS_SDN_CL_DOPR_WRITER
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT zus_sdn_cl_dopr_writer
LINE-SIZE 132
NO STANDARD PAGE HEADING.
DATA:
go_writer TYPE REF TO cl_dopr_writer,
gd_title_1 TYPE string,
gd_title_part1 TYPE string,
gd_title_part2 TYPE string,
gd_hlp_txt TYPE c LENGTH 130,
gd_hlp_txt1 TYPE c LENGTH 15,
gd_hlp_string TYPE string,
gd_raster TYPE p,
gd_hlp_lines TYPE i,
gd_hlp_i TYPE i.
START-OF-SELECTION.
CREATE OBJECT go_writer.
CONCATENATE syst-datum syst-uzeit syst-uname
INTO gd_title_1
SEPARATED BY ' // '.
CALL METHOD go_writer->new_table
EXPORTING
id_title = gd_title_1
id_type = '4'
* ID_RULER_STRING =
.
go_writer->title_write( ).
* Text elements:
* 700 Customer
* 701 Number
* 702 Business Area
* 703 Sorting
* 704 Field
go_writer->add_header_field( text-700 ).
go_writer->add_header_field( text-701 ).
go_writer->add_header_field( text-702 ).
go_writer->add_header_field( text-703 ).
go_writer->add_header_field( '' ).
go_writer->ruler_write( ).
gd_title_1 = 'New title - table of type = 1'.
CALL METHOD go_writer->new_table
EXPORTING
id_title = gd_title_1
id_type = '1'.
go_writer->add_group_header_field( text-550 ).
go_writer->add_header_field( text-551 ).
go_writer->add_header_field( text-552 ).
go_writer->add_header_field( text-553 ).
go_writer->add_header_field( text-554 ).
go_writer->add_header_field( text-555 ).
go_writer->add_header_field( text-556 ).
go_writer->add_header_field( text-557 ).
go_writer->add_header_field( text-558 ).
go_writer->add_header_field( text-559 ).
go_writer->add_header_field( text-560 ).
RESERVE 10 LINES.
go_writer->title_write( ).
go_writer->ruler_write( ).
END-OF-SELECTION.
Regards
Uwe
10-04-2007 6:01 AM
Hi Uwe Schieferstein ,
Thanx a lot for ur useful answer. I still i have some dbts plesae could you clear that.
1.Is there any documentation reagarding the Cl_dopr_writer so that i learn hw each method works.
2.When we are giveing header fields in first colum it is taking 3-4 variables in first column and after that a new column is generationg ? y so? i mean in first column it is taking some 3 to 4 varibles names and after that a new column is generating.
3.Can u give me a example such as taking a database table getting the values in internal table and getting output list using Cl_dopr_writer.? i have understood how to give the header name but i dont know how to assaing values in that. Please help me out coz atleast if i get the documentation reading all the methos how they use also i can try my self i have a requriremnt in which they used cl_dopr_writer so i cant understand anything my requirent is to insert a new field in between already existing fields.
Thanks a lot it was very useful answer to me....
regards,
sunil kumar.
10-04-2007 7:51 AM
Hello Sunil
My sample report is based on the coding of the two reports which use class CL_DOPR_WRITER. Do some debugging of these rather simple reports in order to understand how to create an entire list. It is not that difficult.
Regards
Uwe
10-04-2007 6:46 AM
Hi
use of CL_DOPR_WRITER
class CL_DOPR_WRITER (variable LO_WRITER in the report). You have to do some debugging of the report in order to understand how its methods work.
<b>reward if usaefull</b>