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: 

Table maintainance generator for view-masking the field and inserting value

Former Member
0 Kudos

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??

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

7 REPLIES 7

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

Hi adithya,

thanks for replies. in sm30 i am unable to find the configuration button.i'm using sap 4.7. can u suggest??

0 Kudos

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??

0 Kudos

Thank you very much adithya. My problem has been solved.