Attachments
Vinod Ramchandani
vinod.ramchandani at patni.com
Wed May 28 05:34:34 EDT 2003
Hi Workflowers,
After Complete exercise, to bring the old attachments to the next fresh
instance of workflow, I have come on the conclusion that it is not as simple
as i have thought.
I have thought that simply finding out the prevous attachment on workitem
and appending them to the new workflow instance via normal programming
steps, It should be possible to bring old attachments.
But, It is not seems to be so.
It should be a tedious exercise which will include complete understanding of
Document Repository systm...How exactly the Document are get attached and
stored on Document Server.
I have come across the one confusion about the DocType in Container
Debugger.
Can Anybody flash some light on it?
What is the difference between Doc-Type: C141 and Doc-Type: o090 While
Container Binding?
Runtime whatever attachment i would be making that are passed as of type
"o090", but All prevous attachments which i have attached via normal
container operation are of type "C141".
Element of type "o090" are displayed corectly, where "C141" are prompting
the following error.
------------
(:-
The method ended with an exception
Message no. SO 482
Diagnosis
You have tried to call a method which is not correctly implemented in the
selected object type. The method therefore ended with an exception.
System Response
The system cannot execute the function.
Procedure
Maintain the method of this object type in the Business Object Repository or
contact your administrator.
):-
----------------
Thanks to Christophe,Kjetil for their valuable help.
- Vinod.
-----Original Message-----
From: SAP Workflow [mailto:Owner-SAP-WUG at MITVMA.MIT.EDU]On Behalf Of
Kjetil Kilhavn
Sent: Tuesday, May 27, 2003 6:42 PM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: Attachments
You can not attach anything to the messages that go through the list
server. Please include the error message as plain text in a new message.
--
Kjetil Kilhavn
Vinod Ramchandani
<vinod.ramchandani at p To:
SAP-WUG at MITVMA.MIT.EDU
atni.com> cc: (bcc: Kjetil
Kilhavn)
Sent by: SAP Subject: Re: Attachments
Workflow
<Owner-SAP-WUG at MITVM
A.MIT.EDU>
27.05.2003 15:05
Please respond to
"SAP Workflow Users'
Group"
I have tried with this one.
It is still giving me the same kind of error.(attached).
Thanks,
- Vinod.
-----Original Message-----
From: SAP Workflow [mailto:Owner-SAP-WUG at MITVMA.MIT.EDU]On Behalf Of
Christophe DArgembeau
Sent: Tuesday, May 27, 2003 5:49 PM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: Attachments
Hi Vinod,
Yes, you can use this ABAB Code :
* Read object into the container
CALL FUNCTION 'SWW_WI_CONTAINER_READ_OBJECTS'
EXPORTING
wi_id = wa_workitem_id
TABLES
wi_container_objects = i_objects
EXCEPTIONS
no_objects_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CLEAR: st_objects, st_document, st_files, i_files.
LOOP AT i_objects WHERE element EQ '_ATTACH_OBJECTS'.
MOVE i_objects TO st_objects.
EXIT.
ENDLOOP.
* Download attached object to the frontend
st_document-foltp = st_objects-value+20(03). "FOLTP
st_document-folyr = st_objects-value+23(02). "FOLYR
st_document-folno = st_objects-value+25(12). "FOLNO
st_document-objtp = st_objects-value+37(03). "OBJTP
st_document-objyr = st_objects-value+40(02). "OBJYR
st_document-objno = st_objects-value+42(12). "OBJNO
* st_document-FORNAM = . "FORNAM - NOT USED
* st_document-ATTTP = . "ATTTP - NOT USED
* st_document-ATTYR = . "ATTYR - NOT USED
* st_document-ATTNO = . "ATTNO - NOT USED
st_document-objnam = 'MESSAGE ' . "OBJNAM
st_document-objdes = 'INVOICE ' . "OBJDES
* st_document-FOLRG = . "FOLRG - NOT USED
* st_document-OKCODE = . "OKCODE - NOT USED
st_document-file_ext = 'PDF' . "FILE_EXT
* st_document-OBJLEN = '000000033716' . "OBJLEN
* st_document-CREATOR = . "CREATOR - NOT USED
* st_document-DLDAT = . "DLDAT - NOT USED
st_document-extct = 'K' . "EXTCT
* st_document-TARTP = . "TARTP - NOT USED
* st_document-TARYR = . "TARYR - NOT USED
* st_document-TARNO = . "TARNO - NOT USED
* st_document-TARFOLRG = . "TARFOLRG - NOT USED
CONCATENATE 'C:\TEMP\INV_'
wa_workitem_id+4(8)
'_'
sy-uzeit
'.PDF'
INTO st_files.
APPEND st_files TO i_files.
* Download attachment to the PC
CALL FUNCTION 'SO_DOCUMENT_REPOSITORY_MANAGER'
EXPORTING
method = 'PUTCONTENTTOFILE'
office_user = sy-uname
* REF_DOCUMENT =
* NEW_PARENT =
* IMPORTING
* AUTHORITY =
TABLES
* OBJCONT =
* OBJHEAD =
* OBJPARA =
* OBJPARB =
* RECIPIENTS =
* ATTACHMENTS =
* REFERENCES =
files = i_files
CHANGING
document = st_document
* HEADER_DATA =
* FOLMEM_DATA =
* RECEIVE_DATA =
Vinod Ramchandani <vinod.ramchandani at patni.com>
Sent by: SAP Workflow <Owner-SAP-WUG at MITVMA.MIT.EDU>
27/05/2003 14:14
Please respond to "SAP Workflow Users' Group"
To: SAP-WUG at MITVMA.MIT.EDU
cc:
Subject: Re: Attachments
Hi..
Is there any Function Module, which will reads the attachments of
workitems
and returns the table of attachment in the form of SOFM??
OR ---->
I have read the attachments using the FM SWL_WI_ATTACHMENTS_READ, and
format
the SOFM type of table using available information (Structures: swotobjid
&
swlnotetab).
Attachments have been seen in the Inbox but I am not able to display
it.Display Command gives me the runtime "type" exception (See attached
.bmp
file).I think that is due to i have missed some information to place in
SOFM
object.
Anybody have any suggestions?
I have filled the following fields of SOFM.
1) sofm-mandt
2) sofm-foltp
3) sofm-folyr
4) sofm-folno
5) sofm-doctp
6) sofm-docyr
7) sofm-docno
8) sofm-fortp
9) sofm-foryr
10) sofm-forno
Is there any other field is required to be filled in, to remove the
exception while display command?
Kindly suggest if you have some idea.I really appericiate any kind of
input.
Thanks,
- Vinod.
-----Original Message-----
From: SAP Workflow [mailto:Owner-SAP-WUG at MITVMA.MIT.EDU]On Behalf Of
Kjetil Kilhavn
Sent: Tuesday, May 27, 2003 2:15 PM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: Attachments
No, I don't know. Trial error is the best recipe I can suggest.
(Optionally
you can also learn from those trials that were unsuccessful.)
--
Kjetil Kilhavn
Vinod Ramchandani
<vinod.ramchandani at p To:
SAP-WUG at MITVMA.MIT.EDU
atni.com> cc: (bcc: Kjetil
Kilhavn)
Sent by: SAP Subject: Re: Attachments
Workflow
<Owner-SAP-WUG at MITVM
A.MIT.EDU>
27.05.2003 08:10
Please respond to
"SAP Workflow Users'
Group"
Thanks Kjetil,
Ok ! Now I have only one option to go. That is, Write one method and
execute
it in first step.
Is It?
would you please eloberate difference between _adhoc_objects and
_attach_objects?
The Only difference which i think is the TYPE.
_adhoc_objects -- No Type, that is abstract type can be used for any
kind
of attachments.
_attach_objects -- SOFM type, that is only with Office attachments.
Do you know when _adhoc_objects being used in Workflow Circuit?
Thanks.
- Vinod.
-----Original Message-----
From: SAP Workflow [mailto:Owner-SAP-WUG at MITVMA.MIT.EDU]On Behalf Of
Kjetil Kilhavn
Sent: Tuesday, May 27, 2003 11:20 AM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: Attachments
Ahhhh.. good point. The only event container element I can think of right
here and now is the adhoc objects.
Unless you can pass _adhoc_objects to _attach_objects it is probably
better
to do the copying at the beginning of the flow as you suggest.
Modifying SAP standard is never a good idea. It is sometimes necessary,
but
it is never a good idea. I've only encountered SPAU briefly, but it was
enough.
--
Kjetil Kilhavn
Vinod Ramchandani
<vinod.ramchandani at p To:
SAP-WUG at MITVMA.MIT.EDU
atni.com> cc: (bcc: Kjetil
Kilhavn)
Sent by: SAP Subject: Re:
Attachments
Workflow
<Owner-SAP-WUG at MITVM
A.MIT.EDU>
26.05.2003 14:17
Please respond to
"SAP Workflow Users'
Group"
Thanks Kjetil,
I have found two FM's which can probalbly make my work easy.
1) SWI_WORKITEMS_OF_OBJTYPE_GET
2) SWL_WI_ATTACHMENTS_READ
But How should I encapsulate this functionality in my logic.
I was thinking in the following direction.
- Write one Static(Instance Independent) Method in the according Business
Object,
And call this method in first step of the flow and passing this
attachment
table to the workflow container parameter - _attach_objects.
But your suggestion is seems to be quite efficient (using check function
module).
But Check Function has the similar interface like event container.
How can I pass the the value to the _attachment_objects from check
funtion
module?
would you have any idea?
Should i modify the event, to change the event container parameters...or
anything else?
Thanks once again for your help.
- Vinod.
-----Original Message-----
From: SAP Workflow [mailto:Owner-SAP-WUG at MITVMA.MIT.EDU]On Behalf Of
Kjetil Kilhavn
Sent: Monday, May 26, 2003 11:19 AM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: Attachments
Write a check function which finds the previous instance of the same
workflow for the requisition object (SWW_WI_TO_OBJECT_FIND) and copies
the
attachment object(s).
--
Kjetil Kilhavn
Vinod Ramchandani
<vinod.ramchandani at p To:
SAP-WUG at MITVMA.MIT.EDU
atni.com> cc: (bcc: Kjetil
Kilhavn)
Sent by: SAP Subject: Attachments
Workflow
<Owner-SAP-WUG at MITVM
A.MIT.EDU>
24.05.2003 10:05
Please respond to
"SAP Workflow Users'
Group"
Hi Workflowers,
I want to configure Standard Purchase Requisition Release Workflow.
I want to carry the attachments on workitem to the next release
iteration.
- Workflow has simply two step execution.
- Workflow is triggered on "releasestepcreated" event.
- At every iteration of the release procedure of the same requisition, In
new Workflow instance, I need the attachments of the previous workflow
instance which is in "completed" - status.
can anybody have any suggestion or Idea?
Thanks in Advance.
Regards,
Vinod.
-------------------------------------------------------------------
The information contained in this message may be CONFIDENTIAL and is
intended for the addressee only. Any unauthorised use, dissemination of
the
information or copying of this message is prohibited. If you are not the
addressee, please notify the sender immediately by return e-mail and
delete
this message.
Thank you.
-------------------------------------------------------------------
The information contained in this message may be CONFIDENTIAL and is
intended for the addressee only. Any unauthorised use, dissemination of
the
information or copying of this message is prohibited. If you are not the
addressee, please notify the sender immediately by return e-mail and
delete
this message.
Thank you.
-------------------------------------------------------------------
The information contained in this message may be CONFIDENTIAL and is
intended for the addressee only. Any unauthorised use, dissemination of
the
information or copying of this message is prohibited. If you are not the
addressee, please notify the sender immediately by return e-mail and
delete
this message.
Thank you.
-------------------------------------------------------------------
The information contained in this message may be CONFIDENTIAL and is
intended for the addressee only. Any unauthorised use, dissemination of the
information or copying of this message is prohibited. If you are not the
addressee, please notify the sender immediately by return e-mail and delete
this message.
Thank you.
More information about the SAP-WUG
mailing list