‎2010 Aug 26 6:12 AM
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
‎2010 Aug 26 7:49 AM
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
‎2010 Aug 26 6:22 AM
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.
‎2010 Aug 26 6:37 AM
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
‎2010 Aug 26 7:02 AM
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
‎2010 Aug 26 7:39 AM
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
‎2010 Aug 26 7:49 AM
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
‎2010 Aug 26 8:08 AM
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
‎2013 Sep 30 12:05 PM
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