SAP AIST_DERIVE_PRCTR_SEGMENT Function Module for
AIST_DERIVE_PRCTR_SEGMENT is a standard aist derive prctr segment SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 aist derive prctr segment FM, simply by entering the name AIST_DERIVE_PRCTR_SEGMENT into the relevant SAP transaction such as SE37 or SE38.
Function Group: AIST
Program Name: SAPLAIST
Main Program: SAPLAIST
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function AIST_DERIVE_PRCTR_SEGMENT 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 'AIST_DERIVE_PRCTR_SEGMENT'".
EXPORTING
I_BUKRS = "Company Code
* I_PS_PSP_PNR = "WBS Element of Investment Project
* I_XINVM = "
* I_ANLKL = "
* I_DATE = SY-DATUM "DATS Field Type
* I_PS_PSP_PNR2 = "WBS Element (Costs)
* I_CAUFN = "Internal Order
* I_IMKEY = "Internal Key for Real Estate Object
* I_KOSTL = "Cost Center
* I_SEGMENT = "Segment for Segmental Reporting
* I_PRCTR = "
* I_EAUFN = "Investment Order
IMPORTING
E_SEGMENT = "Segment for Segmental Reporting
E_PRCTR = "
EXCEPTIONS
PRCTR_NOT_UNIQUE = 1 SEGMENT_NOT_UNIQUE = 2 KOKRS_NOT_FOUND = 3
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLAIST_001 Exchange Number Range
EXIT_SAPLAIST_002 Transfer Data for User Subscreens
EXIT_SAPLAIST_003 Transfer of User-Defined Fields to SAP Master Data Transactions
IMPORTING Parameters details for AIST_DERIVE_PRCTR_SEGMENT
I_BUKRS - Company Code
Data type: BUKRSOptional: No
Call by Reference: Yes
I_PS_PSP_PNR - WBS Element of Investment Project
Data type: AM_POSNROptional: Yes
Call by Reference: Yes
I_XINVM -
Data type: IM_XINVMOptional: Yes
Call by Reference: Yes
I_ANLKL -
Data type: ANLKLOptional: Yes
Call by Reference: Yes
I_DATE - DATS Field Type
Data type: DATSDefault: SY-DATUM
Optional: Yes
Call by Reference: Yes
I_PS_PSP_PNR2 - WBS Element (Costs)
Data type: PS_PSP_PNR2Optional: Yes
Call by Reference: Yes
I_CAUFN - Internal Order
Data type: CAUFNOptional: Yes
Call by Reference: Yes
I_IMKEY - Internal Key for Real Estate Object
Data type: IMKEYOptional: Yes
Call by Reference: Yes
I_KOSTL - Cost Center
Data type: KOSTLOptional: Yes
Call by Reference: Yes
I_SEGMENT - Segment for Segmental Reporting
Data type: FB_SEGMENTOptional: Yes
Call by Reference: Yes
I_PRCTR -
Data type: PRCTROptional: Yes
Call by Reference: Yes
I_EAUFN - Investment Order
Data type: AM_AUFNROptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for AIST_DERIVE_PRCTR_SEGMENT
E_SEGMENT - Segment for Segmental Reporting
Data type: FB_SEGMENTOptional: No
Call by Reference: Yes
E_PRCTR -
Data type: PRCTROptional: No
Call by Reference: Yes
EXCEPTIONS details
PRCTR_NOT_UNIQUE -
Data type:Optional: No
Call by Reference: Yes
SEGMENT_NOT_UNIQUE -
Data type:Optional: No
Call by Reference: Yes
KOKRS_NOT_FOUND -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for AIST_DERIVE_PRCTR_SEGMENT 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_i_bukrs | TYPE BUKRS, " | |||
| lv_e_segment | TYPE FB_SEGMENT, " | |||
| lv_prctr_not_unique | TYPE FB_SEGMENT, " | |||
| lv_i_ps_psp_pnr | TYPE AM_POSNR, " | |||
| lv_i_xinvm | TYPE IM_XINVM, " | |||
| lv_i_anlkl | TYPE ANLKL, " | |||
| lv_i_date | TYPE DATS, " SY-DATUM | |||
| lv_e_prctr | TYPE PRCTR, " | |||
| lv_segment_not_unique | TYPE PRCTR, " | |||
| lv_i_ps_psp_pnr2 | TYPE PS_PSP_PNR2, " | |||
| lv_kokrs_not_found | TYPE PS_PSP_PNR2, " | |||
| lv_i_caufn | TYPE CAUFN, " | |||
| lv_i_imkey | TYPE IMKEY, " | |||
| lv_i_kostl | TYPE KOSTL, " | |||
| lv_i_segment | TYPE FB_SEGMENT, " | |||
| lv_i_prctr | TYPE PRCTR, " | |||
| lv_i_eaufn | TYPE AM_AUFNR. " |
|   CALL FUNCTION 'AIST_DERIVE_PRCTR_SEGMENT' " |
| EXPORTING | ||
| I_BUKRS | = lv_i_bukrs | |
| I_PS_PSP_PNR | = lv_i_ps_psp_pnr | |
| I_XINVM | = lv_i_xinvm | |
| I_ANLKL | = lv_i_anlkl | |
| I_DATE | = lv_i_date | |
| I_PS_PSP_PNR2 | = lv_i_ps_psp_pnr2 | |
| I_CAUFN | = lv_i_caufn | |
| I_IMKEY | = lv_i_imkey | |
| I_KOSTL | = lv_i_kostl | |
| I_SEGMENT | = lv_i_segment | |
| I_PRCTR | = lv_i_prctr | |
| I_EAUFN | = lv_i_eaufn | |
| IMPORTING | ||
| E_SEGMENT | = lv_e_segment | |
| E_PRCTR | = lv_e_prctr | |
| EXCEPTIONS | ||
| PRCTR_NOT_UNIQUE = 1 | ||
| SEGMENT_NOT_UNIQUE = 2 | ||
| KOKRS_NOT_FOUND = 3 | ||
| . " AIST_DERIVE_PRCTR_SEGMENT | ||
ABAP code using 7.40 inline data declarations to call FM AIST_DERIVE_PRCTR_SEGMENT
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_i_date) | = SY-DATUM. | |||
Search for further information about these or an SAP related objects