SAP Function Modules

PK_CONSIDER_PACKINSTR_SUMJIT SAP Function module







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

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


Pattern for FM PK_CONSIDER_PACKINSTR_SUMJIT - PK CONSIDER PACKINSTR SUMJIT





CALL FUNCTION 'PK_CONSIDER_PACKINSTR_SUMJIT' "
  EXPORTING
    packv_iv =                  " pkhd-packv    Unique Internal Packing Object Number
  IMPORTING
    pibasedata_es =             " pibasedata    Basis data for a packing instruction
    behmg_ev =                  " pkhd-behmg    Quantity
    anzlt_ev =                  " pkhd-anzlt    No. of Load Carriers
    txbeh_ev =                  " rmpkr-txbeh   Material Description
    extpackv_ev =               " rmpkr-packv   Packing Instruction Identification Number
  CHANGING
    pkbht_cv =                  " pkhd-pkbht    Load Carrier
  EXCEPTIONS
    PI_NOT_FOUND = 1            "               Packing instruction not found
    PI_DELETED = 2              "
    .  "  PK_CONSIDER_PACKINSTR_SUMJIT

ABAP code example for Function Module PK_CONSIDER_PACKINSTR_SUMJIT





The ABAP code below is a full code listing to execute function module PK_CONSIDER_PACKINSTR_SUMJIT 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_pibasedata_es  TYPE PIBASEDATA ,
ld_behmg_ev  TYPE PKHD-BEHMG ,
ld_anzlt_ev  TYPE PKHD-ANZLT ,
ld_txbeh_ev  TYPE RMPKR-TXBEH ,
ld_extpackv_ev  TYPE RMPKR-PACKV .


SELECT single PKBHT
FROM PKHD
INTO @DATA(ld_pkbht_cv).


SELECT single PACKV
FROM PKHD
INTO @DATA(ld_packv_iv).
. CALL FUNCTION 'PK_CONSIDER_PACKINSTR_SUMJIT' EXPORTING packv_iv = ld_packv_iv IMPORTING pibasedata_es = ld_pibasedata_es behmg_ev = ld_behmg_ev anzlt_ev = ld_anzlt_ev txbeh_ev = ld_txbeh_ev extpackv_ev = ld_extpackv_ev CHANGING pkbht_cv = ld_pkbht_cv EXCEPTIONS PI_NOT_FOUND = 1 PI_DELETED = 2 . " PK_CONSIDER_PACKINSTR_SUMJIT
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 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_pkbht_cv  TYPE PKHD-PKBHT ,
ld_pibasedata_es  TYPE PIBASEDATA ,
ld_packv_iv  TYPE PKHD-PACKV ,
ld_behmg_ev  TYPE PKHD-BEHMG ,
ld_anzlt_ev  TYPE PKHD-ANZLT ,
ld_txbeh_ev  TYPE RMPKR-TXBEH ,
ld_extpackv_ev  TYPE RMPKR-PACKV .


SELECT single PKBHT
FROM PKHD
INTO ld_pkbht_cv.


SELECT single PACKV
FROM PKHD
INTO ld_packv_iv.

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