cancel
Showing results for 
Search instead for 
Did you mean: 

PDF attachment to wf item not always found

Former Member
0 Kudos
90

My ABAP program creates a Smartform report which I convert to PDF and then use fm SO_NEW_DOCUMENT_ATT_SEND_API1 to send to the user's document folder. I use the NEW_OBJECT_ID parameter to build the object key for fm SAP_WAPI_CREATE_EVENT. Using debug, the correct object id is being passed to the fm and it matches the entry in table SOFM. The wf is started and the pdf is attached to the inbox item. But when I click on the attachment to open it, sometimes it is found, sometimes it is not found, and sometimes it opens the attachment from another wf item. Sometimes, if I close Business Workplace then start it again, the attachment will then be found - but this is not consistent either. Any suggestions? Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I once had sort of the same problem. Attached a PDF to my workitem, but it was not shown correctly in the business workplace. I manage to workaround this by creating an instance (System.GenericInstantiate) of the SOFM object in my workflow and attached this instance to the workitem.

It has indeed something to do with buffering, but by creating an instance at runtime you won't have any buffering problems.

Regards,

Joost van Poppel

Former Member
0 Kudos

Can you give me more details? I've been unable to find any information about System.GenericInstantiate and am not familiar with creating an object instance in a workflow.

Thanks.

Ron

martin_nooteboom
Active Contributor
0 Kudos

Hi Ron,

Check BOR system and method Genericinstantiate, or check out the wizard for this available in the builder which creates a task for you based on this BOR and method.

Regards,

Martin

Answers (3)

Answers (3)

Former Member
0 Kudos

I found the answer! In Business Workplace, under Settings, Workflow settings, Personal settings, the option "(Double)-clicking on an object displays the object in the same window" must NOT be checked on. If checked, it always redisplays the same document. If unchecked, it displays the selected documents properly.

Thanks to everyone who made suggestions to help resolve the problem.

ramki_maley
Active Contributor
0 Kudos

Ron,

Please specify the SAP Release you are on.

Thanks,

Ramki Maley.

Former Member
0 Kudos

We are on release 640.

ramki_maley
Active Contributor
0 Kudos

Ron,

See OSS Note # 882238 (relevant if you are below SAPKB64016).

Cheers,

Ramki Maley.

Former Member
0 Kudos

Sorry - SAP GUI is at 640, Basis is at 620. Although the description of OSS note 882238 matches what is happening, we are beyond SAPKB62057.

ramki_maley
Active Contributor
0 Kudos

In that case...

1) Ensure all Workplace users have authorization to TCode SWO_ASYNC (See OSS Note 1006235)

2) Run report RSWO_CLEAR_ASYNC_DATA - You can leave User Name blank (See OSS Note 316812)

Cheers,

Ramki Maley.

Former Member
0 Kudos

It seems that it is a intermittent issue. May be you have to refresh the buffer regularly. If it sometimes comes and sometimes does not then it is not a devt issue.

Try to run this report RHWFINDEXRESET periodically in background that refreshes the buffer.

Thanks

Arghadip

Edited by: Arghadip Kar on Jan 10, 2008 4:57 AM