on 01-05-2011 7:50 PM
Hi,
I am very new to Web Dynpro for Java programming. I need some help with the following.
Our ABAP developers developed a BAPI which accepts input value in the form of a structure and returns the output in the form of a structure.
I am developing an application using Web Dynpro for Java, to call the custom BAPI . I don't know how to send the input field values in the form of a structure. If it is just an input field I know how to set the input field values before calling the execute method on the model.
Could any one of you please provide me a piece of sample code to set the input values to the bapi import parameters.
And also please let me know how to read the values of the output which was returned in the form of a structure (not the tables).
Thanks in advance.
Regards
Srini
Hi,
Context
Bapibank_getList | Bapibank_getList_Input | _BankKey | _MaxRows |
|_Bapi_bank_getList_Output
|_BankName
|_BankCountry
Create a local node in the same structure as of RFC node imported
public void ExecuteBankDetails( )
{
Bapi_bank_getList list = new bapi_bank_getlist();
bapi_bank_getlist_input input = new bapi_bank_getlist_input();
input.setbankkey(wdcontext.currentvninputelement().getbankkey);
input.setmaxrows(wdcontext.currentvninputelement().getrows);
list.setbapi_bank_getlist_input(input);
wdcontext.nodeBapi_bank_getList().bind(list);
wdcontext.currentBapi_bank_getListElement().modelObject().execute();
wdcontext.nodebapi_bank_getlist_output().invalidate();
wdContext.currentBapi_bank_getListElement().modelObject().modelInstance().disconnectIfAlive();
//copying the RFC output to local node binded to view table
if(!wdContext.nodebapi_bank_getlist_output().isEmpty())
{
WDCopyService.copyElements(wdContext.nodebapi_bank_getlist_output(),wdContext.nodevnBankListOutput());
}
Regards,
Bala Baskaran.S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
68 | |
8 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.