SAP BAPI_CTRACPSOBJECT_GETLIST Function Module for PSCD: Read BAPI Contract Object List
BAPI_CTRACPSOBJECT_GETLIST is a standard bapi ctracpsobject getlist SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for PSCD: Read BAPI Contract Object List 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 bapi ctracpsobject getlist FM, simply by entering the name BAPI_CTRACPSOBJECT_GETLIST into the relevant SAP transaction such as SE37 or SE38.
Function Group: FMCA_PSOB_BOR1
Program Name: SAPLFMCA_PSOB_BOR1
Main Program: SAPLFMCA_PSOB_BOR1
Appliation area:
Release date: 26-Nov-2001
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BAPI_CTRACPSOBJECT_GETLIST 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 'BAPI_CTRACPSOBJECT_GETLIST'"PSCD: Read BAPI Contract Object List.
EXPORTING
* MAXROWS = 50 "Maximum Number of Lines of Hits
* XACCOUNTINGDATA = ' ' "Output Business Partner/Contract Account Reference
* XOBSOLETE = ' ' "Read Obsolete Contract Account Data Also?
* XBLOCKWISE = ' ' "Read Contract Objects by Block
* PSOBJECTKEY_LAST = "Last Contract Object with Reading by Block
TABLES
* PSOBJECTSELECTION = "BAPI Ranges Structure for Contract Object Key
* EXTENSIONOUT = "Reference Structure for BAPI Parameter ExtensionOut
RETURN = "Return Parameter
* PSOBJECTGUIDSELECTION = "BAPI Ranges Structure for the Contract Object GUID
* PSOBJECTTYPESELECTION = "BAPI Ranges Structure for Contract Object Type
* PSLEGACYOBJECTSELECTION = "BAPI Ranges Structure for Contract Object of Old System
* PARTNERSELECTION = "BAPI Ranges Structure for Contract Account Business Partner
* CTRACCOUNTTYPESELECTION = "BAPI Ranges Structure for Contract Object Contract Account Category
* CTRACCOUNTSELECTION = "BAPI Ranges Structure for Contract Object Contract Account
* PSLEGACYOBJECT3SELECTION = "BAPI Ranges Structure for Old System Accounting Data
PSOBJECTLIST = "BAPI List of Contract Objects
* EXTENSIONIN = "Reference Structure for BAPI Parameter ExtensionIn
IMPORTING Parameters details for BAPI_CTRACPSOBJECT_GETLIST
MAXROWS - Maximum Number of Lines of Hits
Data type: BAPI_CTRACPSOBJECT_ADMIN-MAXROWSDefault: 50
Optional: Yes
Call by Reference: No ( called with pass by value option)
XACCOUNTINGDATA - Output Business Partner/Contract Account Reference
Data type: BAPI_CTRACPSOBJECT_ADMIN-XFELDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
XOBSOLETE - Read Obsolete Contract Account Data Also?
Data type: BAPI_CTRACPSOBJECT_ADMIN-XOBSOLETEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
XBLOCKWISE - Read Contract Objects by Block
Data type: BAPI_CTRACPSOBJECT_ADMIN-XBLOCKWISEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PSOBJECTKEY_LAST - Last Contract Object with Reading by Block
Data type: BAPI_CTRACPSOBJECT_ADMIN-PSOBJECTKEY_LASTOptional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BAPI_CTRACPSOBJECT_GETLIST
PSOBJECTSELECTION - BAPI Ranges Structure for Contract Object Key
Data type: BAPIDPSOB_PSOBJECTKEYOptional: Yes
Call by Reference: Yes
EXTENSIONOUT - Reference Structure for BAPI Parameter ExtensionOut
Data type: BAPIPAREXOptional: Yes
Call by Reference: Yes
RETURN - Return Parameter
Data type: BAPIRET2Optional: No
Call by Reference: No ( called with pass by value option)
PSOBJECTGUIDSELECTION - BAPI Ranges Structure for the Contract Object GUID
Data type: BAPIDPSOB_PSOB_GUIDOptional: Yes
Call by Reference: Yes
PSOBJECTTYPESELECTION - BAPI Ranges Structure for Contract Object Type
Data type: BAPIDPSOB_PSOBJECTTYPEOptional: Yes
Call by Reference: Yes
PSLEGACYOBJECTSELECTION - BAPI Ranges Structure for Contract Object of Old System
Data type: BAPIDPSOB_PSLEGACYOBJECTOptional: Yes
Call by Reference: Yes
PARTNERSELECTION - BAPI Ranges Structure for Contract Account Business Partner
Data type: BAPIDPSOB_BP_ACC_PARTNEROptional: Yes
Call by Reference: Yes
CTRACCOUNTTYPESELECTION - BAPI Ranges Structure for Contract Object Contract Account Category
Data type: BAPIDPSOB_BP_ACC_ACCOUNTTYPEOptional: Yes
Call by Reference: Yes
CTRACCOUNTSELECTION - BAPI Ranges Structure for Contract Object Contract Account
Data type: BAPIDPSOB_BP_ACC_ACCOUNTOptional: Yes
Call by Reference: Yes
PSLEGACYOBJECT3SELECTION - BAPI Ranges Structure for Old System Accounting Data
Data type: BAPIDPSOB_BP_ACC_LEGACYOBJECTOptional: Yes
Call by Reference: Yes
PSOBJECTLIST - BAPI List of Contract Objects
Data type: BAPI_CTRACPSOBJECT_LISTOptional: No
Call by Reference: Yes
EXTENSIONIN - Reference Structure for BAPI Parameter ExtensionIn
Data type: BAPIPAREXOptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for BAPI_CTRACPSOBJECT_GETLIST 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_maxrows | TYPE BAPI_CTRACPSOBJECT_ADMIN-MAXROWS, " 50 | |||
| lt_psobjectselection | TYPE STANDARD TABLE OF BAPIDPSOB_PSOBJECTKEY, " | |||
| lt_extensionout | TYPE STANDARD TABLE OF BAPIPAREX, " | |||
| lt_return | TYPE STANDARD TABLE OF BAPIRET2, " | |||
| lt_psobjectguidselection | TYPE STANDARD TABLE OF BAPIDPSOB_PSOB_GUID, " | |||
| lv_xaccountingdata | TYPE BAPI_CTRACPSOBJECT_ADMIN-XFELD, " SPACE | |||
| lt_psobjecttypeselection | TYPE STANDARD TABLE OF BAPIDPSOB_PSOBJECTTYPE, " | |||
| lv_xobsolete | TYPE BAPI_CTRACPSOBJECT_ADMIN-XOBSOLETE, " SPACE | |||
| lt_pslegacyobjectselection | TYPE STANDARD TABLE OF BAPIDPSOB_PSLEGACYOBJECT, " | |||
| lv_xblockwise | TYPE BAPI_CTRACPSOBJECT_ADMIN-XBLOCKWISE, " SPACE | |||
| lt_partnerselection | TYPE STANDARD TABLE OF BAPIDPSOB_BP_ACC_PARTNER, " | |||
| lv_psobjectkey_last | TYPE BAPI_CTRACPSOBJECT_ADMIN-PSOBJECTKEY_LAST, " | |||
| lt_ctraccounttypeselection | TYPE STANDARD TABLE OF BAPIDPSOB_BP_ACC_ACCOUNTTYPE, " | |||
| lt_ctraccountselection | TYPE STANDARD TABLE OF BAPIDPSOB_BP_ACC_ACCOUNT, " | |||
| lt_pslegacyobject3selection | TYPE STANDARD TABLE OF BAPIDPSOB_BP_ACC_LEGACYOBJECT, " | |||
| lt_psobjectlist | TYPE STANDARD TABLE OF BAPI_CTRACPSOBJECT_LIST, " | |||
| lt_extensionin | TYPE STANDARD TABLE OF BAPIPAREX. " |
|   CALL FUNCTION 'BAPI_CTRACPSOBJECT_GETLIST' "PSCD: Read BAPI Contract Object List |
| EXPORTING | ||
| MAXROWS | = lv_maxrows | |
| XACCOUNTINGDATA | = lv_xaccountingdata | |
| XOBSOLETE | = lv_xobsolete | |
| XBLOCKWISE | = lv_xblockwise | |
| PSOBJECTKEY_LAST | = lv_psobjectkey_last | |
| TABLES | ||
| PSOBJECTSELECTION | = lt_psobjectselection | |
| EXTENSIONOUT | = lt_extensionout | |
| RETURN | = lt_return | |
| PSOBJECTGUIDSELECTION | = lt_psobjectguidselection | |
| PSOBJECTTYPESELECTION | = lt_psobjecttypeselection | |
| PSLEGACYOBJECTSELECTION | = lt_pslegacyobjectselection | |
| PARTNERSELECTION | = lt_partnerselection | |
| CTRACCOUNTTYPESELECTION | = lt_ctraccounttypeselection | |
| CTRACCOUNTSELECTION | = lt_ctraccountselection | |
| PSLEGACYOBJECT3SELECTION | = lt_pslegacyobject3selection | |
| PSOBJECTLIST | = lt_psobjectlist | |
| EXTENSIONIN | = lt_extensionin | |
| . " BAPI_CTRACPSOBJECT_GETLIST | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_CTRACPSOBJECT_GETLIST
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 MAXROWS FROM BAPI_CTRACPSOBJECT_ADMIN INTO @DATA(ld_maxrows). | ||||
| DATA(ld_maxrows) | = 50. | |||
| "SELECT single XFELD FROM BAPI_CTRACPSOBJECT_ADMIN INTO @DATA(ld_xaccountingdata). | ||||
| DATA(ld_xaccountingdata) | = ' '. | |||
| "SELECT single XOBSOLETE FROM BAPI_CTRACPSOBJECT_ADMIN INTO @DATA(ld_xobsolete). | ||||
| DATA(ld_xobsolete) | = ' '. | |||
| "SELECT single XBLOCKWISE FROM BAPI_CTRACPSOBJECT_ADMIN INTO @DATA(ld_xblockwise). | ||||
| DATA(ld_xblockwise) | = ' '. | |||
| "SELECT single PSOBJECTKEY_LAST FROM BAPI_CTRACPSOBJECT_ADMIN INTO @DATA(ld_psobjectkey_last). | ||||
Search for further information about these or an SAP related objects