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

Table maintenance Field Validations

Former Member
0 Likes
948

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.

5 REPLIES 5
Read only

Former Member
0 Likes
676

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.

Read only

Former Member
0 Likes
676

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

Read only

Former Member
0 Likes
676

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

Read only

Former Member
0 Likes
676

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

Read only

0 Likes
676

My problem is resolved.