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 and numeric fields

Former Member
0 Kudos
714

Hello,

I'm working with ALV tables.

In my code i have:

loop at t_clientes.

SELECT SINGLE * FROM knkk WHERE kunnr = t_clientes-kunnr

and kkber = t_clientes-bukrs.

i_alv_credito-limite = knkk-klimk.

if sy-subrc eq 0.

append i_alv_credito.

endif.

endloop.

i_alv_credito-limite have the Type knkk-klimk.

In SAP table i have knkk-klimk = '12.000.000,00' but when i saw that value in my ALV table i have '12000000,00'.

I want to have the same format than in Knkk-klimk.

How i can do that?

Thanks

Best regards

1 ACCEPTED SOLUTION
Read only

Former Member
0 Kudos
670

Hi,

Didn't work.. In User Profile i already have the decimal notation.

In ALV Fieldcatalog i specify the value type currency, but it always appears '12000000,00' and not '12.000.000,00' .

Thanks

Best regards

7 REPLIES 7
Read only

Former Member
0 Kudos
670

HI,

First Check your User Own data Settings.

In any SAP Screen click SYSTEM -> USER PROFILE -> USER OWN DATA

or open transactoin SU3.

Click on tab DEFAULTS.

on the left side there will be provision to choose the Decimal Notation, choose 1,234,567.89. Save the settings and run your ALV again.

Second option.

Along with the value specify the Corresponding Unit in ALV Fieldcatalog.

Regards,

Vara

Read only

Former Member
0 Kudos
671

Hi,

Didn't work.. In User Profile i already have the decimal notation.

In ALV Fieldcatalog i specify the value type currency, but it always appears '12000000,00' and not '12.000.000,00' .

Thanks

Best regards

Read only

0 Kudos
670

Hi Yukimai,

Make sure you have specified REF_FIELDNAME and REF_TABNAME in the fieldcatalog with the following values:

REF_FIELDNAME = 'KLIMK'

REF_TABNAME = 'KNKK'

Regards,

Hendy

Read only

Former Member
0 Kudos
670

try like this.

data : v_data(20).

loop at t_clientes.

SELECT SINGLE * FROM knkk WHERE kunnr = t_clientes-kunnr

and kkber = t_clientes-bukrs.

v_data = knkk-klimk

i_alv_credito-limite = v_data.

if sy-subrc eq 0.

append i_alv_credito.

endif.

endloop.

in your internal table declare the field as charecter.

it may work

regards

shiba dutta

Read only

Former Member
0 Kudos
670

also mentioned

in the field catalog parameters

reference tsble name & reference field name.......

( -just try it - iam not sure )

Ramesh.

Read only

Former Member
0 Kudos
670

Hi,

in your output table add one more field for decimalplaces for ex say DECP.

and populate this field

then in your fieldcat for the field klimk decimalsfieldname = DECP

and decmal placestabname = your internal table name.

it will work.

assign points if helpful.

Regards

SAI

Read only

Former Member
0 Kudos
670

Hi,

You can try creating a conversion routine in the below allowd namespace

CONVERSION_EXIT_<i>XXXXX</i>_INPUT and

CONVERSION_EXIT_<i>XXXXX</i>_OUTPUT.

Inside the second one just write the code

WRITE input TO output CURRENCY .

And specify this conv, routine in ur ALV table

Regards,