cancel
Showing results for 
Search instead for 
Did you mean: 

display 6 line items and total in main window

Former Member
0 Kudos

Hi,

I want to display only 6 line items in main window( on first page and also total of the main window of first page), and consecutively in all the apges i want to display only 6 line itms and total in each page of main window, how to write logic for this.

Thanks,

Donlad

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

In form create a new variable.

if gv_counter > 6.

gv_counter = 0.

endif.

gv_counter = gv_counter + 1.

and while printing the line item keep a condition if gv_counter LE 6.

and print the line items.

Br,

Laxmi.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi r u talking about Snmartform if yes

Let us take the page you are using as PAGE1, you can achuve this using the Command Node. call the same page after 6 items as follows

1.create Table.--->Main area , Header and footer.

2.Declare a variable V_count type sy-tabix.

a.Now click on the table tab>Main Area>right Create>Command (insert a command node after the Line type you r using to print the data), in this COMMAND node give the condition V_COUNT = 6. GOTO>PAGE1 (it maens you r triggering the new page after the 6 lines.

b. after this command noder insert the Program lines heate increase the value of V_COUNT.

Maintain another variable the use that for page totals...

total can be doneautomatically by using the TABle-->CALCULATION TAB.

let me know if you more clear info, iam sure u r problem willbe solved.