SAP Function Modules

DG56_GET_TRM_CNTRIES_SHIP SAP Function module







DG56_GET_TRM_CNTRIES_SHIP 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 DG56_GET_TRM_CNTRIES_SHIP into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM DG56_GET_TRM_CNTRIES_SHIP - DG56 GET TRM CNTRIES SHIP





CALL FUNCTION 'DG56_GET_TRM_CNTRIES_SHIP' "
  EXPORTING
    i_vttk_wa =                 " vttk
    i_nspras =                  " nast-spras
    i_likp =                    " likp
  TABLES
    i_vttstab =                 " vtts
    i_vttptab =                 " vttp
    i_vtsptab =                 " vtsp
    i_vtrlktab =                " vtrlk
    i_vtrlptab =                " vtrlp
    i_vekptab =                 " vekp
    i_vepotab =                 " vepo
    e_rdgcountryreglang_tab =   " rdgcountryreglang
  EXCEPTIONS
    GET_DATA_ERROR = 1          "
    .  "  DG56_GET_TRM_CNTRIES_SHIP

ABAP code example for Function Module DG56_GET_TRM_CNTRIES_SHIP





The ABAP code below is a full code listing to execute function module DG56_GET_TRM_CNTRIES_SHIP 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:
it_i_vttstab  TYPE STANDARD TABLE OF VTTS,"TABLES PARAM
wa_i_vttstab  LIKE LINE OF it_i_vttstab ,
it_i_vttptab  TYPE STANDARD TABLE OF VTTP,"TABLES PARAM
wa_i_vttptab  LIKE LINE OF it_i_vttptab ,
it_i_vtsptab  TYPE STANDARD TABLE OF VTSP,"TABLES PARAM
wa_i_vtsptab  LIKE LINE OF it_i_vtsptab ,
it_i_vtrlktab  TYPE STANDARD TABLE OF VTRLK,"TABLES PARAM
wa_i_vtrlktab  LIKE LINE OF it_i_vtrlktab ,
it_i_vtrlptab  TYPE STANDARD TABLE OF VTRLP,"TABLES PARAM
wa_i_vtrlptab  LIKE LINE OF it_i_vtrlptab ,
it_i_vekptab  TYPE STANDARD TABLE OF VEKP,"TABLES PARAM
wa_i_vekptab  LIKE LINE OF it_i_vekptab ,
it_i_vepotab  TYPE STANDARD TABLE OF VEPO,"TABLES PARAM
wa_i_vepotab  LIKE LINE OF it_i_vepotab ,
it_e_rdgcountryreglang_tab  TYPE STANDARD TABLE OF RDGCOUNTRYREGLANG,"TABLES PARAM
wa_e_rdgcountryreglang_tab  LIKE LINE OF it_e_rdgcountryreglang_tab .

DATA(ld_i_vttk_wa) = 'Check type of data required'.

SELECT single SPRAS
FROM NAST
INTO @DATA(ld_i_nspras).

DATA(ld_i_likp) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_vttstab to it_i_vttstab.

"populate fields of struture and append to itab
append wa_i_vttptab to it_i_vttptab.

"populate fields of struture and append to itab
append wa_i_vtsptab to it_i_vtsptab.

"populate fields of struture and append to itab
append wa_i_vtrlktab to it_i_vtrlktab.

"populate fields of struture and append to itab
append wa_i_vtrlptab to it_i_vtrlptab.

"populate fields of struture and append to itab
append wa_i_vekptab to it_i_vekptab.

"populate fields of struture and append to itab
append wa_i_vepotab to it_i_vepotab.

"populate fields of struture and append to itab
append wa_e_rdgcountryreglang_tab to it_e_rdgcountryreglang_tab. . CALL FUNCTION 'DG56_GET_TRM_CNTRIES_SHIP' EXPORTING i_vttk_wa = ld_i_vttk_wa i_nspras = ld_i_nspras i_likp = ld_i_likp TABLES i_vttstab = it_i_vttstab i_vttptab = it_i_vttptab i_vtsptab = it_i_vtsptab i_vtrlktab = it_i_vtrlktab i_vtrlptab = it_i_vtrlptab i_vekptab = it_i_vekptab i_vepotab = it_i_vepotab e_rdgcountryreglang_tab = it_e_rdgcountryreglang_tab EXCEPTIONS GET_DATA_ERROR = 1 . " DG56_GET_TRM_CNTRIES_SHIP
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here 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_i_vttk_wa  TYPE VTTK ,
it_i_vttstab  TYPE STANDARD TABLE OF VTTS ,
wa_i_vttstab  LIKE LINE OF it_i_vttstab,
ld_i_nspras  TYPE NAST-SPRAS ,
it_i_vttptab  TYPE STANDARD TABLE OF VTTP ,
wa_i_vttptab  LIKE LINE OF it_i_vttptab,
ld_i_likp  TYPE LIKP ,
it_i_vtsptab  TYPE STANDARD TABLE OF VTSP ,
wa_i_vtsptab  LIKE LINE OF it_i_vtsptab,
it_i_vtrlktab  TYPE STANDARD TABLE OF VTRLK ,
wa_i_vtrlktab  LIKE LINE OF it_i_vtrlktab,
it_i_vtrlptab  TYPE STANDARD TABLE OF VTRLP ,
wa_i_vtrlptab  LIKE LINE OF it_i_vtrlptab,
it_i_vekptab  TYPE STANDARD TABLE OF VEKP ,
wa_i_vekptab  LIKE LINE OF it_i_vekptab,
it_i_vepotab  TYPE STANDARD TABLE OF VEPO ,
wa_i_vepotab  LIKE LINE OF it_i_vepotab,
it_e_rdgcountryreglang_tab  TYPE STANDARD TABLE OF RDGCOUNTRYREGLANG ,
wa_e_rdgcountryreglang_tab  LIKE LINE OF it_e_rdgcountryreglang_tab.

ld_i_vttk_wa = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_vttstab to it_i_vttstab.

SELECT single SPRAS
FROM NAST
INTO ld_i_nspras.


"populate fields of struture and append to itab
append wa_i_vttptab to it_i_vttptab.
ld_i_likp = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_vtsptab to it_i_vtsptab.

"populate fields of struture and append to itab
append wa_i_vtrlktab to it_i_vtrlktab.

"populate fields of struture and append to itab
append wa_i_vtrlptab to it_i_vtrlptab.

"populate fields of struture and append to itab
append wa_i_vekptab to it_i_vekptab.

"populate fields of struture and append to itab
append wa_i_vepotab to it_i_vepotab.

"populate fields of struture and append to itab
append wa_e_rdgcountryreglang_tab to it_e_rdgcountryreglang_tab.

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 DG56_GET_TRM_CNTRIES_SHIP or its description.