05-30-2011 3:05 PM
Hi,
I have a issue. in a drop down box.
I have a drop down box with values A B C D, if i select value D the I/O fields should be disabled.
Can anyone help me in doing this..as I have no clue or with some example code ..
Thanks,
Shankar
05-30-2011 3:09 PM
Hi,
There are many posts on similar topics in SDN. Please search.
Assign a function code for the drop down box. Use screen-input = 0/1 for disabling and enabling i/o field respectively.
Thanks,
Sri.
05-30-2011 3:29 PM
Hi,
Sri
On screen input screen-input = '0' or '1', we can disable the I/O fields..
But here I want the case, where on select of particular value example "A' the fields should be grayed out but on select on other values the fields should not be disabled.
05-31-2011 5:50 AM
Provide a 3-char name for the screen group as MODIF ID. And based on this, you can provide screen-input = '0' inside the LOOP.
Please find the below code snippet:
SELECT-OPTIONS: s_locid1 FOR oijloc-locid NO-EXTENSION NO INTERVALS MODIF ID loc.
TYPE-POOLS: vrm.
DATA: param_matnr TYPE vrm_id,
values_matnr TYPE vrm_values,
value_matnr LIKE LINE OF values_matnr.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-group1 = 'LOC'.
screen-input = '0'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'DAT'.
screen-input = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
param_matnr = 'P_MATNR'.
value_matnr-key = g_matnr.
value_matnr-text = l_matcode.
APPEND value_matnr TO values_matnr.
CLEAR value_matnr.
* Drop Dwon List:
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = param_matnr
values = values_matnr
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
Hope this is useful.
Regards,
Sowmya
05-31-2011 1:06 PM
Hi,
Sowmya
As far as i understand this code will help me in up in displaying the values in the drop down.
Using the FM - "vrm_set_values" we display the values in the dropdown.
But my requirement is : I have a drop down which has 4 values, A B C D . and along with this two drop downs, I have two I/O fields.
On select of Value A or Value B, the I/O fields should be disabled.
Kindly tell me how this can be done.
Thanks,
Shankar Sree
05-31-2011 1:58 PM
Hi,
if you selected value from drop down then that value is assigned to parameter. based on that parameter value you will be write
screen-input = 0 or 1.