cancel
Showing results for 
Search instead for 
Did you mean: 

How to config to show keys within dropdown lists in Web Dynpro ABAP

Former Member
0 Kudos

Dear all,

In SAP GUI, when I want to show keys within dropdown list, I will check config as below:

result:

In SAP Web Dynpro, how to config to show keys within dropdown lists

Thanks and best regards,

Quynh Tran.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Tran

  

Call set_key_visible method to abap_true on your Dropdown List object e.g.:

Data: lr_chr_dropdown type ref to cl_salv_wd_uie_dropdown_by_key.

 

lr_chr_dropdown->set_key_visible(abap_true ).

Brgds Kim Brandt

Former Member
0 Kudos

Thanks Swati and Kim for your comments but I don't want to add more code because I'm calling transactions of SAP standard.

I think that somewhere will configure option for this issue.

Thanks and best regards,

Quynh.

former_member210266
Active Participant
0 Kudos

Hi Tran

Please go through the below link.It has the same requirement as yours.

http://scn.sap.com/thread/1451204

Regards

Swati

Former Member
0 Kudos

Hi Swati,

I don't think that it's the solution.

with the same transaction ME29N:

    

  • I add transaction ME29N in tree NetWeaver Bussiness Client (NWBC) and open it as bellow:

when I choose Order Type dropdown, it isn't show key in list.

  • But I open directly transaction ME29N in SAP GUI, it show key in list:

Please advise me on how to proceed.

Thanks and Best regards,

Quynh.

former_member210266
Active Participant
0 Kudos

Hi Quynh

Maybe the configuration you have done for the SAP GUI doesn't work for NWBC. You can remove the configuration and concatenate the key and text in the text column of the dropdown list.

I had the same requirement and this solution worked for me.

Can't think of a better solution

Regards

Swati

Former Member
0 Kudos

Hi Swati,

Thanks for your support but I want a better solution .

Thanks,

Quynh.

former_member210266
Active Participant
0 Kudos

Hi

Found one more solution to this.But not sure how much it would be helpful.

I wrote this code in WDDOMODIFYVIEW.

  DATA lo_ui_element     TYPE REF TO cl_wd_dropdown_by_key.

  lo_ui_element ?= view->get_element( 'EMP_TYPE' ). "Put the name of your UI element
  lo_ui_element->set_key_visible( abap_true ).

The output comes like this

Regards

Swati