Reg: Calling an ecatt script in R/3 function module
Dear Freinds
Can Anyone of you tell me if an ecatt script can be called inside an r/3 function module.
if yes, please explaion me how it can be done.
If you have any example code it will be quite useful for me.
Points will be rewarded for suitable answers.
With Warm Regards
Ravishankar Vembu
Hello Ravishankar
The following sample report <b>ZUS_SDN_ECATT_EXECUTE</b> shows how to execute an eCATT testcript using its default parameter values.
*& Report ZUS_SDN_ECATT_EXECUTE
REPORT ZUS_SDN_ECATT_EXECUTE.
data:
gt_execute type ETEXE_OBJ_TABTYPE,
gs_execute type etexe_obj.
start-of-selection.
gs_execute-start_lnr = '1'.
gs_execute-obj_lnr = '1'.
gs_execute-obj_type = 'ECSC'. " test script
gs_execute-obj_name = '<name of your testscript>'.
gs_execute-obj_ver = '1'.
gs_execute-sysdata = '<name of system data container>'.
gs_execute-testsystem = '<test system>'.
append gs_execute to gt_execute.
CALL FUNCTION 'ECATT_EXECUTE'
EXPORTING
TO_EXECUTE = gt_execute
DISPLAY_LOG = 'X'
* LOG_TXT = ' '
* DISPLAY_START_POPUP = ' '
* START_PROFIL =
* START_PROFIL_X =
* WBMANAGER_ACTIVE = ' '
* EXIT_STATUS_UPDATE = ' '
* HTTP_TRANSID = ' '
* I_SUPRESS_OUTPUT = ' '
* IT_VAR_TO_EXEC =
* I_PAR_VAR_DISPLAYED =
* IT_VAR_EXT =
* IT_CALLER =
* IS_TZEXECDATA =
* IMPORTING
* EXECUTED =
* LOGID =
* LOG_DISPLAYED =
* TRACE_PROT =
* E_RESULT_XML =
* ET_RESULT_XML_ERR_MESSAGES =
EXCEPTIONS
NOTHING_TO_DO = 1
TOO_MANY_SCRIPTS_CALLED = 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.
end-of-selection.
Regards
Uwe
Similar Messages
-
Calling a sql script file from a function.
Hi,
I need to call a sql script file from a user defined function. Currently i am trying to do this in Oracle SQL Developer. i tried calling with
@ {filename}, EXECUTE IMMEDIATE etc, but nothing worked. I get the Compiler error.
Basically my need is to call catldap.sql file so that DBMS_LDAP package gets loaded and then I can call the API functions from this.
Please let me know if this is possible doing in a PL/SQL function.
thanks,
Nareshuser784520 wrote:
I need to call a sql script file from a user defined function. Not possible.. and it seems that you do not fully understand the client-server within the Oracle context.
All SQL and PL/SQL are parsed and executed by an Oracle server process. The SQL and PL/SQL engines each expects a single command block at a time. Neither of these can accept a series of separate commands as a single call and then execute each in turn. The SQL engine expects a single SQL statement at a time. The PL engine expects a single PL/SQL anonymous block at a time.
This server process also cannot break into the local file system to access script files. Nor can it hack across the network to access script files on the client.
In order for the server process to access local files, a directory object needs to be created and the current Oracle schema needs read and/or write access on that directory object. As sound security principles apply.
There's no PL/SQL command to execute a script. You must not mistake SQL*Plus commands (this client has a very limited vocabulary) with PL/SQL commands. SQL*Plus executes its own commands.. and send SQL and PL/SQL commands (a statement block a time) to the Oracle server process to be serviced and executed.
It is also a very bad idea to execute external script contents from inside an Oracle server process - as that script resides externally and thus outside Oracle's security mechanisms. This means that is is pretty easy for someone to access that script, compromise it, and then have you inject and execute the contents of that script into the database.
It is not sound security.
Last issue - it is even worse to have application PL/SQL code dynamically creating (or trying to create) portions of the Oracle data dictionary and PL/SQL call interface.
The database needs to be installed correctly - and this includes loading and executing the required rdbms/admin scripts during database installation. It does not make sense at all for application code to try and execute such scripts. It raises numerous issues, including having to allow that application code full and unrestricted SYS access to the database instance. A very serious security violation.
I do not agree at all with the approach you want to use. -
Reg function modules in scripts
Hi,
<b>wat happens if we dont use open_form , start_form , close_form...
which is mandatory function module and which optional functional module ???
wat happends if we dont use close_form?</b>pls tel me its really urgent
pls
Thanx in Advance..Hi,
wat happens if we dont use open_form , start_form , close_form...
For open the form open form should be there other wise we can't run the script.
which is mandatory function module and which optional functional module ???
Start-form is optional and opne_form and lose_form is manditory FMs. same as write_form also.
wat happends if we dont use close_form?
If you don't use close_form then while running the script you will get error.
Hope this helps you, reply for queries, Shall post you the updates.
Regards.
Kumar. . -
How to check if a function module has been called dynamically in programs
Hi,
I wanted to know if there is a way to check if a function module has been called dynamically in any programs. In SE37, if you click on where used list for a FM, it shows FM not found in programs (Possibly dynamic calls).
I am checking if the function module /SDF/RBE_EXECUTE_SQL_WRAPPER has been used in any of SAP programs. Your help is greatly appreciated.
Best regards,
Sivaone way will using program RPR_ABAP_SOURCE_SCAN search for complete source codes with a find string RBE_EXECUTE_SQL_WRAPPER .
PS But it the function module name comes from a table ( Table entry value) then it is difficult to find
a® -
Error "Job already started" when calling a adobe form in Z function module
Hi All,
I have a error when calling a adobe form in a custom function module.
I am using FP_FUNCTION_MODULE_NAME to get the adobe form function module and then i am using FP_JOB_OPEN function module to control the printing parameters such as no print preview or no dialog ..etc.. I dont have any exceptions during the call of FP_JOB_OPEN function module ..
Later I am calling my function module which was generated for the adobe form and i am getting the error called " JOB ALREADY STARTED".
I tried executing the same function module in se37 and the PDF form output was generated, and also by commenting FP_JOB_OPEN function module the PDF form output was generated.
But i need the FP_JOB_OPEN function module to control the output based on the output type which triggers the form output such as the medium from nast record which says print or email or fax.. etc
Please let me know how to handling this error.Just as a followup note. If you are testing a function module from SE37 and the test button you will get a value in SY-CPROG. You must override this value for everything to work.
If you override the value of SY-CPROG with the main program that will be calling the function module you have no problem.
John W. -
Calling Web Service from Function Module
dear all
i am new to SAP.
i have a web Service developed with .net and C#.
i want to call this web Service from inside a function module.
how can i do this ?
thanks,Hi Ramzy,
Please browse through chrome or sdn , there is a lot of documents and discussions, any how find the below URL, which might be helpful.
Create an SAP Web Service Consumer (calling External Web Service from ABAP)
Create a Function Module and full the below Code :
Sample code :
DATA: http_client TYPE REF TO if_http_client,
host_str TYPE string VALUE 'www.myservice.in',
service_str TYPE string,
path TYPE string VALUE 'my path',
errortext TYPE string. "used for error handling
DATA : wf_string1 TYPE string,
lw_inputs TYPE string,
error_text type string,
subrc TYPE SY-SUBRC,
lw_outputs TYPE string.
CALL METHOD cl_http_client=>create_by_url
EXPORTING
url = 'myurl'
IMPORTING
client = http_client
EXCEPTIONS
argument_not_found = 1
plugin_not_active = 2
internal_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL METHOD http_client->request->set_header_field
EXPORTING
name = '~request_method'
value = 'POST'.
CALL METHOD http_client->request->set_header_field
EXPORTING
name = '~server_protocol'
value = 'HTTP/1.1'.
CALL METHOD http_client->request->set_header_field
EXPORTING
name = '~request_uri'
value = 'mypath'.
CALL METHOD http_client->request->set_header_field
EXPORTING
name = 'Content-Type'
value = 'application/soap+xml; charset=utf-8'."'text/xml; charset=utf-8'.
CALL METHOD http_client->request->set_header_field
EXPORTING
name = 'Content-Length'
value = '19000'."txlen.
CALL METHOD http_client->request->set_header_field
EXPORTING
name = 'SOAPAction'
value = 'myURL'.
concatenate 'data u need sned' into wf_string
CALL METHOD http_client->request->set_cdata
EXPORTING
data = wf_string1
offset = 0
length = '19000'.
Regards,
Lokeswar. -
Standard Component in CRM that will call RFC Function Module
HI all,
Is there any Standard Component in CRM that will call RFC Function Module from ECC and that called RFC FM should Fetch the data from ECC.You can call RFC from different places, like programs, function modules, web dynpros, classes...
So you just have to have appropriate RFC on ERP side and call it from CRM side. To call it you use the following statement...
CALL FUNCTION 'YOUR RFC FUNCTION'
DESTINATION i_dest "name of server
EXPORTING
your export parameters
IMPORTING
your import parameters
Regards. -
Calling Subroutine of a Function Module
Hi friends,
I need to call a routine which exists in a function module from anopther function module.
The routine is in a include program (ie type I).
is there any way....PERFORM add_relations in program L2012F03.
-
How to call the Report program into Function module
Hi Experts,
Actually I want to create the DataSource. But I have only the ALV report program. I need to create function module but I dont know how to call the ALV report program using in function module
So could you please any one send the Document or step by step method?
Advance Thanks,
SathisIf the report is just based out of a table than create a Generic Extractor using View.
If its an InfoSet query than create a Generic Extractor on that InfoSet.
If its an ABAP report than create a Generic Extractor using FM
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33 -
How to call a WD Application from a function module?
Hi Folks,
I have a requirement in my project to call my web dynpro application from a function module .
Can someone help me out with this , some example or docs would be of great help .
Regards
Abhishek SahaiHi,
why you want to have a FM to call the Application. If it is called also, do you want to display the applicaiton output to user.
Do you use this FM inside any class or WD compoent or what.
There is a class CL_WD_UTILITIES=>CONSTRUCT_WD_URL where an Application is generated but you need to have the windoe manager to show this application.
Can you elaborate more on your requriement.
Regards,
Lekha.
Edited by: Lekha on Sep 29, 2009 4:09 PM -
Error in Functional module calling from XI!!!
Hi All,
I'm using XI to pick data from ORACLE write it in SAP and take the response from SAP and write it back in ORACLE database. I'm using a custom functional module in SAP and calling it from XI .
The custom functional module create the CUSTOMER and ORDER .
Customer is getting created in SAP but order is not created. We are using two different functional modules for customers and orders.
The above functional modules are executing in SAP but while calling from XI only the customer is getting created in SAP.
Please post your views and suggestions on this issue.
Thanks in advance.
LNFirst put the commit work after successfuly executing the order creation in the custom function module.
If you already put and doesn't know why it is not creating the orders, debug the function module by putting the same data which you are passing from XI in test tab.
Suppose, the Orders are creating in the dubug mode. Then debug the custome function module dynamically using SM50.
Regards,
Krishnaraju. -
Calling text iwith function module
Hi,
Please help me to call the TEXT in the program from function module
Thanks in Advance
JohnHi,
I have to display text( text of 60 characters ) in the output using a function module.
I should not use ch(60) type c.
Call from a functiom module which can create the text and display it in the output list.
Thanks in Advance
John -
Dynamic Call --- User Exit/Function Module
Hi All,
We have a User Exit/Function Module which is called dynamically. This is configured and we are missing its configuration path. Could any of you guys let me know more details where this configuration could reside ?
Thanks much
RaghuHi,
When this function module CALL FUNCTION LT_TRWPR-FUNCTION is called, it automatically goes into a Z_XXXXXXXXX function module.
This function module is called in all transactions where financial postings could happen, however to be precise i would say at the time of Vendor invoice postings.
Eg: Tcodes MIRO, FB60.
Thanks
Raghu Kolla -
Reg:rfc function modules
can i call below functionmodule in within the rfc function module.
CALL FUNCTION 'ZTEST_FUNC' in background task
here ztest_func is the rfc function module.
could any body please tell me its very urgent.
Regards,
ChaitanyaYes you can call it but, you have to ensure that you do a COMMIT WORK after the LUW for the function module to get executed in the background.
CALL FUNCTION 'ZTEST_FUNC' in background task
COMMIT WORK. ( This kicks off the function module).
hith
Sunil Achyut -
Ecatt script fails due "Error in OLE API method Call" error
Hi ,
Ecatt scripts fails due to "Error in OLE API method Call" error, this error message occurs once a while.
We are calling testpartner scripts from Ecatt using REFEXT command. At times this ECATT script fails due to above issue.
Please help in solving this issue.
Thanks,
Asha>
Asha Nagaraj wrote:
> Hi ,
>
> Ecatt scripts fails due to "Error in OLE API method Call" error, this error message occurs once a while.
>
> We are calling testpartner scripts from Ecatt using REFEXT command. At times this ECATT script fails due to above issue.
>
> Please help in solving this issue.
>
> Thanks,
> Asha
Hi Asha,
Are those components are connected and the necessay settings has been done?
Regards,
SSN.
Maybe you are looking for
-
Error message when trying to updating
When every my ipod is trying to update I get the error message "attempting to copy to the disk "**** ipod" failed the disk could not be read from or written to." What do I do?
-
Urgent : Bill Qty based on Fisrt day of Previous week to current week
Hi, I have to create a Restricted Key figure. Bill Qty is to be restricted on a day, which is first day of previous week. (1) I have restricted KF, with Current Week SAP exit variable. (2) Restricted KF, with Calendar Day (Variable ZDATE, customer ex
-
Imovie will not load correctly
Hi imovie 11 was playing well until a few days ago. Now, when it loads, only the tabs load. The screen remains as my desktop. I can go to a tab, such as edit, and create a new movie clip, and then I will see imovie appear out of the top right corner
-
How to track total call duration & data usage for ...
How do I track my total call & data usage for Nokia Lumia 620. I had search for datasense from the store however unable to find? Is there any other applications that can be use to track.
-
Binary search in a text file.
Is it possible to carry out binary search directly in the text file without passing the file data into a List data, in order to save RAM?