cancel
Showing results for 
Search instead for 
Did you mean: 

How can i add a drop down list to a fields using BHTML( displaying on its)

Former Member
0 Kudos

Please help me to add a drop down list to a field while displaying on ITS using BHTML or javscript. List should show all the values from value table or search help.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sandeep,

in ABAP, read the table (keys and values) and write it to the ITS context, e.g. with field names KEY and VALUE.

On the ITS template, write code like this:


`if (KEY.dim > 1);
   repeat with i from 1 to KEY.dim;
    keys1[ i ] = KEY[ i ];
    contents1[ i ] = VALUE[ i ];
    if (KEY[ i ] == SELECTED_KEY);
     selIndex = i;
    end;
   end,
   SAP_TemplatePulldownField("field1", fieldLabel=#label, name="KEY", key="keys1", content="contents1", selIndex=selIndex);
end`

(I had to add blanks between the brackets to get the code displayed correctly here.)

HTH & best regards,

Carlo

Answers (0)