SAP /SAPAPO/DM_CHAR_COPY_PROFIL2 Function Module for Determine Forecasting Profile
/SAPAPO/DM_CHAR_COPY_PROFIL2 is a standard /sapapo/dm char copy profil2 SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Determine Forecasting Profile 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 copy profil2 FM, simply by entering the name /SAPAPO/DM_CHAR_COPY_PROFIL2 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: D
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function /SAPAPO/DM_CHAR_COPY_PROFIL2 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_COPY_PROFIL2'"Determine Forecasting Profile.
EXPORTING
OBJEKT = "
* PROFILID = "
* PROFTXT = "
* CUBE = "Externe Bezeichnung für den S&D Planungsbereich
* BUFFER_FREE = "
* KEY_DATE = SY-DATUM "
* I_PL_REL = 'X' "
* VISUD = "
IMPORTING
EXP_VALUES = "
EXCEPTIONS
NOT_FOUND = 1
IMPORTING Parameters details for /SAPAPO/DM_CHAR_COPY_PROFIL2
OBJEKT -
Data type: INOB-OBJEKOptional: No
Call by Reference: Yes
PROFILID -
Data type: /SAPAPO/PHVP-PROFILIDOptional: Yes
Call by Reference: Yes
PROFTXT -
Data type: /SAPAPO/PHVP-PROFTXTOptional: Yes
Call by Reference: Yes
CUBE - Externe Bezeichnung für den S&D Planungsbereich
Data type: /SAPAPO/PHPA-PAREAIDOptional: Yes
Call by Reference: Yes
BUFFER_FREE -
Data type:Optional: Yes
Call by Reference: Yes
KEY_DATE -
Data type: SY-DATUMDefault: SY-DATUM
Optional: Yes
Call by Reference: Yes
I_PL_REL -
Data type: /SAPAPO/PSVP-PL_RELDefault: 'X'
Optional: Yes
Call by Reference: Yes
VISUD -
Data type: /SAPAPO/PHVP-VISUDOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for /SAPAPO/DM_CHAR_COPY_PROFIL2
EXP_VALUES -
Data type: A60VT_PROFILOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for /SAPAPO/DM_CHAR_COPY_PROFIL2 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_objekt | TYPE INOB-OBJEK, " | |||
| lv_not_found | TYPE INOB, " | |||
| lv_exp_values | TYPE A60VT_PROFIL, " | |||
| lv_profilid | TYPE /SAPAPO/PHVP-PROFILID, " | |||
| lv_proftxt | TYPE /SAPAPO/PHVP-PROFTXT, " | |||
| lv_cube | TYPE /SAPAPO/PHPA-PAREAID, " | |||
| lv_buffer_free | TYPE /SAPAPO/PHPA, " | |||
| lv_key_date | TYPE SY-DATUM, " SY-DATUM | |||
| lv_i_pl_rel | TYPE /SAPAPO/PSVP-PL_REL, " 'X' | |||
| lv_visud | TYPE /SAPAPO/PHVP-VISUD. " |
|   CALL FUNCTION '/SAPAPO/DM_CHAR_COPY_PROFIL2' "Determine Forecasting Profile |
| EXPORTING | ||
| OBJEKT | = lv_objekt | |
| PROFILID | = lv_profilid | |
| PROFTXT | = lv_proftxt | |
| CUBE | = lv_cube | |
| BUFFER_FREE | = lv_buffer_free | |
| KEY_DATE | = lv_key_date | |
| I_PL_REL | = lv_i_pl_rel | |
| VISUD | = lv_visud | |
| IMPORTING | ||
| EXP_VALUES | = lv_exp_values | |
| EXCEPTIONS | ||
| NOT_FOUND = 1 | ||
| . " /SAPAPO/DM_CHAR_COPY_PROFIL2 | ||
ABAP code using 7.40 inline data declarations to call FM /SAPAPO/DM_CHAR_COPY_PROFIL2
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 OBJEK FROM INOB INTO @DATA(ld_objekt). | ||||
| "SELECT single PROFILID FROM /SAPAPO/PHVP INTO @DATA(ld_profilid). | ||||
| "SELECT single PROFTXT FROM /SAPAPO/PHVP INTO @DATA(ld_proftxt). | ||||
| "SELECT single PAREAID FROM /SAPAPO/PHPA INTO @DATA(ld_cube). | ||||
| "SELECT single DATUM FROM SY INTO @DATA(ld_key_date). | ||||
| DATA(ld_key_date) | = SY-DATUM. | |||
| "SELECT single PL_REL FROM /SAPAPO/PSVP INTO @DATA(ld_i_pl_rel). | ||||
| DATA(ld_i_pl_rel) | = 'X'. | |||
| "SELECT single VISUD FROM /SAPAPO/PHVP INTO @DATA(ld_visud). | ||||
Search for further information about these or an SAP related objects