Triggering workflow from BSP

Zavier, Johnson JZavier at Suncor.com
Mon May 30 12:02:03 EDT 2005


Hi Pramod,

Here is some input for your questions.

1. I have triggered without any business objects. Container can be
filled as below and call the workflow using the following sample code.
C_WF_TASK is your task or workflow. Other elements are self explanatory.
..
Data: lt_input_container TYPE TABLE OF SWR_CONT.
..

l_container-element = 'START_DATE'.
l_container-value = is_event-EBEGD.
append l_container to lt_input_container.

* start the workflow
  CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
    EXPORTING
      TASK                     = c_wf_task
      LANGUAGE                 = SY-LANGU
      DO_COMMIT                = 'X'
      USER                     = SY-UNAME
      START_ASYNCHRONOUS       = 'X'
*     DESIRED_START_DATE       =
*     DESIRED_START_TIME       =
    IMPORTING
      RETURN_CODE              = l_return_code
      WORKITEM_ID              = l_workitem_id
      NEW_STATUS               = l_new_status
    TABLES
      INPUT_CONTAINER          = lt_input_container
      MESSAGE_LINES            = lt_message_lines
*     MESSAGE_STRUCT           =
      AGENTS                   = lt_agents
   .


2. No idea..
3. This program can be send a link to the portal if you do not have a
SAPGUI at managers desktop. You need to maintain a new text with link
init. Text can be maintained using se61 and use it in RSWUWFML for
'Dialog Text'.

4. Normal object programming, I have used the 'result parameter'. I have
not done it through BSP application. To populate a table container, just
append the same container name with your individual table entries. Then
in the workflow, it will appear as table container.
l_container-element = 'AGENTS'.
l_container-value = 'USXXXXXX'.
append l_container to lt_input_container.
l_container-element = 'AGENTS'.
l_container-value = 'USYYYYYY'.
append l_container to lt_input_container.

Hope it helps.

regards
Johnson Zavier
SAP ABAP/Workflow 
Suncor Energy Inc.


Date: Sun, 29 May 2005 20:45:56 -0400
From: Pramod Reddy <rkpramod at gmail.com>
To: sap-wug at mit.edu
Subject: Triggering workflow from BSP
Message-ID: <4ee33e6d05052917456a45f3ce at mail.gmail.com>
In-Reply-To: <4ee33e6d05052917354bb92a03 at mail.gmail.com>
References: <4ee33e6d05052917354bb92a03 at mail.gmail.com>
Content-Type: multipart/alternative; 
	boundary="----=_Part_10012_399273.1117413956731"
MIME-Version: 1.0
Precedence: list
Reply-To: SAP Workflow Users' Group <sap-wug at mit.edu>
Message: 1

------=_Part_10012_399273.1117413956731
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

>=20
> Hi there,
>=20
> Can anyone please guide me on this.=20
> We are trying to implement web-based approval mechanism for custom=20
> business process.=20
> 1. Requestor submits his request through a BSP page.
> 2. A work item is should go to Manager for approval. Manger should be
abl=
e=20
> to access/execute the work item from the workflow.=20
> 3. When work item is executed/accessed by manger, Approval page of
BSP=20
> application should be opened up in the browser, where he will
either=20
> approval or reject after filling some more details on approval-page.
> 4. Based on approval/rejection, process flow differs in workflow.
[Means,=
=20
> information maintained by Manager on approval-page should be available
ba=
ck=20
> in workflow.
> Notes: No Custom business objects. No custom tables are being used to
sav=
e=20
> the information maintained neither by requestor nor by approver. So,
all=
=20
> details have to be saved into workflow container till the end of
flow.=20
>  1. Trigger the workflow from BSP page by calling a workflow. Std
FM=20
> SWU_START_WORKFLOW_TASK by passing workflow number [WS xxxxxxx] &
contain=
er=20
> table. Question: How to fill the container table. And will there be
any=
=20
> issue because of not having business object as a element in the
container=
?=20
> 2. Generate the tasks for approval page and use this task in
workflow.[=
=20
> with the help of WF_EXTSRV ]=20
> 3. RSWUWFML, I under this program can be used to send mails to for
each=
=20
> work-item but am not sure whether work items can be executed from the
mai=
ls=20
> even when there is no SAPGUI on Manager's Desktop. Can anyone confirm
thi=
s.=20
> 4. How to get the results back into workflow, after manager is done
with=
=20
> his job.
> I have gone through SWXTRAREQ bsp application, but couldn't grasp.
Can=20
> anyone tell me how this can be done.
>  I have one more question wrt container which should filled and passed
to=
=20
> std fm . How this table should be populated if my container element is
a=
=20
> table.
>=20
> Need pointers as early as possible.=20
>=20
> Thanks,
> Pramod.
>


------------------------------------------------------------------------
This e-mail contains confidential information.  If you are not the intended recipient or have received this e-mail in error, please notify the sender immediately and destroy this e-mail.  Any unauthorized copying, disclosure or distribution of the e-mail or the information it contains, is strictly forbidden.




More information about the SAP-WUG mailing list