on 04-05-2007 12:44 PM
hi All
I have problem with getting data from Backend. I am sending data to backend. & able to retrieve data in backend. but some reason i am not seeing data in frontend. Model and JCO and Context are fine. Then Where is the Problem?. I do understand.
This is my code: my backend:
SELECT SINGLE usercat INTO ex_user_cat FROM /arch/arm_user WHERE
username = im_user.
ENDFUNCTION
Controller Component:
public void wdDoInit()
{
//@@begin wdDoInit()
__Arch__Arm_Get_User_Cat_Input input = new __Arch__Arm_Get_User_Cat_Input();
wdContext.node__Arch__Arm_Get_User_Cat_Input().bind(input);
//@@end
}
public void Example_GetData( )
{
//@@begin Example_GetData()
try
{
wdContext.current__Arch__Arm_Get_User_Cat_InputElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
}
catch(Exception ex)
{
ex.printStackTrace();
}
//@@end
}
View Controller:
public void onActionToGetData(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionToGetData(ServerEvent)
wdThis.wdGetExampleCompController().Example_GetData();
//@@end
}
Please can anu one help me in this
Thank u
Regards
Ravi
hi,
1) Through external debugging check out if proper values are being sent to backend or not(for external debugging goto transaction code se37, open your bapi->goto Utilities->Setting->Debugging->Here check if "Act" check box is activated or not), then put a break point in code and run application from WD.
2) If proper values are sent to backend then check in WD if output node is recieving values as output or not, using
wdContext.node<output node containing values>.size()
3) If proper values are coming in output node ie if it is showing size non zero for valid parameter in import then check if the node is properly bind to UI element .
If you are using table control then best way is use Apply template method in the context menu of RootUIElement of view.
4) or finaly check if any exception is thrown while executing model object.
hope it helps
regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
as per the details mention you are able to retrieve data. Have you printed the output node size? if its greater than 0 then there is a problem in binding the data with UI.Bind the data with UI element once again or simply print the output through component API.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ravi,
Check your BAPI in the backend also.
The tcode is se37-->give ur bapi name -->execute
Regards,
Ramganesan K.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try to print your Input params by using the WdcomponentAPI.getMessageManager().reportSuccess();statements and compare to back end system and after the execution of the execute method find the outputnode size and print it .
These are all the reasons and
One more thing is u need to get autorization the function module from R/3 system
That is also need to check.
Thanks,
Lohi.
Ravi,
Only you are handling the exception.
Please use the message manager code inside the catch block then only
you will be know that error message incase of exception.
Put this code into Yourcatch block,
wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(ex.toString());
Regards,
Ramganesan K.
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.