How to get the output like this in a single sql
input is
2 date range
output is
date week
01-01-2000 1
08-01-2000 2
31-12-2000 54
06-01-2001 55
so on
with sample_table as (
select date '2000-01-01' from_dt, date '2001-01-06' to_dt from dual
select to_char(from_dt + level - 1,'dd-mm-yyyy') dt,
ceil(level / 7) week
from sample_table
connect by level <= to_dt - from_dt + 1
DT WEEK
01-01-2000 1
02-01-2000 1
03-01-2000 1
04-01-2000 1
05-01-2000 1
06-01-2000 1
07-01-2000 1
08-01-2000 2
09-01-2000 2
10-01-2000 2
11-01-2000 2
01-01-2001 53
02-01-2001 53
03-01-2001 53
04-01-2001 53
05-01-2001 53
06-01-2001 54
372 rows selected.
SQL> SY.
Similar Messages
-
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 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 -
HT4623 i have iOS 4.2.1 in 3G old one. how to get the applications for this iOS
i have iOS 4.2.1 in 3G old one. how to get the applications for this iOS
look at this thread
https://discussions.apple.com/message/22837309#22837309 -
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 -
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 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 information like IP address,Host name of connected clients v
Hi Every one,
I want to get the information like (IP Address,Hostname,Active sessions , Database Server .etc) of the connected clients
via V$Views(ORACLE).
And then I like to load these infromation into a table Client_Table.
Could some one give me suggestion that which V$ views/method I use in order to get the above information and then
how to load these information into a table Client_table?
Your suggestions will be highly appreciated.
With Regards
BILALYou could use a LOGON TRIGGER so every session insert its own environment into your client_info table.
You could use the following view and choose whatever attribute you need:
create or replace view my_userenv (
AUDITED_CURSORID ,
AUTHENTICATION_DATA ,
AUTHENTICATION_TYPE ,
BG_JOB_ID ,
CLIENT_IDENTIFIER ,
CLIENT_INFO ,
CURRENT_SCHEMA ,
CURRENT_SCHEMAID ,
CURRENT_SQL ,
CURRENT_USER ,
CURRENT_USERID ,
DB_DOMAIN ,
DB_NAME ,
ENTRYID ,
EXTERNAL_NAME ,
FG_JOB_ID ,
GLOBAL_CONTEXT_MEMORY ,
HOST ,
INSTANCE ,
IP_ADDRESS ,
ISDBA ,
LANG ,
LANGUAGE ,
NETWORK_PROTOCOL ,
NLS_CALENDAR ,
NLS_CURRENCY ,
NLS_DATE_FORMAT ,
NLS_DATE_LANGUAGE ,
NLS_SORT ,
NLS_TERRITORY ,
OS_USER ,
PROXY_USER ,
PROXY_USERID ,
SESSION_USER ,
SESSION_USERID ,
SESSIONID ,
TERMINAL
) AS SELECT
SYS_CONTEXT ('USERENV', 'AUDITED_CURSORID') ,
SYS_CONTEXT ('USERENV', 'AUTHENTICATION_DATA') ,
SYS_CONTEXT ('USERENV', 'AUTHENTICATION_TYPE') ,
SYS_CONTEXT ('USERENV', 'BG_JOB_ID') ,
SYS_CONTEXT ('USERENV', 'CLIENT_IDENTIFIER') ,
SYS_CONTEXT ('USERENV', 'CLIENT_INFO') ,
SYS_CONTEXT ('USERENV', 'CURRENT_SCHEMA') ,
SYS_CONTEXT ('USERENV', 'CURRENT_SCHEMAID') ,
SYS_CONTEXT ('USERENV', 'CURRENT_SQL') ,
SYS_CONTEXT ('USERENV', 'CURRENT_USER') ,
SYS_CONTEXT ('USERENV', 'CURRENT_USERID') ,
SYS_CONTEXT ('USERENV', 'DB_DOMAIN') ,
SYS_CONTEXT ('USERENV', 'DB_NAME') ,
SYS_CONTEXT ('USERENV', 'ENTRYID') ,
SYS_CONTEXT ('USERENV', 'EXTERNAL_NAME') ,
SYS_CONTEXT ('USERENV', 'FG_JOB_ID') ,
SYS_CONTEXT ('USERENV', 'GLOBAL_CONTEXT_MEMORY') ,
SYS_CONTEXT ('USERENV', 'HOST') ,
SYS_CONTEXT ('USERENV', 'INSTANCE') ,
SYS_CONTEXT ('USERENV', 'IP_ADDRESS') ,
SYS_CONTEXT ('USERENV', 'ISDBA') ,
SYS_CONTEXT ('USERENV', 'LANG') ,
SYS_CONTEXT ('USERENV', 'LANGUAGE') ,
SYS_CONTEXT ('USERENV', 'NETWORK_PROTOCOL') ,
SYS_CONTEXT ('USERENV', 'NLS_CALENDAR') ,
SYS_CONTEXT ('USERENV', 'NLS_CURRENCY') ,
SYS_CONTEXT ('USERENV', 'NLS_DATE_FORMAT') ,
SYS_CONTEXT ('USERENV', 'NLS_DATE_LANGUAGE') ,
SYS_CONTEXT ('USERENV', 'NLS_SORT') ,
SYS_CONTEXT ('USERENV', 'NLS_TERRITORY') ,
SYS_CONTEXT ('USERENV', 'OS_USER') ,
SYS_CONTEXT ('USERENV', 'PROXY_USER') ,
SYS_CONTEXT ('USERENV', 'PROXY_USERID') ,
SYS_CONTEXT ('USERENV', 'SESSION_USER') ,
SYS_CONTEXT ('USERENV', 'SESSION_USERID') ,
SYS_CONTEXT ('USERENV', 'SESSIONID') ,
SYS_CONTEXT ('USERENV', 'TERMINAL')
from dual; -
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? -
How to get a layout like the jpg image in the below url
https://profiles.google.com/1002692743277336179061- use panel splitter (horizontal)
2- in the first facet (the picture)
2- in the second facets (panel tapped) -
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
Maybe you are looking for
-
How to access a PDF file in Tanzania
I am a graduate of St. Ignatius in Cleveland, class of 1943, currently at work in Dar es Salaam, and I admire the work you do in Adobe. I want to read on my laptop a PDF file sent me from the United States, and I'm told I need an accessory not avail
-
Auto position buttons under array on front panel
In my gui I have an array of clusters that I am auto-sizing based on number of rows property node. I have a delete and ok button under the indicator for the array and would like to position the buttons at the bottom of the array. The easy solution
-
Hi All, We are woking in one JDBC scenario and we are not able to connect to SQL 2008 system. We have XI 3.0 version. we have basis to redeploy the driver that is also not working. Now Basis is suggesting to apply Service pack. Currently we are on SP
-
How to align prompts for a stand alone report
I have an OBIEE analysis with prompts. This is a stand alone report and not a report on the dashboard. This report has various different prompts each with a different text. Due to which they dont align . For example (dash is a prompt box) Product Nam
-
My computer shuts down due to an error when i plug my ipod in.
When i plug my ipod touch into my computer, it is first recognized as a still digital camera, followed by an error. the error is only shown for about 1/2 a second before the computer restarts. (obviously i can't read what the problem is.)