cancel
Showing results for 
Search instead for 
Did you mean: 

Print program

former_member188843
Participant
0 Kudos

Dear all,

I meet a problem about Smartform.I need pring some total data from a basic list . The total data need basic on the material group.I write the following code in the print program:

loop at itab.

total-matyp = itab-matyp.

total-lgmng = itab-lgmng.

collect total.

endloop.

But when I want to print the form with T-CODE VT02N to update output message .I get a error about failed to update message with sm13.

Do you have any suggestions about it? Thanks in advance!!!

Edited by: Edward on Apr 29, 2009 9:22 PM

Edited by: Edward on Apr 29, 2009 9:23 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

It is better to calculate the total in Smartform using Program lines node in the loop which is used to display the item details.

former_member188843
Participant
0 Kudos

would you please show me some sample to calculate total in SMARTFORM?

Former Member
0 Kudos

Hi,

First place LOOP node and provide your internal table which consist the needed data as input to it.

--->Place Program lines node

Inputs : It output : Total

Total = Total + it-qty.

After loop place one text node and in that print &TOTAL&

For this declare Total field in Global definition with required reference type.

Otherwise if you are using Table node.

in that TAble node after main area

--->Place Program lines node

Inputs : It output : Total

Total = Total + it-qty

then display total value in Footer of Table node.