SAP QEVC_DRAFT_ACTIVATE Function Module for Activate draft
QEVC_DRAFT_ACTIVATE is a standard qevc draft activate SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Activate draft 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 qevc draft activate FM, simply by entering the name QEVC_DRAFT_ACTIVATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: QEVC
Program Name: SAPLQEVC
Main Program: SAPLQEVC
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function QEVC_DRAFT_ACTIVATE 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 'QEVC_DRAFT_ACTIVATE'"Activate draft.
EXPORTING
IT_INSPLOTSTOCKPOSTINGS = "Stock Postings
IS_USAGEDECISION = "#GENERATED#
IS_INSPECTIONLOT = "#GENERATED#
* IO_USGDCSN_STRTYPE = "External structure type of usage decision
* IV_USE_IN_UPDATE_TASK = 'X' "DB operation in update task (TRUE (='X') or FALSE (=' '))
IMPORTING
ES_INSPECTIONLOT = "Activated data of Inspection Lot Header
ES_USAGEDECISION = "#GENERATED#
ET_MESSAGE = "List of system messages in T100 format
EXCEPTIONS
FOREIGN_LOCK = 1 OUTDATED_DRAFT = 2 BUSINESS_ERROR = 3
IMPORTING Parameters details for QEVC_DRAFT_ACTIVATE
IT_INSPLOTSTOCKPOSTINGS - Stock Postings
Data type: ITINSPECTIONLOTSTOCKPOSTINGTPOptional: No
Call by Reference: Yes
IS_USAGEDECISION - #GENERATED#
Data type: ISINSPLOTUSGEDCSNTP1Optional: No
Call by Reference: Yes
IS_INSPECTIONLOT - #GENERATED#
Data type: ISINSPECTIONLOTTPOptional: No
Call by Reference: Yes
IO_USGDCSN_STRTYPE - External structure type of usage decision
Data type: CL_ABAP_STRUCTDESCROptional: Yes
Call by Reference: Yes
IV_USE_IN_UPDATE_TASK - DB operation in update task (TRUE (='X') or FALSE (=' '))
Data type: ABAP_BOOLDefault: 'X'
Optional: Yes
Call by Reference: Yes
EXPORTING Parameters details for QEVC_DRAFT_ACTIVATE
ES_INSPECTIONLOT - Activated data of Inspection Lot Header
Data type: ISINSPECTIONLOTTPOptional: No
Call by Reference: Yes
ES_USAGEDECISION - #GENERATED#
Data type: ISINSPLOTUSGEDCSNTP1Optional: No
Call by Reference: Yes
ET_MESSAGE - List of system messages in T100 format
Data type: SYMSG_TABOptional: No
Call by Reference: Yes
EXCEPTIONS details
FOREIGN_LOCK - Foreign lock
Data type:Optional: No
Call by Reference: Yes
OUTDATED_DRAFT - Draft outdated
Data type:Optional: No
Call by Reference: Yes
BUSINESS_ERROR - Business Checks fails
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for QEVC_DRAFT_ACTIVATE 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_foreign_lock | TYPE STRING, " | |||
| lv_es_inspectionlot | TYPE ISINSPECTIONLOTTP, " | |||
| lv_it_insplotstockpostings | TYPE ITINSPECTIONLOTSTOCKPOSTINGTP, " | |||
| lv_outdated_draft | TYPE ITINSPECTIONLOTSTOCKPOSTINGTP, " | |||
| lv_es_usagedecision | TYPE ISINSPLOTUSGEDCSNTP1, " | |||
| lv_is_usagedecision | TYPE ISINSPLOTUSGEDCSNTP1, " | |||
| lv_et_message | TYPE SYMSG_TAB, " | |||
| lv_business_error | TYPE SYMSG_TAB, " | |||
| lv_is_inspectionlot | TYPE ISINSPECTIONLOTTP, " | |||
| lv_io_usgdcsn_strtype | TYPE CL_ABAP_STRUCTDESCR, " | |||
| lv_iv_use_in_update_task | TYPE ABAP_BOOL. " 'X' |
|   CALL FUNCTION 'QEVC_DRAFT_ACTIVATE' "Activate draft |
| EXPORTING | ||
| IT_INSPLOTSTOCKPOSTINGS | = lv_it_insplotstockpostings | |
| IS_USAGEDECISION | = lv_is_usagedecision | |
| IS_INSPECTIONLOT | = lv_is_inspectionlot | |
| IO_USGDCSN_STRTYPE | = lv_io_usgdcsn_strtype | |
| IV_USE_IN_UPDATE_TASK | = lv_iv_use_in_update_task | |
| IMPORTING | ||
| ES_INSPECTIONLOT | = lv_es_inspectionlot | |
| ES_USAGEDECISION | = lv_es_usagedecision | |
| ET_MESSAGE | = lv_et_message | |
| EXCEPTIONS | ||
| FOREIGN_LOCK = 1 | ||
| OUTDATED_DRAFT = 2 | ||
| BUSINESS_ERROR = 3 | ||
| . " QEVC_DRAFT_ACTIVATE | ||
ABAP code using 7.40 inline data declarations to call FM QEVC_DRAFT_ACTIVATE
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.| DATA(ld_iv_use_in_update_task) | = 'X'. | |||
Search for further information about these or an SAP related objects