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: 

SAP Scripts

Former Member
0 Kudos

I have a script which displays information on one page.

Now, I need to add another page in the script without modifying the driver program.

Ex: Vendor Details

Page1: Vendor No., Name, Etc.

Page2: Static text.

Page1: Vendor No., Name, etc,

Page2: Static Text (same as the previous one)

<b>I can't modify the driver program. </b>

This second page has to be created and added for each new page1.

8 REPLIES 8

former_member181962
Active Contributor
0 Kudos

HI Nazim,

Create a new page i.e page2 in the layout and give the name of the new page as the next page in the first page header attributes.

Regards,

Ravi

venkata_ramisetti
Active Contributor
0 Kudos

HI,

Modify the sapscript to add another page.

You can write routines in the sapscript using PERFORM statement to add your program logic without changing driver program.

Check the below link for more info.

http://www.henrikfrank.dk/abapexamples/SapScript/calling_abap_subroutines.htm

Thanks,

Ramakrishna

Message was edited by: Ramakrishna Prasad

Former Member
0 Kudos

The problem here is the First page has four Text elements and the output varies based on the data retrieved.

I have created the new page, but I need help in triggering it... I have tried out the triggering in all the text elements but in vain!

If I modify the driver program, it is working fine... But I am not to make changes to it!

0 Kudos

Hi Nazim,

Instead of triggering from the text elements,

Did you try specifying in Pages standard attributes, next page as PAGE2?

Ravi

0 Kudos

hI,

You can call command NEW-PAGE from the script dynamically.

Thanks,

Ramakrishna

0 Kudos

Yes.

That too doesn't help solving it.

If I trigger the new-page in the main window, the output is changed from this format:

<b>Page1:</b>

Line 1.

Line 2.

<b>

Page2:</b>

Text...

TO -->

<b>Page1: </b>

Line1

<b>Page2:</b>

Text...

<b>Page1:</b>

Line2.

<b>Page2:</b>

Text...

0 Kudos

HI Nazim,

I think you triggered the NEW-PAGE in the text element for printing item level data.

Try to find a place where exactly you want to trigger NEW-PAGE.

Thanks,

Ramakrishna

Former Member
0 Kudos

Hello.

Create two pages- page1 and page2.

Next page attribute of page1 is page2 and

Next page attribute of page2 is page1

On page1 write the values from driver program like vendor no, name etc in the main window.

on Page2 write the static text.

Adjust the size of the main window on page1 so that only the data that you want on the first page ie page1. This adjustment is very essential as it will allow the data in every loop pass to get displayed on page1 and not to flow to the other page.

Regards,

Richa