Looping through a multiline container element
Bruce Miller
Bruce_Miller at esri.com
Tue Jul 22 14:16:56 EDT 2003
I modified a function to do this.
FUNCTION SWE_MODIFY_EVENT_CNTN_DIVISION.
*"----------------------------------------------------------------------
*"*"Local interface:
*" IMPORTING
*" VALUE(CHANGE_DOC_OBJECT) LIKE SWEVCDCOU1-CDOBJECTCL
*" VALUE(OBJTYPE) LIKE SWETYPECOU-OBJTYPE
*" VALUE(OBJKEY) LIKE SWEINSTCOU-OBJKEY
*" VALUE(EVENT) LIKE SWETYPECOU-EVENT
*" TABLES
*" EVENT_CONTAINER STRUCTURE SWCONT
*" CHANGEDOCUMENT_POSITION STRUCTURE CDPOS OPTIONAL
*"----------------------------------------------------------------------
* retrieves old division after change for workflow.
INCLUDE <CNTN01>.
DATA: BEGIN OF DIV_TABLE OCCURS 2,
DIV LIKE MARA-SPART,
END OF DIV_TABLE.
*"----------------------------------------------------------------------
* container element <division> is a multi-line element.
* when the division is changed in table MARA, the WF automatically
* puts the new division in line one and the old division in line two.
*"----------------------------------------------------------------------
DO 2 TIMES.
* SWC_GET_TABLE <Container> <Element> <TableVariable>.
SWC_GET_TABLE EVENT_CONTAINER 'Division' DIV_TABLE.
APPEND DIV_TABLE.
ENDDO.
READ TABLE DIV_TABLE INDEX 2.
* puts old division value in 'OldDivision' WF container
SWC_SET_ELEMENT EVENT_CONTAINER
'OldDivision' DIV_TABLE-DIV.
* (doesn't work) 'OldDivision' changedocument_position-value_old.
ENDFUNCTION.
-----Original Message-----
From: Dywan, Abby [mailto:adywan at clarkstonconsulting.com]
Sent: Tuesday, July 22, 2003 10:49 AM
To: SAP-WUG at mitvma.mit.edu
Subject: Looping through a multiline container element
Hi workflow experts -
I am looking to loop through a multiline container element & process each
element in the table sequentially. Does anyone have any suggestions as to
how best I can do this? I've looked at dynamic circular wizards - but this
is a background task.
Any suggestions would be greatly appreciated - thanks!
Abby :)
Abby Dywan
Clarkston Consulting
adywan at clarkstonconsulting.com
cell: (404) 808-3974
More information about the SAP-WUG
mailing list