‎2010 Jun 16 6:13 PM
I have created Ztable with 3 fields MATNR,MCH,Site.I have created table maintenance for this.My requirement is when user make new entries or change existing entries MATNR and Site should be for input and MCH is output field only and value in MCH
will get populated as soon as user enter MATNR(based on Matnr value MCH will be determined.I am able to make MCH field as
output only but when I tried to code validations using Event I am unable to access MCH field.
What Code I need to write in Event Forms to achieve this .My table name is ZMMDIS.
Thanks,
Rekha.
‎2010 Jun 21 9:54 AM
Hi Rekha,
If you are using E program type, then try to program your need in AT SELECTION SCREEN event. If the program is of type M, then use FIELD statement and check_module.
Please provide more information to understand it accurately.
Thanks
Dinesh.
‎2010 Jun 21 12:16 PM
Hi,
You can do the below.
1) Make the column for MCH field as output only by: Double click on the screen in table maintenance and go the the screen painter., In that select the column and click : Output only option; This will make the whole column output only and user cannot enter the values.
2) Now in the table maintenance generator events: Table maintenance -> Modifications->Events ; Add logic to automatically populate the MCH values based on your requirement.
Since you need to do so in create and change, it is suggested to use Event: 01-Before save.
EXTRACT internal table will contain the data in the table maintenance screen so that you can use it for processing.
Hope this helps
Regards
Shiva
‎2010 Jun 21 4:41 PM
Hi Rekha,
Yes, you can achieve what ever your requirements are, but you have to do your own custom coding for the same. You need to create you own PAI module in the screen where you need to pre-populate the values.
But, one thing you should keep in mind is that ABAP Dynpro is not based on user events like HTML or JavaScript where you can validate or load values dynamically. You have to wait for the user to press or trigger an event which you can only process in the PAI Module.
You can scan the Forum for multiple code and examples on the above mentioned requirement.
Hope this will help.
Thanks,
Samantak
‎2010 Jun 23 5:27 PM
For first part : Make the column for MCH field as output only by: Double click on the screen in table maintenance and go the the screen painter., In that select the column and click : Output only option; This will make the whole column output only and user cannot enter the values.
2) Now in the table maintenance generator events: Table maintenance -> Modifications->Events ; Choose event 05-create a new entry. From here you can populate other field value.
Mrinmoy
‎2010 Jun 24 5:52 PM