Skip to Content
author's profile photo Former Member
Former Member

How can I get WorkItemCreationTime to BOR?

hi all,

i searched the forum and haven't got a proper solution for this.

i have a scenario where the task needs to be escalated to the next approver. the problem here is that i am storing the escalation periods in a customising table and this is configurable by the end user.

so, i thought of a solution of passing this as an expression and i have tried it by passing the <b>workitemcreationtime</b> and <b>date</b> through the <b>bor</b> to the function module. i tried to pass these values but i am unable to do it.

could you suggest a way to do this? or if you have any other suggestion than passing through bor, please advice me.

thanks and regards,

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 08, 2007 at 11:38 AM

    Hi Jubi,

    What you can do is enhances your business object and add few levels in Attribute where you write code and get the time frame and depending on that move wf to next approve.

    Atul

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 08, 2007 at 01:02 PM

    Hi,

    Attributes can be used to formulate conditions in the workflow definition. The system reads or establishes the attribute values at runtime and controls the workflow with them.

    Ok, now tell me did you call this FM in your Method.If you done this create a single step task and use this step in your template.And bind with container Elements of time and date.You have to use EVENT for this better way.

    Thanks and Regards,

    Prabhakar Dharmala

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 08, 2007 at 01:13 PM

    Not sure why you are doing this through the BOR. Are you using a BOR method to find the agent, instead of a rule? Anyway.... You haven't said what the problem is, but I assume it is that your date and time container elements in the BOR object method don't have any values (are initial).

    Are you trying to pass the creation date and time of the current work item? If it is the current, why not simply use the current date and time instead? If you don't want to do that, e.g. if you want to use the creation date and time of a previous work item, bind the creation date and time to container elements in the return binding of the actual work item.

    A final tip: the date and time are probably not the most critical information here. Why not let the function module check if they are initial, and use the current date and time if they are?

    Add a comment
    10|10000 characters needed characters exceeded

    • I see... No I can't think of any way getting around that. That means you retrieve the deadline (number of days I suppose) into a container element and use this container element in your deadline specification of the (next?) step?

      Message was edited by Kjetil Kilhavn:

      I am not sure I quite understand your step setup here, but I am afraid you could run into trouble if you try to use information about the current step.

  • author's profile photo Former Member
    Former Member
    Posted on Jul 09, 2007 at 10:09 AM

    Jubi,

    In addition to these try also using <b>Program Exit</b> for the workitem. Using which you can execute a piece of code when Workitem is just created.

    1. Double click on Activity and choose the tab Program exit

    2. Create a new class which includes an interface 'IF_SWF_IFS_WORKITEM_EXIT '

    3. Implement method: IF_SWF_IFS_WORKITEM_EXIT~EVENT_RAISED and look for IM_EVENT_NAME = 'CREATED' and get the Workitem date and time using IM_WORKITEM_CONTEXT.

    4. You can set container elements as well

    Hope this Helps

    Add a comment
    10|10000 characters needed characters exceeded

    • Are you using deadlines of minutes? Otherwise you can use the sy-date and sy-uzeit to calculate. The time passed between the end of task 1 and the start of the next is normally in milliseconds.

      Also you don't have to store it in the BOR, you can also store it in the container.

      Regards,

      Martin

      Gave some extra info

      Message was edited by:

      Martin Nooteboom

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.