Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Disable fields based on value selected from first list box.

ajoy_saha2
Explorer
0 Likes
1,927

Hi All,

I am facing a problem in module pool programing. My scenario is there will be around 50 fields in the screen , within that first field is a drop down list box. In the list box there will be electricuty , gas and csw. If user select gas then the fields corresponding to gas will only be editable other fields not relevent to gas will be non editable(Disable).... Same case for electriciy andcsw also.

Can any one guide me regarding this....

Thanks in advance.

Regards

Ajoy

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,110

As the first field is a listbox, just affect a function code to it, so when user will select a new value, control will go to PAI and then PBO to redisplay the screen.

- Attach a function code to the listbox

- in PAI you may check this code, to insure the screen will be displayed again (not necessary usually; if next screen = current screen on screen attributes)

- In PBO of screen use LOOP AT SCREEN/CASE <listbox field>/SCREEN-INPUT = '0' or '1'/ENDCASE/MODIFY SCREEN/ENDLOOP to enable or disable input on fields.

Regards,

Raymond

7 REPLIES 7
Read only

Former Member
0 Likes
1,110

Hi ,

You need use fm's like DYNPVALUEREAD and DYNPVALUEUPDATE to achive this.

In teh PBO of ur screen based on the user selection for the drop down you need to assign the screen groups for hte fields relavant to the three categories u have mentioned.

Based on user selection the associated groups should be made editable or non editable.

BR,

Vijay.

Read only

0 Likes
1,110

HI Vijay,

It will be great help for me if you elaborately describe the process. I am new in module pool programing. To be frank i did not get you same percent. Please also provide me relevent link if you have with you.

BR

Ajoy

Read only

0 Likes
1,110

Hi Asaha,

This link will be of great help for you if you are new to Module pool.

[Module Pool Notes|http://wiki.sdn.sap.com/wiki/display/Snippets/ModulePoolNotes]

For [DYNP_VALUES_READ|http://wiki.sdn.sap.com/wiki/display/ABAP/FilteringF4HelpvaluesinTablecontrol,basedonotherfield+value] refer this link.

For [DYNP_VALUE_UPDATE|http://wiki.sdn.sap.com/wiki/display/ABAP/GettingainputfieldpopulatedonenteringthevalueinoneInputfield]

Regards

Abhii

Read only

0 Likes
1,110

Hi Abhii,

I did not get any link between my requirment and the function modules u provided. May be i am getting can you please describe me how can I achieve my goal here.

Regards

Ajoy

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,111

As the first field is a listbox, just affect a function code to it, so when user will select a new value, control will go to PAI and then PBO to redisplay the screen.

- Attach a function code to the listbox

- in PAI you may check this code, to insure the screen will be displayed again (not necessary usually; if next screen = current screen on screen attributes)

- In PBO of screen use LOOP AT SCREEN/CASE <listbox field>/SCREEN-INPUT = '0' or '1'/ENDCASE/MODIFY SCREEN/ENDLOOP to enable or disable input on fields.

Regards,

Raymond

Read only

0 Likes
1,110

Hi Raymond,

When user will select a record from first screen then based on the data some fields will be non editable and some fields will stay editable. in the same time the selected time will also be there in list box.

Did u get my point.

Regards

Ajoy

Read only

Former Member
0 Likes
1,110

Hi All,

I am also facing the same problem,

I tried the method as Raymond has explained.

But Ia m not able to get the values.

Please Help me.

Thanks & Regards

Mani