Putting condition in Graphic WIndow in SAPSCRIPT
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!
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 ®UH-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
Similar Messages
-
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,
BogdanHi,
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 -
Putting method in graphic window instead of console
Hello!
I want my blackjack game to run in a graphical window instead of in the console.
I have already made 2 buttons that starts the method(the blackjack game) and that shuts down the program. But when the program starts the text is printed in the console (which means that I have to write in the console if I want a new card or stand).
Help is very much appreciated!OK :P
Yeah I got it to compile correctly when I changed:
"public void K�rspel() {"
to
"public String K�rspel() {"
but the problem now is that none of the graphical stuff shows and the program is looping endlessly haha :P
I can publish the whole thing instead :P
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Tjugoett extends JFrame implements ActionListener {
Kortbunt lek = new Kortbunt();
Manniska du = new Manniska(lek);
Dator jag = new Dator(lek,du);
private JButton starta = new JButton("Starta");
private JButton sluta = new JButton("St�ng av");
JLabel a = new JLabel(K�rspel());
public Tjugoett() {
Container c = getContentPane();
c.setLayout(new GridLayout(1,3));
c.add(starta); c.add(sluta); c.add(a);
starta.addActionListener(this);
sluta.addActionListener(this);
setVisible(true);
setSize(300,300);
setDefaultCloseOperation(EXIT_ON_CLOSE);
Container c2 = getContentPane();
c2.setLayout(new GridLayout(1,1));
setSize(350,100);
setVisible(true);
setDefaultCloseOperation(EXIT_ON_CLOSE);
public String K�rspel() { // changed this from void to String
boolean nyttParti�nskas = true;
lek.nyKortlek();
lek.blanda();
du.spela();
if (du.po�ng() > 21)
System.out.println("Du F�rlorade!");
else if (du.po�ng() == 21)
System.out.println("Du Vann!");
else {
jag.spela();
if (jag.po�ng() <= 21 && jag.po�ng() >= du.po�ng())
System.out.println("Du f�rlorade!");
else
System.out.println("Du Vann!");
return K�rspel(); // when changing from String to void I needed to write a return thing
public void actionPerformed(ActionEvent e) {
if (e.getSource()==starta)
K�rspel();
else if (e.getSource()==sluta)
System.exit(0);
public static void main(String[] arg) {
Tjugoett tj = new Tjugoett();
Do you think it can be because of the containers? That I need to change to JPanel instead? I am going to try it also and see what happens. -
Hi all,
following is my requirement....
1. Display text of designation code selected on the screen from table ZCMT011_DESGN
2. Fore selected signature code on the screen get details of scanned file from table ZCMT011_SIGN and print scanned image.
For this what should i do ... wherther i should have multiple graphic windows for each image ... or there is any other way of getting image on screen depending on input condition from the table.
i hae uploaded the image in SE78 ... also then i have saved this file name in the ztable ......in filename field..
Please help me its urgentHi,
whatever the images are there .you have to create the graphic windows and in conditon tab put conditions for all graphs.
Whenever conditon satisfies particular graph will display.
Don't forget to reward if useful... -
How to insert a condition in the Graphic Window of a SAP Script ?
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.
-VRUHi
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 -
Calling a window in sapscript based on some conditions
Hi all,
I want to call a window in SAPScript based on some conditions.Plz suggest how could i do that.
Regards,
Chinmay.Hi,
Use a text element in that window.
ie..
/E TEXT
&VBAK-VBELN&
in ur driver program
if vbak-vbeln is not initial. ( your condition)
call function 'write_form'
element = 'TEXT'
window = 'WINDOW_NAME'
Endif.
hope this helps
santhosh -
If Condition in Smartform - window text- without program lines
Hi,
I have faced one problem in smartforms. In smartforms i have a window (main.) It has five lines. For Fifth line only i need to check one condition. if it is true then print the Line otherwise i need one Blank line to print.
How i write if condition in smartforms window - text.
Mahesh.Hi Mahesh,
You need to create and alternative node and put your text into that. An alternative will check a condition, and process one of two nodes depending if it is true or false. Based on your condition, on true you can have your current text element and on false a text element containing a blank line.
Regards,
Nick -
Printing digital signature in main window of sapscript at some location
Hi,
I want to print graphics in main window in sapscript. I want to position the graphic ( signature) at some position (preferably right aligned ). How to do that? Can we do that in .bmp graphics. In case we use .tiff format , how to do it. Tell me the steps involved as I have never used RSTXLDMC to upload .tiff files.
Regards,
D.MallickHi
Just open rstxldmc in se38 and execute.
It will gve you a screen. You need to fill the first two blocks only. Remaining are optional.
File Name : Give pathe+name of your .tiff file
Type : Bcol for colour and bmon for mono
Resolution : say 75 (as you wish)
Second block
Text name : only replace astrick by your name ZHEX-MACRO- has to be there.
Actually this program will convert .tiff file into text file.
you can include this text file in any window. Text name is the name of the text file generated
no more changes
Now execute.
Now you can use this text file ZHEX-MACRO-name in any windoow
If useful, give me points
cheers
vamshi -
How to put conditions like minoccurs=1 in EJb generated webservice(WSDL)
i created a Webservice from EJB,But where i will put conditions like minoccurs=1,...
this is my function
@WebMethod(operationName = "addEntry")
public Reply addEntry(@WebParam(name = "username") String username, @WebParam(name = "password") String password, @WebParam(name = "entryName") String entryName, @WebParam(name = "entryAge") String entryAge) {Hi(Bonjour)!
sharronsuss wrote:
Bonjour et merci, Michel - I've been playing around in International Preferences, but can't seem to get a Keyboard Viewer (in any language) to show itself. The Mac onscreen help window doesn't seem to relate to my actual options, so I think I will go to the general OS forum.
Look in the menu bar, there should be a little flag representing your language keyboard setup. It's a menu. Use it to activate the "show keyboard layout..." (May be it's other terms as I use mine in french.
Once this keyboard layout viewer is open (it will open over any application so you can use it anytime), you can use the command, shift, option keys or combo of those keys on your keyboard and see all combinaisons in the layout window (example: in french layout, I have to use ALT-G to do a copyright symbol: © ). (for the history: Mac has always contained a keyboard viewer from system 1.0 )
Close the keyboard layout and use the key combinaison to type the desired symbol.
The widget is faster, it opens a list of all characters in the font set.
From your current text editor (or from FCE title generator), invoque the "characterpal" widget and simply look at the key combinaison to get the desired character .
Michel Boissonneault -
I had all photos on a Windows desktop. Got a mac laptop, installed LR5, and put all images from Windows onto an external hard drive. When I go to import them into LR on the mac, they are all locked. Help, please!
"I plugged the external into the Mac and moved a folder of images onto the desktop. It looks like it went from read only to not locked. Is this possible?"
Yes, that's exactly what happened. If you buy another drive, you could copy from your existing drive to the new and your files will be read/write. The new drive will have to be formatted as an HFS drive (that's the Mac's format). If you need to format it, you use Disk Utility which is in the Utilities folder on your Mac. Be careful with that -- it wipes out whatever is currently on the drive. Make sure you format the right drive.
I keep all my images on an external drive, too. In fact, I have two matching drives and sync them so I always have a backup. -
Putting conditions on services in Service PO
Hello All,
I am trying to create Service PO using BAPI_PO_CREATE1. I have one line item and 3 services (sub line item). I also need to populate conditions on line item and services.
I am populating line items into POITEM, services into POSERVICES. Conditions for line items are populated into table POCOND . But I am not able to find solution to put conditions on services?
Which table should I use in BAPI to create conditions on services and how will i use it?
Please let me know your suggestions.
Regards,
MadhuraHey, did you ever find a solution to the above post. I am facing the same problem at the moment. Any help would be greatly appreciated.
Cheers,
Neil -
How to change CPI for a particular window in SAPScript
We want to change the Character per inch of a particular window in SAPScript. Since SAPscripts allows only header level maintainence of CPI. We are unable to change for a particular line (or window).
Could anybody help on this?
Since its an urgent issue.
Many thanks in advance.
Regards,
DipenHi Ravi,
Thanks for your feedback.
Actually the requirement is like we are not suppose to change the font size (i.e height of font should remain the same). But only CPI should be changed.
Regards,
Dipen -
Window inside another window in SAPScript
Hi ,
Is it possible to create a window inside a main window in SAPScript ? If so,how ?
Please help.
Thanks®ards
Ananya MukherjeeHi !
I don not think that will work...
but... windows can overlap - perhaps that may help you.
Simply create a new window that is laying "over" your main window... that's
working.
Regards
Rainer
Some points would be nice if that helped. -
I have a pc with windows8.1 and it automatically puts download docuements to windows reader and cannot choose adobe or delete/ get around the reader and the reader is jammed from deletion. How do |I make adobe acrobat my default reader?
Open Acrobat manually and go to Edit - Preferences - General. Click the "Select Default PDF Handler" button and then select Acrobat from the list and click on OK. The next time you open a PDF it will be opened in Acrobat automatically.
-
When I'm out or go to bed at night, I turn off my wireless internet router. Sometimes I turn it off when I'm just going to be doing something that doesn't require me to be online. Whenever I do this, Firefox keeps putting up an alert window every two minutes telling me I have no connection (which I know). How do I disable this alert window so it doesn't keep showing up in the middle of a game or a document I'm doing?
Its an addon, not firefox.
Start Firefox in [https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode Safe Mode to Troubleshoot the issue] and to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
* https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode
*https://support.mozilla.org/kb/Safe+Mode
*https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
Maybe you are looking for
-
Can't install Snow Leopard on a MacBook
Hi guys... A friend of mine brought me his Macbook to fix it because the hard drive was making sounds and now won't boot. The drive in fact is bad, it barely mount, makes noises, etc. I've replaced the internal hard drive for a Toshiba 320gb SATA 3.
-
Suggestion for a user friendly apple experience
-stop this ****** back ups that take hours, and the advice of doing them the evening and stuff i won't take cos i have better things to do that spend hours on my iphone maintenance -stop apple audio format conversion... maybe people that have 100 son
-
Upgrade Error Failed to upgrade SAP Business One Client
Hi All, I have upgraded one of our customers from SAP 9.0 to 9.1 PL5. Everything upgraded successfully through the wizard. When launching the client, the 32 bit client upgraded with no errors. When attempting to open the 64 bit client I get the erro
-
Please apple give Giffgaff the settings they need to help us users tether!!
-
Photo Order Post External Editing
When I edit an image in an external editor then save back to LR (5.x) the edited photo appears to the left of the original (.dng) image. I would like to have the original always appear to the left of it's various iterations. Aside from reordering ma