Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

New Page In Smartforms

Former Member

Hi All ;

I want to create new page in smartforms for each vbeln in the itab.

For examp; I have 3 records in itab.I want to see different 3 pages ,

the output is 4 pages the last page is free.

The screenshot of th smartforms ;

Thanks for your help.

Regards

Fırtına

10 REPLIES 10

adrian_mejido
Contributor
0 Kudos

Hi Yigit,

You should try to control if you are at the last entrie of the table, because if you are at this case you don't have to create another page.

For example you can get the number of lines of your Internal table and then add a new condition to check if you are at the last one.

Best Regards.

0 Kudos

Hi Adrian ;

How can I control the last entrie ?

0 Kudos

You have to get the number of lines of your Internal table (DESCRIBE TABLE it_data LINES l_lines) and then in the condition of your command you have to add another one which check if your counter is the same as the number of lines (at this time you are at the last entrie).

VijayaKrishnaG
Active Contributor
0 Kudos

Hi Firtina,

Have you defined any table in the TABLE loop? I would like to know whether you are looping internal table in the TABLE element or in LOOP element inside the table.

You have defined COMMAND element in main area of a table, that's fine. But that should be in loop of internal table.

So, if you are looping internal table in LOOP, then place that COMMAND in that loop. Otherwise define the internal table in TABLE for looping.

Regards,

Vijay

thangam_perumal
Contributor
0 Kudos

Hi Yagit,

              yeah i have faced same problem before.. i did some condition .. please follow below screen shots

Regards,

Thangam.P

0 Kudos

hi ;

Is there anyother screenshot , i didnt understand; describe table ok but what we have to define in the command ?

Regards

Fırtına

0 Kudos

Yigit

first is Describe table GT_PO lines GV_LINES--> Total number of lines.

Then inside the loop have another vairable GV_CURR_LINE and increment it by 1 in each iteration. Put a condition on new page command if gv_curr_line lt gv_lines then only it will work.

Nabheet

nabheetscn
Active Contributor
0 Kudos


Hi Yigit

Please check number of lines in internal table. On each loop iteration increment another variable by 1. Put condition on page break command do only if current count is less than initial total line

Nabheet

former_member187748
Active Contributor
0 Kudos

Hi Yigit,

before your main window data ends, create a command lines and in the conditions tab

put condition as shown in screenshot,

where counter is the no of your records to be displayed

thangam_perumal
Contributor
0 Kudos

Hi yigit,

            sorry for mistake. actually i posted near four screen shots but it loaded only one.. i didnt noticed that.