Adding attachment to workitems dynamically

Khanna, Manish manish.khanna at amd.com
Wed Jul 19 01:14:41 EDT 2006


I did one step more.

After concatenating I created an object and returned the instance. (This
acted as an alternative to SYSTEM->GENERICINSTANTIATE.

Regards,
Manish

-----Original Message-----
From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf
Of Sue Doughty
Sent: Tuesday, July 18, 2006 5:21 PM
To: SAP Workflow Users' Group
Subject: RE: Adding attachment to workitems dynamically

I don't know if it is the best way, but I created a method that
concatenated the key fields into the IMAGEOBJECTKEY field.  This was
then used as the OBJECTKEY I needed to be able to use
SYSTEM->GENERICINSTANTIATE for instantiating an Image Object. 

BEGIN_METHOD CONCATENATEIMAGEKEYFIELDS CHANGING CONTAINER.         
DATA:                                                              
      ARCHIVEID TYPE TOAV0-ARCHIV_ID,                              
      ARCHIVEDOCUMENTID TYPE TOAV0-ARC_DOC_ID,                     
      IMAGEOBJECTKEY TYPE SWOTOBJID-OBJKEY.                        
                                                                   
  SWC_GET_ELEMENT CONTAINER 'ArchiveID' ARCHIVEID.                 
  SWC_GET_ELEMENT CONTAINER 'ArchiveDocumentID' ARCHIVEDOCUMENTID. 
                                                                   
CONCATENATE ARCHIVEID ARCHIVEDOCUMENTID INTO IMAGEOBJECTKEY        
                                                           .       
  SWC_SET_ELEMENT CONTAINER 'ImageObjectKey' IMAGEOBJECTKEY.       
END_METHOD.                                                        

Regards, 
Sue T. Doughty 
SAP Workflow Specialist
OLD DOMINION FREIGHT LINE, INC.
500 Old Dominion Way, Thomasville, NC 27360
Toll Free :(800)432-6335, ext.5189 
Phone :(336)822-5189 Fax :(336)822-5149 
sue.doughty at odfl.com
-----Original Message-----
From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf
Of Khanna, Manish
Sent: Tuesday, July 18, 2006 3:11 AM
To: SAP Workflow Users' Group
Subject: RE: Adding attachment to workitems dynamically

Hi Mike,

Thanks for all your help. It seems that I need to instantiate the object
before passing it as adhoc object.

However I'm stuck with binding objkey to SYSTEM->GENERICINSTANTIATE.

My BO has a composite KEY - a number and a date. I'm not sure how to
combine them to create the key.

Regards,
Manish


-----Original Message-----
From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf
Of Mike Pokraka
Sent: Friday, July 14, 2006 12:35 PM
To: SAP Workflow Users' Group
Subject: RE: Adding attachment to workitems dynamically

Yep, it's as simple as that. A SOFM attachment is a document - useful
for
things like comments or things like that.

Cheers,
Mike

> Hi Mike,
>
> I don't know if it was as simple as that - I passed the BO as an ADHOC
> object to the first workitem. And it created a link to the object
(which
> in turn calls the BO->DISPLAY).
>
> Are there any issues in doing that or I should find a way to attach it
> as an attachment. (While searching SWUG I found Jocelyn once mentioned
> that to add an attachment we need to have object as type SOFM which
> requires some effort).
>
> Regards,
> Manish
>
> -----Original Message-----
> From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On
Behalf
> Of Mike Pokraka
> Sent: Thursday, July 13, 2006 4:15 PM
> To: SAP Workflow Users' Group
> Subject: RE: Adding attachment to workitems dynamically
>
> 1. Just define it as a container element of your task and bind it from
> your WF.
>
> 2. If you do not already have an instance of the object in your WF you
> need to insantiate it. Use a task based on SYSTEM.GENERICINSTANTIATE
>
>
>> Hi Mike,
>>
>> It shows my ignorance on the subject. Yes you are correct it's the
>> object itself.
>>
>> Now I'm stuck at 2 places.
>> 1. Is there a FM to attach the object to work item in the beginning
of
>> the workflow so that all agents have access?
>>
>> 2. In my redefined BO->DISPLAY I used the BDC way of calling the
>> transaction, thus skipping the selection screen. My question is when
I
>> add the attachment and if somebody tries to open it then BO->DISPLAY
> is
>> called (correct me if I'm wrong). How can I then access the KEY
>> attributes of the BO. Shall I user SWC_GET_ATTRIBUTE SELF '<KEY>'
> <KEY>.
>>
>> Please advice
>>
>> Thanks
>> Manish
>>
>> -----Original Message-----
>> From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On
> Behalf
>> Of Mike Pokraka
>> Sent: Thursday, July 13, 2006 2:28 PM
>> To: SAP Workflow Users' Group
>> Subject: RE: Adding attachment to workitems dynamically
>>
>> Hi Manish,
>> Forgive the stupid question, but you say "master data of a custom
>> business
>> object"... why not attach the object itself? No need to add an extra
>> layer, and your information will always be up to date.
>> Cheers,
>> Mike
>>
>>> Ok. I created a report and attached it the BO-DISPLAY.
>>>
>>>
>>>
>>> Anybody knows the FM to add attachment(s) to the work item? I want
to
>>> attach attachment of type OBJ.
>>>
>>>
>>>
>>> Thanks in advance.
>>>
>>>
>>>
>>> Regards,
>>>
>>> Manish
>>>
>>>
>>>
>>> ________________________________
>>>
>>> From: Khanna, Manish
>>> Sent: Thursday, July 13, 2006 9:17 AM
>>> To: 'SAP Workflow Users' Group'
>>> Subject: Adding attachment to workitems dynamically
>>>
>>>
>>>
>>> Hi,
>>>
>>>
>>>
>>> We need to add the master data of a custom business object as an
>>> attachment to the work item. This need to be performed as the first
>> step
>>> of approval flow. This will help approvers who want to see the
actual
>>> form before taking a decision.
>>>
>>>
>>>
>>> How should I go for it?
>>>
>>>
>>>
>>> Regards,
>>>
>>> Manish
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> SAP-WUG mailing list
>>> SAP-WUG at mit.edu
>>> http://mailman.mit.edu/mailman/listinfo/sap-wug
>>>
>>
>>
>> _______________________________________________
>> SAP-WUG mailing list
>> SAP-WUG at mit.edu
>> http://mailman.mit.edu/mailman/listinfo/sap-wug
>>
>>
>>
>>
>>
>> _______________________________________________
>> SAP-WUG mailing list
>> SAP-WUG at mit.edu
>> http://mailman.mit.edu/mailman/listinfo/sap-wug
>>
>
>
> _______________________________________________
> SAP-WUG mailing list
> SAP-WUG at mit.edu
> http://mailman.mit.edu/mailman/listinfo/sap-wug
>
>
>
>
>
> _______________________________________________
> SAP-WUG mailing list
> SAP-WUG at mit.edu
> http://mailman.mit.edu/mailman/listinfo/sap-wug
>


_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu
http://mailman.mit.edu/mailman/listinfo/sap-wug





_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu
http://mailman.mit.edu/mailman/listinfo/sap-wug

_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu
http://mailman.mit.edu/mailman/listinfo/sap-wug








More information about the SAP-WUG mailing list