Calling function within function as parameter
We're planning to switch from MS-OLEDB to Oracle OLEDB and are expecting several troubles.
One of these is that MS supports calling functions with another function within whilst Oralce does not?
Example (works fine with MS):
{? = call *<FUNCTION_1>* ( ?, ?, *<FUNCTION_2>* ( ?, ?, ? ) + 1, ?, 1 )}
This raises ORA-01036: Variablenname/-nummer ungültig with Oracle's OLEDB.
Any ideas?
Thanks in advance!
Edited by: user617919 on 04.11.2011 01:28
Hi,
Whenever you have a problem, please post a complete test script that people can run to re-create the problem and test their ideas. In this case, include complete CREATE PACKAGE and CREATE PAGKAGE BODY statements, CREATE TABLE and INSERT statements for any tables needed, some test calls to the the package, and the results you want from those test calls gibven that data.
Always say which versin of Oracle you're using (e.g. 11.2.0.2.0).
See the forum FAQ {message:id=9360002}
LostNoob wrote:
--Calculate salary minus before tax deductions
FUNCTION sal_mns_btd (emp_no IN NUMBER)
RETURN NUMBER
IS
tot_mns_btd Number;
BEGIN
SELECT e.sal - bef_tax_ded(bef_ded_tot)
INTO tot_mns_btd
FROM emp
WHERE empno = emp_no;
RETURN tot_mns_btd;
END sal_mns_btd;
If bef_tax_ded is a function in the same package, then what you posted is a correct way to call it.
What is bef_ded_tot? If it's a NUMBER column in emp, then what you posted makes sense. If bef_ded_tot is a local variable inside some other function, then it doesn't make sense.. How to do what you want depends on what you want, and I can't tell you how to do it unless I understand what you want.
Also, the table alias e isn't defined. It doesn't look like you need a table alias.
Similar Messages
-
Incorrect parameter with CALL FUNCTION - WE19
hi! All
while creating IDOC through WE19 - Start Inbound it creates IDOC with Status - 64."IDoc ready to be transferred to application" "No filters , No conversion , No version change ."
Incorrect parameter with CALL FUNCTION
This parameter was "MASSAVEINFOS".
but i have Included this parameter in my Function module.
INPUT_METHOD TYPE INPUTMETHD
MASS_PROCESSING TYPE MASS_PROC
NO_APPLICATION_LOG LIKE SY-DATAR
MASSAVEINFOS LIKE MASSSAVINF
whats the mistake i have done.
Regards
KvThat will not be possible KV, as the call to the FM is not being made, as far as i see you have completed the needed settings.
As i do not have access to an SAP system, i suggest that you try below,
1) Go to WE19, enter the IDOC number and F8.
2) In this screen, click on Inbound function module.
3) In the field for inbound function module press F4, it should list your FM name here if all the necessary we42/82/57, BD51 and WE20 have been done correctly.
Another thing that you can try is, on WE19,
1) Idoc Number F8
2) /h - to start Debug
3) Now click on Standard inbound, in the debug mode press F5 once.
4) Now put a break point on all message statement
See where exactly the message of wrong FM is being thrown, it will most probably be after a select statement on one of the tables associated with WE42/82/57/BD51 etc. With this you will where you have missed out.
All the best !!!
Regards,
Chen
Edited by: Chen K V on Mar 18, 2010 8:55 AM -
Call Function Module within an Extractor
Hello Experts.
We have a requirement where a function module needs to be called from within an extractor to retrieve the data. The function module exists in the HR box. What would be the steps to follow? We can't create a generic data source based on the function module in the HR box. Do I create the extractor in BW?
Appreciate your help.
Thanks!Since the FM on the HR box is remote-enabled, as you've stated, then any SAP application (e.g. BW, R3/ECC, et. al.) that has an RFC connection to that HR box can execute that FM.
Executing a remote-enabled FM is exactly like executing any FM, with one exception. Like any FM, you pass a set of values or internal tables to the FM, through the EXPORTING or TABLES section of the FM, and receive back a set of values or internal tables from the FM, through the IMPORTING or TABLES section of the FM. The exception is that you will have one additional parameter to pass, namely DESTINATION. So, the call to the FM would look something like this:
CALL FUNCTION
'ZREMOTE_FM'
DESTINATION
l_dest "This is the environment where the FM sits - e.g. HRP100 or similar)
EXPORTING
logical_system = l_logical "This is the calling environment - e.g. BWP100)
ifield1 = l_ifield1
ifield2 = l_ifield2
IMPORTING
efield1 = l_efield1
efield2 = l_efield2
TABLES
t_itab1 = t_itab1
t_itab2 = t_itab2
EXCEPTIONS
NO_DATA_FOUND = 1.
You can code it so that l_dest is derived based on the value in l_logical. The values to be populated in l_dest and l_logical, however, are dependent on how your Basis team names the RFC connections. This assumes your landscape for HR is HRD100, HRQ100 and HRP100 for the development, quality and production, respectively and BWD100, BWQ100 and BWP100 for the BW landscape:
CONCATENATE: sy-sysid sy-mandt INTO l_logical.
CASE l_logical.
WHEN 'BWD100'.
l_dest = 'HRD100'.
WHEN 'BWQ100'.
l_dest = 'HRQ100'.
WHEN 'BWP100'.
l_dest = 'HRP100'.
WHEN OTHERS.
ENDCASE. -
Strange error of CALL FUNCTION within Method
Hi all,
i'm facing a very strange problem. Some Function Modules can't be called from within a method and a dump appears with the following message CALL_FUNCTION_CONFLICT_LENG (CX_SY_DYN_CALL_ILLEGAL_TYPE).
Here's an example: I've created a normal class with only one static method.
Class: ZCL_TEST
Method: CHECK_EMPLOYEE
Importing Parameter: IV_PERNR TYPE PERNR_D
Coding:
DATA gt_return TYPE TABLE OF bapireturn1.
CALL FUNCTION 'BAPI_EMPLOYEET_ENQUEUE'
EXPORTING
number = iv_pernr
validitybegin = sy-datum
IMPORTING
return = gt_return.
CALL FUNCTION 'BAPI_EMPLOYEET_DEQUEUE'
EXPORTING
number = iv_pernr
validitybegin = sy-datum.
If i call this method a dump appears and if the same code of that method is implemented directly in a normal report everything works fine.
Why can't i call this function module from within a method?
Regards
Mark-AndréHi,
the dump even appears by testing the method from Class Builder with F8!
In my test report iv_pernr isn't declared as follows:
REPORT z_test.
PARAMETERS p_pernr TYPE pernr_d.
zcl_test=>check_employee( p_pernr ).
The reason of the dump is parameter RETURN. But i don't understand it why it only doesn't work from within a method.
Dump Message:
In the function module interface, you can specify only
fields of a specific type and length under "RETURN".
Although the currently specified field
"GT_RETURN" is the correct type, its length is incorrect.
Regards
Mark-André -
Hi,
i´ve developed an RFC FM and within this FM i use
CALL FUNCTION '
NUMBER_GET_NEXT'
in order to get a sequential number each time the FM is called.
When this RFC FM is called from XI
i get exception 1 (INTERVAL_NOT_FOUND)
Why is this happening?
How can i solve this problem?
Best regards.Hi,
i just do this:
DATA: l_number(15) TYPE C.
IF l_number IS INITIAL.
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
NR_RANGE_NR = '00'
OBJECT = 'ZVLBSOLICI'
IMPORTING
NUMBER = l_number
EXCEPTIONS
INTERVAL_NOT_FOUND = 1
NUMBER_RANGE_NOT_INTERN = 2
OBJECT_NOT_FOUND = 3
QUANTITY_IS_0 = 4
QUANTITY_IS_NOT_1 = 5
INTERVAL_OVERFLOW = 6
BUFFER_OVERFLOW = 7
OTHERS = 8.
ENDIF.
Best regards. -
Passing value as parameter to 'call function'
Hi,
CALL FUNCTION 'TH_POPUP'
EXPORTING
client = '100'
user = 'XXXXXX'
MESSAGE = 'Hello! u got END SESSION'
MESSAGE_LEN = 0
CUT_BLANKS = ' '
EXCEPTIONS
user_not_found = 1
OTHERS = 2.
The above program pops up a new window in another user system from a user system. xxxxx is that particular userID.
I want to enter the userID after executing and userID should be passed to call function 'TH_POPUP' and show the result.
I tried using 'PARAMETER' statement. It did not work.
Thanks,
vbsigate.Hi,
What i understand is you want to enter the user name on selection screen.
This is the program and it works fine.
(May be in your program the parameter was not defined correctly as type sy-uname).
report abc.
PARAMETERS : p_user type sy-uname obligatory.
CALL FUNCTION 'TH_POPUP'
EXPORTING
CLIENT = sy-mandt
USER = p_user
MESSAGE = 'Hello! u got END SESSION'
* MESSAGE_LEN = 0
* CUT_BLANKS = ' '
EXCEPTIONS
USER_NOT_FOUND = 1
OTHERS = 2
regards,
amit m. -
Call function module from BSP0 (Parameter group)
Hello All,
I am trying to call a FM by changing the parameter group of a planning profile (BSP0) as shown:
CALL FUNCTION Z_BW_CLEAR_VAR.
The name of the function module is already entered in table RSPLF_FDIR.
In the above FM there is DB deletion statement, which is not getting process.
When I kept break point at FM Z_BW_CLEAR_VAR and executed the planning function - it did not trigger the FM.
Please let me know how to call the FM.
Thanks & Regards,
Pratikhi Alberto,
have a look at quesiton 5 in sap note 730870
it explains what you need to restart
from this note:
restart from visual admin:
" the RfcAdapter J2EE Service 'SAP XI Adapter: RFC' is restarted or a dependend J2EE Service is restarted ('SAP XI AF CPA Cache', 'SAP XI AF Messaging')."
Regards,
michal
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a> -
Call function from data base with clob input parameter.
Hello,
In this project I use Jdev 11g.
I call function from database.
create or replace function get_fa_list (
p_fa_id_list in clob
return sys_refcursor
is
vCursor sys_refcursor;
begin
put_msg ('begin');
if p_fa_id_list is null then
put_msg ('CLOB is null!');
else
put_msg ('size CLOB: ' || dbms_lob.getlength (p_fa_id_list));
end if;
put_msg ('Save');
open vCursor for
select rownum as id, s.*
from (
select f.latitude, f.longitude, count (distinct f.res_id) as res_count, count (*) as fa_count, 16711680 as color, res_concat_distinct (f.res_id) as station_list
from mv_frequency_assignment f, table (SplitClob (p_fa_id_list, ',')) l
where f.ext_system = 'BI' and
f.ext_sys_id = l.column_value
group by f.latitude, f.longitude
) s;
put_msg ('Open and End');
return vCursor;
end get_fa_list;
I use TopLink in ejb.
i use follow code for call function and get result.
public List<TmpResPoints> findAllPointsBI(String p_id){
UnitOfWork uow = getSessionFactory().acquireUnitOfWork();
uow.beginEarlyTransaction();
StoredFunctionCall call = new StoredFunctionCall();
call.setProcedureName("get_fa_list");
call.useUnnamedCursorOutputAsResultSet();
ClobDomain c = new ClobDomain(p_id);
//System.out.println(c.toString());
call.addNamedArgumentValue("p_fa_id_list", c);
ReadAllQuery query = new ReadAllQuery();
query.setReferenceClass(TmpResPoints.class);
query.setCall(call);
List<TmpResPoints> result = (List<TmpResPoints>)uow.executeQuery(query);
uow.commit();
uow.release();
return result;
But size parameter "p_fa_id_list" is 0. (geting from temp table in Data base). this code in function >>
if p_fa_id_list is null then
put_msg ('CLOB is null!');
else
put_msg ('size CLOB: ' || dbms_lob.getlength (p_fa_id_list));
end if;)
How I can call this function from dataBase and get result?
thx,
Demka.What is the SQL generated?
The argument should just be the Clob value (a String) not the domain object.
Also try addNamedArgument, and then pass the named argument to the query.
James : http://www.eclipselink.org -
Calling function on the basis of parameter passing in oracle discoverer
Hi,
In my report i want to pass parameter for currency and want to call a function. Is it possible in oracle discoverer to call function created in oracle database.Hi Rod,
e.g i have report. While i run the report parameter wizard dialog box open. i have different parameter like Module, Country, Date etc right now, not using currency.
The report shows me the following fields
Actual Sales, last yr Sales, Target
1000 5666 100000
etc. And all Dara in Currency SAR by default.
Now,
There is one another parameter i.e. Currency and i entered the value for currency as INR. and also enter the other parameters
I want that as this currency INR enter,it call that currency conversion function and convert the data in INR.
and when i click the OK button in Parameter wizard I want to see the same data in INR currency.
If the above is possible then please tell my by steps.
if you can share your email id so that i can show you the report, and clear my requirement.
Thanks
kam -
How to call java function with parameter from javascript in adf mobile?
how to call java function with parameter from javascript in adf mobile?
The ADF Mobile Container Utilities API may be used from JavaScript or Java.
Application Container APIs - 11g Release 2 (11.1.2.4.0) -
How to use CALL FUNCTION '/1BCDWB/SF00000014' in smartform urgent
hiiiiiiiii
Iam doing classical report n i want my output to be printed in smartform.
So my output is in IT_FINAL table.In smartform in Form Interface Table column i had declare :::
Parameter Name: IT_FINAL
Type Assignment:LIKE
Associated Type:ZSD_FINAL ( Its a structure of IT_FINAL)
And in SE38..iam using...............
data: FM_NAME1 type RS38L_FNAM.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZCSF_SDPRSR03_PR'
importing
FM_NAME = FM_NAME1.
CALL FUNCTION FM_NAME1
EXPORTING
IT_FINAL = IT_FINAL.
So while running its giving dump..
I DONT KNOW HOW TO USE THE ABOVE FUNCTION MODULE.
CALL FUNCTION '/1BCDWB/SF00000014'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 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.
Please suggest me with example if possible......URGENT.
(Rewards if solved)
Regards.Hi
see the below doc and do accordingly
How to create a New smartfrom, it is having step by step procedure
http://sap.niraj.tripod.com/id67.html
step by step good ex link is....
http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
Here is the procedure
1. Create a new smartforms
Transaction code SMARTFORMS
Create new smartforms call ZSMART
2. Define looping process for internal table
Pages and windows
First Page -> Header Window (Cursor at First Page then click Edit -> Node -> Create)
Here, you can specify your title and page numbering
&SFSY-PAGE& (Page 1) of &SFSY-FORMPAGES(Z4.0)& (Total Page)
Main windows -> TABLE -> DATA
In the Loop section, tick Internal table and fill in
ITAB1 (table in ABAP SMARTFORM calling function) INTO ITAB2
3. Define table in smartforms
Global settings :
Form interface
Variable name Type assignment Reference type
ITAB1 TYPE Table Structure
Global definitions
Variable name Type assignment Reference type
ITAB2 TYPE Table Structure
4. To display the data in the form
Make used of the Table Painter and declare the Line Type in Tabstrips Table
e.g. HD_GEN for printing header details,
IT_GEN for printing data details.
You have to specify the Line Type in your Text elements in the Tabstrips Output options.
Tick the New Line and specify the Line Type for outputting the data.
Declare your output fields in Text elements
Tabstrips - Output Options
For different fonts use this Style : IDWTCERTSTYLE
For Quantity or Amout you can used this variable &GS_ITAB-AMOUNT(12.2)&
5. Calling SMARTFORMS from your ABAP program
REPORT ZSMARTFORM.
Calling SMARTFORMS from your ABAP program.
Collecting all the table data in your program, and pass once to SMARTFORMS
SMARTFORMS
Declare your table type in :-
Global Settings -> Form Interface
Global Definintions -> Global Data
Main Window -> Table -> DATA
Written by : SAP Hints and Tips on Configuration and ABAP/4 Programming
http://sapr3.tripod.com
TABLES: MKPF.
DATA: FM_NAME TYPE RS38L_FNAM.
DATA: BEGIN OF INT_MKPF OCCURS 0.
INCLUDE STRUCTURE MKPF.
DATA: END OF INT_MKPF.
SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
MOVE-CORRESPONDING MKPF TO INT_MKPF.
APPEND INT_MKPF.
ENDSELECT.
At the end of your program.
Passing data to SMARTFORMS
<b>call function 'SSF_FUNCTION_MODULE_NAME'</b>
exporting
formname = 'ZSMARTFORM'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
if sy-subrc <> 0.
WRITE: / 'ERROR 1'.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
<b>call function FM_NAME</b>
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
GS_MKPF = INT_MKPF
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 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.
Smartform
you can check this link here you can see the steps and you can do it the same by looking at it..
http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
SMARTFORMS STEPS.
1. In Tcode se11 Create a structure(struct) same like the Internal table that you are going to use in your report.
2. Create Table type(t_struct) of stracture in se11.
3. In your program declare Internal table(Itab) type table of structure(struct).
4. Define work area(wa) like line of internal table.
5. Open Tcode Smartforms
6. In form Global setting , forminterface Import parameter define Internal table(Itab) like table type of stracture(t_struct).
7. In form Global setting , Global definitions , in Global data define Work area(wa) like type stracture(struct).
8. In form pages and window, create Page node by default Page1 is available.
9. In page node you can create numbers of secondary window. But in form there is only one Main window.
10. By right click on page you can create windows or Go to Edit, Node, Create.
11. After creating the window right click on window create table for displaying the data that you are passing through internal table.
12. In the table Data parameter, loop internal internal table (Itab) into work area(wa).
13. In table there are three areas Header, Main Area, Footer.
14. Right click on the Main area create table line by default line type1 is there select it.
15. Divide line into cells according to your need then for each cell create Text node.
16. In text node general attribute. Write down fields of your work area(wa) or write any thing you want to display.
17. Save form and activate it.
18. Then go to Environment, function module name, there you get the name of function module copy it.
19. In your program call the function module that you have copied from your form.
20. In your program in exporting parameter of function pass the internal table(itab).
SAP Smart Forms is introduced in SAP Basis Release 4.6C as the tool for creating and maintaining forms.
SAP Smart Forms allow you to execute simple modifications to the form and in the form logic by using simple graphical tools; in 90% of all cases, this won't include any programming effort. Thus, a power user without any programming knowledge can
configure forms with data from an SAP System for the relevant business processes.
To print a form, you need a program for data retrieval and a Smart Form that contains the entire from logic. As data retrieval and form logic are separated, you must only adapt the Smart Form if changes to the form logic are necessary. The application program passes the data via a function module interface to the Smart Form. When activating the Smart Form, the system automatically generates a function module. At runtime, the system processes this function module.
You can insert static and dynamic tables. This includes line feeds in individual table cells, triggering events for table headings and subtotals, and sorting data before output.
You can check individual nodes as well as the entire form and find any existing errors in the tree structure. The data flow analysis checks whether all fields (variables) have a defined value at the moment they are displayed.
SAP Smart Forms allow you to include graphics, which you can display either as part of the form or as background graphics. You use background graphics to copy the layout of an existing (scanned) form or to lend forms a company-specific look. During printout, you can suppress the background graphic, if desired.
SAP Smart Forms also support postage optimizing.
Also read SAP Note No. 168368 - Smart Forms: New form tool in Release 4.6C
What Transaction to start SAP Smart Forms?
Execute transaction SMARTFORMS to start SAP Smart Forms.
Key Benefits of SAP Smart Forms:
SAP Smart Forms allows you to reduce considerably the implementation costs of mySAP.com solutions since forms can be adjusted in minimum time.
You design a form using the graphical Form Painter and the graphical Table Painter. The form logic is represented by a hierarchy structure (tree structure) that consists of individual nodes, such as nodes for global settings, nodes for texts, nodes for output tables, or nodes for graphics.
To make changes, use Drag & Drop, Copy & Paste, and select different attributes.
These actions do not include writing of coding lines or using a Script language.
Using your form description maintained in the Form Builder, Smart Forms generates a function module that encapsulates layout, content and form logic. So you do not need a group of function modules to print a form, but only one.
For Web publishing, the system provides a generated XML output of the processed form.
Smart Forms provides a data stream called XML for Smart Forms (XSF) to allow the use of 3rd party printing tools. XSF passes form content from R/3 to an external product without passing any layout information about the Smart Form.
SmartForms System Fields
Within a form you can use the field string SFSY with its system fields. During form processing the system replaces these fields with the corresponding values. The field values come from the SAP System or are results of the processing.
System fields of Smart Forms
&SFSY-DATE&
Displays the date. You determine the display format in the user master record.
&SFSY-TIME&
Displays the time of day in the form HH:MM:SS.
&SFSY-PAGE&
Inserts the number of the current print page into the text. You determine the format of the page number (for example, Arabic, numeric) in the page node.
&SFSY-FORMPAGES&
Displays the total number of pages for the currently processed form. This allows you to include texts such as'Page x of y' into your output.
&SFSY-JOBPAGES&
Contains the total page number of all forms in the currently processed print request.
&SFSY-WINDOWNAME&
Contains the name of the current window (string in the Window field)
&SFSY-PAGENAME&
Contains the name of the current page (string in the Page field)
&SFSY-PAGEBREAK&
Is set to 'X' after a page break (either automatic [Page 7] or command-controlled [Page 46])
&SFSY-MAINEND&
Is set as soon as processing of the main window on the current page ends
&SFSY-EXCEPTION&
Contains the name of the raised exception. You must trigger your own exceptions, which you defined in the form interface, using the user_exception macro (syntax: user_exception <exception name >).
Example Forms Available in Standard SAP R/3
SF_EXAMPLE_01
Simple example; invoice with table output of flight booking for one customer
SF_EXAMPLE_02
Similar to SF_EXAMPLE_01 but with subtotals
SF_EXAMPLE_03
Similar to SF_EXAMPLE_02, whereby several customers are selected in the application program; the form is called for each customer and all form outputs are included in an output request
Advantages of SAP Smart Forms
SAP Smart Forms have the following advantages:
1. The adaption of forms is supported to a large extent by graphic tools for layout and logic, so that no programming knowledge is necessary (at least 90% of all adjustments). Therefore, power user forms can also make configurations for your business processes with data from an SAP system. Consultants are only required in special cases.
2. Displaying table structures (dynamic framing of texts)
3. Output of background graphics, for form design in particular the use of templates which were scanned.
4. Colored output of texts
5. User-friendly and integrated Form Painter for the graphical design of forms
6. Graphical Table Painter for drawing tables
7. Reusing Font and paragraph formats in forms (Smart Styles)
8. Data interface in XML format (XML for Smart Forms, in short XSF)
9. Form translation is supported by standard translation tools
10. Flexible reuse of text modules
11. HTML output of forms (Basis release 6.10)
12. Interactive Web forms with input fields, pushbuttons, radio buttons, etc. (Basis-Release 6.10)
Regards
Anji -
Calling functions / setting variables in loaded SWF
You know how you can create a Movieclip object, add a
function or variable to it, then call that function or change that
variable from within the SWF that includes it? I wanna be able to
do that, only with SWFs that are loaded at run time.
My "main" SWF is simply a menu-type thing. The user clicks a
button in my MAIN.SWF, and the MAIN.SWF then loads the SWF that's
associated with that button, using the AS 3.0 prescribed
Loader()-URLRequest()-addChild() method that everyone always asks
about.
This works great. But now I've got some custom objects and
such (ie., not just strings) within my MAIN.SWF that I'd like to be
able to share with the loaded SWFs. Preferably, I'd like to use an
accessor-type function (ie.,
LoadedSWF.GiveMeTheCoolObject(MyCoolObject);), though at this point
I'm willing to hack into the object itself (ie.,
LoadedSWF.CoolObject.CoolField = MyCoolObject.CoolField;) if that's
what it takes.
I've tried just calling the functions and setting the fields,
but the AS 3.0 compiler doesn't care for that sort of nonsense on
it's generically-defined objects. Notice also that, at run time, a
call to LoadedSWF.hasOwnObject("GiveMeTheCoolObject") returns true.
So my big-brained colleagues, what's the magic?
In advance, thanks for the help!
ScottKglad,
quote:
Originally posted by:
kglad
from that error message it appears your function is expecting
a member of the MyCoolObject class, correct?
and MyCoolObject is not an instance of that class. so, you
need to fix that. ie, create a member of that class and use that
class member as the function parameter.
Heh, that's what the error message says all right. But the
object actually IS a MyCoolObject class object. I stared at this
thing for hours, and MyCoolObject IS an instance of that class. I
tried various casting combinations (including casting it to an
Object and passing that) but had no luck whatsoever.
So I googled this particular runtime error message ("Error
#1034: Type Coercion failed: cannot convert ") and found a ton of
links to other people having a similar issue. Typically, the
problem was just as you said, someone passing a button as a string,
that kinda thing. But one guy had a problem with an object he
derived from the Event class. After hours spent trying to get it to
work, he tried overriding the base class' clone() method and got it
to work:
http://www.asserttrue.com/articles/2006/10/14/custom-events-in-actionscript-3-0
As for my project, I took a long hard look at the overall
architecture of my project and decided that it was best if all the
"real work" took place in the MAIN.SWF file. This approach would
solve a couple of other problems, and it just makes sense in a
"separate the display from the data" mentality.
So (and this is the interesting part) I changed the API for
the LOADED.SWF to accept String pairs (ie.,
LoadedSWF.AddToDisplay(Name:String, Data:String) ) instead of
accepting MyCoolObj. Ran it, and Viola, now we're working without
any run time exceptions. After that glorious moment, I created a
couple of other APIs that just accepted base classes (one an int
type, the other a function type) and was happily on my way.
From this, I gather that passing non-base class (ie, derived
class) objects to loaded MovieClips via custom function APIs is...
maybe not as straightforward as we'd expect. In the grand scheme of
things though, not a big deal: As far as I'm concerned AS3 rocks.
Again Kglad, thanks for all the help: Your input on how to do
this was the big push that I needed to get over the last technical
hurdle of this project.
To those who are reading this topic for the "how do I call
functions and/or set variables in a loaded SWF?"
The short answer is to cast the loaded SWF's content object
as a MovieClip and then call the function or alter the variable:
//Load the SWF (you've seen this code a million times)
var LoadedSWFObj:Loader = new Loader();
var MyURL:URLRequest = new URLRequest("LoadThisSWF.SWF");
LoadedSWFObj.load(MyURL);
//This is within your Event.COMPLETE handler:
//Cast it as a MovieClip object and work with that.
var LoadedSWF:MovieClip = LoadedSWFObj.content as MovieClip;
// or another way to cast it is:
var LoadedSWF:MovieClip = MovieClip(LoadedSWFObj.content);
//Call yer function:
LoadedSWF.CallMe(); -
Call function from pl/sql when the name of funcion is in variable
Hi,
is it possible to do the following:
I want to call (excute) a function within a pl/sql block, but the problem is that the name of the called function is stored in variable (is got as a parameter to mine pl/sql block).
let's imagine:
DECLARE
name_of_function varchar2(10);
result number;
BEGIN
result := ???name_of_function????;
END;
thanks for any suggestion,
valerthanks for answer this exactly what i need.
as i learned EXECUTE IMMEDIATELY does invoke pl/sql block dynamicaly.
I tried it for invoking procedure. it woked fine. But not for function.
So, does it work also for invoking FUNCTIONS ? -
BTE Name in Called Function Module
Hello,
A function module say XYZ is called from a BTE. Can I know the name of the BTE which called the function module XYZ inside the function module XYZ ?
With Regards,
Avisesh.I think this document may help you...
<b>Business Transaction Events</b>
This activity describes how you can connect additional components (such as in the form of function modules developed yourself or a product from an external software provider) to the standard R/3 System.
There are two types of interface available in the General Ledger
Accounting (FI-GL), Accounts Receivable and Accounts Payable
(FI-AR/FI-AP), and Sales and Distribution (SD) components for this:
1. Publish & Subscribe interfaces (also called "informing interfaces" in the following) These should inform you about particular events (such as a document being entered) in the SAP standard application and make the data generated as a result available to the external software. The external software does not return any data to the standard R/3 System.
(I'm confused. MIT is using two business transaction events for the SD to FI interface. Both of these events are Publish & Subscribe interfaces. They both return data to the SAP standard application! They both change the FI document before it is posted. What I've figured out is that if there is an export to memory and an import from memory before and after the function call, then we can't modify the data. We can check this in the calling function module - OUTBOUND_CALL_00503110_E or OPEN_FI_PERFORM_00001020_E, etc)
Examples of such events in the R/3 System are:
Master record was created, changed, or blocked
Document was entered, parked, changed, or reversed
Items were cleared or reset
Additional processing can be caused in the additional component on the basis of these events and data:
Starting a workflow
Generating or changing additional data
Requesting correspondence
FI Clearing (F-32) calls (gathered via SE30):
Function OPEN_FI_PERFORM_00001020_E (can't modify data)
00001020 POST DOCUMENT: Prior to final checks
EVENT
This Event is reached prior to completing the document. The checks that are carried out at this point include checking, prior to posting, that the document balances to zero, and calculations for tax offsetting. This Event is accessed once per standard posting process and is similar to validation at document level (Event 0003). A document number has not yet
been assigned when this Event is reached.
INTERFACE
All document line items created and the document header data are
transferred (both as tables).
Parameter
T_BSEG
T_BKPF
Function OPEN_FI_PERFORM_00001025_E (can't modify data)
00001025 POST DOCUMENT: Final checks completed
EVENT
This Event lies following all checks on the whole document, but prior to number assignment. Following this Event, no further error messages may be sent. The document is complete at this point, and no further changes can be made to it prior to posting.
INTERFACE
All current data, all document data relevant for the posting, and various control parameters are transferred to the additional component. At this point you can still implement your own checks on the current document data.
Parameter
I_BKDF
T_AUSZ1
T_AUSZ2
T_AUSZ3
T_BKP1
T_BKPF
T_BSEC
T_BSED
T_BSEG
T_BSET
T_BSEU
Function OPEN_FI_PERFORM_00001030_E (can't modify data)
Function OPEN_FI_PERFORM_00001140_E (can't modify data)
2. Process interfaces (also referred to as "process" in the following) Process interfaces are used to submit business processes to a different control which cannot be realized with the standard system, that is process interfaces replace standard processes. Here you can structure determination of individual field contents or of specific reactions to process flows individually. It is possible to connect different external developments to the standard R/3 System. The additional developments are generally carried out using the ABAP/4 Development Workbench. This way you can, for example, influence the control of payment transactions. Selection of payment method, house bank and partner bank can be made using the payment data (currency, amount, and payee) according to a selection logic which you have defined.
FI Clearing (F-32) calls:
Function OPEN_FI_PERFORM_00001120_P
Function OPEN_FI_PERFORM_00001130_P
Function OPEN_FI_PERFORM_00001150_P
Function OPEN_FI_PERFORM_00001170_P
Standard Settings
Sample modules are delivered in the standard R/3 System which you can
copy into your name range and fill them with statements there.
Activities
1. Enter a product using "Settings -> Customer's products". Actually, in 4.6C, from transaction FIBF (IMG -> Financial Accounting -> Financial Accounting Global
Settings -> Business Transaction Events):
Settings -> Products -> ...of a customer
There are generally a large number of function modules belonging to a product which can be called by different program events from within the standard R/3 System. A product can also be an external software component. If the product is in an external system, enter an RFC destination here. If the product is in the same system, you do not have to enter anything. Important: Do not forget to activate the product after making the following settings.
2. Establish the interfaces with which the R/3 System provides you. To do this, choose
Environment -> Info system (P/S)
or
Environment -> Info system (Processes).
Execute the program. You should enter "A" as the
attribute type. You see the respective interfaces with which the R/3 System provides you. Note the key of the interface which you require.
You can also select:
By particular SAP application components
By particular events by entering intervals
Which interfaces are used in activated products
Which interfaces are used within a particular country version or within a particular industry
Which interfaces are used within a particular customer product
3. Enter the function module which you have developed yourself. To do this, choose either Goto -> Edit modules within the info system or Settings -> P/S modules or Process modules -> Customer's in the "SAP Business Framework" menu. Make the following entries:
Key for the interface
The product that you want to use
Function module which belongs to this product.
You can also enter several function modules for a product. Caution:
The function module must be within your name range, that is must begin with the letter Z. You leave the Ctr and Appl. fields blank unless you want a particular country version or a particular SAP industry-specific component to be enhanced or replaced instead of the standard process flow.
4. Fill the source text of your function module
and activate it. To do this, go again via Environment -> Info system (P/S) or Environment -> Info system (Processes) into the information system and execute the program. Then proceed as follows:
Click twice on the interface you have chosen. If you want, you can look at the interface at this point by choosing Goto -> Interface. Then choose the Back function again afterwards.
Place the cursor on the relevant line and choose Goto -> Function library. You see the sample function module delivered by SAP.
Copy the sample module delivered by SAP and call it the same as the function module entered in step 3.
Fill the source text of the empty function module.
Activate the function module.
Activate the product as described in step 1.
5. Run the R/3 program affected and test whether calling your function module works.
Further Notes
The other menu paths are only used for information about additional components delivered by SAP or about software already installed by external software providers. -
Call function and call customer function
Hi
Can anybody let me know what is the difference between CALL FUNCTION AND CALL CUSTOMER- FUNCTION .
i know call customer- function is used while we r working on user exits .
but is their any specific reason of difference ...
ThanksCALL CUSTOMER-FUNCTION function_exit parameter_list.
Effect
This statement can be used in programs delivered by SAP. It includes the function module exit specified in function_exit . The function module exit is a customer exit. In an SAP program, it enables you to call a function module provided by SAP and implemented by the customer.
The indicator function_exit must be a three-digit text field literal. A function module exit is specified by SAP using the transaction SMOD and can be activated using the transaction CMOD in customer systems.
Specifications by SAP
An empty or partly implemented function module must be assigned to the function module exit using the transaction SMOD. The name of the function module consists of EXIT_, the program name, which contains the statement CALL CUSTOMER-FUNCTION, and the three-digit indicator in function_exit. The interface of the function module is completely defined by SAP.
Activation in the customer system
The transaction CMOD enables the customer to implement the source code of the function module within an enhancement project and to activate the function module exit. If the function module exit is not activated, the statement CALL CUSTOMER-FUNCTION is ignored. If the function module is activated, the corresponding function module is called in the same way as the general function module call.
Syntax and meaning of the parameter_list for the assignment of the actual parameters to formal parameters and for the exception handling are the same as in a general function module call. It is not possible to dynamically fill the interface.
CALL FUNCTION func
Syntax
CALL FUNCTION func { parameter_list
| parameter_tables }.
Effect
This statement calls the function module specified in func. The identifier func must be a character-type data object, which contains the name of a function module in uppercase letters during the statement execution. Each function module of an SAP system has a unique name, which is why you need not specify the function group.
Use additions parameter_list or parameter_tables (as of release 6.10) to statically or dynamically assign actual parameters to the formal parameters of the function module and return values to the non-class-based exceptions.
Note
If the name of a function module is specified by a constant or as a literal, the extended syntax check can check the statement.
Exceptions
Catchable Exceptions
CX_SY_DYN_CALL_ILLEGAL_FUNC
Cause: The called function is known but not active.
Runtime Error: CALL_FUNCTION_NOT_ACTIVE
Cause: The called function is unknown.
Runtime Error: CALL_FUNCTION_NOT_FOUND
CX_SY_DYN_CALL_ILLEGAL_TYPE
Cause: The type of the actual parameter does not fulfill the requirements of the function interface.
Runtime Error: CALL_FUNCTION_CONFLICT_GEN_TYP
Cause: The actual parameter does not have the length expected by the function.
Runtime Error: CALL_FUNCTION_CONFLICT_LENG
Cause: The actual parameter does not have the type expected by the function.
Runtime Error: CALL_FUNCTION_CONFLICT_TYPE
Cause: Only those functions can be called in the update task that are intended for it.
Runtime Error: CALL_FUNCTION_NO_VB
Cause: An actual parameter does not fulfill the alignment requirements of the respective formal parameter.
Runtime Error: CALL_FUNCTION_WRONG_ALIGNMENT
CX_SY_DYN_CALL_PARAM_MISSING
Cause: The function expects a parameter, which has not been passed by the caller.
Runtime Error: CALL_FUNCTION_PARM_MISSING
CX_SY_DYN_CALL_PARAM_NOT_FOUND
Cause: The caller has passed a parameter, which is not known to the function.
Runtime Error: CALL_FUNCTION_PARM_UNKNOWN
plz reward points if it helps
Maybe you are looking for
-
Error : Catalog object schema validation failed in OBIEE 11.1.1.5
Hi all , Facing the below error while accessing few reports present in a folder (Voice Tab) . But , able to access other reports present in the same folder . Catalog object schema validation failed: /users/weblogic/sayak/TPLAN reports/Voice Tab/Net r
-
I'm taking Accounting 212 online through VWCC and we were told to use Firefox to work on Blackboard. Whenever I try to open the recordings that the teacher has posted, I get a blank screen and it says that it is done.
-
I use Firefox and have been unable to update iTunes. when running iTunes diagnostics, the Network Connectivy Test results say "Secure link to iTunes failed". Can someone help me here?
-
I want sorting option in notes on my iphone
i am using iPhone & i want to sort my notes date wise ... pls help if anybody has any idea to do it...
-
FBL3N - Dynamic selection ignores BSEG-NPLNR
Good afternoon to all: I want to add BSEG-NPLNR (Network) to the dynamic selection for FBL3N. I use SE36 to add BSEG-NPLNR to the selection view of logic database SDF, but FBL3N ignores the selection I enter there. I read in OSS note 310886 that fie