Stop MB01 in Customer Function EXIT_SAPLMCB1_001
Hi Gurus!
I'm implementing Customer Function EXIT_SAPLMCB1_001 with some custom checks.
I got a problem: how i can stop the MB01 if the checks are not validated?
If i put a Message type E, i got a dump!
Ty!
Try to use the exit of enhancement MBCF0002
Max
Similar Messages
-
Hi,
I've put a break point in one of the function module, which was called by such :
CALL Customer-Function '002'...
But it wouldn't stop at my break-point...
Thanks
William WilstrothHi gentlemen,
I am still analysing on this issue. Will get back to everyone on this....
I suspect most likely is the naming convention in the function group and the function module is conflicting. There was an information from my colleague that there is background internal (customized) checking on the function group and fm naming convention checking...
So I will see how my analysis goes on this... that is affecting my breakpoints...
Thanks for all your help and advices..,
William Wilstroth -
Unable to debug an exit in CALL CUSTOMER FUNCTION 003
Hi Guys,
I have an exit EXIT_SAPMV45A_003 that is called by CALL CUSTOMER FUNCTION 003. I had placed a break point at
CALL CUSTOMER FUNCTION 003 and the debugger stops here but i am unable to debug inside this to reach into
the code in EXIT_SAPMV45A_003 even after setting the system debugging on & Update debugging
ON.
Can someone help me with this?
thanks
DanYou have to include that Enhancement of that exit in the Project and Activate that project in the CMOD.
The Enhancement for the exit EXIT_SAPMV45A_003 is V45A0003.
Create a project in CMOD
And inclue V45A0003 in the project.
Activate the Project.
Now, it will stop at break point.
Regards,
Naimesh Patel -
Debugging customized function module when Idoc is triggered via ALE
Hi,
Whenever we save the billing document, an outbound idoc is triggered via ALE. The logic for the data to be included in the idoc is written in a customized function module.
However we are making some changes and would like to include some more data in the idoc. But we find that when we put a breakpoint in the function module, on saving the billing document, the flow does not stop at the break point. We are 100% sure that the code in the function module gets executed based on the data in the idoc.
How do we get into debug mode and break the flow in the function module so that we can debug in the function module?
Any help would be greatly appreciated.
Thanks in advance,
MickHi Mick, this might be of some help 4 u.
ALE IDOC
Sending System(Outbound ALE Process)
Tcode SALE - for
a) Define Logical System
b) Assign Client to Logical System
Tcode SM59-RFC Destination
Tcode BD64 - Create Model View
Tcode BD82 - Generate partner Profiles & Create Ports
Tcode BD64 - Distribute the Model view
Message Type MATMAS
Tcode BD10 - Send Material Data
Tcode WE05 - Idoc List for watching any Errors
Receiving System(Inbound ALE )
Tcode SALE - for
a) Define Logical System
b) Assign Client to Logical System
Tcode SM59-RFC Destination
Tcode BD64 - Check for Model view whether it has distributed or not
Tcode BD82 -- Generate partner Profiles & Create Ports
Tcode BD11 Getting Material Data
Tcode WE05 - Idoc List for inbound status codes
ALE IDOC Steps
Sending System(Outbound ALE Process)
Tcode SALE ?3 for
a) Define Logical System
b) Assign Client to Logical System
Tcode SM59-RFC Destination
Tcode BD64 - Create Model View
Tcode BD82 - Generate partner Profiles & Create Ports
Tcode BD64 - Distribute the Model view
This is Receiving system Settings
Receiving System(Inbound ALE )
Tcode SALE - for
a) Define Logical System
b) Assign Client to Logical System
Tcode SM59-RFC Destination
Tcode BD64 - Check for Model view whether it has distributed or not
Tcode BD82 -- Generate partner Profiles & Create Ports
Tcode BD11 Getting Material Data
Tcode WE05 - Idoc List for inbound status codes
Message Type MATMAS
Tcode BD10 - Send Material Data
Tcode WE05 - Idoc List for watching any Errors
1)a Goto Tcode SALE
Click on Sending & Receiving Systems-->Select Logical Systems
Here Define Logical Systems---> Click on Execute Button
go for new entries
1) System Name : ERP000
Description : Sending System
2) System Name : ERP800
Description : Receiving System
press Enter & Save
it will ask Request
if you want new request create new Request orpress continue for transfering the objects
B) goto Tcode SALE
Select Assign Client to Logical Systems-->Execute
000--> Double click on this
Give the following Information
Client : ERP 000
City :
Logical System
Currency
Client role
Save this Data
Step 2) For RFC Creation
Goto Tcode SM59-->Select R/3 Connects
Click on Create Button
RFC Destination Name should be same as partner's logical system name and case sensitive to create the ports automatically while generating the partner profiles
give the information for required fields
RFC Destination : ERP800
Connection type: 3
Description
Target Host : ERP000
System No:000
lan : EN
Client : 800
User : Login User Name
Password:
save this & Test it & RemortLogin
3)
Goto Tcode BD64 -- click on Change mode button
click on create moduleview
short text : xxxxxxxxxxxxxx
Technical Neme : MODEL_ALV
save this & Press ok
select your just created modelview Name :'MODEL_ALV'.
goto add message type
Model Name : MODEL_ALV
sender : ERP000
Receiver : ERP800
Message type :MATMAS
save & Press Enter
4) Goto Tcode BD82
Give Model View : MODEL_ALV
Partner system : ERP800
execute this by press F8 Button
it will gives you sending system port No :A000000015(Like)
5) Goto Tcode BD64
seelct the modelview
goto >edit>modelview-->distribute
press ok & Press enter
6)goto Tcode : BD10 for Material sending
Material : mat_001
Message Type : MATMAS
Logical System : ERP800
and Execute
7)goto Tcode : BD11 for Material Receiving
Material : mat_001
Message Type : MATMAS
and Execute --> 1 request idoc created for message type Matmas
press enter
Here Master Idoc set for Messge type MATMAS-->press Enter
1 Communication Idoc generated for Message Type
this is your IDOC
Change Pointers
I know how to change the description of a material using ALE Change Pointers.
I will give the following few steps
1) Tcode BD61---> check the change pointers activated check box
save and goback.
2) Tcode BD50---> check the MATMAS check box save and comeback.
3) Tcode BD51---> goto IDOC_INPUT_MATMAS01 select the checkbox save and comeback.
4) Tcode BD52---> give message type : matmas press ok button.
select all what ever you want and delete remaining fields.
save & come back.
5) 5) go to Tcode MM02 select one material and try to change the description and save it
it will effects the target systems material desciption will also changes
6) goto Tcode SE38 give program Name is : RBDMIDOC and Execute
give Message type : MATMAS and Executte
ALE/IDOC Status Codes/Messages
01 Error --> Idoc Added
30 Error --> Idoc ready for dispatch(ALE Service)
then goto SE38 --> Execute the Program RBDMIDOC
29 Error --> ALE Service Layer
then goto SE38 --> Execute the Program RSEOUT00
03 Error --> Data Passed to Port ok
then goto SE38 --> Execute the Program RBDMOIND
12 Error --> Dispatch ok
Inbound Status Codes
50 Error --> It will go for ALE Service Layer
56 Error --> Idoc with Errors added
51 Error --> Application Document not posted
65 Error --> Error in ALE Service Layer
for 51 or 56 Errors do the following steps
goto WE19 > give the IDOC Number and Execute>
Press on Inbound function Module
for 65 Error --> goto SE38 --> Execute the Program RBDAPP01 then your getting 51 Error
cheers,
Hema. -
Customer function or Badi for MB21
Hello,
I'm looking for a customer function or BADI for MB21 to check values entered in the header.
I just tried MB_RESERVATION_BADI using DATA_MODIFY or DATA_CHECK interface,but in the first case you cannot use error messages (that's what I need to stop process),well you could use but it get you out of the MB21!
In the second case you can use error messages (with raise external_message) but
the transaction doesn't stop in the dynpro header.
I also used MBCF0007 but it's after the commit ...in this case I don't know how could be usefully,I need to check before it.
Anyone know if I need to try migrating MBCF0007 to BADI ? Could this help me ?
Or there something else ?
I was thinking to move MBCF0007 user extt before commit....
Thank you !Hi,
look at this
Exits to change Destination Bin and Storage type during TO creation
Thanks,
Gaurav. -
Unable to set breakpoint at statement CALL CUSTOMER-FUNCTION
HI,
I am try to set break point at CALL CUSTOMER-FUNCTION , to know the exit name for VA01 screen.
But even after setting the break point it is not stopping . can anyone tell me wht could be the problem.
i am setting like this ,
1) entering '/h'
2) from menu BREAKPOINTS->BREAKPOINT AT -> STATMENT
3) Enter.
4)f8
mineis Ecc 5.0 version.
please let me knowHi,
Here is the final answer to your problem.
CALL CUSTOMER-FUNCTION does NOT call the function module if it is not linked to an active project. Thus, a break-point in the function module will be ineffective.
So make sure you have linked it to a project.
Also refer this nice link on wiki for User Exits.
[Customer Exits (CMOD)|http://wiki.sdn.sap.com/wiki/display/ABAP/CustomerExits%28CMOD%29]
Hope this solves your problem, close the thread if it does solve.
Regards
Abhii
Edited by: Abhii on Aug 27, 2010 8:47 PM -
Hi Seniors,
There is an implementation of a function module exit " EXIT_SAPLEINM_002" from the project "MM06E001". This will be called in the execution of another function module in a custom program. As we dubug the program, the debugger stops at the break point of the statement " Customer Function '002' , but does not go into it. What are the ways we can debug a function module exit.
Thank you,
Chaitanya
Edited by: C N Chaitanya on Nov 8, 2011 10:10 PMHi Chaitanya,
In transaction CMOD create a Z project and inside that Z project assign enhancement "MM06E001". and activate.
After activation of project it will execute your code in exit EXIT_SAPLEINM_002.
Thanks,
Vijay -
How to write the custom Function Module to trigger the Alert.
Hi all,
I have developed a custom alert category in Tx - alrtcatdef. Now i want to trigger it from my custom function module. what should i do or what is the procedure to trigger the alert from my custom function module.
Arul Jothihi arul,
try this program.
RSALERTTEST.
check out this link...
<a href="/people/ginger.gatling/blog/2005/12/02/innovative-ways-to-use-alerts:///people/ginger.gatling/blog/2005/12/02/innovative-ways-to-use-alerts
regs,
jaga -
How to create a custom function module with the records in SAP R/3?
Hi All,
How to create a custom function module with the records in SAP R/3? Using RFC Adapter I have to fetch the custom function module records.
Regards
SaraHi
goto se37...here u need to create a function group... then u need to create a function module. inside assign import/export parameters. assign tables/exceptions. activate the same. now write ur code within the function module
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm
Look at the below SAP HELP links, These links will show you the way to create a Function Module
http://help.sap.com/saphelp_nw04/helpdata/en/26/64f623fa8911d386e70000e82011b8/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm -
How to bring the custom function module in WE42?
Hi,
I have created a custom function module to post a custom idoc.
Process code has been created thro WE42 and WE57 is done.
Still I am not able to see the custom function module in the list (WE42) in order to assign it to process code.
May i know the reason for this?
Thanks.
ThiyaguWhat makes you think that it should be visible in WE42? There is no F4-value help for this and you haven't added it manually yet, right.
In WE42 you can manually add entries, so that's what I would do. -
SSRS - Pass Field Value List To Custom Function Assembly And Display Result
I have written a SQL Server Reporting Services custom function as a C# assembly DLL and added it to my report. The purpose of the function is to search for outlier records in a collection of data. The data is represented as an array of floating point -tuplets
(float[][]). In a medical patient database, these might be things such as blood pressure, cholesterol, hight, weight, waist measurement, etc.
Several user input parameters are provided in the report, including numeric seed values for this particular algorithm. One multivalued parameter is a list of the numeric columns to be used as input to the algorithm because, importantly,
the user can choose any subset of the value columns. I have a tablix that will display columns from the dataset conditionally, based on which of those columns are chosen.
At this point, there are two issues I'm having difficulty with:
How do I, in the course of running the report, take just the numeric columns that the user has chosen (ignoring all others in the dataset) and pass them as a float[][] to my custom function? Or is there something in the
Microsoft.ReportingServices namespace that I should use to query an input dataset and convert it to an array in my C# code?
How can I present the array subset returned by my custom function in a tablix in the report?
Note: One thought that occurs to me is that outlier records tablix could be contained in a subreport, but I'm not clear on the logistics of passing dataset field results from a master report to a subreport.
I envision a final report when run to be similar to the following:
- Mark Z.Hi Mark,
Sorry for the delay.
From your description, you want to pass the dataset data to a custom code array, and return the subset of the array, right? In this case, you can use a custom function to add the data to array, and use the a custom function to sort the data base on your
requirement and then use a function to get the subset of the array. Here are some sample custom code for your reference.
Add to arryay
Dim values As System.Collections.ArrayList=New System.Collections.ArrayList()
Function SetText(ByVal value As Integer) As Integer
values.Add(value)
return value
End Function
Sort array
Function Sort()
Dim i as Integer
Dim j as Integer
Dim t as Integer
Dim n as Integer=values.Count-1
For i=n To 1 Step-1
For j=0 To i-1
if values(j)<values(j+1) Then
t=values(j)
values(j)=values(j+1)
values(j+1)=t
End if
Next j
Next i
End Function
Return value.
Function Rank(ByVal value As Integer)
return values(value)
End Function
Assume that you pass [Weight] field to array, you can use the expression below on the Weight column:
=Code.SetText(Fields!Weight.Value)
Then use the expression below to get the values.
PatientID:=Sort() & Lookup(Code.Rank(0),Fields!Weight.Value,Fields.Patient.Value,"Dataset")
Height:=Lookup(Code.Rank(0),Fields!Weight.Value,Fields.Height.Value,"Dataset")
Weight:=Code.Rank(0)
Hope this helps.
Regards,
Charlie Liao
If you have any feedback on our support, please click
here.
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place. -
Report Template driven by custom functions
Hello,
I'm a newbie, and i'm trying to design a report template driven by a vw and/or stored proc to display information on a letterhead report. Such as names that can change at any time. I have another interface linked to the vw/sp to change that information at any time. What i'm trying to get is the idea of how to create a template letterhead report that i don't have to go back into crystal to change whenever the administration name changes.
Does anybody have any ideas or examples? I'm thinking Custom Functions are the way to go but, i just don't know how to get started with using them if that's the way to go.
Thanks in advance!Please re-post if this is still an issue
-
Error in Including the Custom function in Custom schema ...
Hi Experts ,
I developed a time custom Function through PE04 , Z_5RT and included in Custom Schema , ZM04, while executing in PT60 using the schema ZM04 an error coming . Any configuration required to include custom function in a schema .
Thanks and regards
Renjith MPYou are just going to place the custom function in the 'Func' field of schema.
Check the counry assignment, parameters & finally you have to activate the function. Check T52A0 for correct internal number.
http://help.sap.com/erp2005_ehp_04/helpdata/EN/96/79bc54b27911d1a5400000e83ddb11/frameset.htm
Regards
N Navaneethan
Edited by: Navaneethan on Dec 15, 2008 4:30 PM -
Could not find Model while pointing to a custom Function Group
Hello ,
I am on EP7.0 ERP05 NW04s and trying to modify ESS Address application to point to a custom function group rather than the standard one . When I tried to do that by changing the mapping for the ReadInfotype I got certain compilation errors ,I fixed those and then got the following error at runtime:
com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Couldnt find info for class com.sap.xss.hr.per.us.address.custom_model_custom.Zhrxss_Per_Read_P0006_Us_Input in model com.sap.xss.hr.per.us.address.model.HRXSS_PER_P0006_US@10c7f0a[scope=APPLICATION_SCOPE]
at com.sap.tc.webdynpro.modelimpl.dynamicrfc.DynamicRFCModelClass.associatedModelClassInfo(DynamicRFCModelClass.java:220)
at com.sap.tc.webdynpro.modelimpl.dynamicrfc.DynamicRFCModelClass.elementIndexForFrontendName(DynamicRFCModelClass.java:1359)
at com.sap.tc.webdynpro.modelimpl.dynamicrfc.DynamicRFCModelClass.setAttributeValueAsString(DynamicRFCModelClass.java:664)
at com.sap.xss.hr.per.us.address.custom_model_custom.Zhrxss_Per_Read_P0006_Us_Input.setInfty(Zhrxss_Per_Read_P0006_Us_Input.java:162)
at com.sap.xss.hr.per.us.address.fc.wdp.IPublicFcPerAddressUS$IReadInfotypeElement.setInfty(IPublicFcPerAddressUS.java:11824)
at com.sap.xss.hr.per.us.address.fc.FcPerAddressUS.readRecord(FcPerAddressUS.java:271)
at com.sap.xss.hr.per.us.address.fc.wdp.InternalFcPerAddressUS.readRecord(InternalFcPerAddressUS.java:692)
at com.sap.xss.hr.per.us.address.fc.FcPerAddressUSInterface.readRecord(FcPerAddressUSInterface.java:150)
at com.sap.xss.hr.per.us.address.fc.wdp.InternalFcPerAddressUSInterface.readRecord(InternalFcPerAddressUSInterface.java:230)
at com.sap.xss.hr.per.us.address.fc.wdp.InternalFcPerAddressUSInterface$External.readRecord(InternalFcPerAddressUSInterface.java:306)
at com.sap.xss.hr.per.us.address.overview.VcPerAddressUSOverview.onBeforeOutput(VcPerAddressUSOverview.java:267)
at com.sap.xss.hr.per.us.address.overview.wdp.InternalVcPerAddressUSOverview.onBeforeOutput(InternalVcPerAddressUSOverview.java:275)
at com.sap.xss.hr.per.us.address.overview.VcPerAddressUSOverviewInterface.onBeforeOutput(VcPerAddressUSOverviewInterface.java:158)
at com.sap.xss.hr.per.us.address.overview.wdp.InternalVcPerAddressUSOverviewInterface.onBeforeOutput(InternalVcPerAddressUSOverviewInterface.java:140)
at com.sap.xss.hr.per.us.address.overview.wdp.InternalVcPerAddressUSOverviewInterface$External.onBeforeOutput(InternalVcPerAddressUSOverviewInterface.java:224)
at com.sap.pcuigp.xssfpm.wd.FPMComponent.callOnBeforeOutput(FPMComponent.java:602)
at com.sap.pcuigp.xssfpm.wd.FPMComponent.doProcessEvent(FPMComponent.java:568)
at com.sap.pcuigp.xssfpm.wd.FPMComponent.doEventLoop(FPMComponent.java:437)
at com.sap.pcuigp.xssfpm.wd.FPMComponent.wdDoInit(FPMComponent.java:195)
at com.sap.pcuigp.xssfpm.wd.wdp.InternalFPMComponent.wdDoInit(InternalFPMComponent.java:110)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.doInit(DelegatingComponent.java:108)
at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.init(ClientComponent.java:430)
at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:362)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.initApplication(ApplicationSession.java:748)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:283)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:759)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:712)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:261)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:46)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
I wonder what's the cause of this ...
Any help would be highly appreciated.Do below things.
1. Re-import your Model.
2. Restart your J2ee server
3. Re-load & Rebuild your project.
It should work now..
Raja T
Message was edited by:
Armin Reichert -
Issue with calling custom function in merge command -10g
Hi,
I have ran into issue while calling a custom function in merge command.
It throws error 'Invalid identifier'. Oracle doesnt understand that it is a function and take the function name as column name.
Since no such collumn name exists, it throws 'Invalid identifier'.
Interestingly, merge command works fine when it has a oracle function (replace, decode).
The oracle version is 10.2.0.3
It is very urgent.
Any pointers will be helpful.
Regards,
RaviI don't have privileges to create dblink, but this is working for me.
So, i don't think function can be a issue here.
satyaki>
satyaki>select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
Elapsed: 00:00:01.02
satyaki>
satyaki>
satyaki>create table hist_tab
2 as
3 select * from emp
4 where sal between 2000 and 4000;
Table created.
Elapsed: 00:00:00.09
satyaki>
satyaki>select * from hist_tab;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO JOB1 DOB
7844 TURNER SALESMAN 7698 08-SEP-81 2178 0 30 SALESMAN
Elapsed: 00:00:00.00
satyaki>
satyaki>
satyaki>update hist_tab
2 set mgr = 7794;
1 row updated.
Elapsed: 00:00:00.01
satyaki>
satyaki>commit;
Commit complete.
Elapsed: 00:00:00.00
satyaki>
satyaki>select * from hist_tab;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO JOB1 DOB
7844 TURNER SALESMAN 7794 08-SEP-81 2178 0 30 SALESMAN
Elapsed: 00:00:00.00
satyaki>
satyaki>
satyaki>
satyaki>
satyaki>create table tran_tab
2 as
3 select * from emp
4 where sal between 2000 and 7000;
Table created.
Elapsed: 00:00:00.00
satyaki>
satyaki>select * from tran_tab;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO JOB1 DOB
7844 TURNER SALESMAN 7698 08-SEP-81 2178 0 30 SALESMAN
7902 FORD ANALYST 7566 03-DEC-81 5270.76 20 ANALYST
Elapsed: 00:00:00.00
satyaki>
satyaki>ed
Wrote file afiedt.buf
1 create or replace function fun(c_in number)
2 return number
3 is
4 c_out number(4);
5 begin
6 if c_in < 7900 then
7 c_out := 0;
8 else
9 c_out := 1;
10 end if;
11 return c_out;
12* end;
13 /
Function created.
Elapsed: 00:00:01.00
satyaki>
satyaki>merge into hist_tab o
2 using (
3 select empno,
4 ename,
5 job,
6 mgr,
7 hiredate,
8 sal,
9 comm,
10 deptno,
11 job1,
12 dob
13 from (
14 select k.*,
15 rank() over(order by fun(k.empno)) rn
16 from tran_tab k
17 )
18 where rn = 1
19 ) n
20 on ( o.empno = n.empno)
21 when matched then
22 update set o.ename = n.ename,
23 o.job = n.job,
24 o.mgr = n.mgr,
25 o.hiredate = n.hiredate,
26 o.sal = n.sal,
27 o.comm = n.comm,
28 o.deptno = n.deptno,
29 o.job1 = n.job1,
30 o.dob = n.dob
31 when not matched then
32 insert(
33 o.empno,
34 o.ename,
35 o.job,
36 o.mgr,
37 o.hiredate,
38 o.sal,
39 o.comm,
40 o.deptno,
41 o.job1,
42 o.dob
43 )
44 values(
45 n.empno,
46 n.ename,
47 n.job,
48 n.mgr,
49 n.hiredate,
50 n.sal,
51 n.comm,
52 n.deptno,
53 n.job1,
54 n.dob
55 );
1 row merged.
Elapsed: 00:00:00.03
satyaki>
satyaki>select * from hist_tab;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO JOB1 DOB
7844 TURNER SALESMAN 7698 08-SEP-81 2178 0 30 SALESMAN
Elapsed: 00:00:00.00
satyaki>You can check the final output with old output. It is working perfectly - i guess.
Regards.
Satyaki De.
Maybe you are looking for
-
An error in Crystal Reports Basic for Visual Studio 2008
Greetings from Peru, We have a problem with one of the Crystal Reports products weu2019d like you to help us with. We work with Crystal Reports Basic for Visual Studio 2008. The error weu2019ve detected is in one of our systemu2019s reports; this rep
-
Increase your mailbox size - email threat
I have been hit with an email threat - subject starts out as "Increase Your Mailbox Size", there is a link in the email. I am guessing that this initiates when a user clicks on the link, but the link is disabled now. We've had at least a couple user
-
How are the Basis Config Steps involved in sending an SMS through Workflows
Hi Every one, WE are implementing sending SMS's through workflows what are the various Configs that need to be maintained.. Regards, Raj
-
PSE 2 won't open on Mac "unexpected and unrecoverable problem"
Got a new PowerBook G4 (Mac OS 10.5.6) and trying to use PSE 2.0 (which worked fine on my older iMac) When I click the icon it acts like it is going to open but then I get a message saying "an unexpected and unrecoverable problem has occured because
-
What could cause my MacBook Pro runing under 10.6.7 to freeze completely?
Hi, It happen once and a while that my MacBook Pro freezes completely. I have done the 10.6.7 update but I am not sure if the problem is related. I know the problem could be related to many factors but I am trying to create some kind of check list be