on ‎2005 Sep 09 11:32 AM
Hi!
I m passing values from my ABAP prog to my event container and from there to my workflow and ultimately to my workitem text.
Now my problem is - my ABAP prog. is passing junk characters along with the actual value to my event container parameters while setting event parameters thru
swc_set_ELEMENT ev_container 'EVENT_PARAMETER' VALUE.
How to prevent these junk chars from being passed?
Request clarification before answering.
Sudipto,
If you are on a release higher than 4.6, find the SAP_WAPI_xxxx function module to create the event. You don't have to use the container macros with the WAPI FM. Otherwise post the relevant pieces of your code.
Cheers,
Ramki Maley.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks.
But I am using SAP_WAPI_CRATE_EVENT. Anyways find herewith the relevant code.
Here I am catching the saved doc no. and then based onwhich retrieving relevant data and passing it to the event contaner parameter. But along with the actual value certain other values r also passed. My actual value is in EVENT_CONTAINER-ELEMENT -VALUE (Can be checked thru debugging)
******************************************************
CALL TRANSACTION 'ES55' USING MESTAB MESSAGES INTO IT_MESS.
LOOP AT IT_MESS. "WHERE MSGID = 'E9' AND MSGNR = '004'.
MOVE IT_MESS-MSGV2 TO LTPLNR.
ENDLOOP.
*WRITE LTPLNR.
SELECT SINGLE PLTXT INTO LPLTXT FROM IFLOTX WHERE TPLNR = LTPLNR.
event_creator-otype = 'US'. "US stands for SAP User
event_creator-objid = sy-uname.
SWC_CREATE_CONTAINER ev_container.
swc_set_ELEMENT ev_container 'TPLNR' LTPLNR.
swc_set_ELEMENT ev_container 'PLTXT' LPLTXT.
CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
EXPORTING
OBJECT_TYPE = 'ZCONNOBJ'
OBJECT_KEY = 'FunctLocation'
EVENT = 'ZCREATED'
COMMIT_WORK = 'X'
EVENT_LANGUAGE = SY-LANGU
LANGUAGE = SY-LANGU
USER = SY-UNAME
IFS_XML_CONTAINER =
IMPORTING
RETURN_CODE =
EVENT_ID =
TABLES
INPUT_CONTAINER = EV_CONTAINER.
MESSAGE_LINES =
MESSAGE_STRUCT =
CALL TRANSACTION 'ES55' USING MESTAB MESSAGES INTO IT_MESS.
LOOP AT IT_MESS. "WHERE MSGID = 'E9' AND MSGNR = '004'.
MOVE IT_MESS-MSGV2 TO LTPLNR.
ENDLOOP.
*WRITE LTPLNR.
SELECT SINGLE PLTXT INTO LPLTXT FROM IFLOTX WHERE TPLNR = LTPLNR.
event_creator-otype = 'US'. "US stands for SAP User
event_creator-objid = sy-uname.
SWC_CREATE_CONTAINER ev_container.
swc_set_ELEMENT ev_container 'TPLNR' LTPLNR.
swc_set_ELEMENT ev_container 'PLTXT' LPLTXT.
CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
EXPORTING
OBJECT_TYPE = 'ZCONNOBJ'
OBJECT_KEY = 'FunctLocation'
EVENT = 'ZCREATED'
COMMIT_WORK = 'X'
EVENT_LANGUAGE = SY-LANGU
LANGUAGE = SY-LANGU
USER = SY-UNAME
IFS_XML_CONTAINER =
IMPORTING
RETURN_CODE =
EVENT_ID =
TABLES
INPUT_CONTAINER = EV_CONTAINER.
MESSAGE_LINES =
MESSAGE_STRUCT =
******************************************************
Cud u kindly suggest a solution?
Thanks and Regards,
Sudipto.
Sudipto,
for the WAPI FM the container is a simple internal table. You simply fill the internal table with the Element name and its value using the APPEND statement. Please see the structure of the input_container parameter of the FM. You should not use any of the macros.
I do not want get into a discussion of your design but It is strange that you are supplying the object key as a literal.
Cheers,
Ramki Maley.
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.