SAP Function Modules

ISP_POSTAGE_GET_DETAIL SAP Function module - IS-M/SD: Determine Postal Charges for Existing Delivery Type







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

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


Pattern for FM ISP_POSTAGE_GET_DETAIL - ISP POSTAGE GET DETAIL





CALL FUNCTION 'ISP_POSTAGE_GET_DETAIL' "IS-M/SD: Determine Postal Charges for Existing Delivery Type
  EXPORTING
    gewichtseinheit =           " rjll40-geweinheit  Unit of Weight
    gewicht_exkl_blg =          " rjll40-gewicht
    gewicht_inkl_blg =          " rjll40-gewicht
*   kurstyp = SPACE             " komk-kurst
*   lfartlog = SPACE            " tjv01-lfartlog  Logistical delivery type
*   posartpost = SPACE          " rjll40-posartpost
*   posttarif = SPACE           " rjll40-posttarif
*   sendartpo = SPACE           " tjv01-sendartpo  Shipment type
*   sendavarpo = SPACE          " tjv01-sendavarpo
*   stueckzahl = '0'            " rjll40-stueckzahl  No.of Units
    vrsnddatum =                " rjll40-vrsnddatum  Shipping Date
*   postabrart =                " tjl29-objart  IS-M: Postal settlement type
  IMPORTING
    postentgelt =               " rjll40-entgelt  Postal charges
  TABLES
    tkomk =                     " komk
    tkomp =                     " komp
    tkomv =                     " komv
  EXCEPTIONS
    NO_CALCULATION_SCHEME = 1   "
    NO_POSTAGE_CATEGORY = 2     "
    NO_PRICES_FOUND = 3         "
    WRONG_CURRENCY = 4          "
    WRONG_INPUT = 5             "
    .  "  ISP_POSTAGE_GET_DETAIL

ABAP code example for Function Module ISP_POSTAGE_GET_DETAIL





The ABAP code below is a full code listing to execute function module ISP_POSTAGE_GET_DETAIL 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_postentgelt  TYPE RJLL40-ENTGELT ,
it_tkomk  TYPE STANDARD TABLE OF KOMK,"TABLES PARAM
wa_tkomk  LIKE LINE OF it_tkomk ,
it_tkomp  TYPE STANDARD TABLE OF KOMP,"TABLES PARAM
wa_tkomp  LIKE LINE OF it_tkomp ,
it_tkomv  TYPE STANDARD TABLE OF KOMV,"TABLES PARAM
wa_tkomv  LIKE LINE OF it_tkomv .


DATA(ld_gewichtseinheit) = Check type of data required

DATA(ld_gewicht_exkl_blg) = Check type of data required

DATA(ld_gewicht_inkl_blg) = Check type of data required

DATA(ld_kurstyp) = some text here

SELECT single LFARTLOG
FROM TJV01
INTO @DATA(ld_lfartlog).


DATA(ld_posartpost) = some text here

DATA(ld_posttarif) = some text here

SELECT single SENDARTPO
FROM TJV01
INTO @DATA(ld_sendartpo).


SELECT single SENDAVARPO
FROM TJV01
INTO @DATA(ld_sendavarpo).


DATA(ld_stueckzahl) = 123

DATA(ld_vrsnddatum) = 20210129

SELECT single OBJART
FROM TJL29
INTO @DATA(ld_postabrart).


"populate fields of struture and append to itab
append wa_tkomk to it_tkomk.

"populate fields of struture and append to itab
append wa_tkomp to it_tkomp.

"populate fields of struture and append to itab
append wa_tkomv to it_tkomv. . CALL FUNCTION 'ISP_POSTAGE_GET_DETAIL' EXPORTING gewichtseinheit = ld_gewichtseinheit gewicht_exkl_blg = ld_gewicht_exkl_blg gewicht_inkl_blg = ld_gewicht_inkl_blg * kurstyp = ld_kurstyp * lfartlog = ld_lfartlog * posartpost = ld_posartpost * posttarif = ld_posttarif * sendartpo = ld_sendartpo * sendavarpo = ld_sendavarpo * stueckzahl = ld_stueckzahl vrsnddatum = ld_vrsnddatum * postabrart = ld_postabrart IMPORTING postentgelt = ld_postentgelt TABLES tkomk = it_tkomk tkomp = it_tkomp tkomv = it_tkomv EXCEPTIONS NO_CALCULATION_SCHEME = 1 NO_POSTAGE_CATEGORY = 2 NO_PRICES_FOUND = 3 WRONG_CURRENCY = 4 WRONG_INPUT = 5 . " ISP_POSTAGE_GET_DETAIL
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "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_postentgelt  TYPE RJLL40-ENTGELT ,
ld_gewichtseinheit  TYPE RJLL40-GEWEINHEIT ,
it_tkomk  TYPE STANDARD TABLE OF KOMK ,
wa_tkomk  LIKE LINE OF it_tkomk,
ld_gewicht_exkl_blg  TYPE RJLL40-GEWICHT ,
it_tkomp  TYPE STANDARD TABLE OF KOMP ,
wa_tkomp  LIKE LINE OF it_tkomp,
ld_gewicht_inkl_blg  TYPE RJLL40-GEWICHT ,
it_tkomv  TYPE STANDARD TABLE OF KOMV ,
wa_tkomv  LIKE LINE OF it_tkomv,
ld_kurstyp  TYPE KOMK-KURST ,
ld_lfartlog  TYPE TJV01-LFARTLOG ,
ld_posartpost  TYPE RJLL40-POSARTPOST ,
ld_posttarif  TYPE RJLL40-POSTTARIF ,
ld_sendartpo  TYPE TJV01-SENDARTPO ,
ld_sendavarpo  TYPE TJV01-SENDAVARPO ,
ld_stueckzahl  TYPE RJLL40-STUECKZAHL ,
ld_vrsnddatum  TYPE RJLL40-VRSNDDATUM ,
ld_postabrart  TYPE TJL29-OBJART .


ld_gewichtseinheit = Check type of data required

"populate fields of struture and append to itab
append wa_tkomk to it_tkomk.

ld_gewicht_exkl_blg = Check type of data required

"populate fields of struture and append to itab
append wa_tkomp to it_tkomp.

ld_gewicht_inkl_blg = Check type of data required

"populate fields of struture and append to itab
append wa_tkomv to it_tkomv.

ld_kurstyp = some text here

SELECT single LFARTLOG
FROM TJV01
INTO ld_lfartlog.


ld_posartpost = some text here

ld_posttarif = some text here

SELECT single SENDARTPO
FROM TJV01
INTO ld_sendartpo.


SELECT single SENDAVARPO
FROM TJV01
INTO ld_sendavarpo.


ld_stueckzahl = 123

ld_vrsnddatum = 20210129

SELECT single OBJART
FROM TJL29
INTO ld_postabrart.

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