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: 

Dynamic Table with validation

Former Member
0 Kudos

Hi,

I need to have a Screen that has an input field for the user to enter the table name. The code behind will need to be able to know the fieldname (column) of the table schema. It also must do a simple validation on all the data. It will return the row number and the fieldname (column) of the data if it is blank. This is a dynamic program, regardless of SAP table 'spfli' or custom table that user define. It should work well also. Is it possible to do that? How to do and what is the code like?

Best Regards,

Rayden

1 REPLY 1

former_member189629
Active Contributor
0 Kudos

Rayden,

Use the FM <b>DB_GET_TABLE_FIELDS</b> for this purpose.

Pass the table name in <b>TABNAME</b> parameter and it will return a table (thru the TABLES parameter) which u can capture in an internal table with structure <b>DBFIELD</b>.

This should solve ur query,

Rerward if helpful

Karthik