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

Dynamic Pages in Smartforms

Former Member
0 Likes
4,085

Hi ABAP Guru,

I have a specific requirement in smart forms.

I have 14 different pages. and each page should be displayed only if certain condition is satisfied.

Can anybody suggest how this can be done.

Thanks in advance

Aniruddha

1 ACCEPTED SOLUTION
Read only

Former Member
3,098

Hi, When I create two main windows.

For example

one main window on Page 1 and one main window on Page 4 (remember I have 14 pages with different format),

The system does not display the contents of main window on page 4.

Hi ABAP Guru,

I have a specific requirement in smart forms.

I have 14 different pages. and each page should be displayed only if certain condition is satisfied.

Can anybody suggest how this can be done.

Thanks in advance

Aniruddha

16 REPLIES 16
Read only

Former Member
0 Likes
3,098

Hi,

Crate your pages first  and You can give condition to window in Condition tab , Add additional event, Only on page and mention Page.

Thanks.

Read only

0 Likes
3,098

Hi Ranju,

Thanks for your reply. But how can I control the page flow.

I am developing a smart form Process order output.

depending on the operations in the process order, certain pages should display.

for example....

I have total 14 page formats.

if a certain process order contains operations A, D and E, then it should display pages

first (by default)

fifth (for D)

sixth and seventh (for E)

thirteenth and fourteenth (by default)

hence my output should display 6 pages.

I think if I put conditions on window, It will not display the data from that window, but it will display a blank page which is not required.

Please correct if I am wrong.

Thanks in advance

Read only

0 Likes
3,098

yes you are right. Give Command in each page. set flag as per your requirement in program and export in smartform , and use it in condition.

Dont put condition for Default pages.

Please refer

Read only

0 Likes
3,098

Hi Ranju,

I tried giving command in each page. I created a main window in each page and defined the command. But it works only in case of first main window. all the other main windows are not getting executed.

the smart form is allowing me to create a main window in each page but it is executing only first main window.

Please help.

Read only

0 Likes
3,098

right. You need to give  all condition for all main window. it should work.

Set first page from control parameter SSFCTRLOP-startpage = Page name.

Read only

Former Member
0 Likes
3,098

Hi Aniruddha,

First Solution: if all windows other than main window is same in all pages, you should use 14 folder in main window and command node after each folder to trigger page break. Inside each folder you can add contents which you want to print in particular page. If you don't want to print any page you can use condition tab of folder

Second Solution: In command node you can maintain new page. In your case you have 14 pages, then add 13 command node in each page and put condition on each command node. Based on your condition only one command node will execute and page given in this node will be your next page.

Read only

0 Likes
3,098

Hi Manish,

Page format is different for all pages.

Read only

0 Likes
3,098

you need to refer second solution. Create all 14 pages and give 13 command in each page as per your requirement.
Set  your first page from control parameter SSFCTRLOP-startpage = Page name.

Read only

Former Member
0 Likes
3,098

I will try and revert. Thanks manish and ranju

Read only

Former Member
3,099

Hi, When I create two main windows.

For example

one main window on Page 1 and one main window on Page 4 (remember I have 14 pages with different format),

The system does not display the contents of main window on page 4.

Read only

0 Likes
3,098

please check the condition to jump on page 4. is it diaplaying other than main data?

Read only

0 Likes
3,098

Hi Ranju,

There is no issue in jump to the page 4. the page 4 is displayed.

But, from page 4 I want to go to page 6. So I put a command in the last window of page 4. To put the command, I make the window as Main window.

But the moment I define the window as Main window, it does not display the contents of that window. the contents of all other windows of page 4 are properly displayed. also If I define the window as secondary window, it displays the contents , but in that case there is no option to jump to page 6.

That is the main problem.

I want one main window on each page to define the page triggering command. But system only displays contents of first main window.

other main windows are not executed at all, hence not even the command.

Please help

Read only

0 Likes
3,098

We are working on SAP ABAP version 7 with path level 14. Is there any note or something which I can implement.

Because whatever I have understood so far, is that there is some issue with the standard behaviour of the system

ABAP Gurus, Please help

Read only

0 Likes
3,098

Hi,

Unfortunately, you must code all content (including page break nodes) in the main window of the first page you are outputing... There is no way I know of to work around this restriction. It kind of makes sense, if you think long enough about what the Smartform Composer has to accomplish at runtime... In terms of content, you can only have one "main window" spanning over several pages...


The main window of the rest of pages should contain no content - you can only change positioning, height, background color of main window - attributes like that, but you can't "add" to the content of main window.  Only the width of the main window must remain the same over all pages (or you'll get run-time error).

The Form with 14 different pages is IMO far too complex anyway. I'd try to really look at the requirement, try to split the output required into several forms, and leave the decision as to which form needs to be output when to the application...

cheers

Janis

Message was edited by: Jānis B

Read only

0 Likes
3,098

yes Janis is right, You need Main window only to put condition which is on other than first pages. You need to work around it.

Read only

0 Likes
3,098

Hi Janis...

Thanks for the reply..

I have ultimately done the same thing...

There are around 8 to 9 processes printing on about 14 pages. and I have created a separate form for each process.

My requirement is satisfied.

But it really looks ugly because, problem is user can not preview all the pages at a time. more over he can't preview the pages of previous process, because the smart form is already executed.

if user takes print out, it works perfectly fine. No problem. I discussed this with the concerned people and so far they don't have issue.

But I also thought to check any other option if possible.

Thanks Janis and Ranju again...