Application Development and Automation 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: 
Read only

SAPSCRIPT

former_member568822
Active Participant
0 Likes
981

Hi,

I have create a sapscript form that only have main window in a page. My problem is when i loop the write form it will always create 2 page for the first data. Meaning if i past 1 data to write form it create 2 page will same data in fact i only need 1 page and if i pass 10 data it will create 11 page which the first 2 page is the 1st data.

i wonder why is this happen.

Please help, thank you.

10 REPLIES 10
Read only

Former Member
0 Likes
956

Hi,

I am not clear with your question.

Can you let me know how are you calling elements in main window? What have you coded in your driver program?

ashish

Read only

0 Likes
956

Hi,

Thank You for you respond.

I no put any element but just passing same data for internal table to the main window.

what i mean is when i put the write form fm inside the internal table loop. If my table have 1 line of data it with create 2 page with same data passing to it. IT only happen for the first data only ohters is ok.

Read only

0 Likes
956

I guess this is causing because you created second page. In your layout properties, goto Pages tab, click on first page. In properties, check what is entered for Next Page.

Hope this will help you.

ashish

Read only

JoffyJohn
Active Contributor
0 Likes
956

Can you check whether you have created a second page copying the first page and the next page of the first page is the second page.

Please clarify how exactly you created the sapscript form.

Read only

0 Likes
956

Hi,

I have create 2 page with main window name first and next. At the first page i put next as next page and at the next i put next page as next. I just want to write some data from internal table to the form.

thank you.

Read only

Former Member
0 Likes
956

Do you need second page? Is it same as First page? As i said earlier, you can just assign Next Page as First so that if data exceeds, the format of new page will be same as first page.

As you have created 2 pages, i think it is causing the problem.

Hope this helps.

ashish

Read only

0 Likes
956

Hi,

Yes it same as first page. I just try with 1 page by delete the second page so now i have only 1 page with the next page also first. but the result is the same!

Why is this happen?

thank you.

Read only

Former Member
0 Likes
956

Can you debug the script and see the code in runtime.

To activate debugger for script, go to SE71, Utilities --> Activate Debugger

ashish

Read only

0 Likes
956

hi,

After debug the script i notice that the write function is being call 2 time but only one data is passing. So why is that the write function is been call 2 time?

thank you

Read only

Former Member
0 Likes
956

Can you see your code and check why it is done like that?

I will not be able to tell as i don't know what code did you put in print program.

ashish