‎2007 Oct 04 9:31 AM
Hi
I have a field that can be editable basically a CHAR type in dictionary.
I have to restrict to enter only numeric.No chars at all else trigger a message.
I tried to use INTTYPE, DATATYPE,DOMAIN in field catalog to N / NUMC / NUMC30 respctively.
I also used event handler DATA_CHANGED.By this I could trigger the message.But my 2 problems are below:
1. When I restrict from field catalog, why is it still its allowing char fields to enter in my editable field in ALV.
2. After the message, if I dont remove the char fields, it should not allow me to place the cursor in any other position or do any actition even untill I correct the error in the editable field.
Any clues friends.
Thanks
Kiran
‎2007 Oct 04 9:34 AM
Hi kiran,
Use this fm CATS_NUMERIC_INPUT_CHECK and input the value that u enter in the column, if the value is not integer then it will raise exception as NO_NUMERIC so then u can check whether the value is interger or not.
regards,
Santosh
‎2007 Oct 04 10:06 AM
hi santhosh
I want to enter ONLY NUMERIC.
If user enters any char, i must trigger message.
By the ways, I am doing with OO ABAP.
ANy more clues.
Thanks
Kiran
‎2007 Oct 04 11:22 AM
‎2007 Oct 04 9:46 AM
u can use layouts to change the alv into the edit mode
code sample:
DATA WA_LAYOUT TYPE LVC_S_LAYO.
WA_LAYOUT-EDIT = 'X'.
WA_LAYOUT-GRID_TITLE = 'GRID CONTAINER FOR MATERIAL DISPLAY - EDITING'.
WA_LAYOUT-NO_TOOLBAR = 'X'.
WA_LAYOUT-ZEBRA = 'X'.
WA_LAYOUT-SEL_MODE ='A'.
CALL METHOD MAIN_ALV->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
IS_LAYOUT = WA_LAYOUT
CHANGING
IT_OUTTAB = IT_MATL
IT_FIELDCATALOG = IT_FCAT.
‎2007 Oct 04 12:12 PM