Application Development 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: 

How to check KTOKD value while entring the KUNNR

Former Member
0 Kudos

Hello,

I have developed an application (A custom table and a module pool with editable ALV of this custom table).

In ALV, user can enter the value of all the fields along with KUNNR (only KUNNR, not KTOKD).

There is a requirement that "We need to allow to enter only Customer number of a Defined type(Z001, Z002)."

If the customer number entered is not part of the account group defined in the table an error message has to be displayed.


Please tell me that how can I handle this requirement using Check Table concept and Foreign key concept?


Suggestions are welcome

4 REPLIES 4

Jelena
Active Contributor
0 Kudos

Are you not able to read KNA1 table using KUNNR to check KTOKD?

Former Member
0 Kudos

I can do it using the code/logic in PAI of screen during save but I dont want to follow this approach.

I want to go for check table and foreign key concept, if it can resolve my problem.

Jelena
Active Contributor
0 Kudos

To be honest, I'm quite confused what your expectation is regarding "Check Table concept and Foreign key concept". What exactly are you expecting to happen?

Also - all these "concepts" are maintained in the Data Dictionary. If for some reason you believe this somehow solves your issue, is there a specific reason you could not read the documentation and then follow the steps there and test if this would work?

What have you tried so far?

Former Member
0 Kudos

I was expecting that when ever I enter some value for customer number in the ALV, It should check with the value with "Check table" that value is Valid or not.

Because, when we call the check_changed_data method of ALV calss with importing parameter "e_valid", it does some validations.

Now i have done this with code in data_changed event because i have to deliver my object.

Thanks for availability.