cancel
Showing results for 
Search instead for 
Did you mean: 

Putting condition in Graphic WIndow in SAPSCRIPT

Former Member
0 Kudos

I created 2 Graphic Windows for Company Logos. Each will appear/ hide according to the company code. I was planning to put a condition onto the window's code but it seems like it doesn't allow edit mode. Just the blue background. Is it possible to edit the graphic code? Are there other alternatives to post the 2 logos?

POints will be given thanks!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Why don't u try this by creating only one window & putting the condition in that window?

U just try this by putting a condition that if bukrs = XXXXX, include the corresponding logo & for the second case include the respective logo.

I hope u got my point. I think there is no need of creating 2 windows. Try with one & let me know in case of any concerns....

Reward if useful...

Pavan.

Former Member
0 Kudos

thanks pavan! i had the created window on VAR and just copied the codes from the graphic windows. if it's on GRAPH, it wont show. so i kept it on VAR. thanks again!

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Jill,

You can't edit graphic window.

Take variable window and u can put the conditions in this window.After entering the conditions convert the variable window into graphic window.

Thanks

Phani

Former Member
0 Kudos

Hi,

You need to make use of PERFORM-FORM concept to solve your problem.

For eg:

In your text editor of SAP script:

write the following code:

PERFORM SET_FLAG IN PROGRAM ZFI1_CHECKFORM

USING &REGUH-ZBUKR&

CHANGING &V_FLAG&

ENDPERFORM

Now, in the subroutine PROGRAM 'ZFI1_CHECKFORM' write the below code:

FORM SET_FLAG TABLES in_tab STRUCTURE itcsy

out_tab STRUCTURE itcsy.

  • Data Declaration

DATA:zbukrs TYPE bukrs.

READ TABLE in_tab INDEX 1.

zbukrs = in_tab-value.

READ TABLE out_tab INDEX 1.

IF NOT zbukrs IS INITIAL.

out_tab-value = '1'.

ELSE.

out_tab-value = '0'.

ENDIF.

MODIFY out_tab INDEX 1.

Try your requirement referring this piece of code.

Reward points if helpful.

Thanks,

Asha