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

Editable ALV

Former Member
0 Likes
675

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

5 REPLIES 5
Read only

Former Member
0 Likes
620

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

Read only

0 Likes
620

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

Read only

0 Likes
620

any help plz

Read only

Former Member
0 Likes
620

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.

Read only

Former Member
0 Likes
620

Solved on my own