cancel
Showing results for 
Search instead for 
Did you mean: 

Exit for Questionnaire submission

Former Member
0 Kudos

Hi,

I have copied the standard Exit class CL_UWS_FORM_RUNTIME_MAIL and created a Zclass. I have included the code to trigger an event in EBP client from the self registration client using a ZRFC copied from 'EVENT_CREATE_IN_UPDATE_TASK'as below. but it is not getting created.find the code i have used inside the class....

3.2. respond to

DATA: lr_sender TYPE REF TO if_sender_bcs.

lr_sender = io_sreq->get_sender( ).

DATA: ld_sender_email TYPE string.

ld_sender_email = lr_sender->address_string( ).

  • Check Submission of all questionnaire

SELECT SINGLE addrnumber INTO lv_addrnumber FROM adr6

WHERE smtp_addr = ld_sender_email AND

persnumber = ' '.

IF sy-subrc = 0.

SELECT SINGLE partner INTO lv_partner FROM but020

WHERE addrnumber = lv_addrnumber.

IF sy-subrc = 0.

SELECT SINGLE name_org1 partner_guid INTO (lv_name1, lv_partner_guid) FROM but000

WHERE partner = lv_partner.

IF sy-subrc = 0.

SELECT * FROM ros_bp_pc_survey INTO TABLE lt_survey

WHERE partner_guid = lv_partner_guid.

IF sy-subrc = 0.

LOOP AT lt_survey INTO wa_survey.

IF wa_survey-email_status EQ 'REPL'.

lv_check = 'X'.

w_product-pdt_cat = wa_survey-category_id.

APPEND w_product TO t_product.

ELSE.

lv_check = ' '.

ENDIF.

ENDLOOP.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

  • End Check

  • Start workflow if all questionnaires are submitted

  • Data declaration for Event trigger

DATA:

jeventid TYPE swedumevid, "Return parameter given Event ID

ev_container TYPE TABLE OF swcont , "Container

lv_objkey TYPE swo_typeid.

CONSTANTS:

lc_objtype TYPE swo_objtyp VALUE 'ZQUESTION',

lc_event TYPE swo_event VALUE 'Submitted'.

IF lv_check = 'X'.

lv_objkey = lv_partner.

*Trigger Event

CALL FUNCTION 'ZEVENT_CREATE_IN_UPDATE_TASK'

IN BACKGROUND TASK

DESTINATION 'DSRCLNT100'

EXPORTING

objtype = lc_objtype

objkey = lv_objkey

event = lc_event

  • CREATOR = sy-uname

TABLES

event_container = ev_container.

commit work.

ENDIF.

Is there any other thing that needs to be done to run our code.Please help me solving the issue...

Thanx,

Sivagami.R

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello,

Did you solve this issue?? I have the same problem.

The problem is that if you create a Zclass, you have to change it in so50 and then the questionnaire doesn't have the mail id to summit it. I will need a exit. Any idea???

Thanks in advance,

Nacho