‎2009 Mar 12 4:40 AM
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.
‎2009 Mar 12 4:42 AM
>
>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
‎2009 Mar 12 4:45 AM
If you are working on classical report , the increase the LINE-SIZE in REport header line
REPORT ZREPNAME LINE-SIZE 255.Hope this helps..
‎2009 Mar 12 4:45 AM
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.
‎2009 Mar 12 4:48 AM
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
‎2009 Mar 12 4:57 AM
‎2009 Mar 12 12:23 PM
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