Using the Request

You can iterate through the instances in the request as follows:

#define getFirstInstance(request)	xmlFindFirstMatch(sprintf$(“<%sRequest>.<DataArea>.<%s>”, 
											“OnEvent”,	| use the method name here
											“SalesOrder”	| use the business object name
											request)
#define getNextInstance(prev_instance)	xmlGetRightSibling(prev_instance)

long	current.instance

current.instance = getFirstInstance(i.request)
while current.instance <> 0
	…
	current.instance = getNextInstance(current.instance)
endwhile

Alternatively, you can forward the request to another method of the same business object or another business object.

Note: For a class method (such as ‘SubscribeEvent’), no instances are available in the data area.