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

Currency reference in local structure

Former Member
0 Likes
1,063

Hi,

If I had a structure as:

TYPES:

  BEGIN OF lty_s_test,

    amount TYPE bsik-wrbtr,

    curr   TYPE bsik-waers,

  END OF lty_s_test.

...and use it to show table in ALV grid, the result would be wrong. When user creates totals, all amounts are summed together, even for mixed currencies (eg EUR and USD).

If I do the same in dictionary structure, it forces me to supply Ref. struc and Ref. field for AMOUNT field (in my case, it is CURR field) and ALV grid correctly sums different currencies separately.

How can I (if at all) get the same result in local structure?

Thanks!

KR,

Igor

1 ACCEPTED SOLUTION
Read only

FredericGirod
Active Contributor
0 Likes
759

Hi Igor,

witch kind of technic do you use to display your ALV ?  you don't have a field catalog ?  you can't modify it ?

regards

Fred

Hi,

If I had a structure as:

TYPES:

  BEGIN OF lty_s_test,

    amount TYPE bsik-wrbtr,

    curr   TYPE bsik-waers,

  END OF lty_s_test.

...and use it to show table in ALV grid, the result would be wrong. When user creates totals, all amounts are summed together, even for mixed currencies (eg EUR and USD).

If I do the same in dictionary structure, it forces me to supply Ref. struc and Ref. field for AMOUNT field (in my case, it is CURR field) and ALV grid correctly sums different currencies separately.

How can I (if at all) get the same result in local structure?

Thanks!

KR,

Igor

2 REPLIES 2
Read only

FredericGirod
Active Contributor
0 Likes
760

Hi Igor,

witch kind of technic do you use to display your ALV ?  you don't have a field catalog ?  you can't modify it ?

regards

Fred

Read only

0 Likes
759

Hi, Frederic,

Fieldcatalog, of course! Sometimes the obvious solution doesn't occur (and almighty Google failed too). Thanks for the hint - it works!

KR,

Igor