STPA3_DOCUMENT_READ 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 STPA3_DOCUMENT_READ into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
STPA3
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'STPA3_DOCUMENT_READ' "
EXPORTING
serv_dest = " rfcdest
step_oid = " castp_step_oid
* read_related = BOOLEAN-FALSE "
IMPORTING
doc_type = " c
doc_number = " c
doc_version = " c
doc_part = " c
upper_doc = " castp_step_oid
status_oid = " castp_step_oid
* TABLES
* long_texts = " castp_stexts
* short_texts = " castp_stexts
* properties = " step_instance
* related_classes = " step_instance
* related_objects = " step_instance
* bom_headers = " step_instance
* admin_list = " castp_admin_list
* originals = " castp_oid_list
. " STPA3_DOCUMENT_READ
The ABAP code below is a full code listing to execute function module STPA3_DOCUMENT_READ 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).
| ld_doc_type | TYPE C , |
| ld_doc_number | TYPE C , |
| ld_doc_version | TYPE C , |
| ld_doc_part | TYPE C , |
| ld_upper_doc | TYPE CASTP_STEP_OID , |
| ld_status_oid | TYPE CASTP_STEP_OID , |
| it_long_texts | TYPE STANDARD TABLE OF CASTP_STEXTS,"TABLES PARAM |
| wa_long_texts | LIKE LINE OF it_long_texts , |
| it_short_texts | TYPE STANDARD TABLE OF CASTP_STEXTS,"TABLES PARAM |
| wa_short_texts | LIKE LINE OF it_short_texts , |
| it_properties | TYPE STANDARD TABLE OF STEP_INSTANCE,"TABLES PARAM |
| wa_properties | LIKE LINE OF it_properties , |
| it_related_classes | TYPE STANDARD TABLE OF STEP_INSTANCE,"TABLES PARAM |
| wa_related_classes | LIKE LINE OF it_related_classes , |
| it_related_objects | TYPE STANDARD TABLE OF STEP_INSTANCE,"TABLES PARAM |
| wa_related_objects | LIKE LINE OF it_related_objects , |
| it_bom_headers | TYPE STANDARD TABLE OF STEP_INSTANCE,"TABLES PARAM |
| wa_bom_headers | LIKE LINE OF it_bom_headers , |
| it_admin_list | TYPE STANDARD TABLE OF CASTP_ADMIN_LIST,"TABLES PARAM |
| wa_admin_list | LIKE LINE OF it_admin_list , |
| it_originals | TYPE STANDARD TABLE OF CASTP_OID_LIST,"TABLES PARAM |
| wa_originals | LIKE LINE OF it_originals . |
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_doc_type | TYPE C , |
| ld_serv_dest | TYPE RFCDEST , |
| it_long_texts | TYPE STANDARD TABLE OF CASTP_STEXTS , |
| wa_long_texts | LIKE LINE OF it_long_texts, |
| ld_doc_number | TYPE C , |
| ld_step_oid | TYPE CASTP_STEP_OID , |
| it_short_texts | TYPE STANDARD TABLE OF CASTP_STEXTS , |
| wa_short_texts | LIKE LINE OF it_short_texts, |
| ld_doc_version | TYPE C , |
| ld_read_related | TYPE STRING , |
| it_properties | TYPE STANDARD TABLE OF STEP_INSTANCE , |
| wa_properties | LIKE LINE OF it_properties, |
| ld_doc_part | TYPE C , |
| it_related_classes | TYPE STANDARD TABLE OF STEP_INSTANCE , |
| wa_related_classes | LIKE LINE OF it_related_classes, |
| ld_upper_doc | TYPE CASTP_STEP_OID , |
| it_related_objects | TYPE STANDARD TABLE OF STEP_INSTANCE , |
| wa_related_objects | LIKE LINE OF it_related_objects, |
| ld_status_oid | TYPE CASTP_STEP_OID , |
| it_bom_headers | TYPE STANDARD TABLE OF STEP_INSTANCE , |
| wa_bom_headers | LIKE LINE OF it_bom_headers, |
| it_admin_list | TYPE STANDARD TABLE OF CASTP_ADMIN_LIST , |
| wa_admin_list | LIKE LINE OF it_admin_list, |
| it_originals | TYPE STANDARD TABLE OF CASTP_OID_LIST , |
| wa_originals | LIKE LINE OF it_originals. |
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 STPA3_DOCUMENT_READ or its description.