cancel
Showing results for 
Search instead for 
Did you mean: 

Control Break in Smartform

Former Member
0 Kudos

Dear all,

How to write control break statement in smart form while printing multiple line items in loop.

like at new at last etc.....

For eg; multiple lines having same material with different batch, how to total all batches for the same material and print it for single material.

Thanks in advance.

<MOVED BY MODERATOR TO THE CORRECT FORUM>

Edited by: Alvaro Tejada Galindo on Nov 5, 2008 11:15 AM

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

inspite of at new , go with on change event.

It will work fine in ur case.

for ex:

data flag type c.

clear flag.

on change of wa_final-matnr.

flag = 'X'.

endon.

and set a condition like,

and on the text element where ur going to print MATNR, set condition LIke only if flag = 'X'.

Regards,

Mr.A

Former Member
0 Kudos

Hi,

By using AT NEW command u can fetch the data based on Material.

prasanth_kasturi
Active Contributor
0 Kudos

Hi,

If you have Table or Loop in your SMFORM

there goto the data tab.

in that TAB you have SORT CRITERIA

there you can give the field name and check the check boxes as required

First one ia AT NEW

second is AT LAST

check the check box ALREADY SORTED if your data is coming in a sorted manner

regards

Prasanth

Former Member
0 Kudos

Hi Prasanth Kasthuri,

Can u tell me, at the same time how to caputure the total value of the entire item material (at end event, i am using) and display finally at the at end.

Thanks & Regards.

prasanth_kasturi
Active Contributor
0 Kudos

Hi

Make use of the Calculations tab

select accordingly the operation required ( TOTAL)

Give the field name which you want to total

Give the Target field name where you want the total to be and use this field to display the Total

Give the time for total also

i.e After Loop etc.

if you want SUBTOTALS

then print this value in the Event which you created as I mentioned in the previous Post

If GrandTotal

Then in the Footer area of the table print this value.

in the conditions tab remove the check box AT PAGE BREAK if you want only at end of all the data

http://help.sap.com/saphelp_nw70/helpdata/EN/a5/de6838abce021ae10000009b38f842/frameset.htm

regards

Prasanth

Former Member
0 Kudos

Hi,

can u please explain this step in detail,

if you want SUBTOTALS

then print this value in the Event which you created as I mentioned in the previous Post.

(Where to print this i dont have this events in text editor. please expain clearly.

Thanks

prasanth_kasturi
Active Contributor
0 Kudos

Hi Imran,

In my first post I explained you how to create the EVENTS.

If you follow that steps you will get an event in the smartform.

There right click on the event and insert a Table Line you created

There in the Table Line Insert your Text elements

and in the Text elements Give the variable where you are having the Subtotal

Hope you understand

regards

Prasanth