‎2006 Jan 17 4:35 PM
Hello all,
I want to print a graphic element, included in a graphic window, conditionally.
Is there a way to print this window only when certain conditions are fulfilled (this will be checked in the print program)
or
the window will always print, regardless the conditions?
If case 2 it true, then is there another way to achieve my client's desire?
Best regards,
Bogdan
‎2006 Jan 17 4:38 PM
Not sure that you can do this in the print program. I have done this in the past by putting an IF statement around the BITMAP statement in the SAPscript itself. Worked pretty good. I did have to define a field in the print program which when I wanted to print the image, I set it to "X", and space when not. Then in the sapscript.
IF &FLAG& = 'X'
BITMAP .....
ENDIFREgards,
Rich HEilman
‎2006 Jan 17 4:38 PM
Not sure that you can do this in the print program. I have done this in the past by putting an IF statement around the BITMAP statement in the SAPscript itself. Worked pretty good. I did have to define a field in the print program which when I wanted to print the image, I set it to "X", and space when not. Then in the sapscript.
IF &FLAG& = 'X'
BITMAP .....
ENDIFREgards,
Rich HEilman
‎2006 Jan 17 4:41 PM
‎2006 Jan 17 4:40 PM
HI,
You can always use condition in the script directly.
For example.
/: IF &EKPO-WERKS& EQ '0011'.
/: INCLUDE ZHEX-MACRO-NEW OBJECT TEXT ID ST LANGUAGE EN PARAGRAPH Z4
/: ELSE
/: INCLUDE ZHEX-MACRO-MINEPRO OBJECT TEXT ID ST LANGUAGE EN
/: ENDIF
‎2006 Jan 17 4:45 PM
Hi,
Create a graphic window(Ex,Graph).Define a text element as Test (Ex. /E Test).
In your driver program :
Use following function and call this function based on your conditions.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = TEST
WINDOW = 'GRAPH'.
Lanka
‎2006 Jan 17 5:01 PM
How do I do that, Lanka?
As hard as I try, I cannot edit the content (SAPScript text) of a graphic window.
Maybe I'm missing something?
Bogdan
‎2006 Jan 17 5:06 PM
Hi,
You will be able to go into the change mode & go to elements & change.
‎2006 Jan 17 5:09 PM
It seems I'm NOT able to do that, with a graphic window.
I repeat, am I missing something?
BR,
Bogdan
‎2006 Jan 17 5:11 PM
Hi Bogdan,
Can you please send me your code to murthy.narayana@intelligroup.com
I will check and let you know.
Lanka
‎2006 Jan 17 5:14 PM
Lanka, thank you, I solved the problem,
BUT you raised another interesting issue here: the possibility to edit manually the SAPScript of a Graphic window.
My question was: Is that possible? And if it is, how to do it? I tried in several diferent ways, without success.
Can you help?
Thanks,
Bogdan
‎2006 Jan 17 5:37 PM
Hi Bogdan,
Instead of creating a Graph window.Create a variable window & write the include to get the graph.Before that upload the graph into sap using program RSTXSCRP.
before uploading change the BMP file to .tiff file.
In the variable window you can write conditionally to get the graph.
‎2006 Jan 17 5:41 PM
Hi Bogdan,
What do you mean by manually edit Graph window? You can edit the window by setting a debugger by using T/code SE71.
How you solved your issue coding in driver program or in layout set?
Lanka