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
Bala
Hi 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
Similar Messages
-
Error while using Adaptive RFC model
I am using adaptive RFC model to consume a function module from BI system. The function module expects a Boolean input. While executing the function module we need to give u2018Xu2019 for that input. When I consumed the function module in the webynpro java project , used it and give the input as u2018trueu2019 on runnig the application it gives the following error: u201Ccom.sap.conn.jco.ConversionException: (122) JCO_ERROR_CONVERSION: Cannot convert a value from type java.lang.Object to CHAR at field I_READ_ATTRu201D
There is corresponding dictionary type created called u2018BOOLE_Du2019 but I could not access the dictionary type in the controller java file.
Is there a way to rectify the same or any workaround condition?
With regards,
Sougato.Hi saurabh,
I need to give the value from webdynpro. Hers is the sample code.
rssem_Cha_Values_Get_Input.setI_Read_Attr();
// It expects a boolean value but if i pass a value to the method the obove error is show.
Where as there is a simple type "Boole_d" generated when i consumed the RFC in the webdynpro.
but i couldn't access this simple type in the code.
With regards,
Sougato. -
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 -
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 -
Return a multidimensional array using Adaptive WS model
Hi all,
I have created a web service that needs no request parameters and returns a 2-dimensional String array as output. I deployed the Web service and tested it using WSNavigator. It works fine.
Now,I imported the Web service using Web service model. I got an error when importing the model itself.
Then, I tried using Adaptive Web Service model and tried to bind the values of the output String array in my webdynpro table. I was able to get only the first element of the 2D String array. Don't know where I am going wrong.
This is my code:
MO_Test instance = new MO_Test();
Request_GET_USERCUST inst = new Request_GET_USERCUST(instance);
wdContext.nodeRequest_GET_USERCUST().bind(inst);
wdContext.currentRequest_GET_USERCUSTElement().modelObject().execute();
wdComponentAPI.getMessageManager().reportSuccess("Size:"+wdContext.node_GET_USERCUSTResponse().size());
The size is displayed as 1!!
Any insights?
Thanks & regards,
M.SubathraDid u use "webservice model" or "adaptive webservice model".
Earlier i used with "wenservice model" and it was working fine. Now that with SP17, "WebService model"is depricated and we are forced to use "adaptive webservice model" and it is giving the problem. the detailed error is :
Exception : java.lang.NullPointerException: null
<i>!STACK 0
java.lang.NullPointerException
at com.sap.engine.services.webservices.espbase.client.dynamic.impl.DOperationImpl.initParameters_DocumentStyle(DOperationImpl.java:59)
at com.sap.engine.services.webservices.espbase.client.dynamic.impl.DOperationImpl.initParameters(DOperationImpl.java:46)
at com.sap.engine.services.webservices.espbase.client.dynamic.impl.DOperationImpl.<init>(DOperationImpl.java:40)
at com.sap.engine.services.webservices.espbase.client.dynamic.impl.DInterfaceImpl.initOperationNameToOperationMapping(DInterfaceImpl.java:150)
at com.sap.engine.services.webservices.espbase.client.dynamic.impl.DInterfaceImpl.<init>(DInterfaceImpl.java:55)
at com.sap.engine.services.webservices.espbase.client.dynamic.impl.DGenericServiceImpl.initPortNameToInterfaceMapping(DGenericServiceImpl.java:78)
at com.sap.engine.services.webservices.espbase.client.dynamic.impl.DGenericServiceImpl.<init>(DGenericServiceImpl.java:50)
at com.sap.engine.services.webservices.espbase.client.dynamic.GenericServiceFactory.createService(GenericServiceFactory.java:71)</i> -
Inconsistency of results using adaptive RFC
I'm calling a function from a R/3 System using Adaptive RFC and i'm having different results from my webdynpro application that the ones that i'm having in the R/3.
If someone could tell me why this happen I will appreciate.
Thanks.Hi Frank,
Iin another opportunity I had tried to do the same procedure you are trying and not getting hit. I ended up using the parameter "sap-wd-client = WmlClient" in the url of the application ... What makes this return in xml format and can be accessed like a Web Service. It really is not a proper use for a Web Dynpro application, but with some customization finally meet demand.
Regards,
Angelo -
Using an Adaptive RFC Model from JSP
I'm trying to use an Adaptive RFC Model I created for use in our Web Dynpros from a Portal Application project. I've created 2 DCs:
1. A Web Dynpro DC, only containing the imported Adaptive RFC Model. The model has been added to the public parts.
2. A Portal Application DC, with the model DC added as a DC usage (along with the other required DCs)
Now, everything appears to work from inside NWDS. The dot operator works while editing my JSPDynPage class, and everything builds fine, but when I deploy and test in the portal, I get "package not found" errors on the actual JSP. I assume this is because the JSP is compiled at run-time. How do I expose these classes to the JSP compiler?
It's seems like using the same method to call BAPIs in Web Dynpros and Java iViews would be a good practice following SAP's "reusable code" policy, so there must be a way to do it...Jonathan,
Adaptive RFC Model works correctly only when running inside WebDynpro container. JSP runs outside container (in regular J2EE WebApplication container).
The error you receive is due to missing run-time references to container classes.
Actually, what you are trying to do is dead end, sorry.
Use SAP Enterprise Connector instead of Adaptive RFC model. Generated connector classes works from any environment. Also they are sooo similar to Adaptive RFC that you'll even not mention a difference.
Valery Silaev
EPAM Systems
http://www.NetWeaverTeam.com -
Problem with Adaptive RFC Model.
Hi.
I have a problem with creating an Adaptive RFC Model.
When i choose a function from function list, that appears, and click next, the model wizard display log information with following text:
<b>[Warning]: Creating a connection with Metamodel language <en> failed. Continuing with language <ru>
[Fatal]: com.sap.mw.jco.JCO$Exception: Missing R3NAME=... or ASHOST=... in connect_param in RfcOpenEx
[Info]: .................</b>
The SLD server and SLD bridge is running.
How this can be fixed?
Thank you.Hi
Open SAPLogon. Select the server profile say "Dev" and click on groups. In the window that appears enter the 3 letter id as System id. This you would get when you logon to SAP and see the right hand bottom corner. It would be a 3 letter "XXX". If not ask your basis administrator.
In the Message server space enter the Hostname or ip address (try both in case one of them doesnt work) of your R/3 server. Click on Generate List. You should get some groups appearing in the view below.
If it works then your message server is working fine. Let me know if that helps you.
regards
ravi -
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 -
Problem with displaying same field in three columns
Hi
I am using reports developer 11g and I have created a report which displays only one field (column), which is id_number as output but I have a problem now.
I would like to display the id_number in three columns on one page to save paper, that is, I want to show the first 20 (1 - 20) id_numbers in one column going down, then display the next 20 id_numbers (21 - 40) on the second column on the same page and the next 20 (41 - 60) on the third column still on the same page. If there are more than 60 id_numbers, they should be printed on the next page again in three columns, and so on until all the id_numbers are displayed. How can I achieve this? Could you please assist me?
Thanks.Andreas, I think I am missing something here. I have done what you have said but still the id_numbers are all being displayed
in the first column and jumps on to the next page without displaying the id_numbers across the page in columns.
My data model contains a group with not only the id_number but has other fields which I am not displaying.
I am only using the other fields just to use them in conditions to select only id_numbers which meet a certain criteria which I then display in the report.
I have created a repeating frame for that group and changed the orientation property to Down/Across. Within that frame, I have a field for the id_number
which I want displayed in three columns, running across the page as I have already told you. Please help.
Thanks. -
Problem in displaying two fields in dropdown on selection screen
Hi All,
I have a reqmt where i need to display the dropdown list for certain field.
For this perticular fields there is a description attached to it.
Please let me know teh way where i can display the field with description in dropdown.
Like
field1 field2
P Hi
R Hello
S How are you
I am using CALL FUNCTION 'VRM_SET_VALUES' for the same.
Please reply asap.
Edited by: PRADEEPKULAT on May 20, 2010 2:03 PMHi,
I am not sure about your question,
I understood that you have to Display both key and Text.
If so Concatenate both Key and Text .
I mean,
TYPE-POOLS : VRM.
DATA : T_VRM TYPE VRM_VALUES,
WA_VRM TYPE VRM_VALUE.
WA_VRM-KEY = 'Field1'.
CONCATENATE WA_VRM-KEY 'Field1' INTO
WA_VRM-TEXT SEPERATED BY SPACE.
INSERT WA_VRM INTO TABLE T_VRM.
WA_VRM-KEY = 'P''.
CONCATENATE WA_VRM-KEY 'Hi' INTO
WA_VRM-TEXT SEPERATED BY SPACE.
INSERT WA_VRM INTO TABLE T_VRM.
WA_VRM-KEY = 'R'.
CONCATENATE WA_VRM-KEY 'Hello' INTO
WA_VRM-TEXT SEPERATED BY SPACE.
INSERT WA_VRM INTO TABLE T_VRM.
WA_VRM-KEY = 'S'.
CONCATENATE WA_VRM-KEY 'How are you' INTO
WA_VRM-TEXT SEPERATED BY SPACE.
INSERT WA_VRM INTO TABLE T_VRM.
Then pass this table to the function module VRM_SET_VALUES.
I hope this resolves your issue.
Regards,
Raghava Channooru -
Question of possible problem with "display as" field in MS Outlook contact
Are you aware of any problems with an apparent shift of the display as field in MS Outlook contacts after the initial syncing with their iPhone? When preparing to send an e-mail in Outlook, the auto populating of the "display as" field is now linked to incorrect contacts. Therefore, one could unknowingly send an e-mail to the wrong recipient. After seeing this error, it appears that many of my "display as" fields have shifted among contacts within my Outlook contacts. This appears to have happened right around the first time I synced my iPhone. It could be completely unrelated to the iPhone syncing but I am curious if other iPhone / MS Outlook users have experienced similar problems.
There should be no leeway or movement. Return the phone to where you bought it and show them. It should be covered under warranty unless they determine it was dropped or accidental damage.
-
Hi,
I am using an Adaptive RFC to display values in a table in Webdynpro.There is an error " com.sap.dictionary.runtime.DdException: Value is not numeric " which occurs when I try to display the data.
Could u please tell me what could be the reason for the occurence of this error.
Thanks in advance,
Jesmila.Hi
1.Test the return Data are corectly bind with the same data type.
2. Check the output node size is greater then 0.
Can you expalin the problem in detail?
Kind Regards
Mukesh -
Help required using adaptive webservice Model
Hi.
I am importing an adaptive webservice model in webdynpro using a URL. When asked i choose <i>no logical destinations - use WSDL URL for metadataretrieval and webservice execution</i>.
The webservice exports one function only:
public String returnTestString(String arg1);
In my component controller wdInit() i have the following code:
String_arctest model = new String_arctest();
wdContext.nodeRequest_ReturnTestString().bind(new Request_ReturnTestString(model));
wdContext.
nodeRequest_ReturnTestString()
.nodeReturnTestString()
.bind(new ReturnTestString(model));
wdContext.nodeRequest_ReturnTestString()
.nodeReturnTestString()
.currentReturnTestStringElement().setArg1("HalloWelt");
wdContext.nodeRequest_ReturnTestString()
.currentRequest_ReturnTestStringElement().modelObject().execute();
wdContext.nodeResponse().invalidate();
wdContext.nodeResponse().nodeReturnTestStringResponse().invalidate();
When executing the code the <b>execute()</b> throws an <i>com.sap.tc.webdynpro.model.webservice.api.WDWSModelExecuteException </i> with following message cause: <i>Cannot find the required parameter [arg1] in request message content. Exception on execution of web service with WSDL URL </i>
I appreciate any help. Thanks in advance.Hi,
Try the following.
String_arctest model = new String_arctest();
ReturnTestString str=new ReturnTestString(model);
str.setArg1("HalloWelt");
Request_ReturnTestString req=new Request_ReturnTestString(model);
req.addReturnTestString(str);
wdContext.nodeRequest_ReturnTestString().bind(req);
wdContext.nodeRequest_ReturnTestString()
.currentRequest_ReturnTestStringElement().modelObject().execute();
wdContext.nodeResponse().invalidate();
wdContext.nodeResponse().nodeReturnTestStringResponse().invalidate();
Regards, Anilkumar -
How to use Adaptive WebService Model with CAF WebService and Complex Type
Hi All,
I am trying to use the Adaptive Web Service Model and call a WebService generated by the CAF. The return type of the WebService is a Complex Type.. I receive an exception when trying to instantiate the Model Node.
Does anybody know how to use the Adpative Web Service Model with CAF WebServices and Complex Types as return type?
Help is appreciated..
Thanks, JohannesThanks Mukesh.
It is not possible to apply the Service Controller Template on Enterprise Java Bean Models as described in the Document. When I try to aply the template on the EJB Model, NWDS says: Only Webservice Models and RFC Models are supported...???
I did not find any information about how to return complex types in AWS.. in this document???
Is there such information available? Has anybody ever done that? There must be a way to do that.. Is is the standard approach, isn't it...? Please help me out there.. I need to get this running..
Thanks, Johannes
Maybe you are looking for
-
HT1657 Can I watch a rental movie in my iPad when in an airplane with the airplane mode on?
I rented a couple of movies hoping to watch them in the plane and all it says is it can not open when I try to watch.... Is there a way to watch rented movies in airplane mode?
-
How/Can I Change the Order of a Playlist
I purchased a Greatest Hits album from iTunes and then 4 more extra songs from the same band. I then created a New Titled playlist from the library so I could burn a CD of these purchased songs, but one of the extra purchased songs " insists" on bein
-
Creation of Purchase Req with components in the case of subcontracting
Hi Frndz, We would appreciate if anybody can help up us in this.We are trying to build a Z-functionality to create a purchase requisition for subcontracting material (with special procurement key=30).We are able to create PR with item category "L".Bu
-
E-mail alerts - how do I?
Hi, I'm wanting to send out an e-mail alert for one of my iCal events. It is something I think will be very useful to do automatically. The docs are so limited, I'm wondering if iCal is as limited as what's listed when searching help. I'm just starti
-
How to flush data from web service to a new page?
Hi, all. I've created a web service that returns some data in xml format. I want to flush that data into a new page. Could anyone help me with this? Regards, Sergey.