Reg: Calling RFC FM in JavaScript
Hello Gurus,
I am trying to call FM from Masthead,
The FM is used to delete an entry in the table. And I need to execute the FM when Closing the browser or click on Logoff.
And Input to the FM is logged in User.
Please help me in resolving this.
Thanks & Regards,
Pramod
Hi Pramod,
I thnink of few ways to achieve this
Option 1:
- create a class which does the FM operation(Abstarct class with JCO connector).
-deploy this as a par file.
-take note of the url created when you run this par file from the portalapp.xml.
-goto logoff form,
<form name="logoffForm"
here under action="...., include the url from the above par file starting frome'/irj/....'.
-now when the user clicks the logoff, he would eb redirected to your abstract calss which does the table operation with FM.
Option2:
- the logoffRedirectURL is being called when the user clicks the logOff button. Let us manipulate this URL, instead of this URL change the URL through Visual Admin.
-create a WdJava or WdABAP appln. which does this Table operation with FM. create an iView and put QuickURL(say- deleteEntry).
-under redirect URL, call this iView by mentiong as '/irj/portal/deleteEntry).
-here you have to ensure that this iView is assigned to the users with a role or so.
note: if you are taking the user away from when he clicks logoff, I believe you may have to handle the logOff yourself.
May be you could invlidate the HTTP session. In the abstract class mentioned in option1, by using
'request.getHTTPRequest(..).
you can do this.
Thanks,
Jakes.
Similar Messages
-
Call RFC (Abap) with Javascript
Hi all,
i'm new to Javascript.
Now i have to write a small piece of code in Javascript that calls an Abap RFC.
Does anyone have an example for something like that ?
Greetings
HenningHi Henning,
Chk these links Hope this will help you out...
http://publib.boulder.ibm.com/infocenter/tivihelp/v2r1/index.jsp?topic=/com.ibm.IBMDI.doc_6.1/referenceguide120.htm
Please reward points if you find this as a right solution
Regards,
Harini -
Reg: Calling RFC in webdynpro
Hi,
I am supporting some webdynpro application. In the application we are connecting to R3 systems using RFC. But in my application the developer had created different models for each Bapi instead of dumping them into one model. I just wanted to know the logic behind that. Is it just logical seperation or there is any performance considerations.
Thanks in advance.Hi,
I Just can say, in some of the documents that I have founded in SDN about Web dynpro best practices,
the recommendatios is "Put as many RFCs in a single Adaptive RFC model as possible".
Take a look in the followinf presentation page 41
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/604ddc2f-ec9c-2b10-1682-be37e1c62dee&overridelayout=true
Regards,
Eduardo Campos. -
Reg : In GP interface call RFC for output structure
Hi ,
I am developing Webdynpro callable object through GP interface. In this task I have only output don't have input parameters. If i will click Test directly it will come output like this :
for ex: Name : Risha
EmpID : 1234
In getDescription() i created output structure and getting the structure.
For data i have to call RFC , RFC will fetch data for Loggedin user.
In GP interface how to call RFC and how to fetch the data for corresponding O/p structure.
I have to submit this data to Approvar. Please help me out.
Thanks in Advance,
RishaHi Risha,
1. Please check whether the RFC is executing properly and giving the correct result.
2. declare a output strcuture say "output" with attributes which u need in the getDescription method.
3.in the execute method, execute the RFC and get the data from the model node and set it to the value node of component controller.
4. create the same context node and do the mapping between component controller and view controller.
5 . create the UI elements and bind the ui elements with the value node.
6. so when u click execute button, the model is executed and model data is transferred to value node.
7. these datas will be displayed in the view .
8. declare a variable in begin others of component controller as shown below.
IGPExecutionContext mContext;
9. in the view , u should have created a button say "complete" and on clicking this button call a method in component controller to end the execution of callable object.
10. in the method say "complete" which u have created in component controller, get the execution context
11. using the execution context , get the output structure as showwn below:
IGPStructure outputStructure = mContext.getOutputStructure();
12 . get the output structure which u have declared in getDescription method and set the strcuture attributes from the value node which has the RFC model data.
13. so when the user clicks complete the Co execution is completed and u will get the output structure which has the model data .
hope this helps.
Thanks and Regards -
Calling RFC from Adobe Interactive Form
Hello,
After creating and calling Adobe Interactive form from ABAP web dynpro, within the form designer is it possible to call RFC or Business Object method from the form script to get the data back from SAP for specific Click events?Yes,
this is possible, but not through pure RFC, but using webservices and webservice enabled function modules within SAP.
Technically it is quite simple. Create a functionmodule, and create a webserve from that (all SE37 or SE80 but from WAS 6.40). Generate a WSDL (with the Java tool) and import that into the form that you are designing. From there you can bind the data from the dataset (as defined in the WSDL) to screenfields or treat the data any other way Javascript can.
BTW. I only managed this so far by using anonymous logins, so with a password and username bound to the webservice (in SICF).
Hope this helps, regards, Hans Gmelig Meyling -
Hello Experts,
I have a requirement where in i need to call RFC(Which is created in R/3 system) In ABAP XSLT Mapping(defined iN xi system).
Can some one help me to achieve this??
**ITS URgent****
Thanks and Regards,
Prakash Babu.Hi James,
Check here............
/message/5182263#5182263 [original link is broken]
RFC connections
/message/5102602#5102602 [original link is broken]
Regards,
Vijay. -
Error when call RFC Function module in R/3
Dear All,
We are trying to call RFC function module CBIF_GLM1_PROCESS_ORDER_READ (This is not a BAPI and also not released ) in R/3 from XI system.
we are facing the error "Error while lookup Exception during processing the payload. Error when calling an adapter by using the communication channel CC_PPPI_MES_RFC_Rcvr (Party: , Service: WCD_320, Object ID: 16563889b449328eac76caa6a3bc592e) XI AF API call failed. Module exception: 'error while processing the request to rfc-client: com.sap.aii.adapter.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.adapter.rfc.core.client.RfcClientException: failed to parse BAPI response due to: com.sap.aii.adapter.rfc.util.bapi.BapiException: Parameter with name RETURN not found.'. Cause Exception: 'com.sap.aii.adapter.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.adapter.rfc.core.client.RfcClientException: failed to parse BAPI response due to: com.sap.aii.adapter.rfc.util.bapi.BapiException: Parameter with name RETURN not found.'."
This is the first time we are doing this configuration.
Could you please let me know what woulbe the reason.read the original message
We are trying to call RFC function module CBIF_GLM1_PROCESS_ORDER_READ (This is not a BAPI and also not released ) in R/3 from XI system.
I am talking about the above Receiver RFC channel which you guys are using to call R/3 from XI. That where you need to change the commit parameter -
Error while calling RFC when using BSP Web Interface
Hi,
we have a problem with the Authorization when we use an Web Interface for BSP. We have assigned all roles to the user which were mentioned in the SAP standard documentation:
R_AREA
R_METHOD
R_PACKAGE
R_PARAM
R_PLEVEL
R_PM_NAME
R_PROFILE
R_STS_PT
R_STS_SUP
R_WEBITF
S_RS_ADMWB
S_RS_AUTH
S_RS_COMP
S_RS_COMP1
S_RS_DAS
S_RS_ICUBE
but we still get the error message: "Error while calling RFC".
When using a user with SAP_ALL, it works.
What can we do?
Thx for your time.
JoergActually that's surprising - because BSP (Business Server Pages) and RFC (Remote Function Call) are not related; they use totally different transport protocols (http vs. RFC). Even if an BSP application is calling a function module remotely (acting as RFC client) no authorizations for S_RFC are required - in the calling system (but in the called system, i.e. the RFC server).
Since assigning SAP_ALL seems to "cure" the problem, it seems to be an authorization issue, indeed. In that case it makes sense to use the authorization trace (ST01 - notice: that's specific to one single ABAP application server; you might have to activate the trace on multiple instances) to find out which authorizations are checked / demanded. -
Java call rfc check in original:error while checking in and storing.
hi,experts.
java call rfc check in original:error while checking in and storing. BAPI in the RFC is "BAPI_DOCUMENT_CJANGE2",
the RFC was fine in SE37 and calling by Visual Basic. and in java,when mConnection.setAbapDebug(true), and runing by step and step, was fine too.
if mConnection.setAbapDebug(false) in JAVA, up error in title was displayed.
what cause this error?
Best Regards.Hi Priya
Please use Su53 after getting the error and find any authorization is missing for the user..
S_GUI Full Authorization is required..
Since by giving BASIS Authorization its rectificed, then it shud be mostly due to Auth issues only
Regards
Aby -
Hi all WebDynpro Gurus
I am using EP7.
I am developing an WD application for KM functionality in which I need to call RFC from backend. I followed the "<b>Creating WD application accessing ABAP function</b>" example.
But when I executed the application I got following exception.
<i><b>Root Cause</b>
The initial exception that caused the request to fail, was:
com.sap.lcr.api.cimclient.CIMClientException: java.net.MalformedURLException: URL must have a host part
<b>Correction Hints</b>
Accessing the System Landsape Directory (SLD) failed. Depending on the concrete reason (see root cause) check the following:
is the SLD Supplier in the J2EE engine configured correctly? See the SLD documentation for more details about the SLD and about how to configure it.
are all JCO destinations maintained correctly? Use the preinstalled Web Dynpro Content Admin application to check/edit the destination. Use the Ping and Test functions of the Content Admin to verify that each destination is properly configured.</i>
I checked JcO connections in the webdynpro content admin. There the status is unknown and create tabs are disabled.
I checked the SLD connections in content admin , the entries are as below:
<b>Host name : blank
Port: -1
User: blank
Url: http://.-1/sld</b>
Where could i configure these SLD settings and what should be the new entries ?
I dont have permission to view WebDynpro console.
Please help me out.Vinod,
Claim: "Hello, World" application with WD and RFC is the "Hello, World" application with most complex configuration.
Prove:
1. You need to run http://host:port/sld and import CIM context
2. You need to add technical WebAS ABAP systems to SLD (same URL)
3. You need to run Visual Administrator and setup SLD connection parameters (host, port, user, password)
4. You need to (re)deploy your WD application
5. You need to run web-based WebDynpro Content Administrator and configure JCO connections.
Fortunately, [1]-[4] is necessary only ones per server, [5] is necessary per every application.
Valery Silaev
SaM Solutions
http://www.sam-solutions.net
P.S. After I'd started working with XI I understood that procedure described above is not complex at all -
Calling a procedure from Javascript
Hello
I have created a procedure with two input paprameters.
I have gratted access to public ... and all works well
I would now like to call this from a Javascript where I supply the input paameters. The procedure has a redirect to another URL so there is no output
Currently I used "window.location" with the prodcedure URL ... I must beable to call the produced directly?
Thanks for taking the time to look at this request
Regards
PetePete,
Have a look at this thread:
How to call stored procedure from javascript? (about Google Suggest, AJAX)
Regards,
Dan
http://danielmcghan.us
http://sourceforge.net/projects/tapigen
http://sourceforge.net/projects/plrecur
You can reward this reply by marking it as either Helpful or Correct ;-) -
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. -
Hi experts,
we try to integrate a machine into SAP.
Therefore we want to use RFC-Communication.
This means, the machine will call RFC-FMs on SAP.
I know that this works and I only need to create a "normal" RFC-FM.
But how can I call a RFC-FM on the machine out of SAP?
Do I need to make a an RFC-FM like in ABAP but the destination is the machine (which is defined in SM59)?
Kind regardsHi ,
Please learn this link Connections to Non-SAP Systems (SAP Library - ALE Programming Guide)
http://help.sap.com/saphelp_nw04/helpdata/en/52/16aafa543311d1891c0000e8322f96/content.htm
You can take a look into idocs. For idocs processing you require RFC Library of the RFC Software Development Kit (RFC-SDK) on the non sap system side for processing RFC's.
Regards,
Sivaganesh -
Can we call RFC in any other way except using adaptive
Hi,
I want to know if there is any possible way to call RFC other than using the adaptive model.
Answers will rewarded.
RegardsHi,
you can use JCO or Enterprise Connector to connect with R/3.
JCO-->http://www.sapdevelopment.co.uk/java/jco/jcohome.htm
EC-->http://help.sap.com/saphelp_webas630/helpdata/en/79/c6213e225f9a0be10000000a114084/content.htm
Regards,
Naga -
Hi,all
I am a SAP newbie .I have a strange question. My Delphi Development Environment is Delphi 7. SAP ECC 6 , Delphi Call RFC through COM.
procedure TFrm_SAP.Button3Click(Sender: TObject);
var
myIFunction:IFunction;
myIStructure_EDRAT:IStructure;
myIStructure_ORDER:IStructure;
myIParam_AUFNR :IParameter;
myIParam_AUTYP10:IParameter;
myIParam_WERKS :IParameter;
begin
if not Logon_bool then
begin
Showmessage('Logon SAP/R3 Failure');
Exit;
end;
SAPFunctions1.Connection:=Connection;
myIFunction:=SAPFunctions1.Add('Z_XX_GET_PRODORDER_HEADER') AS IFunction;
myIParam_AUFNR:=myIFunction.Exports_['I_AUFNR'] AS IParameter;
myIParam_AUFNR.value:='000001002864';
myIParam_AUTYP10:=myIFunction.Exports_['I_AUTYP10'] AS IParameter;
myIParam_AUTYP10.Value:='X';
myIParam_WERKS:=myIFunction.Exports_['I_WERKS'] AS IParameter;
myIParam_WERKS.Value:='2010';
myIStructure_EDRAT:=myIFunction.Exports_['IT_ERDAT'] AS IStructure;
myIStructure_EDRAT.Value['SIGN'] :='I';
myIStructure_EDRAT.Value['OPTION']:='BT';
myIStructure_EDRAT.Value['LOW'] :='20090101';
myIStructure_EDRAT.Value['HIGH'] :='20090330';
if not myIFunction.Call then
begin
ShowMessage(myIFunction.Exception);
end
else
begin
myIStructure_ORDER:=myIFunction.Imports['ET_ORDER'] AS IStructure;
end;
end;
after execute myIFunction.Call method ,Show
I trace Log file , as following Show
T:764 Error in program '': ======> Data error (invalid data type 17) in a Remote Function Call
T:764 Error in program '': <* RfcReceive [1] : returns 3:RFC_SYS_EXCEPTION
T:764 Error in program '': <* RfcCallReceive [1] : returns 3:RFC_SYS_EXCEPTION
Could anybody have helped me to resolve this problem?Hi
Check RFC Import Parameters Data Type and Data Sent from your Delphi System is not matching , Some data type mismatch is going on.
Check Data Type of when Sent from Delphi == Import (Request) of RFC is equal
rgds
srini
Maybe you are looking for
-
ALV Display - Error in field catalog
Hi , I am facing a problem in ALV... Field catalot is not getting populated... I am getting a message field catalog not found... Can anyone please help me....... <URGENT DOES NOT EXIST HERE>... I am enclosing my code also.. please go thourh it and he
-
Hello everyone. I`m a apple user from Turkey. Lately I have bought an iphone 4S in U.S.A and brought it back to my country. My problem is I can`t use it with my local service provider; because I can`t activate my iphone 4S with the sim kart which I h
-
"Smart update" question or how to overwrite the library in current use
Hello, I would like to add a "smartUpdate" feature to an application i.e. 1. Read an updated library from the web (e.g. as archive- zip) 2. Extract files from archive and write them to a local drive. 3. After all the files are written, close the appl
-
%ACCOUNT_SET% is empty in Default.lgx after submit
I'm trying to use %ACTIONS_SET% (Account dimension in one application) to populate a stored procedure. I have a stored procedure that have 4 parameters Entity, Time, Actions and Category. *RUN_STORED_PROCEDURE=tbg_CopyWorkFlowComments('%ENTITY_SET%',
-
Applying a new patch on the ISE 1.4.1. reboot required?
when applying a new patch on the ISE 1.4.1, will the server be taken off line whilst the patch is applied. i.e.does the server require a reboot after the patch is applied?