Regarding RFC Model
Dear Frds
I created ejb using java code
I am using java model and imported using
"old webservice model" i need to set socket time to 3 mins for my webdynpro application...
So if want change my old webservice model to adaptive RFC model
what should i do?
Can i use Ejb written in java in Adaptive RFC model...
where are this adaptive RFC model used?
Thanks and Regards
ShravanG
Hi
oh sorry..
Actually i mean to say adaptive webservice model
Can i increase socket time if i reipmport my model from
old depricated model to adaprive RFC model..
what benefits will i get if i use Adaptive RFC Model
over Old Depricated model..
Can i use public parts of EJB in webdynpro..
thanks
Shravan
i mean can i use
Similar Messages
-
How to use two RFC models in one Data Source for a Interactive Form UI Elem
Hi
I want to use two RFC models (two Function Modules from a SAP Backend system) in one context node of a View Controller in order to pass it as the data source to a Interactive Form UI element. Can I use the data binding mechanism directly or have I to copy the data into a Value Node within the view controller.
Thanks for helping
René Morel
SAP (Schweiz) AGRene,
You can create a local context node in component controller and copy the data from both the RFC's to this node, then bind it to the view controller. Then you can make this view context node as the datasource of the interactive form.
Regards,
Anand -
Execute a RFC-Model in another WD-Project
Hi everybody,
my purpose is to execute a RFC-Model in an other WD-Projekt in order to use the result node.
WD-Project(A) -references-> WD-Project(B)
WD-Project(A) executed the RFC-Model in WD-Project(B) which is only used by WD-Project(A) .
I provide an execute method in Interface Controller in WD-Projekct(B) but if i call it from WD-Project(A) i get no result! in my context node? But if i start the WD-Project(B) as standalone it works properly.
Unitl now i thought that calling a method of another Interface-Controller will start the hole application, in this case WD-Project(B).
What is my mistake?
regards,
SidHi,
Check whether you have defined the usage of project(B) in project(A) correctly. Also check the lifecycle for the controller of project(B).
Check this [Link|http://help.sap.com/saphelp_nw70/helpdata/EN/89/b21640dc88e769e10000000a155106/content.htm]
Hope it helps.
Regards,
Manoj -
Error while creating a Adaptive RFC Model
Hi all,
I am trying to create a Model using a Adaptive RFC Model, I assign a Model name and the logical system names, enter the details in SAP Logon Information for the Single server,here it gives me a Gateway error. What could be the issue here?
NB: In the Host Name , I tried with both the Host name of the r/3 server and also with the SAProuter string ( as we have the server at other place) ,still it doesnt work. and I am able to login to the R/3 system from the SAPLogon GUI from my desktop normally.
Is there any issue of the firewall related to this, if so whats the port number that should be opened so that i can connect to the r/3 system get the list of BAPIs present there into my Webdynpro application .
Need help on this
Regards,
VijayHi Lohi n Gopi ,
I have checked out with the your given suggestion of trying with the host name as well as IP address and also typing all the details,without copy pasting the details . In both the cases it gave the " Connect to gateway failed " error mesg.
But one intersting thing here that i observered when trying with hostname, IP address, or SAProuter string is as follows .
<b>with IP address</b>
<i>Connect to SAP gateway failed
Connect_PM GWHOST="ipaddress",GWSERV=sapgw10,ASHOST="ipaddress",SYSNR=10
LOCATION CPIC(TCP/IP) on local host
ERROR patner not reached(host "ipaddress",service=3310)</i>
<b>with SAProuterString</b>
<i>Connect to SAP gateway failed
Connect_PM GWHOST="SAProuterString",GWSERV=sapgw10,ASHOST="SAProuterString",SYSNR=10
LOCATION SAPRouter on " some HostName"
ERROR hostname unknown</i>
<b>with HostName</b>
<i>Connect to SAP gateway failed
Connect_PM GWHOST="hostname",GWSERV=sapgw10,ASHOST="hostname",SYSNR=10
LOCATION CPIC(TCP/IP) on local host
ERROR hostname "hostname " unknown</i>
Is there any firewall port blocking issue here ?if so , whats the port that needs to be opened ?
Appreciate your help.
Thnks,
NR -
How to find out the destination of an "Adaptive RFC Model - DEPRECATED"
Hi All,
How to find out the destination of an "Adaptive RFC Model - DEPRECATED" of an running application
and Where is the destination created in the server .
I have got the code of the running project from NWDI .
Thanks in Advance
Regards
Piyas KumarHi,
I am not sure I fully understand the question, but as per the guide
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/50f7192d-2808-2d10-189b-df3fa5f71abf
Excerpt from Page 7
Caveat Confector!1
ARFC1 destinations were created using the Web Dynpro Content Administrator tool. This tool is
still available for compatibility reasons, but the destinations it creates are not used by ARFC2
models!
Instead, you should use the u201CDestinationsu201D tool found on the Configuration Management screen of
the NetWeaver Administrator.
Therefore I think if you look up the application in the WD content Admin, there you can find out what kind of JCO/RFC connections are belonging to it. You can find it on http://<host>:<port>/webdynpro/dispatcher/sap.com/tcwdtools/Explorer
Browse your application here, and then select the JCO Connections tab on the right hand side.
I hope this helps.
Best Regards,
Ervin -
Problem in displaying a field in webdynpro using Adaptive RFC model
HI,
I created a webdynpro application using adaptive RFC model and i have a problem in displaying one of the output fields.
When i execute the function module it is giving the exact value for my output field in this case telephone number (of type STEXT which is char with length 40).But when i am trying to display that telephone number in webdynpro application it is taking only first 4 digits.
i deleted the model and recreated it still it doesnot work.
please let me know how to resolve it.
points will be awarded for sure
BalaHi Bala,
Whenever you reimport the model server restart is necessary otherwise the changes will not get reflected. You will get an error when you deploy the application.There is no go around except restarting the server as the meta data gets cached in the server as long as the server is runnig.So, Once you restart the server the cache will be cleared.
Check once again whether you are fetching data from correct BAPI field. Still problem persist try debugging.
Regards, Suresh KB -
How to set the tables parameter to a BAPI using adaptive RFC model
Hi,
I have a BAPI ZBAPI that has a tables parameter ZPernr of type ZTable with two elements pernr and name.
I used adaptive RFC model and created model classes for the BAPI.
My question how do i set list of pernr and name to the tables parameter in the webdynpro for java.
I have the following methods available
ZBAPI input = new ZBAPI();
1.ZTable table = new ZTable();
table.setPernr(pernr);
table.setname(name);
input.addZPernr(table);
how do i set the table parameter for multiple pernr and name
2.
add all the pernr and name to list and set that list to input in the following way
input.setZPernr(list) and list of typecom.sap.aii.proxy.framework.core. AbstractList
out of two methods mentioned which one is correct.
Please let me know the solution
Thanks
Bala DuvvuriHi Bala,
In your code:
List pernrList = new ArrayList();
pernrList should be declared as the type of class HROBJECT ( The structure name in the model e.g. the node PERFWARN type is Zhrecmfm_002_Perfrat_Warning_Input )
Try this:
HROBJECT pernrList = new HROBJECT();
pernrList.setPernr(pernr);
input.setPernr_List(pernrList);
// call BAPI execute method
If you want to pass list of pernrs, you can pass in alternate way
IPrivate<viewname>.I<nodeame>Node prNode = wdContext.node<node>();
IPrivate<viewname>.I<nodeame>Element prEle;
for (int i = 0; i < table.size(); i++) {
HROBJECT pernrList = new HROBJECT();
pernrList.setPernr(pernr); // Set the pernr from current record
prEle = prNode.create<nodeame>Element(pernrList);
prNode.addElement(prEle);
// call BAPI execute method
Once I execute the BAPI how do i iterate thru second table parameter PERNR_PERFRAT to get pernr and performance rating text
Say your node name is PERNR_PERFRAT
for (int i = 0; i < wdContext.nodePERNR_PERFRAT().size(); i++) {
wdContext.nodePERNR_PERFRAT().getPERNR_PERFRATElementAt(i).getPernr();
wdContext.nodePERNR_PERFRAT().getPERNR_PERFRATElementAt(i).getPerfrat();
Regards,
Siva -
Error in Import Adaptive RFC Model
Hi SDN,
I am trying to develop an application using Import Adaptive RFC Model, while creating a model i could not able to connect to the backend system after giving the single server parameters. When i click on the next button a pop up is displayed with an error message *"User Name or Password wrong" *.
But i could able to login to R/3 with the same userid and password from SAP logon pad.
Really i am at Six and Seven's to trace out this error. Please suggest me how to overcome this error and create the model succesfully.
Regards
BashaHi Praveen & Chaitanya
Thanks for your quick response and informative threads.
Actually in order to import an adaptive rfc model
I have right clicked the model node to create a model and given the model name,package name,model data and metadata names and clicked next button. Then in the next screen
Tab Strip -> Single Server:
Host name :
System Number :
client details:
Tab Strip -> Load balancing:
System :
Message Server:
System Name:
Group:
(in Tcode: SLMG i have added the group public also)
client details:
After entering the required details either in Single Server or Load balancing and clicked the next button I could not able estabilish a connection to the backend R/3 and get the list of Bapi's or RFc's. Instead i am getting a pop up message "User Name or Password Wrong". I could not able to proceed from here.
But with the same above parameters i could able to logon to R/3 from SAP Logon Pad. I have tried by giving the user name in Cap's and small letters but no use.
As i was strucked at the intial step while creating the model but not during the execution of the program, as far as my knowledge is concerned i think we no need to worry on SLD or JCO connections during the creation of the model. Please correct me if i am wrong and suggest me to rectify the error.
Regards
Basha -
Access rfc-model over an scheduled message-driven-bean
Hi there
The problem is, that I've got a WebDynPro Project in which one a RFC-Model exists.
In this project I do also have my singleton-classes which one hold the data of the rfc-model
during the period of their lifetime. I did publish the singleton-pointer/reference in the jndi.
Within the SAP Java Scheduler (there is a tutorial @ sdn) I've created a ejb which
should run for example every hour. This one is of course in an other container (because of that i do use the jndi)
So i run the ejb and get the reference of my singleton over the jndi. Till here every
thing works fine!
Now I do call a method of the singleton (in the ejb) which should open an jco-connection over the existing model and the following error appears:
Couldn't load new data! Problem found:
Unable to access Task Scope in DynamicRFCModelClass. Either run in Engine, or turn Test mode on in WDModelFactory!
I read already something about this test-mode, but it isn't recommended at all to activate this mode!
So the J2EE has the reference but can't access the task scope. I tried to select the task-scope with the ejb, but
i didn't found any solution till now.
Has anybody an idea?
Regards MarcoHi there
The problem is, that I've got a WebDynPro Project in which one a RFC-Model exists.
In this project I do also have my singleton-classes which one hold the data of the rfc-model
during the period of their lifetime. I did publish the singleton-pointer/reference in the jndi.
Within the SAP Java Scheduler (there is a tutorial @ sdn) I've created a ejb which
should run for example every hour. This one is of course in an other container (because of that i do use the jndi)
So i run the ejb and get the reference of my singleton over the jndi. Till here every
thing works fine!
Now I do call a method of the singleton (in the ejb) which should open an jco-connection over the existing model and the following error appears:
Couldn't load new data! Problem found:
Unable to access Task Scope in DynamicRFCModelClass. Either run in Engine, or turn Test mode on in WDModelFactory!
I read already something about this test-mode, but it isn't recommended at all to activate this mode!
So the J2EE has the reference but can't access the task scope. I tried to select the task-scope with the ejb, but
i didn't found any solution till now.
Has anybody an idea?
Regards Marco -
Reimporting of Adaptive RFC model
Hi all, I have added two fields in the BAPI and i have reimported the Adaptive RFC model in Web Dynpro.
After running the application and accessing the new fields, i am getting this exception.
java.lang.ArrayIndexOutOfBoundsException
at com.sap.mw.jco.JCO$MetaData.getType(JCO.java:10161)
What could be the reason?Hi,
As the error states MetaData.getType it seems that the new changes are not yet reflected in the J2EE server. You need to restart your engine once. You can search this forum for a workaround by Valery which doesnot need a restart.
Regards
Ayyapparaj -
JCO$Exception when creating RFC model
Hi all,
I'm getting this fatal error when creating an RFC model in Web Dynpro for Java (connecting to a BW system):
com.sap.mw.JCO$Exception: Missing R3NAME=... or ASHOST=... in connect_param in RfcOpenEx
I have absolutely no clue what's going wrong...
The RFC model gets created, but when running the application it doesn't work...
Any help appreciated!
JeroenRaj,
Thanks for your reply.
I had already solved the problem... After a long time I found out it was due to the language: when creating an RFC model one should use the language of SLD.
kind regards,
Jeroen -
Problem in using the RFC model in webdynpro aplication
Hi,
I am trying to access FM CRIF_GET_EMPLOYEE_FOR_USER from the backend system in webdynpro application in two different ways
1.By using JCO classes in a java class
IRepository repository;
public int getPernr(String user)
int ret = 0;
String user = "SRESP5";
double pool = Math.random()*100000000;
// the repository we gonna be using
try{
// Add a connection pool for the specified system
wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(""+pool);
JCO.addClientPool(
"DE1", //alias for this pool
100,
// max. number of connections
"540", //SAP client
"", //userid
"", //password
"EN", //language
"sapde1ci.zrh.swissre.com", //host name
"10" //system number
// Create a new repository
repository = JCO.createRepository(
"MYRepository", "DE1");
wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(
"ExceptionwwwwwwxSS");
catch(JCO.Exception ex) {
wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(
"Exceptionwwwwwwx"+ex.getMessage());
JCO.Client client =
null;
try{
// Get a function template from the repository
wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(
"SSS");
// wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess("ExceptWWWW");
JCO.Function function = repository.getFunctionTemplate(
"Z_CRIF_GET_EMPLOYEE_FOR_USER").getFunction();
wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(
"ddd"+function);
wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess("ExceptioWWW");
// Fill in input parameters
JCO.ParameterList input = function.getImportParameterList();
input.setValue(user,
"USER_NAME" );
// input.setValue(String.valueOf(new Date()), "BEGINDATE" );
// input.setValue(String.valueOf(new Date()), "ENDDATE" );
// Get a client from the pool
wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess("ExceptionQQ");
client = JCO.getClient(
"DE1");
// wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess("Exception");
// Execute function the remote system
try{
client.execute(function);
}catch(Exception e){
wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess("dd"+e.getMessage());
wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(
"Exceptionw");
// Print return message
ret=function.getExportParameterList().getInt(
"EMPLOYEENUMBER");
System.out.println(
"3");
System.out.println(
"RETURN MESSAGE: " + ret);
wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(
"SSSWSS");
catch(Exception ex) {
System.out.println(
"Caught an exception333: " + ex);
finally{
// Always release client !!!
//JCO.releaseClient(client);
JCO.removeClientPool("DE1");
// try
return ret;
it is returning the PERNR of the username passed as an input parameter.
2.But when I am trying to use an adaptive RFC model and it is giving NO_EMPLOYEENUMBER_FOUND
here is the code
in view
public void wdDoInit()
//@@begin wdDoInit()
wdThis.wdGetTestAppController().executeBapi();
//@@end
In Controller
public void wdDoInit()
//@@begin wdDoInit()
Z_Crif_Get_Employee_For_User_Input input = new Z_Crif_Get_Employee_For_User_Input();
wdContext.nodeZ_cr().bind(input);
input.setUser_Name("SRESP5");
//@@end
public void executeBapi( )
//@@begin executeBapi()
try{
wdContext.currentZ_crElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
}catch(Exception e){
wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess("User111:"+e.getMessage());
//@@end
please help me in solving this issue.points will be awarded for sure for the helpful answer.
BalaHi,
Change this line of code:
wdContext.nodeZ_cr().bind(input);
to
wdContext.nodeZ_Crif_Get_Employee_For_User_Input().bind(input);
Try executing your application now.
Regards,
Murtuza -
RFC model creation problem in NDS
Hi All,
I am facing a strange problem while creating a RFC model in NDS.
After providing all the logon informations to server, the editor says "Connect to SAP gaetway failed. Unknown hostname..."
Where as <b>I can connect to SAP system through the SAP gui</b> using the <b>same logon details</b>.
The Hosts file <b>does have entry for the hostname</b>.....Tried using a newer 7.0.10 version, but problem still persists.......
What might be the loose end here!!!!!!!!
As far I know, NDS uses tcp/ip protocol to connect to servers & the Host file entries should help it in getting connected to SAP.....
Does it use some other layer to connect??? HTTP???
Any pointers are welcome. Thanks in advance..
Regards,
SandipHi Sandip,
It fetches and populates values from SAPLOgon.ini file stored on you machine.
Same file is used to show system list in SAPGUI logon pad.
So, If you are getting system on logon pad then it should show same in the dropdown.
One more point:
Is you backed system uses message server to rought to hte server? If so, then provide Host or IP of the message server instead oh Application server.
Regards,
Bhavik -
Why We Call Adpative RFC MODEL?
Hi ,
Why We Call Adaptive RFC MODEL?
What is RFM?Hi Subbarao,
The Adaptive Remote Function Call (Adaptive RFC) is a technology that enables the Web Dynpro application developer to use the business functions encapsulated in Business APIs (BAPIs) even after a structure modification, without having to provide the new data using a second back end or a new structure with subsequent regeneration of the proxies.
This new RFC model shows adaptive behavior. This means that the RFC proxies do not use the original design time structure definition at runtime. Instead, this Web Dynpro model automatically adapts the data of the structure passed in the Java proxy generation to the current data that is, a structure definition in the back-end system that may have been modified
For more info go through this link..
[Adaptive RFC|http://help.sap.com/saphelp_nw70/helpdata/en/6a/11f1f29526944e8580c5e59333d96d/frameset.htm]
Importing RFC's
__http://help.sap.com/saphelp_nw70/helpdata/en/6a/11f1f29526944e8580c5e59333d96d/frameset.htm__
RFM - stands for Remote-enabled Function Modules, amd you can learn more about it from
http://help.sap.com/saphelpnw70/helpdata/en/22/0427c0488911d189490000e829fbbd/frameset.htm_
Difference between BAPI and RFM --
BAPI are RFC enabled function modules. the difference between RFc and BAPI are business objects.
You create business objects and those are then registered in your BOR (Business Object Repository)
which can be accessed outside the SAP system by using some other applications (Non-SAP) such as VB or JAVA.
In this case u only specify the business object and its method from external system
in BAPI there is no direct system call. while RFC are direct system call.
Hope this helps,
Reward Points if helpful,
Regards,
Shailesh Nagar -
Dynamic JCo Connection with Adaptive RFC Model 2
Hi gurus,
I'm trying to dinamically change a model data connector inside my web dynpro. I'm using an Adaptive RFC Model 2 to communicate with the R/3 backend. I've found that is possible to change the connector modifiyng the code inside the web dynpro. In detail I've found this example:
IWDDynamicRFCModel model1 = (IWDDynamicRFCModel) WDModelFactory.getModelInstance(Model1.class);
I put this code into wdDoInit method but I get the following error:
"<comp_name>.wdDoInit failed to create or init instance of model 'model_name' in scope NO_SCOPE with instanceId 'null'"
Furthermore I've used the deprecated Adaptive RFC Model and when I instantiate a model, ModelName m=new ModelName(), I see that the methods m.setJcoClient(client) and m.setSystemName(systemName) are visible, while when I try to do the same with Adaptive RFC Model 2, with my model m, the methods before there aren't.
So this is my question: is it possible to change data connector dinamically with Adaptive RFC Model 2?
Thanks a lotDear Lukinho,
You may try this ;
try {
IWDJCOClientConnection clientCon = WDSystemLandscape.getJCOClientConnection("<name of the JCO connection>");
String clientName = clientCon.getClientName();
String lang = clientCon.getLanguage();
String passowrd = clientCon.getPassword();
String sysID = clientCon.getSystemIdentifier();
String user = clientCon.getUser();
//etc...
} catch (WDSystemLandscapeException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
I got this code from the thread [Multiple Client Logon in JCO |Re: Multiple Client Logon in JCO;
Also have a look at this thread
[JCo Destination |Re: JCo Destination;
Hope it helps!!
Warm Regards
Upendra Agrawal
Maybe you are looking for
-
I can not send messages only text from my iPhone 5. It's the same case for a couple of my friends. Started today.
-
Flex Mobile : URLLoader bytesTotal always at 0 when loading file
Hi ! I'm trying to load external file with UrlLoader in a Flex Mobile Project ( Initialy it was with Data/Services Options of Flash Builder, but I have the same problem ). On the complete event, it work on the desktop ( bytesTotal, xml... ), but when
-
How do I get my finder window to show how much space is available?
I used to be able to see how much space on the HD was available in the finder window but it is now gone.
-
2 things: 1) Can't add SOME songs; 2) "Options" doesn't appear in iTunes
1) I recently ripped some cds to my iTunes (newest version, 7.0.2.16, and for some reason, I can't add these songs to my ipod shuffle (I only add songs manually). Whenever I try to "drag and drop" them onto the ipod icon, I get the circle with a line
-
Radio buttons with same groupName in different MCs
In my application, I have a set of three radio buttons that should all belong to the same radio button group. However, I need to put them into separate movie clips. Setting the group name for all three to the same string doesn't do anything (neither