on 01-11-2007 3:11 AM
Hi
I have made on Bapi as webservice.. and i imported that webservice in model...
The structure of the model is like this.....
Request_Z_Bapi_Customer_GetDetail
.......|
.......|----- parameter
................|
................|-------customerNo
................|-------division
................|-------distributionchannel
................|-------saleOrg
................|-------passbuffer
.......|-------Response
................|------Result
.......................|-------peAddress
...............................|---city
...............................|---country
...............................|----name
...............................|----.....
...............................|----......
<b>I have writtin the following code in my Custom Controller</b>
Request_Z_BAPI_CUSTOMER_GETDETAIL_WS_customerGetDetail customer = new Request_Z_BAPI_CUSTOMER_GETDETAIL_WS_customerGetDetail();
customer._setUser("abap");
customer._setPassword("quinnox");
wdContext.nodeRequest_Z_Bapi_Customer_GetDetail().bind(customer);
<b>I have executed the fuction like this...............</b>
public void executeCustomerDetails( )
{
//@@begin executeCustomerDetails()
try{
wdContext.currentRequest_Z_Bapi_Customer_GetDetailElement().modelObject().execute();
wdComponentAPI.getMessageManager().reportSuccess("Check "+wdContext.currentPeAddressElement().getFirstName());
}catch(Exception e){
wdComponentAPI.getMessageManager().reportException(e.getMessage(),true);
}
but when i am priniting the results i am getting the null values.........
ex:
wdComponentAPI.getMessageManager().reportSuccess("Check "+wdContext.currentPeAddressElement().getFirstName());
here i am trying to get the FirstName but i am getting null value.....
how to solve this problem....
please help me
Best Regards
Ravi Shankar B
Hi Ravi,
First i would suggest you to test/execute the webservice to makesure that its working properly.
If yes, pass all the madatory fields to the webservice input parameters. In your case customerID could be a madatory parameter to get the address.
You can pass that parameter by customer.setCustomerNo().
Regards, Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think the BAPI is expecting some mandatory parameters to execute the webservice.
Try setting the mandatory parameters and call the execute method.
Thanks and Regards,
Amar Bhagat Challa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
try invalidating the node after execution
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
73 | |
26 | |
10 | |
9 | |
7 | |
6 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.