Sunday, September 9, 2018

PROBLEM OF CURRENCY FIELD IN SMARTFORMS

Today I have met a problem in smartforms that
I cannot show a Currency field.

The error is "Reference field WA_BSEG-WRBTR unknow in form." when I am trying to print the form.







I am here to post pictures for easier illustrate the condition of solving this problem.


Here are my Global Data.
The structure WA_BSEG contains a field WRBTR that I wanna display.
So, first, I need to define a type REF_CURR in Global Data with CHAR13 (that is the length of WA_BSEG-WRBTR).

 
Second, I need to set REF_CURR as the reference field for WA_BSEG-WRBTR.
Whenever I wanna display WA_BSEG-WRBTR, Smartforms will take REF_CURR's type as the bridge for showing WA_BSEG-WRBTR.


Finally, I can output the variable &WA_BSEG-WRBTR& correctly.