Quantcast
Channel: SCN: Message List - SAP CRM: Webclient UI - Framework
Viewing all articles
Browse latest Browse all 7775

Re: How to pass value instead description in picklist

$
0
0

Displaying value description is standard functionality.

To display value i.e. key on screen you

 

Step1. Define static,public attributes in the impl class of view.

 

          a. GV_KEY - char40    

          b. GV_FIELDNAME - String

 

Step2. Write below code in the redefined method DO_HANDLE_DATA. of impl class of view.

 

CALL METHOD super->do_handle_data

       EXPORTING

         form_fields     = form_fields

         global_messages = global_messages.

 

     DATA: ls_fields TYPE ihttpnvp.

 

     READ TABLE form_fields INTO ls_fields WITH KEY name = 'zaddress_rec_city'.

     gv_key = ls_fields-value.

 

    CONCATENATE me->component_id '_zaddress_rec_city'  INTO gv_fieldname.


In the above code zaddress is my contextnode name and rec_city is my field name.

 

Step3. Write the following code on htm page.

 

<script>

var fieldname = "<%= controller->gv_fieldname %>";

var list = document.getElementById(fieldname);

list.value = "<%= controller->gv_key %>";

</script>

 

 



Viewing all articles
Browse latest Browse all 7775

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>