on 10-06-2008 4:03 PM
Hi Folks,
With Ref to..
I am facing the same problem in ECC 6.0 now,
I am trying to populate an event field which is declared as multiline. the following code is used to populate still the work flow event is binded properly the value is not populating in work flow container log.
is_struct-object_typ = c_obj.
is_struct-object_key = is_header-banfn.
is_struct-event = 'CUSTOM_CHANGE'.
is_cont-element = 'ReleaseCode1'.
clear is_relcodeall.
loop at it_relcodeall into is_relcodeall.
is_cont-value = is_relcodeall-frgc1.
append is_cont to it_cont.
clear: is_relcodeall,
is_cont-value.
endloop.
The same applies with the no values population in *ruleresult* after the agent is detemined in rule the work flow container is not populating is there any SAP NOTE that needs to be applied..
please help me asap.
Thanks and regards,
Krishna Mukthineni
thanks every one
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks every one...
I have replaced FM 'SAP_WAPI_CREATE_EVENT' with ''SWE_EVENT_CREATE'" and it worked fine but the wapi fm should work I think we can raise an SAP NOTE.
thanks and regards,
Krishna Mukhthineni
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
your code for populating the multiline container element looks correct. but u can instead try using the macro SWC_SET_TABLE as mentioned by IA. this will definitely work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi IA / Vikram,
I am trying to raise an event in a BADI which needs this multiline popualting to the container of the workflow.
I have tried couple of ways to decalre and populate the multiline values please help in this regard since I am facing problem in decalarations.
Thanks and Regards,
Krishna Mukthineni
Krishna,
If you are facing declaration problem then probably you have forgotton to include the include program.
add Include <SWFCNTN01> in your code (if you are using BAdI method) and if you are raising your event from some where else then use Include <CNTN01> .
This Include is requires if you are using any macros. keep in mind that if you are using SWFCNTN01 then check this program to find the correct macro.
Cheers
Jai
Hi Folks,
I am able to post values through the event using the swc_set_table
swc_set_table wa_container 'ReleaseCode1' it_relcodeall.
CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
EXPORTING
object_type = is_struct-object_typ
object_key = is_struct-object_key
event = is_struct-event
commit_work = space
event_language = sy-langu
language = sy-langu
user = sy-uname
IMPORTING
return_code = l_retcode
event_id = is_struct-event_id
TABLES
input_container = wa_container
message_lines = it_message_lines
message_struct = it_message_struct.
REFRESH: it_relcodeall.
The problem is the work flow - log is populating with the 3 line items (since there are 3 agents)
and the values are not populating they are empty with 00 Not let say A1, A2,
A3
Is there any note that need to applied or what...
please help me ASAP.
Thanks and Regards,
Krishna Mukthineni
hi,
check whether the binding from event container element "ReleaseCode1" to WF container element is proper. both the elements should have same data type.
also, debug your code and before the execution of SAP_WAPI_CREATE_EVENT, check the value in your container element "wa_container".
if this doesnt work then try using the FM "SWE_EVENT_CREATE" instead of "SAP_WAPI_CREATE_EVENT". there might not be any problem with the existing FM but for the sake of trying try it.
almost all the parameters are same.
CALL FUNCTION 'SWE_EVENT_CREATE'
EXPORTING
objtype = objtype
objkey = objkey
event = event
take_workitem_requester = 'X'
start_with_delay = 'X'
start_recfb_synchron = 'X'
IMPORTING
event_id = workitem_id
TABLES
event_container = event_container
EXCEPTIONS
objtype_not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
return-message = 'Error in Processing'.
ELSE.
return-message = 'Successful'.
ENDIF.
please try the following code, which is working fine for ECC 6.00 and higher
****************************************************************
* Assuming we have an event BUS2105.ReleaseCodes_Reset
* and this has as event container element an internal table
* multiline named RELEASECODES based on data type FRGCO
****************************************************************
* Internal table for release codes (table type)
DATA: lt_releaseCodes TYPE Z_RELEASECODE_TAB.
"Put in some test data
APPEND 'R1' TO lt_releaseCodes.
APPEND 'R2' TO lt_releaseCodes.
* Event container
DATA: lo_event_container TYPE REF TO IF_SWF_CNT_CONTAINER.
"Init the container according to the interface event definition
lo_event_container ?= cl_swf_evt_event=>get_event_container(
im_objcateg = 'BO'
im_objtype = 'BUS2105'
im_event = 'RELEASESCODES_RESET' ).
IF lo_event_container IS INITIAL.
"The event is not existing, not well defined or any other problem.
EXIT. "and do some exception handling here, if appropriate
ENDIF.
"Set the table of release codes
CALL METHOD lo_event_container->element_set EXPORTING
name = 'RELEASECODES'
value = lt_releaseCodes.
* Raise the event using the current container. Standard container elements will be filled
* by the event manager (e.g. _EVT_CREATOR and so forth).
DATA: lo_event TYPE REF TO if_swf_evt_event.
TRY.
CALL METHOD cl_swf_evt_event=>get_instance
EXPORTING
im_objcateg = 'BO'
im_objtype = 'BUS2105'
im_event = 'RELEASESCODES_RESET'
im_objkey = '5100000123' "Put requisition number here, please
im_event_container = lo_event_container
RECEIVING
re_event = lo_event.
CALL METHOD lo_event->raise.
CATCH CX_ROOT.
EXIT. "...and do some exception handling here
ENDTRY.
COMMIT WORK."#EC CI_USE_WANTED
ruleresult will not be populated until the step is executed. what exactly you are trying to do?
Regards, IA
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi IA,
Thanks for the reply.
I have 2 requirments..
I am custom invoking my event which has a prameter with multiple line's which is not populating through SAP_WAPI_EVENT_CREATE?.
secondly I need the value of ruleresult populated since I can use certain parameters in my work flow after a deadline is reached.
Thanks and Regards,
Krishna Mukthineni
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.