on 05-30-2014 11:47 AM
Hi All,
I have written a logic into a component that has to work only for certain other components.
So I need to somehow get the node_name of the components before my logic gets triggered.
Any idea on how can I do that?
Any help is much appreciated.
Best regards,
Elena
Hi Elena,
Could you elaborate your requirement a little more ?
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ramakrishnappa,
So I have one component which is used for the F4 functionality.
In this one I have writen a logic that I want only to be pursued for certain other components. Not all of the components that are using it.
So I found out that the node_name is the one that I can use to identify a component.
I want now to write a condition which will check the node_name before my logic gets called.
Hope this clarifies more my inquiry.
Best regards,
Elena
Hi Elena,
Thanks for details.But still I could not get the exact picture of the same.
here goes, my understanding on your issue:
Let us say, you have a component ZWD_F4 which is used as search help and it is used in other components like ZWD_1, ZWD_2, ZWD_3, ZWD_4.
Now, you need to give the access to only the components which are authorized to use the help component ZWD_F4.
You are trying to identify the component by node name in its context. i.e. you need to identify the node name of components ZWD_1, ZWD_2, ZWD_3, .... so on by using a node name.
am I in right direction of your requirement?
Regards,
Rama
Yes, this is the idea.
ZWD_F4 is already used by ZWD_1, ZWD_2, ZWD_3, ZWD_4 .
No inside the view : F4_view of the ZWD_F4 component at the select action there is a method in which I have written a logic.
Now this logic should work only for ZWD_1 and ZWD_2. The other two should pass this logic.
logic I have added:
IF a_area IS NOT INITIAL.
ZCL_ZWD__ASSIST_1 =>LV_F4_SELECT = ABAP_TRUE.
a_area-a_field = 'X'.
ENDIF.
Before this I should write the syntax were the node_name of the components should be checked.
Best regards,
Elena
Hi Elena,
I don't think its good idea of skipping the logic based on node name of component.
For your question:
You can get the name of context node of called component.
Hope you have global attribute GO_VALUE_HELP_LISTENER of type ref to IF_WD_VALUE_HELP_LISTENER in ZWD_F4 component controller.
then write the below logic in your view
data lv_node_name type string.
lv_node_name = wd_comp_controller->GO_VALUE_HELP_LISTENER->F4_ATTRIBUTE_INFO-NODE_INFO->get_name( ).
The above code, gives you the node name from the F4 attributes of component.
Hope this helps you.
Regards,
Rama
hi,
you can pass a global variable which will differentiate which logic needs to be read while search help.
Example: mention a global variable in Assitance class or interfface node level , and pass flag value as X for logic 1 and null for logic 2.
this value should be passed from your main component which is calling the search help component.
Hope this helps.
Regards,
Kanthikumar Palle
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi.
To use the written logic in component 1 in other components you need to use component usage , while you ding this you can use interface nodes/assistance class /shared memory to send the information of Node name from other components to component 1 where your actual logic resides.
Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.