on 01-05-2006 9:48 PM
Hello,
I currently have an input field on the screen that is already tied to a field in one model that I have pulled back from SAP, which I will also have to send back to SAP once populated. I also need to call another RFC in SAP to return the possible values that are allowed for this same particular field. The values returned from this RFC are in a table, and I somehow need to transfer the data in this returned table to the input field as value help. Can someone help me?
Input Field = Plant
RFC Return table = Search_Help
Search_Help table has one field called fieldval
All of this are properly mapped to the appropriate controller and views.
Thanks,
Kristina
Hi,
I tried to do the same thing but I always get an error.
I wrote the following code:
IWDNodeInfo ccNodeInfo = wdContext.nodeZPRTL_MM_ISSUE_R_input().getNodeInfo();
IWDAttributeInfo attrInfo = ccNodeInfo.getAttribute(IPrivateIssueByCostCenterCompView.IZPRTL_MM_ISSUE_R_inputElement.KOSTL__FROM);
<b>ISimpleTypeModifiable msType = attrInfo.getModifiableSimpleType();</b>...
When the last code line is being executed I get the error.
I just want to remind you all that the attribute type is not string (it has the type that was defined in the function module in R/3).
What can cause the problem ?
Thanks, Nir.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kristina,
You have to implement an EVS for doing the same. Here is the link for the example.
http://help.sap.com/saphelp_nw04/helpdata/en/b3/f68e4ab25d7549888eb612bcb359f1/content.htm
Basically you have to change the following code to suit your need.
IWDAttributeInfo attributeInfo =
wdContext.getNodeInfo().getAttribute(IPrivateMain.IContextElement.COUNTRY);
ISimpleTypeModifiable countryType = attributeInfo.getModifiableSimpleType();
// Set field label and populate valueset
countryType.setFieldLabel("Country");
IModifiableSimpleValueSet valueSet =
countryType.getSVServices().getModifiableSimpleValueSet();
for (int i = 0; i < 40; i++){
valueSet.put("Key_"i,"Country "i);
}
In the above for loop code, instead of "40", use the size of the table containing the allowed values and then in the valueSet.put(<use your table values>).
Hope this helps.
Regards,
Shubham
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shubham,
Thanks so much for the reply. I think I will now be able to make this work. Unfortunately, I can not test it out at the moment because I am having another issue, for which I have opened another thread with the subject of "Null Pointer Exception for Action". If you could be of assistance on that question as well, it would be great, as I am very new to Web Dynpro and Java. Thanks for your help with this question!
Kristina
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.