I have to display FI doc using FB03 in adhoc_objects link in work item in SBWP.
I am calling FB03 from default method of my custom BO.
I am able to generate an instance of my custom BO in a background task using method SYSTEM -> Genericinstatiate and link is displayed as expected in adhoc_object sections of the work item.
My issue is, I am able to generate only one adhoc link by above method but my requirement is, I have 5-6 FI docs(as WF inputs params) at a time so I would like to display 5-6 different links in adhoc object work item.
Please help me how to achieve above requirement.
I have tried below solutions myself
1. in report, I am triggering my custom WF from a report so I am create instances of my custom BO from report(using SWC_CREATE macros) and pass the container to FM to trigger the FM event. - This solution is not working as I am not sure how will I pass instance of custom BO into 'value' parameter of the event container. Please share sample code if this solution is good.
2. in workflow , creating a backgroun activity and calling a custom method of BO and creating instances of custom BO(which is holding FB03 default method) and returning adhoc_object parameter of the workflow containers.- I tried various codes like SWC_CREATE or instantiation by SYSTEM->GENERICINSTATIATE but not able to achieve it as code is not working. Please share sample code if this solution can work.
Thank you in advance.