on 07-10-2015 2:33 PM
Hi All,
I am working on adding user notification message (error message) on Portal Application.If user is locked in SAP backend,users should be able to see error message on Portal.
And development team has added ABAP code in Function Module in SAP backend.Please find below the same.
ABAP code in SAP:
IF wa_tab-ustyp EQ 'A'.
IF wa_tab-uflag EQ c_1 OR wa_tab-uflag EQ c_2 OR wa_tab-uflag EQ c_3
OR wa_tab-uflag EQ c_4 OR wa_tab-uflag EQ c_5 OR wa_tab-uflag EQ c_6.
wa_return-type = 'E'.
wa_return-message = text-019.
wa_return-parameter = p_userid.
APPEND wa_return TO return.
ENDIF.
We have done testing in SAP backend and it is working fine.
But when we are trying to read this message on Portal using Web dynpro Java-SAP Netweaver Developer Studio,we are not able to see the message (text-019) on Portal from SAP Backend..
Please help me to resolve this issue.
Thanks and Regards,
Snehal Raghoji
HI,
Check the languaje you are executing the function module and the configuired for portal user. It is possible that this language are "hardcoded" in JCo configuration.
Hope it help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
wdj code please.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jun Wu,
Thanks for your reply!
Please find below wdj code.
Public void executeRequest.Y00_Mm_Prapproval_List() {
IWDMessageManager manager = wdComponentAPI.getMessageManager();
try
{
wdContext.currentRequest_Y00_MM_PRAPPROVAL_LISTElement().modelobject().execute();
wdContext.nodeResponse().invalidate();
wdContext.nodeY00_MM_PRAPPROVAL_LISTResponse().invalidate();
wdContext.nodeI_HEADER().invalidate();
wdContext.nodeItem_IHeader().invalidate();
wdContaxt.nodeRETURN().invalidate();
wdContext.nodeItem_Ret().invalidate();
wdContext.nodeI_ITEM().invalidate();
wdContext.nodeItem_IItem().invalidate();
}
catch(Exception e)
{
manager.reportMessage(IMessagePRdashboardComp.DATA_RETRIEVAL_ERROR,null);
manager.reportException(e.getMessage()); //trying to read backend message through this line
}
}
Regards,
Snehal Raghoji
HI Jun Wu,
Sorry for late reply!
I used sso to execute this function module.
One more thing i want to tell,the code is already there for this portal application-PR Approval dashboard.Later i got enhancement to add user notification message.And we did below things for it:
1.The ABAP code is added with the help of DEV team(code shown in above discussion)
2.WDJ code is already there for perticular Function Module
3.We add Text view on one of the views and later we bind its 'Text'property to same module attribute in which the message is appended from backend.
I want to know is there anything i am missing from my side in WDJ code.
Thanks and Regards,
Snehal Raghoji
Hi Sehal,
why do execute the model and invalidate the response nodes after? So you will delete all results.
Also you do not raise a exception in the ABAP code so you can't catch any. I looks like if you append the message to the return type so you would have to read it out of your model context.
Regards,
Tobias
HI Jun/Tobias,
Thanks for your prompt Response!
@Jun:You are saying if it is SSO and user is locked,it will not call the RFC to execute the function module.
If i create a new Function Module and use technical user,is it then possible for me to show the same.Do you have reference link for this how to execute this?
@Tobias:Yes,i appended the message to the return type.So,if i want to read error message from Backend,how should i do then?as you are saying i can't catch it through reportException.
Regards,
Snehal Raghoji
Hi,
Use another RFC using JCo destination configured for predefined user(e.g admin)
This RFC(with input as user id and output as lock status) will have ABAP code to return status of user (ie whether it is locked or not).
Call this RFC in init() method of WD Java component controller. If you get success result then go ahead with your routine code else Print error message.
--
Regards,
Amey
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
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.