SAP Function Modules

ISP_SHEET_WEIGHT_CALCULATION SAP Function module







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

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


Pattern for FM ISP_SHEET_WEIGHT_CALCULATION - ISP SHEET WEIGHT CALCULATION





CALL FUNCTION 'ISP_SHEET_WEIGHT_CALCULATION' "
  EXPORTING
    paperheight =               " jdtpva-sformathoe
    paperheight_unit =          " jdtpva-meinhhoe
    paperweight =               " jdtpva-spapiergew
    paperweight_unit =          " jdtpva-meinhpagew
    paperwidth =                " jdtpva-sformatbr
    paperwidth_unit =           " jdtpva-meinhbreit
    sheetweight_unit_i =        " jdtpva-meinhsblgw
  IMPORTING
    sheetweight =               " jdtpva-stdblttgew
    sheetweight_unit_o =        " jdtpva-meinhsblgw
  EXCEPTIONS
    CONVERSION_NOT_FOUND = 1    "
    DIVISION_BY_ZERO = 2        "
    INVALID_DIMENSION = 3       "
    OVERFLOW = 4                "
    T006D_ENTRY_MISSING = 5     "
    T006_ENTRY_MISSING = 6      "
    .  "  ISP_SHEET_WEIGHT_CALCULATION

ABAP code example for Function Module ISP_SHEET_WEIGHT_CALCULATION





The ABAP code below is a full code listing to execute function module ISP_SHEET_WEIGHT_CALCULATION 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_sheetweight  TYPE JDTPVA-STDBLTTGEW ,
ld_sheetweight_unit_o  TYPE JDTPVA-MEINHSBLGW .


SELECT single SFORMATHOE
FROM JDTPVA
INTO @DATA(ld_paperheight).


SELECT single MEINHHOE
FROM JDTPVA
INTO @DATA(ld_paperheight_unit).


SELECT single SPAPIERGEW
FROM JDTPVA
INTO @DATA(ld_paperweight).


SELECT single MEINHPAGEW
FROM JDTPVA
INTO @DATA(ld_paperweight_unit).


SELECT single SFORMATBR
FROM JDTPVA
INTO @DATA(ld_paperwidth).


SELECT single MEINHBREIT
FROM JDTPVA
INTO @DATA(ld_paperwidth_unit).


SELECT single MEINHSBLGW
FROM JDTPVA
INTO @DATA(ld_sheetweight_unit_i).
. CALL FUNCTION 'ISP_SHEET_WEIGHT_CALCULATION' EXPORTING paperheight = ld_paperheight paperheight_unit = ld_paperheight_unit paperweight = ld_paperweight paperweight_unit = ld_paperweight_unit paperwidth = ld_paperwidth paperwidth_unit = ld_paperwidth_unit sheetweight_unit_i = ld_sheetweight_unit_i IMPORTING sheetweight = ld_sheetweight sheetweight_unit_o = ld_sheetweight_unit_o EXCEPTIONS CONVERSION_NOT_FOUND = 1 DIVISION_BY_ZERO = 2 INVALID_DIMENSION = 3 OVERFLOW = 4 T006D_ENTRY_MISSING = 5 T006_ENTRY_MISSING = 6 . " ISP_SHEET_WEIGHT_CALCULATION
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 ELSEIF SY-SUBRC EQ 6. "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_sheetweight  TYPE JDTPVA-STDBLTTGEW ,
ld_paperheight  TYPE JDTPVA-SFORMATHOE ,
ld_sheetweight_unit_o  TYPE JDTPVA-MEINHSBLGW ,
ld_paperheight_unit  TYPE JDTPVA-MEINHHOE ,
ld_paperweight  TYPE JDTPVA-SPAPIERGEW ,
ld_paperweight_unit  TYPE JDTPVA-MEINHPAGEW ,
ld_paperwidth  TYPE JDTPVA-SFORMATBR ,
ld_paperwidth_unit  TYPE JDTPVA-MEINHBREIT ,
ld_sheetweight_unit_i  TYPE JDTPVA-MEINHSBLGW .


SELECT single SFORMATHOE
FROM JDTPVA
INTO ld_paperheight.


SELECT single MEINHHOE
FROM JDTPVA
INTO ld_paperheight_unit.


SELECT single SPAPIERGEW
FROM JDTPVA
INTO ld_paperweight.


SELECT single MEINHPAGEW
FROM JDTPVA
INTO ld_paperweight_unit.


SELECT single SFORMATBR
FROM JDTPVA
INTO ld_paperwidth.


SELECT single MEINHBREIT
FROM JDTPVA
INTO ld_paperwidth_unit.


SELECT single MEINHSBLGW
FROM JDTPVA
INTO ld_sheetweight_unit_i.

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