cancel
Showing results for 
Search instead for 
Did you mean: 

No record return when calling 'SAP_WAPI_WORKITEMS_TO_OBJECT'

Former Member
0 Kudos

Hi,

I used the below FM to retrieve workitem id from lt_worklist. This enhancement is to check the valid approvers at Goods Confirmation.

CALL FUNCTION 'SAP_WAPI_WORKITEMS_TO_OBJECT'
                EXPORTING
                  objtype                  = 'BUS2203'
                  objkey                   = lw_doc_guid
                  top_level_items          = space
                  selection_status_variant = 0000
                TABLES
                  worklist                 = lt_worklist.

I used this FM in BBP_DOC_CHK badi implementation. It was working fine during unit testing but now it is not working as expected because it doesnu2019t return any record.

I would like to know what are the possible causes that make this FM not returning any record.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello

this could be a timing problem. Had it before, the workitem did not exist in the very moment

of calling this. Putting a wait period of 1 seconds solved the issue.

maybe helps

Daniel

Answers (0)