cancel
Showing results for 
Search instead for 
Did you mean: 

How to print items in the MAIN window of the NEXT page (smartform)?

former_member367551
Participant
0 Kudos

Dear forumers,

There are two pages (FIRST and NEXT) in my smartform with the same MAIN windows in each of the pages. Whatever that are changed in FIRST-MAIN window will also be seen in NEXT-MAIN window.

I will need to control the printing of table TABLE3 contents (already contained in the MAIN window) such that if a variable V_MAT_PRINT is 'X', the TABLE3 contents will only be printed in NEXT page and not printed in FIRST page at all.

How may I achieve this? Please help.

Thank you.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

First, we put the Next page for FIRST as 'NEXT' and Next page for NEXT as 'NEXT' in General attributes tab of both the pages.

create a COMMAND in starting of FIRST page & check the check box 'Go to New Page' and select the Next page, then in CONDITIONS tab of COMMAND give the condition as V_MAT_PRINT EQ 'X'.

Hope it works!!

Rgds,

Pavan

former_member367551
Participant
0 Kudos

Hi Pavan,

I followed exactly as you have mentioned - but this time, TABLE3 is not printed on the NEXT page and the TABLE3 contents are still printed on the FIRST page.

Items contained in the MAIN window:-

- TABLE1

- TABLE2

- TABLE3

- TABLE4

- TABLE5

This very same MAIN window are contained in the FIRST and NEXT page of the smartform.

I am only required to change the printing of TABLE3 if V_MAT_PRINT is 'X' - so that TABLE3 is NOT printed in the FIRST page but it is printed in the NEXT page. The remaining items, TABLE4 and TABLE5 should remain as they are - printed in the FIRST page only.

This is what I did:-

Items contained in the MAIN window:-

- TABLE1

- TABLE2

- TABLE3

- COMMAND

- TABLE4

- TABLE5

COMMAND

General Attributes Tab:

(Y) Go to New Page <NEXT>

Conditions Tab:

Conditions:

V_MAT_PRINT = 'X'

And Additional Event:

( ) Only on First Page

( ) Not on First Page

( ) Only After End of Main Window

( ) Only Before End of Main Window

( ) Only on Page <FIRST or NEXT>

What do I need to do here? Any other clues?

Former Member
0 Kudos

Hi

Items contained in the MAIN window:-

- TABLE1

- TABLE2

- TABLE4

- TABLE5

use the alternate option here. if values is true then call the command and the go to next page.

COMMAND---

TABLE3

if value is false then print the table 3 in first page.

Regards

Ansair

former_member367551
Participant
0 Kudos

Hi Ansari,

Errr.. Are you also suggesting me to change the display order of the tables?

According to your recommendation, if the value is not 'X', then the tables will be printed in the order TABLE 1, 2, 4, 5 and 3 in FIRST page.

Please advise.

Former Member
0 Kudos

>

> According to your recommendation, if the value is not 'X', then the tables will be printed in the order TABLE 1, 2, 4, 5 and 3 in FIRST page.

Hi ,

I dont think so.. You wil be specifying the heigh width lenght for the table . the printing happens based on that..so it prints the third table based on ur upper margin not based on your position of placing it.

Regards

Ansari

former_member367551
Participant
0 Kudos

Hi Ansari,

I think you're right.

I've done the following and it now works.

MAIN window:-

- TABLE1

- TABLE2

- ALTERNATIVE (V_MAT_PRINT = 'X')

- TRUE

- Command (Go to New Page <NEXT>)

- Table3

- FALSE

- Table3

- TABLE4

- TABLE5

A huge, huge THANKS to all here who have helped. Really appreciate your ideas and sincere support here.

Answers (3)

Answers (3)

0 Kudos

Hi Deborah,

I had also faced a similar situation,in my case it was three pages..However i will try to tell you for 2 pages..After the second table .Add a program lines and force a page break only if V_MAT_PRINT is 'X'. After the program lines add a command and make the go to new page as second page.This will solve your problem.I have done the same and its working fine .If you have any questions do ask.

Thanks,

Ahsan

former_member367551
Participant
0 Kudos

>

> Hi Deborah,

>

> I had also faced a similar situation,in my case it was three pages..However i will try to tell you for 2 pages..After the second table .Add a program lines and force a page break only if V_MAT_PRINT is 'X'. After the program lines add a command and make the go to new page as second page.This will solve your problem.I have done the same and its working fine .If you have any questions do ask.

>

> Thanks,

> Ahsan

Hi Ahsan,

Here's my case.

If V_MAT_PRINT is 'X', print the following:-

FIRST page, MAIN window

- TABLE1

- TABLE2

- TABLE4

- TABLE5

NEXT page, MAIN window

- TABLE3

If V_MAT_PRINT is not 'X', print the following (no additional controls / changes are needed, everything remains unchanged):-

MAIN window

- TABLE1

- TABLE2

- TABLE3

- TABLE4

- TABLE5

In this case, is a page break suitable? I doubt it as TABLE4 and TABLE5 will still need to be printed back on the FIRST page regardless of the V_MAT_PRINT value.

Please advise further. Thanks.

0 Kudos

Hi Deborah,

In the program lines force the page break only If V_MAT_PRINT is EQ t 'X' and in the command node ,put the condition in the conditions tab V_MAT_PRINT = 'X' and in general attributes go to next page as second page.This will solve the problem.

Thanks,

Ahsan

Former Member
0 Kudos

Hi,

Try to put a condition in Conditions tab of Table3 :

V_MAT_PRINT = 'X'

SFSY-PAGE > '1'

former_member367551
Participant
0 Kudos

Hi Venkat,

Unfortunately, my requirement does not require the checks on the pages, SFSY-PAGE > '1'.

Please help.

Former Member
0 Kudos

Hi,

You need to create the main window in the first page.. then copy the main window to the second page.

Now you need to use the command option. in the command option u need to set the conditon for the field. if the conditin is set then call the next page.

Regards

Ansari

former_member367551
Participant
0 Kudos

Hi Ansari,

You need to create the main window in the first page.. then copy the main window to the second page.

-- This was already done earlier.

Now you need to use the command option. in the command option u need to set the conditon for the field. if the conditin is set then call the next page.

-- I did this as well, but it did not seem to change anything.

Items contained in the MAIN window:-

- TABLE1 (printing logic should remain unchanged)

- TABLE2 (printing logic should remain unchanged)

- TABLE3 (to change printing logic)

- COMMAND

- TABLE4 (printing logic should remain unchanged)

- TABLE5 (printing logic should remain unchanged)

COMMAND

General Attributes Tab:

(Y) Go to New Page <NEXT>

Conditions Tab:

Conditions:

V_MAT_PRINT = 'X'

And Additional Event:

( ) Only on First Page

( ) Not on First Page

( ) Only After End of Main Window

( ) Only Before End of Main Window

( ) Only on Page <FIRST or NEXT>

Any other ideas on where I could have gone wrong?

How can I control the printing just for TABLE3 contents only?