on 01-15-2009 5:21 PM
Hi Exist any workflow to show a material documen using tnx MIGO ?
no solution found
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Exist any workflow to show a material documen using tnx MIGO ?
I don't think you have any standard workflow
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi , Im asking that because I have a workflow that use a function module for a work item , it use Function 'SWW_WI_CONTAINER_READ' and macros 'SWC_TABLE_SET' and 'SWC_TABLE_GET' but I dont know if them are not supported any longer for ECC 6.0 , the thing is that the users cannot received all the buttons that the user used to receive especifically DISPLAY the document.
yeah I know , I´m not very expert in WF , the thing is that there is a work item of user decision that have two branches ( approv, disaprov.) , before in 4.6C when the user checked to the business workflow he had three posible decisions of them aprov, disaprov and DISPLAY now in Ecc 6.0 display disapear . this work item uses the following function. , thank you if you can make a little effort to help me.
I was thinking to use WAPI but im not sure if it is the solution.
fUNCTION ZMM_WF_DECISION.
*"----------------------------------------------------------------------
*"*"Interfase local
*" IMPORTING
*" REFERENCE(I_INFO) TYPE SWR_WIPR_I
*" EXPORTING
*" REFERENCE(E_INFO) TYPE SWR_WIPR_E
*"----------------------------------------------------------------------
"----------------------------------------------------------------------
"*"Interfase local
" IMPORTING
" REFERENCE(I_INFO) TYPE SWR_WIPR_I
" EXPORTING
" REFERENCE(E_INFO) TYPE SWR_WIPR_E
"----------------------------------------------------------------------
* Container Set Table
DEFINE swc_set_table.
call function 'SWC_TABLE_SET'
EXPORTING
element = &2
TABLES
container = &1
table = &3
EXCEPTIONS
others = 1.
END-OF-DEFINITION.
* Container Get Table
DEFINE swc_get_table.
call function 'SWC_TABLE_GET'
EXPORTING
element = &2
TABLES
container = &1
table = &3
EXCEPTIONS
not_found = 8
is_null = 4
others = 1.
END-OF-DEFINITION.
DATA: container TYPE swcont OCCURS 0 WITH HEADER LINE,
cont_tmp TYPE swcont OCCURS 0 WITH HEADER LINE,
swwwihead TYPE swwwihead,
p_memory TYPE char15,
t_contob LIKE sww_contob,
p_mblnr LIKE mkpf-mblnr,
p_mjahr LIKE mkpf-mjahr.
DATA: BEGIN OF text OCCURS 10,
decision_text LIKE sww_cont-value,
END OF text.
CLEAR container.
REFRESH container.
CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
EXPORTING
OBJECT_TYPE =
OBJECT_KEY =
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 =
* MESSAGE_LINES =
* MESSAGE_STRUCT =
.
CALL FUNCTION 'SWW_WI_CONTAINER_READ'
EXPORTING
wi_id = i_info-wi_id
TABLES
wi_container = container.
* CALL FUNCTION 'SAP_WAPI_READ_CONTAINER'
* EXPORTING
* WORKITEM_ID = i_info-wi_id
* LANGUAGE = SY-LANGU
* USER = SY-UNAME
**IMPORTING
** RETURN_CODE =
** IFS_XML_CONTAINER =
** IFS_XML_CONTAINER_SCHEMA =
* TABLES
* SIMPLE_CONTAINER = container
** MESSAGE_LINES =
** MESSAGE_STRUCT =
** SUBCONTAINER_BOR_OBJECTS =
** SUBCONTAINER_ALL_OBJECTS =
* .
swc_get_table container '_DECISION_TEXT' text.
READ TABLE text WITH KEY decision_text(4) = '9999'.
IF sy-subrc NE 0.
MOVE '9999Visualizar Entrada de Mercancias' TO text-decision_text.
APPEND text.
swc_set_table container '_DECISION_TEXT' text.
* CALL FUNCTION 'SAP_WAPI_WRITE_CONTAINER'
* EXPORTING
* WORKITEM_ID = i_info-wi_id
* LANGUAGE = SY-LANGU
* ACTUAL_AGENT = SY-UNAME
* DO_COMMIT = 'X'
** IFS_XML_CONTAINER =
** IMPORTING
** RETURN_CODE =
* TABLES
* SIMPLE_CONTAINER = container.
** MESSAGE_LINES =
** MESSAGE_STRUCT =
.
CALL FUNCTION 'SWW_WI_CONTAINER_MODIFY'
EXPORTING
wi_id = i_info-wi_id
do_commit = 'X'
TABLES
wi_container = container.
ENDIF.
CALL FUNCTION 'SWU2_INPLACE_DECISION_PROCESS'
EXPORTING
i_info = i_info
IMPORTING
e_info = e_info.
CALL FUNCTION 'SWW_WI_CONTAINER_READ'
EXPORTING
wi_id = i_info-wi_id
TABLES
wi_container = container.
READ TABLE container WITH KEY element = '_RESULT'
value = '9999'.
IF sy-subrc EQ 0.
DELETE container INDEX sy-tabix.
CLEAR container.
READ TABLE container WITH KEY element = '_WI_RESULT'
value = '9999'.
IF sy-subrc EQ 0.
DELETE container INDEX sy-tabix.
CLEAR container.
ENDIF.
CLEAR e_info-execresult.
CALL FUNCTION 'SWW_WI_CONTAINER_DELETE'
EXPORTING
wi_id = i_info-wi_id.
CALL FUNCTION 'SWW_WI_CONTAINER_INSERT'
EXPORTING
wi_id = i_info-wi_id
do_commit = 'X'
TABLES
wi_container = container.
CALL FUNCTION 'SWW_WI_HEADER_READ'
EXPORTING
wi_id = i_info-wi_id
IMPORTING
wi_header = swwwihead.
CALL FUNCTION 'SWW_WI_CONTAINER_READ'
EXPORTING
wi_id = swwwihead-wi_chckwi
TABLES
wi_container = cont_tmp.
CLEAR cont_tmp.
READ TABLE cont_tmp WITH KEY element = 'MATERIALDOCUMENT'.
MOVE cont_tmp-value TO p_mblnr.
CLEAR cont_tmp.
READ TABLE cont_tmp WITH KEY element = 'MATDOCUMENTYEAR'.
MOVE cont_tmp-value TO p_mjahr.
CALL FUNCTION 'SWW_WI_HEADER_READ'
EXPORTING
wi_id = swwwihead-wi_chckwi
IMPORTING
wi_header = swwwihead.
CASE swwwihead-wi_rh_task.
WHEN 'WS99800003'. "Aprobacion Entrada Mercancia
CALL FUNCTION 'MIGO_GR_CREATE'
EXPORTING
I_ACTION = 'A04'
I_REFDOC = 'R02'
I_NOTREE = 'X'
I_NO_AUTH_CHECK = 'X'
I_SKIP_FIRST_SCREEN = 'X'
I_DEADEND = 'X'
I_OKCODE = 'OK_GO'
I_MBLNR = p_mblnr
I_MJAHR = p_mjahr.
ENDCASE.
ENDIF.
READ TABLE container WITH KEY element = '_RESULT'
value = '0001'.
IF sy-subrc EQ 0 AND e_info-execresult EQ 'E'.
READ TABLE container WITH KEY element = '_DECISION_PARAMETER1'.
MOVE container-value TO p_mblnr.
READ TABLE container WITH KEY element = '_DECISION_PARAMETER2'.
MOVE container-value TO p_mjahr.
PERFORM process_message USING p_mblnr p_mjahr '1'.
ENDIF.
READ TABLE container WITH KEY element = '_RESULT'
value = '0002'.
IF sy-subrc EQ 0 AND e_info-execresult EQ 'E'.
READ TABLE container WITH KEY element = '_DECISION_PARAMETER1'.
MOVE container-value TO p_mblnr.
READ TABLE container WITH KEY element = '_DECISION_PARAMETER2'.
MOVE container-value TO p_mjahr.
PERFORM process_message USING p_mblnr p_mjahr '2'.
ENDIF.
READ TABLE container WITH KEY element = '_RESULT'
value = '9998'.
IF sy-subrc EQ 0.
MOVE 'E' TO e_info-execresult.
ENDIF.
ENDFUNCTION.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.