Deployment error:Table, view or sequence reference to ABC is not allowed
Hi all,
I have created a mapping in OWB where a table ABC gets loaded from its stage table S_ABC. The mapping validates fine, code generation is fine but when I try to deploy the mapping it gives me a deployment error saying PLS:00357 Table, View or sequence reference ABC is not allowed.
I used the same logic to one of my other mappings and it gets executed without any problem. If you guys could tell me what is going wrong in this mapping, that would be very helpful.
Thanks.
Priya
if you are using a view or sequence in the mapping or referencing any other object then the owb user needs to have grants to access those objects otherwise the deployment will fail. Please check the object grants.
Similar Messages
-
PLS-00357: Table,View Or Sequence reference 'A' not allowed in this context
Hello
I am accepting input values from users through java web page. To accept the values I am using the following code:
import java.sql.*;
import javax.sql.DataSource;
import javax.naming.*;
public class spsrch
public void spsrch()
public String espsrch(String p, String d, String a)
String s1= "";
String strColor="#C0C0C0";
try
InitialContext ctx = new InitialContext();
DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/Oracle9i");
Connection Con = ds.getConnection();
Statement stmt = Con.createStatement();
CallableStatement proc1stmt1=Con.prepareCall ("{call Allsch("+p+","+d+")}");
// ResultSet rs = proc1stmt1.execute();
proc1stmt1.executeUpdate();
Con.close();
catch(Exception e)
System.out.println("Flag Raised"+e);
return s1;
I am calling the procedure 'Allsch' to apply some logic before inserting data into a SQL table.
The 'Allsch' procedure is :
create or replace procedure tmpsch(pno varchar2,pdes varchar2) as
mpartnum varchar2(30);
mpn varchar2(30);
mdes varchar2(150);
cursor c1 is select partnum,description,aircraft_type from master_catalog where description like ltrim(rtrim(mdes))||'%' AND partnum like mpn||'%';
cursor c2 is select partnum from ipc_master where partnum=mpartnum;
cursor c3 is select partnum from fedlog_data where partnum=mpartnum;
cursor c4 is select partnum from superparts where partnum=mpartnum;
cursor c5 is select part_no from supplier_catalog where part_no=mpartnum;
mpno1 varchar2(30);
mpno2 varchar2(30);
mpno3 varchar2(30);
mpno4 varchar2(30);
mpno5 varchar2(30);
mdescription varchar2(150);
maircraft_type varchar2(15);
mstat varchar2(1);
mstat1 varchar2(30);
mstat2 varchar2(30);
mstat3 varchar2(30);
mstat4 varchar2(30);
begin
mstat:='N';
mpn:=pno;
mdes:=pdes;
for i in c1 loop
mstat:='N';
mstat1:='N';
mstat2:='N';
mstat3:='N';
mstat4:='N';
mpno1:=i.partnum;
mpartnum:=i.partnum;
mdescription:=i.description;
maircraft_type:=i.aircraft_type;
for j in c2 loop
mpno2:=j.partnum;
end loop;
for k in c3 loop
mpno3:=k.partnum;
end loop;
for l in c4 loop
mpno4:=l.partnum;
end loop;
for m in c5 loop
mpno5:=m.part_no;
end loop;
if mpno2=mpartnum then
mstat1:=mpno2;
end if;
if mpno3=mpartnum then
mstat2:=mpno3;
end if;
if mpno4=mpartnum then
mstat3:=mpno4;
end if;
if mpno5=mpartnum then
mstat4:=mpno5;
end if;
if mpno1=mpartnum then
mstat:='Y';
insert into tmpcat values(mpno1,mdescription,maircraft_type,mstat1,mstat2,mstat3,mstat4);
end if;
end loop;
end;
Java program compiling time, it not showing any error. But after executing, it is not inserting any data into 'tmpcat' table and throwing the following error :
Flag Raisedjava.sql.SQLException: ORA-06550: line 1, column 14:
PLS-00357: Table,View Or Sequence reference 'A' not allowed in this context
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
[07/22/03 11:47:38][executor-0][W]: Handling error; throwable is "null", status
code is "404" and message is "Not Found: /User/Ecatalog/Validations.js".
[07/22/03 11:47:38][executor-0][W]: Handling error; throwable is "null", status
code is "404" and message is "Not Found: /User/Ecatalog/Validations.js".
Any one please help me to solve the issue.
With thanks
Pramod kumar.
My Email-id is : [email protected]What are p and d in
"{call Allsch("+p+","+d+")}"
Something tells me you might need some quotes in this statement since they are varchar2. Maybe
"{call Allsch('"+p+"','"+d+"')}"
If this doesn't work try to cut off parts of the procedure until it works.
Mike -
Re: PLS-00357 Table,View Or Sequence reference 'string' not allowed in this con
i have the same problem , can somebod help
i pasting my code here , please help me resolving
SQL> declare
2 continue char(1):='y';
3 begin
4 while(continue='y')
5 loop
6 dbms_output.put_line('somen');
7 dbms_output.put_line('do u wan continue');
8 continue:=to_char(&continue);
9 end loop;
10 end;
11 /
Enter value for continue: y
old 8: continue:=to_char(&continue);
new 8: continue:=to_char(y);
continue:=to_char(y);
ERROR at line 8:
ORA-06550: line 8, column 19:
PLS-00357: Table,View Or Sequence reference 'Y' not allowed in this context
ORA-06550: line 8, column 1:
PL/SQL: Statement ignoredJust to emphasise Sven's point that the substitution variable (&continue) is resolved once and "compiled" into the code, try making a stored procedure instead of an anonymous block.
SQL> create procedure p as
2 continue char(1):='y';
3 begin
4 while(continue='y') loop
5 dbms_output.put_line('somen');
6 dbms_output.put_line('do u wan continue');
7 continue:=('&continue');
8 end loop;
9 end;
10 /
Enter value for continue: q
old 7: continue:=('&continue');
new 7: continue:=('q');
Procedure created.
SQL> select text from user_source
2 where name = 'P'
3 order by line;
TEXT
procedure p as
continue char(1):='y';
begin
while(continue='y') loop
dbms_output.put_line('somen');
dbms_output.put_line('do u wan continue');
continue:=('q');
end loop;
end;
Note that where you had the substitution variable, there is now a literal value, q in my case. Note that because I did not respond with y for the value of continue I can safely run this procedure.
SQL> exec p;
somen
do u wan continue
PL/SQL procedure successfully completed.
John -
The reference to the table, view or sequence is not allowed in this context
Hi,
I'm triying to execute the SP that I describe below and the OS give me an error:
CREATE OR REPLACE PROCEDURE DWARE.P_CSCV_AGR_MONTH_REVENUE
TBL_NAME VARCHAR2,
START_DATE DATE,
RESULT_ OUT NUMBER
) AS
BEGIN
DECLARE
v_tbl_name VARCHAR2(30);
v_start_date DATE;
v_result NUMBER := 0;
v_select_aux VARCHAR2(32767) := ' ';
v_temp_table VARCHAR2(30);
v_exists NUMBER;
BEGIN
v_tbl_name := TBL_NAME;
v_start_date := START_DATE;
v_temp_table := 'temp_' || v_tbl_name;
SELECT count(*) INTO v_exists FROM tab WHERE lower(tname) = lower(v_temp_table);
IF (v_exists = 1) THEN
v_select_aux := '
DROP TABLE ' || v_temp_table || ' CASCADE CONSTRAINTS PURGE
EXECUTE IMMEDIATE (v_select_aux);
COMMIT;
END IF;
v_select_aux := 'CREATE TABLE ' || v_temp_table || ' AS
SELECT ch.date_ month_revenue,
s.date_sub month_sub,
s.codpromoter,
u.OPERATOR,
SUM (ch.total) AS TOTAL_OK
FROM cscv_sub_charges_' || to_char(v_start_date, 'YYYY_MM')|| ' ch
INNER JOIN cscv_subs s
ON ch.id_sub = s.ID
INNER JOIN cscv_users u
ON s.id_user = u.ID
WHERE ch.STATUS = 0
GROUP BY ch.date_, s.date_sub, s.codpromoter, u.OPERATOR';
EXECUTE IMMEDIATE (v_select_aux);
COMMIT;
v_select_aux := '
INSERT INTO ' || v_tbl_name || ' (
month_revenue,
month_sub,
codpromoter,
operator,
TOTAL_0,
TOTAL_1,
TOTAL_2,
TOTAL_3,
TOTAL_4,
TOTAL_5,
TOTAL_6,
TOTAL_7,
TOTAL_8,
TOTAL_9,
TOTAL_10,
TOTAL_11
SELECT
month_revenue,
month_sub,
codpromoter,
operator,
TOTAL_0,
TOTAL_1,
TOTAL_2,
TOTAL_3,
TOTAL_4,
TOTAL_5,
TOTAL_6,
TOTAL_7,
TOTAL_8,
TOTAL_9,
TOTAL_10,
TOTAL_11
FROM
SELECT
month_revenue,
month_sub,
codpromoter,
operator,
sum(total_ok) total_0,
0 total_1,
0 total_2,
0 total_3,
0 total_4,
0 total_5,
0 total_6,
0 total_7,
0 total_8,
0 total_9,
0 total_10,
0 total_11
FROM '|| v_temp_table ||'
WHERE to_char(month_sub,''mm/yyyy'') = to_char(sysdate,''mm/yyyy'')
GROUP BY month_revenue,month_sub,codpromoter, operator
UNION ALL
SELECT
month_revenue,
month_sub,
codpromoter,
operator,
0,
sum(total_ok),
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
FROM '|| v_temp_table ||'
WHERE to_char(month_sub,''mm/yyyy'') = to_char((to_date(sysdate,''dd/mm/yy'') - INTERVAL ''1'' MONTH),''mm/yyyy'')
GROUP BY month_revenue,month_sub,codpromoter, operator
GROUP BY month_revenue,
month_sub,
codpromoter,
operator
EXECUTE IMMEDIATE (v_select_aux);
v_result := v_result + SQL%ROWCOUNT;
COMMIT;
v_select_aux := '
DROP TABLE ' || v_temp_table || ' CASCADE CONSTRAINTS PURGE
EXECUTE IMMEDIATE (v_select_aux);
COMMIT;
RESULT_ := v_result;
END;
END P_CSCV_AGR_MONTH_REVENUE;
BEGIN
DWARE.P_CSCV_AGR_MONTH_REVENUE(CSCV_AGR_MONTH_REVENUE,'01/01/2010');
END;
/and the output is:
Error at line 1
ORA-06550: líne 2, column 32:
PLS-00357: The reference to the table, view or sequence 'CSCV_AGR_MONTH_REVENUE' is not allowed in this context
ORA-06550: líne 2, column 1:
PL/SQL: Statement ignoredwhat could I do to resove the problem??
Thanks in advance...Hi,
Your procedure's signature is
CREATE OR REPLACE PROCEDURE DWARE.P_CSCV_AGR_MONTH_REVENUE
TBL_NAME VARCHAR2,
START_DATE DATE,
RESULT_ OUT NUMBER
) i.e. it is expecting two input parameters, TBL_NAME in VARCHAR2 format and the other START_DATE in DATE format. Also you need a variable with data type as NUMBER to hold the value of OUT parameter RESULT_
Now look at the way you are calling this procedure
BEGIN
DWARE.P_CSCV_AGR_MONTH_REVENUE(CSCV_AGR_MONTH_REVENUE,'01/01/2010');
END;
/first parameter has to be a VARCHAR2, so enclose CSCV_AGR_MONTH_REVENUE into single quotes.
second parameter should be a date, so use to_date() function.
Lastly declare a variable with data type as Number for holding value of out parameter RESULT_
Something like this :
declare
t_num number;
begin
a('CSCV_AGR_MONTH_REVENUE',to_date('01/01/2010','MM/DD/YYYY'),t_num);
dbms_output.put_line(t_num);
end;Vivek L -
Java.lang.IllegalArgumentException: References to entities are not allowed
Hi,
I am using Berkely DB(native edition) 5.0.21 version. I have a couple classes as defined below:
Class - 1:
package bdb.test;
import java.util.List;
import com.sleepycat.persist.model.Entity;
import com.sleepycat.persist.model.PrimaryKey;
@Entity
public class Employee {
@PrimaryKey
private String id ;
private String name;
private List<Employee> reportingManagers ;
public String getId() {
return id;
public void setId(String id) {
this.id = id;
public String getName() {
return name;
public void setName(String name) {
this.name = name;
public List<Employee> getReportingManagers() {
return reportingManagers;
public void setReportingManagers(List<Employee> managers) {
this.reportingManagers = managers;
Class - 2 :
package bdb.test;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.List;
import com.sleepycat.db.DatabaseException;
import com.sleepycat.db.Environment;
import com.sleepycat.db.EnvironmentConfig;
import com.sleepycat.persist.EntityStore;
import com.sleepycat.persist.PrimaryIndex;
import com.sleepycat.persist.StoreConfig;
public class BDBTest{
public static void main(String agrs[]){
Environment myEnv;
EntityStore store;
try {
EnvironmentConfig myEnvConfig = new EnvironmentConfig();
myEnvConfig.setCacheSize(30000);
StoreConfig storeConfig = new StoreConfig();
myEnvConfig.setAllowCreate(true);
myEnvConfig.setInitializeCache(true);
storeConfig.setAllowCreate(true);
try {
// Open the environment and entity store
myEnv = new Environment(new File("c:\\BDBTEST\\"), myEnvConfig);
store = new EntityStore(myEnv, "MyStore", storeConfig);
PrimaryIndex<String, Employee> primaryIndex = store.getPrimaryIndex(String.class, Employee.class);
// write Employee
Employee employee = buildEmployee("E1", "EMP1");
primaryIndex.putNoReturn(employee);
} catch (FileNotFoundException fnfe) {
System.err.println(fnfe.toString());
System.exit(-1);
} catch(DatabaseException dbe) {
System.err.println("Error opening environment and store: " +
dbe.toString());
System.exit(-1);
public static Employee buildEmployee(String id,String name){
Employee employee = new Employee();
employee.setId(id);
employee.setName(name);
employee.setManagers(buildManager());
return employee;
public static List<Employee> buildManager(){
List <Employee> managers = new ArrayList<Employee>();
Employee manager1 = new Employee();
manager1.setId("M111");
manager1.setName("Manager1");
Employee manager2 = new Employee();
manager2.setId("M222");
manager2.setName("Manager2");
managers.add(manager2);
return managers;
While running the Class 2, I am getting the following exception :
Exception in thread "main" java.lang.IllegalArgumentException: References to entities are not allowed: bdb.test.Employee
at com.sleepycat.persist.impl.RecordOutput.writeObject(RecordOutput.java:94)
at com.sleepycat.persist.impl.ObjectArrayFormat.writeObject(ObjectArrayFormat.java:137)
at com.sleepycat.persist.impl.RecordOutput.writeObject(RecordOutput.java:114)
at com.sleepycat.persist.impl.ReflectionAccessor$ObjectAccess.write(ReflectionAccessor.java:398)
at com.sleepycat.persist.impl.ReflectionAccessor.writeNonKeyFields(ReflectionAccessor.java:258)
at com.sleepycat.persist.impl.ReflectionAccessor.writeNonKeyFields(ReflectionAccessor.java:255)
at com.sleepycat.persist.impl.ComplexFormat.writeObject(ComplexFormat.java:528)
at com.sleepycat.persist.impl.ProxiedFormat.writeObject(ProxiedFormat.java:116)
at com.sleepycat.persist.impl.RecordOutput.writeObject(RecordOutput.java:114)
at com.sleepycat.persist.impl.ReflectionAccessor$ObjectAccess.write(ReflectionAccessor.java:398)
at com.sleepycat.persist.impl.ReflectionAccessor.writeNonKeyFields(ReflectionAccessor.java:258)
at com.sleepycat.persist.impl.ComplexFormat.writeObject(ComplexFormat.java:528)
at com.sleepycat.persist.impl.PersistEntityBinding.writeEntity(PersistEntityBinding.java:103)
at com.sleepycat.persist.impl.PersistEntityBinding.objectToData(PersistEntityBinding.java:83)
at com.sleepycat.persist.PrimaryIndex.putNoOverwrite(PrimaryIndex.java:474)
at com.sleepycat.persist.PrimaryIndex.putNoOverwrite(PrimaryIndex.java:449)
at bdb.test.BDBTest.main(BDBTest.java:42)
Question : In the above example reportingManagers is also a list of Employee classes. Can't I self reference a object with in the same object ? How do I store list of reportingManagers in this example? Any help is highly appreciated.
Thanks,
BibhuHi Sandra,
Thanks for the reply.
Is there any restrictions in Berkeley DB to store cyclic referencing objects?
API documentation for Entity annotation talks about cyclic references in one of section but contradicts the same in another section. Please refer the link below:
[ http://download.oracle.com/docs/cd/E17076_02/html/java/com/sleepycat/persist/model/Entity.html]
Following sections of this documentation contradicts each other. I have highlighted both of them in bold.
Other Type Restrictions:
Entity classes and subclasses may not be used in field declarations for persistent types. Fields of entity classes and subclasses must be simple types or non-entity persistent types (annotated with Persistent not with Entity).
If a field of an Entity needs to reference an object, the referenced object should be marked with @Persistent and not with @Entity. So, self referencing is not possible as the main class would have been marked with @Entity.
Embedded Objects
As stated above, the embedded (or member) non-transient non-static fields of an entity class are themselves persistent and are stored along with their parent entity object. This allows embedded objects to be stored in an entity to an arbitrary depth.
There is no arbitrary limit to the nesting depth of embedded objects within an entity; however, there is a practical limit. When an entity is marshalled, each level of nesting is implemented internally via recursive method calls. If the nesting depth is large enough, a StackOverflowError can occur. In practice, this has been observed with a nesting depth of 12,000, using the default Java stack size. This restriction on the nesting depth of embedded objects does not apply to cyclic references, since these are handled specially as described below.
Self referencing is possible.
Object Graphs
When an entity instance is stored, the graph of objects referenced via its fields is stored and retrieved as a graph. In other words, if a single instance is referenced by two or more fields when the entity is stored, the same will be true when the entity is retrieved. When a reference to a particular object is stored as a member field inside that object or one of its embedded objects, this is called a cyclic reference. Because multiple references to a single object are stored as such, cycles are also represented correctly and do not cause infinite recursion or infinite processing loops. If an entity containing a cyclic reference is stored, the cyclic reference will be present when the entity is retrieved.
My question:
In the above first highlighted section says to store a referenced/embedded object it needs be marked with @Persistent and not with @Entity annotation. That rules out storage of cyclic referencing object since the main object would have been already marked with @Entity annotation. The second section indicates having support for cyclic references.
So, Is it possible to store cyclic referencing objects in BDB? if yes, how it should be done?
Thanks,
Bibhu
Edited by: user12848956 on Jan 20, 2011 7:19 AM -
I recently did an update for my iTunes and now when I try to open it, I get an error that says that my data execution prevention is not allowing it to open. How do I fix this issue?
Try updating your QuickTime to the most recent version. Does that clear up the DEP errors in iTunes?
-
I am getting the following error when attempting to deliver my iBooks Author book package via iTunes Producer: "
Unable to authenticate the package: B_SPACE_NUTRITION.itmsp
ERROR ITMS-9000: "OPS/ibooks.ncx(5): element "content" not allowed yet; missing required element "navLabel"" at Book (MZItmspBookPackage)"
I understand that there's something wrong with the TOC file (.ncx), but I have tried everything and nothing seems to work. Every section of the TOC is labeled, so not sure why the navLabel issue is happenening.
Any help is GREATLY appreciated! Thank you.Similar issues looks like. Are you using a template other than those in iBooks Author? That's what I did, and that was definitely part of the issue.
After digging through .ibooks code for hours and still not seeing the problem, I decided to reach out to one of the Apple epub conversion affiliates in iTunes Connect. They said they could repair the file without a problem, started working on it, only to come back a week later and say they couldn't work on .ibooks or .iba files yet.
So, in complete frustration, I decided to transfer my content page by page from the blank template I downloaded from a vendor online to one of the "textbook" templates in IBA. This was a long process as I had to unlock and clear out the formatting of the template. But, once that was done and content was transferred over, all was good. I submitted/delivered the same content and preview book within the new template and it went right through the first time (all metadata was exactly the same as well).
Now, the iBookstore approval waiting process begins!
Good luck! -
UCCHECK error: TRANSLATE... CODEPAGE/NUMBER FORMAT is not allowed
Hi ,
I am getting error " TRANSLATE... CODEPAGE/NUMBER FORMAT is not allowed" while doing UCCHECK activity.
Existing code is
DATA: BEGIN OF BIN_TAB OCCURS 500,
SATZ(1500) TYPE C,
END OF BIN_TAB.
translate bin_tab from code page '1100'.
I am getting this error for above statement.
Class CL_ABAP_CONV_IN_CE should be used but not sure about the syntax.
Please suggest how to resolve it ?
Thanks:
AnugrahPlease refer to below link:
http://wiki.scn.sap.com/wiki/display/ABAP/CL_ABAP_CONV_IN_CE
Thanks,
Sunny -
ERROR ITMS-9000: "Images larger than 2000000 pixels are not allowed in books
How to reduce image to resolve following issue ?
ERROR ITMS-9000: "Images larger than 2000000 pixels are not allowed in books
Thanks.Hi there djking!
I have an article for you here that can help you with that issue. The article is all about adding images to your books, and can be found here:
iBooks Author: Add and edit photos and other images
http://support.apple.com/kb/PH2797
Thanks for using the Apple Support Communities!
Cheers,
Braden -
Hi All,
I’m having a hard time figuring out how to make Rest WebService calls.
I tried executing this directly through browser and I get an error.
http:localhost:8080/rest/bean/atg/userprofiling/ProfileServices/loginUser?arg1=[email protected]&arg2=Password
13:18:20,613 ERROR [RestSecurityServlet] Error code: 401
Access to the requested resource is not allowed: /atg/userprofiling/ProfileServices
atg.rest.RestException: Access to the requested resource is not allowed: /atg/userprofiling/ProfileServices
at atg.rest.processor.RestSecurityProcessor.checkAccess(RestSecurityProcessor.java:546)
at atg.rest.processor.RestSecurityProcessor.handleGetRequest(RestSecurityProcessor.java:313)
at atg.rest.processor.RestSecurityProcessor.doRESTGet(RestSecurityProcessor.java:199)
at atg.rest.servlet.RestPipelineServlet.serviceRESTRequest(RestPipelineServlet.java:417)
at atg.rest.servlet.RestPipelineServlet.service(RestPipelineServlet.java:260)
at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
at atg.servlet.pipeline.PipelineableServletImpl.service(PipelineableServletImpl.java:320)
at atg.rest.servlet.RestPipelineServlet.service(RestPipelineServlet.java:264)
at atg.rest.servlet.HeadRestServlet.service(HeadRestServlet.java:130)
at atg.servlet.pipeline.PipelineableServletImpl.service(PipelineableServletImpl.java:267)
From the documentation I understand that I need to create a session, is the session only necessary to access secured components since this
particular method “ProfileServices.loginUser “ has been declared as not secure in restSecurityConfiguration.xml
Also, are there two different ways in which I can log in
1. Using RestSession.createSession providing the username and password.
2. Or using ProfileServices.loginUser or ProfileFormHandler
Can someone please clarifyIf you are invoking the REST web-service from a Java client then you can create a RestSession object using the createSession method. But in your case you seem to be invoking it with a HTTP request which by default would be treated as a GET request by ATG's REST implementation. Therefore being a GET, it would try to fetch a property "loginUser" from /atg/userprofiling/ProfileServices component (based on your URL) which would always fail.
To invoke loginUser() method of ProfileServices with your passed argument you need to tell ATG's REST system to treat your incoming request not as GET but as a POST request which you can do using atg-rest-http-method control parameter in your request like this
http:localhost:8080/rest/bean/atg/userprofiling/ProfileServices/loginUser?arg1=[email protected]&arg2=Password&atg-rest-http-method=POST
It should work this way provided your restSecurityConfiguration.xml is proper. -
Help - Error in PR BAPI : Purchasing across company codes is not allowed..
I have written a program to create Purchase Requisition.I am using two BAPIs.In the file i specify the old PR No, New Plant,Purch Group and Purch Org.It is actually a program to create a new PR in a new plant which is a copy of an Old PR in older plant.
Program is below:
I am getting the error Purchasing across company codes is not allowed..
Please Help
*& Report ZMMB_BDC_ME51N_WO
REPORT ZMMB_BDC_ME51N_WO.
INITIALIZATION.
D A T A D E C L A R A T I O N *
TYPES: BEGIN OF TY_TABDATA,
BANFN TYPE EBAN-BANFN, " Purchase Requistion No
WERKS TYPE MEREQ3211GRID-WERKS, "Plant
EKGRP TYPE MEREQ3211GRID-EKGRP, "Purchasing Group
EKORG TYPE MEREQ3211GRID-EKORG, "Purchasing Organization
END OF TY_TABDATA.
TYPES: BEGIN OF TY_CHECK,
BANFN TYPE EBAN-BANFN, " Purchase Requistion No
BNFPO TYPE EBAN-BNFPO, " Purchase Requistion Item No
EBAKZ TYPE EBAN-EBAKZ, " PR Closed
END OF TY_CHECK.
Declaration of the Internal Table & Work Area.
DATA:
IT_TABDATA TYPE STANDARD TABLE OF TY_TABDATA, " Internal Table for file
WA_TABDATA TYPE TY_TABDATA.
DATA: IT_ITEM TYPE STANDARD TABLE OF BAPIEBAN ,
WA_ITEM LIKE LINE OF IT_ITEM,
IT_ITEM1 TYPE STANDARD TABLE OF BAPIEBANC,
WA_ITEM1 LIKE LINE OF IT_ITEM1,
IT_ACCOUNT TYPE STANDARD TABLE OF BAPIEBKN,
WA_ACCOUNT LIKE LINE OF IT_ACCOUNT,
IT_PRITEMTEXT TYPE STANDARD TABLE OF BAPIEBANTX,
WA_PRITEMTEXT LIKE LINE OF IT_PRITEMTEXT,
IT_SERVICES TYPE STANDARD TABLE OF BAPIESLL ,
WA_SERVICES LIKE LINE OF IT_SERVICES,
IT_SERVICES1 TYPE STANDARD TABLE OF BAPIESLLC ,
WA_SERVICES1 LIKE LINE OF IT_SERVICES1,
IT_SERVICETEXT TYPE STANDARD TABLE OF BAPIESLLTX,
WA_SERVICETEXT LIKE LINE OF IT_SERVICETEXT,
IT_CHECK TYPE STANDARD TABLE OF TY_CHECK,
WA_CHECK LIKE LINE OF IT_CHECK.
Global data Declaration
DATA: GV_YEAR(4) TYPE C,
GV_MNTH(2) TYPE C,
GV_DATE(2) TYPE C,
GV_DATUM(8) TYPE C,
GV_ANS TYPE C,
W_FILENAME TYPE STRING.
Declaration of the Internal Table with Header Line comprising of the uploaded data.
DATA: BEGIN OF IT_FILE_UPLOAD OCCURS 0.
INCLUDE STRUCTURE ALSMEX_TABLINE. " Rows for Table with Excel Data
DATA: END OF IT_FILE_UPLOAD.
Batch Input Data for a single Transaction.
Message of Call Transaction.
DATA: BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
MSGTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
S E L E C T I O N - S C R E E N *
SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001,
BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-004.
PARAMETERS: P_FNAME LIKE RLGRAP-FILENAME OBLIGATORY.
SELECTION-SCREEN: END OF BLOCK B2,
END OF BLOCK B1.
E V E N T : AT S E L E C T I O N - S C R E E N *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FNAME.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
STATIC = 'X'
CHANGING
FILE_NAME = P_FNAME.
E V E N T : S T A R T - O F - S E L E C T I O N *
START-OF-SELECTION.
Upload Excel file into Internal Table.
PERFORM UPLOAD_EXCEL_FILE.
IF NOT IT_FILE_UPLOAD IS INITIAL.
Confirm whether you want to proceed with the Upload.
PERFORM CONFIRM_UPLOAD.
IF GV_ANS EQ '1'.
Organize the uploaded data into another Internal Table.
PERFORM ORGANIZE_UPLOADED_DATA.
PERFORM BAPI_CALL.
ENDIF.
ELSE.
LEAVE PROGRAM.
ENDIF.
*& Form UPLOAD_EXCEL_FILE
text
--> p1 text
<-- p2 text
FORM UPLOAD_EXCEL_FILE .
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = P_FNAME
I_BEGIN_COL = 1
I_BEGIN_ROW = 4
I_END_COL = 4
I_END_ROW = 9999
TABLES
INTERN = IT_FILE_UPLOAD
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " UPLOAD_EXCEL_FILE
*& Form CONFIRM_UPLOAD
text
--> p1 text
<-- p2 text
FORM CONFIRM_UPLOAD .
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = TEXT-002
TEXT_QUESTION = TEXT-003
IMPORTING
ANSWER = GV_ANS
EXCEPTIONS
TEXT_NOT_FOUND = 1
OTHERS = 2.
ENDFORM. " CONFIRM_UPLOAD
*& Form ORGANIZE_UPLOADED_DATA
text
--> p1 text
<-- p2 text
FORM ORGANIZE_UPLOADED_DATA .
DATA : GV_TOTROW TYPE I, "No of records
GV_ROW TYPE I,
LC_CNT(3) TYPE N.
GV_TOTROW = 1.
SORT IT_FILE_UPLOAD BY ROW
COL.
LOOP AT IT_FILE_UPLOAD.
GV_TOTROW = IT_FILE_UPLOAD-ROW.
ENDLOOP.
GV_ROW = 1.
WHILE GV_ROW <= GV_TOTROW.
LOOP AT IT_FILE_UPLOAD WHERE ROW = GV_ROW.
CASE IT_FILE_UPLOAD-COL.
WHEN '0001'.
WA_TABDATA-BANFN = IT_FILE_UPLOAD-VALUE.
WHEN '0002'.
WA_TABDATA-WERKS = IT_FILE_UPLOAD-VALUE.
WHEN '0003'.
WA_TABDATA-EKGRP = IT_FILE_UPLOAD-VALUE.
WHEN '0004'.
WA_TABDATA-EKORG = IT_FILE_UPLOAD-VALUE.
ENDCASE.
ENDLOOP.
GV_ROW = GV_ROW + 1.
APPEND WA_TABDATA TO IT_TABDATA .
CLEAR :WA_TABDATA.
ENDWHILE.
ENDFORM. " ORGANIZE_UPLOADED_DATA
*& Form BAPI_CALL
text
--> p1 text
<-- p2 text
FORM BAPI_CALL .
DATA:ITM_NO(4) TYPE N,LV_PERCENTAGE(3) TYPE N,
LV_MSG(60),
IT_RETURN TYPE STANDARD TABLE OF BAPIRETURN,
WA_RETURN LIKE LINE OF IT_RETURN.
DATA: BEGIN OF WA_RETURN1,
BANFN TYPE EBAN-BANFN.
INCLUDE TYPE BAPIRETURN.
DATA END OF WA_RETURN1.
DATA:IT_RETURN1 LIKE STANDARD TABLE OF WA_RETURN1.
DESCRIBE TABLE IT_TABDATA LINES ITM_NO.
LOOP AT IT_TABDATA INTO WA_TABDATA.
CALL FUNCTION 'BAPI_REQUISITION_GETDETAIL'
EXPORTING
NUMBER = WA_TABDATA-BANFN
ACCOUNT_ASSIGNMENT = 'X'
ITEM_TEXTS = 'X'
SERVICES = 'X'
SERVICE_TEXTS = 'X'
TABLES
REQUISITION_ITEMS = IT_ITEM
REQUISITION_ACCOUNT_ASSIGNMENT = IT_ACCOUNT
REQUISITION_TEXT = IT_PRITEMTEXT
REQUISITION_LIMITS =
REQUISITION_CONTRACT_LIMITS =
REQUISITION_SERVICES = IT_SERVICES
REQUISITION_SERVICES_TEXTS = IT_SERVICETEXT
REQUISITION_SRV_ACCASS_VALUES =
RETURN =
COMPUTE LV_PERCENTAGE = ( ITM_NO / SY-TABIX ) * 100.
CONCATENATE 'PROCESSING PURCHASING REQUISITION FOR OLD PR NUMBER ' WA_TABDATA-BANFN INTO LV_MSG.
CALL FUNCTION 'RM_SAPGUI_PROGRESS_INDICATOR'
EXPORTING
PERCENTAGE = LV_PERCENTAGE
TEXT = LV_MSG.
CLEAR:LV_PERCENTAGE ,LV_MSG.
IF IT_TABDATA[] IS NOT INITIAL.
SELECT BANFN BNFPO EBAKZ FROM EBAN INTO TABLE IT_CHECK FOR ALL ENTRIES IN IT_TABDATA
WHERE BANFN = IT_TABDATA-BANFN AND EBAKZ = 'X'.
ENDIF.
LOOP AT IT_CHECK INTO WA_CHECK.
LOOP AT IT_ITEM INTO WA_ITEM WHERE PREQ_NO = WA_CHECK-BANFN AND PREQ_ITEM = WA_CHECK-BNFPO.
DELETE IT_ITEM WHERE PREQ_NO = WA_CHECK-BANFN AND PREQ_ITEM = WA_CHECK-BNFPO.
ENDLOOP.
LOOP AT IT_ACCOUNT INTO WA_ACCOUNT WHERE PREQ_NO = WA_CHECK-BANFN AND PREQ_ITEM = WA_CHECK-BNFPO.
DELETE IT_ACCOUNT WHERE PREQ_NO = WA_CHECK-BANFN AND PREQ_ITEM = WA_CHECK-BNFPO.
ENDLOOP.
ENDLOOP.
LOOP AT IT_ITEM INTO WA_ITEM.
WA_ITEM-PLANT = WA_TABDATA-WERKS.
WA_ITEM-PUR_GROUP = WA_TABDATA-EKGRP.
WA_ITEM-PURCH_ORG = WA_TABDATA-EKORG.
MODIFY IT_ITEM FROM WA_ITEM TRANSPORTING PLANT PUR_GROUP PURCH_ORG.
MOVE-CORRESPONDING WA_ITEM TO WA_ITEM1.
WA_ITEM1-PREQ_NO = ''.
WA_ITEM1-STORE_LOC = ''.
APPEND WA_ITEM1 TO IT_ITEM1.
CLEAR WA_ITEM1.
ENDLOOP.
LOOP AT IT_ACCOUNT INTO WA_ACCOUNT.
WA_ACCOUNT-PREQ_NO = ''.
MODIFY IT_ACCOUNT FROM WA_ACCOUNT TRANSPORTING PREQ_NO.
ENDLOOP.
LOOP AT IT_SERVICES INTO WA_SERVICES.
MOVE-CORRESPONDING WA_SERVICES TO WA_SERVICES1.
APPEND WA_SERVICES1 TO IT_SERVICES1.
CLEAR WA_SERVICES1.
ENDLOOP.
CALL FUNCTION 'BAPI_REQUISITION_CREATE'
EXPORTING
SKIP_ITEMS_WITH_ERROR =
AUTOMATIC_SOURCE = 'X'
IMPORTING
NUMBER =
TABLES
REQUISITION_ITEMS = IT_ITEM1
REQUISITION_ACCOUNT_ASSIGNMENT = IT_ACCOUNT
REQUISITION_ITEM_TEXT = IT_PRITEMTEXT
REQUISITION_LIMITS =
REQUISITION_CONTRACT_LIMITS =
REQUISITION_SERVICES = IT_SERVICES1
REQUISITION_SRV_ACCASS_VALUES =
RETURN = IT_RETURN
REQUISITION_SERVICES_TEXT = IT_SERVICETEXT
REQUISITION_ADDRDELIVERY =
EXTENSIONIN =
READ TABLE IT_RETURN INTO WA_RETURN INDEX 1.
IF WA_RETURN-TYPE = 'E'.
CLEAR WA_RETURN.
LOOP AT IT_RETURN INTO WA_RETURN WHERE TYPE EQ 'E'.
WA_RETURN1-BANFN = WA_TABDATA-BANFN.
MOVE-CORRESPONDING WA_RETURN TO WA_RETURN1.
APPEND WA_RETURN1 TO IT_RETURN1.
CLEAR WA_RETURN1.
ENDLOOP.
ELSE.
WA_RETURN1-BANFN = WA_TABDATA-BANFN.
MOVE-CORRESPONDING WA_RETURN TO WA_RETURN1.
APPEND WA_RETURN1 TO IT_RETURN1.
CLEAR WA_RETURN1.
ENDIF.
IF SY-SUBRC <> 0.
ENDIF.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT =
IMPORTING
RETURN =
REFRESH: IT_RETURN[],IT_ITEM[],IT_ACCOUNT[],IT_PRITEMTEXT[],IT_ITEM1[],IT_SERVICES[],IT_SERVICES1[],
IT_SERVICETEXT[].
ENDLOOP.
WRITE :10 'OLD PR NUMBER' COLOR COL_KEY, 25 'MESSAGE' COLOR COL_KEY.
LOOP AT IT_RETURN1 INTO WA_RETURN1.
WRITE:/10 WA_RETURN1-BANFN,25 WA_RETURN1-MESSAGE.
ENDLOOP.
CLEAR:IT_TABDATA[],WA_TABDATA.
ENDFORM . "BAPI_CALLSolved on Own
-
Create Materialized View ORA-01723: zero-length columns are not allowed
I am trying to create a materialized view which derives a column from a function and I get: ORA-01723: zero-length columns are not allowed.
I am using 10gR2 with the following definition (simple version):
CREATE MATERIALIZED VIEW AS
SELECT
function_name(column_name) COLUMN_ALIAS
FROM table_name;
I have even tried to cast it like below:
CREATE MATERIALIZED VIEW AS
SELECT
CAST(function_name(column_name) AS VARCHAR2(200)) COLUMN_ALIAS
FROM table_name;
My function does have an exception to return a value even if no values are found.
I have looked all over for the solution. Does anyone have a way around this issue? I really need my function to derive the column as it has business rules which I cannot join into my materialized view definition. My only hope around this is to insert the values into a table and then create a materialized view from that table, I don't want to do that if someone has a solution around this.
Any help would be greatly appreciated.
Thank you,
Kyle
Edited by: Kyle Miller on Apr 19, 2011 8:28 AMHave you tried creating a table with the correct structure and then creating the materialized view based on the prebuilt table as described here...
http://www.oaktable.net/content/ultra-fast-mv-alteration-using-prebuilt-table-option
Cheers
Ben -
Error message: libsmime3.dylib is in use and will not allow update
I tried to download the new firefox 5.0, for Mac OS10
when I put it into the application folder the error message showed up:
libsmime3.dylib is in use and would not allow new version to replace old
I have restarted the computer several times and still the sameI found [http://siliconchaos.blogspot.com/2010/08/installing-firefox-4-beta-2-error-on.html this blog post] when trying to look up that error. Looks like a common cause of the error is programs like Evernote, Dropbox or Cisco's AnyConnect VPN Client. Try disabling those (the blog post has instructions) if a simple delete/replace doesn't help.
-
Hello ,
I have installed " SQL Server 2012 Upgrade Advisor" successfully on my local system. A Successfull connection was establised to SQL Server insatnce on Remote Server through Upgrade Advisor
,On click of Run below error is raised
===================================
Requested registry access is not allowed. (mscorlib)
Program Location:
at System.ThrowHelper.ThrowSecurityException(ExceptionResource resource)
at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
at Microsoft.Win32.RegistryKey.OpenSubKey(String name)
at Microsoft.SqlServer.UpgradeAdvisor.SqlDetection.GetClusterInfo()
at Microsoft.SqlServer.UpgradeAdvisor.SqlDetection.GetSqlInstances()
at Microsoft.SqlServer.UpgradeAdvisor.SqlDetection.EngineExists()
at Microsoft.SqlServer.UpgradeAdvisor.AnalyzerEngine.GetAnalyzer(AnalyzerType analyzerType)
at Microsoft.SqlServer.UpgradeAdvisor.AnalyzerEngine.RunAnalyzer(AnalyzerType analyzerType, String& reportFile)Yes instance and upgrade advisor version are same (64 bit ).edition of SQL Server is Enterprise Edition (64-bit)
Upgrading from SQL Server 2008 to SQL server 2012.
1) provided with Server Name and component
SQL SERVER was Checked.
2) Clicked on Next , Instance Name and SQL Server Authentication
was selected.
3) Login Ceredentials provided and Clicked on Next.
4) Only one Database to analyze was checked and Clicked Next.
5) On Click of Run below error occured.
On click of Advance Information of error >> ALL Messages :
===================================
Requested registry access is not allowed. (mscorlib)
Program Location:
at System.ThrowHelper.ThrowSecurityException(ExceptionResource resource)
at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
at Microsoft.Win32.RegistryKey.OpenSubKey(String name)
at Microsoft.SqlServer.UpgradeAdvisor.SqlDetection.GetClusterInfo()
at Microsoft.SqlServer.UpgradeAdvisor.SqlDetection.GetSqlInstances()
at Microsoft.SqlServer.UpgradeAdvisor.SqlDetection.EngineExists()
at Microsoft.SqlServer.UpgradeAdvisor.AnalyzerEngine.GetAnalyzer(AnalyzerType analyzerType)
at Microsoft.SqlServer.UpgradeAdvisor.AnalyzerEngine.RunAnalyzer(AnalyzerType analyzerType, String& reportFile)
Log file Error Message :
12/01/2014 17:17:47 UA <Error>System.Security.SecurityException: Requested registry access is not allowed.
at System.ThrowHelper.ThrowSecurityException(ExceptionResource resource)
at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
at Microsoft.Win32.RegistryKey.OpenSubKey(String name)
at Microsoft.SqlServer.UpgradeAdvisor.SqlDetection.GetClusterInfo()
at Microsoft.SqlServer.UpgradeAdvisor.SqlDetection.GetSqlInstances()
at Microsoft.SqlServer.UpgradeAdvisor.SqlDetection.EngineExists()
at Microsoft.SqlServer.UpgradeAdvisor.AnalyzerEngine.GetAnalyzer(AnalyzerType analyzerType)
at Microsoft.SqlServer.UpgradeAdvisor.AnalyzerEngine.RunAnalyzer(AnalyzerType analyzerType, String& reportFile)
The Zone of the assembly that failed was:
MyComputer</Error> -
Idoc in error while trying to post vendor invoice(higher items not allowed)
Hi All,
we have two SAP systems. SAP A and SAP B.
SAP A is the vendor for SAP B system we have created a sales order/delivery/out bound invoice in SAP A system.The sales order has BOM material with main item and sub items. We have the same material master data and BOM master data in system A and system B since we are following split architecture.
The outbound invoice(with main and sub item) in system A has generated an outbound idoc and the idoc has gone to SAP
system B. There are the usual segments like E1EDP01 for main item and another E1EDp01 for the sub itmes in the outbound
idoc.The message type is INVOIC and basic type INVOIC02 with no extension.
In system B, the inbound idoc (coming from system A) has failed giving the error message "higher level items not allowed". The
segment E1EDP01 for sub item is highlighted in red ! basically the inbound idoc in sap system B is posting a vendor
invoice since the inbound idoc in B is calling the FM IDOC_INPUT_INVOIC_MRM... I think this is doing vendor invoice
verification.
I have checked in system A, all is ok and the outbound idoc is ok but the issue is in sap system B, the inbound idoc has failed
with message "higher level items not allowed". The segment E1EDP01 for sub item is highlighted in red in inbound idoc in
system B. The segments are the same for inbound idoc in B and outbound idoc in A.
Can someone pls tell what is wrong in system B.(config or data issue) as we are managing both systems.
regds
Edited by: sapsd73 on Jul 9, 2010 3:26 PM
Edited by: sapsd73 on Jul 9, 2010 3:27 PMI do not see any reason why you would need to use COND_A04 if COND_A01 is working.
What if you could get COND_A04 to post and you would face the same result as in COND_A01?
If SAP does not check wrong values, then you have to do it yourself, or you report an incident at SAP (after you have searched for OSS notes that may have fixed this error already)
For example OSS Note 1169998 - IDoc: KONP-LIFNR values not checked
fixed a situation where the vendor number was not validated.
Maybe you are looking for
-
Skip first screen when calling transaction via BDC
I need to use BDC to call transaction FD32 and suppress the first screen. Do I need to set BDC_OKCODE? However, when I set BDC_OKCODE to '/00', this error occured, "System error: Error in routine DYNPRO_ERSTES_BILD". Here is my code: CLEAR ls_bdcdata
-
Spacebar shortcut for hand tool not working in Photoshop CC - have tried closing all other programs
The spacebar shortcut for hand tool is not working in Photoshop CC - as suggested in this form & others I have tried closing all other programs with no result. I have also reset photoshop to default settings & this did not make any difference either.
-
Bug in transport controls?
Hi, I've been going a little crazy trying to get an M-Audio Oxygen's transport controls to sync to Logic. I have MMC engaged, and all of the transport controls work on the M-Audio, and the computer keyboard except 'PLAY.' This will NOT work directly
-
TS1368 error in accessing iTunes Store Ox80092013
I have purchased an HP 5750, installed Home Premium, and Norton 2013 IS. My proxy server is American Family Online web browsing filter. I am able to get to iTunes through the proxy server, but as soon as I login to it I get the message, "Error in acc
-
Hello I have created an hyperlink in JEditorPane. Hyper link will only work after you set the editor Editable to false. I have done so. But after that I cannot type any text in the pane as I have set the Editable to false. Can you please provide me t