Problem in accessing mseg table using MSEG~M Index.
Hi Experts,
I am facing problem in accessing mseg table using MSEG~M Index. I used same sequence of fields and i tried with mandt field also. but it is not taking the Index and it is going for TImeout ABAP dump.
This are my codes used in different ways
1. SELECT mjahr
bwart
matnr
lifnr
dmbtr
kostl
aufnr
bukrs
FROM mseg CLIENT SPECIFIED INTO TABLE t_mseg2
WHERE mandt EQ sy-mandt AND
matnr NE SPACE AND
werks EQ p_werks AND
lgort NE '0000' AND
bwart IN (122,201,262) AND
sobkz NE '0'
%_HINTS ORACLE 'INDEX("MSEG" "MSEG~M")'.
2. SELECT mjahr
bwart
matnr
lifnr
dmbtr
kostl
aufnr
bukrs
FROM mseg INTO TABLE t_mseg2
WHERE matnr NE SPACE AND
werks EQ p_werks AND
lgort NE '0000' AND
bwart IN (122,201,262) AND
sobkz NE '0'
%_HINTS ORACLE 'INDEX("MSEG" "MSEG~M")'.
3. SELECT mjahr
bwart
matnr
lifnr
dmbtr
kostl
aufnr
bukrs
FROM mseg INTO TABLE t_mseg2
WHERE matnr NE SPACE AND
werks EQ p_werks AND
lgort NE '0000' AND
bwart IN (122,201,262) AND
sobkz NE '0'.
The above all code is not at all taking the index in Quality server .but in Development it is taking .In Quality server it is reading all datas without using the index and going Timeout ABAP dmup
Please, Suggest me some solutions.
Thanks in Advance.
Regards,
Nandha
Hi,
Without NE also not working out. i am facing same problem still.
SELECT bwart
matnr
lifnr
dmbtr
kostl
aufnr
FROM mseg CLIENT SPECIFIED INTO TABLE t_mseg
WHERE mandt EQ sy-mandt AND
werks EQ p_werks AND
bwart IN (122,201,262) AND
mjahr EQ p_year AND
bukrs EQ p_cc
%_HINTS ORACLE 'INDEX("MSEG" "MSEG~M")'.
Please,check and help me out from this issue.
Regards,
Nandha
Similar Messages
-
Update Mseg Table using MB_MIGO_BADI
Hi Experts
I had a requirement to add an additional tabstrip at the item level of MIGO transaction .
I have implmeented the same using MB_MIGO_BADI .
I have also added a field quantity on this tab.
The problem now is i'm not able to update this field in the MSEG table.
I have extended the MSEG table using append structures.
Regards,
Sunitha.
Edited by: sunitha j on Mar 1, 2009 2:34 PMcheck whehter the added field is getting the data that you enter in the trnasaction in debug mode and whether the move of the data is happening...
Regards,
Sravan. -
Problem for Accessing the Table BDCP..CDPOS..CDHDR..
Hi Guys,
i have the problem of accessing the BDCP table.it is working fine in development and testing server.it is taking more time in background in Production server..can anyone help me to optimize this code and please suggest me if i can change anyof the below logic..
Thanks a lot in advance.
LOOP AT t_cdobjid.
objectid-low = t_cdobjid-cdobjid.
objectid-sign = 'I'.
objectid-option = 'EQ' .
APPEND objectid.
CLEAR objectid.
count = count + 1.
IF count = 50.
CLEAR count.
SELECT * FROM bdcp APPENDING TABLE t_bdcp
WHERE cretime IN r_cretime AND
tabname = 'DMEAN' AND
fldname = 'KEY' AND
cdobjid IN objectid.
CLEAR : objectid.
REFRESH: objectid.
ENDIF.
ENDLOOP.
IF NOT objectid[] IS INITIAL.
SELECT * FROM bdcp APPENDING TABLE t_bdcp
WHERE cretime IN r_cretime AND
tabname = 'DMEAN' AND
fldname = 'KEY' AND
cdobjid IN objectid.
CLEAR : objectid.
REFRESH: objectid.
ENDIF.
IF NOT t_bdcp[] IS INITIAL.
t_bdcp_val[] = t_bdcp[].
DESCRIBE TABLE t_bdcp_val LINES l_lines.
l_max = 50.
l_mod = l_lines MOD l_max.
IF l_mod > 0.
l_loopcount = ( l_lines DIV l_max ) + 1.
ELSE .
l_loopcount = l_lines DIV l_max.
ENDIF.
DO l_loopcount TIMES.
CLEAR t_bdcp_emt.
REFRESH t_bdcp_emt.
IF sy-index = l_loopcount.
t_bdcp_emt[] = t_bdcp_val[].
ELSE.
APPEND LINES OF t_bdcp_val FROM 1 TO l_max TO t_bdcp_emt.
DELETE t_bdcp_val FROM 1 TO l_max.
ENDIF.
SELECT * FROM cdpos APPENDING TABLE t_cdpos_upc
FOR ALL ENTRIES IN t_bdcp_emt
WHERE
objectclas = 'MATERIAL' AND
objectid = t_bdcp_emt-cdobjid AND
changenr = t_bdcp_emt-cdchgno AND
tabname IN ('DMEAN', 'MARA' ) AND
fname IN ('KEY', 'EAN11' ) .
ENDDO.
CLEAR : l_lines ,
l_mod ,
l_loopcount.
IF sy-subrc EQ 0.
IF NOT t_cdpos_upc[] IS INITIAL.
t_cdpos_del[] = t_cdpos_upc[] .
DELETE t_cdpos_del WHERE tabname EQ 'MARA' .
SORT t_cdpos_del BY changenr .
LOOP AT t_cdpos_upc .
READ TABLE t_cdpos_del WITH KEY
changenr = t_cdpos_upc-changenr
BINARY SEARCH .
IF sy-subrc EQ 0 AND
t_cdpos_upc-chngind = 'U' .
DELETE t_cdpos_upc WHERE changenr = t_cdpos_upc-changenr
AND chngind = 'D' .
ENDIF.
t_upc_matnr-matnr = t_cdpos_upc-objectid .
APPEND t_upc_matnr .
ENDLOOP.
SORT t_upc_matnr BY matnr .
DELETE ADJACENT DUPLICATES FROM t_upc_matnr COMPARING matnr .
IF NOT t_cdpos_upc[] IS INITIAL.
t_cdpos_upc_val[] = t_cdpos_upc[].
DESCRIBE TABLE t_cdpos_upc_val LINES l_lines.
l_max = 50.
l_mod = l_lines MOD l_max.
IF l_mod > 0.
l_loopcount = ( l_lines DIV l_max ) + 1.
ELSE .
l_loopcount = l_lines DIV l_max.
ENDIF.
DO l_loopcount TIMES.
CLEAR t_cdpos_upc_emt.
REFRESH t_cdpos_upc_emt.
IF sy-index = l_loopcount.
t_cdpos_upc_emt[] = t_cdpos_upc_val[].
ELSE.
APPEND LINES OF t_cdpos_upc_val FROM 1 TO l_max TO
t_cdpos_upc_emt.
DELETE t_cdpos_upc_val FROM 1 TO l_max.
ENDIF.
SELECT * FROM cdhdr APPENDING TABLE it_cdhdr_upc
FOR ALL ENTRIES IN t_cdpos_upc_emt
WHERE objectclas EQ 'MATERIAL'
AND objectid = t_cdpos_upc_emt-objectid
AND changenr = t_cdpos_upc_emt-changenr.
ENDDO.
ENDIF.
PrabhuUse the PACKAGE SIZE oprion of the SELECT statement:
LOOP AT t_cdobjid.
objectid-low = t_cdobjid-cdobjid.
objectid-sign = 'I'.
objectid-option = 'EQ' .
APPEND objectid.
CLEAR objectid.
ENDLOOP.
SELECT * FROM bdcp APPENDING TABLE t_bdcp
PACKAGE SIZE 5000
WHERE cretime IN r_cretim AND
tabname = 'DMEAN' AND
fldname = 'KEY' AND
cdobjid IN objectid.
ENDSELECT.
IF NOT objectid[] IS INITIAL. -
Access ABAP tables using NWDS Java Code
All,
I am planning to write a program to autmatically update is_url entries in sxmb_admin using a Java program.
Is there a way we can access the ABAP tables using standalone Java Code? would it something like dblookup that we use in the mappings?
Your Thoughts....
Thanks.Hi Vicky - Interesting..Seems like you are trying to automate every single thing
However you can make use of Jco to connect to ABAP tables..
Check the below thread..
Help on accessing tables of SAP from the Java Application
I assume the table name is "SXMSCONFVLV" which you might have to update but not sure.. -
I'm new to VS. I have run the following code. It does not produce any error, and it does not add or update data to my Access database table.
dbUpdate("UPDATE prgSettings SET varValue='test' WHERE varSetting='test'")
Function dbUpdate(ByVal _SQLupdate As String) As String
Dim OleConn As New OleDbConnection(My.Settings.DatabaseConnectionString.ToString)
Dim oleComm As OleDbCommand
Dim returnValue As Object
Dim sqlstring As String = _SQLupdate.ToString
Try
OleConn.Open()
MsgBox(OleConn.State.ToString)
oleComm = New OleDbCommand(sqlstring, OleConn)
returnValue = oleComm.ExecuteNonQuery()
Catch ex As Exception
' Error occurred while trying to execute reader
' send error message to console (change below line to customize error handling)
Console.WriteLine(ex.Message)
Return 0
End Try
MsgBox(returnValue)
Return returnValue
End Function
Any suggestions will be appreciated.
Thanks.You code looks pretty good, at a quick glance. Maybe you can simplify things a bit.
For Insert, please see these samples.
http://www.java2s.com/Code/CSharp/Database-ADO.net/Insert.htm
For Update, please see these samples.
http://www.java2s.com/Code/CSharp/Database-ADO.net/Update.htm
Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.
Best to keep samples here to VB.NET
Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. -
Problem in accessing the table
Hi,
My database in 10g (10.2.0.4), I have created one user TEST and given insert,update,delete on ABC table to TEST from XYZ user.
Also,
Grant select any table to test;
but when i connect with test and accessing tables of xyz it is showing error 'table or view does not exist' and i select the table with xyz.abc then i can select the table of xyz.
I do not want to create any synonyms for this table. Can you please help while accessing the table from TEST user without username.tablename
AnandAnand Vyas wrote:
Actually i have given the example of one table but i have given grant on many table to TEST user.
Also end user uses these tables in application and he can not agree to set alter session in his application.
Is there any way to access the tables of XYZ which i have given the grant to TEST without username.tablename means xyz.abc
Thanks in advance.
AnandGiven your other requirements/restrictions, your only option is to create a synonym. Why do you not want to do that? If you have many of them, you can "write a sql to write a sql"
spool doit.sql
select 'create or replace public synonym ' ||
table_name ||
' for xyz.' ||
table_name ||
from dba_tables
where owner = 'XYZ';
spool off -
Problem with access JSF applet using javascript
Can someone help me!
I'm using a applet in jsf page, and i'm trying to access this applet using a javascript.
Here is the applet code
<jsp:plugin code="DoAction.class" codebase="." height="400" hspace="10" jreversion="1.5" type="applet" vspace="50" width="100" name="myApp"/>
Here is the javascript
function printReturn()
var a = document.myApp.returnString();
alert(a);
"returnString" is the method in applet which simply return a string
But it doesn't work, it works well when i'm using this applet in JSF
<applet code="DoAction.class" width="100" height="50" name="myApp" ></applet>
Unfortunately it's depricated!
Please tell me what is the solution....Thank You for replying.
I'm trying to call applet method using JavaScript.
It works when i'm using below apllet tag.
<applet code="DoAction.class" width="100" height="50" name="myApp" ></applet>
But it's deprecated
It doesn't work for below applet tag
<jsp:plugin code="DoAction.class" codebase="." height="400" hspace="10" jreversion="1.5" type="applet" vspace="50" width="100" name="myApp"/>
This is my javascript
<script type="text/javascript">
function setSearch()
var a = document.myApp.returnString();
alert(a);
</script> -
How i can access system tables to know the indexes are properly done
Hello Friends,
I have created a table with partitions and a iindex on some columns ..
Using system tables I want to find out whether the indexes are also having partitions implemented .
Please let me know what might be the query using system tables.
using the following query I can findout what all partitions are their in a particular table.
SELECT FROM ALL_TAB_PARTITIONS ORDER BY TABLE_NAME, PARTITION_NAME;*
I want the same on indexes ..
CREATE TABLE X_FA_REV_MNTH_AGG
X_FA_REV_MNTH_AGG_RK NUMBER(10) NOT NULL,
X_AS_OF_DT DATE NOT NULL,
FINANCIAL_ADVISOR_RK NUMBER(10) NOT NULL,
FINANCIAL_ADVISOR_ID VARCHAR2(6 BYTE),
X_FA_UNIV_PRODUCER_ID VARCHAR2(6 BYTE),
X_REVENUE_TYPE_CD VARCHAR2(6 BYTE),
X_MNTH_REV_AMT NUMBER(18,5),
PROCESSED_DTTM DATE
TABLESPACE KAW_DATA
PCTUSED 0
PCTFREE 10
INITRANS 1
MAXTRANS 255
NOLOGGING
PARTITION BY RANGE (X_AS_OF_DT)
PARTITION P200712 VALUES LESS THAN (TO_DATE(' 2008-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
NOLOGGING
NOCOMPRESS
TABLESPACE KAW_DATA
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
PARTITION P200801 VALUES LESS THAN (TO_DATE(' 2008-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
NOLOGGING
NOCOMPRESS
TABLESPACE KAW_DATA
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
PARTITION P200802 VALUES LESS THAN (TO_DATE(' 2008-03-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
NOLOGGING
NOCOMPRESS
TABLESPACE KAW_DATA
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
PARTITION P200803 VALUES LESS THAN (TO_DATE(' 2008-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
NOLOGGING
NOCOMPRESS
TABLESPACE KAW_DATA
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
PARTITION P200804 VALUES LESS THAN (TO_DATE(' 2008-05-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
NOLOGGING
NOCOMPRESS
TABLESPACE KAW_DATA
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
PARTITION P200805 VALUES LESS THAN (TO_DATE(' 2008-06-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
NOLOGGING
NOCOMPRESS
TABLESPACE KAW_DATA
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
PARTITION P200806 VALUES LESS THAN (TO_DATE(' 2008-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
NOLOGGING
NOCOMPRESS
TABLESPACE KAW_DATA
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
PARTITION P200807 VALUES LESS THAN (TO_DATE(' 2008-08-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
NOLOGGING
NOCOMPRESS
TABLESPACE KAW_DATA
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
PARTITION P200808 VALUES LESS THAN (TO_DATE(' 2008-09-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
NOLOGGING
NOCOMPRESS
TABLESPACE KAW_DATA
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
PARTITION P200809 VALUES LESS THAN (TO_DATE(' 2008-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
NOLOGGING
NOCOMPRESS
TABLESPACE KAW_DATA
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
PARTITION P200810 VALUES LESS THAN (TO_DATE(' 2008-11-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
NOLOGGING
NOCOMPRESS
TABLESPACE KAW_DATA
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
PARTITION P200811 VALUES LESS THAN (TO_DATE(' 2008-12-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
NOLOGGING
NOCOMPRESS
TABLESPACE KAW_DATA
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
PARTITION P200812 VALUES LESS THAN (TO_DATE(' 2009-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
NOLOGGING
NOCOMPRESS
TABLESPACE KAW_DATA
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
NOCOMPRESS
NOCACHE
NOPARALLEL
MONITORING;
CREATE UNIQUE INDEX XPKX_FA_REV_MNTH_AGG ON X_FA_REV_MNTH_AGG
(X_AS_OF_DT, X_FA_REV_MNTH_AGG_RK, FINANCIAL_ADVISOR_RK)
INITRANS 2
MAXTRANS 255
NOLOGGING
LOCAL (
PARTITION P200712
NOLOGGING
NOCOMPRESS
TABLESPACE KAW_DATA
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
PARTITION P200801
NOLOGGING
NOCOMPRESS
TABLESPACE KAW_DATA
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
PARTITION P200802
NOLOGGING
NOCOMPRESS
TABLESPACE KAW_DATA
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
PARTITION P200803
NOLOGGING
NOCOMPRESS
TABLESPACE KAW_DATA
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
PARTITION P200804
NOLOGGING
NOCOMPRESS
TABLESPACE KAW_DATA
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
PARTITION P200805
NOLOGGING
NOCOMPRESS
TABLESPACE KAW_DATA
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
PARTITION P200806
NOLOGGING
NOCOMPRESS
TABLESPACE KAW_DATA
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
PARTITION P200807
NOLOGGING
NOCOMPRESS
TABLESPACE KAW_DATA
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
PARTITION P200808
NOLOGGING
NOCOMPRESS
TABLESPACE KAW_DATA
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
PARTITION P200809
NOLOGGING
NOCOMPRESS
TABLESPACE KAW_DATA
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
PARTITION P200810
NOLOGGING
NOCOMPRESS
TABLESPACE KAW_DATA
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
PARTITION P200811
NOLOGGING
NOCOMPRESS
TABLESPACE KAW_DATA
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
PARTITION P200812
NOLOGGING
NOCOMPRESS
TABLESPACE KAW_DATA
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
PARTITION PMAX
NOLOGGING
NOCOMPRESS
TABLESPACE KAW_DATA
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
)NOPARALLEL;Try ALL_IND_PARTITIONS :)
You should give the Reference Guide a read at http://tahiti.oracle.com for your Oracle version. It gives information for all views that you may or may not be aware of. -
Need to update custom fields in MSEG table using "BAPI_GOODSMVT_CREATE"
Hi All,
There is a requirement to update custom fields in table MSEG which are part of append structure. There is a option to update the custom fields using the one of the tables parameters "EXTENSIONIN". Anyone please advice how can I update the custom field thru EXTENSIONIN.
Thanks in advance.
cheers,
Vijaysee the help
http://help.sap.com/saphelp_nw04/helpdata/en/c3/4099948b8911d396b70004ac96334b/frameset.htm
Regards
Kiran Sure -
I got problems in creating a table using java
ok here's what i want to happen, i have a table named tblField that has 3 columns.
These 3 columns are:
1. field_ID
2. field_Desc
3. field_Fruit
The table tblField returns 7 rows in which the values of field_Fruit are:
1. apple
2. banana
3. orange
4. watermelon
5. pineapple
6. mango
7. lemon
what i want to do is I want to create a new table named tblNewTable that will get the 7 values of field_Fruit and be the columns of the new table tblNewTable.
So the result would be: I have this new table named tblNewTable and the column names are:
1. apple
2. banana
3. orange
4. watermelon
5. pineapple
6. mango
7. lemon
btw i already know how to create a table with hardcoded values.
An example of create statement is shown below:
CREATE TABLE [dbo].[tblNewTable] ({[Column Name] [char] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL)For the problem posted above, the first thing i should do is to get all the values of field_Fruit first and put them all in a vector. After that, i should use the create statement using the vector to return all the values of field_Fruit. I tried to do the code below but it doesnt wrk:
int x = 0;
CREATE TABLE [dbo].[tblNewTable] (while(x < vFieldFruitVector.size()){ {[Column Name] [char] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL x = x + 1;})vFieldFruitVector is the vector/values of field_Fruit.
anyone who can help me solve my problem? thanks in advance! :)Unless you are using some special tag library or something, SQL is not, as far as I've ever seen, going to handle while loops within the statements. You want to create the table, then you have to create the CREATE statement string
String c = "CREATE TABLE [dbo].[tblNewTable] (";
for(int x = 0; x < vFieldFruitVector.size(); x++) {
c += vFieldFruitVector.get(x) + " char 50 COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL";
c += ")";
int res = stmt.executeUpdate(c); -
Access ABAP Table using Java (NWDS/JCO)
All,
I am trying to setup a jco connection from java program through NWDS to ECC abap table.
However I am getting the following error in NWDS:
Exception in thread "main" java.lang.ExceptionInInitializerError: JCO.classInitialize(): Could not load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC'
JCO.nativeInit(): Could not initialize dynamic link library sapjcorfc [C:\Program Files\Java\jdk1.6.0_45\bin\sapjcorfc.dll: Access is denied]. java.library.path [C:\Program Files\Java\jdk1.6.0_45\bin;.]
and a parity error on my system:
"Parity blocked an attempt by javaw.exe to run sapjcorfc.dll because the file is not approved. If you require access to this file, please contact your system administrator. Scroll down for diagnostic data."
Here is the Java code...per the SAP website:
package com.sap.pi.updateAbapSxmbAdminParams;
import com.sap.mw.jco.*;
public class ReadPiAbapTables {
private static JCO.Client theConnection;
private static IRepository theRepository;
public static void main(String[] args) {
createConnection();
retrieveRepository();
try {
JCO.Function function = getFunction("RFC_READ_TABLE");
JCO.ParameterList listParams = function.getImportParameterList();
listParams.setValue("BSAUTHORS", "QUERY_TABLE");
theConnection.execute(function);
JCO.Table tableList = function.getTableParameterList().getTable("SXMSCONFVLV");
if (tableList.getNumRows() > 0) {
do {
for (JCO.FieldIterator fI = tableList.fields();
fI.hasMoreElements();)
JCO.Field tabField = fI.nextField();
System.out.println(tabField.getName()
+ ":t" +
tabField.getString());
System.out.println("n");
while (tableList.nextRow() == true);
catch (Exception ex) {
ex.printStackTrace();
private static void createConnection() {
try {
theConnection = JCO.createClient("aaa", "aaa", "aaa", "aa", "aa", "aa");
theConnection.connect();
catch (Exception ex) {
System.out.println("Failed to connect to SAP system");
private static void retrieveRepository() {
try {
theRepository = new JCO.Repository("saprep", theConnection);
catch (Exception ex)
System.out.println("failed to retrieve repository");
public static JCO.Function getFunction(String name) {
try {
return theRepository.getFunctionTemplate(name.toUpperCase()).getFunction();
catch (Exception ex) {
ex.printStackTrace();
return null;Hi Vicky,
You need authorization to the S_TABU_DIS object, talk with the ABAP basis team about this to find the more restrictive role.
It's not a good idea to use the RFC_READ_TABLE, for the wide permissions needed. You could think to develop a Z RFC for this. You can check pros/cons in this document: http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a83ec690-0201-0010-14ac-bd1d75e24a7d?overridelayout=t…
Regards. -
Problem in Accessing Admin services using users other than administrator
Hi,
I am working on SAP MII 12.1. I have a reuirement to get list of users for a particular role from the system for display in a dropdown. I am using the URL :
/XMII/Illuminator?Service=admin&mode=UserList&Group=[Param.1]&Content-Type=text/xml
But I am getting error while logging through a different user (user who does not have Administrator role).
I tried to call this url as aXML query, through transaction and also through web service, but it's showing following error:
You do not have permission to access service Admin
Please let me know how can I use this url for any user who does not have administrator role.
Thanks,
AnubhutiHi,
The problem got resolved by giving the role privileges to access the Admin services through UME. Earlier I couldn't find the way to provide this access in 12.1.
Thanks,
Anubhuti -
Problem in creating XMLTYPE table using schema validation
Hi All,
While executing the follwing script there is an error :
Script : " CREATE TABLE FINAPI_ONLINE_SEC_LOGIN_TMP1 OF
SYS.XMLTYPE XMLSCHEMA
"http://www.finnone.com/xsd/TransactionDataRequest.xsd"
ELEMENT "transactiondatarequest"
Error is :
ERROR at line 1:
"ORA-31000: Resource 'http://www.finnone.com/xsd/BaseSchema.xsd' is not an XDB schema document"
why this problem is coming though transactiondatarequest.xsd is reguisterd
Regards,
Vikas KumarCheck with XMLSpy, JDeveloper or for instance use http://tools.decisionsoft.com/schemaValidate/
Some pointers to start:
SQL> conn marco/marco
Connected.
SQL> select * from session_roles;
-- Quick and Dirty: grant xdbadmin, dba to marco
ROLE
XDB_WEBSERVICES
XDB_WEBSERVICES_WITH_PUBLIC
XDB_WEBSERVICES_OVER_HTTP
DBA
SELECT_CATALOG_ROLE
HS_ADMIN_ROLE
EXECUTE_CATALOG_ROLE
DELETE_CATALOG_ROLE
EXP_FULL_DATABASE
IMP_FULL_DATABASE
DATAPUMP_EXP_FULL_DATABASE
ROLE
DATAPUMP_IMP_FULL_DATABASE
GATHER_SYSTEM_STATISTICS
SCHEDULER_ADMIN
WM_ADMIN_ROLE
JAVA_ADMIN
JAVA_DEPLOY
XDBADMIN
XDB_SET_INVOKER
OLAP_XS_ADMIN
OLAP_DBA
21 rows selected.
SQL> set pages 5000
SQL> set long 1000000000
SQL> set trimspool on
SQL> select * from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
PL/SQL Release 11.1.0.6.0 - Production
CORE 11.1.0.6.0 Production
TNS for 32-bit Windows: Version 11.1.0.6.0 - Production
NLSRTL Version 11.1.0.6.0 - Production
SQL> desc dba_xml_schemas
Name Null? Type
OWNER VARCHAR2(30)
SCHEMA_URL VARCHAR2(700)
LOCAL VARCHAR2(3)
SCHEMA SYS.XMLTYPE
INT_OBJNAME VARCHAR2(4000)
QUAL_SCHEMA_URL VARCHAR2(2839)
HIER_TYPE VARCHAR2(11)
BINARY VARCHAR2(3)
SCHEMA_ID RAW(16)
HIDDEN VARCHAR2(3)
SQL> select OWNER, SCHEMA_URL, BINARY
2 from dba_xml_schemas
3
SQL> col SCHEMA_URL for a80
SQL> set lines 200
SQL> select OWNER, SCHEMA_URL, BINARY
2 from dba_xml_schemas
3 ;
OWNER SCHEMA_URL BIN
XDB http://xmlns.oracle.com/xdb/XDBStandard.xsd NO
XDB http://xmlns.oracle.com/xdb/log/xdblog.xsd NO
XDB http://xmlns.oracle.com/xdb/log/ftplog.xsd NO
XDB http://xmlns.oracle.com/xdb/log/httplog.xsd NO
XDB http://www.w3.org/2001/xml.xsd NO
XDB http://xmlns.oracle.com/xdb/xmltr.xsd NO
XDB http://xmlns.oracle.com/xdb/XDBFolderListing.xsd NO
XDB http://www.w3.org/1999/xlink.xsd NO
XDB http://www.w3.org/1999/csx.xlink.xsd YES
XDB http://www.w3.org/2001/XInclude.xsd NO
XDB http://www.w3.org/2001/csx.XInclude.xsd YES
XDB http://xmlns.oracle.com/xdb/stats.xsd NO
XDB http://xmlns.oracle.com/xdb/xdbconfig.xsd YES
SYS kuscomm.xsd NO
SYS kusindxt.xsd NO
SYS kusindex.xsd NO
SYS kuscnstr.xsd NO
SYS kusrlsct.xsd NO
SYS kusrlsc.xsd NO
XDB http://xmlns.oracle.com/xdb/XDBSchema.xsd NO
XDB http://xmlns.oracle.com/xdb/XDBResource.xsd NO
XDB http://www.w3.org/2001/csx.xml.xsd YES
XDB http://xmlns.oracle.com/xdb/csx.xmltr.xsd YES
XDB http://xmlns.oracle.com/xdb/acl.xsd YES
XDB http://xmlns.oracle.com/xdb/dav.xsd YES
XDB http://xmlns.oracle.com/xdb/XDBResConfig.xsd YES
SYS kusrlsgt.xsd NO
SYS kustrigt.xsd NO
SYS kustrig.xsd NO
SYS kusviewt.xsd NO
SYS kusview.xsd NO
SYS kususert.xsd NO
SYS kususer.xsd NO
SYS http://xmlns.oracle.com/streams/schemas/lcr/streamslcr.xsd NO
SYS kusrlsg.xsd NO
SYS kusrlspt.xsd NO
SYS kusrlsp.xsd NO
SYS kusrolet.xsd NO
SYS kusrole.xsd NO
SYS kusseqt.xsd NO
SYS kusseq.xsd NO
SYS kussynt.xsd NO
SYS kussyn.xsd NO
SYS kustblst.xsd NO
SYS kustbls.xsd NO
SYS kustablt.xsd NO
SYS kustable.xsd NO
SYS kusclust.xsd NO
SYS kusclus.xsd NO
SYS kusctxt.xsd NO
SYS kusctx.xsd NO
SYS kusdblkt.xsd NO
SYS kusdblk.xsd NO
SYS kusfgat.xsd NO
SYS kusfga.xsd NO
SYS kusmvt.xsd NO
SYS kusmv.xsd NO
SYS kusmvlt.xsd NO
SYS kusmvl.xsd NO
SYS kusquet.xsd NO
SYS kusque.xsd NO
SYS kusquetbt.xsd NO
SYS kusquetb.xsd NO
ORDSYS http://xmlns.oracle.com/ord/meta/exif NO
ORDSYS http://xmlns.oracle.com/ord/dicom/rpdatatype_1_0 NO
ORDSYS http://xmlns.oracle.com/ord/meta/ordimage NO
ORDSYS http://xmlns.oracle.com/ord/dicom/datatype_1_0 NO
ORDSYS http://xmlns.oracle.com/ord/dicom/mddatatype_1_0 NO
XDB http://xmlns.oracle.com/xs/dataSecurity.xsd YES
XDB http://xmlns.oracle.com/xs/aclids.xsd NO
XDB http://xmlns.oracle.com/xs/principal.xsd YES
XDB http://xmlns.oracle.com/xs/roleset.xsd NO
XDB http://xmlns.oracle.com/xs/securityclass.xsd YES
ORDSYS http://xmlns.oracle.com/ord/meta/dicomImage NO
EXFSYS http://xmlns.oracle.com/rlmgr/rclsprop.xsd NO
EXFSYS http://xmlns.oracle.com/rlmgr/rulecond.xsd NO
ORDSYS http://xmlns.oracle.com/ord/meta/iptc NO
ORDSYS http://xmlns.oracle.com/ord/meta/xmp NO
ORDSYS http://xmlns.oracle.com/ord/dicom/anonymity_1_0 NO
ORDSYS http://xmlns.oracle.com/ord/dicom/constraint_1_0 NO
ORDSYS http://xmlns.oracle.com/ord/dicom/metadata_1_0 NO
ORDSYS http://xmlns.oracle.com/ord/dicom/mapping_1_0 NO
ORDSYS http://xmlns.oracle.com/ord/dicom/preference_1_0 NO
ORDSYS http://xmlns.oracle.com/ord/dicom/privateDictionary_1_0 NO
ORDSYS http://xmlns.oracle.com/ord/dicom/standardDictionary_1_0 NO
ORDSYS http://xmlns.oracle.com/ord/dicom/orddicom_1_0 NO
ORDSYS http://xmlns.oracle.com/ord/dicom/UIDdefinition_1_0 NO
MDSYS http://www.w3.org/1999/xlink/xlinks.xsd NO
MDSYS http://www.opengis.net/gml/geometry.xsd NO
MDSYS http://www.opengis.net/gml/feature.xsd NO
MDSYS http://xmlns.oracle.com/spatial/georaster/georaster.xsd NO
91 rows selected.
SQL> set lines 80
SQL> desc path_view
Name Null? Type
PATH VARCHAR2(1024)
RES SYS.XMLTYPE(XMLSchema "http:
//xmlns.oracle.com/xdb/XDBRe
source.xsd" Element "Resourc
e")
LINK SYS.XMLTYPE
RESID RAW(16)
SQL> desc resource_view
Name Null? Type
RES SYS.XMLTYPE(XMLSchema "http:
//xmlns.oracle.com/xdb/XDBRe
source.xsd" Element "Resourc
e")
ANY_PATH VARCHAR2(4000)
RESID RAW(16)
SQL> select *
2 from path_view
3 where rownum <= 1;
PATH
RES
LINK
RESID
/OLAP_XDS
<Resource xmlns="http://xmlns.oracle.com/xdb/XDBResource.xsd">
<CreationDate>2007-10-29T14:59:01.968000</CreationDate>
<ModificationDate>2007-10-29T14:59:02.281000</ModificationDate>
<DisplayName>OLAP_XDS</DisplayName>
<Language>en-US</Language>
<CharacterSet>UTF-8</CharacterSet>
<ContentType>application/octet-stream</ContentType>
<RefCount>1</RefCount>
</Resource>
<LINK>
<ParentName>/</ParentName>
<ChildName>OLAP_XDS</ChildName>
<Name>OLAP_XDS</Name>
<Flags>AAAABA==
</Flags>
<ParentOid>C4LJcGdKQ3+9zJ4w9efpxQ==
</ParentOid>
<ChildOid>8yNpXjvxQJeoruzx3GXRlQ==
</ChildOid>
<LinkType>Hard</LinkType>
</LINK>
F323695E3BF14097A8AEECF1DC65D195
SQL> select *
2 from resource_view
3 where rownum <= 1;
RES
ANY_PATH
RESID
<Resource xmlns="http://xmlns.oracle.com/xdb/XDBResource.xsd">
<CreationDate>2007-10-29T14:59:01.968000</CreationDate>
<ModificationDate>2007-10-29T14:59:02.281000</ModificationDate>
<DisplayName>OLAP_XDS</DisplayName>
<Language>en-US</Language>
<CharacterSet>UTF-8</CharacterSet>
<ContentType>application/octet-stream</ContentType>
<RefCount>1</RefCount>
</Resource>
/OLAP_XDS
F323695E3BF14097A8AEECF1DC65D195
SQL> select any_path from resource_view
2 where any_path like '%xsd%';
ANY_PATH
/public/root.xsd
/sys/schemas/PUBLIC/www.opengis.net/gml/feature.xsd
/sys/schemas/PUBLIC/www.opengis.net/gml/geometry.xsd
SQL> select xdbURIType ('/public/root.xsd').getClob() from dual;
XDBURITYPE('/PUBLIC/ROOT.XSD').GETCLOB()
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xdb="http://xmlns.oracle.com/xdb"
elementFormDefault="qualified" attributeFormDefault="unqualified"
xdb:storeVarrayAsTable="true">
<xs:element name="ROOT" xdb:defaultTable="ROOT_TABLE" xdb:maintainDOM="false">
<xs:annotation>
<xs:documentation>Example XML Schema</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="ID" type="xs:integer" xdb:SQLName="ID"/>
<xs:element ref="INFO"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="INFO" xdb:defaultTable="INFO_TABLE" xdb:SQLName="INFO_TYPE">
<xs:complexType>
<xs:sequence>
<xs:element name="INFO_ID" type="xs:integer" xdb:SQLName="TYPE_INFO_ID"/>
<xs:element name="INFO_CONTENT" xdb:SQLType="CLOB"
xdb:SQLName="TYPE_INFO_CONTENT" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
SQL> select s.xmldata.schema_owner, s.xmldata.schema_url, s.xmldata.TARGET_NAMESPACE
2 from xdb.xdb$schema s
3 where rownum < 5;
XMLDATA.SCHEMA_OWNER
XMLDATA.SCHEMA_URL
XMLDATA.TARGET_NAMESPACE
XDB
http://xmlns.oracle.com/xdb/XDBStandard.xsd
http://xmlns.oracle.com/xdb/XDBStandard
XDB
http://xmlns.oracle.com/xdb/log/xdblog.xsd
http://xmlns.oracle.com/xdb/log
XDB
http://xmlns.oracle.com/xdb/log/ftplog.xsd
http://xmlns.oracle.com/xdb/log
XDB
http://xmlns.oracle.com/xdb/log/httplog.xsd
http://xmlns.oracle.com/xdb/log
4 rows selected.
-- Author : Mark Drake
-- Purpose : Compiling XML Schema
-- Altered : Marco Gralike
-- Date : 09/02/2007
-- Alteration : Different, simplified error handling
-- URL : http://www.liberidu.com/blog/?p=57
SET echo ON
-- spool compileSchemas.log
-- connect &USERNAME/&PASSWORD
-- set serveroutput on
declare
cursor getSchemaList IS
SELECT schema_url
FROM user_xml_schemas;
begin
FOR schema IN getSchemaList
loop
begin
dbms_output.put_line('Processing : ' || schema.schema_url);
dbms_xmlschema.compileSchema(schema.schema_url);
dbms_output.put_line('Compiled');
exception when others then
dbms_output.put_line('Failed ('||SQLCODE||'): ' ||SQLERRM);
end;
end loop;
end;
-- --------------------------------------------------------etc, etc, etc.
By the way IMHO there are no stupid questions, only stupid answer, and the learning curve on XMLDB is steep, so if I sometimes look back on my answers...
Message was edited by:
Marco Gralike -
Accessing Oracle Tables using ABAP
Dear All,
We are using SAP ECC 6.0, we need to access some of the tables in oracle system using ABAP program. Is there any wany to access the oracle tables.
Please suggest and do the needful.
Thanks in advance,
ChandraDECLARE YOUR ORACLE INSTANCE INTO TABLE DBCON
AND USE THE FOLLOWING FM TO ACCESS YOUR DATA
RSDBC_DB_DATA_GET
RSDBC_DB_DSOURCE_CHECK
RSDBC_DB_DSOURCE_CONVERT
RSDBC_DB_DSOURCE_GENERATE
RSDBC_DB_FIELDS_CHECKS
RSDBC_DB_FIELDS_GET
RSDBC_DB_SCHEMAS_GET
RSDBC_DB_TABLES_GET
RSDL_CONNECTION_CHECK
RSDL_DB_GET_ALL_TABLES
RSDL_DB_GET_DATA
RSDL_DB_GET_DATA_BWS
RSDL_DB_RFC_GET
RSDL_TRACEFILE_DISPLAY
RSDS_ACCESS_DB_DATA_UPLOAD
RSDS_ACCESS_DB_DATA_UPLOAD_2
RSDS_ACCESS_DB_FIELDS_GET
RSDS_ACCESS_DB_TABLES_GET
OR WRITE YOUR OWN CODE USING THIS OBJECTS
cl_sql_connection
cl_sql_statement
cl_sql_result_set -
Update MS Access Database table using ABAP
Hi All,
I have a requirement wherein I have to update the existing records in MS Access database using ABAP Code. Can someone provide sample code through which I can achieve this. Thanks!!!
Regards,
Nitish Reddy.
Edited by: Nitish Cherukupally on Mar 30, 2009 4:02 PMhi,
please refer to this link
http://learningabap.wordpress.com/2007/04/11/get-data-from-ms-access-into-internal-table/
http://abapcode.blogspot.com/2007/05/get-data-from-ms-access-into-internal.html
http://abapcode.blogspot.com/2007/06/sample-program-to-upload-excel-document.html
MS Access Database using ABAP Program
thanks
Maybe you are looking for
-
i would like to understand the relationship between scratch disks and RAM usage in Photoshop. While i was working on a fairly big psb file (2gb), photoshop kept prompting that I was out of memory, but in fact the utilization was only 75% (i had 16gbs
-
HT1296 How can I save my stuff on my ipad before factory resetting it?
Apple said that I need to factory reset my ipad but how can I save my stuff because I payed for like 5 apps and and 29 songs. I don't want to delete them if I don't have to. Thanks
-
Hi All I need help creating a report with the first column as a select list and the other columns (4 of them) will auto populate based on the selected item. This is a report region on form that will update a table when submitted. My Table: Cost Cente
-
IDOC Error:Two accounts were transferred but not BSEG-HKONT
Hi experts I got a porblem while posting IDOCs using FB01. Error: <b>Two accounts were transferred but not BSEG-HKONT</b> On diagnosis i found the reason stated for that error msg is :<i>This error also occurs if more than 1000 line items are transfe
-
Hi How can i use the fields-symbols in Abap Object (class)?: The program <b>SAPLMIGO</b> have a table <b>oref_detail->t_goserial</b>. I would get this table in my program (not object) by using field-symbol What can i do? it's urgent thanks a lot