简体   繁体   English

SAP ABAP:对报表中的多个单个值进行货币转换的最佳方法

[英]SAP ABAP: best way to do currency convertion for many single values in report

One of our customers has a z-programm to generate a simple report about specific kinds of orders. 我们的一位客户使用z程序来生成有关特定种类订单的简单报告。 The reports show several values of calculated vbak-netwr entries. 这些报告显示了计算出的vbak-netwr条目的多个值。 There are sums, subsums, and single entries in lists. 列表中有总和,总和和单个条目。

Those values are shown in the local currency of EUR. 这些值以欧元的当地货币显示。 Now, they have to be displayed in US$ as well. 现在,它们也必须以美元显示。

Here is a simplified example: 这是一个简化的示例:

Old : 旧的
Value
1400 1400
1200 1200
... ...

New : 新品
Value (EUR) | 价值(欧元)| Value (US$) 价值(美元)
1400.............| 1400 ............. | 1757 1757
1200.............| 1200 ............. | 1506 1506
... ...

I know, I can use CONVERT_TO_FOREIGN_CURRENCY to do display the new information. 我知道,我可以使用CONVERT_TO_FOREIGN_CURRENCY来显示新信息。

However, I am concerned about how to convert all those values (single, sum, subsum, etc...). 但是,我担心如何转换所有这些值(单个,总和,总和等)。 Call the function each time for each value and save it into an own variable? 每次为每个值调用该函数并将其保存到自己的变量中? This seems to be rather slow and increases the reports complexity. 这似乎很慢,并且增加了报告的复杂性。

Are there other ways to convert and display many values at once? 还有其他方法可以一次转换和显示许多值吗?

如果所有原始金额都使用同一货币,并且目标货币只有1种,那么如何以1欧元致电一次CONVERT_TO_FOREIGN_CURRENCY以获取汇率(例如:1欧元= 1.26美元),然后将您的金额乘以汇率即可( x * 1.26),而无需调用功能模块?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM