Application Development 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: 

alv currency for Japan

Former Member
0 Kudos

I want to show the ouput put order value in Alv report in Japan currency 'Yen' i.e. no decimal value.

But for Europe the same order value has to be shown in decimal.

What field catalog values I need to pass.

Here GIT_REPORT is the internal table which will be used in display ALV.

I can't pass C as datatype since I want summation of column .

GIT_REPORT-NETWR has datatype as VBAK-NETWR.

decimals_out as '0' but doesn't work.

PERFORM build_fieldcatalog USING :

1 'NETWR' 'P' 'GIT_REPORT' 'X' ' ' 'R'.

FORM build_fieldcatalog USING value(p_count) TYPE i

value(p_fieldname)

value(p_inttype)

value(p_tablename)

value(p_length) TYPE i

value(p_text)

VALUE(p_sum)

value(p_hotspot)

value(p_just).

DATA ls_fieldcat TYPE slis_fieldcat_alv.

  • Append to the Catalog

CLEAR ls_fieldcat.

ls_fieldcat-col_pos = p_count.

ls_fieldcat-fieldname = p_fieldname.

ls_fieldcat-inttype = p_inttype.

ls_fieldcat-tabname = p_tablename.

ls_fieldcat-outputlen = p_length.

ls_fieldcat-reptext_ddic = p_text.

ls_fieldcat-do_sum = p_sum.

ls_fieldcat-hotspot = p_hotspot.

ls_fieldcat-just = p_just.

APPEND ls_fieldcat TO gt_fieldcat.

endform.

Please let me know your inputs on this

Regards

Prashant

2 REPLIES 2

Former Member
0 Kudos

PERFORM build_fieldcatalog USING :

1 'NETWR' 'P' 'GIT_REPORT' 15 'Value'(A08) 'X' ' ' 'R'.

These values are actually passed.

former_member186741
Active Contributor
0 Kudos

forget about decimals, let sap handle it via currency codes. You can have two columns, for example one for document currency and one for local currency. In the fieldcat for your value fields set the 'currency' attributes to match the currency being held, i.e JPY, USD, GBP etc. Obviously you will have to convert the figures if they are only held in one currency, you can't just display GBP with no decimals and expect it to come out as JPY.