‎2007 Feb 10 10:22 AM
Hi all,
my requirement is as follows.-
My internal table has following fields
it_item-sno,
-vbeln,
-posnr,
-matnr,
-balno.
-
S.NO DEL.NO ITEM NO. DESCRIPTION BALE NO.
1 99002252 10 MATERIAL 100
2 99002252 10 MATERIAL 101
3 99002252 10 MATERIAL 102
4 99002252 10 MATERIAL 103
I NEED TO GET THE FOLLOWING OUTPUT.
FOR SAME DEL NOS,ITEM NUMBERS AND DESCRIPTION THE VALUES SHOULD COME ONLY ONCE AND ALL THE BALE NUMBERS SHOULD BE DISPLAYED WHICH IS SHOWN BELOW
S.NO DEL.NO ITEM NO. DESCRIPTION BALE NO.
1 99002252 10 MATERIAL 100
101
102
103
‎2007 Feb 10 10:25 AM
Use control break statements AT NEW for displaying the first four fields.
If you are using ALV sort the accordingly using sort catalogue and pass the sort internal table to the function module.
‎2007 Feb 10 10:25 AM
Use control break statements AT NEW for displaying the first four fields.
If you are using ALV sort the accordingly using sort catalogue and pass the sort internal table to the function module.
‎2007 Feb 10 10:28 AM
Hi,
If you are using ALV Utility, the merge function will automatically fulfill your requirement. But if you displaying using writing statements
LOOP AT T_DEL.
AT NEW MATNR.
WRITE : T_DEL-VBELN.......
ENDAT.
WRITE : T_DEL-BALENO.
ENDLOOP.
‎2007 Feb 10 10:56 AM
data : counter type i.
loop at itab.
on change of itab-matnr.
counter = counter + 1.
write : /1(5)counter,7(18) itab-matnr.
endon.
write : 26(40) itab-maktx,67(10) itab-baleno.
write : /.
endloop.
regards
shiba dutta
‎2007 Feb 10 11:04 AM
HI YOUR ANSWER WAS HELPFUL.
I AM WORKING WITH SMARTFORM ,N I CANT USE THE WRITE STATEMENTS.
PLEASE REPLY BACK
REGARDS
AKMAL
‎2007 Feb 10 11:07 AM
then take the value to another itab or any program symbol<sorry i am familiar with script not with smart form>...
loop at itab.
on change of itab-matnr.
itab1-matnr = itab-matnr.
endon.
itab1-maktx = itab-maktx.
append itab1.
clear itab1.
endloop.
now use itab1 in smart form
regards
shiba dutta
‎2007 Feb 10 11:09 AM
Hi
the same logic.
sort itab.
loop at itab.
at first.
pass the header element. " 4 fields
endat.
pass the item element.
endloop.
‎2007 Feb 10 11:03 AM
hi akmal,
try this one.
DATA VAR(70) TYPE C.
CLEAR VAR.
LOOP AT IT_ITEM.
CONCATENATE DEL.NO ITEM.NO DES. INTO VAR.
ENDLOOP.
LOOP AT IT_ITEM.
ON CHANGE OF VAR.
WRITE VAR.
ENDON.
WRITE IT_ITEM-BALE.NO.
ENDLOOP.
Hope u get the logic.
feel-free to ask furthur clarifications.
Thanking U
‎2007 Feb 10 3:52 PM
Hi akmal,
to let us know what format you mean, please use the above CODE button to switch on the preserving of spaces; check posting with below PREVIEW button before posting.
If I understand you right, the requirement melts down to suppress repeated output of S.No, DEL.No and description.
Before calling ALV, loop over the table and clear S.NO accordingly. and set DEL.NO ITEM NO. DESCRIPTION sorted.
Regards,
Clemens
‎2007 Feb 12 7:44 AM
Hi Clemen, as per ur advice i am sending you the code by pressing the code button.please review it and reply
my requirement is as follows.-
My internal table has following fields
it_item-sno,
-vbeln,
-posnr,
-matnr,
-balno.
-
S.NO DEL.NO ITEM NO. DESCRIPTION BALE NO.
1 99002252 10 MATERIAL 100
2 99002252 10 MATERIAL 101
3 99002252 20 FINISHED 102
4 99002252 10 FINISHED 103
I NEED TO GET THE FOLLOWING OUTPUT.
FOR SAME DEL NOS, ITEM NUMBERS AND DESCRIPTION THE VALUES SHOULD COME ONLY ONCE AND ALL THE BALE NUMBERS SHOULD BE DISPLAYED WHICH IS SHOWN BELOW
S.NO DEL.NO ITEM NO. DESCRIPTION BALE NO.
1 99002252 10 MATERIAL 100
2 101
3 20 FINISHED 102
4 103...