on 06-07-2015 12:05 PM
Hi,
I'm new in web dynpro for java development and I have a problem to save data using RFC model. This RFC can save multiple values (is structure type table). I tested my RFC in SAP and works fine but when I execute the RFC in web dynpro app the values are not saved. The sample code used in wdDoModifyView is:
...
IWDInputField inputField_name = (IWDInputField)view.getElement("inputName");
IWDInputField inputfield_surn = (IWDInputField)view.getElement("inputSurn");
wdContext.currentAuthorElement().setName(inputField_name.getValue().toString().trim());
wdContext.currentAuthorElement().setSurn(inputfield_surn.getValue().toString().trim());
// | ||
try{ | ||
wdThis.wdGetTestCompController().executeZrfc_Bbvpricauthor_Input(); | ||
} |
catch(Exception ex){
ex.printStackTrace(); | ||
}
...
I know that with this code only one entry could be saved and I hope that I've to use a circle to save multiple data (Authors).
Can someone help me!
Regards
Edy
Hello,
Hello,
I don’t know at what scenario you wrote the code in doModify View method. It seems are you going create UI elements dynamically or what
Is it requires to create ui elements dynamically.
If Yes:
Dynamic UI Generation - Web Dynpro Java - SCN Wiki
If no:
Follow these steps:
Write Below Code in Custom Controller
public void wdDoInit()
{
//@@begin wdDoInit()
//Create a new element in node
//BAPI_QUOTATION_CREATEFROMDATA2_Input
BAPI_QUOTATION_CREATEFROMDATA2_Input input =
new BAPI_QUOTATION_CREATEFROMDATA2_Input ();
.bind(input);
//@@end
}
public void execute_BAPI_QUOTATION_CREATEFROMDATA2( )
{
//@@begin execute_BAPI_QUOTATION_CREATEFROMDATA2()
IWDMessageManager manager = wdComponentAPI.getMessageManager();
try
{
}
catch(WDDynamicRFCExecuteException e)
{
}
//@@end
}
Regards
Vijay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Vijay contribution,
I'm not using dynamic UI Element and the steps followed are:
1. Import the RFC model. The import parameter is a table and the cardinality of the node is 0..n ;
2. Through context mapping I map the all node/value attributes to Component Controller and mapped to View
3. Created UI elements through data binding
4. Create an action button with the code described above
5. Implemented the same code as the one you provided in the custom controller
Following this steps I've no problem when the RFC import parameter is sample fields and not table.
I appreciated your help and thanks again for that but I still have problem
Regards
Edy
User | Count |
---|---|
90 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.