Get the output of a query in a textpad..
Hi..
I need to get the output of a query in a notepad..
Can anyone help me..
spool c:\emp.txt
fire select * from emp;
spool off;
go to c: and check your text file.
hare krishna
Alok
Similar Messages
-
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. -
Can I get a query to get the output data like 4th column instead of 3rd col
Can I get a query to get the output data like 4th column instead of 3rd column ?
SQL> select emp.deptno, empno, rownum from emp, dept where emp.deptno=dept.deptno;
DEPTNO EMPNO ROWNUM
10 7782 *1* *1*
10 7839 *2* *2*
10 7934 *3* *3*
20 7369 *4* *1*
20 7876 *5* *2*
20 7902 *6* *3*
20 7788 *7* *4*
20 7566 *8* *5*
30 7499 *9* *1*
30 7698 *10* *2*
30 7654 *11* *3*
30 7900 *12* *4*
30 7844 *13* *5*
30 7521 *14* *6*
14 rows selected.SQL> select emp.deptno, emp.empno,
2 row_number() over(order by emp.deptno, emp.empno) rn,
3 row_number() over(partition by emp.deptno order by emp.empno) dept_rn
4 from emp, dept
5 where emp.deptno=dept.deptno
6 order by emp.deptno, emp.empno;
DEPTNO EMPNO RN DEPT_RN
10 7782 1 1
10 7839 2 2
10 7934 3 3
20 7369 4 1
20 7566 5 2
20 7788 6 3
20 7876 7 4
20 7902 8 5
30 7499 9 1
30 7521 10 2
30 7654 11 3
30 7698 12 4
30 7844 13 5
30 7900 14 6
14 rows selected.Regards,
Dima -
To get the output in the chart for a single selection
Hi all,
I used a query to get the output of the table, and for the same query i have created a view to get the result in the chart.
to get the output of the table for a particular region i have created an input field and added value help to it. When i selected one particular region, i will be getting the data, in the table. But when i select a particular row in the table i need to get the data of that particular row only in the chart. (which i am getting)
But when i select multiple regions at a time, then i am facing the issue. I get result of multiple regions data(at a time two rows are displayed in the chart) in the chart. where in i want to get data only for one region (only one row needs to get selected at a time) to get the result.
Can any one throw a light of what needs to be done here.
Thanks,
RaniHi Rani,
I am not sure if I understand your question exactly, but it sounds like you need to set the selection mode for your table to "Single". If you do that the user will only have the possibility of selecting one row at a time in the table; they will not be able to select multiple rows.
You make that setting in the Configure Element panel for the table.
I hope this suggestions helps.
Margaret -
How to get this output using sql query?
Hi,
How to get this output using sql query?
Sno Name Age ADD Result
1 Anil 23 delhi Pass
2 Shruti 25 bangalor Pass
3 Arun 21 delhi fail
4 Sonu 23 pune Pass
5 Roji 26 hydrabad fail
6 Anil 28 delhi pass
Output
Sno Name Age ADD Result
1 Anil 23 delhi pass
28 delhi passHi Vamshi,
Your query is not pretty clear.
write the select query using Name = 'ANIL' in where condition and display the ouput using Control-break statements.
Regards,
Kannan -
Are You All Able to get the Output In EXCEL Format
Hi All,
I have one question. Are You All Able to get the Output In EXCEL Format?? I am working on Oracle Apllication 11.5.10.2 and my XML builder is 5.0.1. Problem which i m facing is this...... Whenever i am submitting a concurrent program with format type different from PDF i could not able to view the ouput in desired format. When i am pressing view output it gives me a file in XML and when i save that file with extention 'xls' or 'rtf' then i could able to see the saved file in desired format.
Can anyone tell me where is the problem??? Is it a bug?
I am using microsoft world 2000 sp-3.
Please give your valuable comments. May be your comments can solve my problem..
Thanks
RaviHi I got Same issue
When I change Format to EXCEL from
Submit request>> Option>> Format = EXCEL
In window I am getting something HTML code and
when I try to copy it to Browser from Tools>> Copy File in to Browser I am getting following message
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
End tag 'p' does not match the start tag 'a'. Error processing resource 'http://our url.com:8000/OA_CGI...
<p class="c0"><a name="Text4" id="Text4"><a name="Text1_1" id="Text1_1"><span class="c1">Dept No <...
But I can see the output when Format is PDF
Pls suggest solution ,I am using EBS 11.5.10.2.
Thanks
Rahul
Message was edited by: Rahul
user576181 -
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 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 -
Procedure to save the output of a query into excel file or flat file
Procedure to save the output of a query into excel file or flat file
I want to store the output of my query into a file and then export it from sql server management studio to a desired location using stored procedure.
I have run the query --
DECLARE @cmd VARCHAR(255)
SET @cmd = 'bcp "select * from dbo.test1" queryout "D:\testing2.xlsx;" -U "user-PC\user" -P "" -c '
Exec xp_cmdshell @cmd
error message--
SQLState = 28000, NativeError = 18456
Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for user 'user-PC\user'.
NULL
Goel.AmanHello,
-T:
Specifies that the bcp utility connects to SQL Server with a trusted connection using integrated security. The security credentials of the network user,
login_id, and password are not required. If
–T is not specified, you need to specify
–U and –P to successfully log in.
-U:
Specifies the login ID used to connect to SQL Server.
Note: When the bcp utility is connecting to SQL Server with a trusted connection using integrated security, use the
-T option (trusted connection) instead of the
user name and password combination
I would suggest you take a look at the following article:
bcp Utility: http://technet.microsoft.com/en-us/library/ms162802.aspx
A similar thread regarding this issue:
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/b450937f-0ef5-427a-ae3b-115335c0d83c/bcp-connection-error-sqlstate-28000-nativeerror-18456?forum=sqldataaccess
Regards,
Elvis Long
TechNet Community Support -
Is it possible to get the output of a text container into Spool..?
Hi
I am trying to write a report for a standard transaction(SM65) in BDC and run thru background job so as to get the output in to Spool. Right now I am facing an issue to get the SM65(text container) tcode output into spool.
FYI..I am using "CALL TRANSACTION 'SM65' USING BDCDATA MODE 'E'."
Please provide tour valuable inputs.
Thanks!
ShivHi Shiv,
Instead of writing BDC for T-code SM65 I would suggest you to use following function module to get the required data.
CALL FUNCTION 'BPT_ANALYSE_START'
EXPORTING
server_name = servername_tmp
check_all_btc_servers = sbpt1020-allsrvchk
profile_check = sbpt1020-profilechk
xpgm_environment_check = sbpt1020-xpgmcheck
TABLES
protocol_tbl = global_protocol_tbl
EXCEPTIONS
OTHERS = 99.
Once you got the data into "global_protocol_tbl " you can create spool of it. -
NOOB Question - Cannot seem to get the output in a text or CSV file - Please help!!
I was able to put together a script which finds members of a certain AD group, filters down the users, and then calculates the number of days till a password reset is needed. I am able to get on screen exactly what i am looking for, but cannot seem
to figure out how to get the same data to a file. What i am doing wrong? two goals here:
1. Create a spreadsheet with a list of users whose password is about to expire.
2. Down the line automate an email to users whose password is about to expire.
Here is my code:
## Get List Of Users in Password Change Lockout that do not have an expired password or a password that never expires
$Names = (Get-ADGroupMember -Identity "Password Change Lockout" -Recursive |`
Get-ADUser -Properties * |`
Where-Object {$_.PasswordNeverExpires -eq $False -and $_.PasswordExpired -eq $False} |`
Sort-Object name |Select-Object -ExpandProperty SamAccountName)
## Get Password last Set values for all
Foreach ($Name in $Names)
$VAR1 = (Get-ADUserResultantPasswordPolicy -Identity $Name).MaxPasswordAge
$VAR2 = (Get-ADUser $Name -Properties *).passwordlastset
$VAR3 = (Get-ADUser $Name -Properties *).name
$DTPC = (New-TimeSpan -Start (Get-Date) -End ($VAR2 + $VAR1) | Select-Object -ExpandProperty Days)
Filter users to those who need to change thier password in 15 days.
If ($DTPC -lt 15)
No matter what i try between the {} after the If statement, I cannot get the output to a file. However, if I use a Write-Output I get exactly what i looking for. I feel like i am forgetting some basic concept and could really use some help. Thanks.
Matt
Matt DillonHi Matt,
I generally create an empty array (something like $out = @()) at the top of the script and then use $out += $desiredOutput inside of the foreach loop.
Outside of the loop, you can then pipe $out to Out-File or Export-Csv, depending on your needs.
Don't retire TechNet! -
(Don't give up yet - 12,830+ strong and growing) -
How to get the recordcount of a query in a array
I have an array called "sums" that holds 4 query's, each
query has a different number of records.
Then i use this code to loop the records of the query inside
the array:
<cfloop index="x" from="1" to="#arrayLen(sums)#">
<cfloop index="i" from="1" to="#sums[x].recordcount#">
data to loop
</cfloop>
</cfloop>
This results in 4 times 4 records, of course as i now use the
array length in the inner loop.
My question is, how can i get the recordcount of a query in a
array so i can use that for the inner loop "to" value.
Thanks.quote:
Originally posted by:
MarcovandenOever
Does sums[x]recordcount point to the first query in the array
sums when i use it like this?
In the array there are four query's, i want to loop the
array, then i want to loop the records of each query.
<cfloop index="x" from="1" to="#arrayLen(sums)#">
<cfloop index="i" from="1" to="#sums[x].recordcount#">
data to loop
</cfloop>
</cfloop>
No. It points to each query in turn. So if you have four
queries, the first time it will point to sum[1]. Then next time
sum[2], etcetera. It should work exactly the way you want "as is".
If you are having a problem, it is probably related to the code
inside your inner loop. -
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 -
ABAP Program where iam not able to get the Output.
Hi Team,
I have written the code for the following requirement but could not get the output
Can you people please have a look at this.
Create a Report with the following output.
In the selection screen you should have KUNNR and Delivery date(VBEP-EDATU).
When you select the Customer number and Date in the Selection the following output should be displayed.
Sales order Number (VBAK-VBELN)
Sales order Material (VBAP-MATNR)
Quantity (VBAP-ZMENG)
Ship-to-Party (VBAK-KUNNR)
Delivery Number(LIKP-LFDAT).
The key field used for fetching the values is VBELN.
Here the values from table VBAK are not getting selected.
Please check the Program and give your valuable suggestion.
I checked in Debug mode but could not get the values
Regards,
Pradeep P.Hi Ramchand,
Plz find the Code.
*Fetching vbeln matnr zmeng kunnr from vbak and vbap
select a~vbeln
b~matnr
b~zmeng
a~kunnr
into corresponding fields of table it_sales
from vbak as a
inner join vbap as b
on avbeln = bvbeln
where a~kunnr in s_kunnr.
If sy-subrc = 0.
sort it_sales by vbeln.
endif.
*Fetching vbeln edatu lfdat from vbep and likp
select a~vbeln
a~edatu
b~lfdat
into corresponding fields of table it_delivery
from vbep as a
inner join likp as b
on avbeln = bvbeln
for all entries in it_sales
where a~vbeln = it_sales-vbeln
and a~edatu in s_edatu.
Regards,
Pradeep P. -
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
Maybe you are looking for
-
i bought a movie and it wont dowload it says there was a error purchasing it
-
Many Quicktime-Videos in one Session
Hi, how can I import several QT-videos in one logicsession. Or can I only integrate one video per session? Thanks! Adrian
-
Real Player and Realdownloader are not downloading videos.
These apps were working until 7/2/13. The popup does not appear on the top right of the video. They do work with IE. Now I've deleted them with Control Panel and reinstalled, but no luck. I'm running an XP box.
-
News Text is not visible in News iview
Hi All, I have created a news form similat to standard one, but i am able to see the date, author, title, body and readmore link but not abel to see News text. what may be the reason, i want similar functionality as that of standard one. is Show for
-
System problems - programs won't open
all of a sudden my computer is sick, here are just some of the symptoms: 1) programs won't open (ie Itunes, Empty Trash) or take forever as in hours or days (Iphoto, Disk Utility). Basically evertything I use except Safari gets frozen. 2) when I try