Problem of "create type"
I have following package. If I put the definition myTableType outside the package, i.e. if I execute "create myTableType as table of char(2)", then the package has no problems. But if I put the definition inside pk_test, then it will return an error. Does anyone know why? Thanks in advance.
create or replace package body pk_test is
procedure sp_test
is
type myTableType is table of char(2);
l_data myTableType := myTabletype();
ls_item_desc char(20);
begin
dbms_output.enable(50000);
l_data.extend;
l_data(1) := '01';
select item_desc
into ls_item_desc
from item_code
where item_code in
( select * from
table(cast(l_data as sp_test.mytableType )));
dbms_output.put_line('item desc: ' || ls_item_desc);
end sp_test;
end pk_test;
select item_desc
into ls_item_desc
from item_code
where item_code in
( select * from
table(cast(l_data as sp_test.mytableType )));
Cannot use casting of type if not present in the db dictionary.
Similar Messages
-
hi..
i've problem in creating data type in xi after importing idoc from the R/3 sender
plz tell me the basic steps for creating data type in the receiver i.e xi.....
thanks in advanceHi,
You don't need to create a data type after importing the IDOC.
Idoc itself acts as message type and message interface.
check this for creating a data type..
http://help.sap.com/saphelp_nw70/helpdata/en/2d/c0633c3a892251e10000000a114084/frameset.htm
Thanks,
Vijaya. -
I want to create a simple (not composite) data type using CREATE TYPE
CREATE TYPE mytype under number (number(9));
Obviously it was wrong. Am I trying in vain? I mean CREATE TYPE can be used just to create composite types.I am not sure if you did not confuse two things
PL/SQL - User Defined Subtype. Variables of type mytype will be maximum number(9)
[email protected]> declare
2 subtype mytype is number(9);
3 x mytype := 1;
4 begin
5 dbms_output.put_line(x);
6 end;
7 /
1
PL/SQL procedure successfully completed.
SQL type.
[email protected]> create type mtype is object(x number(9))
2 /
Type created.
Best regards
Krystian Zieja / mob -
Hi all,
I'm not able to create objects using SQL in oracle.
When I use
Create type obj_ty as object(name varchar2(10));
2
is what I get, that is, it goes to the next line without executing the create object stmt. Kindly help me out.
Thanks,
-VikramYou need to put a slash to execute the create type:
SQL> Create type obj_ty as object(name varchar2(10));
2 /
Type created.
SQL> -
Problem in creating a build.xml for weblogic portal application
Team ,
I am facing problem in creating the build.xml using weblogic.BuildXMLGEN tool .
a) Below is the structure of my portal application
SrcCode
--- .metadata (eclipse plugins folder)
--- B2BApp ( Ear Content)
--- b2bPortal ( portal related file(controllers,jsp)
--- b2bsrc (java src)
b) Now I executed below utility to generate the build.xml "
java weblogic.BuildXMLGen -projectName B2BApp -username weblogic -file build.xml -password welcome1 F:\srcCode"
c) Based on the above step , build.xml got generated .
d) when I execute "ant compile" target from the command prompt , I see the below exception
ant compile
Buildfile: build.xml
compile:
+[wlcompile] [JAM] Warning: failed to resolve class AbstractJspBacking+
+[wlcompile] [JAM] Error: unexpected exception thrown:+
+[wlcompile] com.bea.util.jam.internal.javadoc.JavadocParsingException: Parsing failure in F:\b2bNew\b2bPortal\src\portlets\b2b\dmr\Picker\PickerController.java at line 58.+
e) I suspect , the problem is bcoz of classpath issues , as I generated build.xml donot have the references to dependent lib's.As build.xml looks like below :
+<target name="compile" description="Only compiles B2BApp application, no appc">+
+<wlcompile srcdir="${src.dir}" destdir="${dest.dir}">+
+<!-- These referenced libraries were not found -->+
+<!-- <library file="p13n-core-web-lib" /> -->+
+<!-- <library file="jersey-web-lib" /> -->+
+.....+
+....+
Please help me to reslove these issues .
PS: I able to deploy the application using 10.3.2 weblogic workshop ( i.e inbuilt eclipse )i JaySen ,
thanks for your response. As mentioned we added all the necessary library within the -librarydir but still we see the same error :
+[JAM] Error: unexpected exception thrown:+
com.bea.util.jam.internal.javadoc.JavadocParsingException: Parsing failure in F:\b2bNew\b2bPortal\src\portlets\typeAhead\TypeAheadController.java at line 70. Most likely, an annotation is declared whose type has not been imported.
at com.bea.util.jam.internal.javadoc.JavadocTigerDelegateImpl_150.getAnnotationTypeFor(JavadocTigerDelegateImpl_150.java:410)
at com.bea.util.jam.internal.javadoc.JavadocTigerDelegateImpl_150.extractAnnotations(JavadocTigerDelegateImpl_150.java:176)
at com.bea.util.jam.internal.javadoc.JavadocTigerDelegateImpl_150.extractAnnotations(JavadocTigerDelegateImpl_150.java:152)
at com.bea.util.jam.internal.javadoc.JavadocClassBuilder.addAnnotations(JavadocClassBuilder.java:404)
at com.bea.util.jam.internal.javadoc.JavadocClassBuilder.populate(JavadocClassBuilder.java:359)
===================
a) this is a upgrade project [ upgrading from wlp 8.1.4 to 10.3.2 ]
i.e we are using weblogic portal 10.3.2 version.
b) Searched some sites/forums regarding the above error, and it says something related to "jwsc" ant task [ i.e while compiling a webservice(JWS) ], but we see this error while compiling a normal controller(jpf) class :(
c) we are using "ant compile" target which internally calls wlcompile task , while executing wlcompile this error is thrown .
Help Appreciated
Thx,
Sarat -
Problem in creating table maintenance generator for 61 fields in table
Hi Experts,
I am facing problem in creating a table maintenance genarator for a ZTABLE which has 61 fields
i am using below details whicle creating the TMG
in Maintenance screen
i am giving maintenance type as two step
Maint screen no overview screen 2
single screen 3
Dialog Data Transport details
Recording routine standard recording routine
but it is giving following error
screen SAPL<ZTABLE NAME> 0003 could not be generated
In DYNPFIELD_ATTR mandatory field LINE has no value
please let me know how to sort out these errors.
Is there any limit on the number of fields for which we can create table maintenance generetor.
Thanks a lot in advance
SudiptoHi Sudipto,
There is not limit to the number of fields of the Table which can be used in TMG for generation. But, from the usability point of view this will horrible.
I created a Z table and added 64 fields and was able to generate the TMG with the screens perfectly. So, I guess there should not be any problem.
Well, have a look at the Function Group. I guess the screen numbers are already used by some other screens. You can set the system to propose freely available screen numbers from the pool.
Also, check whether proper authorization is assigned or not.
And if nothing is working, you can degenerate all the generated screens and then can have a new regeneration of it.
Hope these tips will work.
Thanks,
Samantak -
Problem in Creating Check boxes as a column in a table using MVC
I am trying to display a table format using the Model view controlers, with 1st column as a checkbox. if the user chooses some check boxes and submit the screen then i need to update the information in a custome table.
I am having a problem in creating the check boxes, also pls tell me how to catch the line items checked by the user in the table...
SriHI Srinivas
I am not getting what the exact problem is.....
I am giving you a work around.....to me it does not seems to be an Ideal Solution..But Probably it will solve your problem....
Changes To be Made in Page Layout...
In Pagelayout
<htmlb:tableView id = "tvX" width = "100%" visibleRowCount = "8" fillUpEmptyRows = "X" selectedRowIndexTable = "<%= selectedRowIndexTable %>"
<b>selectedrowindex = "<%= selectedrowindex %>"
onrowselection = "select"</b>
selectionMode = "MULTISELECT" table = "<%= sflight %>" />
<b>selectedindexrow is an attribute of type INT4</b>
In Do handle event.....instead of using the previous code use this one...
if event->id = 'SUBMIT'.
DATA: WA TYPE INT4.
LOOP AT SELECTEDROWINDEXTABLE INTO WA.
*Here you can read your table of TABLEVIEW with index *equal to WA into a workarea and then use that workarea *to update the customer table ENDLOOP.
elseif event->id = 'tvX'.
tv ?= CL_HTMLB_MANAGER=>GET_DATA( request = request name = 'tableView' id = 'tvX' ).
IF tv IS NOT INITIAL.
table_event = tv->data.
selectedRowIndex = table_event->SELECTEDROWINDEX.
append selectedrowindex into SELECTEDROWINDEXTABLE.
endif.
ENDIF.
Meanwhile..Let me check why that code does not work.....
Hope it solve your problem....
Cheers:)
Mithlesh -
I have a problem in creating a Process Chain(PC).
Hi GURU's
I have a problem in creating a Process Chain(PC). The PC should run on first 3 business days of the month for six times i,e 6am, 7am,8am, 9am,10am,11am.
For this i have created 3 PC like BD1, BD2, BD3, and i selected the Factory calender provided workday 1, 2 , 3 and time for three chains.
Now should i schedule it for 6times in a day.
I tried creating a new job for one of PC's but i have to change the timings for every month (this is not the proper solution).
Please help me.
Regds
LajwanthHi Friend,
For the days part, you can create a new factory calendar with first 3 business days of each month only as working days.
Then in the scheduling -> Restrictions; you can mention that Factory Calendar id and select radio button for "Move job to next working day". Schedule the chain as Periodic "Hourly".
Then for the Time part -> You can insert process type "Decision between multiple alternatives" after the start variant.
After you insert this process type you can create a formula in it to check for system time. In the if condition check for system time i.e., whether it is between 6 - 11. If only the system time is between 6 AM to 11 AM only then the decision step would turn to green and go to the successor step in the process chain.
Process chain would be like:
Start variant -> Decision Step -> Rest of the chain.
So in short the factory calendar will take care of which days the chain will run and decision step will take care of the timings.
Regards
Hemant Khemani -
Problem when creating a sales order with reference by BAPI
I am facing one problem when creating Sales Order.
<b>The scenario is like this while creating SO With reference to an Order type, a new SO will be automatically created with a diff order Type</b>.
I am using "BAPI_SALESORDER_CREATEFROMDAT2".
I am calling this BAPI in USEREXIT_REFRESH_DOCUMENT.
Am I using the right exit to call this Bapi ?
<b>Problems are like :
1. Ref Sales Order creating without Sales Unit .
2. "Object Status does not exist" error msg is coming for Header and Item level(when clicking the status tab and then object status pushbutton).</b> But if testing the bapi from SE37 in test sequence....no such problem persists.
As for example in case of sales unit,in the debugging mode i have seen that BAPI uses a perform to fill the values in the VBAP structure.But after that when it come back to the main program VBAP remains blank.This ocuurs when the BAPI is called from the exit whereas if tested from SE37, VBAP retains the value.
Can u suggest in this ? This is very very urgent............
Thx in Adv.........................Thanks........
Your suggestion was a great help to me.I have used a custom FM and called it in <b>starting new task</b>.
Since i am a university fresher working in SAP for nearly 1 year.....can you please explain me the difference between <b>in update task</b> and <b>starting new task</b>.Why the problem was occuring for which you have suggested to call a custom function module.
what is V1 update and V2 update?Is it attached with asynchronous ans synchronous update.It would be a great help to me if you kindly clear my confusions....
thanks in advance. -
Problems in creating and storing new documents using BAPI_DOCUMENT_CREATE2
Hi experts,
I'm getting problems in creating and storing new documents using BAPI_DOCUMENT_CREATE2.
I have a scenario where is defined the document type ZC1, document part 200, authorization group 0002 and for all of these documents the storage category "Cofre DMS1". And the status which demands the storage category is 'FR'.
I've been fullfiling the BAPI_DOCUMENT_CREATE2 in this way:
"Tables
data: it_doc like bapi_doc_draw2,
it_return like bapiret2,
it_files like bapi_doc_files2 occurs 0 with header line,
it_objs like bapi_doc_drad occurs 0 with header line.
"Variables
data: wl_doctype like bapi_doc_draw2-documenttype,
wl_docnumber like bapi_doc_draw2-documentnumber,
wl_docpart like bapi_doc_draw2-documentpart,
wl_docversion like bapi_doc_draw2-documentversion.
it_doc-documenttype = 'ZC1'.
it_doc-documentpart = '200'.
it_doc-documentversion = '00'.
it_doc-description = 'Test of documents creation via BAPI'.
it_doc-username = sy-uname.
it_doc-statusextern = 'FR'.
it_doc-authoritygroup = '0002'.
refresh it_files[].
clear it_files.
it_files-originaltype = '1'.
it_files-storagecategory = 'Cofre DMS1'.
it_files-wsapplication = 'PDF'.
it_files-docfile = 'c:\110307.pdf'.
it_files-description = 'Test file'.
append it_files.
refresh it_objs[].
clear it_objs.
it_objs-objecttype = 'EKPO'.
it_objs-objectkey = '47000497600010'.
append it_objs.
CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
EXPORTING
documentdata = it_doc
IMPORTING
documenttype = wl_doctype
documentnumber = wl_docnumber
documentpart = wl_docpart
documentversion = wl_docversion
return = it_return
TABLES
objectlinks = it_objs
documentfiles = it_files.
After execute the BAPI process I got the following error:
E26 087 - Data carrier COFRE DMS1 not defined
Does anybody have a sugestion to help me, please?
Thks
David
Edited by: David Tsutsui on Mar 18, 2010 10:52 AMPlease refer to this thread, it tells why you need a data carrier you can also configure the same in DC20.
Data Carriers for Storage the Originals of DMS -
Problems with creating a complex cursor
Let me prefix this post with the fact that I am really new at this and this is my first shot at creating a Stored Proc. I have the shell and I have tried to code this but I am having some issues with the cursor. Any tips or tricks that you can give me would be greatly appreciated.
Below is what I am trying to accomplish
Looking for the best approach to work with a complex cursor.
I have 4 files that are going to dump into a temp table. This is a sample of the Temp Table
CHAN_ADDR,BRA,SRC_ID,R_Flag,C_Flag,S_Flag,N_Flag,Expire_Date,Wireless_Flag
1111111111,R,1-a,,,,NDNC,7/7/2006,
2222222222,R,2-b,,,SDNC,NDNC,7/7/2006,WIR
3333333333,R,3-c,,,SDNC,NDNC,7/8/2006,
4444444444,R,4-d,y,,SDNC,NDNC,7/9/2006,WIR
5555555555,R,5-e,y,,SDNC,,7/10/2006,
6666666666,R,6-f,y,,,,,WIR
7777777777,R,7-g,,,,,,
8888888888,R,8-h,y,,,NDNC,7/7/2006,WIR
I need to take this data and dump it into another table that looks like the following:
ADDR Per_ID Method Name Expire Date Flag
1111111111 1-a Phone Nat 7/7/2006 Y
2222222222 2-b Mobile State 7/7/2006 Y
2222222222 2-b Mobile Nat 7/7/2006 Y
4444444444 3-c Mobile R 7/9/2006 y
4444444444 3-c Mobile State 7/9/2006 y
4444444444 3-c Mobile Nat 7/9/2006 y
know that I need to use a cursor using loop and fetch but I am kind of confused on how to make this work. I am fairly new to writing PL/SQL so any tips and tricks would be greatly appreciated.
For each phone number there can be 1 to 3 records written based on the flags. For each of those records I must store the phone number, the id, flag data, expire date (for only State or National) and Flag must always be checked.
I have put together a small shell of the program but what goes in the middle is where I am having some problems.
CREATE OR REPLACE PROCEDURE USP_EIM_CONTACT3_UPD
IS
CURSOR dnc_cursor IS
SELECT CHAN_ADDR,
BRA,
SRC_ID,
R_FLAG,
C_FLAG,
S_FLAG,
N_FLAG,
EBR_EXPIRE_DATE,
WIRELESS_FLAG
FROM eim_admin.RCCL_OPT_OUT_TMP;
v_counter NUMBER := 0;
v_insert NUMBER := 0;
v_sysdate DATE:=SYSDATE;
v_chan_addr eim_admin.RCCL_OPT_OUT_TMP.chan_addr%TYPE;
BEGIN
DBMS_OUTPUT.PUT_LINE ('***Begining USP_EIM_CONTACT3_UPD, time is ' ||
TO_CHAR (v_sysdate, 'MON-DD-YYYY HH24:MI.SS'));
DBMS_OUTPUT.NEW_LINE;
FOR rec IN dnc_cursor LOOP
v_counter:=v_counter+1;
BEGIN
SELECT CHAN_ADDR
INTO v_chan_addr
FROM eim_admin.RCCL_OPT_OUT_TMP;
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('*** Could not lookup RCCL_OPT_OUT_TMP. ***');
DBMS_OUTPUT.PUT_LINE('ORA-'||SQLCODE||' '||SQLERRM);
END;
BEGIN
INSERT INTO siebel.S_PER_COMM_ADDR
(ADDR)
VALUES
(rec.CHAN_ADDR);
v_insert := v_insert + SQL%ROWCOUNT;
EXCEPTION WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('*** Failed to insert into siebel.S_PER_COMM_AADDR DDR ***');
DBMS_OUTPUT.PUT_LINE('ORA-'||SQLCODE||' '||SQLERRM);
END;
END LOOP;
--Output STATISTICS.
DBMS_OUTPUT.PUT_LINE('**Number records read :'||v_counter);
DBMS_OUTPUT.NEW_LINE;
DBMS_OUTPUT.PUT_LINE ('***Completing USP_EIM_CONTACT3_UPD, time is ' ||
TO_CHAR (SYSDATE, 'MON-DD-YYYY HH24:MI.SS'));
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE(' ****Error in USP_EIM_CONTACT3_UPD ****'||SQLCODE||SQLERRM);
END USP_EIM_CONTACT3_UPD;
I have already created the table. What we are going to do is using sqlloader to load our text files into our temp table. From there we are going to read the data from the temp table into a table that is already created.
Basically what I am trying to do is the following:
Cursor 1
select * from Temp where, State_Flag and National_Flag is not null
Insert into Siebel.S_PER_COMM_ADDR
set id = source var
set phone = chann_add var
If
wireless flag is not null
set method = 'Mobile"
else
set method = 'Home'
end if
If
Brand = 'r' and R_Flag is not null
set name flg1
set flag as 'T'
and so on.
I am getting confused as to where to call the variables:
set id = source var
set phone = chann_add var
I am also confused on how to do the sets and how to set the date for S_Flag and N_Flag.
One of the other issues is that I need to go and look at the base table to pick up anyone else that has the phone number and update or delete based on the data in the table.I am getting confused as to where to call the variables:
set id = source var
set phone = chann_add var have you defined your variables in the DECLARE area? is that a cursor variable or plain variable? need more info. -
Hello Experts,
i am facing problem in creating inquiry. Using transaction va11 i am creating inquiry.
inquiry type i selected ZGIN. when i create inquiry its asking me for sales order no
whether we need to give sales order no while creating inquiry.
Thanks in adavnce.
SaiHi Sainath,
For creating an Inquiry giving Inquiry document type is mandatory. In the T.code VA11 you have to enter the details lik Inquiry doc type, Sales Org, Distribution Channel and Division to create an Inquiry.
Normally the business cycle will be like this Inquiry->Quatation>Sales Order>Delivery---->Billing
So we can create a Sales order with or without refering to any existing Inquiry or Qutation. Where as Inquiry is concerned we need not to give any reference of an existing order.
Try creating an Inquiry w/o giving any order reference using the transaction VA11. If it is allowing to create,it is fine. Otherewise in VOV8, in the Inquiry document type control data, remove the settings "Reference mandatory" and try creating the Inquiry.
Regards, -
Problem in creating text file from report file
Hello Everybody...
I have problem in creating text file.
I had set System Parameter as below
DESTYPE : File
MODE : Character
DESNAME : gayu.txt
And ruler setting
Units : Character Cells
Character Cell Size : Horiziontal = 7
Vertiacle =12
GridSpacing : 1
no of snap points per grid spacing : 1
but when i run report it will give error
"REP_1219 M_2 or R_2 has no size -- length or width zero"
so is there any solution of that
or another way to convert report into text file?....Hi Folks,
Please don't go after that Error as its a very deceptive one. Please don't go for altering your design Or changing the size of items in your layout.
Similar errors I have come across in reports. I think its due to file transfer type. You might have transferred the file in Binary and your File Mode I am seeing it as CHAR.
This normally happens while making the Report Format as "Text". Either you change that format which I think is possible in your case as your basic requirement is making a report output of CHAR type.
Please check for this error in Metalink and proceed accordingly. I could fix similar errors when I changed Format type to PDF(from text).
Regards
Shibu -
Problem in creating new field using AET
Hi ,
We are facing a problem while creating a new field using AET.
[http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3414900)ID0190611650DB01471683520393954021End?blog=/pub/wlg/12716]
Im following this blog while creating the new field using AET.
After filling all the field details and trying to create a Transport request its going for a runtime error.
The error is happening in class CL_CRM_GENIL_AXT_API
method get_editable_properties.
data lr_field_ext type ref to cl_genil_field_extension.
field-symbols <axt_field_extension> type gtype_field_extension.
data lr_fieldext_ref type ref to if_axt_field_ext_access.
read table axt_field_extension_tab assigning <axt_field_extension> with key ext_bo = is_key-ext_bo
ext_bo_part = is_key-ext_bo_part
extension_id = is_key-extension_id.
lr_field_ext = <axt_field_extension>-axt_extension.
if sy-subrc = 0.
While Debugging we can see that the table axt_field_extension_tab is having zero values during the last execution.
But the Zfield is getting generated and the status is in green.
Any suggestions will be highly appreciated.
Regards,
Sijo.
Edited by: sijokjohn85 on Sep 9, 2009 1:00 PM
Edited by: sijokjohn85 on Sep 10, 2009 12:49 PMHi,
you posted the same question again in a later post.
Here is my answer:
Hi,
the reason that AET does not work is because there is/are missing entries in one of DB table.
Namely the enhance BO assignment to the UI Object Type.
Could you please tell me, what is the UI Object Type in you current IC application.
In order to figure this out, you can put mouse cursor in one of the field in the UI and then press F2.
Then you can go to SM30 in SAP GUI open the View BSPDLCV_OBJ_TYPE and search for the UI object type.
Select the UI object type and see whether any enhanced BO is defined.
In your case it should be empty, otherwise you can use AET in IC.
And if it is empty we need to figure out which enhanced BO is relevant for the given UI Object Type.
Regards,
Steve
P.S. But still you can raise a CSN message.
The "Create New Field" should be in active mode. -
Problem in creating output device for RICOH Aficio MP 2000 PCL 5e printer
HI,
i have problem in creating a output device for the RICOH Aficio MP 2000 PCL 5e as i am unable make out which device type should be assigned and what should be given in spool server tab.
i have pinged the printer in lan and it is connecting.
when i am giving the print from new ricoh printer its going to some other old printer in network.
we are unable to get the logo of our company when we are taking print from this printer from sap level.
kindly suggest what other things has to be taken care.
regards
anilHi,
shall i do in development and then import the same to quality and production.
also tell me what shd i put in these tabs
version-sapsripthandling-driver
list handling-printer driver
printer character set-character set-syt character set
we can find this tab in create option of device type.
when i am trying to save its showing it has to be done on program level.
kindly reply back as it will resolve the big issue for me.
thanks
anil
Maybe you are looking for
-
So once again, I am trying to create seperate external SWFs for my site in order to drastically reduce load times and each SWF loads a different section of my portfolio. This code worked for the first external SWF: var myLoader:Loader = new Loader();
-
How to verify maximum resolution supported by G62 laptop HDMI
Hi, I have a HP G62-b50sa laptop and am looking at purchasing a large monitor to use alongside it. The laptop has an Intel Graphics card (shared memory) and a HDMI output port. Looking at the manual, it mentions that the HDMI out supports 1080p, whic
-
Some Instruments Wont load and run in ESX25 others will?
For some reason I am having problems getting Pro Samples VOL 30 to load into ESX 24. I have other Pro Samples volumes which load no propel at all Obviously I have tried reinstalling but I continues to get the message (for example when loading Mandali
-
hi all, i have a material and date i want to create a report that show us that the matrial movemet days let spouse i have a material wich is abilable came 1 jan 2008 into our us industery. and come new to the industuries.if any user run the reoirt o
-
How do I get the iCloud icon to appear in my System Preference/Internet & Wireless section to turn it on. Again I only have Mobile Me icon. When I check for updating of software it says there are no updates. I currently have OS X Version 10.5.8 on