SO_DOC_INSERT_WITH_ORIG_API1 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 SO_DOC_INSERT_WITH_ORIG_API1 into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
SOI1
Released Date:
14.04.1998
Processing type: Remote-Enabled
CALL FUNCTION 'SO_DOC_INSERT_WITH_ORIG_API1' "SAPoffice: Create new document with owner
EXPORTING
folder_id = " soobjinfi1-object_id ID of folder in which document is to be created
document_data = " sodocchgi2 Document attributes (general header)
document_type = " soodk-objtp Document Class
originator = " soextreci1-receiver Address of document owner
originator_type = " soextreci1-adr_typ Type of address for document owner
* iv_vsi_profile = " vscan_profile Virus Scan Profile
IMPORTING
document_info = " sofolenti1 Complete attributes of document
* TABLES
* object_header = " solisti1 Header data for document (spec.header)
* object_content = " solisti1 Document Content
* contents_hex = " solix Document contents (binary)
* object_para = " soparai1 SET/GET parameter for processing
* object_parb = " soparbi1 Fields and values for processing
* et_vsi_error = " bapiret2 Return Parameter(s)
EXCEPTIONS
OWNER_NOT_EXIST = 1 " Specified owner does not exist
FOLDER_NOT_EXIST = 2 " Specified folder does not exist
DOCUMENT_TYPE_NOT_EXIST = 3 " Document type does not exist
OPERATION_NO_AUTHORIZATION = 4 " No authorization to create document
PARAMETER_ERROR = 5 " Invalid combination of parameter values
X_ERROR = 6 " Internal error or database inconsistency
ENQUEUE_ERROR = 7 " Required locks could not be set
. " SO_DOC_INSERT_WITH_ORIG_API1
The ABAP code below is a full code listing to execute function module SO_DOC_INSERT_WITH_ORIG_API1 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_document_info | TYPE SOFOLENTI1 , |
| it_object_header | TYPE STANDARD TABLE OF SOLISTI1,"TABLES PARAM |
| wa_object_header | LIKE LINE OF it_object_header , |
| it_object_content | TYPE STANDARD TABLE OF SOLISTI1,"TABLES PARAM |
| wa_object_content | LIKE LINE OF it_object_content , |
| it_contents_hex | TYPE STANDARD TABLE OF SOLIX,"TABLES PARAM |
| wa_contents_hex | LIKE LINE OF it_contents_hex , |
| it_object_para | TYPE STANDARD TABLE OF SOPARAI1,"TABLES PARAM |
| wa_object_para | LIKE LINE OF it_object_para , |
| it_object_parb | TYPE STANDARD TABLE OF SOPARBI1,"TABLES PARAM |
| wa_object_parb | LIKE LINE OF it_object_parb , |
| it_et_vsi_error | TYPE STANDARD TABLE OF BAPIRET2,"TABLES PARAM |
| wa_et_vsi_error | LIKE LINE OF it_et_vsi_error . |
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_document_info | TYPE SOFOLENTI1 , |
| ld_folder_id | TYPE SOOBJINFI1-OBJECT_ID , |
| it_object_header | TYPE STANDARD TABLE OF SOLISTI1 , |
| wa_object_header | LIKE LINE OF it_object_header, |
| ld_document_data | TYPE SODOCCHGI2 , |
| it_object_content | TYPE STANDARD TABLE OF SOLISTI1 , |
| wa_object_content | LIKE LINE OF it_object_content, |
| ld_document_type | TYPE SOODK-OBJTP , |
| it_contents_hex | TYPE STANDARD TABLE OF SOLIX , |
| wa_contents_hex | LIKE LINE OF it_contents_hex, |
| ld_originator | TYPE SOEXTRECI1-RECEIVER , |
| it_object_para | TYPE STANDARD TABLE OF SOPARAI1 , |
| wa_object_para | LIKE LINE OF it_object_para, |
| ld_originator_type | TYPE SOEXTRECI1-ADR_TYP , |
| it_object_parb | TYPE STANDARD TABLE OF SOPARBI1 , |
| wa_object_parb | LIKE LINE OF it_object_parb, |
| ld_iv_vsi_profile | TYPE VSCAN_PROFILE , |
| it_et_vsi_error | TYPE STANDARD TABLE OF BAPIRET2 , |
| wa_et_vsi_error | LIKE LINE OF it_et_vsi_error. |
This function module facilitates the creation of a new document in a
specified folder.
...See here for full SAP fm documentation
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 SO_DOC_INSERT_WITH_ORIG_API1 or its description.
SO_DOC_INSERT_WITH_ORIG_API1 - SAPoffice: Create new document with owner SO_DOCUMENT_VIEW_MANAGER - SAPoffice: Editor functions of RAW text editor SO_DOCUMENT_UPDATE_API1 - SAPoffice: Change document using RFC SO_DOCUMENT_UPDATE - SAPoffice: Insert document with binary content SO_DOCUMENT_STRUCTURE_GET - SO_DOCUMENT_SET_STATUS_API1 - SAPoffice: Set various statuses using RFC