SAP CP_DI_ALT_INSERT Function Module for NOTRANSL: Neue Alternative in Beleg- und Dialogtabelle aufnehmen









CP_DI_ALT_INSERT is a standard cp di alt insert 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: Neue Alternative in Beleg- und Dialogtabelle aufnehmen 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 cp di alt insert FM, simply by entering the name CP_DI_ALT_INSERT into the relevant SAP transaction such as SE37 or SE38.

Function Group: CP04
Program Name: SAPLCP04
Main Program: SAPLCP04
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function CP_DI_ALT_INSERT 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 'CP_DI_ALT_INSERT'"NOTRANSL: Neue Alternative in Beleg- und Dialogtabelle aufnehmen
EXPORTING
AENNR = "Change number
* TPLKNZ = ' ' "
* TPLNR = ' ' "
* WERKS = ' ' "Plant
* VBELN = ' ' "
* POSNR = ' ' "
* PSPNR = ' ' "
EQUKZ = "Equipment indicator
* EQUNR = ' ' "Equipment number
* FLG_SEQ_APP = 'X' "Create automatically master sequen
* IWERK = ' ' "Planning plant
MATKZ = "Material indicator
* MATNR = ' ' "Material number
PLKOD_INS = "Header data (I/O structure)
STTAG = "Key date to which the data record

IMPORTING
INDEX_EAPL = "Index on equipment header assignme
INDEX_MAPL = "Index on material header assignmen
INDEX_PLFL = "Index on subsequent document table
INDEX_PLKO = "Index on header document table
INDEX_TAPL = "
.



IMPORTING Parameters details for CP_DI_ALT_INSERT

AENNR - Change number

Data type: PLKO-AENNR
Optional: No
Call by Reference: No ( called with pass by value option)

TPLKNZ -

Data type: TCA01-FLG_IFL
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

TPLNR -

Data type: TAPL-TPLNR
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

WERKS - Plant

Data type: MAPL-WERKS
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

VBELN -

Data type: RC271-VBELN
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

POSNR -

Data type: RC271-POSNR
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

PSPNR -

Data type: RC271-PSPNR
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EQUKZ - Equipment indicator

Data type: TCA01-FLG_EQUI
Optional: No
Call by Reference: No ( called with pass by value option)

EQUNR - Equipment number

Data type: EAPL-EQUNR
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

FLG_SEQ_APP - Create automatically master sequen

Data type:
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

IWERK - Planning plant

Data type: EAPL-IWERK
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

MATKZ - Material indicator

Data type: TCA01-MATKZ
Optional: No
Call by Reference: No ( called with pass by value option)

MATNR - Material number

Data type: MAPL-MATNR
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

PLKOD_INS - Header data (I/O structure)

Data type: PLKOD
Optional: No
Call by Reference: No ( called with pass by value option)

STTAG - Key date to which the data record

Data type: PLKO-DATUV
Optional: No
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for CP_DI_ALT_INSERT

INDEX_EAPL - Index on equipment header assignme

Data type: SY-TABIX
Optional: No
Call by Reference: No ( called with pass by value option)

INDEX_MAPL - Index on material header assignmen

Data type: SY-TABIX
Optional: No
Call by Reference: No ( called with pass by value option)

INDEX_PLFL - Index on subsequent document table

Data type: SY-TABIX
Optional: No
Call by Reference: No ( called with pass by value option)

INDEX_PLKO - Index on header document table

Data type: SY-TABIX
Optional: No
Call by Reference: No ( called with pass by value option)

INDEX_TAPL -

Data type: SY-TABIX
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for CP_DI_ALT_INSERT 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_aennr  TYPE PLKO-AENNR, "   
lv_index_eapl  TYPE SY-TABIX, "   
lv_tplknz  TYPE TCA01-FLG_IFL, "   SPACE
lv_tplnr  TYPE TAPL-TPLNR, "   SPACE
lv_werks  TYPE MAPL-WERKS, "   SPACE
lv_vbeln  TYPE RC271-VBELN, "   SPACE
lv_posnr  TYPE RC271-POSNR, "   SPACE
lv_pspnr  TYPE RC271-PSPNR, "   SPACE
lv_equkz  TYPE TCA01-FLG_EQUI, "   
lv_index_mapl  TYPE SY-TABIX, "   
lv_equnr  TYPE EAPL-EQUNR, "   SPACE
lv_index_plfl  TYPE SY-TABIX, "   
lv_index_plko  TYPE SY-TABIX, "   
lv_flg_seq_app  TYPE SY, "   'X'
lv_iwerk  TYPE EAPL-IWERK, "   SPACE
lv_index_tapl  TYPE SY-TABIX, "   
lv_matkz  TYPE TCA01-MATKZ, "   
lv_matnr  TYPE MAPL-MATNR, "   SPACE
lv_plkod_ins  TYPE PLKOD, "   
lv_sttag  TYPE PLKO-DATUV. "   

  CALL FUNCTION 'CP_DI_ALT_INSERT'  "NOTRANSL: Neue Alternative in Beleg- und Dialogtabelle aufnehmen
    EXPORTING
         AENNR = lv_aennr
         TPLKNZ = lv_tplknz
         TPLNR = lv_tplnr
         WERKS = lv_werks
         VBELN = lv_vbeln
         POSNR = lv_posnr
         PSPNR = lv_pspnr
         EQUKZ = lv_equkz
         EQUNR = lv_equnr
         FLG_SEQ_APP = lv_flg_seq_app
         IWERK = lv_iwerk
         MATKZ = lv_matkz
         MATNR = lv_matnr
         PLKOD_INS = lv_plkod_ins
         STTAG = lv_sttag
    IMPORTING
         INDEX_EAPL = lv_index_eapl
         INDEX_MAPL = lv_index_mapl
         INDEX_PLFL = lv_index_plfl
         INDEX_PLKO = lv_index_plko
         INDEX_TAPL = lv_index_tapl
. " CP_DI_ALT_INSERT




ABAP code using 7.40 inline data declarations to call FM CP_DI_ALT_INSERT

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 AENNR FROM PLKO INTO @DATA(ld_aennr).
 
"SELECT single TABIX FROM SY INTO @DATA(ld_index_eapl).
 
"SELECT single FLG_IFL FROM TCA01 INTO @DATA(ld_tplknz).
DATA(ld_tplknz) = ' '.
 
"SELECT single TPLNR FROM TAPL INTO @DATA(ld_tplnr).
DATA(ld_tplnr) = ' '.
 
"SELECT single WERKS FROM MAPL INTO @DATA(ld_werks).
DATA(ld_werks) = ' '.
 
"SELECT single VBELN FROM RC271 INTO @DATA(ld_vbeln).
DATA(ld_vbeln) = ' '.
 
"SELECT single POSNR FROM RC271 INTO @DATA(ld_posnr).
DATA(ld_posnr) = ' '.
 
"SELECT single PSPNR FROM RC271 INTO @DATA(ld_pspnr).
DATA(ld_pspnr) = ' '.
 
"SELECT single FLG_EQUI FROM TCA01 INTO @DATA(ld_equkz).
 
"SELECT single TABIX FROM SY INTO @DATA(ld_index_mapl).
 
"SELECT single EQUNR FROM EAPL INTO @DATA(ld_equnr).
DATA(ld_equnr) = ' '.
 
"SELECT single TABIX FROM SY INTO @DATA(ld_index_plfl).
 
"SELECT single TABIX FROM SY INTO @DATA(ld_index_plko).
 
DATA(ld_flg_seq_app) = 'X'.
 
"SELECT single IWERK FROM EAPL INTO @DATA(ld_iwerk).
DATA(ld_iwerk) = ' '.
 
"SELECT single TABIX FROM SY INTO @DATA(ld_index_tapl).
 
"SELECT single MATKZ FROM TCA01 INTO @DATA(ld_matkz).
 
"SELECT single MATNR FROM MAPL INTO @DATA(ld_matnr).
DATA(ld_matnr) = ' '.
 
 
"SELECT single DATUV FROM PLKO INTO @DATA(ld_sttag).
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!