SAP /SAPAPO/DM_TPSRC_INSERT_POST Function Module for Update (Create) External Procurement Relationships via CIF and BAPI
/SAPAPO/DM_TPSRC_INSERT_POST is a standard /sapapo/dm tpsrc insert post SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Update (Create) External Procurement Relationships via CIF and BAPI 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 tpsrc insert post FM, simply by entering the name /SAPAPO/DM_TPSRC_INSERT_POST into the relevant SAP transaction such as SE37 or SE38.
Function Group: /SAPAPO/MAINTAIN_TPSRC
Program Name: /SAPAPO/SAPLMAINTAIN_TPSRC
Main Program: /SAPAPO/SAPLMAINTAIN_TPSRC
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update: 1

Function /SAPAPO/DM_TPSRC_INSERT_POST 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_TPSRC_INSERT_POST'"Update (Create) External Procurement Relationships via CIF and BAPI.
EXPORTING
* IV_CONSIDER_X = ' ' "Feld zum Ankreuzen
* IV_NO_UPDATE_MODEL = "Checkbox field
* IV_IGNORE_MRP_AREAS = "Feld zum Ankreuzen
* IV_PARALLEL_PROCESS = "Feld zum Ankreuzen
TABLES
IT_TPSRC_INS = "Neue anzulegende Fremdbeschaffungsbeziehungen
* ET_RETURN = "Returnparameter
IT_TPSRC_INS_X = "Inboundstruktur für Bezugsquelle
* IT_TPSRC_TD_INS = "Bewegungsdaten zu Fremdbeschaffungsbeziehungen
* IT_TRPROD = "Übertragungsstruktur für Transportbeziehungen
* IT_SCALES_INS = "Preisinformationen zur Bezugsquelle
* IT_SRC_CUS = "Kundenerweiterungsstruktur zu /SAPAPO/CIF_TPSRC/Kontrakt
* IT_SRD_CUS = "Kundenerweiterungsstruktur zu /SAPAPO/CIF_TPSRC/Lieferplan
* IT_SRI_CUS = "Kundenerweiterungsstruktur zu /SAPAPO/CIF_TPSRC/Infosatz
* IT_TRPROD_PDS = "
IMPORTING Parameters details for /SAPAPO/DM_TPSRC_INSERT_POST
IV_CONSIDER_X - Feld zum Ankreuzen
Data type: /SAPAPO/XFELDDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_NO_UPDATE_MODEL - Checkbox field
Data type: XFELDOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_IGNORE_MRP_AREAS - Feld zum Ankreuzen
Data type: XFELDOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_PARALLEL_PROCESS - Feld zum Ankreuzen
Data type: XFELDOptional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for /SAPAPO/DM_TPSRC_INSERT_POST
IT_TPSRC_INS - Neue anzulegende Fremdbeschaffungsbeziehungen
Data type: /SAPAPO/MTN_TPSRCOptional: No
Call by Reference: Yes
ET_RETURN - Returnparameter
Data type: BAPIRET2Optional: Yes
Call by Reference: Yes
IT_TPSRC_INS_X - Inboundstruktur für Bezugsquelle
Data type: /SAPAPO/MTN_TPSRCXOptional: No
Call by Reference: Yes
IT_TPSRC_TD_INS - Bewegungsdaten zu Fremdbeschaffungsbeziehungen
Data type: /SAPAPO/TPSRC_TDOptional: Yes
Call by Reference: Yes
IT_TRPROD - Übertragungsstruktur für Transportbeziehungen
Data type: /SAPAPO/CIFTRPRODOptional: Yes
Call by Reference: Yes
IT_SCALES_INS - Preisinformationen zur Bezugsquelle
Data type: /SAPAPO/SNP_SCALESOptional: Yes
Call by Reference: Yes
IT_SRC_CUS - Kundenerweiterungsstruktur zu /SAPAPO/CIF_TPSRC/Kontrakt
Data type: /SAPAPO/CIFSRCCUSOptional: Yes
Call by Reference: Yes
IT_SRD_CUS - Kundenerweiterungsstruktur zu /SAPAPO/CIF_TPSRC/Lieferplan
Data type: /SAPAPO/CIFSRDCUSOptional: Yes
Call by Reference: Yes
IT_SRI_CUS - Kundenerweiterungsstruktur zu /SAPAPO/CIF_TPSRC/Infosatz
Data type: /SAPAPO/MTNSRICUSOptional: Yes
Call by Reference: Yes
IT_TRPROD_PDS -
Data type: /SAPAPO/S_TRPROD_CHGOptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for /SAPAPO/DM_TPSRC_INSERT_POST 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: | ||||
| lt_it_tpsrc_ins | TYPE STANDARD TABLE OF /SAPAPO/MTN_TPSRC, " | |||
| lv_iv_consider_x | TYPE /SAPAPO/XFELD, " ' ' | |||
| lt_et_return | TYPE STANDARD TABLE OF BAPIRET2, " | |||
| lt_it_tpsrc_ins_x | TYPE STANDARD TABLE OF /SAPAPO/MTN_TPSRCX, " | |||
| lv_iv_no_update_model | TYPE XFELD, " | |||
| lt_it_tpsrc_td_ins | TYPE STANDARD TABLE OF /SAPAPO/TPSRC_TD, " | |||
| lv_iv_ignore_mrp_areas | TYPE XFELD, " | |||
| lt_it_trprod | TYPE STANDARD TABLE OF /SAPAPO/CIFTRPROD, " | |||
| lv_iv_parallel_process | TYPE XFELD, " | |||
| lt_it_scales_ins | TYPE STANDARD TABLE OF /SAPAPO/SNP_SCALES, " | |||
| lt_it_src_cus | TYPE STANDARD TABLE OF /SAPAPO/CIFSRCCUS, " | |||
| lt_it_srd_cus | TYPE STANDARD TABLE OF /SAPAPO/CIFSRDCUS, " | |||
| lt_it_sri_cus | TYPE STANDARD TABLE OF /SAPAPO/MTNSRICUS, " | |||
| lt_it_trprod_pds | TYPE STANDARD TABLE OF /SAPAPO/S_TRPROD_CHG. " |
|   CALL FUNCTION '/SAPAPO/DM_TPSRC_INSERT_POST' "Update (Create) External Procurement Relationships via CIF and BAPI |
| EXPORTING | ||
| IV_CONSIDER_X | = lv_iv_consider_x | |
| IV_NO_UPDATE_MODEL | = lv_iv_no_update_model | |
| IV_IGNORE_MRP_AREAS | = lv_iv_ignore_mrp_areas | |
| IV_PARALLEL_PROCESS | = lv_iv_parallel_process | |
| TABLES | ||
| IT_TPSRC_INS | = lt_it_tpsrc_ins | |
| ET_RETURN | = lt_et_return | |
| IT_TPSRC_INS_X | = lt_it_tpsrc_ins_x | |
| IT_TPSRC_TD_INS | = lt_it_tpsrc_td_ins | |
| IT_TRPROD | = lt_it_trprod | |
| IT_SCALES_INS | = lt_it_scales_ins | |
| IT_SRC_CUS | = lt_it_src_cus | |
| IT_SRD_CUS | = lt_it_srd_cus | |
| IT_SRI_CUS | = lt_it_sri_cus | |
| IT_TRPROD_PDS | = lt_it_trprod_pds | |
| . " /SAPAPO/DM_TPSRC_INSERT_POST | ||
ABAP code using 7.40 inline data declarations to call FM /SAPAPO/DM_TPSRC_INSERT_POST
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.| DATA(ld_iv_consider_x) | = ' '. | |||
Search for further information about these or an SAP related objects