on 09-28-2007 12:32 AM
Hi All,
We have a custom business object , with custom events that have multiline parameters. The function modlues SWE_EVENT_CREATE / SAP_WAPI_CREATE_EVENT to trigger the event, however have an event container of type SWCONT or SWR_CONT, where the field VALUE is a 255 character field.
How would we handle events that have a multiline parameters? Essentially we need to pass an internal table while triggering an event.
Please let me know.
Thanks,
Deepa
Hi Deepa,
Populating multiline elements is in the same way as you populate the single elements. For example if i have the element "DOCUMENT_DETAILS" to be populated as multiline it can be done as follows,
loop at DOCUMENT_DETAILS.
it_SWR_CONT-element = 'DOCUMENT_DETAILS'.
it_SWR_CONT-value = DOCUMENT_DETAILS.
append it_SWR_CONT.
endloop.
it_swr_cont-element = 'WF_TYPE'.
it_swr_cont-value = WF_TYPE.
APPEND it_swr_cont.
v_obj_key = LOG_ENTRY.
CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
EXPORTING
object_type = 'ZBO_EHS'
object_key = v_obj_key
event = 'CREATED'
COMMIT_WORK = 'X'
IMPORTING
RETURN_CODE = subrc
TABLES
INPUT_CONTAINER = it_swr_cont
.
In the above example 'DOCUMENT_DETAILS' will be populated as multiline element and 'WF_TYPE' will be populated as single line element.
Thanks,
Prasath N
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Deeepa,
Ways to populate the values for container table ar ediferent in both the cases:
In case of SWE_EVENT_CREATE , you can use macro for <b>swc_set_table</b>
e.g. <i>swc_set_table</i> container 'TEST' it_table.
( You can check help on this macro from SAP help , if required.)
Where as in case of WAPI function module, you can proceed as Prasath has suggested.
Hope this helps.
Regards,
Akshay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
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.