POV help. F4 functionality.
Hi Experts,
Presently I am using the function module
'POPUP_WITH_TABLE_DISPLAY'.
Where I am able to find two buttons, choose and cancel.
But as per the req. I need to put a button 'Find',
This button will be used to find the particular record.
What is the possible way of doing it.
Thanks in Advance,
Irfan Hussain
Hi irfan,
1. the best thing would be to POPUP
using ALV functionality.
2. like this
(the parameters in BOLD make it POPUP)
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
it_fieldcat = alvfc
<b> i_screen_start_column = 10
i_screen_start_line = 10
i_screen_end_column = 20
i_screen_end_line = 20</b>
TABLES
t_outtab = itab
EXCEPTIONS
program_error = 1
OTHERS = 2.
3. To get a taste of it,
just copy paste in new program.
REPORT abc.
TYPE-POOLS : slis.
Data
DATA : BEGIN OF itab OCCURS 0.
INCLUDE STRUCTURE t001.
DATA : END OF itab.
DATA : alvfc TYPE slis_t_fieldcat_alv.
Select
SELECT * FROM t001 INTO TABLE itab.
*------- Field Catalogue
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_internal_tabname = 'ITAB'
i_inclname = sy-repid
CHANGING
ct_fieldcat = alvfc
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
Display
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
it_fieldcat = alvfc
i_screen_start_column = 10
i_screen_start_line = 10
i_screen_end_column = 20
i_screen_end_line = 20
TABLES
t_outtab = itab
EXCEPTIONS
program_error = 1
OTHERS = 2.
regards,
amit m.
Similar Messages
-
Hi all,
Please tell me how to create POV help for module pool.
Regards,hi,
Try this
PROCESS ON VALUE-REQUEST.
* Module to fetch the branch value
* from the screen
FIELD zval_discount-zbranch
MODULE value_branch.
* field Discount type WRT Branch
FIELD zval_discount-zdisctyp
MODULE f4_help_discount_type .
MODULE value_branch INPUT.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
tabname = 'ZVAL_DISCOUNT'
fieldname = 'ZBRANCH'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'ZBRANCH'
EXCEPTIONS
field_not_found = 1
no_help_for_field = 2
inconsistent_help = 3
no_values_found = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDMODULE. " value_branch INPUT
MODULE f4_help_discount_type INPUT.
REFRESH :
i_dynpread,
r_branch,
i_disctyp.
CLEAR wa_dynpread.
IF sy-dynnr = '0120'.
wa_dynpread-fieldname = 'ZVAL_DISCOUNT-ZBRANCH'.
APPEND wa_dynpread TO i_dynpread .
* Function module to read the value of ZBRANCH on the screen 120.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-repid
dynumb = sy-dynnr
translate_to_upper = 'X'
TABLES
dynpfields = i_dynpread
EXCEPTIONS
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
invalid_parameter = 7
undefind_error = 8
double_conversion = 9
stepl_not_found = 10
OTHERS = 11.
IF sy-subrc EQ 0.
READ TABLE i_dynpread INDEX 1 INTO wa_dynpread.
IF sy-subrc EQ 0.
MOVE wa_dynpread-fieldvalue TO zval_discount-zbranch.
ENDIF.
ELSE.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ELSE.
CLEAR v_stepl.
CALL FUNCTION 'DYNP_GET_STEPL'
IMPORTING
povstepl = v_stepl
EXCEPTIONS
stepl_not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
READ TABLE g_val_disc_maint_itab INTO g_val_disc_maint_wa
INDEX v_stepl.
IF sy-subrc EQ 0.
zval_discount-zbranch = g_val_disc_maint_wa-zbranch.
ENDIF.
ENDIF.
IF NOT zval_discount-zbranch IS INITIAL.
r_branch-sign = 'I'.
r_branch-option = 'EQ'.
r_branch-low = zval_discount-zbranch.
APPEND r_branch.
ENDIF.
* Fetch the recods of purchase type for the
* branch selected on the screen
SELECT *
FROM zval_disctyp
INTO TABLE i_disctyp
WHERE zbranch IN r_branch.
* Function module for F4 help for the field Purchase Type
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
ddic_structure = 'ZVAL_DISCTYP'
retfield = 'ZDISCTYP'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'ZVAL_DISCOUNT-ZDISCTYP'
window_title = 'Discount Type'(016)
value_org = 'S'
TABLES
value_tab = i_disctyp
return_tab = i_ddshretval
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc EQ 0.
READ TABLE i_ddshretval INDEX 1.
IF sy-subrc EQ 0.
MOVE i_ddshretval-fieldval TO zval_discount-zdisctyp.
ENDIF.
ELSE.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDMODULE. " f4_help_discount_type INPUT
Edited by: avinash kodarapu on Jan 5, 2009 12:34 PM -
Assigning search help (F4 functionality ) for recipient field in IW32
Hi,
my requirement is to assign search help (F4 functionality) for recipient field in components tab of IW32. anybody help me to assign search help for it. same way i need to assign that in MIGO, MB21, MB1A goods recipient field.hi,
refer to the following link:
http://www.saptechies.com/how-to-add-f4-help-to-a-field-on-screen-module-pool/
i hope it helps
regards -
I have been using GRAB to capture screen displays. It has just stopped working since the last OSX Upgrade. Can anyone, please help restore functionality?
Thanks for that. I did as suggested but when I tried again, it still did not work. Another com.apple.Grab.plist appeared in the Library.
I now have the following files in Library
file://localhost/Users/peterpatel/Library/Preferences/com.apple.Grab.LSSharedFil eList.plist
file://localhost/Users/peterpatel/Library/Preferences/com.apple.Grab.LSSharedFil eList.plist.lockfile
file://localhost/Users/peterpatel/Library/Preferences/
file://localhost/Users/peterpatel/Library/Preferences/com.apple.Grab.plist.lockf ile
What do you suggest I do now? -
Search help,F4 function& matchcode object , give difference
hi guru
i confuse about this 3 functionlity.
search help,F4 function& matchcode object ,
please tell me the differences.
regards.
subhasis.Hi,
Search Help
Use
With this function you can search for objects, thereby defining and linking different selection conditions for the search help.
Prerequisites
You can call this function by:
· Selecting Object ® Search... () in the main menu bar of the Integration Builder
· Placing the cursor on a software component version and selecting Search... () in the context menu (only in the Integration Repository)
In this case the software component version is defined as the search criteria.
Features
Defining the Object Type
You can select the object type in a dropdown list in field Object Type.
In the design (Integration Repository) you can
· Select an object type (for example Message Interface)
· Select a cross-object category (for example Interface Objects)
In the configuration (Integration Directory) you can select types Values Mapping Group and schema in addition to the individual object types.
CHECK THIS LINK TO CREATE A SEARCH HELP.
http://www.sapdevelopment.co.uk/dictionary/shelp/shelp_basic.htm
CHECK THIS LINK TO CREATE A MATCHCODE OBJECT
http://searchsap.techtarget.com/tip/1,289483,sid21_gci553386,00.html
more details...
Regards,
Priyanka. -
Urgent help in function modules
Hi Gurus,
Please send me the names of the related function modules of ISU.also if possible send examples or tutorials of FM creation and the coding involved in it.
My email is [email protected]
All Replies will be rewarded.Check the links below for details about creating Function Modules:
http://help.sap.com/saphelp_nw04/helpdata/en/26/64f623fa8911d386e70000e82011b8/content.htm
http://www.erpgenie.com/abap/functions.htm
Check this link for how to create the function module exit..
http://sap.niraj.tripod.com/id62.html -
Required help on Function Modules and Bapis
Web portal publishing of ERS invoice letters. This involves modification in the BAPI screens to show the invoice PDF instead of printing??
can anyone help me in fixing this issue.hi Anjaneyulu,
open the t-code --> and go to menu system->status-->select the program and open the program-->
selct the tree structure----in the left side the includes screen and function module everthing will show..
or
open the t-code --> and go to menu system->status-->select the program and open the program-->
go to attributes and select the Package..
next----
go to se80--> enter the package --> and dispalay it shows the list of Program , include transaction function modules and bapi's under the pakage
Regards,
Prabhudas -
Need help text_io function not working in 11i
Hi,
I am new in form devlopment Kindly help
We create a customize form on 6i then deploye it on our Oracle apps Server with EBS. I want to create a form using form 6i which read a text file from client side and insert data into table i try text_io function but its not working after deployed form on server and also try webutil function but its not working with oracle forms 6i kindly help how can i do this while using forms 6i i will be very thankful.
ThanksHi;
Please check first below link
Forms 6i Developer and Forms 6i Services - Demonstrations and Sample Code
http://www.oracle.com/technology/sample_code/products/forms/6idemos.html
Also check below googling which exists for step by step guide
www.pdfoo.com/result-Oracle-forms-6i-step-by-step-tutorial.html
www.pdfoo.com/resultpage9~forms-6i-step-by-step-application-development -examples.html
Also see:
http://www.google.com.tr/#hl=tr&biw=1259&bih=793&q=forms+6i%2Bstep+by+step&aq=f&aqi=&aql=&oq=&gs_rfai=&fp=71a534c4a5161590
Regard
Helios -
Custom Search Help for Functional Area of Cost Centre(KS01/KS02)
Hi,
I need to implement a custom search help and custom enhancement for the field Functional Area in Basic Data tab of Cost Centre Create/Change(KS01/KS02) transactions. Details of the requirement are as below:
1. There will be a custom relation for the Cost Centre category and Functional Area which was maintained thru a SAP standard table TKA05 and a custom table.
2.When the relation to Cost Centre category and Functional Area is a one to one it exist in the TKA05 and if its one to many it will be maintained in the custom table.
3. The requirement is when the Cost Center to Functional area is maintained in table TKA05(One to One) in this case the corresponding Functional Area needs to be populated automatically after entering the cost centre and pressing a enter key by user.
4.When the Cost Centre Category and Functional area does not exist in table TKA05 and existing in custom table(One to Many) in this case the F4 should be enabled for user selection with the list of Functional area values corresponding to the cost centre category entered that are maintained in the custom table.
As per the functionality provided by SAP the input help(F4) of the field Functional area in Cost Center does not have any relation with Cost Centre Category. The existing F4 is from the Value Table(TFKB) attached to the domain of FKBER.
Please provide your valuable inputs to implement the above requirement. Your input will be rewareded.
Thanks in advance,
Regards,
Prasad.kalyani,
i can see your requirement in below way..
as it just reads: you need to assign the standard cost center help to a z cost center field in component /SAPSRM/WDC_UI_DO_ACC.. which actually is fetched though the component /SAPSRM/WDC_UI_BACKEND_SH
so, if you see the component controller of SAPSRM/WDC_UI_DO_ACC you will see the component
USAGE_SH_F4 /SAPSRM/WDC_UI_BACKEND_SH
USAGE_SH_F4 /SAPSRM/WDC_UI_BACKEND_SH INTERFACECONTROLLER
so you can replicate the same functionality for your z field.
but can you clarify one thing.. why are you going for this z field in place of standard field ? -
How to create a f4 help using function module.
Hi,
I want to create an f4 help with out using match code objects.How can i do it ? . Is there any function code for it ?.Hi,
Please search on SCN before posting...
Refer FM F4IF_INT_TABLE_VALUE_REQUEST
Refer this demo code to get a S.help for BELNR based on user input for BUKRS:-
PARAMETERS : p_belnr TYPE belnr,
p_bukrs TYPE bukrs.
DATA : BEGIN OF itab OCCURS 0,
belnr TYPE belnr,
END OF itab.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_belnr.
PERFORM f4_belnr_help USING p_belnr.
*& Form f4_belnr_help
* text
* -->P_BELNR text
FORM f4_belnr_help USING p_belnr.
DATA : itab TYPE STANDARD TABLE OF it WITH HEADER LINE,
tb_dynpfields LIKE dynpread OCCURS 0 WITH HEADER LINE,
v_bukrs TYPE bukrs.
CLEAR: tb_dynpfields.
REFRESH: tb_dynpfields.
MOVE 'P_BUKRS' TO tb_dynpfields-fieldname.
APPEND tb_dynpfields.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = 'Z_F4' "program name
dynumb = '1000' "screen number
TABLES
dynpfields = tb_dynpfields
EXCEPTIONS
INVALID_ABAPWORKAREA = 1
INVALID_DYNPROFIELD = 2
INVALID_DYNPRONAME = 3
INVALID_DYNPRONUMMER = 4
INVALID_REQUEST = 5
NO_FIELDDESCRIPTION = 6
INVALID_PARAMETER = 7
UNDEFIND_ERROR = 8
DOUBLE_CONVERSION = 9
STEPL_NOT_FOUND = 10
OTHERS = 11.
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE tb_dynpfields INDEX 1.
IF sy-subrc EQ 0.
v_bukrs = tb_dynpfields-fieldvalue.
ENDIF.
SELECT belnr from <db_table> INTO TABLE itab WHERE bukrs = v_bukrs.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'BELNR' "internal table field
dynpprog = 'Z_F4' "program name
dynpnr = '1000' "screen number
dynprofield = 'P_BELNR' "screen field name
value_org = 'S'
TABLES
value_tab = itab "internal table
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " f4_belnr_help
Hope this helps you.
Regards,
Tarun
Edited by: Tarun Gambhir on Mar 26, 2009 11:29 AM -
HELP MENU FUNCTION-URGENT HELP PLZ.
Hello there. I've been trying to design a GUI providing the users with help function as well. I create the html file, map file(in .jhm format) and HelpSet (in .hs format) and run the help menu via hsviewer. The first problem is that when the hsviewer runs the application a blank help window appears on the screen. The second one is that when I try to make a link between the help menu and the GUI I have written by using the sample code given in javahelp's pdf file I see a few error messages on NETBEANS' screen. Could anyone help me solve the problems I have faced so far? In addition, aint there any other method, like a template help menu, that I could use to compose my own one?
* stop multi-posting
* stop SHOUTING
* whenever you see error messages and have some problem, those two are probably related
* whenever you ask for help and have error messages post the error messages! -
Help menu function plz help:)))
Hello there. I've been trying to design a GUI providing the users with help function as well. I create the html file, map file(in .jhm format) and HelpSet (in .hs format) and run the help menu via hsviewer. The first problem is that when the hsviewer runs the application a blank help window appears on the screen. The second one is that when I try to make a link between the help menu and the GUI I have written by using the sample code given in javahelp's pdf file I see a few error messages on NETBEANS' screen. Could anyone help me solve the problems I have faced so far? In addition, aint there any other method, like a template help menu, that I could use to compose my own one?
Quit multi-posting questions: http://forum.java.sun.com/thread.jspa?threadID=5271252&tstart=15
-
[8i] Help with function with parameters (for workday calculation)
Let me start by saying, I've never written a function before, and I don't have access to create a function in my database (i.e. I can't test this function). I'm trying to come up with a function that I can ask my IT department to add for me. I'm hoping someone can take a look at what I've written and tell me if it should work or not, and if this is the right way to go about solving my problem.
I am trying to create a function to do a very simple workday calculation (adding/subtracting a particular number of workdays from a calendar date).
The database I'm working with has a table with the workday calendar in it. Here is a sample table and sample data, representative of what's in my workday calendar table:
CREATE TABLE caln
( clndr_dt DATE,
shop_days NUMBER(5)
CONSTRAINT caln_pk PRIMARY KEY (clndr_dt)
INSERT INTO caln
VALUES (To_Date('01/01/1980','mm/dd/yyyy'),0);
INSERT INTO caln
VALUES (To_Date('01/02/1980','mm/dd/yyyy'),1);
INSERT INTO caln
VALUES (To_Date('01/03/1980','mm/dd/yyyy'),2);
INSERT INTO caln
VALUES (To_Date('01/04/1980','mm/dd/yyyy'),3);
INSERT INTO caln
VALUES (To_Date('01/05/1980','mm/dd/yyyy'),3);
INSERT INTO caln
VALUES (To_Date('01/06/1980','mm/dd/yyyy'),3);
INSERT INTO caln
VALUES (To_Date('01/07/1980','mm/dd/yyyy'),4);
INSERT INTO caln
VALUES (To_Date('01/08/1980','mm/dd/yyyy'),5);
INSERT INTO caln
VALUES (To_Date('01/09/1980','mm/dd/yyyy'),6);
INSERT INTO caln
VALUES (To_Date('01/10/1980','mm/dd/yyyy'),7);
INSERT INTO caln
VALUES (To_Date('01/11/1980','mm/dd/yyyy'),8);
INSERT INTO caln
VALUES (To_Date('01/12/1980','mm/dd/yyyy'),8);
INSERT INTO caln
VALUES (To_Date('01/13/1980','mm/dd/yyyy'),8);
INSERT INTO caln
VALUES (To_Date('01/14/1980','mm/dd/yyyy'),9);The actual table includes from 1/1/1980 though 12/31/2015.
I've written (and validated) this parameter query which does my workday (mday) calculation:
SELECT cal.clndr_dt
FROM CALN cal
SELECT cal.shop_days+:mdays AS new_shop_days
FROM CALN cal
WHERE cal.clndr_dt =:start_date
) a
WHERE cal.shop_days = a.new_shop_days
AND ROWNUM =1
ORDER BY cal.clndr_dt;Based on this query, I've created the following function (and I have no clue if it works or if the syntax is right, etc.):
CREATE OR REPLACE FUNCTION add_mdays
(start_date IN DATE,
mdays IN NUMBER(5))
RETURN DATE
IS
new_date DATE;
BEGIN
SELECT cal.clndr_dt
FROM CALN cal
SELECT cal.shop_days+mdays AS new_shop_days
FROM CALN cal
WHERE cal.clndr_dt =start_date
) a
WHERE cal.shop_days = a.new_shop_days
AND ROWNUM =1
ORDER BY cal.clndr_dt;
RETURN new_date;
END add_mdays; //edit 9:31 AM - noticed I left off this bitI'm also not sure how to have the function handle results that would return a date outside of the date range that is in the table (Before 1/1/1980 or after 12/31/2015--or, another way to look at it is, before the MIN value of caln.clndr_dt or after the MAX value of caln.clndr_dt).
My goal is to be able to use the function in a situation like the following:
First, here's a sample table and data:
CREATE TABLE orders
( ord_no NUMBER(5),
plan_start_dt DATE,
CONSTRAINT orders_pk PRIMARY KEY (ord_no)
INSERT INTO orders
VALUES (1,To_Date('01/08/1980','mm/dd/yyyy'));
INSERT INTO orders
VALUES (2,To_Date('01/09/1980','mm/dd/yyyy'));
INSERT INTO orders
VALUES (3,To_Date('01/10/1980','mm/dd/yyyy'));And here is how I would like to use my function:
SELECT orders.ord_no
, orders.plan_start_dt
, add_mdays(orders.plan_start_dt, -3) AS prep_date
FROM ordersThus, the function would allow me to return, for every order in my orders table, the date that is 3 workdays (mdays) prior to the plan start date of each order.
Am I going about this the right way? Do I need to create a function to do this, or is there a way for me to incorporate my query (that does my mday calculation) into the sample query above (eliminating the need to create a function)?
Thanks much in advance!
Edited by: user11033437 on Feb 2, 2010 8:55 AM
Fixed a couple typos in the last insert statements
Edited by: user11033437 on Feb 2, 2010 9:31 AM (fixed some syntax in the function)Hi,
Ah, mentioning Oracle 8 and not being able to test your own code makes me nostalgic for the good old days, when you typed your cards, and brought them to a window at the computer center, and waited an hour for the job to run, and then saw the printout to find that you had made a typo.
If you're going to write functions, you really need to test them yourself. Like all code, functions whould be written in baby steps: write a line or two (or sometimes just part of what will later become one line), test, make sure it's running correctly, and repeat.
Ideally, your employer should create a developement schema in a development database for you to use.
You can legally download your own instance of Oracle Express Edition for free; just be careful not to use features that aren't available in the database where the code will be deployed.
You don't need a function to get the results you want:
SELECT o.ord_no
, o.plan_start_dt
, MIN (e.clndr_dt) AS prep_date
FROM orders o
, caln l
, caln e
WHERE l.clndr_dt = o.plan_start_dt
AND e.shop_days = l.shop_days - 3
GROUP BY o.ord_no
, o.plan_start_dt
;This would be more efficient (and a little simpler) if you added a column (let's call it work_day) that identified if each row represented a work_day or not.
For each value of shop_days, exactly 1 row will be marked as a work day.
Then the query might be something like:
SELECT o.ord_no
, o.plan_start_dt
, e.clndr_dt AS prep_date
FROM orders o
, caln l
, caln e
WHERE l.clndr_dt = o.plan_start_dt
AND e.shop_days = l.shop_days - 3
AND e.work_day = 1
;You could use the analytic LAG function to populate the work_day column.
A function would certainly be handy, though perhaps slower.
The function you posted has a few mistakes:
(a) An argument can't be declared as NUMBER (5); just NUMBER.
(b) When you SELECT in PL/SQL, like you're doing, you have to SELECT INTO some variable to hold the results.
(c) ROWNUM is arbitrary (which makes it useless in this problem) unless you are drawing from an ordered sub-query. I don't think you can use ORDER BY in sub-queries in Oracle 8. Use the analytic ROW_NUMBER function instead.
(d) The function must end with an END statement.
Given your current caln table, here's how I would write the function:
CREATE OR REPLACE FUNCTION add_mdays
( start_date IN DATE DEFAULT SYSDATE,
mdays IN NUMBER DEFAULT 1
RETURN DATE
DETERMINISTIC
IS
-- add_mdays returns the DATE that is mdays working days
-- after start_date. (If mdays < 0, the DATE returned
-- will be before start_date).
-- Work days do not include Saturdays, Sundays or holidays
-- as indicated in the caln table.
new_date DATE; -- to be returned
BEGIN
SELECT MIN (t.clndr_dt)
INTO new_date
FROM caln f -- f stands for "from"
, caln t -- t stands for "to"
WHERE f.clndr_dt = TRUNC (start_date)
AND t.shop_days = f.shop_days + TRUNC (mdays)
RETURN new_date;
END add_mdays;
SHOW ERRORSProduction code whould be robust (that includes "idiot-proofing").
Try to foresee what errors people might make in calling your function, and correct for them when possible.
For example, if it only makes sense for start_date to be midnight, or mdays to be an integer, then use TRUNC in the function in case soembody passes a bad value.
Allow for default arguments.
Comment your function. Put all comments within the function (that is, after CREATE and before the final END) so that they will be kept in the data dictionary.
If, given the same arguments, the function always returns the same value, mark it as DETERMINISTIC, for efficiency. This means the system may remember values passed back rather than call the function every time it is told to.
I wish I could mark questions as "Correct" or "Helpful"; you'd get 10 points for sure.
You posted CREATE TABLE and INSERT statements (without even being begged).
You gave a clear description of the problem, including desired results.
The code is nicely formatted and easy to read.
All around, one of the most thoughtful, well-written questions I've seen.
Well done! Keep up the good work!
Edited by: Frank Kulash on Feb 2, 2010 1:10 PM
Added my own version of the function. -
hello
im new to actionscript and im still trying to work out the basics
i have functions like this
private function sinus( phase: Number ): Number
return Math.sin( phase * Math.PI );
private function sawtooth( phase: Number ): Number
return ( phase - int( phase ) ) - 1;
inside another function it uses sinus like this
amplitude = sinus(_phase)
say i have 2 radio buttons called saw_btn and sin_btn
how could i chose between sinus and sawtooth at runtime?
somebody mentioned i could use a Function object reference
what is this?
how would i write that?
thanks in advance for your helpwhat kg means here is that you can 'target' a method by name using a string and the access operator. if you are doing so from within the Class Note, then you can use: amplitude = this[theStringGoesHere](_phase);
the string will be 'set' by your Radio button instances, then by changing the string (eg. clicking a radio button) the next time the method is called, it will fire the one that relates to the string 'by name' (the exact name of the method, case sensitive) - the keyword 'this' is referring to the scope of the Class you are in, (eg. Note)
you could do this directly like so: amplitude = this['sinus'](_phase);
but the purpose of using a variable within the accessor, is to allow you the ability to change it at will and effect the next operation of the method, and/or the value of 'amplitude'
- hope that helps shed some light on things -
Why is Flash Help/Search function so worthless?
Is it just me or is the Flash help function the worst help
function ever?
In other software you get the results you were looking for in
seconds
in Flash everytime you do a search you get like a hundred
different
search results and usually none cover the topic you were
looking for.
Its often easier to search on google than use the internal
help function
Why is it so hard to only display relevant results?
Could anyone teach me how to use the search function cause I
dont want
to read 1000 pages just to find out the difference between
align and distribute
options etc.
Thx /AquaStealthIt seems this article was written just for you! :)
http://www.communitymx.com/content/article.cfm?cid=01B54
Maybe you are looking for
-
Removing Scroll Bars in WEBI Report
Hi All, I want to remove scroll bars from my WEBI reports. I have observed that even if you have only one column in the WEBI report, scroll bar still appears. Is this anything to do with page layout properties of WEBI where you can set minimum limit
-
Re:Windows Phone develpement
Hi I have one WPF application Which is working fine. So now i want to target that application to windows 8.1 store and Windows phone 8.1. i am using visual studio 2013 update 4 for the development. i have few library projects in my wpf application
-
Issue with downloaing from ALV to Excel sheet
Hi All, When we download the ALV Report to excel sheet, the first line/first column (A11) of excel sheet will have today's date. Since my customer uses the excel sheet for further processing into a non-SAP system, we need to provide the excel sheet w
-
How to Call webservice by another webservice
Hi all, Anybody knows how to call a webservice by another webservice.
-
Re: ICR - Duplicate records in FBICRC003A
Hi Ralph, It seems that FBICA3 creates duplicate records in FBICRC003A if assigned items were subsequently unassigned. I believe this is due to program error. These are the steps that I went through to get this error: 1) Post cross-company FI documen