Remote enable module - exceptions issue
Hello all,
I have a function module.
I choosed to make it RFC : Remote enable module.
Then I got the message During RFC/update, no exception classes can be used, when I try to check it.
So I commented all parts regarding exceptions, deleted the Exceptions part .
And I still receive the same message
I don't know what else to do... Does anybody has an advice ?
Thank you !!!
Hello Ariana
Most likely there is an exception class defined in the signature of your function module.
Remove the exception class and replace it with a standard exception and then the compilation error should disappear.
However, RFC-enabled fm's should not raise any exception because otherwise the RFC connection will dump. Instead, return the errors as messages in a RETURN parameter (of table type BAPIRETTAB) like it is done in BAPIs.
Regards
Uwe
Similar Messages
-
Remote Enabled Module option for FI_ITEMS_DISPLAY
Hi,
We need to Enable the Remote Enable option for function module
FI_ITEMS_DISPLAY to access the third party system.
Please suggest wheather we can enable the remote enable option but in
this function module refernce parameters are used.
please suggest.Hi,
purpose of this FM is to display ALV with some data which are passed to this function module and therefore it is meaningless to make this FM remote enabled. It is not clear what exactly is your issue. Can You explain it in more detail?
If you want to get items data from third party system and than to display them in SAP, you do not need to change this FM to remote enabled. You just need to get data from external system before calling this FM for displaying data and pass these data to FM FI_ITEMS_DISPLAY.
If you want do display ALV in third party system, it is not possible.
In general, it is possible to make a customer function module which will be remote enabled and will be used as a "wrapper" and call this FM instead of the original one.
Regards,
Adrian -
Connector name inside Remote enabled module
Hi
I have a remote enabled function module which can be called from any system.
But the problem is that I need to have to connector name inside the FM code through which the call has made.
Is it possible?
For eg. We may call the FM from a system like
CALL 'MY_REMOTE_MODULE'
DESTINATION 'connector_name'
EXPORTING
IMPORTING
Can I have the name of the connector(connector_name in above code) inside the FM code without explicitly passing it in exporting parameter?
Thanks
AnkurNot sure if there is another way next to passing it as an additional parameter. Why is this simple solution not an option for you?
Thomas -
Read revision Level of material with remote enabled module
Hi all,
I want to know, if it's possible to read the latest revision level or the revision level of a specific date of an material via a function module wich is remote call enabled?
I have found the function modul:
REVISION_LEVEL_SELECT
this does exactly what i need, but it is not enabled for a remote call. Is there any other function modul I can call remotely to get the revision level?
Thanks for any help
best regards
Matthias Brück.yes, thats right and exactly my problem. I have testet this internal FM via transaction se37 and got exactly what I need.
So, I'm looking for an FM wich I can invoke remotely and returns the Revision Level of the material.
But, thanks for your hint! -
Doubt in remote enabled module
hi all
i am creating a fn. module (rfc).when i activate the fn. module it shows an error (report/program statement missing or program type is include). my fn group is inactive how to active that ... is the problem is because of fn group....please help in this regard
thanks
lokeshhi
you are function group is inactive..
1. se37-put in your function module- click change.
2. click on function module- check - extenden program check.
It will display 2 fatal exceptions. These exceptions are the 2 include files of the function group.
one is the include file with all the collections of function modules. (this has further include file)
The other one is the top file with all global data declarations. (this has further include file)
3. double click on each of the includes, and in turn double click on the include files inside them. AND ACTIVATE ALL OF THEM ONE BY ONE.
4. the include files below will give a warning- still activate them any way.
then
5. click back till you return to the function module screen.
7. check, save and activate- and the eror is gone.
hope it was helpful.. -
How to Create a Remotely Enabled Function Module
Hi All,
How to Create a Remotely Enabled Function Module.
I Want to Create a FM Using Sample Data , This for Practice
What Fields can i give in the Import and Export Parameters.
Please Give me one Example
Can Any one Give me the Steps to do this.
Regards
VamsiHi Vamsi,
Lets do simple example where you will first create a RFC in one server (say A) and create normal program in othere server (say B). Finally you will call the RFC in A from B.
Do the following steps for creating RFC in server A.
1. log on to server A
2. go to se37
3. Edit -> function groups-> create function group and give the function group name (say ZGRP).
4. create a FM ( say Z_TEST_RFC) in se37 providing the function group which is created just now.
5. go to attribute tab -> choose remote-enabled module from processing type.
so that your FM will become RFC.
6. provide the import parameter in import tab.
we will provide only two import parameters.
- parameter name : P_NUM1, typing: TYPE, associated type : I & <b>check the pass value</b> (all the parameters of RFC must pass by value).
- parameter name : P_NUM2, typing: TYPE, associated type : I & <b>check the pass value</b>
7. provide the export parameter in export tab.
parameter name : P_SUM, typing: TYPE, associated type : I & <b>check the pass value</b>
8. write the given simple code in source code tab.
FUNCTION Z_TEST_RFC.
P_TOT = P_NUM1 + P_NUM2.
ENDFUNCTION.
Do the following steps for creating ABAP program which will call the RFC in server B.
1. se38 - > creat a program.
2. write the given simple code.
data tot type i.
call function 'Z_TEST_RFC' destination '<b>XXXXXX</b>'
exporting
p_num1 = 10
p_num2 = 15
importing
p_tot = tot.
write tot.
please note that <b>XXXXXX</b> is RFC connection which is avialable in <b>sm59</b> transaction in server A.
-go to sm59 - > abap connection (list of RFC connection configurations are avialable). choose server B connection and replace it of <b>XXXXXX</b> in the code.
finally you can execute the normal abap program that will call the RFC and display the result.
Regards,
Sukhee -
Can we call Remote Endable Module from another Remote Enabled Moduel
Hii experts...
I have a problem regarding Remote Enabled Module Function Module....
Actually i want to call the standard BAPI 'BAPI_GL_GETGLACCBALANCE' into the BAPI which i hve created...
is it possible???
or can anyone tell me if it is not possible then what is the alternative for this..???'Remote enabled' means that you can also call the function remotely. The 'Remote enabled' characterstic implies some restrictions for the FMs interface, i.e. parameters can not be passed by reference because the remote system has no access to the memory of the called systems where the referenced data are located.
Remote call means only a restriction for the remote call, not for any direct call.
Regards,
Clemens -
hi all,
i want to know how to create remote function modules. how to give the import and export parameters. i want the link of how to create the function modules.
bye
sureshHi Suresh,
Goto transaction
SM37 -> Create your function module as Z_FUNCTION.
Assign a function group ( if function group is not there then create a function group as SE37 -> GOTO -> Function Group -> Create Function Group)
On attribute tab, you will see three radio buttons.
Select 'Remote enabled module'
Select :Import tab.
Enter i_MATNR
Type MATNR
Select : Export tab
Enter : e_mara
TYPE MARA
Select : Source Code
Enter :
SELECT SINGLE * FROM MARA INTO e_mara FOR MATNR = i_MATNR.
Save your module.
Activate it.
Test using F8.
You can call this function in your program as
CALL FUNCTION 'Z_FUNCTION' DESTINATION destination_name.
Hope this will help.
Please award few points if it resolves your issue.
Thanks and Warm Regards.
Pras Durafe -
Remote-Enabled Method (wrt ABAP Objects)
Hi All,
Adhering to ABAP Objects, in my project, i am creating instance methods or static methods instead of Function modules.
now i have a requirement, where some functionality needs to be invoked on another server using an RFC destination.
if i create a function module,
1)i can tick the radio button "Remote-Enabled Module" under the Attributes of function module and
2)i can invoke it as
CALL FUNCTION 'ZMY_FM' DESTINATION 'RFCDESTNAME'
EXPORTING
IMPORTING
in such cases is it mandatorily required to create an FM like above, or can i avoid it by writing an equivalent instance method or static method
if we replace the FM with a method, then
1)how can i make the method rfc enabled, and
2)what is the syntax of providing the rfc destination name while invoking method.
Is there any other concept provided in ABAP Objects, that is recommended instead of "Remote-Enabled Function Modules"
thanks in advance,
Madhu_1980Hello Madhu
If you look at the properties of any global class you will find that the DropDown list for "Category" contains item:
30 = Proxy Class for Remote Interface
For me this sounds like that there might be something in the pipeline of SAP to provide RFC-enabled methods. However, if and when this becomes true is probably unknown.
Regards
Uwe -
What is the exact syntax for calling remote function module.
Hi to all
1.....what is the exact syntax for calling remote function module.?
Thanks and regards,
k.swaminath reddyhi
good
Lets do simple example where you will first create a RFC in one server (say A) and create normal program in othere server (say B). Finally you will call the RFC in A from B.
Do the following steps for creating RFC in server A.
1. log on to server A
2. go to se37
3. Edit -> function groups-> create function group and give the function group name (say ZGRP).
4. create a FM ( say Z_TEST_RFC) in se37 providing the function group which is created just now.
5. go to attribute tab -> choose remote-enabled module from processing type.
so that your FM will become RFC.
6. provide the import parameter in import tab.
we will provide only two import parameters.
- parameter name : P_NUM1, typing: TYPE, associated type : I & check the pass value (all the parameters of RFC must pass by value).
- parameter name : P_NUM2, typing: TYPE, associated type : I & check the pass value
7. provide the export parameter in export tab.
parameter name : P_SUM, typing: TYPE, associated type : I & check the pass value
8. write the given simple code in source code tab.
FUNCTION Z_TEST_RFC.
P_TOT = P_NUM1 + P_NUM2.
ENDFUNCTION.
Do the following steps for creating ABAP program which will call the RFC in server B.
1. se38 - > creat a program.
2. write the given simple code.
data tot type i.
call function 'Z_TEST_RFC' destination 'XXXXXX'
exporting
p_num1 = 10
p_num2 = 15
importing
p_tot = tot.
write tot.
please note that XXXXXX is RFC connection which is avialable in sm59 transaction in server A.
-go to sm59 - > abap connection (list of RFC connection configurations are avialable). choose server B connection and replace it of XXXXXX in the code.
finally you can execute the normal abap program that will call the RFC and display the result.
reward point if helpful.
thanks
mrutyun^ -
Message handling in remote enabled function module .
Hello experts ,
I am creating a remote enabled function module which must return a warning message based on certain condition . Inorder to meet the requirement I have added this line in the Fm's source code :
" Message Wxx(message class) with a ."
But when I am trying to use it , the above given message is dispalyed as an error message . Could you please let me know where am I going wrong . TIA.
Regards,
Prakrita Kapoor.Hi Prakrita,
Try building below code within the RFC after you have added return structure in your RFC parameters.
IF sy-subrc NE 0.
CLEAR message.
message-msgty = 'E'.
message-msgid = 'ZMI'.
message-msgno = '001'.
message-msgv1 = ID.
PERFORM return_message USING message
CHANGING return.
Endif.
form return_message USING VALUE(P_MESSAGE) LIKE MESSAGE
CHANGING P_RETURN LIKE BAPIRETURN.
CHECK NOT MESSAGE IS INITIAL.
CALL FUNCTION 'BALW_BAPIRETURN_GET'
EXPORTING
TYPE = P_MESSAGE-MSGTY
CL = P_MESSAGE-MSGID
NUMBER = P_MESSAGE-MSGNO
PAR1 = P_MESSAGE-MSGV1
PAR2 = P_MESSAGE-MSGV2
PAR3 = P_MESSAGE-MSGV3
PAR4 = P_MESSAGE-MSGV4
IMPORTING
BAPIRETURN = P_RETURN
EXCEPTIONS
OTHERS = 1.
endform. -
How to develop an Remote Enabled Function Module
Hi All,
I'm totally new to ABAP. I have a requirement to create a Remote Enabled Function Module, which I can use to call from an external program like Java using JCo.
The functionality of the Remote Function is to write some data into certain fields of the tables AFPO and JEST.
Can someone please guide me, how to do the above described task. Is there any code snippets available, that would be really gr8.
Thanks & Best Regards,
Chandrasekhar.you shuld have import parameters like this
i_aufnr tpye afpo-aufnr.
i_posnr tpye afpo-posnr.
i_matnr tpye afpo-matnr.
i_wemng tpye afpo-wemng.
i_ltrmi tpye afpo-ltrmi.
i_meins tpye afpo-meins.
i_dwerk tpye afpo-dwerk.
i_objnp tpye afpo-objnp.
i_stat type jest-stat.
in exceptions
enter_key_data.
assume all the fields are mandatory.
types: begin of t_ekpo,
aufnr like ekpo-aufnr,
posnr like ekpo-posnr,
matnr like ekpo-matnr,
wemng like ekpo-wemng,
ltrmi like ekpo-ltrmi,
meins like ekpo-meins,
dwerk like ekpo-dwerk,
objnp like ekpo-objnp, "for Status update
end of t_ekpo.
types: begin of t_jest,
objnr like jest-objnr,
stat like jest-stat,
end of t_jest
data: x_ekpo type t_ekpo,
x_jest type t_jest.
**need to validate before sending it to EKPO.
if not i_aufnr is initial
and not i_posnr is initial
and not i_objnp is initial
and not i_stat is initial.
X_ekpo-aufnr = i_aufnr.
X_ekpo-posnr = i_posnr.
X_ekpo-matnr = i_matnr.
X_ekpo-wemng = i_wemng.
X_ekpo-ltrmi = i_ltrmi.
X_ekpo-meins = i_meins.
X_ekpo-dwerk = i_dwerk.
x_ekpo-objnp = i_objnp.
modify EKPO from X_ekpo .
if sy-subrc = 0.
commit work.
endif.
x_jest-objnr = i_objnp.
x_jest-stat = i_stat.
modify JEst from X_jest .
if sy-subrc = 0.
commit work.
endif.
else.
raise exception enter_key_data.
endif.
please let me know if you need any validation on those.
regards
vijay
Message was edited by: Vijay Babu Dudla -
Error in executing remote enabled function module
Hi All,
I have created a remote enabled function module.
The function module works fine without entering the RFC dest sys.
When i enter the RFC dest sys and execute it, i get the error
Exception SYSTEM_FAILURE
Message ID 00
Message number 341
Message Runtime error CALL_FUNCTION_NOT_FOUND has occured
The RFC connection actually works fine to connect to the system when i test it from SM59.
But what could be the reason for the above error?
Actual intent is that I want to execute FM created in sys1 to be executed on sys2 from sys1 itself.
Regards,
RahulHi,
I guess there is no other way. For an RFC enabled function module it should exist in SYS2 .Then only you will be able to call from SYS1.
Your RFC connection will work fine if you provide all the technical parameters correctly.A RFC function module has nothing to do with this connection
Regards,
Lakshman.
Edited by: Lakshman N on May 14, 2010 11:25 AM -
Remote Enable Functional Module similar to F.01
Dear All,
I want to create a Remote Enable Functional Module similar to F.01 means input parameters (Chart of accounts, Financial statement version, Reporting year, Reporting periods , Comparison year , Comparison periods, ALV Grid control, Profit Center.)
And the output fields of F.01 should be in internal table or structure
Can any give some inputs and help me in this.
Thank you and regards,
Tazeer.Hi,
you say the u are getting output in RSA3, can i know for how many records it is taking how much time to extract?
if you are trying to pull the data till PSA and for that itself if it is taking more time, then issue may be with the code or with ur RFC connection, if all the other data sources are working fien then there is no issue with RFC, issue may be with ur code only....
Regards,
Nanda.S -
Calling a remote enabled function module which does not exist in caller sys
Hi,
I have a a system ABC from which I am trying call a rfc enabled fm(Test) present in system XYZ.
The fm(Test) does not exist in the system ABC so I am getting generation errors and dumps.
Is there a way for me to call these remote enabled function modules which does not exist in the caller system without the obvious errors etc.
Is there any special way.
ThanksHi,
please check this sample:
REPORT zcallfm .
DATA: xv_return TYPE sysubrc.
CALL FUNCTION 'DOESNOTEXIST'
DESTINATION 'NOWHERE'
EXPORTING caller = sy-sysid
IMPORTING return = xv_return
EXCEPTIONS system_failure = 1
communication_failure = 2
OTHERS = 4.
It shouldn't throw any generation errors in your system!
Regards,
Klaus
Maybe you are looking for
-
Fix for continuous reboot after installing Service Pack 3 in Windows XP
After contacting HP Technical Support and speaking to a supervisor we were able to solve the problem of Windows continuously rebooting after installing SP3. Here are the steps that fixed the problem with my HP Pavilion running on an AMD processor. Th
-
Hi Can we install SQL Server 2014 std on a server which already has 2008 std installed so we can migrate 2008 apps gradually? Thanks Regads
-
I have owned a black zen micro which I have had for about six months. Three weeks ago I got the problem ...yes you guessed it. The headphone jack problem! Anyway I RMA'd my zen micro and have had to make do without music for the last three weeks. I g
-
Getting rid of podcasts not downloaded
I am using most current 7.1.5 iTunes. My question is: How do I get rid of the listing of undownloaded podcasts. By this I mean when you subscribe to a podcast all episodes show up. Thats great, but what if I don't want to download some of them. It ta
-
Error - No update server found for context
Hi I'm trying to write a BSP page that sends E-mail via sap connect. I did try to get the demo program bsptutorialmail from package SBSP_DOCU to work. When I try to send an E-mail, the program terminates with 500 SAP Internal Server Error Error messa