‎2008 Nov 13 8:59 AM
I am using ALV grid display (OOPS).. here i have an editable field for quantity of type QUAN and length - 10... It accepts around 27 digits... how can i restrict the user to enter only 10 digits?
‎2008 Nov 13 9:01 AM
Hi,
In the field catalog for the field Quantity pass REF_TABLE & REF_FIELD details.
Best regards,
Prashant
‎2008 Nov 13 9:04 AM
Thanks for your reply but i have passed REF_TABLE and REF_FIELD but its still accepting more than 10 digits...
‎2008 Nov 13 9:18 AM
hi
Please check this demo program BCALV_GRID_VERIFY.
It covers most of the options of ALV grid
Hope this helps you
Regards
Aakash
‎2008 Nov 13 9:23 AM
‎2008 Nov 13 10:49 AM
hi,
just give the lentgth of that field as 10, in the "length" column of building of field catalog
for eg:
as shown in first field of the fielddatalog:
:
*-Output-field Table Length Ref table Heading Col_pos
'VBELN' 'T_ITAB1' 10 ' VBAP' 'VBELN' '' 1,
'POSNR' 'T_ITAB1' 6 ' VBAP' 'POSNR' '' 2,
'WERKS' 'T_ITAB1' 4 'VBAP' 'WERKS' '' 3,
'LGORT' 'T_ITAB1' 4 'VBAP' 'LGORT' '' 4.hope it will help you
regards
rahul sharma
‎2008 Nov 13 11:19 AM
Declare the bold part for u r quantity field in the field catalog declaration then u can allow the user to enter only 10 digits in this field
CLEAR WA_FCAT.
WA_FCAT-FIELDNAME = 'NETWR'.
WA_FCAT-REF_TABLE = 'VBAP'.
WA_FCAT-COLTEXT = 'NET VALUE'.
WA_FCAT-REF_FIELD = 'NETWR'. "Field name in Internal table
WA_FCAT-REF_TABLE = 'IG_SAL'. " Internal table name
WA_FCAT-OUTPUTLEN = 10.
WA_FCAT-DO_SUM = 'X'.
APPEND WA_FCAT TO FP_IG_FIELDCATALOG.
‎2008 Nov 13 11:25 AM
Hi,
In the report where u r declaring this field Quantity. declare it's REF type of type which you want.
this will work.
Thanks
Rajesh Kumar