SAP Function Modules

ISP_ISSUE_WEIGHT_CALCULATION SAP Function module







ISP_ISSUE_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_ISSUE_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_ISSUE_WEIGHT_CALCULATION - ISP ISSUE WEIGHT CALCULATION





CALL FUNCTION 'ISP_ISSUE_WEIGHT_CALCULATION' "
  EXPORTING
*   issueweight_unit_i = ' '    " jdtvausgb-meinhgew
    nr_of_pages =               " jdtvausgb-anzseiten
*   outersheetweight = 0        " jdtvausgb-pagewmantl
*   outersheetweight_unit = ' '  " jdtvausgb-meinhpagmt
    sheetweight =               " jdtvausgb-papiergew
    sheetweight_unit =          " jdtvausgb-meinhpagew
  IMPORTING
    issueweight =               " jdtvausgb-vagewicht
    issueweight_unit_o =        " jdtvausgb-meinhgew
  EXCEPTIONS
    CONVERSION_NOT_FOUND = 1    "
    DIVISION_BY_ZERO = 2        "
    INVALID_DIMENSION = 3       "
    INVALID_NR_OF_PAGES = 4     "
    OVERFLOW = 5                "
    T006D_ENTRY_MISSING = 6     "
    T006_ENTRY_MISSING = 7      "
    .  "  ISP_ISSUE_WEIGHT_CALCULATION

ABAP code example for Function Module ISP_ISSUE_WEIGHT_CALCULATION





The ABAP code below is a full code listing to execute function module ISP_ISSUE_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_issueweight  TYPE JDTVAUSGB-VAGEWICHT ,
ld_issueweight_unit_o  TYPE JDTVAUSGB-MEINHGEW .


SELECT single MEINHGEW
FROM JDTVAUSGB
INTO @DATA(ld_issueweight_unit_i).


SELECT single ANZSEITEN
FROM JDTVAUSGB
INTO @DATA(ld_nr_of_pages).


SELECT single PAGEWMANTL
FROM JDTVAUSGB
INTO @DATA(ld_outersheetweight).


SELECT single MEINHPAGMT
FROM JDTVAUSGB
INTO @DATA(ld_outersheetweight_unit).


SELECT single PAPIERGEW
FROM JDTVAUSGB
INTO @DATA(ld_sheetweight).


SELECT single MEINHPAGEW
FROM JDTVAUSGB
INTO @DATA(ld_sheetweight_unit).
. CALL FUNCTION 'ISP_ISSUE_WEIGHT_CALCULATION' EXPORTING * issueweight_unit_i = ld_issueweight_unit_i nr_of_pages = ld_nr_of_pages * outersheetweight = ld_outersheetweight * outersheetweight_unit = ld_outersheetweight_unit sheetweight = ld_sheetweight sheetweight_unit = ld_sheetweight_unit IMPORTING issueweight = ld_issueweight issueweight_unit_o = ld_issueweight_unit_o EXCEPTIONS CONVERSION_NOT_FOUND = 1 DIVISION_BY_ZERO = 2 INVALID_DIMENSION = 3 INVALID_NR_OF_PAGES = 4 OVERFLOW = 5 T006D_ENTRY_MISSING = 6 T006_ENTRY_MISSING = 7 . " ISP_ISSUE_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 ELSEIF SY-SUBRC EQ 7. "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_issueweight  TYPE JDTVAUSGB-VAGEWICHT ,
ld_issueweight_unit_i  TYPE JDTVAUSGB-MEINHGEW ,
ld_issueweight_unit_o  TYPE JDTVAUSGB-MEINHGEW ,
ld_nr_of_pages  TYPE JDTVAUSGB-ANZSEITEN ,
ld_outersheetweight  TYPE JDTVAUSGB-PAGEWMANTL ,
ld_outersheetweight_unit  TYPE JDTVAUSGB-MEINHPAGMT ,
ld_sheetweight  TYPE JDTVAUSGB-PAPIERGEW ,
ld_sheetweight_unit  TYPE JDTVAUSGB-MEINHPAGEW .


SELECT single MEINHGEW
FROM JDTVAUSGB
INTO ld_issueweight_unit_i.


SELECT single ANZSEITEN
FROM JDTVAUSGB
INTO ld_nr_of_pages.


SELECT single PAGEWMANTL
FROM JDTVAUSGB
INTO ld_outersheetweight.


SELECT single MEINHPAGMT
FROM JDTVAUSGB
INTO ld_outersheetweight_unit.


SELECT single PAPIERGEW
FROM JDTVAUSGB
INTO ld_sheetweight.


SELECT single MEINHPAGEW
FROM JDTVAUSGB
INTO ld_sheetweight_unit.

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