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

Input MENGE ALV

Former Member
0 Likes
539

Hi all,

I have a problem when i input data in the field MENGE. Exemple: In the ALV (for edit), i put the value "2,00" in the field ( MENGE), but the ALV convert the data for "0,002".

How can i desable this conversion???

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
436

Hi,

how did u declare dat field...

type menge or type menge_d..... menge is a structure.....menge_d is a datatype....

type-pools: slis.

DATA: begin of itab6 occurs 0,
chk type c,
a type p decimals 2,
b type p decimals 2,
c type menge,
end of itab6.

data: ls_fieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE,
wa_layout TYPE slis_layout_alv.

itab6-a = '1.12'.
itab6-b = '2.25'.
itab6-c = '200'.

append itab6.
append itab6.
append itab6.
append itab6.


ls_fieldcat-fieldname = 'A'.
ls_fieldcat-seltext_m = 'A'.
append ls_fieldcat.

ls_fieldcat-fieldname = 'B'.
ls_fieldcat-seltext_m = 'B'.
ls_fieldcat-decimals_out = 0.
append ls_fieldcat.

ls_fieldcat-fieldname = 'C'.
ls_fieldcat-seltext_m = 'C'.
append ls_fieldcat.

wa_layout-box_tabname = 'ITAB6'.
wa_layout-box_fieldname = 'CHK'.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
it_fieldcat = ls_fieldcat[]
IS_LAYOUT = wa_layout

TABLES
t_outtab = itab6[].

Cheers,

jose.

3 REPLIES 3
Read only

Former Member
0 Likes
437

Hi,

how did u declare dat field...

type menge or type menge_d..... menge is a structure.....menge_d is a datatype....

type-pools: slis.

DATA: begin of itab6 occurs 0,
chk type c,
a type p decimals 2,
b type p decimals 2,
c type menge,
end of itab6.

data: ls_fieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE,
wa_layout TYPE slis_layout_alv.

itab6-a = '1.12'.
itab6-b = '2.25'.
itab6-c = '200'.

append itab6.
append itab6.
append itab6.
append itab6.


ls_fieldcat-fieldname = 'A'.
ls_fieldcat-seltext_m = 'A'.
append ls_fieldcat.

ls_fieldcat-fieldname = 'B'.
ls_fieldcat-seltext_m = 'B'.
ls_fieldcat-decimals_out = 0.
append ls_fieldcat.

ls_fieldcat-fieldname = 'C'.
ls_fieldcat-seltext_m = 'C'.
append ls_fieldcat.

wa_layout-box_tabname = 'ITAB6'.
wa_layout-box_fieldname = 'CHK'.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
it_fieldcat = ls_fieldcat[]
IS_LAYOUT = wa_layout

TABLES
t_outtab = itab6[].

Cheers,

jose.

Read only

0 Likes
436

Jose,

In the Internal table, i declare the field :

Data menge type ekpo-menge.

Read only

Former Member
0 Likes
436

hi Marcelo Almeida

when in your program

ON THE UPPERMOST BAR

CLICK "SYSTEM" >> USER PROFILE >> OWN DATA

>> DEFAULT TAB >> there ou can find the settings of date and decimal notation..

change it to your desired setting and you will get the output

reward if helpful

Rohan malik