How to send URL in workitem text.

Paul.Bakker@osr.treasury.qld.gov.au Paul.Bakker at osr.treasury.qld.gov.au
Tue Oct 25 00:32:34 EDT 2005


Kapil,

 According to OSS note 375669 (which for some reason is now only available
in German!),
the maximum length of a URL in a workitem text is 75 chars. However, if you
implement note
416013, you can increase it to 132.

Another trick is to add a URL to your workitem as an attachment. The name
of the
attachment ('Click me') then becomes a clickable link on the
right-hand-side of your workitem.
(in the SAPGUI).

The document type of this attachment must be 'URL'. The actual URL string
is hidden
inside the attachment  and can be as long as you like.

To create this link via a program, you need to code something like this:

* Add a URL link to an existing workitem
PARAMETERS: p_OBJDES like sood1-OBJDES default 'Testing URL',
            WI_ID LIKE SWWWIHEAD-WI_ID DEFAULT '000000120661',
            L_URL_ID TYPE SO_URL DEFAULT 'http://www.cnn.com/' no-display.

DATA FOLDER_ID         TYPE SOFDK.
DATA LT_OBJCONT TYPE STANDARD TABLE OF SOLI.
DATA LS_OBJCONT TYPE SOLI.
DATA L_OBJ_DATA TYPE SOOD1.
DATA L_OBJ_ID   TYPE SOODK.
DATA DOCUMENT_ID       TYPE SOFMK.
DATA LT_OBJHEAD TYPE STANDARD TABLE OF SOLI.

CALL FUNCTION 'SO_FOLDER_ROOT_ID_GET'
  EXPORTING
    REGION    = 'B'
  IMPORTING
    FOLDER_ID = FOLDER_ID
  EXCEPTIONS
    OTHERS    = 1.

WHILE NOT L_URL_ID IS INITIAL.
  CONCATENATE '&KEY&' L_URL_ID(250) INTO LS_OBJCONT.
  APPEND LS_OBJCONT TO LT_OBJCONT.
  SHIFT L_URL_ID LEFT BY 250 PLACES.
ENDWHILE.

L_OBJ_DATA-OBJNAM = 'MESSAGE'.
L_OBJ_DATA-OBJDES = p_OBJDES.
*OBJECT_HD_CHANGE
CALL FUNCTION 'SO_OBJECT_INSERT'
  EXPORTING
    FOLDER_ID             = FOLDER_ID
    OBJECT_TYPE           = 'URL'
    OBJECT_HD_CHANGE      = L_OBJ_DATA
  IMPORTING
    OBJECT_ID             = L_OBJ_ID
  TABLES
    OBJHEAD               = LT_OBJHEAD
    OBJCONT               = LT_OBJCONT
  EXCEPTIONS
    ACTIVE_USER_NOT_EXIST = 35
    FOLDER_NOT_EXIST      = 6
    OBJECT_TYPE_NOT_EXIST = 17
    OWNER_NOT_EXIST       = 22
    PARAMETER_ERROR       = 23
    OTHERS                = 1000.

IF SY-SUBRC = 0.
  DOCUMENT_ID-FOLTP = FOLDER_ID-FOLTP.
  DOCUMENT_ID-FOLYR = FOLDER_ID-FOLYR.
  DOCUMENT_ID-FOLNO = FOLDER_ID-FOLNO.
  DOCUMENT_ID-DOCTP = L_OBJ_ID-OBJTP.
  DOCUMENT_ID-DOCYR = L_OBJ_ID-OBJYR.
  DOCUMENT_ID-DOCNO = L_OBJ_ID-OBJNO.
ELSE.
ENDIF.

CALL FUNCTION 'SWL_WI_NOTE_CREATE'
  EXPORTING
    WI_ID                               = WI_ID
*   WORKITEM                            =
   NOTE                                = DOCUMENT_ID
*   I_SUPPRESS_ENQUEUE                  = ' '
*   DO_COMMIT                           = 'X'
(...)

happy hunting,
Paul



                                                                                                                                        
                      Kapil Sharma                                                                                                      
                      <shapil_karma at yah        To:       "SAP Workflow Users' Group" <sap-wug at mit.edu>                                  
                      oo.com>                  cc:                                                                                      
                      Sent by:                 Subject:  RE: How to send URL in workitem text.                                          
                      sap-wug-bounces at m                                                                                                 
                      it.edu                                                                                                            
                                                                                                                                        
                                                                                                                                        
                      25/10/2005 13:55                                                                                                  
                      Please respond to                                                                                                 
                      "SAP Workflow                                                                                                     
                      Users' Group"                                                                                                     
                                                                                                                                        
                                                                                                                                        




Hi Paul,

         Yes, now I am able create a hyperlink in
workitem text, but it seems that it has got some
lenght restrictions. My URL is about 200 char in
lenght and it is getting truncated.

         Is there any way out for this?

Thanks a LOT.
Kapil

--- Paul.Bakker at osr.treasury.qld.gov.au wrote:

>
>
> Kapil,
>
>    Try this:
>
> <a href="&myURL&">click here</a>
>
> .. where 'myURL' is a container element.
>
> See also OSS note 375669, which discusses some of
> the problems/joys of
> placing URLs in workitem texts.
>
> cheers,
> Paul
>
>
>
>
>
>
>                       Kapil Sharma
>
>
>                       <shapil_karma at yah        To:
>     "SAP Workflow Users' Group" <sap-wug at mit.edu>
>
>                       oo.com>                  cc:
>
>
>                       Sent by:
> Subject:  RE: How to send URL in workitem text.
>
>                       sap-wug-bounces at m
>
>
>                       it.edu
>
>
>
>
>
>
>
>
>                       25/10/2005 02:38
>
>
>                       Please respond to
>
>
>                       "SAP Workflow
>
>
>                       Users' Group"
>
>
>
>
>
>
>
>
>
>
>
>
> Hi Sushil,
>
>           I tried it but it is not working. In the
> inbox, it just shows <http://www/yahoo.com> as
> static
> text.
>
>    Am I doing something wrong or is there something
> else required.
>
> Thanks a lot,
> kapil.
>
> --- Sushil Guragain <sguragain at interpublic.com>
> wrote:
>
> > Hi Kapil,
> >
> > Just use < and start your URL at the end use >.
> > Example <http://www/yahoo.com>. This should work.
> >
> > Thanks,
> >
> > Sushil
> >
> > -----Original Message-----
> > From: sap-wug-bounces at mit.edu
> > [mailto:sap-wug-bounces at mit.edu] On Behalf Of
> Kapil
> > Sharma
> > Sent: Monday, October 24, 2005 7:08 AM
> > To: sap-wug at mit.edu
> > Subject: How to send URL in workitem text.
> >
> > Hi,
> >
> >    I need to send an URL (like
> http://www.yahoo.com)
> > in the workitem long text, which the user can
> click
> > to open a website.
> >
> >    How can I do it? I tried to use <a
> > href"link"></a> but it does not work.
> >
> > Thanks,
> > Kapil.
> >
> > Kind Regards,
> > Kapil Sharma.
> > HP : +966 501767042.
> > Tel : +966 3 8728856.
> >
> >
> >
> >
> >
> >
>
> >
>
>
> Kind Regards,
> Kapil Sharma.
> HP : +966 501767042.
> Tel : +966 3 8728856.
>
>
>
> __________________________________
> Yahoo! FareChase: Search multiple travel sites in
> one click.
> http://farechase.yahoo.com
> _______________________________________________
> 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
>


Kind Regards,
Kapil Sharma.
HP : +966 501767042.
Tel : +966 3 8728856.










__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
_______________________________________________
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