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: 

SAPScript and dynamic tray selection

Steven_UM
Contributor
0 Kudos

Hi,

A customer of mine has 2 identical SAPScript layout sets defined with 1 minor difference - within the page attributes a different printer tray has been defined (attribute called resource name) in order to choose a different printer tray ...

I was wondering wether this value could not be dynamically set by the SAPScript output program (when opening the layout set or using a specific command) ?

I didn't really find any special function or parameter in the open_form function module ... I find it a shame that only for the tray functionality we have to maintain 2 layout sets ...

Or can this be achieved in a total different way?

Thanks,

Steven

3 REPLIES 3

Former Member
0 Kudos

Hi Steven,

If I understand you right you have now 2 sap scripts? Another solution would be to have only one script with 2 different pages (one for each resource), and after the OPEN_FORM a call to START_FORM. With this FM you can give the startpage as a parameter.

At least this should simplify the maintenance...

Regards,

John.

Former Member
0 Kudos

I am not sure if you can change Tray attribute on a page dynamically from print program.

But I have a suggestion, Why don't you create two pages identical in one single SAPScript just with the Tray different on each one. And call appropriate page while printing dynamically from your program using Function "CONTROL_FORM".

Advantage in this approach is, you do not need to maintain two different SAPScripts. And all code maintenance in SAPScript is common to both the pages, so do not need to make changes twice.

Limitation is if you resize any window in one page need to do the same on the other page too. This is still OK because usually you do not resize as often as you make changes in the code.

Shashi Reddy

0 Kudos

Sorry I posted my response without reading John's response. I believe we both are communicating the same approach.

Shashi Reddy