Hi,
I had created a Implementation for the BADI 'MB_DOCUMENT_BADI' and i am using the function module SAP_WAPI_DECISION_COMPLETE to complete the User Decision Workitem
And i am able to succesfully able to complete it by using the function module
CALL FUNCTION 'SAP_WAPI_DECISION_COMPLETE' IN BACKGROUND TASK
EXPORTING
WORKITEM_ID = WA_SWWWIHEAD-WI_ID
LANGUAGE = SY-LANGU
** USER = SY-UNAME
DECISION_KEY = LCF_DECISIONKEY
DO_COMMIT = LCF_X.
** IMPORTING
** RETURN_CODE =
** NEW_STATUS =
** TABLES
** MESSAGE_LINES =
** MESSAGE_STRUCT =
But the issue which i am facing is while completing the Dailog Workitem in this BADI and i had used the function module SAP_WAPI_WORKITEM_COMPLETE and SAP_WAPI_WORKITEM_CONFIRM and it is not Completing the workitem.
Please find the below code which i had used inside the BADI
CALL FUNCTION 'SAP_WAPI_WORKITEM_COMPLETE' in BACKGROUND TASK
EXPORTING
WORKITEM_ID = WA_SWWWIHEAD-WI_ID
* ACTUAL_AGENT = SY-UNAME
* LANGUAGE = SY-LANGU
* SET_OBSOLET = ' '
DO_COMMIT = LCF_X
* DO_CALLBACK_IN_BACKGROUND = 'X'
* IFS_XML_CONTAINER =
* IMPORTING
* RETURN_CODE =
* NEW_STATUS =
* TABLES
* SIMPLE_CONTAINER =
* MESSAGE_LINES =
* MESSAGE_STRUCT =
.
CALL FUNCTION 'SAP_WAPI_WORKITEM_CONFIRM' IN BACKGROUND TASK
EXPORTING
WORKITEM_ID = WA_SWWWIHEAD-WI_ID
* ACTUAL_AGENT = SY-UNAME
* LANGUAGE = SY-LANGU
DO_COMMIT = LCF_X
* IMPORTING
* RETURN_CODE =
* NEW_STATUS =
* TABLES
* MESSAGE_LINES =
* MESSAGE_STRUCT =
.
And i had same above code in a normal Report and i am able to succefully complete the dailog workitem but when i use this function module in BADI and my Dailog workitem is not getting complete