cancel
Showing results for 
Search instead for 
Did you mean: 

smart form help

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (4)

Answers (4)

sreemsft
Contributor
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

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...

Former Member
0 Kudos

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