How to get the output of a procedure in to a log file ?
Hi, Everyone,
Could you please tell me
How do i write the output of a procedure to a log file ?
Thanks in advance...
Hi,
could you please explain me more on how to use the UTL_file to get the output to a log file as in am new to PL/SQL
my script file is
EXEC pac_sav_cat_rfv.pro_cardbase (200910,'aaa',100,'test_tbl');
i need the output of this statement in a log file.
Could you please explain to me how it can be done.
thanks in advance
Similar Messages
-
How to get the output of the report in pdf format
how to get the output of the report in pdf format?
Thanks in advance,
madan.Refer these links
http://www.sap-img.com/bc037.htm
http://www.members.tripod.com/abap4/Save_Report_Output_to_a_PDF_File.html
CONVERT_ABAPSPOOLJOB_2_PDF FM convert abap spool output to PDF -
How to get the output of Standard HR forms in PE51
Hi Experts,
How to get the output of standard HR forms available in PE51 Transaction for coutry grouping 99.
Please advice.
Regards,
IFFHi
Use the t code for country grouping 99....PC00_M99_CEDT - Remuneration Statement. to get the variant in tcode PC00_M99_CALC_SIMU - Simulation.
Like this test for all the standard forms, what all are the available in PE51 for country grouping 99 -
How to get the source code of an HTML page in Text file Through J2EE
How to get the source code of an HTML page in Text file Through J2EE?
Huh? If you want something like your browser's "view source" command, simply use a URLConnection and read in the data from the URL in question. If the HTML page is instead locally on your machine, use a FileInputStream. There's no magic invovled either way.
- Saish -
How to get the source code of an HTML page in Text file Through java?
How to get the source code of an HTML page in Text file Through java?
I am coding an application.one module of that application is given below:
The first part of the application is to connect our application to the existing HTML form.
This module would make a connection with the HTML page. The HTML page contains the coding for the Form with various elements. The form may be a simple form with one or two fields or a complex one like the form for registering for a new Bank Account or new email account.
The module will first connect through the HTML page and will fetch the HTML code into a Text File so that the code can be further processed.
Could any body provide coding hint for thatYou're welcome. How about awarding them duke stars?
edit: cheers! -
How to get the path when i select a directory or a file in a JTree
How to get the path when i select a directory or a file in a JTree
import java.lang.*;
import java.io.*;
import javax.swing.*;
import javax.swing.tree.*;
import java.awt.HeadlessException;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
import java.util.Iterator;
* @author Frederic FOURGEOT
* @version 1.0
public class JTreeFolder extends JPanel {
protected DefaultMutableTreeNode racine;
JTree tree;
protected JScrollPane scrollpane;
final static int MAX_LEVEL = 1; // niveau max de descente "direct" dans l'arborescence
* Sous-classe FSNode
* @author Frederic FOURGEOT
* @version 1.0
private class FSNode extends DefaultMutableTreeNode {
File file; // contient le fichier li� au noeud
* Constructeur non visible
private FSNode() {
super();
* Constructeur par initialisation
* @param userObject Object
FSNode(Object userObject) {
super(userObject);
* Constructeur par initialisation
* @param userObject Object
* @param newFile File
FSNode(Object userObject, File newFile) {
super(userObject);
file = newFile;
* Definit le fichier lie au noeud
* @param newFile File
public void setFile(File newFile) {
file = newFile;
* Renvoi le fichier lie au noeud
* @return File
public File getFile() {
return file;
public JTree getJTree(){
return tree ;
* Constructeur
* @throws HeadlessException
public JTreeFolder() throws HeadlessException {
File[] drive;
tree = new JTree();
// cr�ation du noeud sup�rieur
racine = new DefaultMutableTreeNode("Poste de travail");
// cr�ation d'un noeud pour chaque lecteur
drive = File.listRoots();
for (int i = 0 ; i < drive.length ; i++) {
FSNode node = new FSNode(drive, drive[i]);
addFolder(drive[i], node); // on descend dans l'arborescence du lecteur jusqu'� MAX_LEVEL
racine.add(node);
// Gestion d'evenement sur JTree (on �coute les evenements TreeExpansion)
tree.addTreeExpansionListener(new TreeExpansionListener() {
public void treeExpanded(TreeExpansionEvent e) {
// lorsqu'un noeud est ouvert
// on descend dans l'arborescence du noeud jusqu'� MAX_LEVEL
TreePath path = e.getPath();
FSNode node = (FSNode)path.getLastPathComponent();
addFolder(node);
((DefaultTreeModel)tree.getModel()).reload(node); // on recharche uniquement le noeud
public void treeCollapsed(TreeExpansionEvent e) {
// lorsqu'un noeud est referm�
//RIEN
// alimentation du JTree
DefaultTreeModel model = new DefaultTreeModel(racine);
tree.setModel(model);
setLayout(null);
// ajout du JTree au formulaire
tree.setBounds(0, 0, 240, 290);
scrollpane = new JScrollPane(tree);
add(scrollpane);
scrollpane.setBounds(0, 0, 240, 290);
* Recuperation des sous-elements d'un repertoire
* @param driveOrDir
* @param node
public void addFolder(File driveOrDir, DefaultMutableTreeNode node) {
setCursor(new Cursor(3)); // WAIT_CURSOR est DEPRECATED
addFolder(driveOrDir, node, 0);
setCursor(new Cursor(0)); // DEFAULT_CURSOR est DEPRECATED
* Recuperation des sous-elements d'un repertoire
* (avec niveau pour r�cursivit� et arr�t sur MAX_LEVEL)
* @param driveOrDir File
* @param node DefaultMutableTreeNode
* @param level int
private void addFolder(File driveOrDir, DefaultMutableTreeNode node, int level) {
File[] fileList;
fileList = driveOrDir.listFiles();
if (fileList != null) {
sortFiles(fileList); // on tri les elements
// on ne cherche pas plus loin que le niveau maximal d�finit
if (level > MAX_LEVEL - 1) {return;}
// pour chaque �l�ment
try {
for (int i = 0; i < fileList.length; i++) {
// en fonction du type d'�l�ment
if (fileList[i].isDirectory()) {
// si c'est un r�pertoire on cr�� un nouveau noeud
FSNode dir = new FSNode(fileList[i].getName(), fileList[i]);
node.add(dir);
// on recherche les �l�ments (r�cursivit�)
addFolder(fileList[i], dir, ++level);
if (fileList[i].isFile()) {
// si c'est un fichier on ajoute l'�l�ment au noeud
node.add(new FSNode(fileList[i].getName(), fileList[i]));
catch (NullPointerException e) {
// rien
* Recuperation des sous-elements d'un noeud
* @param node
public void addFolder(FSNode node) {
setCursor(new Cursor(3)); // WAIT_CURSOR est DEPRECATED
for (int i = 0 ; i < node.getChildCount() ; i++) {
addFolder(((FSNode)node.getChildAt(i)).getFile(), (FSNode)node.getChildAt(i));
setCursor(new Cursor(0)); // DEFAULT_CURSOR est DEPRECATED
* Tri une liste de fichier
* @param listFile
public void sortFiles(File[] listFile) {
triRapide(listFile, 0, listFile.length - 1);
* QuickSort : Partition
* @param listFile
* @param deb
* @param fin
* @return
private int partition(File[] listFile, int deb, int fin) {
int compt = deb;
File pivot = listFile[deb];
int i = deb - 1;
int j = fin + 1;
while (true) {
do {
j--;
} while (listFile[j].getName().compareToIgnoreCase(pivot.getName()) > 0);
do {
i++;
} while (listFile[i].getName().compareToIgnoreCase(pivot.getName()) < 0);
if (i < j) {
echanger(listFile, i, j);
} else {
return j;
* Tri rapide : quick sort
* @param listFile
* @param deb
* @param fin
private void triRapide(File[] listFile, int deb, int fin) {
if (deb < fin) {
int positionPivot = partition(listFile, deb, fin);
triRapide(listFile, deb, positionPivot);
triRapide(listFile, positionPivot + 1, fin);
* QuickSort : echanger
* @param listFile
* @param posa
* @param posb
private void echanger(File[] listFile, int posa, int posb) {
File tmpFile = listFile[posa];
listFile[posa] = listFile[posb];
listFile[posb] = tmpFile; -
How to get the opportunities linked to a BP who is logged in?
Hi,
How to get the opportunities linked to a BP who is logged in mean the user who is logged in?
Regards,
JayaHi,
I understand the question as follows:
You want to get a list of opportunities that are assigned to the logged in user.
You can get the USER -> BP assignment from table HRP1001.
Then use the standard opportunity search to get the Opportunities.
cheers Carsten -
How to get the output of a standard report RFBILA00 in PDF form.
hi,
I have to get the output of the standard report RFBILA00 in the PDF form.
Thanks.Hi Rao,
you can run your report RFBILA00 in background and in background job you can add one more step, next in that step you can add custom report like zsubmit .
job should be set like
step1: RFBILA00 with variant.
Step2: zsubmit report with variant.
In Zsubmit report you can read, your first step spool using FM GET_JOB_RUNTIME_INFO
and pass that spool in the FM CONVERT_ABAPSPOOLJOB_2_PDF.
when second report run in job you can set your target like download in the server or send email etc.
Regards,
Prasenjit -
How to get the output path in Java?
Hi all,
is there a way (method) to get the output path (where compiled classes are put) in Java?
thx a lot!
MicheleIf you have already successfully loaded the classes into memory, and you want to find out where the classes are physically stored, then you can use Class.getResource() to retrieve the location of the file.
import java.net.URL;
public class Find
private void run(String obj) {
try {
Class cls = Class.forName(obj);
//Here is the change to input correct resource path
//instead of class name
String resourcePath = "/"+obj.replace('.','/')+".class";
URL url = cls.getResource(resourcePath);
System.out.println(url);
catch (Exception e) {
e.printStackTrace();
public static void main(String[] args) {
Find find = new Find();
find.run(args[0]);
}java Find java.lang.String
jar:file:/usr/local/j2sdk1.4.2_13/jre/lib/rt.jar!/java/lang/String.class
Edited by: Jin on Oct 23, 2007 10:38 AM -
How to get the output format options of SAP QUERY
Hi Gurus,
I want to get the output options available for sapquery program.means when you execute the program "AQZZ/SAPQUERY/FDF1============" you will get output options like sap alv,display as table,wordprocessing etc.
i am not able to unsderstand the logic in that standard code.my requirement is after fetching the data from the database i want to provide the ouput options SAP ALV,DISPLAY AS TABLE,WORD PROCESSING,SPREAD SHEET,FILESTORE.
I can output the data in SAP ALV and i can store the data.But i am not able to use the the remaining options in my program.please provide me solution.
I am very much thankful to the people who can provide me the solution.Hi,
If you have a query then go to transaction 'SQ01' . Then press the change button . Then u will able to see the Output Options.Their u can select the option what ever u want. -
How to get the output in ALV format
Hi All,
this is my program, in this i want to get the output in ALV, i hv created two containers and m able to get the ALV layout successfully but i am not able to fetch the correct data.
the output it is showing is some RFC value.
here we have used - abaplist, soli.
Please provide me the solution.
SELECT * FROM varid INTO CORRESPONDING FIELDS OF TABLE t_varid WHERE report in s_report.
LOOP AT t_varid .
SUBMIT (t_varid-report) USING SELECTION-SET t_varid-variant
EXPORTING LIST TO MEMORY
AND RETURN.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = listtab
EXCEPTIONS
not_found = 1
OTHERS = 2.
**************Old System Entry********
CALL FUNCTION 'Z_GET_DETAILS'
DESTINATION 'BWDCLNT900'
EXPORTING
report = t_varid-report
variant = t_varid-variant
TABLES
listtab = list_tab.
IF sy-subrc EQ 0.
CALL FUNCTION 'LIST_TO_TXT'
TABLES
listtxt = listtxt1
listobject = list_tab
EXCEPTIONS
empty_list = 1
list_index_invalid = 2.
ENDIF.
if p_flag eq 'X'.
clear p_flag.
write : / 'Program Name',
41 'Variant Name',
66 'Output Match'.
endif.
IF listtxt EQ listtxt1.
WRITE : / t_varid-report,
41 t_varid-variant,
66 icon_green_light AS ICON HOTSPOT.
ELSE.
WRITE : / t_varid-report,
41 t_varid-variant,
66 icon_red_light AS ICON HOTSPOT.
ENDIF.
CLEAR : listtab,list_tab,listtxt,listtxt1.
REFRESH : listtab[],list_tab[],listtxt[],listtxt1[].
ENDLOOP.
AT line-selection.
v_report = sy-lisel(40).
v_variant = sy-lisel+40(14).
call SCREEN 400.
module STATUS_0400 output.
SUBMIT (v_report) USING SELECTION-SET v_variant
EXPORTING LIST TO MEMORY
AND RETURN.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = listtab
EXCEPTIONS
not_found = 1
OTHERS = 2.
CALL FUNCTION 'LIST_TO_TXT'
TABLES
listtxt = listtxt1
listobject = list_tab
EXCEPTIONS
empty_list = 1
list_index_invalid = 2.
**************Old System Entry********
CALL FUNCTION 'Z_GET_DETAILS'
DESTINATION 'BWDCLNT900'
EXPORTING
report = v_report
variant = v_variant
TABLES
listtab = list_tab.
CREATE OBJECT CCONT1
EXPORTING
CONTAINER_NAME = 'C1'.
CREATE OBJECT CCONT2
EXPORTING
CONTAINER_NAME = 'C2'.
CREATE OBJECT GRID1
EXPORTING
I_PARENT = CCONT1.
CREATE OBJECT GRID2
EXPORTING
I_PARENT = CCONT2.
CALL METHOD GRID1->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_STRUCTURE_NAME = 'abaplist'
CHANGING
IT_OUTTAB = list_tab.
CALL METHOD GRID2->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_STRUCTURE_NAME = 'abaplist'
CHANGING
IT_OUTTAB = listtab.
SET PF-STATUS 'ZUTDEMO2'.
endmodule.
module USER_COMMAND_0400 input.
IF SY-UCOMM = 'EXIT'.
LEAVE PROGRAM.
ENDIF.
endmodule. " USER_COMMAND_0400 INPUTsolved
-
How to get the Output File Name as One of the Field Value From Payload
Hi All,
I want to get the Output file name as one of the Field value from payload.
Example:
Source XML
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_TEST xmlns:ns0="http://sample.com">
- <Header>
<NAME>Bopanna</NAME>
</Header>
</ns0:MT_TEST>
I want to get the Output file name as " Bopanna.xml"
Please suggest me on this.
Regards
BopannaHi,
There are couple of links already available for this. Just for info see the below details,
The Output file name could be used from the field value of payload. For this you need to use the UDF DynamicFile name with below code,
// Description: Function to create dynamic Filename
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File" , "FileName");
conf.put(key,a);
return "";
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File" , "FileName");
conf.put(key,a);
return "";
With this udf map it with the MessageType as
(File Name field from Payload) > DynamicFileConfiguration>MTReceiver
Thanks
Swarup -
How to get the output of my batch file or script file
Hello,
I am a beginner in java and I have to run a batch file(in win) or a script(in linux). I want the output of the file in my java program. How to read the output. I used the following code and it always gave me the empty string output
Runtime r = Runtime.getRuntime();
Process p = null;
p = r.exec("./test.bat"); //./test.sh
int res = p.waitFor();
BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
String tempStr = "", str = null;
while((str=br.readLine()) != null) {
tempStr += str + "\n";
System.out.println(tempStr);
I know this is a simple one but it's taking a lot of time. Can any one there help me quickly.hi
the below function works well for me..
just make a try with it
protected String runConsoleCommand(String command) throws IOException {
Process p = Runtime.getRuntime().exec(command);
InputStream stdoutStream = new BufferedInputStream(p.getInputStream());
StringBuffer buffer = new StringBuffer();
for (; ; ) {
int c = stdoutStream.read();
if (c == -1)
break;
buffer.append( (char) c);
String outputText = buffer.toString();
stdoutStream.close();
System.out.println("the output to file is:"+outputText);
return outputText; -
I created a quiz.
Created an internal server on my compute rising a MAMP.
When I publish my quiz using the multi-file publishing options...
I am able to use both the "HTML" and the "swf" output files to complete a quiz and reporting the results to the quiz results analyzer.
However, I am unable to get the output .pdf field to reporting to the quiz results analyzer.
Any help? Would this issue have to do with the Acrobat Professional setting? Captivate setting? My internal server setting? or output fuel placement?
I tired to put the .pdf file in the same MAMP root folder location as my "internalserverreporting.php and internalserverread.php files.
Thanks for the help.Hello Varun,
You cqan submit the report as a JOB and export the out put to memory, once the job is complete you can read the list to display the output.
Cheers,
Mano
Cut & Paste form SAP help.
Submit report ....
EXPORTING LIST TO MEMORY
Does not display the output list of the called report, but saves it in ABAP memory and leaves the called report immediately. Since the calling program can read the list from memory and process it further, you need to use the addition ... AND RETURN . Also, since the called report cannot be requested for printing, the addition ... TO SAP-SPOOL is not allowed here. In addition, you must not assign a function code to the ENTER key in the current GUI status. The saved list is read from the SAP memory using the function module 'LIST_FROM_MEMORY' and can then be saved to the database using EXPORT, for example. You can process this list further with the function modules 'WRITE_LIST', 'DISPLAY_LIST' ... of the function group "SLST". -
How to get the output data of Standard drill down report into z-program?
HI every one,
I want to get the output data of drill down report into z-program.
Actually,if the output is only one, I can get into z-program,
But, Here the report consists 3 alv outputs. when double clicking function happens, it will direct to another alv output.
Those, all the outputs of report i want to get into z-program.
PLease , give reply as early as possible.
Thank u in advance,
karthikHI,
When i download,only one output i will get.
But,if i double-click the particular record it will show another output. I want that output also.
Like that,when i double-click particular record, it will show some other alv ouput based on record,
i wanted all those outputs.
If i copy the code, whether i face any problems?
Maybe you are looking for
-
Error in transformation/urgent
Hi BW frnds I have a scenario,the data is in PSA but wen im trying to push the data to DSO through transformations,its throwing an error. An error occured while executing the transformation rule: The exact error message is: Overflow converting from '
-
Phone number not listed in Messages accounts post OS Mavericks updated
I updated to OS X Mavericks, and now my phone number is no longer listed in the Messages accounts. So when I send messages from my phone, it creates a new thread using my email and those messages do not show up on my phone. Likewise, messages that ar
-
Error on Export after validate
OK, to the point ..... i got a problem from the client that error has been occured when transfer budget from hyperion to oracle .... the first step validate budget has been passed, but when export this error appeared the message box appeared : "v_ret
-
Bluetooth & Mountain Lion & Kernel Panics
After uninstalling all 3rd party software and finally reinstalling a clean copy of Mountain Lion on my mid 2011 MacBook Air, I have finally been able to diagnose the reason for Kernel Panics after waking from sleep. Yes, after a clean install it was
-
3rd Generation Nano: iTunes not recognizing iPod
I've already syncd music to ipod several times, now iTunes is telling me to "restore" only option that is available. iPod will not restore, I kept getting error message 1418 (?) before this iPod was being charged on another computer, after it was cha