on 07-04-2011 10:19 AM
Hi experts
Plz tell me the result of these statements, i know the syntax:
IF lo_nd_lt_pfo IS INITIAL.
WD_COMP_CONTROLLER->gv_text = wd_assist->if_wd_component_assistance~get_text( key = '049' ).
CALL METHOD WD_COMP_CONTROLLER->gv_message_manager->REPORT_ERROR_MESSAGE
EXPORTING
MESSAGE_TEXT = WD_COMP_CONTROLLER->gv_text
VIEW = 'VIEW_MAIN'.
EXIT.
Why are we passing values to an interface over here.?What will be the output if node is initial?
Thanks in advance
Gaurav kaneria
Edited by: GauravKaneria on Jul 4, 2011 11:28 AM
Hi Gaurav ,
You have declared gv_text and gv_message_manager in the Component controller in Attributes section,for raising an error message when the node is initial.
Regards
Aisurya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gaurav,
The given code is used for validating lo_nd_lt_pfo. If lo_nd_lt_pfo is initial the it will report an error message .
The method in interface if_wd_component_assistance get_text will read the text corresponding to 049.
CALL METHOD WD_COMP_CONTROLLER->gv_message_manager->REPORT_ERROR_MESSAGE will display error message text.for ; key 049.
For more information : http://wiki.sdn.sap.com/wiki/display/WDABAP/AssistanceclassfunctionalityinWDA
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
if_wd_component_assistance~get_text is an interface method implemented in CL_WD_COMPONENT_ASSISTANCE class. And your assistance class (WD_ASSIST object of assistance class) with default inherit the CL_WD_COMPONENT_ASSISTANCE class..
so by passing key ('049') to if_wd_component_assistance~get_text method, you will get the corresponding text of the text element ('049').
hope this clarifies the behavior of get text.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If node is initial, you are raising error message.
You are using assistance class. you are raising messages in Component controller. so that stement
WD_COMP_CONTROLLER . Hope you understand.
Cheers,
Kris.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
This statement basically checks if a particular node is initial or note in case the node is initial we are getting a text based on text value from text repository and generating a error message.
If node is initial and we try to read any elemnts from node its gives us the short dump. So may be to avoid the dump here we generate the message.
Thanks
Pradeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
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.