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: 

Problem with output formatting.

Former Member
0 Kudos

Hi all,

I have an output as shown below.

R1 R2 R3 R4 R5 R6 R7

20000001 27.02.2007 3326 180080 D4

20000001 27.02.2007 3326 180080 D2

20000001 27.02.2007 3326 180080 D3

20000001 27.02.2007 3326 180080 D8H

20000001 27.02.2007 3326 180080 TT4

my problem is that, i am not able to get my values in fields R6 and R7 in the first row. Can any one suggest me a method to get the values of R6 and R7 in to the first row it self.

6 REPLIES 6

former_member184657
Active Contributor
0 Kudos

>

>Can any one suggest me a method to get the values of R6 and R7 in to the first row it self.

Learn to frame a question.

pk

Former Member
0 Kudos

If you are working on classical report , the increase the LINE-SIZE in REport header line

REPORT ZREPNAME LINE-SIZE 255.

Hope this helps..

keerthy_k
Active Participant
0 Kudos

Hi ,

U can use the following statement ,

Loop at itab.

AT NEW R1.

.........do ur coding to fill the fields R6 and R7

ENDAT.

endloop.

Keerthi.

Former Member
0 Kudos

Are you using ALV method to display the output.

If not, use ALV display you will get the desired output.

Paste the program here...I will do modifications if needed......

Plz get back to me if you face any problem

Former Member
0 Kudos

Hey...You got the output...

Just let me know

Former Member
0 Kudos

loop at t_plant.

clear : p_test,x,y.

call function 'CONVERSION_EXIT_ATINN_INPUT'

exporting

input = 'HCC_MM_MAT_EQP'

importing

output = p_test.

clear t_ausp1.

refresh t_ausp1.

select objek

atinn

atzhl

atwrt

from ausp

into table t_ausp3

where objek = t_plant-matnr and

atinn = p_test.

loop at t_ausp3.

y = y + 1.

t_ausp3-atwrt1 = t_ausp3-atwrt.

modify t_ausp3.

clear t_ausp3.

endloop.

clear : p_test.

call function 'CONVERSION_EXIT_ATINN_INPUT'

exporting

input = 'HCC_MM_MAT_MMO'

importing

output = p_test.

clear t_ausp1.

refresh t_ausp1.

select objek

atinn

atzhl

atwrt

from ausp

into table t_ausp2

where objek = t_plant-matnr and

atinn = p_test.

loop at t_ausp2." where atzhl = t_ausp3-atzhl.

x = x + 1.

t_ausp2-atwrt = t_ausp2-atwrt.

modify t_ausp2.

clear t_ausp2.

endloop.

if ( ( x < y ) or ( x = y ) ).

loop at t_ausp3." where atzhl = t_ausp2-atzhl.

read table t_ausp2 with key objek = t_ausp3-objek.

  • atzhl = t_ausp3-atzhl.

move t_ausp2-atwrt to t_ausp3-atwrt2.

modify t_ausp3.

clear t_ausp3.

endloop.

elseif x > y.

loop at t_ausp2." where atzhl = t_ausp3-atzhl.

read table t_ausp2 with key objek = t_ausp3-objek.

  • atzhl = t_ausp3-atzhl.

move t_ausp2-atwrt to t_ausp3-atwrt2.

append t_ausp3.

clear t_ausp3.

endloop.

endif.

clear : p_test.

call function 'CONVERSION_EXIT_ATINN_INPUT'

exporting

input = 'HCC_MM_MAT_OEM'

importing

output = p_test.

clear t_ausp1.

refresh t_ausp1.

select objek

atinn

atzhl

atwrt

from ausp

into table t_ausp1

where objek = t_plant-matnr and

atinn = p_test.

loop at t_ausp3." where atzhl = t_ausp3-atzhl.

read table t_ausp1 with key objek = t_ausp3-objek.

move t_ausp1-atwrt to t_ausp3-atwrt3.

modify t_ausp3.

clear t_ausp3.

endloop.

if t_ausp1-atwrt is not initial.

loop at t_ausp3." where objek = t_plant1-matnr.

move-corresponding : t_plant to t_plant1.

move : t_ausp3-atwrt1 to t_plant1-atwrt1.

move : t_ausp3-atwrt2 to t_plant1-atwrt2.

move : t_ausp3-atwrt3 to t_plant1-atwrt3.

append t_plant1.

clear t_plant1.

endloop.

else.

move-corresponding : t_plant to t_plant1.

append t_plant1.

clear t_plant1.

endif.

endloop.

this is the logic i wrote. whats happening is records are being appended