on 09-11-2014 1:13 PM
Hi All,
I created an object type in BOB which gives me ernam field of MARA table on testing.
I need to use that object type in the new workflow in which user inserts a material number and should get ernam (Created by) as an output field.
I tied doing that but on testing , it shows task's status 'COMPLETED' but does not display the ERNAM.
What else I need to do to make it displayed on the screen?
Thanks in advance
Shweta
Hi Paul,
My problem has been solved.
Thanks,
Shweta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I don't understand the question. I assume you mean BOR (instead of BOB).
How does an object "give" you the ERNAM field? Do you mean it's an attribute?
What's the key of your object?
How does the user insert a material number in the workflow?
regards
Rick Bakker
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, the output should be the ERNAM field of MARA table.
Key of the object is MATNR of MARA.
I want to insert the material number via se80 program but I am not able to find what needs to be done for passing the material number from se80 program i.e. which function module should I use for passing the material number via se80?
Hi Vidya,
I used 'SAP_WAPI_CREATE_EVENT' to pass the values. Also , I created an event parameter 'MATERIAL' so that the value can be passed as the event gets triggered then I did the binding of event parameter and workflow container parameter of material.
after that i run the following code in se80.
DATA : MATERIAL like SWR_STRUCT-OBJECT_KEY,
lv_matnr TYPE mara-matnr.
DATA : wa_event like SWR_STRUCT-EVENT,
wa_obj LIKE swr_struct-object_typ.
DATA : lv_user TYPE SWC_ELEM VALUE 'INITUSER',
LV_MATERIAL TYPE SWC_ELEM VALUE 'MATERIAL'.
DATA : T_MSG TYPE STANDARD TABLE OF SWR_MESSAG.
DATA : flg(1) TYPE c.
DATA : it_cont TYPE TABLE OF SWCONT,
wa_cont like LINE OF it_cont.
wa_event = 'ZCLICK_EVENT'.
Wa_obj = 'ZDEMO_BOR1'.
MATERIAL = lv_matnr.
wa_cont-element = lv_user.
wa_cont-value = sy-uname.
append wa_cont to it_cont.
CLEAR : wa_cont.
wa_cont-element = LV_MATERIAL.
wa_cont-value = LV_MATNR.
append wa_cont to it_cont.
CLEAR : wa_cont.
CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
EXPORTING
object_type = wa_obj
object_key = MATERIAL "Key field in BOR
event = WA_EVENT
* COMMIT_WORK = 'X'
* EVENT_LANGUAGE = SY-LANGU
* LANGUAGE = SY-LANGU
USER = SY-UNAME
* IFS_XML_CONTAINER =
* IMPORTING
* RETURN_CODE =
* EVENT_ID =
TABLES
INPUT_CONTAINER = it_cont[]
MESSAGE_LINES = T_MSG[].
* MESSAGE_STRUCT =
.
READ TABLE T_MSG WITH KEY MSG_TYPE = 'E' TRANSPORTING NO FIELDS.
IF SY-SUBRC = 0.
Flg = 'N'.
MESSAGE E208(00) WITH 'Error initiating Workflow.'.
ELSEIF SY-SUBRC <> 0.
MESSAGE 'Workflow initiated.' Type 'S'.
After this code , I get a message 'Worlflow initiated' but I can not see the value being transferred to the workflow respective container
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.