SAP Function Modules

ALE_CTRACPSOBJECT_GETLIST SAP Function module







ALE_CTRACPSOBJECT_GETLIST is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name ALE_CTRACPSOBJECT_GETLIST into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: FMCA_PSOB_BOR1
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM ALE_CTRACPSOBJECT_GETLIST - ALE CTRACPSOBJECT GETLIST





CALL FUNCTION 'ALE_CTRACPSOBJECT_GETLIST' "
* EXPORTING
*   maxrows = 50                " bapi_ctracpsobject_admin-maxrows  Maximum Number of Lines of Hits
*   xaccountingdata = SPACE     " bapi_ctracpsobject_admin-xfeld  Output Business Partner/Contract Account Reference
*   xobsolete = SPACE           " bapi_ctracpsobject_admin-xobsolete  Read Obsolete Contract Account Data Also?
*   obj_type = 'PS_OBJECT'      " serial-obj_type
*   serial_id = '0'             " serial-chnum
  TABLES
*   psobjectselection =         " bapidpsob_psobjectkey  BAPI Ranges Structure for Contract Object Key
*   psobjecttypeselection =     " bapidpsob_psobjecttype  BAPI Ranges Structure for Contract Object Type
*   pslegacyobjectselection =   " bapidpsob_pslegacyobject  BAPI Ranges Structure for Contract Object of Old System
*   partnerselection =          " bapidpsob_bp_acc_partner  BAPI Ranges Structure for Contract Account Business Partner
*   ctraccounttypeselection =   " bapidpsob_bp_acc_accounttype  BAPI Ranges Structure for Contract Object Contract Account Category
*   ctraccountselection =       " bapidpsob_bp_acc_account  BAPI Ranges Structure for Contract Object Contract Account
*   pslegacyobject3selection =   " bapidpsob_bp_acc_legacyobject  BAPI Ranges Structure for Old System Accounting Data
    psobjectlist =              " bapi_ctracpsobject_list  BAPI List of Contract Objects
*   extensionin =               " bapiparex     Reference Structure for BAPI Parameter ExtensionIn
*   psobjectguidselection =     " bapidpsob_psob_guid  BAPI Ranges Structure for the Contract Object GUID
    receivers =                 " bdi_logsys
*   communication_documents =   " swotobjid
*   application_objects =       " swotobjid
  EXCEPTIONS
    ERROR_CREATING_IDOCS = 1    "
    .  "  ALE_CTRACPSOBJECT_GETLIST

ABAP code example for Function Module ALE_CTRACPSOBJECT_GETLIST





The ABAP code below is a full code listing to execute function module ALE_CTRACPSOBJECT_GETLIST including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
it_psobjectselection  TYPE STANDARD TABLE OF BAPIDPSOB_PSOBJECTKEY,"TABLES PARAM
wa_psobjectselection  LIKE LINE OF it_psobjectselection ,
it_psobjecttypeselection  TYPE STANDARD TABLE OF BAPIDPSOB_PSOBJECTTYPE,"TABLES PARAM
wa_psobjecttypeselection  LIKE LINE OF it_psobjecttypeselection ,
it_pslegacyobjectselection  TYPE STANDARD TABLE OF BAPIDPSOB_PSLEGACYOBJECT,"TABLES PARAM
wa_pslegacyobjectselection  LIKE LINE OF it_pslegacyobjectselection ,
it_partnerselection  TYPE STANDARD TABLE OF BAPIDPSOB_BP_ACC_PARTNER,"TABLES PARAM
wa_partnerselection  LIKE LINE OF it_partnerselection ,
it_ctraccounttypeselection  TYPE STANDARD TABLE OF BAPIDPSOB_BP_ACC_ACCOUNTTYPE,"TABLES PARAM
wa_ctraccounttypeselection  LIKE LINE OF it_ctraccounttypeselection ,
it_ctraccountselection  TYPE STANDARD TABLE OF BAPIDPSOB_BP_ACC_ACCOUNT,"TABLES PARAM
wa_ctraccountselection  LIKE LINE OF it_ctraccountselection ,
it_pslegacyobject3selection  TYPE STANDARD TABLE OF BAPIDPSOB_BP_ACC_LEGACYOBJECT,"TABLES PARAM
wa_pslegacyobject3selection  LIKE LINE OF it_pslegacyobject3selection ,
it_psobjectlist  TYPE STANDARD TABLE OF BAPI_CTRACPSOBJECT_LIST,"TABLES PARAM
wa_psobjectlist  LIKE LINE OF it_psobjectlist ,
it_extensionin  TYPE STANDARD TABLE OF BAPIPAREX,"TABLES PARAM
wa_extensionin  LIKE LINE OF it_extensionin ,
it_psobjectguidselection  TYPE STANDARD TABLE OF BAPIDPSOB_PSOB_GUID,"TABLES PARAM
wa_psobjectguidselection  LIKE LINE OF it_psobjectguidselection ,
it_receivers  TYPE STANDARD TABLE OF BDI_LOGSYS,"TABLES PARAM
wa_receivers  LIKE LINE OF it_receivers ,
it_communication_documents  TYPE STANDARD TABLE OF SWOTOBJID,"TABLES PARAM
wa_communication_documents  LIKE LINE OF it_communication_documents ,
it_application_objects  TYPE STANDARD TABLE OF SWOTOBJID,"TABLES PARAM
wa_application_objects  LIKE LINE OF it_application_objects .


DATA(ld_maxrows) = 123

DATA(ld_xaccountingdata) = some text here

DATA(ld_xobsolete) = some text here

DATA(ld_obj_type) = some text here

DATA(ld_serial_id) = Check type of data required

"populate fields of struture and append to itab
append wa_psobjectselection to it_psobjectselection.

"populate fields of struture and append to itab
append wa_psobjecttypeselection to it_psobjecttypeselection.

"populate fields of struture and append to itab
append wa_pslegacyobjectselection to it_pslegacyobjectselection.

"populate fields of struture and append to itab
append wa_partnerselection to it_partnerselection.

"populate fields of struture and append to itab
append wa_ctraccounttypeselection to it_ctraccounttypeselection.

"populate fields of struture and append to itab
append wa_ctraccountselection to it_ctraccountselection.

"populate fields of struture and append to itab
append wa_pslegacyobject3selection to it_pslegacyobject3selection.

"populate fields of struture and append to itab
append wa_psobjectlist to it_psobjectlist.

"populate fields of struture and append to itab
append wa_extensionin to it_extensionin.

"populate fields of struture and append to itab
append wa_psobjectguidselection to it_psobjectguidselection.

"populate fields of struture and append to itab
append wa_receivers to it_receivers.

"populate fields of struture and append to itab
append wa_communication_documents to it_communication_documents.

"populate fields of struture and append to itab
append wa_application_objects to it_application_objects. . CALL FUNCTION 'ALE_CTRACPSOBJECT_GETLIST' * EXPORTING * maxrows = ld_maxrows * xaccountingdata = ld_xaccountingdata * xobsolete = ld_xobsolete * obj_type = ld_obj_type * serial_id = ld_serial_id TABLES * psobjectselection = it_psobjectselection * psobjecttypeselection = it_psobjecttypeselection * pslegacyobjectselection = it_pslegacyobjectselection * partnerselection = it_partnerselection * ctraccounttypeselection = it_ctraccounttypeselection * ctraccountselection = it_ctraccountselection * pslegacyobject3selection = it_pslegacyobject3selection psobjectlist = it_psobjectlist * extensionin = it_extensionin * psobjectguidselection = it_psobjectguidselection receivers = it_receivers * communication_documents = it_communication_documents * application_objects = it_application_objects EXCEPTIONS ERROR_CREATING_IDOCS = 1 . " ALE_CTRACPSOBJECT_GETLIST
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_maxrows  TYPE BAPI_CTRACPSOBJECT_ADMIN-MAXROWS ,
it_psobjectselection  TYPE STANDARD TABLE OF BAPIDPSOB_PSOBJECTKEY ,
wa_psobjectselection  LIKE LINE OF it_psobjectselection,
ld_xaccountingdata  TYPE BAPI_CTRACPSOBJECT_ADMIN-XFELD ,
it_psobjecttypeselection  TYPE STANDARD TABLE OF BAPIDPSOB_PSOBJECTTYPE ,
wa_psobjecttypeselection  LIKE LINE OF it_psobjecttypeselection,
ld_xobsolete  TYPE BAPI_CTRACPSOBJECT_ADMIN-XOBSOLETE ,
it_pslegacyobjectselection  TYPE STANDARD TABLE OF BAPIDPSOB_PSLEGACYOBJECT ,
wa_pslegacyobjectselection  LIKE LINE OF it_pslegacyobjectselection,
ld_obj_type  TYPE SERIAL-OBJ_TYPE ,
it_partnerselection  TYPE STANDARD TABLE OF BAPIDPSOB_BP_ACC_PARTNER ,
wa_partnerselection  LIKE LINE OF it_partnerselection,
ld_serial_id  TYPE SERIAL-CHNUM ,
it_ctraccounttypeselection  TYPE STANDARD TABLE OF BAPIDPSOB_BP_ACC_ACCOUNTTYPE ,
wa_ctraccounttypeselection  LIKE LINE OF it_ctraccounttypeselection,
it_ctraccountselection  TYPE STANDARD TABLE OF BAPIDPSOB_BP_ACC_ACCOUNT ,
wa_ctraccountselection  LIKE LINE OF it_ctraccountselection,
it_pslegacyobject3selection  TYPE STANDARD TABLE OF BAPIDPSOB_BP_ACC_LEGACYOBJECT ,
wa_pslegacyobject3selection  LIKE LINE OF it_pslegacyobject3selection,
it_psobjectlist  TYPE STANDARD TABLE OF BAPI_CTRACPSOBJECT_LIST ,
wa_psobjectlist  LIKE LINE OF it_psobjectlist,
it_extensionin  TYPE STANDARD TABLE OF BAPIPAREX ,
wa_extensionin  LIKE LINE OF it_extensionin,
it_psobjectguidselection  TYPE STANDARD TABLE OF BAPIDPSOB_PSOB_GUID ,
wa_psobjectguidselection  LIKE LINE OF it_psobjectguidselection,
it_receivers  TYPE STANDARD TABLE OF BDI_LOGSYS ,
wa_receivers  LIKE LINE OF it_receivers,
it_communication_documents  TYPE STANDARD TABLE OF SWOTOBJID ,
wa_communication_documents  LIKE LINE OF it_communication_documents,
it_application_objects  TYPE STANDARD TABLE OF SWOTOBJID ,
wa_application_objects  LIKE LINE OF it_application_objects.


ld_maxrows = 123

"populate fields of struture and append to itab
append wa_psobjectselection to it_psobjectselection.

ld_xaccountingdata = some text here

"populate fields of struture and append to itab
append wa_psobjecttypeselection to it_psobjecttypeselection.

ld_xobsolete = some text here

"populate fields of struture and append to itab
append wa_pslegacyobjectselection to it_pslegacyobjectselection.

ld_obj_type = some text here

"populate fields of struture and append to itab
append wa_partnerselection to it_partnerselection.

ld_serial_id = Check type of data required

"populate fields of struture and append to itab
append wa_ctraccounttypeselection to it_ctraccounttypeselection.

"populate fields of struture and append to itab
append wa_ctraccountselection to it_ctraccountselection.

"populate fields of struture and append to itab
append wa_pslegacyobject3selection to it_pslegacyobject3selection.

"populate fields of struture and append to itab
append wa_psobjectlist to it_psobjectlist.

"populate fields of struture and append to itab
append wa_extensionin to it_extensionin.

"populate fields of struture and append to itab
append wa_psobjectguidselection to it_psobjectguidselection.

"populate fields of struture and append to itab
append wa_receivers to it_receivers.

"populate fields of struture and append to itab
append wa_communication_documents to it_communication_documents.

"populate fields of struture and append to itab
append wa_application_objects to it_application_objects.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name ALE_CTRACPSOBJECT_GETLIST or its description.