cancel
Showing results for 
Search instead for 
Did you mean: 

sapscript help

Former Member
0 Kudos

hi folks,

I have an issue related to displaying an header text in the main window. It is displaying in the first page and not showing up in the subsequesnt pages. I did check on the form and i do see that header text in FIRST, NEXT and LAST pages. Why is it not showing up on the other pages? Have I missed something here? Also in that place, the table item records is getting displayed. The records that went over to the next page is showing up in its place.

Thanks,

SK

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi

just check in the header (in conditions tab )u mite have checked the checkbox for only on first page .

regards

navjot

reward points if helpfull

Message was edited by:

navjot sharma

Former Member
0 Kudos

Thanks for the reply, it is the MAIN window of every page. I can see that in every page of the form in the text editor.

here is the code in the main window,

HEADING - header element

PROTECT

BOX XPOS 0 MM YPOS 0 MM WIDTH 10 MM HEIGHT 6 MM FRAME 10 TW

BOX XPOS 10 MM YPOS 0 MM WIDTH 50 MM HEIGHT 6 MM FRAME 10 TW

SL,,,,Employee First name

EMP - line item in the window

BOX XPOS 0 MM YPOS 6 MM WIDTH 10 MM HEIGHT 100 MM FRAME 10 TW

BOX XPOS 10 MM YPOS 6 MM WIDTH 50 MM HEIGHT 100 MM FRAME 10 TW

ENDPROTECT

In the program

CALL FUNCTION 'WRITE_FORM'

EXPORTING

ELEMENT = 'HEADING'

  • FUNCTION = 'SET'

  • TYPE = 'BODY'

WINDOW = 'MAIN'

  • IMPORTING

  • PENDING_LINES =

EXCEPTIONS

ELEMENT = 1

loop at itab.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

ELEMENT = 'EMP'

  • FUNCTION = 'SET'

  • TYPE = 'BODY'

WINDOW = 'MAIN'

  • IMPORTING

  • PENDING_LINES =

EXCEPTIONS

endloop.

Any help is widely appreciated,

Thanks,

SK

Former Member
0 Kudos

Hello Sk,

How many PAGE layout you have.

I think the MAIN window will be same for the pages.

Just check any condition is checked with &PAGES& in the form.

like

IF &PAGES& NE 1.
"print header.
endif.

Vasanth

Former Member
0 Kudos

Hi,

I have not given any conditions. Should I declare them as separate windows outside the main so that it displays on all the pages? I am not too familair with sapscript.

Thanks for the quick reply,

SK

Former Member
0 Kudos

Hello,

If the form is created by you. Then create a new window for the header and remove it from the MAIN Window.

Don't forget to change the window name when calling the FM WRITE_FORM.

If useful reward.

Vasanth

Former Member
0 Kudos

Thanks for the reply.

Shall reward the points.

SK

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi skmysore,

Setting a Header Text in the Main Window: TOP

You can use the TOP .. ENDTOP control command to specify lines of text which are always to be output at the top of the main window. These text lines are also known as header texts. An example of the use of header texts in the case of a very long table covering several pages of output would be to ensure that the table heading information were repeated at the start of each new page of output.

Syntax:

/: TOP

:

:

/: ENDTOP

The lines of text enclosed between the two control commands will be output from now on at the start of the main window.

An existing header text can be disabled by using the TOP .. ENDTOP command pair without enclosing any text lines between the two command lines:

/: TOP

/: ENDTOP

Subsequent pages will contain no header text.

This will definately resolve your problem.

Kindly reward if found useful.

With Regards,

Sudhanshu Garg

Former Member
0 Kudos

Thanks for the reply. It is helpful.

SK