on 10-02-2009 6:50 PM
I guess the function can hep me to assign material to the insepection plan?
Any body can give me a sample code ?
When i use this FM CZ_CL_S_MTK_CREATE as follow:
It respond an error message 'Header invalid'.
Any thing wrong?
How Can i solve it?
Or can you give another BAPI OR FM to assign material?
TKS a million~~~
-
REPORT zlorry.
DATA mtk LIKE mtk_class_data OCCURS 0 WITH HEADER LINE.
mtk-mandt = sy-mandt.
mtk-matnr = 'PSAA05E-050(H6)-R'.
mtk-werks = 'ZZ01'.
mtk-plnty = 'FERT01'.
mtk-plnnr = '01'.
mtk-plnal = '00000006'.
mtk-zkriz = '00000006'.
mtk-datuv = '20091003'.
CALL FUNCTION 'CZ_CL_S_MTK_CREATE'
EXPORTING
I_ECN_S = ' '
i_key_date_s = '20091002'
i_flg_mtk_check = 'X'
i_mtk_class_data = mtk
i_flg_collect_all_msg = 'X'
IMPORTING
E_TSK_LOCK =
E_ZKRIZ =
E_ECM_DATA_ERROR_TYPE =
EXCEPTIONS
ALLOCATION_NOT_CONSISTENT = 1
NO_AUTHORITY = 2
NO_AUTHORITY_FOR_MATERIAL = 3
TASK_NOT_LOCKED = 4
NO_VALID_MATERIAL = 5
NO_VALID_SALES_DOCUMENT = 6
COUNTER_OVERFLOW = 7
IDENT_ALREADY_EXISTS = 8
NO_VALID_TASK = 9
PATH_INCOMPLETE = 10
ECM_DATA_NOT_SUITABLE = 11
OTHERS = 12
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Hello
Are you looking for material assignment with the existing Inspection plan or afresh. If it is a new inspection plan kindly use this BAPI BAPI_INSPECTIONPLAN_CREATE
Regards
Gajesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.