on 03-12-2008 7:38 PM
Hi,
I have created a sample application (referring SAP's tutorials for Java WebDynPro) which invokes the BAPI_BUPA_ADDRESS_GETDETAIL Bapi.( for reading Customer Address details)
I've made only one view which takes in BusinessPartner as the input and a form for the output.
Have created a model for this purpose and a custom controller.
I've mapped the appropriate fields for both the contexts of View and the Custom Controller.
The Application has been built and deployed on the server. The Jco connections have been configured and tested.
However, Nothing happens when the user enters a business partner input and clicks on the related button to bring up the output.
This WebDynPro has been designed the exact same way as the SAP provided tutorial at
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/28113de9-0601-0010-71a3-c8780... [original link is broken]
Code has been implemented in the implementation tabs of the view and the custom controller the same way too.
Any ideas?
Thanks,
Raman
Ramanunni,
Check the BAPI in backend. Does it return values?
Chintan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Implementation tab of Custom Controller
***************************************
public void wdDoInit()
{
//@@begin wdDoInit()
Bapi_Bupa_Address_Getdetail_Input input = new Bapi_Bupa_Address_Getdetail_Input();
wdContext.nodeBapiCall().bind(input);
input.setBusinesspartner(new String());
//@@end
}
...
...
public void executeBapi( )
{
//@@begin executeBapi()
try
{
wdContext.currentBapiCallElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
}
catch (Exception ex)
{
ex.printStackTrace();
}
//@@end
}
***************************************
Custom Controller Binding With Model
Context
*BapiCall
*Output
*Bapiadtel $$$
*Field A
*Field B and so on
*BusinessPartner $$$
Fields marked with $$$ above are mapped to Bapi_Bupa_Address_GetDetail_Input's Bapiadtel and BusinessPartner.
View Binding with Custom Controller
Context
*BapiStart
*Output
*Bapiadtel @@@
*Field A
*Field B and so on
*BusinessPartner @@@
Fields marked with @@@ above are mapped to BapiCall's(Custom Ctrllr) Bapiadtel and BusinessPartner.
Thanks.
Hi Ramanunni,
Try this.
public void wdDoInit()
{
//@@begin wdDoInit()
Bapi_Bupa_Address_Getdetail_Input input = new Bapi_Bupa_Address_Getdetail_Input();
wdContext.nodeBapi_Bupa_Address_Getdetail_Input().bind(input);
//@@end
}
...
...
public void executeBapi( )
{
//@@begin executeBapi()
try
{
Bapi_Bupa_Address_Getdetail_Input inputData = new Bapi_Bupa_Address_Getdetail_Input();
inputData.setBusinesspartner("Put your Value Here");
wdContext.nodeBapi_Bupa_Address_Getdetail_Input().bind(inputData);
wdContext.currentBapi_Bupa_Address_Getdetail_InputElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
}
catch (Exception ex)
{
ex.printStackTrace();
}
//@@end
}
Regards,
Mithu
Hi,
Sorry all, I haven't had an opportunity to follow up on your suggestions here.
Am marking this thread currently as answered (Although it isn't, but will reopen it when I get an opportunity to work on this and post further comments on this.)
Thanks again,
Raman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
I don't think its due to the source code; Check the Mapping that you have performed at the second view; there you have to create the input node and result node separately. This problem usually happens, if you are mapping the input and output structure together.
Just do the way that i mentioned before and let me know the result; This time it should work
Regards
- Vinod
*
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
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.