cancel
Showing results for 
Search instead for 
Did you mean: 

Can any one suggest me solution for this Scenario. Reg Inputfield

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Answers (4)

Answers (4)

Former Member
0 Kudos

Thank you Monishankar C. I Got it. But this process is not recommended know. Any way Thanks for your help.

Regards,

William.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I know it doesn't help you now, but for the next Enhancement Package we developing new functionality to trigger the onEnter event handler upon the close of the value help. This should make the "hack" of using the WDDOMODIFYVIEW for such logic unnecessary.

Former Member
0 Kudos

Can we use IF_WD_CONTEXT_ELEMENT->IS_SELECTED method to check and give any condition there........is it possible!

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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.