creating a purchase requisition item (BUS2009) object refferenceinside a workflow

Florin Wach (gmx) florin.wach at gmx.net
Sun Apr 6 07:11:22 EDT 2008


Hi Ronen,

there's no container operation available, to concatenate two strings together.

I'd suggest to create an instance independent object method on BUS2009: .CreateInstance
with the parameters (in)

PurchaseRequisitionNumber    TYPE eban-banfn
PurchaseRequisitionItem         TYPE eban-bnfpo

and out

Instance   TYPE object BUS2009

And the coding is something like:

DATA: number   TYPE ...
         item TYPE ... (see above),
        objkey(20) TYPE C,
        instance   TYPE swc_object.

swc_get_element container 'PurchaseRequisitionNumber' number.
swc_get_element container 'PurchaseRequisitionItem' item.
CONCATENATE number item INTO objkey.
swc_create_object instance 'BUS2009' objkey.

swc_set_object_key self objkey.  "Or something like that

swc_set_element container 'Instance' instance.


Then you can create a dataflow from the task to the method passing the two separate numbers,
and back from method to the task you flow from instance to _WORKINGWI
That instance then you pass back to the workflow.

Thats /roughly/ the coding for that solution.

Best wishes,
Florin

----- Original Message ----- 
  From: Ronen Fox 
  To: sap-wug at mit.edu 
  Sent: Sunday, April 06, 2008 7:38 AM
  Subject: creating a purchase requisition item (BUS2009) object refferenceinside a workflow


  Hello all,

  A custom WF is built around the following objects:

  BUS2012     -     Purchase Order
  BUS2105     -     Purchase Requisition
  BUS2009     -     Purchase Requisition Item

  The problem is creating the object reference for BUS2009 (req. item)

  I have two container elements - one has the requisition number and one has the item number.
  The key of BUS2009 is the req. no + item no. together.
  For example, if the req. no is 10000045 and the item no. is 00010, than the key for
  BUS2009 should be: 1000004500010

  The way I tried to "build" the key from the two container elements is as follows:

  1. A container element preq_key is defined for BUS2009 key

  2. Container operation to add the req. number:

  Result Element   preq_key                           preq_key
  Assignment       =     Assign (contents of table are deleted first)
  Expression       &PURCHASEREQ_SINGLE&                      PurchaseReq_single

  3 Container operation to add the item number

  Result Element   preq_key                           preq_key
  Assignment       <-    Add only to table (contents are extended)
  Expression       &REQ_ITEM_NO&                             req_item_no


  The problem is - the item number is not added to the container element, only the req. number.

  I would like very much to be able to solve this "inside" the WF builder, without having to implement new methods or attributes in the business object itself.


  Your help is much appreciated !


  Thanks & best regards,

  Ronen 


------------------------------------------------------------------------------


  _______________________________________________
  SAP-WUG mailing list
  SAP-WUG at mit.edu
  http://mailman.mit.edu/mailman/listinfo/sap-wug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20080406/2e7dd22f/attachment.htm


More information about the SAP-WUG mailing list