Skip to Content

How call BO SYSTEM -> Genericinstatiate in Workflow activity with multiple keys for the method

Aug 25, 2017 at 03:55 PM


avatar image

Hi Experts,

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.



10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Mike Pokraka Aug 28, 2017 at 09:03 AM

I would highly recommend getting to grips with Object Oriented ABAP. Using classes, it's a table parameter just like any other ABAP method, which you can assign in a container operation step.

However if you don't want to invest the time in coming up to date, you need to declare your attribute as muliline and use macro swc_set_table to populate a muliline parameter in a method. Or, as partly suggested, you can loop over and instantiate one at a time in WF.

10 |10000 characters needed characters left characters exceeded
Anjan Paul Aug 28, 2017 at 08:38 AM


Not sure, can you please try to add multiple steps to link multiple object to Adhoc objects .


10 |10000 characters needed characters left characters exceeded