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: 

SAP SCRIPT:Want to Place heading in every new page

Former Member
0 Kudos

Hello,

The new page which is triggered due to full page main window,i want to have heading in new -page which is getting triggered automatically.

How i can do this.

thanks

Srinivas

4 REPLIES 4

former_member184569
Active Contributor
0 Kudos

First. PRINT HEADER.

CALL FUNCTION 'WRITE_FORM' "First header

EXPORTING element = 'ITEM_HEADER'

EXCEPTIONS OTHERS = 1.

HEADER WILL BE PRINTED AT TOP OF THE MAIN IN EVERY NEW PAGE/MAIN

CALL FUNCTION 'WRITE_FORM' "Activate header

EXPORTING element = 'ITEM_HEADER'

type = 'TOP'

EXCEPTIONS OTHERS = 1.

Check this thread.

http://scn.sap.com/message/7839831,

Or

In the Sapscript,

If u write in between TOP and ENDTOP then it will print in all pages.

/:TOP

header

/:ENDTOP

Message was edited by: Susmitha Susan Thomas

kamarajan_gopal
Discoverer
0 Kudos

Hi,

I suppose you have two pages inyour SAP Script. The first page would be 'FIRST' and the second page is 'NEXT'. The next page attribute of the 'NEXT' page would be the same page 'NEXT'.

Then just have a window in the 'NEXT' page. It can be either a constant or variable window. If it is constant text just maintain the text coding inside the window.

If it is a variable text, then have a text element inside a window and call the text element inside the program at appropriate place.

This should take care of having header in all the pages automatically.

Thanks,

Kamaraj

former_member215424
Active Participant
0 Kudos

Hi Srinivas,

1. Call the CALL FUNCTION 'WRITE_FORM' in loop.

2. Mention TYPE parameter as 'HEADER'

Ex : LOOP AT it_tab.

        CALL FUNCTION 'WRITE_FORM'.

         EXPORTING

          element = 'ITEM_HEADER'

               type = 'HEADER'

                window = 'MAIN_WINDOW'.

                   ----

                   ----

                ENDLOOP.

former_member209120
Active Contributor
0 Kudos

Hi Srinivas Pudari,

CALL FUNCTION 'CONTROL_FORM'

  EXPORTING

      COMMAND   = 'NEW-PAGE'

  EXCEPTIONS

      UNOPENED  = 1

      UNSTARTED = 2

      OTHERS    = 3.

call function 'WRITE_FORM'

     element = 'HEADER_TEXT'

     window = 'HEADER'.

endif.

In script, call the ELEMENT 'HEADER_TEXT' and print the required header text...

See this helpful links

http://scn.sap.com/thread/2123253
http://scn.sap.com/thread/687401/scn.sap.com/thread/687401<br/>

http://scn.sap.com/message/7839831#7839831