06-21-2018 9:33 AM
Hi
Looking for the suggestion/solution, in some case of CM21 after drag and drop, we got the message CY719/CY720/CY732/CY734.... etc. in planning log .
And user ask that in some specific message, for example CY719/CY720, program should display CY719/CY720 as Error message and undo "drag and drop".
1. We know that settings -> Strategy -> has option "Cancel dispatching due to error " but this will affected many warning message, not only those specific message .
2. There are some user exit CY* and PLAT0001:
I used PLAT0001 to get the planning log and change CY719/CY720 as Error if existed, but cannot find any way to undo dispatch.
3. I also tried user exit CY*, for example call (SAPLCY04 form opr_object_undo ) or change parameter (SAPLCY04)EXTENDED_AFVG_TAB-FUNKTION1 as 'E' ... but no luck...
Any suggestion?? Thank you
07-09-2018 9:07 AM
Hi :
Since there was no answer from community, I tried user-exit again and found a possible way - lots of coding.
Quick introduction how I do it, in case someone need it.
User exit CYPP0001.
Loop (SAPLCY04)EXTENDED_AFVG_TAB[] => need to get and compare processor/successor data one by one
1. perform dates_check_all_opr(saplcy04) => call standard form to get processor/successor table
2. Get table of (SAPLCY04)PRED_OPR_TAB[], (SAPLCY04)SUCC_OPR_TAB[] => processor/successor table
3. Compare (SAPLCY04)EXTENDED_AFVG_TAB[] with (SAPLCY04)PRED_OPR_TAB[], (SAPLCY04)SUCC_OPR_TAB[] to simulate the situation of message 719/720.
=> Date/Time's comparation, refer to Program LCY04FD2 Form PREDECESSOR_CONFLICT_CHECK / SUCCESSOR_CONFLICT_CHECK
4. if Step 3 existed, then undo dispatch - delete (SAPLCY04)OPR_OBJECTS_TAB[]