cancel
Showing results for 
Search instead for 
Did you mean: 

Last Page for different users is not getting displayed

Former Member
0 Kudos

Hi,

I am trying to create a smartform for PO where I created 2 pages.My scenario goes like this.In the first page I created a Main window which consists of the PO line items.In the 2nd page I need texts consisting of Special instruction and Terms & condition page. When I am entering a PO which consists of only 3 line items the page which has Special instruction and Terms & condition is getting displayed.But the PO which has 11 line items the Special instruction and Terms & condition page is not getting displayed.Another important condition is the Special instruction and Terms & condition page is for different user and so I have given conditions accordingly to facilitate the user.

Could anyone please guide me as to why my Special instruction and Terms & condition page is not getting displayed for many line items in the PO.

Thanks

Praveen

Accepted Solutions (1)

Accepted Solutions (1)

raviahuja
Contributor
0 Kudos

Hi,

Create a main window on Page 2 (this will be continuation of the main window on page 1) and write Special instructions inside this main window. I believe, you must be using some sort of loops to print PO lines which you would be printing in Main window on page 1. Put a command to go to next page after this loop on page 1.

I'm sure instructions would print on second page irrespective of number of lines in PO.

Thanks.

Ravi

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi

In your case after item data table in main window, Use the command option and in that specifiy go next page.

Once after displaying all items,terms & cond will start in next page.

Regards,

Raghu.

Former Member
0 Kudos

Hi,

Use command line within loop to achieve the functionality, also for the first page you have created call that first page as next page, and create aseperate page for terms and condition and in command line call that term and condition page. If you are using a table to print line items the command line may not work,then use a loop and with in loop and put your table under this loop and use command line before end loop. i'm giving an example below you can understand by that.

Suppose your main table has two fileds EBELN and EBELP.the tabel name is it_ebeln.it has five rows.

EBELN EBELP

1 10

1 20

1 30

1 40

1 50

and you are printing data from this table using TABLES in smartform

Now crea a new tabel only containing one filed EBELN and has only one row.the table name is it_main.

EBELN

1

Now you create a loop in the smart from and in the loop use table IT_MAIN. and put your original table IT_EBELN in TABLE of smart form within this loop and in the where condition put ebeln = wa_main-ebeln condition.

Now at the end of this loop use command line and call your terms and condition page now it will work fine.

LOOP at it_main into wa_main..

TABLES it_ebeln where ebeln = wa_main-ebeln.

COMMAND LINE..

ENDLOOP.

Edited by: Saptarshi Sarkar on Sep 5, 2011 10:14 AM

former_member215781
Active Participant
0 Kudos

If your maine window has large content, then it will continue to the second page. Are all the 11 lines getting printed on the same page? If not what is appearing on the second page? Is it blank?

Maybe your main window is getting extended to second page with blank lines. Is there a line inserted at the end of content, which might be extending the main window

Can you check precisely when this is happening exactly? i.e. when lines are more than 10 or 11 or so on

Former Member
0 Kudos

In my first page 6 line line items are getting printed and in the 2nd page remaining line items are getting printed.But the special instruction and T&C which I created in the smartform in the 2nd is not getting printed.I have created 4 such T&C for 4 different users and have given conditions for all of them.If there are only few line items for PO the T&C page is getting displayed.I am not understanding this when it is getting displayed for 2 or 3 line items why is it not getting displayed for many line items.

Thanks

Praveen

Former Member
0 Kudos

To Sim,

Also I have written a code saying that main_end = 1 and after that I have given a command stating it to go to new page 2 after the table which I created in the main window

Edited by: praveenraj48 on Sep 2, 2011 1:57 PM

former_member215781
Active Participant
0 Kudos

What is your NEXT PAGE pointing to?

Former Member
0 Kudos

Sorry guys, I could not carry out your ides for past 2 days and had not replied also as my client server was down.However now its working.

@ Ravi Ahuja: I have not created any loops in the smartforms

@ Sim: In the 2 pages which I created the 1st page's next page is pointing to the same page and 2nd page's next page is pointing to the same page.Also I have made a template(of secondary window which consists of PAN No., VAT No etc) in the first page of smartforms which should come after all the PO line times.For multiple PO line times this template comes in the 2nd page.Then after this page the T&C page is coming blank.

Thanks

Praveen

Edited by: praveenraj48 on Sep 7, 2011 7:29 AM

former_member215781
Active Participant
0 Kudos

Try pointing NEXT PAGE of your first page to second page.

Former Member
0 Kudos

@ SIm: I tried doing that but the template which I created in the first page of the smartform does not appear after the PO line items in the 2nd page on print priviewing it.

former_member215781
Active Participant
0 Kudos

Did you even try as LAST page = second page

Former Member
0 Kudos

@ Sim: Yes my last page which is the 2nd page is pointing to 2nd page itself.

@Raghavender: After creating the table in main window of the first page I have give a command line as pointing to 2nd page, but still the T & C page does not seems to appear.

One more thing which I would like to share is the conditions which I have given for all the 4 T&C page, when removed all the T&C get displayed.The problem is the moment I put the condition for different users, the T&C pages does not get displayed.

Also I tried giving that this T&C page as "Only after end of main window" in the checkbox, still its not displaying the T&C page

Edited by: praveenraj48 on Sep 8, 2011 6:48 AM

former_member215781
Active Participant
0 Kudos

Can you provide details/code about the condition

former_member230486
Contributor
0 Kudos

Hi Praveen,

You have to use Command Node after item table.In Command Node you have to specify the Go To New Page as your terms and conditions page,so that it will automatically trigger the page as you like.Hope it will clear your problem.

Former Member
0 Kudos

@Sim : In the first page of smartforms, where I created a table in the main window, below that in the program flow logic I had written a MAIN_END in the input and output parametes. IN the coding part I have written MAIN_END=1.

In the command line i have chosen goto new page as page 2.

In the 2nd page where I have created 4 T&C, I have given the condition for 1st user as IT_EKKO-ERNAM = 'MMUSER'

for 2nd user : IT_EKKO-ERNAM = 'MMUSER1'

For 3rd user : IT_EKKO-ERNAM = 'MMUSER2'

For 4th user : IT_EKKO-ERNAM = 'MMUSER3'

And for all the 4 users I have mentioned it as to be displayed as only after end of main window in the checkbox.

@ sapabap403: I tried your method initially, but its not working.

Edited by: praveenraj48 on Sep 8, 2011 10:41 AM

Edited by: praveenraj48 on Sep 8, 2011 10:45 AM

former_member230486
Contributor
0 Kudos

Hi Praveen,

Check it once where you have created command node,if you have written after looping at item level just cut the command node and select the loop right click,then it will ask under loop and after loop,you have to select after loop and paste.Hope it will resolve your problem.