Skip to Content

Workflow and ABAP OO


I have read the excellent blogs on Workflow and ABAP OO by Joycelyn Dart (/people/jocelyn.dart/blog/2007/07/16/referencing-bor-objects-in-abap-oo-classes). I have sucessfully created a BO (of type SIBFLPORB) in my class. However, I cannot figure out how to retrieve the workitem container that holds the BO. I have used macros before in workflow programming exists, but there I get the container from a workitem context. I can't find the workitem context in my class. Please provide me with some code samples of how I can retrieve the workitem container that holds the BO.

I am considering passing the workitem id to the method and reading the container via SAP_WAPI_READ_CONTAINER. If this is a good solution, then I see no point in having the BO as an attribute of the classe. Is it a good solution?



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 25, 2008 at 03:01 PM


    I am not sure if I understand your question correctly, but I assume that you want to for example use the attributes/methods of the BO in your code? Why not to create the same attributes/methods into your custom class, and then refer to them by me->attribute_name? Why to still try to use the BO? Isn't it the whole purpose of creating a custom class to get rid of the old-fashioned BOs as much as possible? (It's nice to have them as attributes in the class, but I am not sure whether I would want to really use them in the code.)

    Or did I miss the point here?



    Add a comment
    10|10000 characters needed characters exceeded

    • >

      >I could of course just pass the necessary data as parameters to the class, but I find that rather inflexible as it would require me to change the method signature and binding everytime I need to change something. Therefore, I find the BO the best solution for now.

      Are you using undeclared parameters in your BOR object type methods? I have seen it done - the method code used swc_get_element and swc_set_element, yet the method had no import or export parameters. Even if it worked (for now) there's only one thing to say about that... it's a really bad habit and bad coding practice. So hopefully you answered no 😊

  • Posted on Jan 28, 2008 at 11:35 AM

    Hi all,

    I get the picture and will go for a purely ABAP 00 based solution. Thanks for some helpful replies.


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.