SAP /SAPAPO/DM_CHAR_MAINT_PRF_BC Function Module for Maintenance of Planning Product in Background
/SAPAPO/DM_CHAR_MAINT_PRF_BC is a standard /sapapo/dm char maint prf bc SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Maintenance of Planning Product in Background 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 /sapapo/dm char maint prf bc FM, simply by entering the name /SAPAPO/DM_CHAR_MAINT_PRF_BC into the relevant SAP transaction such as SE37 or SE38.
Function Group: /SAPAPO/DM_CHAR_DISPLAY
Program Name: /SAPAPO/SAPLDM_CHAR_DISPLAY
Main Program: /SAPAPO/SAPLDM_CHAR_DISPLAY
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function /SAPAPO/DM_CHAR_MAINT_PRF_BC 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 '/SAPAPO/DM_CHAR_MAINT_PRF_BC'"Maintenance of Planning Product in Background.
EXPORTING
I_PRODUCT = "Produktnummer
* I_PHPA = "internal table for assignement profil to planning area
* IV_COMMIT = 'X' "neue Eingabewerte
I_PROFTXT = "
* I_VISUD = "
* I_DELETE = "
* I_PLNTP = "
* I_PROFILID = "
* I_SAVE = "allgemeines Flag
* I_DATE = "Datum und Zeit, aktuelles (Applikationsserver-)Datum
* I_OBLIGY = "
IMPORTING
ET_PAREA = "Interne Tabelle für Zuordnung Profil zu Planungsbereich
TABLES
* I_VALUES = "
* ET_PROFIL = "Vorplanungsrelevanzheader
* ET_TBL_LINE = "Vorplanungrelevanzdaten
* ET_BAPIRET = "Returnparameter
EXCEPTIONS
MATERIAL_NOT_FOUND = 1 NO_RELEV_CHAR_VAL = 2 MATERIAL_BLOCKED = 3 SYSTEM_ERROR = 4 PROFILE_NOT_FOUND = 5 NO_UPDATE_POSSIBLE = 6 DOUBLE_CHARACTERISTIC = 7
IMPORTING Parameters details for /SAPAPO/DM_CHAR_MAINT_PRF_BC
I_PRODUCT - Produktnummer
Data type: /SAPAPO/MATKEY-MATNROptional: No
Call by Reference: No ( called with pass by value option)
I_PHPA - internal table for assignement profil to planning area
Data type: /SAPAPO/TBL_PHPAOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_COMMIT - neue Eingabewerte
Data type: /SAPAPO/XFLAGDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_PROFTXT -
Data type: /SAPAPO/PHVP-PROFTXTOptional: No
Call by Reference: No ( called with pass by value option)
I_VISUD -
Data type: /SAPAPO/PHVP-VISUDOptional: Yes
Call by Reference: No ( called with pass by value option)
I_DELETE -
Data type: /SAPAPO/DMDISC-UPDKZOptional: Yes
Call by Reference: No ( called with pass by value option)
I_PLNTP -
Data type: /SAPAPO/PHVP-PLNTPOptional: Yes
Call by Reference: No ( called with pass by value option)
I_PROFILID -
Data type: /SAPAPO/PHVP-PROFILIDOptional: Yes
Call by Reference: No ( called with pass by value option)
I_SAVE - allgemeines Flag
Data type: /SAPAPO/FLAGOptional: Yes
Call by Reference: No ( called with pass by value option)
I_DATE - Datum und Zeit, aktuelles (Applikationsserver-)Datum
Data type: SY-DATUMOptional: Yes
Call by Reference: No ( called with pass by value option)
I_OBLIGY -
Data type: /SAPAPO/TBL_PVVPOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for /SAPAPO/DM_CHAR_MAINT_PRF_BC
ET_PAREA - Interne Tabelle für Zuordnung Profil zu Planungsbereich
Data type: /SAPAPO/TBL_PHPAOptional: No
Call by Reference: Yes
TABLES Parameters details for /SAPAPO/DM_CHAR_MAINT_PRF_BC
I_VALUES -
Data type: /SAPAPO/DMDISDRLOptional: Yes
Call by Reference: Yes
ET_PROFIL - Vorplanungsrelevanzheader
Data type: /SAPAPO/DMDISPHVPOptional: Yes
Call by Reference: Yes
ET_TBL_LINE - Vorplanungrelevanzdaten
Data type: /SAPAPO/DMDISPLVPOptional: Yes
Call by Reference: Yes
ET_BAPIRET - Returnparameter
Data type: /SAPAPO/BAPIRET2Optional: Yes
Call by Reference: Yes
EXCEPTIONS details
MATERIAL_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_RELEV_CHAR_VAL -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
MATERIAL_BLOCKED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SYSTEM_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PROFILE_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_UPDATE_POSSIBLE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
DOUBLE_CHARACTERISTIC -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for /SAPAPO/DM_CHAR_MAINT_PRF_BC 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_et_parea | TYPE /SAPAPO/TBL_PHPA, " | |||
| lt_i_values | TYPE STANDARD TABLE OF /SAPAPO/DMDISDRL, " | |||
| lv_i_product | TYPE /SAPAPO/MATKEY-MATNR, " | |||
| lv_material_not_found | TYPE /SAPAPO/MATKEY, " | |||
| lv_i_phpa | TYPE /SAPAPO/TBL_PHPA, " | |||
| lv_iv_commit | TYPE /SAPAPO/XFLAG, " 'X' | |||
| lt_et_profil | TYPE STANDARD TABLE OF /SAPAPO/DMDISPHVP, " | |||
| lv_i_proftxt | TYPE /SAPAPO/PHVP-PROFTXT, " | |||
| lv_no_relev_char_val | TYPE /SAPAPO/PHVP, " | |||
| lv_i_visud | TYPE /SAPAPO/PHVP-VISUD, " | |||
| lt_et_tbl_line | TYPE STANDARD TABLE OF /SAPAPO/DMDISPLVP, " | |||
| lv_material_blocked | TYPE /SAPAPO/DMDISPLVP, " | |||
| lv_i_delete | TYPE /SAPAPO/DMDISC-UPDKZ, " | |||
| lt_et_bapiret | TYPE STANDARD TABLE OF /SAPAPO/BAPIRET2, " | |||
| lv_system_error | TYPE /SAPAPO/BAPIRET2, " | |||
| lv_i_plntp | TYPE /SAPAPO/PHVP-PLNTP, " | |||
| lv_profile_not_found | TYPE /SAPAPO/PHVP, " | |||
| lv_i_profilid | TYPE /SAPAPO/PHVP-PROFILID, " | |||
| lv_no_update_possible | TYPE /SAPAPO/PHVP, " | |||
| lv_i_save | TYPE /SAPAPO/FLAG, " | |||
| lv_double_characteristic | TYPE /SAPAPO/FLAG, " | |||
| lv_i_date | TYPE SY-DATUM, " | |||
| lv_i_obligy | TYPE /SAPAPO/TBL_PVVP. " |
|   CALL FUNCTION '/SAPAPO/DM_CHAR_MAINT_PRF_BC' "Maintenance of Planning Product in Background |
| EXPORTING | ||
| I_PRODUCT | = lv_i_product | |
| I_PHPA | = lv_i_phpa | |
| IV_COMMIT | = lv_iv_commit | |
| I_PROFTXT | = lv_i_proftxt | |
| I_VISUD | = lv_i_visud | |
| I_DELETE | = lv_i_delete | |
| I_PLNTP | = lv_i_plntp | |
| I_PROFILID | = lv_i_profilid | |
| I_SAVE | = lv_i_save | |
| I_DATE | = lv_i_date | |
| I_OBLIGY | = lv_i_obligy | |
| IMPORTING | ||
| ET_PAREA | = lv_et_parea | |
| TABLES | ||
| I_VALUES | = lt_i_values | |
| ET_PROFIL | = lt_et_profil | |
| ET_TBL_LINE | = lt_et_tbl_line | |
| ET_BAPIRET | = lt_et_bapiret | |
| EXCEPTIONS | ||
| MATERIAL_NOT_FOUND = 1 | ||
| NO_RELEV_CHAR_VAL = 2 | ||
| MATERIAL_BLOCKED = 3 | ||
| SYSTEM_ERROR = 4 | ||
| PROFILE_NOT_FOUND = 5 | ||
| NO_UPDATE_POSSIBLE = 6 | ||
| DOUBLE_CHARACTERISTIC = 7 | ||
| . " /SAPAPO/DM_CHAR_MAINT_PRF_BC | ||
ABAP code using 7.40 inline data declarations to call FM /SAPAPO/DM_CHAR_MAINT_PRF_BC
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 MATNR FROM /SAPAPO/MATKEY INTO @DATA(ld_i_product). | ||||
| DATA(ld_iv_commit) | = 'X'. | |||
| "SELECT single PROFTXT FROM /SAPAPO/PHVP INTO @DATA(ld_i_proftxt). | ||||
| "SELECT single VISUD FROM /SAPAPO/PHVP INTO @DATA(ld_i_visud). | ||||
| "SELECT single UPDKZ FROM /SAPAPO/DMDISC INTO @DATA(ld_i_delete). | ||||
| "SELECT single PLNTP FROM /SAPAPO/PHVP INTO @DATA(ld_i_plntp). | ||||
| "SELECT single PROFILID FROM /SAPAPO/PHVP INTO @DATA(ld_i_profilid). | ||||
| "SELECT single DATUM FROM SY INTO @DATA(ld_i_date). | ||||
Search for further information about these or an SAP related objects