Skip to Content
0
Former Member
Jun 02, 2008 at 06:15 PM

Including new container at USER EXIT call

35 Views

Hi all,

I have a call function at an user-exit, but I want to put a new container at the WF.

I used this code below:

****************************************************************************************

INCLUDE .

DATA: t_event_container LIKE swcont OCCURS 0 WITH HEADER LINE,

t_vzzkopo LIKE vzzkopo OCCURS 0 WITH HEADER LINE,

w_objkey LIKE sweinstcou-objkey,

w_creator LIKE swhactor.

IF i_vdarl-rbher EQ 'FNVM'.

break ricardov.

SELECT * FROM vzzkopo INTO TABLE t_vzzkopo

WHERE bukrs EQ i_vdarl-bukrs AND

rkey1 EQ i_vdarl-ranl.

IF sy-subrc EQ 0.

LOOP AT t_vzzkopo.

READ TABLE ivzzkopo_save INDEX sy-tabix.

IF NOT ivzzkopo_save-dfaell EQ t_vzzkopo-dfaell.

swc_set_element t_event_container 'DueDate' t_vzzkopo-dfaell .

CONCATENATE 'US' i_vdarl-rbear INTO w_creator.

MOVE i_vdarl-objnr+2(18) TO w_objkey.

CALL FUNCTION 'SWE_EVENT_CREATE'

EXPORTING

objtype = 'BUS2049'

objkey = w_objkey

event = 'ASSIGNED'

creator = w_creator

start_recfb_synchron = 'X'

TABLES

event_container = t_event_container

EXCEPTIONS

objtype_not_found = 1

OTHERS = 2.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

ENDIF. " dfaell

AT END OF bukrs.

LEAVE PROGRAM.

ENDAT.

ENDLOOP.

ENDIF. " select vzzkopo

ENDIF.****************************************************************************************

But the information of DueDate isn´t going to the container of Workflow.

Does anything to do there?

Regards,

Ricardo