Can I put this code into a SAPscript form?
Hello experts,
can I put in a SAPscript window codes like read table, select statement, call function, etc?if not, where would I put conditions like if sy-subrc = 0? because I have a conditon that after calling function 'READ_TEXT' I would check if the sy-subrc = 0 else I would do another select statement and check again its sy-subrc. Thanks guys!
Hi,
you can actually call form routines from your SAPscript window. Combined with IF statements (also available in SAPscript) you maybe able to accomplish what you need to do.
You can find information on all available SAPscript control commands in <a href="http://help.sap.com/saphelp_46c/helpdata/en/d2/cb3d07455611d189710000e8322d00/frameset.htm">help.sap.com</a>.
If you open <i>SAPscript Control Commands</i> you find the following 2 commands that may help you:
- Conditional Text: IF
- Call ABAP Subroutines: PERFORM
Regards,
Claus
Similar Messages
-
How can i rewrite this code into java?
How can i rewrite this code into a java that has a return value?
this code is written in vb6
Private Function IsOdd(pintNumberIn) As Boolean
If (pintNumberIn Mod 2) = 0 Then
IsOdd = False
Else
IsOdd = True
End If
End Function
Private Sub cmdTryIt_Click()
Dim intNumIn As Integer
Dim blnNumIsOdd As Boolean
intNumIn = Val(InputBox("Enter a number:", "IsOdd Test"))
blnNumIsOdd = IsOdd(intNumIn)
If blnNumIsOdd Then
Print "The number that you entered is odd."
Else
Print "The number that you entered is not odd."
End If
End Sub873221 wrote:
I'm sorry I'am New to Java.Are you new to communication? You don't have to know anything at all about Java to know that "I have an error," doesn't say anything useful.
I'm just trying to get you to think about what your post actually says, and what others will take from it.
what does this error mean? what code should i replace and add? thanks for all response
C:\EvenOdd.java:31: isOdd(int) in EvenOdd cannot be applied to ()
isOdd()=true;
^
C:\EvenOdd.java:35: isOdd(int) in EvenOdd cannot be applied to ()
isOdd()=false;
^
2 errors
Telling you "what code to change it to" will not help you at all. You need to learn Java, read the error message, and think about what it says.
It's telling you exactly what is wrong. At line 31 of EvenOdd.java, you're calling isOdd(), with no arguments, but the isOdd() method requires an int argument. If you stop ant think about it, that should make perfect sense. How can you ask "is it odd?" without specifying what "it" is?
So what is this all about? Is this homework? You googled for even odd, found a solution in some other language, and now you're just trying to translate it to Java rather than actually learning Java well enough to simply write this trivial code yourself? -
I lost my original itunes library today when I got new computer, I'm sure I did it in error, but the question is all my music is still on iphone 5 can I load this music back to my library or my ipod from the iphone? Right now my libray only shows 7 songs I purchased today. Thanks for any assistance.
Hello gadawgirl21,
Thanks for using Apple Support Communities.
For more information, take a look at:
iTunes: How to move your music to a new computer
http://support.apple.com/kb/ht4527
Transferring purchases
If your iPhone, iPad, or iPod has your purchased content from the iTunes Store, you can transfer the content to a computer that is authorized for your Apple ID.
Note: This option only works for content you purchased from the iTunes Store (as opposed to content from other sources, such as CDs you may have imported). For content you did not purchase from the iTunes Store,synchronization occurs in one direction only. This means your content can be copied from a computer to your iOS device, but cannot be copied from your device to a computer.
Open iTunes.
From the Store menu, choose Authorize This Computer.
Enter your Apple ID and password. Then, click the Authorize button.
Connect your device your computer. If it is synced with another iTunes library, you may be asked if you want to "Erase and Sync" or "Transfer Purchases."
If that alert appears, click Transfer Purchases.
Important: Clicking Erase and Sync will delete any existing content currently on your device. The content would then be replaced with the content that is on the computer.
If you were not offered the option to transfer purchases:
After connecting your device to the computer, its icon appears in iTunes. Click the icon.
From the File > Devices menu, choose "Transfer Purchases from 'Your device name.'"
Have a nice day,
Mario -
i downloaded the whatsapp for my phone and i can't find this code i have to put in. Help!
My phone had the same problem with yours before.
Here is my solution.
Install a software that setup an android system to your computer
Inside the "an android system", install Whatsapp
run Whatsapp, input your phone number to get the code
At this time, your phone suppose to receive your code. -
Can anybody help me to build an interface that can work with this code
please help me to build an interface that can work with this code
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.FileReader;
public class Translate
public static void main(String [] args) throws IOException
if (args.length != 2)
System.err.println("usage: Translate wordmapfile textfile");
System.exit(1);
try
HashMap words = ReadHashMapFromFile(args[0]);
System.out.println(ProcessFile(words, args[1]));
catch (Exception e)
e.printStackTrace();
// static helper methods
* Reads a file into a HashMap. The file should contain lines of the format
* "key\tvalue\n"
* @returns a hashmap of the given file
@SuppressWarnings("unchecked")
private static HashMap ReadHashMapFromFile(String filename) throws FileNotFoundException, IOException
BufferedReader in = null;
HashMap map = null;
try
in = new BufferedReader(new FileReader(filename));
String line;
map = new HashMap();
while ((line = in.readLine()) != null)
String[] fields = line.split("
t", 2);
if (fields.length != 2) continue; //just ignore "invalid" lines
map.put(fields[0], fields[1]);
finally
if(in!=null) in.close(); //may throw IOException
return(map); //returning a reference to local variable is safe in java (unlike C/C++)
* Process the given file
* @returns String contains the whole file.
private static String ProcessFile(Map words, String filename) throws FileNotFoundException, IOException
BufferedReader in = null;
StringBuffer out = null;
try
in = new BufferedReader(new FileReader(filename));
out = new StringBuffer();
String line = null;
while( (line=in.readLine()) != null )
out.append(SearchAndReplaceWordsInText(words, line)+"\n");
finally
if(in!=null) in.close(); //may throw IOException
return out.toString();
* Replaces all occurrences in text of each key in words with it's value.
* @returns String
private static String SearchAndReplaceWordsInText(Map words, String text)
Iterator it = words.keySet().iterator();
while( it.hasNext() )
String key = (String)it.next();
text = text.replaceAll("\\b"key"
b", (String)words.get(key));
return text;
* @returns: s with the first letter capitalized
String capitalize(String s)
return s.substring(0,0).toUpperCase() + s.substring(1);
}... here's the head of my pirate_words_map.txt
hello ahoy
hi yo-ho-ho
pardon me avast
excuse me arrr
yes aye
my me
friend me bucko
sir matey
madam proud beauty
miss comely wench
where whar
is be
are be
am be
the th'
you ye
your yer
tell be tellin'please help me i don t know how to go about this.my teacher ask me to build an interface that work with the code .
Here is the interface i just build
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.FileReader;
import java.awt.*;
import javax.swing.*;
public class boy extends JFrame
JTextArea englishtxt;
JLabel head,privatetxtwords;
JButton translateengtoprivatewords;
Container c1;
public boy()
super("HAKIMADE");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBackground(Color.white);
setLocationRelativeTo(null);
c1 = getContentPane();
head = new JLabel(" English to private talk Translator");
englishtxt = new JTextArea("Type your text here", 10,50);
translateengtoprivatewords = new JButton("Translate");
privatetxtwords = new JLabel();
JPanel headlabel = new JPanel();
headlabel.setLayout(new FlowLayout(FlowLayout.CENTER));
headlabel.add(head);
JPanel englishtxtpanel = new JPanel();
englishtxtpanel.setLayout(new FlowLayout(FlowLayout.CENTER,10,40));
englishtxtpanel.add(englishtxt);
JPanel panel1 = new JPanel();
panel1.setLayout(new BorderLayout());
panel1.add(headlabel,BorderLayout.NORTH);
panel1.add(englishtxtpanel,BorderLayout.CENTER);
JPanel translateengtoprivatewordspanel = new JPanel();
translateengtoprivatewordspanel.setLayout(new FlowLayout(FlowLayout.CENTER,10,40));
translateengtoprivatewordspanel.add(translateengtoprivatewords);
JPanel panel2 = new JPanel();
panel2.setLayout(new BorderLayout());
panel2.add(translateengtoprivatewordspanel,BorderLayout.NORTH);
panel2.add(privatetxtwords,BorderLayout.CENTER);
JPanel mainpanel = new JPanel();
mainpanel.setLayout(new BorderLayout());
mainpanel.add(panel1,BorderLayout.NORTH);
mainpanel.add(panel2,BorderLayout.CENTER);
c1.add(panel1, BorderLayout.NORTH);
c1.add(panel2);
public static void main(final String args[])
boy mp = new boy();
mp.setVisible(true);
}..............here is the code,please make this interface work with the code
public class Translate
public static void main(String [] args) throws IOException
if (args.length != 2)
System.err.println("usage: Translate wordmapfile textfile");
System.exit(1);
try
HashMap words = ReadHashMapFromFile(args[0]);
System.out.println(ProcessFile(words, args[1]));
catch (Exception e)
e.printStackTrace();
// static helper methods
* Reads a file into a HashMap. The file should contain lines of the format
* "key\tvalue\n"
* @returns a hashmap of the given file
@SuppressWarnings("unchecked")
private static HashMap ReadHashMapFromFile(String filename) throws FileNotFoundException, IOException
BufferedReader in = null;
HashMap map = null;
try
in = new BufferedReader(new FileReader(filename));
String line;
map = new HashMap();
while ((line = in.readLine()) != null)
String[] fields = line.split("
t", 2);
if (fields.length != 2) continue; //just ignore "invalid" lines
map.put(fields[0], fields[1]);
finally
if(in!=null) in.close(); //may throw IOException
return(map); //returning a reference to local variable is safe in java (unlike C/C++)
* Process the given file
* @returns String contains the whole file.
private static String ProcessFile(Map words, String filename) throws FileNotFoundException, IOException
BufferedReader in = null;
StringBuffer out = null;
try
in = new BufferedReader(new FileReader(filename));
out = new StringBuffer();
String line = null;
while( (line=in.readLine()) != null )
out.append(SearchAndReplaceWordsInText(words, line)+"\n");
finally
if(in!=null) in.close(); //may throw IOException
return out.toString();
* Replaces all occurrences in text of each key in words with it's value.
* @returns String
private static String SearchAndReplaceWordsInText(Map words, String text)
Iterator it = words.keySet().iterator();
while( it.hasNext() )
String key = (String)it.next();
text = text.replaceAll("\\b"key"
b", (String)words.get(key));
return text;
* @returns: s with the first letter capitalized
String capitalize(String s)
return s.substring(0,0).toUpperCase() + s.substring(1);
}... here's the head of my pirate_words_map.txt
hello ahoy
hi yo-ho-ho
pardon me avast
excuse me arrr
yes aye
my me
friend me bucko
sir matey
madam proud beauty
miss comely wench
where whar
is be
are be
am be
the th'
you ye
your yer
tell be tellin' -
How can i put one scene into JPanel of the swing?
how can i put one scene into JPanel of the swing?
980571 wrote:
ty for the information but i have a problen with JFXpanel when i try to into a panel it doesnt display insideSorry to hear that. If you want assistance with the code, feel free to post the relevant parts of it. Make sure to use \ tags when you do. -
Can I put a class into a jsp??
I want to put this class into a jsp.. and reference it when I need it... can i just dumped it into a jsp... or do I have to do anything specific to it...
public class areaformat {
public synchronized static String replace(String str, char oldchar, String newstr) {
StringBuffer sb = new StringBuffer(str);
int len = sb.length();
try {
for (int i=0; i<=len; i++) {
if (sb.charAt(i) == oldchar) {
sb = sb.replace(i, i, newstr);
sb.deleteCharAt(i + newstr.length());
i = i + newstr.length() - 1;
}catch(StringIndexOutOfBoundsException sioobe) {
if (len == 1 && str.equals("'")) {
sb = new StringBuffer(newstr);
return sb.toString();
Thx RIchNo, you can't. You can put only the function in the beginning of your jsp file like:
<%!
public void myFunction(...){
%>
So, you can use myFunction wherever you want in the page.
The other method is to compile your class in a file called "javac className.java" and the put the .class file generated in your WEB-INF/classes folder of your web-container. -
Can soemone explain this code to me
can someone explain this code to me
import javax.swing.*;
import BreezySwing.*;
import java.util.Random;
public class PennyPinch extends GBFrame
private JButton enterButton;
private JTextArea outputArea;
private int[][] board = {{1,1,1,1,1},{1,2,2,2,1},{1,2,3,2,1},{1,2,2,2,1},{1,1,1,1,1}};
private boolean[][] landing = new boolean[5][5];
private int total;
public PennyPinch()
enterButton = addButton ("Pitch",2,1,1,1);
outputArea = addTextArea("",4,1,3,4);
public void pitch()
Random generator = new Random();
int randomRow = generator.nextInt(5);
int randomColumn = generator.nextInt(5);
total += board[randomRow][randomColumn];
landing[randomRow][randomColumn] = true;
public void buttonClicked (JButton buttonObj)
pitch();
displayList(board, outputArea);
private void displayList(int a[][], JTextArea output)
output.setText("");
for (int row = 0; row < 5; row++)
for (int col = 0; col < 5; col++){
if(landing[row][col] ==true)
output.append(Format.justify('r',"P", 3) + " ");
if (col == 4)
output.append("\n");
else
output.append(Format.justify('r', a[row][col], 3) + " ");
if (col == 4)
output.append("\n"); }
output.append("the total is " + total);
public static void main (String[] args)
PennyPinch theGUI = new PennyPinch();
theGUI.setSize (300, 300);
theGUI.setVisible(true);
}Knowing toilets or studying under George?What kind pervert are you?
What is written in public toilets o/c!Ah yes I see, I found example questions.
2:3.4 please complete the following well known saying
by filling in the blank
Whilst you are reading what I put
You are blank on your foot
2:3.5 Upon seeing the announcement 'Toilet
tennis' and following the instruction ' please
see other wall for details' what is the standard
message on the other wall.2:3.4. is the correct answer 'micturating' ?
2:3.5. I believe the answer is Ibidem. -
Can i put photos back into the camera chip once they have been imported into my mac?
Can i put photos back into the camera chip once they have been imported to my Mac?
Export them
File -> Export
to a folder on the desktop. From there copy them back to your camera.
Remember, the camera has a quite specific set up of folders, and you'll need to put the files back in the correct place for them to be viewable on the camera.
This User Tip
https://discussions.apple.com/docs/DOC-4921
has details of the options in the Export dialogue. -
Urgent where i put this code for delete
hi master
sir this code is right for my requirment but when i put on_delete event system not respons or not delete record
where i put this code for conditional deletion
this is my code
declare
recno number;
begin
if :system.cursor_block='accbal' then
delete accbal where accid=:chartofacc.accid;
go_block('chartofacc');
next_record;
elsif :system.cursor_block='chartofacc' then
select count(*) into recno from accbal where accid=:chartofacc.accid;
if recno=0 then
delete_record;
go_block('chartofacc');
previous_record;
else
message ('system found matching record then no delete master record');
message ('system found matching record then no delete master record');
end if;
end if;
end;
please gide me which event i use
thanking you
aamirHello,
The ON-DELETE triger fires only after a COMMIT statment and only for those records that have been deleted in the block.
Francois -
How can i put below table into internalt table
how can i put below table into internalt table and want to add both internal table into 3rd internal table.
SELECT * FROM J_1IEXCHDR WHERE STATUS = 'P'.
WRITE: / J_1IEXCHDR-LIFNR,
J_1IEXCHDR-DOCNO,
J_1IEXCHDR-EXYEAR,
J_1IEXCHDR-BUDAT.
SELECT * FROM J_1IEXCDTL WHERE TRNTYP = J_1IEXCHDR-TRNTYP
AND DOCYR = J_1IEXCHDR-DOCYR
AND DOCNO = J_1IEXCHDR-DOCNO.
WRITE: / J_1IEXCDTL-EXBAS,
J_1IEXCDTL-EXBED,
J_1IEXCDTL-RDOC1,
J_1IEXCDTL-ECS.
ENDSELECT.
ENDSELECT.
please help
thanks in adavaced.hi laxman,
use for all entries and get the required data.
SELECT * FROM J_1IEXCHDR into table itab1 WHERE STATUS = 'P'.
if not itab1[] is initial.
SELECT * FROM J_1IEXCDTL into table itab2 for all entries in itab1 WHERE TRNTYP = itab1-TRNTYP
AND DOCYR = itab1-DOCYR
AND DOCNO = itab1-DOCNO.
endif.
so itab2 will have the common records...This will solve ur problem..
also u can do other method declare an final internal table with the common fields of the two internal table.
then after getting data in itab1 and itab2.
loop at itab1.
move-corresponding itab1 to itab3.
read table itab2 with key <give the fields> = ......
if sy-subrc eq 0.
move-corresponding itab2 to itab3.
endif.
append itab3.
endloop.
Regards,
nagaraj -
Can't put the computer into sleep if VPN is connected
I think I have found a win7 bug. The problem is that I can't put my computer into sleep if VPN is connected. The VPN client I used is Microsoft VPN client. The VPN works fine. But if I click sleep button with VPN connected, the computer screen turns
black, the fan speeds up, and the signal light tells me the computer is still on, not in sleep mode. When I try to wake up my computer by tapping the enter key, space, or moving the mouse, it just doesn't work at all: the fan speeds faster and faster
and the computer heats up. The only thing I can do now to save my computer from darkness is to hit and hold the power button, powering off the computer. The sleep function works just fine if the VPN is disconnected. I can easily wake my computer up by tapping
the enter key. I don't know whether this problem is only present on my computer or universally present on all win7 computers.
The following is my system info:
OS Name Microsoft Windows 7 Ultimate
Version 6.1.7601 Service Pack 1 Build 7601
OS Manufacturer Microsoft Corporation
System Manufacturer LENOVO
System Model IdeaPad Y460
System Type X86-based PC
Processor Intel(R) Core(TM) i5 CPU M 460 @ 2.53GHz, 2534 Mhz, 2 Core(s), 4 Logical Processor(s)Hi,
Please collect the report for the further troubleshooting. Note:Please do the following steps when VPN is connected.
1. Click Start, type in “cmd”, right click it and choose “Run as administrator”.
2. Type in the following command.
Powercfg –energy
3. Find the report file in the location showed in Command window.
4.
Upload it.
Kim Zhou
TechNet Community Support -
How can I add advertisement code into flash game?
hi mates,
just want to ask about loading advertisement code!
How do you add the advertisement code (adsense) into flash games??
my site Funny Games have over 5k games but they are getting from others sites thus I have no original files. How can I add more code into the current files?Unless the games were pre-made to allow you to specify some variables in the page code or some external file, you won't be having any luck... you cannot add code to the games unless you have the source files, which you apparently don't have.
-
How can I put my bookmarks into the sequence I want, alphabetical or otherwise?
How can I put my bookmarks into the sequence I want, alphabetical or otherwise?
http://kb.mozillazine.org/Sorting_bookmarks_alphabetically <br />
http://kb.mozillazine.org/Sorting_and_rearranging_bookmarks_-_Firefox -
How can i run this code correctly?
hello, everybody:
when i run the code, i found that it dons't work,so ,i hope somebody can help me!
the Ball class is this :
package {
import flash.display.Sprite;
[SWF(width = "550", height = "400")]
public class Ball extends Sprite {
private var radius:Number;
private var color:uint;
private var vx:Number;
private var vy:Number;
public function Ball(radius:Number=40, color:uint=0xff9900,
vx:Number =0, vy:Number =0) {
this.radius= radius;
this.color = color;
this.vx = vx;
this.vy = vy;
init();
private function init():void {
graphics.beginFill(color);
graphics.drawCircle(0,0,radius);
graphics.endFill();
and the Chain class code is :
package {
import flash.display.Sprite;
import flash.events.Event;
[SWF(width = "550", height = "400")]
public class Chain extends Sprite {
private var ball0:Ball;
private var ball1:Ball;
private var ball2:Ball;
private var spring:Number = 0.1;
private var friction:Number = 0.8;
private var gravity:Number = 5;
//private var vx:Number =0;
//private var vy:Number = 0;
public function Chain() {
init();
public function init():void {
ball0 = new Ball(20);
addChild(ball0);
ball1 = new Ball(20);
addChild(ball1);
ball2 = new Ball(20);
addChild(ball2);
addEventListener(Event.ENTER_FRAME, onEnterFrame);
private function onEnterFrame(event:Event):void {
moveBall(ball0, mouseX, mouseY);
moveBall(ball1, ball0.x, ball0.y);
moveBall(ball2, ball1.x, ball1.y);
graphics.clear();
graphics.lineStyle(1);
graphics.moveTo(mouseX, mouseY);
graphics.lineTo(ball0.x, ball0.y);
graphics.lineTo(ball1.x, ball1.y);
graphics.lineTo(ball2.x, ball2.y);
private function moveBall(ball:Ball,
targetX:Number,
targetY:Number):void {
ball.vx += (targetX - ball.x) * spring;
ball.vy += (targetY - ball.y) * spring;
ball.vy += gravity;
ball.vx *= friction;
ball.vy *= friction;
ball.x += vx;
ball.y += vy;
thanks every body's help!ok, thanks for your reply ! I run this code in the Flex builder 3!and the Ball class and the Chain class are all in the same AS project!
and i changed the ball.pv property as public in the Ball class, and the Chain class has no wrong syntactic analysis,but the AS code don't run.so this is the problem.
2010-04-21
Fang
发件人: Ned Murphy <[email protected]>
发送时间: 2010-04-20 23:01
主 题: how can i run this code correctly?
收件人: fang alvin <[email protected]>
I don't see that the Ball class has a pv property, or that you even try to access a pv property in the Chain class. All of the properties in your Ball class are declared as private, so you probably cannot access them directly. They would need to be public. Also, I still don't see where you import Ball in the chain class such that it can use it.
Maybe you are looking for
-
Connection problems using Macbook pro and 3rd gen firewire ipod
Hello, I have been trying to get my girlfriends old 3rd gen ipod to synch on our mac but when connected, the ipod charges but is not recognised at all by the mac. nothing shows up in itunes, or the desktop but the ipod is definitely charging and conn
-
How do I reinstall OS X Mavericks
I inhereited an Apple at work for testing purposes. It was set up with only one Admin user and that person is long gone, So there is currently only one unusable admin and a guest account. I think the only thing I can do is re-install OS X Mavericks.
-
FInal Cut Pro for Windows?
Yes or no. If i were to purchase Final Cut Pro Studio Academic 6, would i be able to use it with windows on my laptop? I would love to know beofre i purchase anything.
-
Hosting .Mac and Personal Domain Separately - Help!
Hi, I have three websites I have made using iWeb, and one personal domain. I would like to host two of the sites only on .Mac, and host the third site on the personal domain. I set up the CNAME and it works but I do not want two of the sites to be li
-
Error using Quick Create Form on custom entity
Hello, I have a new relationship between opportunity and a custom entity. Now I want to use quick create form for my custom entity. Then from the opportunity form, I click on the "new" action inside the custom lookup field but nothing happens and I h