Querying SAP Data using native i tools
Can a standard IBM tool like Query/400, SQL, etc. access SAP data? Is the data actually stored in DB2 or in some other form? If it is, what library would you look for?
Thanks.
Hi BillNGS,
in theory yes, but not with call ...
You could use STARTRFC or start RFCs on a differerent approach. You could use the not reliable SAPEVT and so on. I would say, for such kind of things, you need a bit consulting in order to discuss the different options and then to make a useful decision for your company.
Regards
Volker Gueldenpfennig, consolut international ag
http://www.consolut.net - http://www.4soi.de - http://www.easymarketplace.de
Similar Messages
-
XML generation with SAP data using XML schema - Reg
Hello experts,
My requirement is , SAP( ztable data ) data has to be transferred to third party software folder.Third party using XML so they requires output from SAP in XML format.
For that third party software guys told me that they will give their own XML schema to me.I have to generate XML file with SAP data using their XML schema.
Generating XML file with their Schema should be underlined.
I studied that call transformation statement helps for this.
Even then i don't have clear idea about this topic.
Please brief me about how to use their XML schema to generate XML with my own sap data.
Thanks in advance experts.
Kumarplease try this same program and see it ....
*& Report z_xit_xml_check
REPORT z_xit_xml_check.
TYPE-POOLS: ixml.
TYPES: BEGIN OF t_xml_line,
data(256) TYPE x,
END OF t_xml_line.
DATA: l_ixml TYPE REF TO if_ixml,
l_streamfactory TYPE REF TO if_ixml_stream_factory,
l_parser TYPE REF TO if_ixml_parser,
l_istream TYPE REF TO if_ixml_istream,
l_document TYPE REF TO if_ixml_document,
l_node TYPE REF TO if_ixml_node,
l_xmldata TYPE string.
DATA: l_elem TYPE REF TO if_ixml_element,
l_root_node TYPE REF TO if_ixml_node,
l_next_node TYPE REF TO if_ixml_node,
l_name TYPE string,
l_iterator TYPE REF TO if_ixml_node_iterator.
DATA: l_xml_table TYPE TABLE OF t_xml_line,
l_xml_line TYPE t_xml_line,
l_xml_table_size TYPE i.
DATA: l_filename TYPE string.
PARAMETERS: pa_file TYPE char1024 DEFAULT 'c:temporders_dtd.xml'.
* Validation of XML file: Only DTD included in xml document is supported
PARAMETERS: pa_val TYPE char1 AS CHECKBOX.
START-OF-SELECTION.
* Creating the main iXML factory
l_ixml = cl_ixml=>create( ).
* Creating a stream factory
l_streamfactory = l_ixml->create_stream_factory( ).
PERFORM get_xml_table CHANGING l_xml_table_size l_xml_table.
* wrap the table containing the file into a stream
l_istream = l_streamfactory->create_istream_itable( table = l_xml_table
size = l_xml_table_size ).
* Creating a document
l_document = l_ixml->create_document( ).
* Create a Parser
l_parser = l_ixml->create_parser( stream_factory = l_streamfactory
istream = l_istream
document = l_document ).
* Validate a document
IF pa_val EQ 'X'.
l_parser->set_validating( mode = if_ixml_parser=>co_validate ).
ENDIF.
* Parse the stream
IF l_parser->parse( ) NE 0.
IF l_parser->num_errors( ) NE 0.
DATA: parseerror TYPE REF TO if_ixml_parse_error,
str TYPE string,
i TYPE i,
count TYPE i,
index TYPE i.
count = l_parser->num_errors( ).
WRITE: count, ' parse errors have occured:'.
index = 0.
WHILE index < count.
parseerror = l_parser->get_error( index = index ).
i = parseerror->get_line( ).
WRITE: 'line: ', i.
i = parseerror->get_column( ).
WRITE: 'column: ', i.
str = parseerror->get_reason( ).
WRITE: str.
index = index + 1.
ENDWHILE.
ENDIF.
ENDIF.
* Process the document
IF l_parser->is_dom_generating( ) EQ 'X'.
PERFORM process_dom USING l_document.
ENDIF.
*& Form get_xml_table
FORM get_xml_table CHANGING l_xml_table_size TYPE i
l_xml_table TYPE STANDARD TABLE.
* Local variable declaration
DATA: l_len TYPE i,
l_len2 TYPE i,
l_tab TYPE tsfixml,
l_content TYPE string,
l_str1 TYPE string,
c_conv TYPE REF TO cl_abap_conv_in_ce,
l_itab TYPE TABLE OF string.
l_filename = pa_file.
* upload a file from the client's workstation
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = l_filename
filetype = 'BIN'
IMPORTING
filelength = l_xml_table_size
CHANGING
data_tab = l_xml_table
EXCEPTIONS
OTHERS = 19.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
* Writing the XML document to the screen
CLEAR l_str1.
LOOP AT l_xml_table INTO l_xml_line.
c_conv = cl_abap_conv_in_ce=>create( input = l_xml_line-data replacement = space ).
c_conv->read( IMPORTING data = l_content len = l_len ).
CONCATENATE l_str1 l_content INTO l_str1.
ENDLOOP.
l_str1 = l_str1+0(l_xml_table_size).
SPLIT l_str1 AT cl_abap_char_utilities=>cr_lf INTO TABLE l_itab.
WRITE: /.
WRITE: /' XML File'.
WRITE: /.
LOOP AT l_itab INTO l_str1.
REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>horizontal_tab IN
l_str1 WITH space.
WRITE: / l_str1.
ENDLOOP.
WRITE: /.
ENDFORM. "get_xml_table
*& Form process_dom
FORM process_dom USING document TYPE REF TO if_ixml_document.
DATA: node TYPE REF TO if_ixml_node,
iterator TYPE REF TO if_ixml_node_iterator,
nodemap TYPE REF TO if_ixml_named_node_map,
attr TYPE REF TO if_ixml_node,
name TYPE string,
prefix TYPE string,
value TYPE string,
indent TYPE i,
count TYPE i,
index TYPE i.
node ?= document.
CHECK NOT node IS INITIAL.
ULINE.
WRITE: /.
WRITE: /' DOM-TREE'.
WRITE: /.
IF node IS INITIAL. EXIT. ENDIF.
* create a node iterator
iterator = node->create_iterator( ).
* get current node
node = iterator->get_next( ).
* loop over all nodes
WHILE NOT node IS INITIAL.
indent = node->get_height( ) * 2.
indent = indent + 20.
CASE node->get_type( ).
WHEN if_ixml_node=>co_node_element.
* element node
name = node->get_name( ).
nodemap = node->get_attributes( ).
WRITE: / 'ELEMENT :'.
WRITE: AT indent name COLOR COL_POSITIVE INVERSE.
IF NOT nodemap IS INITIAL.
* attributes
count = nodemap->get_length( ).
DO count TIMES.
index = sy-index - 1.
attr = nodemap->get_item( index ).
name = attr->get_name( ).
prefix = attr->get_namespace_prefix( ).
value = attr->get_value( ).
WRITE: / 'ATTRIBUTE:'.
WRITE: AT indent name COLOR COL_HEADING INVERSE, '=',
value COLOR COL_TOTAL INVERSE.
ENDDO.
ENDIF.
WHEN if_ixml_node=>co_node_text OR
if_ixml_node=>co_node_cdata_section.
* text node
value = node->get_value( ).
WRITE: / 'VALUE :'.
WRITE: AT indent value COLOR COL_GROUP INVERSE.
ENDCASE.
* advance to next node
node = iterator->get_next( ).
ENDWHILE.
ENDFORM. "process_dom
reward points if it is use fulll ....
Girish -
How to make link between xcelsius components with sap data using Web servic
Hi all,
I have a doubt regarding connection between Xcelsius components and SAP data.
I created one Web service using Function module and made a connection between xcelsius and that web service using binding URL. It shows imput and output parameters perfectly.
But I cant get any idea as to how to connect Xcelsius components with these parameters.
Can anybody help me out..
please its urgent.
Thanks,
SimadriHave you bound your output parameters to ranges of cells? Select the item, then click the icon to the right of the Insert In: box and select the cells.
Add a spreadsheet component to your chart and bind it to the cells, then preview the model. Do you see the data coming through?
If you do, then you can click File > Snapshot > Export Excel Data. Then close Preview mode, and import data from spreadsheet and select the sheet you just exported. This gives you real data to work with when designing the dashboard.
Hope that helps. -
Query SAP Database with Native Sql.
Hi,
I would like to query the table MARA with native sql and return all headings and data
Select * from MARA where MATNR = '00000000151515'
<i>I need this to be able to TEST my Sql statements.</i>
In SqlServer you have the Query Analyser where I can do just this, but is there some nice in SAP Tool for this as well ?
[Unfortanely I can't connect to SAP_U01 database from QA...]
//MartinHi Martin,
maybe you give ST05 a try: last button gives the possibility to enter a SQL-statement directly - and for explanation it has to be executed (somehow).
Regards,
Christian -
Modify SAP data using Web Dynpro for ABAP
Experts,
I have a question. We all have working in web Dynpro to create report.
I was trying to display the data in table and update the data.
When I click on Save button the data should be saved in the SAP table.
SAP table may be standard or user-defined table.
Any idea of how to do it???
Answers will b rewarded.
Thanks in Advance
Edited by: Router on Mar 11, 2008 12:06 PMHi,
The solution to this is very similar to the reports that we write.
1. Create a context node from the dictionary element in the view of the webdynpro component.
2. Now you may be displaying/editing this data in the form of a table in the view layout. For this create a table in the layout and bind the fields of the context to the node you created from the dictionary table in the context.
3. In the layout you also want to have a button SAVE. on the event of this button. Write the code from code wizard where in
a. Read the context of the dictionary table from the context.
b. call method
CALL METHOD lo_nd_group->get_elements
RECEIVING
set = lt_ddictable.
c. update the database table using the internal table lt_ddictable.
Hope you find this helpul.
Regards,
Kinshuk -
SAP Backup using Unix commands / tools
Hi,
We want to include file system backup process as part of our backup strategy. To test the waters, we are planning to take a backup of the at filesystems level. Following are the filesystems in our production systems. We have a test server (hostname is different), without any filesystems created beforehand. I want to know: 1. Which filesystems will be required from the below:
Filesystem GB blocks Used Free %Used Mounted on
/dev/hd4 2.00 0.20 1.80 11% /
/dev/hd2 5.00 2.07 2.93 42% /usr
/dev/hd9var 2.00 0.07 1.93 4% /var
/dev/hd3 2.00 0.77 1.23 39% /tmp
/dev/hd1 0.06 0.00 0.06 2% /home
/proc - - - - /proc
/dev/hd10opt 0.31 0.21 0.10 68% /opt
/dev/oraclelv 40.00 5.10 34.90 13% /oracle
/dev/optoralv 10.00 0.00 10.00 1% /opt/oracle
/dev/oracleGSPlv 40.00 4.34 35.66 11% /oracle/GSP
/dev/sapdata1lv 397.50 331.72 65.78 84% /oracle/GSP/sapdata1
/dev/sapdata2lv 297.50 194.58 102.92 66% /oracle/GSP/sapdata2
/dev/sapdata3lv 98.75 47.09 51.66 48% /oracle/GSP/sapdata3
/dev/sapdata4lv 98.75 38.08 60.67 39% /oracle/GSP/sapdata4
/dev/origlogAlv 10.00 0.12 9.88 2% /oracle/GSP/origlogA
/dev/origlogBlv 10.00 0.12 9.88 2% /oracle/GSP/origlogB
/dev/mirrlogAlv 10.00 0.10 9.90 1% /oracle/GSP/mirrlogA
/dev/mirrlogBlv 10.00 0.10 9.90 1% /oracle/GSP/mirrlogB
/dev/oraarchlv 148.75 24.02 124.73 17% /oracle/GSP/oraarch
/dev/usrsaplv 20.00 0.24 19.76 2% /usr/sap
/dev/sapmntlv 20.00 10.84 9.16 55% /sapmnt
/dev/usrsapGSPlv 20.00 7.89 12.11 40% /usr/sap/GSP
/dev/saptranslv 20.00 17.54 2.46 88% /usr/sap/trans
IDES:/sapcd 40.00 37.72 2.28 95% /sapcd
GILSAPED:/usr/sap/trans 20.00 17.54 2.46 88% /usr/sap/trans
2. Is it possible to directly backup the filesystems (like /dev/oracleGSPlv)? This requirement is because, when I backup (using tar) /oracle, all the folders in /oracle, like /oracle/GSP, /oracle/GSP/sapdata1 etc, are also backed up. I do not want it. I would like to backup the filesystems directly.
3. Which unix backup tools are used to backup the individual filesystems?
4. How do we restore the filesystems to the test server? Thanks for your advise. Abdul Edited by: Abdul Rahim Shaik on Feb 8, 2010 12:10 PMHi,
I am not sure about your OS as you have not mentioned it...
If it is HP-UX then you can use "fbackup" backup for filesystem...
and IGNITE to backup volume groups..
fbackup will backup the filesystem only... but IGNITE backup creates bootable media for recovery...
With IGNITE (make_tape_recovery) backup you can backup individual volume group.
you can see the man pages for the details...
#man fbackup
#man make_tape_recovery
It will be more easy to guide you if you provide your OS and Filesystem layout and what you need to backup...
If you still want to use "tar" command for backup, use "--no-recursion" option to backup single directory
Regards.
Rajesh Narkhede -
How to query the data using control item avoiding special characters
I had a small doubt in d2k.
i created a emp block
in that we r providing a control item for empno
i am using that control item for querying emp details based on that control item value.
if i am giving single quote in that control field it is querying for all the records in the emp block
i am providing the where clause like this
'empno like '||''''||:m_empno||''''
can u pls clear this doubt for me.
thanks in advance.one thing i forgot to add.
we shouldnt use ascii values for the special characters.
means we shouldnt use ascii values for restricting the sspecial characters.
pls get me the reply as soon as possible
thanq -
I installed Oracle Gateway for MSSQL version 11.2.0.3.0 to a separate Oracle Home (platform is IBM AIX 6.1 64-bit). After setting up listener, init.ora file etc., I created database link and tried few queries (database version 11.2.0.2.0 with patches 12827726, 12827731 applied). All queries result in error message:
SQL> select count(*) from s4user@imosprodnew;
select count(*) from s4user@imosprodnew
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[Oracle][ODBC SQL Server Legacy Driver]20450 {20450}[Oracle][ODBC SQL Server Legacy Driver][SQL Server]Changed language setting to us_english.
{01000,NativeErr = 5703}[Oracle][ODBC SQL Server Legacy Driver][SQL Server]Changed database context to 'imosprod'. {01000,NativeErr = 5701}
[Oracle][ODBC SQL Server Legacy Driver][SQL Server]The number '042100421004210042110421104211042190421904219' is out of the range for numeric
representation (maximum precision 38). {22003,NativeErr = 1007}[Oracle][ODBC SQL Server Legacy Driver][SQL Server]Incorrect syntax near
'042100421004210042110421104211042190421904219'. {10103,NativeErr = 102}
ORA-02063: preceding 3 lines from IMOSPRODNEW
Trace file shows:
Heterogeneous Agent Release
11.2.0.3.0
ODBCINST set to "/app/oragw/product/11.2.0.3/dg4msql/driver/dg4msql.loc"
RC=-1 from HOSGIP for "LIBPATH"
LIBPATH from environment is "/app/oragw/product/11.2.0.3/dg4msql/driver/lib:/app/oragw/product/11.2.0.3/lib"
Setting LIBPATH to "/app/oragw/product/11.2.0.3/dg4msql/driver/lib:/app/oragw/product/11.2.0.3/dg4msql/driver/lib:/app/oragw/product/11.2.0.3/lib"
HOSGIP for "HS_FDS_SHAREABLE_NAME" returned "/app/oragw/product/11.2.0.3/dg4msql/driver/lib/odbc.so"
treat_SQLLEN_as_compiled = 1
uencoding=UTF8
##>Connect Parameters (len=226)<##
## DRIVER=Oracle 11g dg4msql;
## Address=10.1.0.20\IMOS;
## Database=imosprod;
#! UID=IMOS;
#! PWD=*
## AnsiNPW=Yes;
## EnableQuotedIdentifiers=1;
## IANAAppCodePage=2252;
## OctetSizeCalculation=1;
## PadVarbinary=0;
## SupportNumericPrecisionGreaterThan38=1;
Exiting hgogenconstr, rc=0 at 2013/06/06-14:54:21
Entered hgopoer at 2013/06/06-14:54:21
hgopoer, line 231: got native error 0 and sqlstate 20450; message follows...
[Oracle][ODBC SQL Server Legacy Driver]20450 {20450}[Oracle][ODBC SQL Server Legacy Driver][SQL Server]Changed language setting to us_english. {01000
,NativeErr = 5703}[Oracle][ODBC SQL Server Legacy Driver][SQL Server]Changed database context to 'imosprod'. {01000,NativeErr = 5701}
Exiting hgopoer, rc=0 at 2013/06/06-14:54:21
hgocont, line 2688: calling SqlDriverConnect got sqlstate 20450
DriverName:HGmsss23.so, DriverVer:06.11.0052 (b0047, U0046)
DBMS Name:Microsoft SQL Server, DBMS Version:10.00.4000
Entered hgopoer at 2013/06/06-14:54:21
hgopoer, line 231: got native error 1007 and sqlstate 22003; message follows...
[Oracle][ODBC SQL Server Legacy Driver][SQL Server]The number '042100421004210042110421104211042190421904219' is out of the range for numeric represe
ntation (maximum precision 38). {22003,NativeErr = 1007}[Oracle][ODBC SQL Server Legacy Driver][SQL Server]Incorrect syntax near '0421004210042100421
10421104211042190421904219'. {10103,NativeErr = 102}
Exiting hgopoer, rc=0 at 2013/06/06-14:54:21
hgoulcp, line 1932: calling SQLGetTypeInfo got sqlstate 22003
Exiting hgoulcp, rc=28500 at 2013/06/06-14:54:21 with error ptr FILE:hgoulcp.c LINE:1932 ID:SQLGetTypeInfo: LONGVARCHAR
hostmstr: 349326: RPC After Upload Caps
hostmstr: 349326: RPC Before Exit Agent
hostmstr: 349326: HOA Before hoalgof
Entered hgolgof at 2013/06/06-14:54:21
tflag:0
Entered hgopoer at 2013/06/06-14:54:21
hgopoer, line 231: got native error 0 and sqlstate 20131; message follows...
[Oracle][ODBC SQL Server Legacy Driver]20131 {20131}
Exiting hgopoer, rc=0 at 2013/06/06-14:54:21
hgolgof, line 180: calling SQLDisconnect got sqlstate 20131
Exiting hgolgof, rc=28500 at 2013/06/06-14:54:21 with error ptr FILE:hgolgof.c LINE:180 ID:Disconnect
hostmstr: 349326: HOA After hoalgof
hostmstr: 349326: HOA Before hoaexit
Entered hgoexit at 2013/06/06-14:54:21
Entered hgopoer at 2013/06/06-14:54:21
hgopoer, line 231: got native error 0 and sqlstate HY010; message follows...
[DataDirect][ODBC lib] Function sequence error {HY010}
Exiting hgopoer, rc=0 at 2013/06/06-14:54:21
hgoexit, line 126: calling SQLFreeHandle got sqlstate HY010
Exiting hgoexit, rc=0 with error ptr FILE:hgoexit.c LINE:126 ID:Free ENV handle
hostmstr: 349326: HOA After hoaexit
hostmstr: 349326: RPC After Exit Agent
Could this be some sort of incompatibility between DG4MSQL version 11.2.0.3.0 and RDBMS version 11.2.0.2.0?
I did not find anything relevant by searching, really (apart from one thread suggesting that this could be caused by misconfigured Linux OS, but my platform is AIX)I created test table and inserted data (using FreeTDS tsql tool):
locale is "en_US.UTF-8"
locale charset is "UTF-8"
1> use imosprod
2> go
1> create table TEST_MSSQL (PKEY integer, DATA varchar(20))
2> go
1> insert into TEST_MSSQL values (1000,'Data for key 1000')
2> go
1> insert into TEST_MSSQL values (2000,'Data for key 2000')
2> go
1> select * from TEST_MSSQL
2> go
PKEY DATA
1000 Data for key 1000
2000 Data for key 2000
(2 rows affected)
Then, I queried test table with:
1) DG4ODBC 11.2.0.2 + IBM-branded DataDirect ODBC driver,
2) DG4MSQL 11.2.0.2 and
3) DG4MSQL 11.2.0.3
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning and Automatic Storage Management options
SQL> select * from test_mssql@imos;
PKEY DATA
========== ====================
1000 Data for key 1000
2000 Data for key 2000
SQL> select * from test_mssql@imosprod;
PKEY DATA
========== ====================
1000 Data for key 1000
2000 Data for key 2000
SQL> select * from test_mssql@imosprodnew;
select * from test_mssql@imosprodnew
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[Oracle][ODBC SQL Server Legacy Driver]20450 {20450}[Oracle][ODBC SQL Server
Legacy Driver][SQL Server]Changed language setting to us_english.
{01000,NativeErr = 5703}[Oracle][ODBC SQL Server Legacy Driver][SQL
Server]Changed database context to 'imosprod'. {01000,NativeErr = 5701}
[Oracle][ODBC SQL Server Legacy Driver][SQL Server]The number
'042100421004210042110421104211042190421904219' is out of the range for numeric
representation (maximum precision 38). {22003,NativeErr = 1007}[Oracle][ODBC
SQL Server Legacy Driver][SQL Server]Incorrect syntax near
'042100421004210042110421104211042190421904219'. {10103,NativeErr = 102}
ORA-02063: preceding 3 lines from IMOSPRODNEW
Seems to be a change in internal logic of DG4MSQL in version 11.2.0.3 to me. -
Hello ,
I have a reqaust to update a db table declared "outside" our R3 db.
I mennage to select the data using native sql with a connection to the db.
Now i need to modify the data on the db.
Is there a similliar command like "fetch next" ' for update?
Mybe i need to build a procedure in th "host" db and use its own commands to update?
Thanks,
kobyHello Kobi,
Which release of SAP are you woking on?
If you're on ECC6.0, instead you using Native SQL to call the stored procs of external DBs you can use the [ADBC APIs |http://help.sap.com/abapdocu_702/en/abenadbc_procedure.htm](CL_SQL* classes).
BR,
Suhas -
How to query XML data stored in a CLOB column
I don't know XMLDB, so I have a dumb question about querying XML data which is saved as CLOB in a table.
I have a table (OLAP_AW_PRC), with a CLOB column - AW_XML_TMPL_VAL
This column contains this xml data - [click here|http://www.nasar.net/aw.xml]
Now I want to query the data using the xml tags - like returning the name of AW. This is where I am having trouble, how to query the data from AW_XML_TMPL_VAL clob column.
The following query generates error:
ORA-31011: XML parsing failed.
ORA-19202: Error occurred in XML processing
LPX-00229: input source is empty
SELECT
extractValue(value(x), '/AW/LongName') as "AWNAME"
from
OLAP_AW_PRC,
table(xmlsequence(extract (xmltype(AW_XML_TMPL_VAL), '/AWXML/AWXML.content/Create/ActiveObject/AW'))) x
where
extractValue(value(x) , '/AW/Name') = 'OMCR4'
- NasarMark,
Thanks. This is exactly what I was looking for.
After doing @Name in both places (SELECT and WHERE clause) it worked.
Now I have one more question.
There are multiple DIMENSION tags in my xml, and I want to see the NAME attribute values for all of those DIMENSIONs. The following query returns
ORA-19025: EXTRACTVALUE returns value of only one node.
Cause: Given XPath points to more than one node.
Action: Rewrite the query so that exactly one node is returned.
SELECT
extractValue(value(x), '/AW/@Name') as "AW",
extractValue(value(x), '/AW/Dimension/@Name') as "DIMENSIONS"
from
OLAP_AW_PRC,
table(xmlsequence(extract (xmltype(AW_XML_TMPL_VAL), '/AWXML/AWXML.content/Create/ActiveObject/AW'))) x
where
extractValue(value(x) , '/AW/@Name') = 'OMCR4' -
I have some data regarding transaction and I need the a list of clients who have not done any transactions in the past 12 months and the latest date a transaction was done. When I am querying the data using the follwoing query
Select Distinct C.Clcode, Clname, Clsurname, Clidcheck, Clresnamno, Claddstreet, Cltown, Clpstcde, Clcountry, Max (Trdat_time) maxdate
from Client_info c, Dealing_records d
where c.Clcode = d.Clcode
and Trdat_time < sysdate-356
group by C.Clcode, Clname, Clsurname, Clidcheck, Clresnamno, Claddstreet, Cltown, Clpstcde, Clcountry
I am getting a particular attribute that has done a transaction in the past 12 months, but the query is giving me also the latest date before the past 12 months and I do not want that
Can anyone help?
ThanksHi,
Welcome to the forum!
Connected to Oracle9i Enterprise Edition Release 9.2.0.1.0
Connected as hr_1
SQL>
SQL> SELECT DISTINCT C.Clcode,
2 Clname,
3 Clsurname,
4 Clidcheck,
5 Clresnamno,
6 Claddstreet,
7 Cltown,
8 Clpstcde,
9 Clcountry,
10 MAX(Trdat_time) maxdate
11 FROM Client_info c,
12 Dealing_records d
13 WHERE c.Clcode = d.Clcode
14 AND Trdat_time < SYSDATE - 356
15 AND NOT EXISTS (SELECT *
16 FROM dealing_records dr
17 WHERE dr.clcode = c.clcode
18 AND dr.trdat_time >= SYSDATE - 356)
19 GROUP BY C.Clcode,
20 Clname,
21 Clsurname,
22 Clidcheck,
23 Clresnamno,
24 Claddstreet,
25 Cltown,
26 Clpstcde,
27 Clcountry;
CLCODE CLNAME CLSURNAME CLIDCHECK CLRESNAMNO CLADDSTREET CLTOWN CLPSTCDE CLCOUNTRY MAXDATE
A003 Francis Jacobs 025387 59 Liverpool Lane Liverpool L25LK England 16/06/2007
SQL> Tip: to improve code readability please enclose it between {noformat}{noformat} tags (start and end tags are the same) :)
Regards,
Edited by: Walter Fernández on Dec 7, 2008 4:21 PM - Adding tip... -
Query: Encryption of Data using SSL
Hi All,
I need to encrypt the data which is been send from NWDS to XI. I have installed SAP cryptographic tool in the server.
I followed the below links, but there is no proper flow.
http://help.sap.com/saphelp_nw04/helpdata/en/8a/a7ca5cf214d246be16affcdef1ff03/frameset.htm Query on usage of MessageTransformBean
I have the following question on this scenario...
1. After installing the Cryptographic tool, Do I have to create Keystore?? If yes then how to do it(Using SAPGENPSE or Visual admin) ??
2. what are all the steps that needs to be followed after generating the keystore??
Pls give me a step by step solution for this.
Regards,
Rakesh.Rakesh
Can you go through the following links which might help you in resolving your issue:
Re: Query: How to use Cryptographic toolkit
Re: what is the difference between SAP cryptographic libraries
---Mohan -
Upgrade project : from SAP R/3 4.6C to ECC 6.0 by using SAP Data Services
Hi All,
My client is upgrading from SAP R/3 4.6C to ECC 6.0
We are planning to use SAP Data Services(Data Integrator) in the upgrade plan from SAP R/3 4.6C to ECC 6.0 for Data Migration.
we have no idea whether we can use this SAP Data Services(Data Integrator) in SAP upgrade data migration.
The bottom line is we have to make use this Data Services (Data Integrator) product in our upgrade plan for Data Migration.
Please tell us if anybody already used it such kind of scenario in a data migration project with Data Services(Data Integrator).
If we can use Data Service(Data Integrator) what are the pros and cons in using this Data Services(Data Integrator).
Thank You,
AshokMy opinion is you would want to utilize SAP tools to port the data - our SAP BASIS administrator is out this week but we can provide exact tool names when he returns. ELM (External List Management), IDOC are some of the tools.
You could use DS/DI to export, cleanse, deduplicate the records prior to importing with SAP tools if that is your end goal.
We also offer a data quality tool that extends DS/DI to cleanse/deduplicate name/address records as they are entered into the system. It also comes with batch tools to cleanse/dedup the entire systems name/address information. See Data Quality Management for SAP for further details. -
How to Retrive data Form Third party tool & up lode in SAP
HI Friends,
My client was implementing sap & parlay .NET for HR module .
my client requirement was what ever amount he payed for Employees that should also uplode in sap.
In SAP he is treating employee as Vendor .
so please guide me how can I Retrive data from third party tool & how can i uploaded in sap .
Regards,
ReddyHi,
Third Party Tool must be having some features of downloading data in a format like Excel.
In SAP Side, this File is going to be your input...Now you can try different options:
1) Identify the IDOC that serves your purpose and populate the idoc and fire an Inbound IDOC.
2) Run a BDC for your relevant Txn Code by uploading the Third Party generated Excel data into an internal Table.
3) Use an Standard BAPI to upload data into SAP.
4) If possible, Use an SAP Provided Direct Input program to pump data in SAP.
You need to give the expected format of Excel to the Third Party user generating the Excel for you. -
Error messge during data extract from flatfile to sap bw using DataServices
I am extracting data from flat file to SAP BW using Data Services tool. I am able to load all the data from flat file to SAP BW 3.x datasource successfully, but the request in in RED status with error message
Error Encountered at RFC Server Please Check Parameter Setting at BW System.
Can someone please help me how to resolve this issue?I would recommend to post your question here
Data Services and Data Quality
and close the current thread.
Regards,
Stratos
Maybe you are looking for
-
How do I reboot my Emac using the restore discs?
My emac has frozen on the finder with a window open and i need to reboot from cd. Having managed to get the restore disc in the drive (by holding the mouse while restarting), when i restart with the disc in the drive and holding 'C' it doesn't start
-
I have a OIM on a cluster with two nodes running on WLS. I have a VIP URL that I connect to OIM with. i am going to upload the OIM cert to AD for provisioning etc and get AD cert in OIM jdk keystore. What I need to know is what hostname shall I use i
-
I have DVD disk (made using iDVD) and I tried to duplicate it by the usual method of creating a disk image and then burning the image to a new DVD disk. The new disk won't play the DVD. It has the expected files (VOB, IFO, BUP) but the best I can do
-
Hi, How to find out the list of PO change during 1St to up to 31st i.e. list of po verson made during the month. Pl help me. Thanks,
-
Adobe digital editions 4 has stopped working
When I try to add a book from itunes library, I get the error message "adobe digital editions 4 has stopped working" I have uninstalled and re-installed and still get the error. Please advise how to correct this?