12-14-2011 4:33 AM
Hi
I created the table maintainance generator for maintaince view. it consists of 7 filelds.i.e.absent type,sequence no,enddate,start date,points ,scale,weightage,higher limit. Now my problem is i want to mask the field sequence no. to avoid the user entries in this field and i have to insert numbers 1,2.3....Based up on entries and it has to increment. for this i have to add the code in the screen.can anyone suggest on this and what code and where exactly i have to write??
12-14-2011 6:17 AM
Hi,
In sm30 hide the field which you dont want to see by clicking on Configuration button in that check hide option and save it.
In table maintenance click on environment->modification->events.
In T give value 21 to fill the hiding value form name should be any and press enter in third column you will find abap editor button.
In that place this code you need to place Form and endform between your code.
FORM HIDE.
data a type i .
data wa type ztest_11.
SELECT * from ztest_11 into wa.
endselect.
a = wa-sno.
Ztest_11-sno = a + 1.
ENDFORM.
Hope this will be useful.
Regards,
G.Aditya
Edited by: Aditya.G on Dec 14, 2011 11:47 AM
12-14-2011 4:50 AM
Hi,
Check the modification events.
Table maintenance generator -> Environment -> Modification -> events - Create a form routine and write the code.
Try using event 01 as per your requirement to generate sequence numbers.
Regards,
Sharin.
12-14-2011 5:38 AM
Hi,
In sm30 hide the field which you dont want to see by clicking on Configuration button in that check hide option and save it.
In table maintenance click on environment->modification->events.
In T give value 21 to fill the hiding value form name should be any and press enter in third column you will find abap editor button.
In that place this code you need to place Form and endform between your code.
FORM HIDE.
data a type i.
Zempindex-insert = a + 1.
ENDFORM.
While creating entries no need to give uname it will automatically saved.
Hope this will be useful.
Regards,
G.Aditya
Edited by: Aditya.G on Dec 14, 2011 11:15 AM
12-14-2011 5:53 AM
hi,
In the modification events may be with 21 , you can read a number range and assign to the field in the table.
DATA : SNO TYPE I.
call fm NUMBER_GET_NEXT
get the return value in sno.
ZTEST-SNO = SNO.
with regards,
Syed ibrahim .G
12-14-2011 6:17 AM
Hi,
In sm30 hide the field which you dont want to see by clicking on Configuration button in that check hide option and save it.
In table maintenance click on environment->modification->events.
In T give value 21 to fill the hiding value form name should be any and press enter in third column you will find abap editor button.
In that place this code you need to place Form and endform between your code.
FORM HIDE.
data a type i .
data wa type ztest_11.
SELECT * from ztest_11 into wa.
endselect.
a = wa-sno.
Ztest_11-sno = a + 1.
ENDFORM.
Hope this will be useful.
Regards,
G.Aditya
Edited by: Aditya.G on Dec 14, 2011 11:47 AM
12-14-2011 7:03 AM
Hi adithya,
thanks for replies. in sm30 i am unable to find the configuration button.i'm using sap 4.7. can u suggest??
12-14-2011 7:21 AM
Hi adithya,
I done the hiding filed.after that environment->modification--->events.
i wrote the code in new include. when i am trying to save the entries runtime error is occuring form routine is calling explictly. can u suggest??
12-14-2011 8:57 AM