on 11-30-2006 1:04 PM
hi friends,
in smartforms i am trying to print a material
my prob is i have to aggregate and print
1.example-- mat1 quantity 2 amount is 1000
mat1 quantity 3 amount is 200
now it should print
mat1 quantity 5 amount 1000
my code is --
loop at IS_BIL_INVOICE-IT_GEN into gs_it_gen
where material = gs_it_gen-material and
bil_number = gs_it_gen-bil_number.
on change of gs_it_gen-material.
quantity = GS_IT_GEN-FKIMG + quantity.
GRWT = GS_IT_GEN-GROSS_WT + GRWT.
endon.
endloop.
but it prints twice
i want it to print once is that any i should add with this code
for this plz give me some idea
regards
raj
Hi Raj,
<i>If you are using custom driver program:</i>
Better you have the final data in the internal table, which you will pass to the Smart form.
<i>If you are using a standrad driver program:</i>
You can write some code in the smart form also.
Create a window before you are printing the internal table.
Right click on a window and Create->Flowlogic->Progamlines.
There sum the quantity and material.
Thanks,
Sreekanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
If the structure of your material is - <b>matnr qty amount</b> then you can use
Loop at itab.
Coollect itab.
Endloop.
Whenever material number is same it'll add both the qty and amout. You can just press f1 on COLLECT and read the clear information.
Regards
Surya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
what u do...itab has values...now,
loop at itab.
collect itab.
endloop.
so, as matnr is same it will sum up the 2 records and finally itab will have 1 record...
u can use this itab in ur printing...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
If you have to only to print the total of the item with the same material code, you should aggregate the data in a new table before printing them.
So in INITIALIZATION tab you should fill this new table.
Max
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.