cancel
Showing results for 
Search instead for 
Did you mean: 

Text getting overwritten in first page of SAP Script

Former Member
0 Kudos

Hi All,

My Requirement:

1. I have a SAP Script which has a main window which prints the internal table data

2. I have created a instance of Mainwindow to display watermark.

3. Now, everything seems to be fine while displaying the watermark/foreground text.

Problem is:

4. If the data exceeds 15 records(i.e, end of the main page), 16th record starts printing from the top of the main window again.

5. This continues till the end of the 30th record(i.e., it is Overwriting all the first 15 records) and the 31st records is getting printed in the 2nd page.

6. FYI, I have maintained the header in such a way that 2nd Page should be triggered after the first.

7. Also, I have called the windows in the correct order

What could be the problem? Is it because, I have created an instance of main window to display the text. If that is the case, how to resolve this ??? Any thoughts on this would be highly appreciated

Accepted Solutions (0)

Answers (7)

Answers (7)

Former Member
0 Kudos

hi!

Go to menu path of a sapscript on line editor -> Insert -> Select Graphic

by this u get the graphic overlap ur varaiable window with the graphic on the main window and then see...

Former Member
0 Kudos

Hi

Try it by using protect and enprotect.

/: Protect

/: End protect.

If issue was not resolved please check with your windows.

Regards,

Rajani

Former Member
0 Kudos

Hello Richa,

I tried creating a variable window and inserted a Watermark on it.The thing is, Watermark is not getting displayed.I tried both the ways calling the watermark before displaying the text and after displaying the text.

Hello Ravi,

See to display the watermark, I created an instance of mainwindow by using

So, this main window which is an instance of the actual main window will have the same co-ordinates.

I think, this has got nothing to do with that. But, there is something that is missing out here.

Hello Rajani,

I tried using Protect and End Protect. But, it didnot work

Hello Sarves,

I tried creating a variable window exactly the size of the main window and then placed the variable window back of the main window. But, I am not able to see the watermark in the preview.

If I am missing something, please let me know.

Thanks in advance........

Former Member
0 Kudos

HI,

Try adjusting the variable window and main window sizes so you can have the watermark in the preview.

you can go to settings----> Graphical painter check box and adjust it from there manually this will resolve the problem. keep the variable window watermark above the main window don't keep it back of the main window i mean don't overlay it with main window

have a good day,

regards

sarves

Former Member
0 Kudos

I tried the way you told. But, invain.

Someone, Please help me out on this............

Former Member
0 Kudos

HI,

I THOUGHT YOU ARE TRYING TO PRINT THE WATER MARK IN THE PLACE THERE IS NO MATERIAL DATA,IT IS TOUGH TO PRINT THE WATER MARK IN THE SCRIPTS TRY DOING IT IN THE SMARTFORMS.

CHECK THIS LINK FOR MORE INFORMATION,.

[by sap MENTORS|;

REGARDS

SARVES

Former Member
0 Kudos

Hi,

Try changing the co-ordinates of your main window like the UPPER Margine HEIGHT ,WIDTH etc

also first have a preview of the layout and figure out where is the working area of these main windows

if they are overlaping than again work with the coordinates .

and if this doesn''t work than create a second page SECOND and for the FIRST Page give next page as "SECOND " page and give Next page as SECOND page . Create a Main Window for that Page, now automatically the data when exceeds the limit of 15 rec the 16 th rec shall come from the SECOND Page and so on....

Try this out!!

If the problem still persist , pls let me know

Regards

Ravi

Former Member
0 Kudos

hi!

You can take two windows one be the main window and other a variable window and on the variable window u can work with ur watermark...

try this....

it would work...

and then ur data will also not overlap.

Former Member
0 Kudos

Hi Babu,

Try using protect and endprotect like this.

Endprotect

Protect

Text element

Much Regards,

Amuktha.

Former Member
0 Kudos

Amuktha/SreeSudha,

I tried both the ways, you told me. But, the problem continues.

I think the problem is because of two main windows in the first page.

But, I want to restrict one main window instance to display watermark.

And another one to display text. Once it is done writing text on to the main window, then the text should continue writing on the next window. Dont know what is happening here.

Pointers on this would be highly appreciated.

Former Member
0 Kudos

Hi Babu,

Ya use command protrct and endprotect for your text element and try using 2 different windows.

Hope it helps!

Much Regards,

Amuktha.

Former Member
0 Kudos

HI babu,

Use the command PROTECT AND ENDPROTECT..

Regards,

Sravanthi

Former Member
0 Kudos

Hi Sravanthi,

That did not solve my problem.

Given below is the code that I have implemented in main window of the form

/: POSITION WINDOW

/: SIZE WINDOW

/: BOX FRAME 6 TW

/E WATERMARK

/: BITMAP 'Z84364CONFIDENTIAL' OBJECT GRAPHICS ID BMAP TYPE BCOL

/E PRINTHEADER

DE &ULINE(65)&

DE <BF>Material</> ,, <BF>Description</> ,, <BF>Quanity</>

DE &ULINE(65)&

/

/E ITABELEMENT

/: PROTECT

DE &ITAB_WA-MATNR& ,, &ITAB_WA-MAKTX& ,, &ITAB_WA-FKIMG&

/: ENDPROTECT

/E PRINTLINE

DE &ULINE(65)&

Please let me know if I am missing out anything here.

I checked the Syntax check and there is no error.

Former Member
0 Kudos

Hi,

try this.

/E ITABELEMENT

/: ENDPROTECT (<----- see the change )

DE &ITAB_WA-MATNR& ,, &ITAB_WA-MAKTX& ,, &ITAB_WA-FKIMG&

/: PROTECT ( <--- see this change )

/E PRINTLINE

DE &ULINE(65)&

Former Member
0 Kudos

Hi,

As per the code you are trying to print the watermark and the header also in the main window.. try to give the watermark and the header in a variable window as the data in that is not a changing every time and then print the data of the materials in the main window..

this will resolve the issue for sure..

regards,

sarves.