Application Development and Automation 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: 

WATERMARK IN SAPSCRIPTS

Former Member
0 Kudos
2,929

Hi,

I want to know how to print a watermark on the page in sap-script. For example, i want to print "confidential" diagonally on the sap-script page. How do i do it?

please let me know...!

<b>Its urgent...!</b>

Regards,

Pankaj P. Utagikar.

14 REPLIES 14

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos
935

I'm not sure it can be done at all in SAPScript. However if you are on 46C or higher, you might want to consider using SmartForms. Watermarks are very easy to do in SmartForms. On the Page Attributes you have a tab for Background Picture. You even have to option to display the watermark in Print-Preview only.

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
935

I believe you could achieve this the same way you put a logo on a form. It's just that your image would have to be shades of gray(very light gray).

Regards,

Rich Heilman

0 Kudos
935

Yes, this works fine, I did the same for a customer.

Elko

0 Kudos
935

Hi elko,

this is ramu,iam working on implementation of watermark in sap scripts.please can u tell me the detailed procedure to implement watermark in sap scripts.This is some what urgent requirement.

Thanks in advance,

Ramu.

Former Member
0 Kudos
935

With Smartforms, you can also choose a colour. We are creating a watermark using an overlapping window, in which the text is a light gray. It works when you print to a local printer via SAPLPD, haven't tried with the SAP printer drivers yet.

0 Kudos
935

Can the watermark be conditional? For example, if the Smartform is generated in DEV, have a watermark of 'TEST', and suppress the watermark if it is is PRD?

0 Kudos
935

In case you are not able to check SY-HOST variable and print / don't your background image accordingly only then

---

I think if you would not upload that background image in Production with the name that you are using in your SapScript - that should be enough

Only keep that image ( with that name ) in Dev & QAS.

I think SapScript will ignore your background image, if not found.

Thanks,

Ram

0 Kudos
935

Thanks Ram.

Actually I'm trying to put a watermark in Smart Form not SAPscript. I was side-tracked by Thomas Jung's earlier reply that mentioned using a background picture to do this. I tried this with the ENJOY SAP logo in Smart Form but the graphic displaced the text instead of putting a watermark beneath the text.

SAP's 4.6C and 4.70 documentations SAP SMARTFORMS -> USING SAP SMART FORMS -> BASIC ELEMENTS OF A FORM -> POSITIONING TEXTS ON THE FORM -> PRINTING GRAPHICS says "At present, you cannot overlay graphics with text. However, if you use a template node, you can display graphics and text side by side." I was wondering if the overlay windows could overcome this. Unfortunately I'm not using SAPscript.

0 Kudos
935

Hi Kay,

You can create a new overlapping window within the page( as big as page itself - overlapping all other windows).

Further within this new window create the graphic that you want to appear as watermark.

Actaully, I tested it and it works the way we want.

Further you can use condition to check for the system.

Thanks,

Ram

Former Member
0 Kudos
935

HI

GOOD

You can do this by checking the system you are on (syst-sysid). If this is not a production system you can print some text (even with the system ID). You can do this in the main window, but also in a special window.

Printing a real watermark is not possible as far as I know. But as said above, you can print a special text depending on which system you are on.

THANKS

MRUTYUN

Former Member
0 Kudos
935

Hi,

I hope inserting a water mark is same as inserting a logo,

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

Former Member
0 Kudos
935

For Scripts

/people/naimesh.patel/blog/2008/05/22/watermark-in-sapscript

is quite usefull. In Smartform just include the same image in a window on a condition.

For testing whether an environment is production or not I think it is better to test on T000-CCCATEGORY = 'P' (Production) then using syst-id.

Former Member
0 Kudos
935

Thanks, I got it to work for documents with 1 or 2 pages but not for documents with more pages.

If I have f.e. 4 pages:

page 1 looks OK

Page 2 and 3: on every line, 2 lines are printed on top of each other

page 4 looks OK

What am I missing?

My header looks like this:

/

/

/

/: BITMAP GREYBAR OBJECT GRAPHICS ID BMAP TYPE BCOL DPI 130 XPOS 0 MM

/: NEW-WINDOW

/

/

/

/ <B>Item,,Item name,,Order Quantity,,Price Unit,,Value</>

/

I tried putting the image in a separate text document too, but that makes no difference; the lines keep overlapping

0 Kudos
935

I made the problem go away by creating a NEXT page with only one main window.

And now all documents look good, documents of 1, 2 or more pages.

Still can''t quite get my head around  this... maybe an overflow indicator becomes incorrect, because you move the pointer back a few lines in the same window. Or something. And the system thinks it's perfectly OK to write over the same page again * scratching my head *. Anyway, problem solved.