SOFM.CREATE in Enjoy mode loses title

Edwin Mukusha emukusha at nebraska.edu
Thu Mar 16 10:20:05 EST 2006


Well Mike....

What I have a  custom method (CreateWFComments) that should not take you 
that long to set up (I admit the creating the paramaters is pretty 
tedious).  I created it a while ago and it basically allowed me to specify 
3 document titles that I later concatenate for easier binding.  I 
originally created this method to get over the issues you describe. 

Here's some sample code:
==============================================
begin_method createwfcomments changing container.
* Please note this method was created to allow a default subject line
* (or document title) to
* be specified when a user created comments within a user-decision
* in a workflow. There are 3 paramemeters for the document title that
* can be specified. 3 parameters are supplied to get over the
* inability of the workflow builder allowing static text and container
* parameters to mixed when binding out to task. (Unless you do a 
programmed binding!)
*
* This method first calls the create method and secondly calls the edit
* method to change the SOFM document.  This is done because the enjoy
* function module swc_get_dispatch_manager will not allow a default
* document title. The non-enjoy version of swc_get_dispatch_manager
* will force the user to enter the subject line thru pop-up.  this may
* confusing for first time users and involves more clicks.
* For this method to work supply parameters documenttype = 'RAW' and
* no_dialog = 'X'.

DATA: result_object TYPE swc_object.

DATA:
      documenttitle LIKE sood-objdes,
      documentlangu LIKE sood-objla,
      documentsortfield LIKE sood-objsrt,
      documentpriority LIKE sood-objpri,
      documentsensitivity LIKE sood-objsns,
      no_dialog LIKE sonv-flag,
      parentfolid TYPE swc_object,
      documentname LIKE sood-objnam,
      documenttype LIKE sood-objtp,
      documentcontent LIKE soli-line OCCURS 0,
      modifiablebyauthor LIKE sood-objcp,
      expirydate LIKE sodocchgi1-obj_expdat,
      processtype LIKE sodocchgi1-proc_type,
      processelement LIKE sodocchgi1-proc_name,
      skipfirstscreen LIKE sodocchgi1-skip_scren,
      processsystem LIKE sodocchgi1-proc_syst,
      processclient LIKE sodocchgi1-proc_clint,
      originator TYPE swc_object,
      documentheader LIKE soli-line OCCURS 0,
      referencetype LIKE sood-extct,
      fileimport LIKE sonv-flag,
      documentsize LIKE sood-objlen,
      enjoy LIKE sonv-flag,
      doctitle1 LIKE sood-objdes,
      doctitle2 LIKE sood-objdes,
      doctitle3 LIKE sood-objdes.

swc_get_element container 'DOCTITLE1' doctitle1.
swc_get_element container 'DOCTITLE2' doctitle2.
swc_get_element container 'DOCTITLE3' doctitle3.
* SWC_GET_ELEMENT CONTAINER 'DOCUMENTTITLE' DOCUMENTTITLE.
swc_get_element container 'DOCUMENTLANGU' documentlangu.
swc_get_element container 'DOCUMENTSORTFIELD' documentsortfield.
swc_get_element container 'DOCUMENTPRIORITY' documentpriority.
swc_get_element container 'DOCUMENTSENSITIVITY' documentsensitivity.
swc_get_element container 'NO_DIALOG' no_dialog.
swc_get_element container 'PARENTFOLID' parentfolid.
swc_get_element container 'DOCUMENTNAME' documentname.
swc_get_element container 'DOCUMENTTYPE' documenttype.
swc_get_table container 'DocumentContent' documentcontent.
swc_get_element container 'ModifiableByAuthor' modifiablebyauthor.
swc_get_element container 'ExpiryDate' expirydate.
swc_get_element container 'ProcessType' processtype.
swc_get_element container 'ProcessElement' processelement.
swc_get_element container 'SkipFirstScreen' skipfirstscreen.
swc_get_element container 'ProcessSystem' processsystem.
swc_get_element container 'ProcessClient' processclient.
swc_get_element container 'Originator' originator.
swc_get_table container 'DocumentHeader' documentheader.
swc_get_element container 'ReferenceType' referencetype.
swc_get_element container 'FileImport' fileimport.
swc_get_element container 'DocumentSize' documentsize.
swc_get_element container 'Enjoy' enjoy.
swc_get_element container 'DOCUMENTTITLE' documenttitle.
swc_get_element container 'DOCUMENTNAME' documentname.

CONCATENATE doctitle1 doctitle2 doctitle3 INTO
                      documenttitle SEPARATED BY space.

TRANSLATE documenttitle+1 TO LOWER CASE.

swc_set_element container 'DOCUMENTTITLE' documenttitle.

swc_call_method self 'CREATE' container.

swc_get_element container '_result' result_object.

* Set enjoy version.
swc_set_element container 'Enjoy' 'X'.

swc_call_method self 'EDIT' container.


swc_set_element container result result_object.

end_method.
==============================================

enjoy 

Edwin.





"Mike Pokraka" <asap at workflowconnections.com>
Sent by: sap-wug-bounces at mit.edu
03/16/2006 08:49 AM
Please respond to "SAP Workflow Users' Group"
 
        To:     "SAP Workflow Users' Group" <sap-wug at mit.edu>
        cc: 
        Subject:        Re: SOFM.CREATE in Enjoy mode loses title


Howzit Edwin!

Thanks, that technically solves the problem but not quite the way I want
it. True, I no longer have an empty subject field, but that's because now
I have no field, no dialog, no attachment, nothing.

I've also tried filling DOCUMENTHEADER with no joy.

Cheers,
Mike

Edwin Mukusha wrote:
> Howdy Mike,
>
> Try setting the NO_DIALOG parameter to 'X'.
>
> have a super day
>
> Edwin.
>
>
>
>
>
> "Mike Pokraka" <asap at workflowconnections.com>
> Sent by: sap-wug-bounces at mit.edu
> 03/16/2006 07:09 AM
> Please respond to "SAP Workflow Users' Group"
>
>         To:     sap-wug at mit.edu
>         cc:
>         Subject:        SOFM.CREATE in Enjoy mode loses title
>
>
> Hmm, subject says it all, but in more detail:
> I have a task with SOFM.CREATE to add attachments to a WF. I populate 
the
> subject by binding the text into &DOCUMENTTITLE& and it appears, no 
prob.
>
> I bind an 'X' to &ENJOY& and 'RAW' into &DOCUMENTTYPE&, and I get the 
nice
> enjoy screen with an empty title. Smells like a bug, but I can't find 
any
> notes and I've tried it on a 620 and a 640/NW04 system - same result.
>
> TIA
> Mike
>
>
>
>
> _______________________________________________
> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20060316/749322c5/attachment.htm


More information about the SAP-WUG mailing list