SQL Server administration and T-SQL development, Web Programming with ASP.NET, HTML5 and Javascript, Windows Phone 8 app development, SAP Smartforms and ABAP Programming, Windows 7, Visual Studio and MS Office software SAP ABAP Programming and HANA Database Tutorials
Development resources, articles, tutorials, samples, codes and tools for .Net, SQL Server, Windows, Windows Phone, SAP and ABAP, like SAP UI5, Screen Personas, etc.




Install SAP Free


How to Get Invoice Currency Text in SAP Smartforms Documents


If you are an ABAP developer creating SAP documents for your business flow using SAP Smartforms, possibly you deal with currency. Currency values requires to display the currency name on the SAP Smartforms document also.

Of course each currency has different translation text for different languages.
So as a developer you should also take the document language into account for the invoice currency text for example on SAP Smartform document.





Here is a sample ABAP code, I used to display the currency text of an invoice in Italian.
The currency text of the SAP invoice document is kept at is_bil_invoice-hd_gen-bil_waerk
Searching within the ABAP table TCURT enables ABAP users to get the text translation of the cuurency for different languages.
So when we add an additional filter for the SPRAS or the document language, we can easily find the currency text translation for specific language.

TYPES :
  BEGIN OF lty_ktext,
    ktext TYPE ktext,
  END OF lty_ktext.

DATA :
  lt_ktext TYPE TABLE OF lty_ktext,
  ls_ktext TYPE lty_ktext.

SELECT ktext
  INTO TABLE lt_ktext
  FROM TCURT
  WHERE
    spras = 'IT' AND
    waers = is_bil_invoice-hd_gen-bil_waerk.

" Invoice Currency Text
IF lt_ktext IS NOT INITIAL.
  LOOP AT lt_ktext INTO ls_ktext.
    gv_ktext = ls_ktext-ktext.
    TRANSLATE gv_ktext TO UPPER CASE.
  ENDLOOP.
ENDIF.






SAP Resources

SAP Tutorial

SAP Forums

SAP Tools

SAP Transaction Codes Table








Copyright © 2004 - 2019 Eralper YILMAZ. All rights reserved.
Community Server by Telligent Systems