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

Problem with SM30

Former Member
0 Likes
1,662

Hi forum,

in my report i am calling table maintanence using function module VIEW_MAINTENANCE_CALL for a Z table which is having 2 primary keys and rest Non key fields. Now while showing it on a screen i want to hide first column which is one of mine primary key field of a table and when user creates new entry , i want to pass value of this perticular hidden column from my z program or some routine and rest fields as per user input.

I have tried writting event 01 / 21 , it is successful in a way column gets hidden but if you enter two same records and press enter there is No error or warning is displayed for duplicate records and after saving those it results in a dump.

Can you suggest where i am going wrong.

Thanks in advance.

Message was edited by:

sharad todkar

4 REPLIES 4
Read only

Former Member
0 Likes
979

Hi In YOUR PAI module do validation for the Duplicate entries.. . That's must.. Ie.

Check that the primary key combination for which u r entering new value is not present already in the table...

Caution:

Use Chain Endchain and Module on chain request to validate ... otherwise values will not change...

Hope this will help u to decipher the problem...

If u think this has helped u, reward with points

Read only

0 Likes
979

Thanks Darshan for prompt reply.

But the problem is little bit different, suppose there are no records as of now in a database table , and at a time i enter two records with no difference at all and when i press enter i dont get any error as generally we do get an Error saying

" An entry already exists with the same key "...so i cant check with database as none of the values are there in database as yet.

Any suggestions.

thanks

Read only

Former Member
0 Likes
979

why don't u put a different value for the field u r hiding ... some number range for each and every record...

hope this will help..

Ashwani

Read only

0 Likes
979

Hi Ashwini,

What will be the exact use of passing number range , the problem is if by mistake user enters same record on SM30 for new entries, it should give error message saying duplicate entries, anyhow in my table i have total 5 fields and 3 of them are making a primary key , one of these fields is Hidden other two primary keys are on Screen only for user to make an entry, so if user enters same values for these 2 primary key columns then i am expecting an error of duplicate entries as first colmn am passing same value for every record.

I Hope i could make my requirnment clear.

Thanks,