SAP Function Modules

GET_UNIT_TEXT SAP Function module - Determine Units / Texts







GET_UNIT_TEXT is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name GET_UNIT_TEXT into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: ORF3
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM GET_UNIT_TEXT - GET UNIT TEXT





CALL FUNCTION 'GET_UNIT_TEXT' "Determine Units / Texts
  EXPORTING
    choose200 =                 " orf2choose200  Radiobuttons for Prg. ORF2 Dynpro200
    wa_part =                   " orfpart       Data of Selected Parts (IP DB)
    wa_orf2cust =               " orf2cust      Customising Profils for Optimal Rotable Float ORF1,2,4
  IMPORTING
    wa1_text200 =               " orftext200    Texts for Units
    curr_system =               " orfspec2-curr_system  Currency Key
    curr_manuf =                " orfspec2-curr_manuf  Currency Key
  CHANGING
    wa_syst_source =            " orfsyst_source  Identifies source of system values: Default, System, etc.
    .  "  GET_UNIT_TEXT

ABAP code example for Function Module GET_UNIT_TEXT





The ABAP code below is a full code listing to execute function module GET_UNIT_TEXT including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).

DATA:
ld_wa1_text200  TYPE ORFTEXT200 ,
ld_curr_system  TYPE ORFSPEC2-CURR_SYSTEM ,
ld_curr_manuf  TYPE ORFSPEC2-CURR_MANUF .

DATA(ld_wa_syst_source) = 'Check type of data required'.
DATA(ld_choose200) = 'Check type of data required'.
DATA(ld_wa_part) = 'Check type of data required'.
DATA(ld_wa_orf2cust) = 'Check type of data required'. . CALL FUNCTION 'GET_UNIT_TEXT' EXPORTING choose200 = ld_choose200 wa_part = ld_wa_part wa_orf2cust = ld_wa_orf2cust IMPORTING wa1_text200 = ld_wa1_text200 curr_system = ld_curr_system curr_manuf = ld_curr_manuf CHANGING wa_syst_source = ld_wa_syst_source . " GET_UNIT_TEXT
IF SY-SUBRC EQ 0. "All OK ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_wa_syst_source  TYPE ORFSYST_SOURCE ,
ld_wa1_text200  TYPE ORFTEXT200 ,
ld_choose200  TYPE ORF2CHOOSE200 ,
ld_curr_system  TYPE ORFSPEC2-CURR_SYSTEM ,
ld_wa_part  TYPE ORFPART ,
ld_curr_manuf  TYPE ORFSPEC2-CURR_MANUF ,
ld_wa_orf2cust  TYPE ORF2CUST .

ld_wa_syst_source = 'Check type of data required'.
ld_choose200 = 'Check type of data required'.
ld_wa_part = 'Check type of data required'.
ld_wa_orf2cust = 'Check type of data required'.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name GET_UNIT_TEXT or its description.