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: 

Smart form Header Issue in Main Window

Former Member
0 Kudos

Hi ,

I have a requirement to display the Purchase Order Number as Header in Main Window.when ever a purchase order number changes only

this header should be triggered. I have used AT NEW keyword and it works fine.

Now my problem is when the main page extends to next page this header doesn't comes up.

for Ex..

Main Window Page 1

Purchase Order Number

1

1

1

1

Purchase Order Number

2

2

2

2

End of Main page 1

Main Window Page 2

2-->>>> Here i want the Purchase Order Number Header , Since its in new page that Header doesnt triggers.

2

Purchase Order Number

3

3

3

goes on..

Is there any way to solve this??????

Regards,

DR

1 ACCEPTED SOLUTION

arindam_m
Active Contributor
0 Kudos

Hi

Create a new window outside the main window and use a template in that to design the header.

Also have you tries the header section of the TABLE that you use to display the internal table contents.

Cheers,

Arindam

9 REPLIES 9

anup_deshmukh4
Active Contributor
0 Kudos

Hello Dinesh ,

Make a Copy your main page an assign it as NEXT PAGE in your smart from ,

Your header will repeate in this case if its on page 1 ( will have to alter copied page to some extent )

Hope this helps,

Anup

arindam_m
Active Contributor
0 Kudos

Hi

Create a new window outside the main window and use a template in that to design the header.

Also have you tries the header section of the TABLE that you use to display the internal table contents.

Cheers,

Arindam

sai_krishna24
Active Participant
0 Kudos

Hi Dinesh,

I have solved this problem by creating an another window & template .

Create a template with header details in smartform and then place it into the another window. Align window properly to fit as a header for Item table.

Hence, if we have more no. of records then main window will extend to next page at that time and the header window also will print in the next page. And you will be creating  only one Page for this. However, Based on the records it will print on no.of pages and also header will repeat for each page.

Hope this would be helpful.

Best Regrads,

SaiKrishna

Former Member
0 Kudos

Hi Dinesh,

In my view to solve this, you need to use a template to display your header, this way you will always have a fixed place for that header on the page. Using the Table Header may not be required.

The template should have same alignment of field spacing as your Main Table.

Now you can display your Purchase Order in the template and that would be displayed on next pages as well.

Please test and let me know if this doesnt work for you.

Regards,

DN.

Former Member
0 Kudos

Hi Dinesh,

You can call your same page as next page.

You can specify your next page in general attributes of PAGE.

I have tried it only the content of main window will get changed, and rest of windows content will be same. so If you want to print the purchase order number, create one variable to store that value and use it in header.

Regards,

Praveen

Former Member
0 Kudos

Create a variable in your smartform and assign the po number to it.

Also on your at new keep a variable and toggle it on display

Display it with condition page no <> 1 and toggle eq X that is at new is not triggered.

In that case it will be done.

cheers

Former Member
0 Kudos

Hi All,

Thanks for your suggestions, I have created a new window and created a template under it to display

the Header details such as Purchase Order.... But the problem here is

for example:

Main Page 1

Purchase Order Number

1

1

1

1

End of Main Page 1

Main Page 2

Purchase Order Number (Introduced by Template)

Purchase Order Number ( By AT NEW Condition)

2

2

2

2

Purchase Order Number

3

3

3

End of Main Page 2.

By setting the Flag can we avoid multiple headers in one page? or is there any keyword

which finds the whether the header is printed already in First line?

so that we can check every time before printing by headers by AT-NEW condition.

Hope my question is clear.

Regards,

Dinesh R

0 Kudos

Hi,

Set a global flag variable. Then Set the variable to 'X' before the start of the PAGE1 in your smart form within CODE block and clear the same after header printing with another CODE after your TEMPLATE.

And print header template only if the flag value is 'X'.

The other option is if your print the header as a part of the HEADER section of TABLE. The event AT PAGE BREAK would be useful. Check the link below for more info:

http://help.sap.com/erp2005_ehp_04/helpdata/en/91/fe26ab78c411d4b5f4006094192fe3/content.htm

Cheers,

Arindam

0 Kudos

Hi Dinesh Ravisekaran

You can set the flag for the header template, there you need to tick the Events on the Conditions tab.


In global definitions you need to set flag and pass to one variable based on that in condition tab you need to add that flag value eq 'X'.


Regards,

Bastin.G