on 02-24-2011 6:26 PM
Hi Folks,
Recently i am working with Web dynpro, i got one scenario like this i have only one view if i select Vbeln from vbak table by F4 it is a inputfield. In the below i need to get that vbeln details....like erdat, ernam, ect(all are input fields only) without giving any button or enter is it possible. If possible can any one suggest me how can we do.
Thanks in advance.
Hi Monishankar C,
Thank for your answers, you are right but how can i get details in wddomodify if you have any sample code send me for that VBAK table only.
Regards,
William
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi William,
I am writting a sample code for you :
go to code wizard, select your node VBAk (where you have the attribute VBLEN )
and select the attribute. Now code will be automatically generated.
DATA LO_ND_VBAk TYPE REF TO IF_WD_CONTEXT_NODE.
DATA LO_EL_VBAk TYPE REF TO IF_WD_CONTEXT_ELEMENT.
DATA LS_VBAk TYPE WD_THIS->ELEMENT_VBAk.
DATA LV_VBLEN TYPE WD_THIS->ELEMENT_VBAk-VBLEN.
navigate from <CONTEXT> to <VBAk> via lead selection
LO_ND_VBAk = WD_CONTEXT->GET_CHILD_NODE( NAME = WD_THIS->WDCTX__VBAk ).
get element via lead selection
LO_EL_VBAk = LO_ND_VBAk ->GET_ELEMENT( ).
alternative access via index
lo_el_VBAk = lo_nd_VBAk ->get_element( index = 1 ).
@TODO handle not set lead selection
IF LO_EL_VBAk IS INITIAL.
ENDIF.
get single attribute
LO_EL_VBAk ->GET_ATTRIBUTE(
EXPORTING
NAME = `VBLEN`
IMPORTING
VALUE = LV_VBLEN ).
Now based on the value LV_VBLEN select values from database table and fill the internal table.
DATA LT_VBAk TYPE WD_THIS->ELEMENTSVBAk. " this the table to keep the values
select VBLEN ERDAT ERNAM AUDAT from VBAK into table LT_VBAk where VBLEN = LV_VBLEN.
Now you can bind the table to appropriate node.
Regards,
Monishankar C
Thank you Monishankar C. I Got it. But this process is not recommended know. Any way Thanks for your help.
Regards,
William.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can we use IF_WD_CONTEXT_ELEMENT->IS_SELECTED method to check and give any condition there........is it possible!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi William,
How you will use this ?
here i told you that we have to use appropriate action handler to catch the proper action and then you have to code there accordingly.
there is no action handler when you select any value from search help.So how you will catch the action? Where will you use the method.
regards,
Monishankar C
Hi William,
There is no other way as of now other than coding in wddomodify. But as Baskaran said it is not a good practise.
Here in web dynpro we have to work with several action & action handler. Now as of my knowledge we dont have any action handler when select any value search help.
wddomodify runs every time whenever the view gets changed so the performance gets effected.
If it is essential then do the coding like get the details.of erdat, ernam based on your input in wddomodify.
Regards,
Monishankar C
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi William,
As far as i know you do not have any event to subscribe when data is selected on the Search help. one 'dirty ' way you might try is to code in wdddomodifymethod of the view, check if the value in the value help input field is changed and based on that fill the other inputfields.
After value help popup is closed control come along the wddomodify method. However this is not a good practice to do so and it is for that reason not recommended here in forum.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
96 | |
11 | |
11 | |
10 | |
9 | |
7 | |
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.