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

Conditional Page call in smartforms

Former Member
0 Likes
1,124

Hi everybody,

I want to create a smartform with 2 pages.

i want to get the either of the page get called conditionally..

for example.

if material number starts with 11 the page 1 should get called

and if material number gets starts with 31 then page 2 should get called.

Is this possible.

4 REPLIES 4
Read only

Former Member
0 Likes
1,085

Hi Kumar.

If your 2 layouts don't differ that much try using the conditions tab for your layout objects. Maybe it will suffice.

If not you could create 2 separate smartforms and choose in the printing program which one to call.

Hope this helps

Andreea

Read only

rosenberg_eitan
Active Contributor
0 Likes
1,085

Hi,

I have not tried it personally but I can see that parameter

control_parameters which is based on structure  ssfctrlop Contain a field STARTPAGE .

So the logic is in the calling program.

Regards.

Read only

Former Member
0 Likes
1,085

Hello,

One question, will the two pages be identical in terms of format? I mean to say:

Page 1 - Contains data MATNR starting by 11

Page 1 - Contains data MATNR starting by 31

In this case, you should be having one Main Window, with two tables and corresponding condition criteria.

For example:

Table 1: Loop on IT_DATA into GS_DATA

Condition Tab will be: GS_DATA-MATNR(2) = '11'.

Table 2: Loop on IT_DATA into GS_DATA

Condition Tab will be: GS_DATA-MATNR(2) = '31'.

This applies only if you need exactly the same data for both MATNR.

Otherwise, if you need different things on each page, then two smartforms are more appropriate.

Kind Regards

Read only

rosenberg_eitan
Active Contributor
0 Likes
1,085

Hi again.

Update:

I created a 2 page smartform and In each page there is a single text field:

Using the STARTPAGE in CONTROL_PARAMETERS

  with "PAGE_TYPE_1" or "PAGE_TYPE_2" I am getting: