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: 

Scenario in script

Former Member
0 Kudos

Dear sir,

I am doing a script : The scenario is in first page i need to bring the header and item informations in main window and header. In the next page i need to print the some characters(Some terms and conditions). In the third page i need to print the remaining items of the first page, followed by the terms and conditions page as 4th page.

I am clear with the first and third page. But how to bring a page without main window and header information. When i execute i am getting : Output is continuous or contains too many pages

(>4).

Kindly suggest me a solution.

Thanks and regards,

Rakesh.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Page without a main window probably would not be possible in Script. You need to look other ways around.

5 REPLIES 5

Former Member
0 Kudos

Hi,

Page without a main window probably would not be possible in Script. You need to look other ways around.

Former Member
0 Kudos

Hi Rakesh,

Seems to be confusion but you can do like this...

In First page main window, you have a fixed length of Main window.....

Just thinking logicall, Loop exactly same no. of records as to fit exactly into main window by indexes...

And in Script, use the If conditon in Command line with the help of a counter.....

lets say.. when counter EQ 1.. print main window with headed and items,,, when EQ 0. print your special characters,,..

And by logically we can make counter to 0 or 1 after looping.

Hope you understand,

Thanks & regards,

Dileep .C

0 Kudos

Hi Dileep,

I hope this is clear:

First Page : Header and main window informations with logo.

Second page : only terms and conditions.

if page1 had line items more than 3.

Third page : Continuation of the Main window contents.

Fourth page :Only terms and conditons.

Then new items and same page formats.

I think it is to be done both in coding part and in Script part.

Kindly suggest me.

Thanks and regards,

Rakesh.

0 Kudos

Hi Rakesh,

In this type of scenario I will do like this...

I wil take a Very Long text and pass the TERMS & CONDITIONS in it accordingly,

Note: There will be no HARD CODING in the script... Everything passed throught Variables...

Now I declare the condition here,,!

Loop Itab index 1 to 3.

if sy-tabix eq 3.

count = 1.

endloop.

write form...

If count eq 1.

"Terms & Conditions"

Else

Line Items.

endif.

count = 0.

Loop Itab index 4 to 6.

if sy-tabix eq 3.

count = 1.

endloop.

You can work on this logic more clearly,,, Surely it will help.

when situation is worst, copy itab to new itab and delete records while looping and print ...

I mean Use TEXT ELEMENTS & Pass the relavant data from Program itself...

Thanks & regards,

Dileep .C

Former Member
0 Kudos

If you use main window in the page then the same page should be mentioned as next page. In your case... its not possible to use main window in the page1 & page3 because....

if you use then you need to do like ... Page1->Page2

Page2->Page1

But the problem is since you are maintaining main window in Page1, the same page should be set as next page.

Note: You can create script without main window also, but you cant print more than 3 pages without main window.

Edited by: Satya suresh Donepudi on Apr 2, 2009 1:05 AM