cancel
Showing results for 
Search instead for 
Did you mean: 

set value of line & column numbers in template of smartform

Former Member
0 Kudos

Hi,

I have created a template with two columns to print customer data as below.

Example

First Page

Customer XYZ (L=1,C=1) Customer XYZ (L=1,C=2)

Customer XYZ (L=2,C=1) Customer XYZ (L=2,C=2)

Customer XYZ (L=3,C=1) Customer XYZ (L=3,C=3)

Customer XYZ (L=4,C=1) Customer XYZ (L=4,C=2)

Second Page

Customer ABC (L=1,C=1) Customer ABC (L=1,C=2)

Customer ABC (L=2,C=1) Customer ABC (L=2,C=2)

i have defined column & line positions for the details printed above.

Now at end of every customer i need to print the details of the next customer on a new page starting from Line 1 Column 1.

I would like to know if it is possible to set the values of the line & column positions in the template

dynamically in the text element while triggering the new page command

Your help will be appreciated.

Siddharth

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

You should use COMMAND Node for new page in main window with some condition like

At new cust-num.

write logic

cust-cnt =cust-cnt +1.

endat.

Now check in your command node that cust-cnt > no of customers then go to next page.

Better can be understood thr example below.

http://www.sapmaterial.com/smartform_example.html

Thanks,

Smita

Former Member
0 Kudos

in the main window you need to use COMMAND for new page

whenver the customer has been changed you need to call COMMAND.

before the command line create the PROGRAM line and loop the internal table the customer table and pass the customer number to one variable like .

loop at itab.

at new of customer

lv_variable = your customer....

endat

in command----> Conditions tab

lv_variable NE your wrok are customer number then generate the new page....