on ‎2015 May 26 1:35 PM
Hello everyone,
I have strange problem here with my workflow.
We have workflow for approving incoming invoices. We extend standard BO BUS2081 and create new one ZBUS2081.
In ZBUS2081 we create new Database Field based on field RBKP-RMWWR.
Everything working fine until we extend this workflow for country like Chile - They don't allow to have decimal places in field Gross Invoice Amount, and right now when they insert amount for example : 4 890 CLP it is stored in table RBKP as 48,90 and this value is displayed in all notification from workflow.
Workflow Notification definition and displayed text
Is it possible somehow to convert this value to proper format before sending email in user decision step ?
Request clarification before answering.
hi
you can create a container element and use a background step to change the currency format using following FM
CONVERT_AMOUNT_TO_CURRENCY
CALL FUNCTION 'CONVERT_AMOUNT_TO_CURRENCY' EXPORTING date = sy-datum foreign_currency = 'USD' foreign_amount = '2000.00' local_currency = 'EUR' IMPORTING local_amount = amount.you can write the current amount in required format to a 18 character field and use this character field in task description
Regards
sandy
Message was edited by: Sandy !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Marcin,
You need to convert the amount by checking the current country and move it to TEXT field , which should be choosen as task description field. This is the only way i remember , which i did for multi-country workflow.
Thanks
Rakesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello ,
Try to use &AMOUNT(T)& in workflow task description. This should remove the commas.
&INCOMINGINVOICE.GROSSINVOICEAMOUNT(T)&
Regards
Sandy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What you are seeing is the correct internal representation. However the WI text uses the SapScript engine, which is a little ancient.
My guess is that, because it is treating everything as an independent field, there is no currency field to reference, therefore it doesn't know how to convert it. I don't know if there are special mechanisms to make SapScript work with currencies.
Sandy's approach would work. Another quick thing to try is to bind the amount into a standalone text container element of the task and insert that into the text. Binding is more up to date technology than SapScript, and if that doesn't work and you have time I'd report it to SAP.
Let us know what works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 12 | |
| 9 | |
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.