cancel
Showing results for 
Search instead for 
Did you mean: 

total in smart form

Former Member
0 Kudos

how can i print the serial no: and total in smart form?

i have two fields Quantity and Price; so i want to display the total for each item and

atlast the grand total. also the serial no: for each line item.

how it is possible?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

i think you need to dispaly like this

Material Description, Quantity,Price & Total

& serial numbers are below to material description if it like this

create two seperate line types in your table in your first line type write

material description, quantity , Price above total text create a program lines where

taotal QTY* Price.

In the below line type

loop the serial numbers

here you have to observe one more thing you can't write one serial number in one line

so define multiple program lines in your loop

in the firstprogram lines just increase the count by 1.

in the below program lines keep the conditions like

L_index le 10

L_index lt 10 & L_index gt 20 respectively for each program line & code in the program lines will be

concatenate l_serl tab_item1-serl into l_serl separated by l_space.

& write l_serl in your text element which is of type string

& about grand totals

sum in the progam lines in the first table line loop

& write those in the footer.

Thanks,

Phani.

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

Reffer

sf_example_01

Reward Points if usefull

Regards

Fareedas

Former Member
0 Kudos

Hi Sanil

if you are using smartforms use programme lines ,keep this programme lines in a loop and endloop.in program lines write

logic involved for adding.

Hope this may solve your problem.

Please reward points if found helpful.

Thanks and regards,

Rajeshwar.

Former Member
0 Kudos

Hi,

You can use total to create sum of the particular field... You can do this to prepare Grant Total and SUb Total also...

FOr more details refer following document.

http://help.sap.com/saphelp_erp2005vp/helpdata/en/9b/e3b0dcc2a711d3b558006094192fe3/frameset.htm

Regards,

shiva

Former Member
0 Kudos

Hi,

for the serial no use the sy-tabix as the variable in the loop.

or

define the variable in the global definition. in the program lines incriment the variable by 1 and print this variable for serial no.

TOTAL

->fine the variable in the global definition of same type of quantity and amout.

->create a program lines in the loop and pass the both variable amount and quantity as the input parameters and define variable as the output parameters .

->in the source code write code as follows.

g_total_amt = netwr + g_total_amt.

g_total_qty = quantity + g_total_qty.

and print the variables g_total_qty and g_total_amt as the total fields

Thanks,

NN.