cancel
Showing results for 
Search instead for 
Did you mean: 

How to insert a condition in the Graphic Window of a SAP Script ?

Former Member
0 Kudos

Hi,

I need to give a condition inside the Graphic Window for printing the Logo in the SAP Script. Now, my problem is that the Graphic window is only opening in Display mode. How to make it editable and insert a condition in it?

OR

Is there any other way to do it?

Please Help.

Thanks in Advance.

-VRU

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi!

Define a simple VAR type window, instead of GRAPH.

Then include your bitmap graphics (what you have already upload into transaction SE78), with a statement like this:

/: IF &PAGE& = 1

/: BITMAP 'ZZMYLOGO' OBJECT GRAPHICS ID BMAP TYPE BMON DPI 600

/: ENDIF

TYPE could be BMON or BCOL for color pictures.

DPI could be changed also...

Regards

Tamá

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

How u have declared your logo in script????Do u want to print different logos depending on the condition you are giving ???? If it so I think it is not possible in script but it is possible in smartform

But i think u can perform it through your driver program

In the INCLUDE statement you can use a variable for the graphics and the value of this variable (standard text name for the graphics) can be derived in your print program.

The same way works for the BITMAP command.

INCLUDE &w_bitmap& .....

Regards

Pavan

Former Member
0 Kudos

Hi Pavan,

Thank You for your answer.

I need to give a condition for a Single Logo to print if the codition is satisfied.

This I was able to do in a regular window by including the Logo & give the condition for it.

When you try to go to the Editor for a Graphic Window, it opens only in Display Mode. But what I need is to insert some code inside the Graphic Window - How do I do that?

-VRU

-VRU

Former Member
0 Kudos

Hi

I got your point. I'll provide you solution

In the logo window goto coding part by pressing F9 and give your coding as


IF &BKPF-BUKRS& = 'COM1'
INCLUDE GSPL OBJECT GRAPHICS ID BCOL LANGUAGE DE
BITMAP 'LOGO1' OBJECT GRAPHICS ID BMAP TYPE BCOL
ELSEIF &BKPF-BUKRS& = 'COM2'
BITMAP 'LOGO2' OBJECT GRAPHICS ID BMAP TYPE BCOL
ELSEIF &BKPF-BUKRS& = 'COM3'
BITMAP 'LOGO3' OBJECT GRAPHICS ID BMAP TYPE BCOL
ELSEIF &BKPF-BUKRS& = 'COM3'
BITMAP 'LOGO4' OBJECT GRAPHICS ID BMAP TYPE BCOL
ELSEIF &BKPF-BUKRS& = 'COM4'
BITMAP 'LOGO5' OBJECT GRAPHICS ID BMAP TYPE BCOL
ENDIF

<b>Note:</b>But you have to upload all your logos in se78 then only you can upload and give conditions for this

Regards

Pavan

Former Member
0 Kudos

Hi Pavan,

Thank You for the Answer.

But as I have stated earler, when you open a Graphic Window, it opens only in Edit mode. So, no code can be written there.

BTW, I got the answer for this. Change the window type from Graphic to VAR which enables to write in the Editor & then change it back to Graphic again.

Anyway, Thanks for the replies.

-VRU