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

Regarding Max value and alert message

former_member242166
Participant
0 Likes
691

Hi experts,

consider my scenario,

i Have one selection screen having some fields, one field is primary key . I have to enter all fields and save it into one ztable. in that primary key field user have to enter the value orderly, i mean 001,002,003,004... etc.  consider last entered value is 016, suddenly the user enter the 018  or greater than 018, the messgae have to come . " Your last entered value is 016. Please enter 017 "  .   How can i perform this scenario.  Please Help me . I will be grateful to you.

Thanks and Regards,

Linganathan.K

Moderator message : Not enough re-search before posting, discussion un-marked as question.

Message was edited by: Vinod Kumar

Hi experts,

consider my scenario,

i Have one selection screen having some fields, one field is primary key . I have to enter all fields and save it into one ztable. in that primary key field user have to enter the value orderly, i mean 001,002,003,004... etc.  consider last entered value is 016, suddenly the user enter the 018  or greater than 018, the messgae have to come . " Your last entered value is 016. Please enter 017 "  .   How can i perform this scenario.  Please Help me . I will be grateful to you.

Thanks and Regards,

Linganathan.K

Moderator message : Not enough re-search before posting, discussion un-marked as question.

Message was edited by: Vinod Kumar

5 REPLIES 5
Read only

Former Member
0 Likes
650

Hi

Can you please send your code, which help in providing a better solution.

Read only

0 Likes
650

Dear kolluru goutham,

Thanks for your reply, Actually it contains more than 1000 lines. Help me for my scenario with some example code

Thanks and regards,

Linganathan.k

Read only

0 Likes
650

Hi,

Using the 'NUMBER_GET_NEXT' function module will get the next number of current number. So can compare the Next number and user entered values and populate the error messages.

Thanks,

Suresh M

Read only

0 Likes
650

Hi suresh murukutla,

How can i find the last entered number, if i find that only i have generate next number..

can you help me with some sample code?

Thanks and Regards ,

Linganathan

Read only

RaymondGiuseppi
Active Contributor
0 Likes
650

You could use a SELECT MAX( rrn ) FROM ztable where rnn is your primary key. But usually this kind of problem is solved by using number range (*),

- create a number range and interval via SNRO

- Use FM NUMBER_GET_NEXT to generate  the next key value

Regards,

Raymond

(*) Read  some documentation like Number ranges in BC Extended Applications Function Library.