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

ALV Grid display

Former Member
0 Likes
637

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?

7 REPLIES 7
Read only

Former Member
0 Likes
613

Hi,

In the field catalog for the field Quantity pass REF_TABLE & REF_FIELD details.

Best regards,

Prashant

Read only

Former Member
0 Likes
613

Thanks for your reply but i have passed REF_TABLE and REF_FIELD but its still accepting more than 10 digits...

Read only

Former Member
0 Likes
613

hi

Please check this demo program BCALV_GRID_VERIFY.

It covers most of the options of ALV grid

Hope this helps you

Regards

Aakash

Read only

Former Member
0 Likes
613

In fielcat for that column pass outputlen = 10

Read only

Former Member
0 Likes
613

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

Read only

Former Member
0 Likes
613

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.

Read only

Former Member
0 Likes
613

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