Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Display Report output in Matrix format

Former Member
0 Kudos
232

Hi

I want to display normal report output in somewhat this manner.

I will have one change requrest number and many transport requests will be assigned to that change request number, and to the transport requests many objects will be assigned.

I have to display the output in this format:

Change Request 1 | Tr No.1 | Tr No.2 | Tr No.1 | and so on....

_____________________________________________________

Obj1

_____________________________________________________

Obj2

_____________________________________________________

Obj3

_____________________________________________________

Change Request 1 | Tr No.1 | Tr No.2 | Tr No.1 | and so on....

_____________________________________________________

Obj1

_____________________________________________________

Obj2

_____________________________________________________

Obj3

_____________________________________________________

Like this it should go on.

I have done the coding part, how to display the data in the above format i am not getting any idea, please help me out if you have any ideas.

Thanks & Regards

Haritha.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
115

Hi Vijay,

I may have more than 70-80 requests for a change request. May be more than that also.

Regards

Haritha.

8 REPLIES 8

former_member188685
Active Contributor
0 Kudos
115

I hope you have the data with you, and what is the table(internal) definition. if you can show the definition of the internal table. it will be easy to guide you. in your case you may have to use control break statements.

Former Member
0 Kudos
115

Hi Vijay,

First of all thank you for the response.

I am retrieving the data from different tables and putting all the data in one internal table called i_final. Below is the declaration of that internal table and how i have populated the data to that. I am using control break statements to display the data but the data is coming in the next line.

Please see the final internal table:

1. Declaration:

Data:Begin of i_final occurs 0,

ccsnr like ysts-ccsnr,

trkorr like ysts-trkorr,

obj_name like e071-obj_name,

check_box(1),

status LIKE YSCS-STATUS,

End of i_final.

2. Populating different internal tables data to this table:

loop at i_ccno.

i_final-ccsnr = i_ccno-ccsnr.

i_final-trkorr = i_ccno-trkorr.

read table i_status with key trkorr = i_ccno-trkorr.

if sy-subrc = 0.

i_final-status = i_status-status.

endif.

read table i_obj_name with key trkorr = i_ccno-trkorr.

if sy-subrc = 0.

i_final-obj_name = i_obj_name-obj_name.

endif.

append i_final.

clear i_final.

endloop.

3. Using Control break statements to display the data.

sort i_final by ccsnr.

loop at i_final.

at new ccsnr.

write:/2 i_final-ccsnr.

endat.

write:20 i_final-trkorr.

uline.

endloop.

But the output is coming like this:

CHG0003785 HSDK933109

___________________________________________________

HSDK933111

___________________________________________________

HSDK933113

___________________________________________________

HSDK933143

___________________________________________________

HSDK933268

___________________________________________________

But i want the output like this:

CHG0003785 | HSDK933109 | HSDK933111 | HSDK933113

Thanks & Regards

Haritha.

0 Kudos
115

try this way..

loop at i_final.
at new ccsnr.
write:/2 i_final-ccsnr.
endat.
write: i_final-trkorr.
at end of ccsnr.
uline.
endat.
endloop.

Former Member
0 Kudos
115

Hi Vijay,

Thank you very much. It is coming correcly only, but i have another problem.

It is coming in another line once that line is completed, so is there any way to continue in the same line till the end of the requests.

I have given the line-size to max. of 1023, but still some requests are coming in the next line.

Regards

Haritha.

0 Kudos
115

>I have given the line-size to max. of 1023, but still some >requests are coming in the next line.

For one change request how many TR's you have. This depends on your data.

Former Member
0 Kudos
116

Hi Vijay,

I may have more than 70-80 requests for a change request. May be more than that also.

Regards

Haritha.

0 Kudos
115

if that is the case think of some other option to show your data.

that really looks ugly. try with ALV or hierarchy report

Former Member
0 Kudos
115

HI,

Ok Thank you Vijay.

Thanks & Regards

Haritha.