Functionality og the code
Hi ,
We have the following code. I am not getting the functionality of the code. Please have a look into the code and let me know the functionality.
BEGIN
INSERT INTO tab1 (sucess_flag ,run_DATE,comments)
VALUES ('Y',SYSDATE,'SUCCESSFUL');
--COMMIT;
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
--COMMIT;
ELSE
BEGIN
INSERT INTO tab1 (sucess_flag ,run_DATE,comments)
VALUES ('N',SYSDATE,'COUNT 0');
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
--COMMIT;
END IF;
END IF;
IF var1 >0 THEN
COMMIT;
ELSE
ROLLBACK;
INSERT INTO tab1(sucess_flag ,run_DATE,comments)
VALUES ('N',SYSDATE,'UNSUCCESSFUL-0 Rec.');
COMMIT;
END IF;
EXCEPTION
WHEN OTHERS THEN
INSERT INTO tab1 (sucess_flag ,run_DATE,comments)
VALUES ('N',SYSDATE,'UNSUCCESSFUL');
COMMIT;
END; Thanks,
Ora.
Hi,
Can you be more specific about what you don't understand? For example:
966949 wrote:
Hi ,
We have the following code. I am not getting the functionality of the code. Please have a look into the code and let me know the functionality.
BEGIN
INSERT INTO tab1 (sucess_flag ,run_DATE,comments)
VALUES ('Y',SYSDATE,'SUCCESSFUL');
--COMMIT;
do you understand that the part above attempts to add a row to the tab1 table? Do you need to have someone explain what tab1 is, or what 'Y' means?
EXCEPTION
WHEN OTHERS THEN
NULL;
END;The EXCEPTION section above ignores any error that may occur in the corresponding BEGIN section (the INSERT statement, in this case).
By the way, "EXCEPTION WHEN OTHERS NULL;" is almost always a terrible programming practice. You should only use use "WHEN OTHERS" if you want to do something special before raising the error; that is, 'WHEN OTHERS" should always be followed, sooner or later, by "RAISE;".
{code}
--COMMIT;
ELSE
BEGIN
INSERT INTO tab1 (sucess_flag ,run_DATE,comments)
VALUES ('N',SYSDATE,'COUNT 0');
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
--COMMIT;
{code}Like the preceding code, this is attempting to add a row to a table, and ignoring any errors that may cause.
{code}
END IF;
END IF;
{code}Apparantly, what you posted is taken out of context. These two END IF statements should have corresponding IF statements.
{code}
IF var1 >0 THEN
COMMIT;
ELSE
ROLLBACK;
INSERT INTO tab1(sucess_flag ,run_DATE,comments)
VALUES ('N',SYSDATE,'UNSUCCESSFUL-0 Rec.');
COMMIT;
END IF;
EXCEPTION
WHEN OTHERS THEN
INSERT INTO tab1 (sucess_flag ,run_DATE,comments)
VALUES ('N',SYSDATE,'UNSUCCESSFUL');
COMMIT;
END;
{code}It's very hard to make sensible comments on the code without seeing all the code. Also, it helps to have test versions of any tables referenced (CREATE TABLE and INSERT statements).
My best guess, based on the fragment you posted, is that tab1 is a log table. The code you posted adds messages to that log table, based on whether some other statements (which you didn't show, but apparantly occur earlier in the code) worked or not.
Similar Messages
-
Problem in triggering the code for CO02 User Exit
Hi,
I am using the code for the Tcode CO02 (User Exit) and i am facing a problem that when i am using the code as a normal program it is executing fine and displaying the pop up window and showing the data in it.
But when i am using that code in the USER EXIT code it is not trigerring that pop up window.
I am using the enhancement:-
*PPCO0007 * - Exit when saving production order
And the include in which i am writing the code is :-
INCLUDE ZXCO1U06
plzz provide me guidelines for solving this problem.hi ,
i am using the following: -
Enhancement No. -> PPCO0007 (Exit when saving production order)
When i click on the enhancement the following is displayed:-
Function exit -> *EXIT_SAPLCOZV_001 *
When i double click the function exit the code i had written in the following include:-
INCLUDE ZXCO1U06
plzz tell me whether i am doing it right or worng? -
How to isolate the wait function to one part of the code
I'm buildling an ecg montoring system along with programming an external stimulator using TTL pulses to work along side the information obtained from the ECG.The most important of these features is the heart rate. However, whenever I activate my pulse trains in the code, the DAQmx Wait Until Done.vi function pauses everything in the code, including the part of my code that monitors the heart rate, which uses time to measure it. What I would like, is the wait function to only affect the pulse train generators without pausing anything else in the code. Is this possible? And if so how can I make it happen?
I will attach my vi
Solved!
Go to Solution.
Attachments:
simulatejed.vi 130 KBYour problem is that everything is in the same loop. So the longest operation is going to determine the loop rate (and therefore processing rate). What you really need to do is separate your tasks into separate loops. Use queues and/or notifiers to communicate your data and commands between loops.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines -
Calling functions of the inner class in .java code file
Hello,
I created a .java code file in Visual J#.Net and converted it into
the application by adding the "public static void main(String args[])"
function.
I have created the two classes one extends from Applet, and the other
extends from Frame. The class which I inherited from the Frame class becomes
the inner class of the class extended from the Applet. Now How do I
call the functions of the class extended from Frame class - MenuBarFrame
class. the outline code is
public class menu_show extends Applet
------init , paint action function---------
public class MenuBarFrame extends Frame
paint,action function for Menu
public static void main(String args[])
applet class instance is created
instance of frame is created
Menu , MenuBar, MenuItem instance is created
and all these objects added
I have Created MenuBarFrame class instance as
Object x= new menu_show().new MenuBarFrame
????? How to call the functions such as action of MenuBarFrame class - what
should be its parameters??????
}Here's how I would do it:
interface Operation {
public int op(int y);
class X {
private int x;
public X(int x) {
this.x = x;
private class Y implements Operation {
public int op(int y) {
return x+y;
public Operation createOperation() {
return new Y();
public static void main(String[] args) {
X app = new X(17);
Operation f = app.createOperation();
System.out.println(f.op(-11));
}Your code, however, has some serious "issues". You typically don't
instantiate an applet class -- that's the job of the applet viewer or Java plugin
your browser is using. If you instantiate the applet directly, you're going
to have to supply it an AppletStub. Do you really want to go that way?
Again, use an applet viewer or browser, or better yet, why write applets at all? -
User exit function module include how to write the code
hi all,
i am creating user exit for ME22N using this enhance MM06E005 .
in this i created subscreen and set some fields .
that data has to be stoe in EKPO.
inside the include i have to write the logic plz guide me how to follow .
once i enter it will store on wish internal table and wish internal table to shall i move to EKPO .
If Tcode is ME23N how to display data in disable mode.
Regards,
Hari.This is the code inside the function module .
once i enter data in custom field the below wish table it will store.
FUNCTION EXIT_SAPMM06E_016.
""Lokale Schnittstelle:
*" IMPORTING
*" VALUE(I_EKPO) LIKE EKPO STRUCTURE EKPO
*" VALUE(I_AKTYP)
*" VALUE(I_CI_EKPO) LIKE EKPO_CI STRUCTURE EKPO_CI
*" VALUE(I_BSTYP) LIKE EKKO-BSTYP
*" VALUE(I_NO_SCREEN)
*" VALUE(I_LFA1) LIKE LFA1 STRUCTURE LFA1
*" VALUE(I_LFM1) LIKE LFM1 STRUCTURE LFM1
*" VALUE(I_EKKO) LIKE EKKO STRUCTURE EKKO
*" VALUE(I_REKPO) LIKE EKPO STRUCTURE EKPO OPTIONAL
*" VALUE(I_KEKPO) LIKE EKPO STRUCTURE EKPO OPTIONAL
*" VALUE(I_AEKPO) LIKE EKPO STRUCTURE EKPO OPTIONAL
*" VALUE(I_REBAN) LIKE EBAN STRUCTURE EBAN OPTIONAL
*" VALUE(I_MT06E) LIKE MT06E STRUCTURE MT06E OPTIONAL
*" VALUE(I_EINA) LIKE EINA STRUCTURE EINA OPTIONAL
*" VALUE(I_EINE) LIKE EINE STRUCTURE EINE OPTIONAL
*" VALUE(I_EKPO_OLD) LIKE EKPO STRUCTURE EKPO OPTIONAL
*" VALUE(I_KOMP) LIKE KOMP STRUCTURE KOMP OPTIONAL
*" VALUE(I_ENJ_CALL) OPTIONAL
*" TABLES
*" TEKPO STRUCTURE BEKPO OPTIONAL
*" TEKET STRUCTURE BEKET OPTIONAL
*" TEKKN STRUCTURE EKKNU OPTIONAL
*" TKOMV STRUCTURE KOMV OPTIONAL
INCLUDE ZXM06U41 .
ENDFUNCTION.
inside the INCLUDE ZXM06U41 . i writen this code
*& Include ZXM06U41
DATA :
FS_EKPO TYPE EKPO_CI.
IF ( SY-TCODE EQ 'ME22N' OR SY-TCODE EQ 'ME23N'
OR SY-TCODE EQ 'ME22' OR SY-TCODE EQ 'ME23' ) .
LOOP AT TEKPO.
IF ( TEKPO-EBELN EQ i_EKPO-EBELN
AND TEKPO-EBELP EQ i_EKPO-EBELP ) .
EKPO_CI-ZMATERIAL = TEKPO-ZMATERIAL.
EKPO_CI-ZQUANTITY = TEKPO-ZQUANTITY.
EKPO_CI-ZUNIT = TEKPO-ZUNIT.
EKPO_CI-ZPRICE = TEKPO-ZPRICE.
EKPO_CI-ZCURRENCY = TEKPO-ZCURRENCY.
ENDIF.
ENDLOOP.
ENDIF.
Regards,
Hari. -
Functionality of the Transaction Code
Hi
Any one help how to find out the functionality of one particular T.Code. Say for example i want to know functionality of T.code FS10N. Is there any way to find like that.
padmaHumm..
You can see that, either using SE93, or using SE16 on table TSTC.
Hope this helps,
Erwan -
BW User Exit - Code in function of the query name
Hi,
I would like to create an user exit code which execute a algorithm different in function of the query executed. do you know in which variable is store the technical name of the query.
CASE query
WHEN 'Z_ZAPO_001'.
V1 = 1
WHEN 'Z_ZAPO_002'.
V1 = 2 WHEN '10' OR '11' OR '12'.
ENDCASE.Yaroslav,
I_S_RKB1D-COMPID will never be filled for authorization user-exits (I_STEP = 0). Don't ask my why, I once raised this question to OSS and they replied it was never foreseen to work with authorization user-exits. God knows why, it's very unlogical and it wouldn't cost them a lot of work to get it working...
I could solve this problem by applying a little trick. In our queries we included a user-exit keydate variable. This will push the user-exit first in I_STEP = 1 mode where I_S_RKB1D-COMPID is filled. Then save the query name by exporting it to the ABAP-memory. Afterwards, the user exit with code for I_STEP = 0 will be processed and then you can import the query name from the ABAP memory.
I agree it sounds a little bit tricky but there is no better option I'm affraid. -
Function calling the java code
I have a java code that returns the size of the file name. I have created a pl/sql function that calls the method in the java class.
The problem I face is , when I try to call the function using the command "CALL f_size('C:\Batch\Query.sql')into :leng " , the error comes reporting that
"No method func in class fSize ".
I have given both the java& pl/sql code. Can anyone help me out?
import java.io.*;
public class fSize {
public static long func(String s)
File file = new File(s);
long length = file.length();
return length;
create or replace function f_size(path varchar2) return number
as language java
name 'fSize.func(String) return java.lang.Long';What version of the database are you runnning?
If Oracle 9.2 or later, no need for java code. Use UTL_FILE.FGETATTR procedure.
FGETATTR Procedure
This procedure reads and returns the attributes of a disk file.
Syntax
UTL_FILE.FGETATTR(
location IN VARCHAR2,
filename IN VARCHAR2,
exists OUT BOOLEAN,
file_length OUT NUMBER,
blocksize OUT NUMBER);
Parameters
Table 95-24 FGETATTR Procedure Parameters
Parameters Description
location
Directory location of the source file, a DIRECTORY_NAME from the ALL_DIRECTORIES view (case sensitive)
filename
The name of the source file to be copied
exists
A BOOLEAN for whether or not the file exists
file_length
The length of the file in bytes. NULL if file does not exist.
blocksize
The file system block size in bytes. NULL if the file does not exist.
SQL> create or replace and compile java source named "fSize" as
2 import java.io.*;
3 public class fSize {
4 public static long func(java.lang.String s)
5 {
6 File file = new File(s);
7 long length = file.length();
8 return length;
9 }
10 };
11 /
Java created.
SQL> show errors
No errors.
SQL> create or replace function f_size(path varchar2) return number
2 as language java
3 name 'fSize.func(java.lang.String) return java.lang.Long';
4 /
Function created.
SQL>
SQL> select f_size('C:\sqlnet.log') from dual ;
F_SIZE('C:\SQLNET.LOG')
762
1 row selected.
SQL>
SQL>
SQL> disconnect
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.3.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.3.0 - Production
SQL> -
What are the code library function settings should be followed
i have written one win32 dll, in that what are the project settings should i follow to access the dll file from the lab view..
i have done the following changes but still its not working,
1. Added the library.lib to the dll from the installed path of lab view
2. project settings > settings for All configuration
>C\C++ : category :code generation
use run time lib : Multi threaded dll
processor : blend
struct member allignment :1 byte
call convention : _cdecl*
For my driver access i have included the sys file.
is that anything i have to do other than this, please tel me the config i hav do for the access2716jag,
How are you trying to access the DLL from LabVIEW? Have you tried using the Call Library Function Node? This should allow you to access the functions within the DLL. I hope this helps!
Brian T
Applications Engineer -
Steps to create a custom function in pe04 and to create the code include
I am new to HR time management.i require to create a custom quota
function in pe04 .
I believe it requires me to first include the source code under
the include RPTMOZ00..Its not editable and throws mesage that
its lckd by some other 'client'..Do i need some access key
there? moreover without this i do not know how to proceed in
pe04.I dont evn have any idea what all should be put in the
paramaters in the pe04 attributes.Just have been told about the
countries to specify there. please suggest what all inputs
should i ask my functional people to provide on this and what
all can i handle technically and how..any help would be
appreciated.ThanksHi,
Step by Step creation of SAP Payroll Funcitons:
1) Follow the menu path
Human Resources>>Time Management>>Administration>>Tools>>Funtions/Operations
or transaction PE04. Enter a four digit name for e.g ZIABC, and press the create
button, enter the description. On creation the system proposes the name of
the routine use it, or enter a name of your choice by selecting the option 'Self-defined'.
2) During the execution of payroll some tables are filled with wage types and there amounts
to make these tables available to your routine enter the name of the table for e.g (RT or
CRT) in the input parameters, and to make the changes done to the data in the tables
avaiable to the payroll enter the name of the table in the Output parameters as well.
Input Parameters
Ctry Num Object Name
99 1 RT
99 2 CRT
and same shall be done in the Output Paramters if required.
3) Create an include in the program PCBURZ990 (using Transaction:
SE38), in which create a subroutine with the name supplied by SAP or the
name selected by you during Funtion creation,
in our case, it is FUZIABC.
Note: The program PCBURZ990 is in SAP Namespace, so an Access Key
will be required before you can proceed. But it will not be overwritten during any upgrade.
*Example of the subroutine
FORM FUZIABC.
*enter the code
ENDFORM.
4) After this activate the program the Funtion and add it in the schema used for payroll processing.
Reward points if helpful.
Regards,
Manoj. -
Can we see the code of GUI UDF functions
Hi All,
Can we see the code of GUI UDF functions?
Which language it has been written?
Cheers!
SamarjitHi,
Have a look at this blog.
Is this what you are looking for?
<a href="/people/venkataramanan.parameswaran/blog/2007/02/06/is-there-a-possibility-to-access-xi-standard-functions-in-user-defined-functions-yes there a possibility to access XI standard functions in User defined Functions?" Yes!</a>
Regards
Bhavesh -
i don't know how to use the canlendars function and the notes are kind of messy code,anyone help me
Step by step:
1. On your main vi Front Panel, create your boolean indicator.
2. On the block diagram, right click the new boolean indicator and select Create - Reference.
3. On sub-vi front panel, create boolean indicator (or use one that is already created).
4. On sub-vi front panel, create a reference (Controls Palette - Refnum - Control Refnum).
5. Right click on the newly created Refnum and select Select Vi Server Class - Generic - GObject - Control - Boolean. The refnum label changes to BoolRefnum.
6. On sub-vi block diagram, create Property Node (Functions - Application Control - Property Node). Find the BoolRefnum and move it close to the new Property Node.
7. Wire the BoolRefnum to the reference input of the property node.
8.
Right click on the property node and select Change to All Write.
9. Move mouse to point to Visible inside property node box, left click and select Value.
10. Wire the boolean indicator from step 3 to the Value input of the property node.
11. On sub-vi front panel, right click on icon and select Show Connector.
12. Click on empty connector spot then click on the new BoolRefnum. Save your sub-vi.
13. On main vi block diagram, connect refernece created in step 2 to the new connector terminal of sub-vi.
14. Save and run.
Here are the modified vi's.
- tbob
Inventor of the WORM Global
Attachments:
Pass_a_Reference.vi 20 KB
GL_Flicker_mod.vi 83 KB -
Give me the functionality of transaction code st01
give me the functionality of transaction code st01
Hi Ravi,
The tx ST01 give a datailed trace of the underlying system while executing something from sap.
For example what Authorization objects are hit by a user when he performs a tcode or what are the dbtables/sqlstatements etc are run or what kernel functions are executed .
This somewhat helps in debugging like matters.
One can even set parameters for this by using filters.Suppose u want to trace what authorization objs are hit by a specific user when he executes a specific tcode got to edit ->filter->shared and enter the user name client no and tcode. So that not all the users are traced but only this specific user for the specific tcode is traced. On analysis u can knaow what authorization objects he hitted on executing the specific tcode.
Try it with the other areas like Db access, Table Buffer, etc and u will get a more clearer picture.
http://help.sap.com/saphelp_nw2004s/helpdata/en/1f/83113f4bc511d189750000e8322d00/frameset.htm
This is a good place to start with.
Pl dont forget to award points if resolved.
Regards -
Where are the codes which support the system functions in calculate scripts
Hi all,
I want to create some user-defined functions to meet some sepecial requirements. Before this job, I really like to see the codes which support the system functions such as "@Idescendants". where can i find the .class files or .jar files which the system functions used to perform calculation at background? consider the user-defined function usually have one.
Thanks alot!
Edited by: tony.lee on 2012-6-12 上午2:45Hi,
You can get the sample codes from the below link
http://www.oracle.com/technetwork/indexes/samplecode/essbase-sample-522117.html
Cheers..!! -
How to check the code source of some function in the portal.
hi all.
i have some problem in the portal.
i use the ESS in the portal, and now some people can not check their salary.
i want to check the code source, but i do not know it uses which program.
can some one tell me the way to check the program.
best regards.If you want to access the source code of any ESS component, you will need access to NWDI. NWDI NWDI = NetWeaver Development Infrastructure, it provide the tools and process to build new / modify existing applications built using NWDS. There are plenty of threads discussing how to set up NWDI, you may search for the same.
However if the payslip problem is only for some users, it could also be a pdf issue, have you tried running the payslip for those select users within ECC?
Thanks,
GLM
Maybe you are looking for
-
Ipod Shuffle Not Being Able To Be Restored Or Recognized By Itunes
My 512 mb Ipod shuffle i've had for nine months has took a turn for the worst. It was working fine but then i put a couple of new songs on it and went to listen to it and the only songs on it were my new ones. I would hear one of them and then nothin
-
How do you 'switch off' audio destination tracks?
I'm at the beginning of lesson 13 in FCE 4 Editing Workshop and am perplexed by the instruction to 'switch off destination tracks A1 and A2' by clicking on the buttons at the head of each track. There are several things that could be called 'buttons'
-
BB Torch 9810 In the last few days the BB has been vibrating whenever I receive an email even though I have turned vibrate of for Message Alerts in all Profiles. What can I do to eliminate the vibrating? Thanks, Ralph Solved! Go to Solution.
-
Is it possible to stream a video to an appletv and it's audio to an airport express?
i have a hi-def tv with an apple tv connected to it. i also have an old (but good) receiver with 2 big speakers, they are connected to an airport express and i stream my music to them. does anybody know if i can use them as the speakers for the apple
-
Hello I've just installed Multisim only to find out that it is not functioning. When I start multisim I get an error saying that MSComp_S.prd, CPComp_S.prj and UsrComp_S_.usr can't be opened. 'The error message end with The User Database cannot be re