Regd: Procedure
hi friends,
i wanted to know that if i have created one procedure.
with the create or replace .....
then i have made some changes in the same and complied the procedure it will replaced with new changes.
But i can get old script again which was before changes.
or is any way to get that.
--Rajnish
Dear Rajnish!
For a limited period of time you may use flashback query to get your old code back.
sqlplus hr/hr
CREATE OR REPLACE PROCEDURE myProc
AS
BEGIN
DBMS_OUTPUT.PUT_LINE('Hello World!');
END;
SELECT text
FROM user_source
WHERE lower(name) LIKE 'myproc'
TEXT
PROCEDURE myProc
AS
BEGIN
DBMS_OUTPUT.PUT_LINE('Hello World!');
END;
CREATE OR REPLACE PROCEDURE myProc
AS
BEGIN
DBMS_OUTPUT.PUT_LINE('Hello World once again!');
END;
SELECT text
FROM user_source
WHERE lower(name) LIKE 'myproc'
TEXT
PROCEDURE myProc
AS
BEGIN
DBMS_OUTPUT.PUT_LINE('Hello World once again!');
END;
conn sys/oracle as sysdba
SELECT text
FROM dba_source
AS OF TIMESTAMP SYSTIMESTAMP - TO_DSINTERVAL('0 00:05:00')
WHERE LOWER(name) LIKE 'myproc'
TEXT
PROCEDURE myProc
AS
BEGIN
DBMS_OUTPUT.PUT_LINE('Hello World!');
END;Yours sincerely
Florian W.
Similar Messages
-
Hi All,
i am trying to implement one simple work flow in the GP, where two steps are there:-
1>Create Request
2>Approve Request.
I haev created collable obect, Action, block and process. I have configure the UWL for the GP fo the 2nd step as approval. I am gettign the created Item respective to the GP in the UWL.
When i am trying to click the Subject from the Table in the UWL for approving the created request i am not gettign the respective page in place of that i am getting error message like- Could not retrieve process instance: contact your system administrator.
If any one have solution or input for this please share the same.
Regards,
DeepakHi Deepak,
For bringing the task to UWL you need to create a GPconnector first.I think you have created that already,though your GP is coming on UWL.Now you need to modify the .xml for UWL.
To modify the .xml file go to system admin->system config->universal worklist & workflow->UWL administration->select GP connector->select UWL GP Config->click on download config.
download the .xml file and add your GP connector coding there.Below I am giving the modified .xml file.Please do the changes.
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE UWLConfiguration PUBLIC '-//SAP//UWL1.0//EN' 'uwl_configuration.dtd' [
]>
<UWLConfiguration version="2.0">
<ItemTypes>
<ItemType name="uwl.task.gp" connector="GuidedProceduresConnector" defaultView="uwlTaskGPView" defaultAction="launchGP" executionMode="default">
<Actions>
<Action name="launchGP" groupAction="no" handler="SAPWebDynproLauncher" referenceBundle="launch_sap" returnToDetailViewAllowed="yes" launchInNewWindow="no" launchNewWindowName="GPWindow" launchNewWindowFeatures="resizable=yes,scrollbars=yes,status=yes,toolbar=no,menubar=no,location=no,directories=no">
<Properties>
<Property name="WebDynproApplication" value="RuntimeUWL"/>
<Property name="WebDynproDeployableObject" value="sap.com/cafeugpuirt"/>
<Property name="DynamicParameter" value="app.workItemID=${item.externalId}"/>
<Property name="System" value="SAP_LocalSystem"/>
</Properties>
</Action>
</Actions>
</ItemType>
</ItemTypes>
<Views>
<View name="uwlTaskGPView" selectionMode="SINGLESELECT" width="98%" supportedItemTypes="uwl.task.gp" columnOrder="subject, process, creatorId, createdDate, dueDate, status" sortby="dueDate:ascend, createdDate:descend" tableDesign="STANDARD" visibleRowCount="10" headerVisible="no" queryRange="undefined" tableNavigationFooterVisible="yes" tableNavigationType="CUSTOMNAV" actionRef="" refresh="300" dueDateSevere="86400000" dueDateWarning="259200000" emphasizedItems="new" displayOnlyDefinedAttributes="yes" dynamicCreationAllowed="yes" actionPosition="bottom">
<Descriptions default="Guided Procedures">
<ShortDescriptions>
<Description Language="de" Description="Guided Procedures"/>
<Description Language="en" Description="Guided Procedures"/>
</ShortDescriptions>
</Descriptions>
<DisplayAttributes>
<DisplayAttribute name="phase" type="string" width="" sortable="yes" format="default" hAlign="LEFT" vAlign="BASELINE" maxTextWidth="0" headerVisible="yes">
<Descriptions default="Phase">
<ShortDescriptions>
<Description Language="de" Description="Phase"/>
<Description Language="en" Description="Phase"/>
</ShortDescriptions>
</Descriptions>
</DisplayAttribute>
<DisplayAttribute name="process" type="string" width="" sortable="yes" format="default" hAlign="LEFT" vAlign="BASELINE" maxTextWidth="0" headerVisible="yes">
<Descriptions default="Process">
<ShortDescriptions>
<Description Language="de" Description="Process"/>
<Description Language="en" Description="Process"/>
</ShortDescriptions>
</Descriptions>
</DisplayAttribute>
</DisplayAttributes>
</View>
</Views>
</UWLConfiguration>
Regards
Indranil
Award points for useful answer
Edited by: Indranil Chakrabarty on Dec 10, 2008 4:37 PM
Edited by: Indranil Chakrabarty on Dec 10, 2008 4:38 PM -
Regd. workflow and incompletion procedures
Hi,
can workflows or events be triggered from incompletion procedures? for eg. when a sales order is incomplete and saved, a workflow should start, which handles the process...
Regards,
VijayHi~ vijay.
I'm not sure that there is a workflow for it.
but, I think it's possible.
why don't you try like this.
1) make your own workflow templete.
2) find some place you want to code... I mean some kind of
user exit things.
in case of sale order.
Edit user exit 'userexit_save_document'.
check some field for incompletion procedure.
for example>
if vbap-taxm1 eq ' ' or
vbap-werks eq ' ' or
.... in case of some condition field for
incompletion procedure is imcompleted
call function 'SWE_EVENT_CREATE'
.... call workflow ....
endif.
But, There is a lot of impletion log for sales order, so when an order is created
and saved with impletion log, it calls an workflow.
and somebody get an workitem.... I think it's a little bit cumbersome.
In T-code <b>'V.02'</b>, you can check all the incompletion documents.
why don't you use v.02
I wish I could help you.
Kyung Woo -
Regd: calculation procedure
Hi
experts
i have problem when i am using country code: IN and Calculation type: INR
"NO CALCULATION PROCEDURE ASSIGNED TO COUNTRY IN"
i am using 800 client
is there was any problem with client?
or
what is the setting i can do to solve it?
please tell me?
thanking you
sivaGoto SPRO - FI - FI Global Settings - Tax on Sales/Purchasing - Basic Settings - Assign Country to Calcultaion procedure. This is used for calculation of taxes. Check for the tax calculation procedure and assign it to country code. talk to ur FI guy to solve this.
Client has nothing to do with this.
Reward if helpful..
Regards,
Srib -
Regd sync procedures , functions ,packages
i have like lot of procedures , functions ,packages in one environment which i want to copy into another enviranment . is there any other way to do it , in toad is there any easy way to do it?
hi ,
its oracle 9i database , i created an script with toad and finished it
my question is can we take export of procedures , packages and functions alone
and then import it . -
How to use stored Procedure in PLD
Hi All,
I have create a procedure for converting number to words in SQL. I want to call this procedure in PLD. Is this possible?
Thanks & Regards,
SheetalHi,Sheetal Sarode
First Create 2 funtions in SQL server: and apply trigger for system filed you can get data automatically amount in words when ever user is adding Outgoing payment.
1.set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
select dbo.AmountToWords (4980)
ALTER function dbo.AmountToWords
@InNumber Numeric(18,2)
--Returns the number as words.
returns VARCHAR(2000)
as
BEGIN
--SEt NoCount ON
Declare @Num Varchar(20)
Declare @Dec Varchar(3)
Declare @Return Varchar(2000)
Set @Dec = SubString(Convert(Varchar(20),@Innumber),Len(Convert(Varchar(20),@Innumber))-2,3)
Set @Num = SubString(Convert(Varchar(20),@Innumber),1, Len(Convert(Varchar(20),@Innumber))-3)
Declare @Hundred Char(8)
Declare @HundredAnd Char(12)
Declare @Thousand Char(9)
Declare @Lakh Char(5)
Declare @Lakhs Char(6)
Declare @Crore Char(6)
Declare @Crores Char(7)
Set @Hundred = 'Hundred '
Set @Thousand = 'Thousand '
Set @Lakh = 'Lakh '
Set @Lakhs = 'Lakhs '
Set @Crore = 'Crore '
Set @Crores = 'Crores '
Set @HundredAnd = 'Hundred '
if Len(@Num) = 1 -- One
Begin
Set @Return = dbo.GetTextValue(@Num)
End
Else if Len(@Num) = 2 -- Ten
Begin
Set @Return = dbo.GetTextValue(@Num)
End
Else if Len(@Num) = 3 -- Hundred
Begin
Set @Return = dbo.GetTextValue(SubString(@Num,1,1)) + @Hundred
IF SubString(@num,2,2) '00'
Set @Return = @Return + ' '
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,2,2))
End
Else if Len(@Num) = 4 -- thousand
Begin
Set @Return = dbo.GetTextValue(SubString(@Num,1,1)) + @Thousand
If SubString(@Num,2,1) '0'
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,2,1)) + @Hundred
IF SubString(@num,3,2) '00'
Set @Return = @Return + ''
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,3,2))
End
Else if Len(@Num) = 5 -- Ten Thousand
Begin
Set @Return = dbo.GetTextValue(SubString(@Num,1,2)) + @Thousand
If SubString(@Num,3,1) '0'
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,3,1)) + @Hundred
IF SubString(@num,4,2) '00'
Set @Return = @Return + ''
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,4,2))
End
Else if Len(@Num) = 6 -- Lakh
Begin
If SubString(@Num,1,1) = '1'
Set @Return = dbo.GetTextValue(SubString(@Num,1,1)) + @Lakh
Else
Set @Return = dbo.GetTextValue(SubString(@Num,1,1)) + @Lakhs
If SubString(@Num,2,2) '00'
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,2,2)) + @Thousand
If SubString(@Num,4,1) '0'
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,4,1)) + @Hundred
IF SubString(@num,5,2) '00'
Set @Return = @Return + ''
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,5,2))
End
Else if Len(@Num) = 7 -- Ten Lakhs
Begin
Set @Return = dbo.GetTextValue(SubString(@Num,1,2)) + @Lakhs
If SubString(@Num,3,2) '00'
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,3,2)) + @Thousand
If SubString(@Num,6,1) '0'
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,5,1)) + @Hundred
IF SubString(@num,6,2) '00'
Set @Return = @Return + ''
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,6,2))
End
Else if Len(@Num) = 8 -- Crore
Begin
Set @Return = dbo.GetTextValue(SubString(@Num,1,1)) + @Crore
If SubString(@Num,2,2) '00'
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,2,2)) + @Lakhs
If SubString(@Num,4,2) '00'
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,4,2)) + @Thousand
If SubString(@Num,6,1) '0'
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,6,1)) + @Hundred
IF SubString(@num,7,2) '00'
Set @Return = @Return + ' '
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,7,2))
End
Else if Len(@Num) = 9 -- Ten Crore
Begin
Set @Return = dbo.GetTextValue(SubString(@Num,1,2)) + @Crores
If SubString(@Num,3,2) '00'
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,3,2)) + @Lakhs
If SubString(@Num,5,2) '00'
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,5,2)) + @Thousand
If SubString(@Num,7,1) '0'
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,7,1)) + @Hundred
IF SubString(@num,8,2) '00'
Set @Return = @Return + ''
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,8,2))
End
Else if Len(@Num) = 10 -- Hundred Crore
Begin
Set @Return = dbo.GetTextValue(Substring(@Num,1,1)) + @Hundred
IF Substring(@Num,2,2) '00'
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,2,2))
Set @Return = @Return + @Crores
If SubString(@Num,4,2) '00'
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,4,2)) + @Lakhs
If SubString(@Num,6,2) '00'
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,6,2)) + @Thousand
If SubString(@Num,8,1) '0'
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,8,1)) + @Hundred
IF SubString(@num,9,2) '00'
Set @Return = @Return + ''
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,9,2))
End
Else if Len(@Num) = 11 -- Thousand Crore
Begin
Set @Return = dbo.GetTextValue(Substring(@Num,1,1)) + @Thousand
IF SubString(@Num,2,1) '0'
Set @Return = @Return + dbo.GetTextValue(Substring(@Num,2,1)) + @Hundred
IF Substring(@Num,3,2) '00'
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,3,2))
Set @Return = @Return + @Crores
If SubString(@Num,5,2) '00'
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,5,2)) + @Lakhs
If SubString(@Num,7,2) '00'
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,7,2)) + @Thousand
If SubString(@Num,9,1) '0'
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,9,1)) + @Hundred
IF SubString(@num,10,2) '00'
Set @Return = @Return + ''
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,10,2))
End
Else if Len(@Num) = 12 -- Ten thousand Crore
Begin
Set @Return = dbo.GetTextValue(Substring(@Num,1,2)) + @Thousand
IF SubString(@Num,3,1) '0'
Set @Return = @Return + dbo.GetTextValue(Substring(@Num,3,1)) + @Hundred
IF Substring(@Num,4,2) '00'
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,4,2))
Set @Return = @Return + @Crores
If SubString(@Num,6,2) '00'
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,6,2)) + @Lakhs
If SubString(@Num,8,2) '00'
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,8,2)) + @Thousand
If SubString(@Num,10,1) '0'
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,10,1)) + @Hundred
IF SubString(@num,11,2) '00'
Set @Return = @Return + ''
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,11,2))
End
Else if Len(@Num) = 13 -- Lakh Crore
Begin
Set @Return = dbo.GetTextValue(Substring(@Num,1,1)) + @Lakh
If Substring(@Num,2,2) '00'
Set @Return = @Return + dbo.GetTextValue(Substring(@Num,2,2)) + @Thousand
IF SubString(@Num,4,1) '0'
Set @Return = @Return + dbo.GetTextValue(Substring(@Num,4,1)) + @Hundred
IF Substring(@Num,5,2) '00'
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,5,2))
Set @Return = @Return + @Crores
If SubString(@Num,7,2) '00'
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,7,2)) + @Lakhs
If SubString(@Num,9,2) '00'
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,9,2)) + @Thousand
If SubString(@Num,11,1) '0'
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,11,1)) + @Hundred
IF SubString(@num,12,2) '00'
Set @Return = @Return + ''
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,12,2))
End
Else if Len(@Num) = 14 -- Ten Lakh Crore
Begin
Set @Return = dbo.GetTextValue(Substring(@Num,1,2)) + @Lakhs
If Substring(@Num,3,2) '00'
Set @Return = @Return + dbo.GetTextValue(Substring(@Num,3,2)) + @Thousand
IF SubString(@Num,5,1) '0'
Set @Return = @Return + dbo.GetTextValue(Substring(@Num,5,1)) + @Hundred
IF Substring(@Num,6,2) '00'
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,6,2))
Set @Return = @Return + @Crores
If SubString(@Num,8,2) '00'
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,8,2)) + @Lakhs
If SubString(@Num,10,2) '00'
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,10,2)) + @Thousand
If SubString(@Num,12,1) '0'
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,12,1)) + @Hundred
IF SubString(@num,13,2) '00'
Set @Return = @Return + ''
Set @Return = @Return + dbo.GetTextValue(SubString(@Num,13,2))
End
If @Dec '.00'
Set @Return = @Return + ' And ' + dbo.GetTextValue(SubString(@Dec,2,2)) + 'Paise'
Return @return
END
2.This is for Get texl vavlue funtion:
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER function dbo.GetTextValue
@num varchar(20)
returns VARCHAR(2000)
as
BEGIN
Declare @Return varchar(2000)
Declare @temp char(1)
Declare @tempZero char(1)
Declare @Zero char(1)
Declare @One char(4)
Declare @Two char(4)
Declare @Three char(6)
Declare @Four char(5)
Declare @Five char(5)
Declare @Six char(4)
Declare @Seven char(6)
Declare @Eight char(6)
Declare @Nine char(5)
Declare @Eleven char(7)
Declare @Twelve char(7)
Declare @Thirteen char(9)
Declare @Fourteen char(9)
Declare @Fifteen char(8)
Declare @Sixteen char(8)
Declare @Seventeen char(10)
Declare @Eighteen char(9)
Declare @Nineteen char(9)
Declare @Ten char(4)
Declare @Twenty char(6)
Declare @Thirty char(7)
Declare @Forty char(6)
Declare @Fifty char(6)
Declare @Sixty char(6)
Declare @Seventy char(8)
Declare @Eighty char(7)
Declare @Ninety char(7)
set @tempZero = '0'
set @Zero = ''
set @One = 'One '
set @Two = 'Two '
set @Three = 'Three '
set @Four = 'Four '
set @Five = 'Five '
set @Six = 'Six '
set @Seven = 'Seven '
set @Eight = 'Eight '
set @Nine = 'Nine '
set @Eleven = 'Eleven '
set @Twelve = 'Twelve '
set @Thirteen = 'Thirteen '
set @Fourteen = 'Fourteen '
set @Fifteen = 'Fifteen '
set @Sixteen = 'Sixteen '
set @Seventeen = 'Seventeen '
set @Eighteen = 'Eighteen '
set @Nineteen = 'Nineteen '
set @Ten = 'Ten '
set @Twenty = 'Twenty '
set @Thirty = 'Thirty '
set @Forty = 'Forty '
set @Fifty = 'Fifty '
set @Sixty = 'Sixty '
set @Seventy = 'Seventy '
set @Eighty = 'Eighty '
set @Ninety = 'Ninety '
IF Len(@num) = 2
Begin
If SubString(@num,2,1) '0'
Begin
Set @temp = SubString(@num,1,1)
Set @Return = dbo.GetTextValue(@temp+@tempZero)
Set @Return = @Return + dbo.GetTextValue(SubString(@num,2,1))
End
END
If @num = 0
Begin
set @Return = @Zero
End
Else if @num = 1
Begin
set @Return = @One
End
Else if @num = 2
Begin
set @Return = @Two
End
Else if @num = 3
Begin
set @Return = @Three
End
Else if @num = 4
Begin
set @Return = @Four
End
Else if @num = 5
Begin
set @Return = @Five
End
Else if @num = 6
Begin
set @Return = @Six
End
Else if @num = 7
Begin
set @Return = @Seven
End
Else if @num = 8
Begin
set @Return = @Eight
End
Else if @num = 9
Begin
set @Return = @Nine
End
Else if @num = 10
Begin
set @Return = @Ten
End
Else if @num = 11
Begin
set @Return = @Eleven
End
Else if @num = 12
Begin
set @Return = @Twelve
End
Else if @num = 13
Begin
set @Return = @Thirteen
End
Else if @num = 14
Begin
set @Return = @Fourteen
End
Else if @num = 15
Begin
set @Return = @Fifteen
End
Else if @num = 16
Begin
set @Return = @Sixteen
End
Else if @num = 17
Begin
set @Return = @Seventeen
End
Else if @num = 18
Begin
set @Return = @Eighteen
End
Else if @num = 19
Begin
set @Return = @Nineteen
End
Else if @num = 20
Begin
set @Return = @Twenty
End
Else if @num = 30
Begin
set @Return = @Thirty
End
Else if @num = 40
Begin
set @Return = @Forty
End
Else if @num = 50
Begin
set @Return = @Fifty
End
Else if @num = 60
Begin
set @Return = @Sixty
End
Else if @num = 70
Begin
set @Return = @Seventy
End
Else if @num = 80
Begin
set @Return = @Eighty
End
Else if @num = 90
Begin
set @Return = @Ninety
End
Return @Return
END
3. Create trigger for OCHO table:
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
=============================================
Author: <Author,,Name>
Create date: <Create Date,,>
Description: <Description,,>
=============================================
ALTER TRIGGER AmountToWordsTrigger
ON dbo.OCHO
AFTER INSERT,UPDATE
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
UPDATE dbo.OCHO
SET TotalWords = dbo.AmountToWords (LinesSum)+'Only'
WHERE CheckKey IN ( SELECT CheckKey From Inserted)
END
it will update exisitng filed i.e.,Amount in words. call this field in your PLD.it will help you to get Amount in words through PLD
Regds,
sampath kumar devunuri.. -
Regarding the pricing procedure in SRM
Hi gurus,
Can anybody tell me how the pricing procedure in SRM to be used ???......And can i use this for bid invitation.
Kindly help....
Regds
KumarHi
Please check the in OVKK, weather you have maintained correctly or not.Also check in the Billing document type details what is the Document pricing procedure that has been maintained.
Regards
Srinath -
To get the the out put of the procedure..help needed
hi all,
i have a procedure :
CREATE OR REPLACE PROCEDURE EN_GetCategory
StaffID IN VARCHAR2 DEFAULT NULL,
ResultCategory OUT VARCHAR2
AS
v_exec_tx varchar2(2000);
Condition VARCHAR2(1000);
Category VARCHAR2(1);
SQL_ADV VARCHAR2(2000);
Cnt NUMBER(10);
Cnt1 NUMBER(10);
CURSOR curCategory IS
SELECT SMC.Category,SMC.Condition FROM ST_MS_Category SMC ORDER BY OrderRowNo;
BEGIN
EXECUTE IMMEDIATE 'TRUNCATE TABLE TMP';
OPEN curCategory;
FETCH curCategory INTO Category, Condition;
while curCategory%FOUND
LOOP
BEGIN
v_exec_tx:='SELECT COUNT(*) FROM ST_EMPLOYEE WHERE StaffID=''' || EN_GETCATEGORY.STAFFID ||''' AND ' || EN_GETCATEGORY.CONDITION;
EXECUTE IMMEDIATE v_exec_tx into Cnt;
IF Cnt > 0 THEN SELECT COUNT(*) INTO CNT1 FROM tmp ;
IF CNT1> 0 THEN
UPDATE tmp SET CAT = Category ;
ELSE
INSERT INTO tmp VALUES (Category );
END IF;
END IF;
FETCH curCategory INTO Category, Condition;
END;
END LOOP;
CLOSE curCategory;
BEGIN
FOR REC IN ( SELECT CAT FROM tmp
LOOP
EN_GetCategory.ResultCategory := REC.CAT;
END LOOP;
END;
END;
i need to execute this procedure..
i tried EXEC EN_GETCATEGORY('812005','');
but getting error invalid sql statemnt..
i think for this we have to write some more code can u please help to to find the output ofthis procedure..
Thanks In advanceHi,
i tried EXEC EN_GETCATEGORY('812005','');It's execute Procedure_name('Parameters');
Regds.What tosh! "exec" is perfectly ok to use to call a procedure.
The problem is with the OUT parameter. You need to declare a variable into which the OUT value can be put. -
Handling errors inside Procedure
Hi..
I have created the following procedure.. and the procedure work out well when there are no duplicates in the table.
If the duplicate arises the errors messages is also displayed..
CREATE OR REPLACE PROCEDURE P_MC_IPS (lDate IN
DATE) IS
PROJ_INV VARCHAR2(50);
MAC_IP VARCHAR2(100);
CURSOR M_IP IS
SELECT DISTINCT A.TITLE TITLE,B.MACHINE_IP MACHINE_IP FROM JOB_LIST A,TD B WHERE A.JOBNUMBER = B.JOBNO AND B.ACT_DATE = TO_CHAR(ldate,'DD-MON-YYYY');
BEGIN
OPEN M_IP;
LOOP
FETCH M_IP INTO PROJ_INV,MAC_IP;
EXIT WHEN M_IP%NOTFOUND;
INSERT INTO NET_ADDRESS(P_INV,MACHINE_IPS) VALUES(PROJ_INV,MAC_IP);
COMMIT;
END LOOP;
CLOSE M_IP;
EXCEPTION
WHEN DUP_VAL_ON_INDEX THEN
DBMS_OUTPUT.PUT_LINE('DUPLICATE RECORDS EXISTS');
END P_MC_IPS;
The Problem here is I need to insert other values except the datas that has duplicate index.
I need to insert the data except the duplicate record when i run the procedure again.
I need to use the exception type "UP_VAL_ON_INDEX " to handle the exception. Can anyone help out regd. this
Kindly help me on this issue.
Thanks
gayathriUse an inner block to handle the exception.
CREATE OR REPLACE PROCEDURE p_mc_ips
(lDate IN DATE)
IS
BEGIN
FOR lrec IN (SELECT DISTINCT a.title title,b.machine_ip machine_ip
FROM job_list a,td b
WHERE a.jobnumber = b.jobno
AND b.act_date = TO_CHAR(ldate,'DD-MON-YYYY'))
LOOP
BEGIN
INSERT INTO net_address(p_inv,machine_ips)
VALUES(lrec.title, lrec.machine_ip);
EXCEPTION
WHEN DUP_VAL_ON_INDEX THEN
DBMS_OUTPUT.PUT_LINE('DUPLICATE RECORDS EXISTS');
END;
END LOOP;
COMMIT;
END p_mc_ips;You'll have noticed that I've streamlined your code a bit. We'll save using FORALL and anti-joins for another day ;)
Cheers, APC -
Condition type Inforecord & Pricing Procedure
Dear All,
I have maintained the new pricing procedure and assigned to the same Vendor schema which is maintained in VENDOR MASTER. If I create Inforecord and If select the condition type, it saying that condition is not maintained (It is refering for old Pricing procedure), in PO I can select it and calculate.
Why Inforecord it is not allowing to select the condition which is maintained in new priceing procedure, even though if I assinged the vendor schema why it is refereing for Old pricing procedure. i have removed the old pricing procedure from this vendor schema.
regds
MadhuHi Madhu
Pl check whether you maintianed the access sequence 0002 for the gross price condition type of your new pricing procedure.
If you ensure this, once you change the schema, in vendor master record, system prompts new pricing procedure in inforecord.
warm regards
sairam akundi -
Different DOCUMENT PRICING PROCEDURES in SalesOrder and Billing
Hi Experts,
Can you please explain how system reacts and how it calculates PRICING if we maintain different DOCUMENT PRICING PROCEDURE in OR and different DOCUMENT PRICING PROCEDURE in F2?
Thanks,
Kanna.
Edited by: kanna palle on Aug 29, 2008 3:17 PMIt will use the dopp as the absis to derive the pricing procedure to calculate.Hence the pricing for Order and billing will be totally different. It depends on what pricing procedures you have maintained at both levels and if the conditions therein are different and for which conditions are different then it will have very little meaning though pricing will be calculated. Copy control would have no meaning then.Hence you should ensure consistency of data when redetermining pricing as well.
regds
Jude -
Tax procedure compatability in different countries
Hi All,
Can we have two companies (Company codes) operating in differeng countries under same client?
We are operating in India, can we have another subsidiary say in Spain within same Client?
And is the Tax Procedure Company Code specific or Client?
We are currently using TAX INJ condition, will it be compatable to the Tax procedure of Spain or we have to migrate to TAX INN condition to incorporate TAX procedure of Spain.
Regds,
RiteshHi Ritesh,
Yes. you can have two company codes operating under same client. You can have a company code for India and another for Spain But keeping under same client. This allows you to share the settings like master data, config settings, and also it enables intercompany transactions between India and Spain .
Tax Procedure is country specific actually. Hence you will be assigning your tax calculation procedure for a specific country i.e in this case India and spain respectively. Transaction code is OBBG. And the procedures will be different.
Hope it helps!
Thanks & Regards,
Preethi -
Help to create log message for the failure of procedure
Hi,
I want to create a log message ,if my stored procedure stops executing or gets hanged due to some reasons.
Can any one guide me how can i include this log message in some external file so as each time my stored procedure fails a message will be logged in the file that the procedure has failed or hanged.
pls help
regds
debashisI'm afraid I don't understand what you're trying to accomplish here. What is "command is successfully executed" intended to represent in your CREATE statement and in the anonymous PL/SQL block.
What do you mean "it should occur in row by row order" and "success message of execution should be displayed in the log file"?
Why are you trying to log to an external file rather than a table in the database? When you start talking about "row by row" and "success message", that starts to imply that you're going to be logging a lot of stuff. Logging a lot of data to an external file is going to be a substantial performance burden. Are you sure that is what you want to accomplish?
Justin -
Pls send step by step procedure to create generated idoc type in ECC 6.0
Hi
pls send me the step by step procedure In ECC 6.0 Version
1) To create generated idoc type
2) To extended idoc type
3) How we can add structure to custom segments
thanks in advancehi,
check these likns...
ALE/ IDOC
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.sappoint.com/abap/ale.pdf
http://www.sappoint.com/abap/ale2.pdf
http://www.sapgenie.com/sapedi/idoc_abap.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
http://www.allsaplinks.com/idoc_sample.html
http://www.sappoint.com/abap.html
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.allsaplinks.com/idoc_sample.html
ALE/ IDOC/ XML
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://www.thespot4sap.com/Articles/SAP_XML_Business_Integration.asp
http://help.sap.com/saphelp_srm30/helpdata/en/72/0fe1385bed2815e10000000a114084/content.htm
IDOC Convertion
/people/kevin.wilson2/blog/2005/12/07/changing-fields-in-an-idoc-segment
regds,
paras -
Can i call the pricing procedure in Purchase req for the purpose of tax calculation
regds
shaileshHi,
in requisitions taxcodes and tax jurisdiction are not used or assigned.
This is only done in the PO, contract, etc. Since there is no pricing in
requisitions there is also not tax information. This is the standard
design.
Regards,
Edit
Maybe you are looking for
-
how do I connect my i phone 5s to my home wifi? keeps saying unable to connect
-
How do i move my itunes to a new laptop if i don't have the old laptop?
how do i move my itunes to a new laptop if i don't have the old laptop?
-
Reinstalling Office 2008 on MacBook Pro
I had to have the hard drive on my MacBook Pro replaced. When i got it back i tried to reinstall Office 2008. After the first time, when i tried to activate it nothing would happen - the icon/s (e.g., for Excel) would "bounce" up and down but no ap
-
Flash drive btwn PC & MAC wont work...
I've been using a 64g flash drive between my macbook pro, and the windows copmuters at school, and I plugged it in to a PC to load some footage for a project, but when I plug it into my mac, it wont register at all, on the desktop, in finder, or disk
-
How can I download CoolEdit MAC free version?
How can I download CoolEdit MAC free version? How can I find the oldest version of CoolEdit available for MAC? I have MacBook Pro running OSX 10.6.8