ā2012 Apr 11 7:25 AM
Hi Gurus,
I have a question , That is While entering entries into employee table for the first time,
Is there any possibility that we can have Employee ID generated automatically.
Suggestions Please.
ThanKx.......Regards
ā2012 Apr 11 7:41 AM
Hi ,
Using table events we can achieve this thing .
Steps : Go to table maintenance generator
environment
modification
events
in form routine click f4 and select the appropriate form .
Regards
Siva
ā2012 Apr 11 7:38 AM
Yes! why not create the number range object and use the function module NUMBER_GET_NEXT in your program to get the id.
This is how it is done in standard sap.
ā2012 Apr 11 7:41 AM
Hi ,
Using table events we can achieve this thing .
Steps : Go to table maintenance generator
environment
modification
events
in form routine click f4 and select the appropriate form .
Regards
Siva
ā2012 Apr 11 7:47 AM
HI Guys,
the following procedure can be used in an application.
but forget every application,there is no any application.but instead only one independent table.
single table with no values...entering values for the first time.
I'm imagining like this---> enter all other data into the table except employee ID....when we save the entries the EMPL ID should be generated and saved automatically.....
ā2012 Apr 11 7:58 AM
EVENT 05 + Number ranges or your own logic . Please search in SCN. This has been discussed before.
ā2012 Apr 11 8:02 AM
Hi Rohan ,
As mentioned by kesavadas , one way to achieve your requirement is to use a combination of Table maintenance event and number range object.
But please keep this point in mind that this feature will work only when table maintenance is being used to create entry in the table , in case you want to update the table using a program then it has ti be handled in the program .
Regards
Arun
ā2012 Apr 11 8:07 AM
HI Rohan,
Check the table events once then select .the event number 5 in that write logic in that form like this
call function : number_get_next mbe
exporting
number_id = l_number.
employe id = l_number.