Ansicht
Dokumentation
LCM_API_CREATE_DOCUMENT - Create Legal Document for Defined Legal Transaction
Addresses (Business Address Services) SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3upThis documentation is copyright by SAP AG.
Functionality
Use this function module to create a legal document for the provided legal transaction and upload the attachment file or create the virtual document according to the provided document type and attributes.
Example
CALL FUNCTION 'LCM_API_CREATE_DOCUMENT'
EXPORTING
IV_BO_SAVE = ‘X’
IS_DOC_HDR_ATTR = LS_DOC_HDR_ATTR
IS_DOC_VD_ATTR = LS_DOC_VD_ATTR
IS_DOC_DMS_ATTR = LS_DOC_DMS_ATTR
IMPORTING
ET_MESSAGES = LT_MESSAGES
ES_DOCUMENT = LS_DOCUMENT
EXCEPTIONS
CREATION_FAILED = 1
OTHERS = 2.
IF SY-SUBRC EQ 0.
“ERROR MESSAGE
ENDIF.
Notes
For creating an attachment document, you must provide the attributes in the importing parameter IS_DOC_DMS_ATTRand not provide the attributes in IS_DOC_VD_ATTR.
Similarly, for creating a virtual document, you must provide the attributes in the importing parameter IS_DOC_VD_ATTRand not provide the attributes in IS_DOC_DMS_ATTR.
The header structure IS_DOC_HDR_ATTRshould be filled in both the cases.
The following header fields are mandatory:
- IS_DOC_HDR_ATTR-LGLCNTNTMDOCTYPE should be passed as ‘D’ for attachment document or ‘V’ for virtual document.
- IS_DOC_HDR_ATTR-LEGALTRANSACTION
- IS_DOC_HDR_ATTR-LGLCNTNTMDOCCONTENTTYPE
- IS_DOC_HDR_ATTR-LGLCNTNTMLANGUAGE
The following fields are mandatory for creation of an attachment document:
- IS_DOC_DMS_ATTR-BINARY_CONTENT
- IS_DOC_DMS_ATTR-MIMETYPE
- IS_DOC_DMS_ATTR-FILE_NAME
The following fields are mandatory for creation of a virtual document:
- IS_DOC_VD_ATTR-LGLCNTNTMTMPLID
Further information
Parameters
ES_DOCUMENTET_MESSAGES
IS_DOC_DMS_ATTR
IS_DOC_HDR_ATTR
IS_DOC_VD_ATTR
IT_DOC_CATEGORIES
IV_BO_SAVE
Exceptions
CREATION_FAILEDFunction Group
FG_LCM_BOPF_APIBAL Application Log Documentation RFUMSV00 - Advance Return for Tax on Sales/Purchases
This documentation is copyright by SAP AG.
Length: 3900 Date: 20240523 Time: 055148 sap01-206 ( 53 ms )