on 06-28-2010 8:58 AM
Hi!
Let's see what I mean, with a short sample, I will print out to screen with ABAP 15000 HUF:
DATA:
ls_amount LIKE bseg-wrbtr,
ls_currency LIKE bkpf-waers.
MOVE 150 TO ls_amount.
MOVE 'HUF' TO ls_currency.
WRITE:/ ls_amount CURRENCY ls_currency.
Unfortunately HUF is stored in the SAP amount fields divided by 100, so the amount of 150 means 15000 if the currency is HUF.
I would like to do the same thing in the ABAP WebDynpro ALV, because at the moment, my amount type columns does contain the 150 value, instead of the 15000 (so the SB stored value, instead of the correct ones).
How can I set a field's currency field, to display the correct values in ABAP WebDynpro ALV?
Thank you
Tamá
Tamas,
you need to write either supply function to modify the amount value when the currency is HUF (Amount = amount*100) or modify the amount value before it binds to context node.
Regards,
Vasundhara
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>
> Tamas,
> you need to write either supply function to modify the amount value when the currency is HUF (Amount = amount*100) or modify the amount value before it binds to context node.
> Regards,
> Vasundhara
You souldn't have to do either of these things. The amount field output should format automatically like a write statement does as long as there is a connection to the currency field. You need to make sure that the structure you are using to definine the context (and use a structure based definition - not direct attribute assignment) is a DDic structure that has the currency/amount filed definition defined. Also make sure that the context contains both the currency and amount fields and they are both populated.
If you can't use a DDic structure with proper assignment of the currency field, then you can set it manually using the method SET_ATTRIBUTE_REFERENCE_FIELD of the IF_WD_CONTEXT_NODE_INFO object.
Here is a help link that describes the currency situation in Web Dynpro:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/3a/2232666aeb45f4b759848a4caf9c8b/frameset.htm
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.