How to get two rows of data using GUI_DOWNLOAD
Hi i am using GUI_DOWNLOAD i am downloading data into excel succesfully.....
i am getting data as
Pernr Fname Lname
1000 F1000 L1000
2000 F2000 L2000
requirement
is to add one more field on the top of text as what is the run date .
is it possible using GUI_DOWNLOAD? or need to use oops/OLE only one ?
RUNDATE: 15/05/2009
Pernr Fname Lname
1000 F1000 L1000
2000 F2000 L2000
Regards
sas
Hi,
check the below code, it's working as per your requirement. For the second call of FM use
append = 'X'.
DATA: it_date TYPE TABLE OF char30, "For downloading Rundate
wa_date LIKE LINE OF it_date.
CONCATENATE 'Rundate: ' sy-datum+6(2) '.' sy-datum+4(2) '.'
sy-datum+0(4) INTO wa_date.
APPEND wa_date TO it_date.
"Download the Rundate first
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'D:\1.xls'
filetype = 'DAT'
write_field_separator = 'X'
TABLES
data_tab = it_date.
"Now download your data tab with header with the append parameter as X
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'D:\1.xls'
filetype = 'DAT'
append = 'X'
write_field_separator = 'X'
TABLES
data_tab = it_tab
fieldnames = it_header.
Hope this helps you.
Regards,
Manoj Kumar P
Edited by: Manoj Kumar on May 15, 2009 8:46 AM
Similar Messages
-
How to get two rows from this data?
SQL Gurus,
I need to summarize the following data into two rows (two rows based on the example data below but it can be any number of rows if there are more breaks in continuos numbers)
DETAIL_ID FM_SERIAL_NUMBER TO_SERIAL_NUMBER
63009 11 11
63009 12 12
63009 13 13
63009 14 14
63009 15 15
63009 16 16
63009 17 17
63009 18 18
63009 19 19
63009 20 20
63009 228 228
I need to get two rows, one showing 11-20 (that's because there's a conituity between 11 to 20)
and the other row showing 228 - 228.
Any help is appreciated
Regards,
Srinithe example i gave had some issues.
Here is an updated code.
Provided your detail_id,f_serial_no,t_serial_no are numbers.
Thanks to the example provided by Karthick_Arp
link:genterating one order
WITH t AS
(SELECT 63009 a,
level b ,
level c
FROM dual CONNECT BY level < 10
UNION ALL
SELECT 63009 , 228,228 FROM dual
UNION ALL
SELECT 63009 , 229,229 FROM dual
UNION ALL
SELECT 63009 , 238,238 FROM dual
UNION ALL
SELECT 63009,239,239 FROM dual
UNION ALL
SELECT 630010,223,223 FROM dual
UNION ALL
SELECT 630010,224,224 FROM dual
union all
SELECT 63009,232,232 FROM dual
, t1 as (
select a, b, c, decode(b-nvl(lag(b) over (partition by a order by b),1),1,0,b) d from t)
,t2 as (
select a, b, c,d
from (select row_number() over(order by b) rno, a,b,c,d
from t1) t
model
return updated rows
dimension by (rno)
measures (a, b, c,d)
rules update
d[any] = case when d[cv()] = 0 then nvl(d[cv()-1],0) else d[cv()] end
select a,min(b),max(b) from t2
group by a,doutput
63009 1 9
630010 223 224
63009 232 232
63009 228 229
63009 238 239
Alvinder
Edited by: alvinder on Feb 20, 2009 9:28 AM -
How to get EKBE-BUDAT (GR Date) using data of BSEG
hI ,
My requirement is to get the GR date from EBKE which is in the field BUDAT.
my report already has BSEG data , using that i want to get the EKBE-BUDAT.
One of the Function person suggested this:
Select LFBNR
LFPOS
LFGJA
From EKBE
into it_ekbe_temp
where EKBE -EBELN = EKBEBSEG-EBELN
AND EKBE-EBELP = EKBEBSEG-EBELP
AND EKBE-BELNR = EKBEBSEG-BELNR
AND EKBE-BUZEI = BSEG-BUZEI
once we get these 3 fields, again put a query on EKBE and get the GR date BUDAT
select a~ebeln
a~ebelp
a~budat
a~lfbnr
a~lfpos
a~lfgja
into table it_ekbe
from ekbe as a
inner join bseg as b on
b~ebeln = a~ebeln
and b~ebelp = a~ebelp
for all entries in it_ekbe_temp
where a~gjahr = it_ekbe_temp-lfgja
and a~belnr = it_ekbe_temp-lfbnr
and a~buzei = it_ekbe_temp-lfpos.
endif.
Can anyone suggest me how to get the GR date from EKBE using BSEG data.Hi Mayank,
You can get through by hitting MSEG table first , get the required key info. and then hit EKBE and get BUDAT.
Pass ebeln,ebelp to mseg and get the key info. ...
Hope this helps.
Thanks,
Amresh -
How to get AD reconciliation event data using SQL query.
Hi All,
I was trying to get all recon data for Target AD Recon from OIM db, but it seems that in OIM 11g we do not have recon data in tables: RCU, RCE, etc. We have to use "RECON_..." tables, my question is does any bady has sample query to fetch data from recon tables?
best
mpIt should be a question of linking your AD user reconciliation table (beginning RA_) with the RECON_EVENTS table by RE_KEY.
In my case I have OID user reconciliation (so my RA_ table will be different to yours) and can use something like:
SELECT RECON_EVENTS.RE_STATUS, RA_OIDUSER5.* FROM RECON_EVENTS, RA_OIDUSER5 WHERE RECON_EVENTS.RE_KEY = RA_OIDUSER5.RE_KEY;
Obviously it then depends on what information you want to filter on and retrieve. -
How to get current row(Based on Radio button check) submit button Click
Hi i hava Query Region Search(Based On Auto Customization Criteria).
For Showing Results iam Using Table Region.
Using Radio button How we get the row reference value using Submit button Click.
Please Help on this .
Thanks & Regards
SanHi san ,
Try this
if ("EventID".equals(pageContext.getParameter(EVENT_PARAM)))
String rowRef = pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
OARow row = (OARow)am.findRowByRef(rowRef);
VORowImpl lineRow = (YourVORowImpl)findRowByRef(rowRef); // Replace your vo name .
Please refer this link , Let me know if its not clear .
Single Selection in table Region in OAF .
Keerthi -
How to get current row data in table control
Hi , expert ,
I am professional in oracle , but now I am a new guy in SAP ABAP .
I have a question in UI
How to get current row data and click pushbutton in table control to open next screen ?
I want to get the current data and open next screen to carry out detail detail .
Thansk for all your suggestion .GET CURSOR LINE SY-CUROW .
READ TABLE internal_table index SY-CUROW. -
How to get all rows in table to red using alternate rows properties option
How to get all rows in table to red using alternate rows properties option
Hi Khrisna,
You can get all rows red by selecting the color red in the "Color" and "frequency" to 1 under the "Alternate Row/Column colors".
I tried doing it and the colors freaked me out (all red) :-D
Kindly tell me if im missing something.
Regards,
John Vincent -
How to get selected row data of an ADF table in HashMap?
Hi,
Can anyone please tell me how to selected row data of an ADF table in HashMap like :
Object obj = pageTable.getSelectedRowData();
JUCtrlHierNodeBinding rowData = (JUCtrlHierNodeBinding)obj;
Now in above code I want the convert rowData in HashMap.
Can anyone please tell me how to do that? Its urgent.
Thanks,
VikVik,
No need to ask the same question 3 times...
In [url http://forums.oracle.com/forums/message.jspa?messageID=4590586]this post, Nick showed you how to get the Row.
If it were so urgent, you could have done a little reading of the javadocs to come up with code like this (not tested, up to you to do that)
HashMap m = new HashMap();
Row r = get it like Nick showed you to;
Object values[]=r.getAttributeValues();
String names[]=r.getAttributeNames();
for (int i=0; i<r.getAttributeCount(); i++)
m.put(names, values[i]); -
How to compare two rows from two table with different data
how to compare two rows from two table with different data
e.g.
Table 1
ID DESC
1 aaa
2 bbb
3 ccc
Table 2
ID DESC
1 aaa
2 xxx
3 ccc
Result
2Create
table tab1(ID
int ,DE char(10))
Create
table tab2(ID
int ,DE char(10))
Insert
into tab1 Values
(1,'aaa')
Insert
into tab1 Values
(2,'bbb')
Insert
into tab1 Values(3,'ccc')
Insert
into tab1 Values(4,'dfe')
Insert
into tab2 Values
(1,'aaa')
Insert
into tab2 Values
(2,'xx')
Insert
into tab2 Values(3,'ccc')
Insert
into tab2 Values(6,'wdr')
SELECT
tab1.ID,tab2.ID
As T2 from tab1
FULL
join tab2 on tab1.ID
= tab2.ID
WHERE
BINARY_CHECKSUM(tab1.ID,tab1.DE)
<> BINARY_CHECKSUM(tab2.ID,tab2.DE)
OR tab1.ID
IS NULL
OR
tab2.ID IS
NULL
ID column considered as a primary Key
Apart from different record,Above query populate missing record in both tables.
Result Set
ID ID
2 2
4 NULL
NULL 6
ganeshk -
How to get Current row of ViewObject in the DoDML methode
Hi all
I have two ViewObject EmplyesView and DeptView
How to get Current row of ViewObject DeptView in the DoDML methode of EmplyesViewOK, we can play this game on and on...
I'll ask for a use case (http://en.wikipedia.org/wiki/Use_case) and you don't give any info we don't already know. After an other 10 posts we probably know what you real problem is and can give you the advice which you could have gotten in the fist place.
So please take some time and describe the problem as if you would ask your mother for help. Tell us how the data model is build and how the VO are related. Is there any input from an user involved? Which information from the other view do you need? How do you get to the doDML method? Is there a button in the ui involved?
Timo -
How to get selected row index of a Table ?
hi gurus,I'm new to Webdynpro for abap
I'm displaying just Flight details in a Table so
how to get selected row index of a Table and need to be display in Message manager.Hi,
For getting the row index use the following code.
DATA lo_nd_node TYPE REF TO if_wd_context_node.
DATA lo_el_node TYPE REF TO if_wd_context_element.
DATA index TYPE i.
* navigate from <CONTEXT> to <NODE> via lead selection
lo_nd_node = wd_context->get_child_node( name = wd_this->wdctx_node ).
lo_el_node = lo_nd_node->get_lead_selection( ).
index = lo_el_node->get_index( ).
node is the name of the node which is binded to the table.
For printing the message u can use code wizard.
Press ctrl-F7. Now Select generate message.
IN this select the method REPORT_SUCCESS
In the code now u can give index to Message text Exporting parameter. Comment receiving parameter.
Write the whole code in onLeadSelect of the table.
Regards,
Pankaj Aggarwal -
How to get selected Row Index in a table based ona VO?
Hi All,
I'm writing an ADF form wherein I use a VO based on a SQL query. I'd like to know how to get the index of a selected row. I havea selection Listener in place where I can print the selected Row's data using getSelectedRowData().toString() on the table.
How can I get certain Attributes from this selected row.
One solution I thought of is to get the row index and then read attributes. But I cant seem to figure out how to get rowIndex for a selected row. Any sugestions?
Using JDeveloper 11g.
Thanks
P.If your selected row is marked as current row you can use
// Get a attribute value of the current row of iterator
DCIteratorBinding iterBind= (DCIteratorBinding)dcBindings.get("testIterator");
String attribute = (String)iterBind.getCurrentRow().getAttribute("field1");Where 'testIterator' is the name of the iterator you use for the table and 'field1' is the name of an attribute you want to get.
Or you can iterate over the selected row keys (even if it's only one):
// get selected Rows of a table 2
for (Object facesRowKey : table.getSelectedRowKeys()) {
table.setRowKey(facesRowKey);
Object o = table.getRowData();
JUCtrlHierNodeBinding rowData = (JUCtrlHierNodeBinding)o;
Row row = rowData.getRow();
TestRow testRow = (TestRow)((DCDataRow)row).getDataProvider() ;
}Where TestRow is the row type of the VO of your table.
Timo -
How to get the plsql table data into output cursor
Hi,
Could anybody please help me.
Below is an example of the scenario..
CREATE OR REPLACE PACKAGE chck IS
PROCEDURE getdata(dept_no IN VARCHAR2,oc_result_cursor OUT sys_REFCURSOR);
TYPE get_rec is record (ename varchar2(20),
eno number(12));
TYPE t_recs IS TABLE OF get_rec INDEX BY BINARY_INTEGER;
emp_tab t_recs;
END chck;
CREATE OR REPLACE PACKAGE BODY chck AS
PROCEDURE getdata(dept_no IN VARCHAR2,oc_result_cursor OUT sys_REFCURSOR)
is
BEGIN
select ename, eno
bulk collect into emp_tab
from emp;
open oc_result_cursor for select * from table(emp_tab); -- I believe something is wrong here ....
END;
END chck;
the above package is giving me an error:
LINE/COL ERROR
10/29 PL/SQL: SQL Statement ignored
10/43 PL/SQL: ORA-22905: cannot access rows from a non-nested table
item
let me know what needs to be changed
Thanks
Manjumanjukn wrote:
once i get the data into a plsql table, how to get this plsql table data into the cursor?There is no such thing as a PL/SQL table - it is an array.
It is nothing at all like a table. It cannot be indexed, partitioned, cluster, etc. It does not exist in the SQL engine as an object that can be referenced. It resides in expensive PGA memory and needs to be copied (lock, stock and barrel) to the SQL engine as a bind variable.
It is an extremely primitive structure - and should never be confused as being just like a table.
Its use in SQL statements is also an exception to the rule. Sound and valid technical reasons need to justify why one want to push a PL/SQL array to the SQL engine to run SELECT 's against it. -
How to compare two rows in PL/SQL?
Hi All,
How to compare two rows in PL/SQL? Is there any method that I can use instead of comparing them column by column?
Any feedback would be highly appreciated.PhoenixBai wrote:
Hi All,
How to compare two rows in PL/SQL? Is there any method that I can use instead of comparing them column by column?What "rows" are you referring to?
If you're talking of rows within a PL/SQL associative array there are techniques as described in the documentation... e.g.
SQL> ed
Wrote file afiedt.buf
1 declare
2 type v1 is table of number;
3 r1 v1 := v1(1,2,4);
4 r2 v1 := v1(1,2,3);
5 begin
6 if r1 MULTISET EXCEPT DISTINCT r2 = v1() then
7 dbms_output.put_line('Same');
8 else
9 dbms_output.put_line('Different');
10 end if;
11* end;
SQL> /
Different
PL/SQL procedure successfully completed.
SQL> ed
Wrote file afiedt.buf
1 declare
2 type v1 is table of number;
3 r1 v1 := v1(1,2,3);
4 r2 v1 := v1(1,2,3);
5 begin
6 if r1 MULTISET EXCEPT DISTINCT r2 = v1() then
7 dbms_output.put_line('Same');
8 else
9 dbms_output.put_line('Different');
10 end if;
11* end;
SQL> /
Same
PL/SQL procedure successfully completed.
SQL>If you're talking about rows on a table then you can use the MINUS set operator to find the rows that differ between two sets of data...
SQL> select * from emp;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7369 SMITH CLERK 7902 17-DEC-1980 00:00:00 800 20
7499 ALLEN SALESMAN 7698 20-FEB-1981 00:00:00 1600 300 30
7521 WARD SALESMAN 7698 22-FEB-1981 00:00:00 1250 500 30
7566 JONES MANAGER 7839 02-APR-1981 00:00:00 2975 20
7654 MARTIN SALESMAN 7698 28-SEP-1981 00:00:00 1250 1400 30
7698 BLAKE MANAGER 7839 01-MAY-1981 00:00:00 2850 30
7782 CLARK MANAGER 7839 09-JUN-1981 00:00:00 2450 10
7788 SCOTT ANALYST 7566 19-APR-1987 00:00:00 3000 20
7839 KING PRESIDENT 17-NOV-1981 00:00:00 5000 10
7844 TURNER SALESMAN 7698 08-SEP-1981 00:00:00 1500 0 30
7876 ADAMS CLERK 7788 23-MAY-1987 00:00:00 1100 20
7900 JAMES CLERK 7698 03-DEC-1981 00:00:00 950 30
7902 FORD ANALYST 7566 03-DEC-1981 00:00:00 3000 20
7934 MILLER CLERK 7782 23-JAN-1982 00:00:00 1300 10
14 rows selected.
SQL> select * from emp2;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7521 WARD SALESMAN 7698 22-FEB-1981 00:00:00 1250 500 30
7566 JONES MANAGER 7839 02-APR-1981 00:00:00 2975 20
7782 CLARK MANAGER 7839 09-JUN-1981 00:00:00 2450 10
7788 SCOTT ANALYST 7566 19-APR-1987 00:00:00 3000 20
7839 KING PRESIDENT 17-NOV-1981 00:00:00 5000 10
7900 JAMES CLERK 7698 03-DEC-1981 00:00:00 950 30
7934 MILLER CLERK 7782 23-JAN-1982 00:00:00 1300 10
7 rows selected.
SQL> select * from emp
2 minus
3 select * from emp2;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7369 SMITH CLERK 7902 17-DEC-1980 00:00:00 800 20
7499 ALLEN SALESMAN 7698 20-FEB-1981 00:00:00 1600 300 30
7654 MARTIN SALESMAN 7698 28-SEP-1981 00:00:00 1250 1400 30
7698 BLAKE MANAGER 7839 01-MAY-1981 00:00:00 2850 30
7844 TURNER SALESMAN 7698 08-SEP-1981 00:00:00 1500 0 30
7876 ADAMS CLERK 7788 23-MAY-1987 00:00:00 1100 20
7902 FORD ANALYST 7566 03-DEC-1981 00:00:00 3000 20
7 rows selected.If you actually need to know what columns data is different on "non-matching" rows (based on your primary key) then you'll have to compare column by column. -
How to get the user entered data?
Hi all,
I have created an HTMLB DynPage component.
In That i have created my input screen with textboxes using response.write method.
i have added one onConfirm event on which the data whould validate.
so onConfirm method im trying to get the data with request.getParameter method which returns null...
how to do...how to get the user entered data to do my validations...can anyone plz advice.
Thanks,
ViswesHi
inputfield or textbox component entered directly using response.write(...) are not htmlb , but html.
to create portal input field (ie HTMLB), you should do something like
this in the doProcessBeforeOutput member function
InputField field1 = new InputField("Id1");
field1.setSize(8); // 8 characters
this.getForm().addComponent(field1);
and in doProcessAfterInput member function
InputField field1 =
(InputField) this.getComponentByName("Id1");
you can then manipulate the content of the field.
Hope this help,
Guillaume
Maybe you are looking for
-
Restore iphoto library from Time machine using external drive
I keep my iPhoto library in an external drive (iomega 1 TB) I use Time Machine (Time Capsule) for my back-up of iphoto. The external drive is failing. I have bought an new external drive and wish to restore my iPhoto library to this new drive. The
-
CAN ANYBODY EXPLANIN ME HOW STOCK IN HAND IS CALCULATED? AND IN WHICH TABLE-FIELD STOCK IN HAND IS STORED.i.e. name of table for stock in hand? pls provide me some input. regards simran
-
Blank Page prints even though "Suppress Printing If No Records" option is t
Blank Page prints even though "Suppress Printing If No Records" option is thicked. My environment: Crystal Report Developer Full version 11.5.11.1470 Windows Server 2003 SP2 32-bit. We have a third party vendor application written in Java -let's call
-
i'm not able to sync my ipad with my laptop please help..!!
-
I had to uninstall iTunes from my computer recently but now I cannot re-install it. I deleted all Apple software from my PC. (I'm running Windows 7) and I downloaded the new version (12.1) and then I select to 'Run as an administrator'. First error t