2011 Nov 26 8:51 AM
Hi guys,
when I create a maintenance sub-order by the transaction IW36 are the Basic start date and the Basic finish date taken,inherited from the principal Maintenance order?And if it is in this way,is there the possibility to put these two dates as a current day only on the maintenance sub-order ?
My requirement is that I want to create sub-order for defect operations in the superior order. But I want to give the basic start date as below for the sub-order.
DATA : lv_date_diff TYPE i.
caufvd_imp-gstrp - basic start date of superior order
caufvd_imp-gltrp - basic end date of superior order
lv_date_diff = caufvd_imp-gltrp - caufvd_imp-gstrp.
caufvd_exp-gstrp = sy-datum.
caufvd_exp-gltrp = sy-datum + lv_date_diff.
I have used the enhancement IWO10001 to change the basic start and finish date for sub-orders but the problem is whenever I am activating the EXIT in project, I am executing the transaction IW36 and passing order type, Superior order and plant but its showing me an error 'Enter the plant' and again when I am passing plant its clearing the superior order and asking to enter the same and vise versa. kindly help me out.
<removed by moderator>
Edited by: Thomas Zloch on Nov 26, 2011 12:39 PM
2011 Nov 26 10:53 AM
Hi Saumya,
You are facing this problem because you are not filling mandatory details in structure CAUFVD_EXP which is finally used for processing in standard program.
FUNCTION EXIT_SAPLCOIH_001.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" CAUFVD_IMP LIKE CAUFVD STRUCTURE CAUFVD <--This structure passed to EXIT from standard proram
*" CAUFVD_MOR_IMP LIKE CAUFVD STRUCTURE CAUFVD <-This structure passed to EXIT from standard proram
*" AKTYP_IMP LIKE TC10-TRTYP
*" EXPORTING
*" CAUFVD_EXP LIKE CAUFVD STRUCTURE CAUFVD ->In EXIT you need to fill this structure by using above two structure
*"----------------------------------------------------------------------
INCLUDE ZXWO1U01.
ENDFUNCTION.Use below code for reference in INCLUDE ZXWO1U01.
DATA : lv_date_diff TYPE i.
BREAK-POINT.
move caufvd_imp to caufvd_exp
lv_date_diff = caufvd_imp-gltrp - caufvd_imp-gstrp.
caufvd_exp-gstrp = sy-datum.
caufvd_exp-gltrp = sy-datum + lv_date_diff.
After putting above code you will not face your mentioned problem.
BR,
Vijay
Hi guys,
when I create a maintenance sub-order by the transaction IW36 are the Basic start date and the Basic finish date taken,inherited from the principal Maintenance order?And if it is in this way,is there the possibility to put these two dates as a current day only on the maintenance sub-order ?
My requirement is that I want to create sub-order for defect operations in the superior order. But I want to give the basic start date as below for the sub-order.
DATA : lv_date_diff TYPE i.
caufvd_imp-gstrp - basic start date of superior order
caufvd_imp-gltrp - basic end date of superior order
lv_date_diff = caufvd_imp-gltrp - caufvd_imp-gstrp.
caufvd_exp-gstrp = sy-datum.
caufvd_exp-gltrp = sy-datum + lv_date_diff.
I have used the enhancement IWO10001 to change the basic start and finish date for sub-orders but the problem is whenever I am activating the EXIT in project, I am executing the transaction IW36 and passing order type, Superior order and plant but its showing me an error 'Enter the plant' and again when I am passing plant its clearing the superior order and asking to enter the same and vise versa. kindly help me out.
<removed by moderator>
Edited by: Thomas Zloch on Nov 26, 2011 12:39 PM
2011 Nov 26 10:53 AM
Hi Saumya,
You are facing this problem because you are not filling mandatory details in structure CAUFVD_EXP which is finally used for processing in standard program.
FUNCTION EXIT_SAPLCOIH_001.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" CAUFVD_IMP LIKE CAUFVD STRUCTURE CAUFVD <--This structure passed to EXIT from standard proram
*" CAUFVD_MOR_IMP LIKE CAUFVD STRUCTURE CAUFVD <-This structure passed to EXIT from standard proram
*" AKTYP_IMP LIKE TC10-TRTYP
*" EXPORTING
*" CAUFVD_EXP LIKE CAUFVD STRUCTURE CAUFVD ->In EXIT you need to fill this structure by using above two structure
*"----------------------------------------------------------------------
INCLUDE ZXWO1U01.
ENDFUNCTION.Use below code for reference in INCLUDE ZXWO1U01.
DATA : lv_date_diff TYPE i.
BREAK-POINT.
move caufvd_imp to caufvd_exp
lv_date_diff = caufvd_imp-gltrp - caufvd_imp-gstrp.
caufvd_exp-gstrp = sy-datum.
caufvd_exp-gltrp = sy-datum + lv_date_diff.
After putting above code you will not face your mentioned problem.
BR,
Vijay
2011 Nov 26 11:17 AM