SAP PK_REPLENISHMENT_REVERSAL Function Module for NOTRANSL: Löschen eines KANBAN Nachschubelementes (Dialog)
PK_REPLENISHMENT_REVERSAL is a standard pk replenishment reversal SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Löschen eines KANBAN Nachschubelementes (Dialog) processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for pk replenishment reversal FM, simply by entering the name PK_REPLENISHMENT_REVERSAL into the relevant SAP transaction such as SE37 or SE38.
Function Group: MPKS
Program Name: SAPLMPKS
Main Program: SAPLMPKS
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function PK_REPLENISHMENT_REVERSAL pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'PK_REPLENISHMENT_REVERSAL'"NOTRANSL: Löschen eines KANBAN Nachschubelementes (Dialog).
EXPORTING
* POST_DIALOG = ' ' "Checkbox
* POST_ON_COMMIT = ' ' "Checkbox
* AUFNR = ' ' "Order Number
* PLNUM = ' ' "Planned order number
* RSNUM = ' ' "Number of Reservation/Dependent Requirement
* EBELN = ' ' "Purchasing Document Number
* EBELP = ' ' "Item Number of Purchasing Document
* LGNUM = ' ' "Warehouse Number / Warehouse Complex
* TBNUM = ' ' "Transfer Requirement Number
EXCEPTIONS
NO_KANBAN = 1 SEE_MESSAGE = 2
IMPORTING Parameters details for PK_REPLENISHMENT_REVERSAL
POST_DIALOG - Checkbox
Data type: AFPKB-FLG01Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
POST_ON_COMMIT - Checkbox
Data type: AFPKB-FLG01Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
AUFNR - Order Number
Data type: AFPO-AUFNRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PLNUM - Planned order number
Data type: PLAF-PLNUMDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
RSNUM - Number of Reservation/Dependent Requirement
Data type: RESB-RSNUMDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EBELN - Purchasing Document Number
Data type: EKPO-EBELNDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EBELP - Item Number of Purchasing Document
Data type: EKPO-EBELPDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
LGNUM - Warehouse Number / Warehouse Complex
Data type: PKHD-LGNUMDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TBNUM - Transfer Requirement Number
Data type: LTBK-TBNUMDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_KANBAN -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SEE_MESSAGE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for PK_REPLENISHMENT_REVERSAL Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_no_kanban | TYPE STRING, " | |||
| lv_post_dialog | TYPE AFPKB-FLG01, " SPACE | |||
| lv_see_message | TYPE AFPKB, " | |||
| lv_post_on_commit | TYPE AFPKB-FLG01, " SPACE | |||
| lv_aufnr | TYPE AFPO-AUFNR, " SPACE | |||
| lv_plnum | TYPE PLAF-PLNUM, " SPACE | |||
| lv_rsnum | TYPE RESB-RSNUM, " SPACE | |||
| lv_ebeln | TYPE EKPO-EBELN, " SPACE | |||
| lv_ebelp | TYPE EKPO-EBELP, " SPACE | |||
| lv_lgnum | TYPE PKHD-LGNUM, " SPACE | |||
| lv_tbnum | TYPE LTBK-TBNUM. " SPACE |
|   CALL FUNCTION 'PK_REPLENISHMENT_REVERSAL' "NOTRANSL: Löschen eines KANBAN Nachschubelementes (Dialog) |
| EXPORTING | ||
| POST_DIALOG | = lv_post_dialog | |
| POST_ON_COMMIT | = lv_post_on_commit | |
| AUFNR | = lv_aufnr | |
| PLNUM | = lv_plnum | |
| RSNUM | = lv_rsnum | |
| EBELN | = lv_ebeln | |
| EBELP | = lv_ebelp | |
| LGNUM | = lv_lgnum | |
| TBNUM | = lv_tbnum | |
| EXCEPTIONS | ||
| NO_KANBAN = 1 | ||
| SEE_MESSAGE = 2 | ||
| . " PK_REPLENISHMENT_REVERSAL | ||
ABAP code using 7.40 inline data declarations to call FM PK_REPLENISHMENT_REVERSAL
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.| "SELECT single FLG01 FROM AFPKB INTO @DATA(ld_post_dialog). | ||||
| DATA(ld_post_dialog) | = ' '. | |||
| "SELECT single FLG01 FROM AFPKB INTO @DATA(ld_post_on_commit). | ||||
| DATA(ld_post_on_commit) | = ' '. | |||
| "SELECT single AUFNR FROM AFPO INTO @DATA(ld_aufnr). | ||||
| DATA(ld_aufnr) | = ' '. | |||
| "SELECT single PLNUM FROM PLAF INTO @DATA(ld_plnum). | ||||
| DATA(ld_plnum) | = ' '. | |||
| "SELECT single RSNUM FROM RESB INTO @DATA(ld_rsnum). | ||||
| DATA(ld_rsnum) | = ' '. | |||
| "SELECT single EBELN FROM EKPO INTO @DATA(ld_ebeln). | ||||
| DATA(ld_ebeln) | = ' '. | |||
| "SELECT single EBELP FROM EKPO INTO @DATA(ld_ebelp). | ||||
| DATA(ld_ebelp) | = ' '. | |||
| "SELECT single LGNUM FROM PKHD INTO @DATA(ld_lgnum). | ||||
| DATA(ld_lgnum) | = ' '. | |||
| "SELECT single TBNUM FROM LTBK INTO @DATA(ld_tbnum). | ||||
| DATA(ld_tbnum) | = ' '. | |||
Search for further information about these or an SAP related objects