CPKC412A2104 core had a 2 stage design. In stage 1, eight participants were treated. If at least one participant showed a clinical response, four more participants were recruited to stage 2. The trial was to be stopped if no participants showed a response in stage 1. POC was achieved if at least 2 participants out of 12 responded. In PKC412A2104E1, participants with AML or high risk MDS with wild-type or mutant FTL3 who had not previously received a FLT3 inhibitor were randomized to receive continuous twice daily oral doses of either 50 or 100 mg midostaurin in 1 28-day cycle regimen. Participants were to be treated until disease progression or the occurrence of unacceptable treatment-related toxicity. PKC412A2104 E2 contained 2 dosing regimens: 1) intra-participant midostaurin dose escalation and 2) midostaurin with itraconazole in participants with AML and high risk MDS irrespective of FLT3 status. Eligible participants were alternately assigned to the regimens. At the Investigator's discretion, intra-participant dose escalation was allowed for any previously enrolled CPKC412A2104E1 participant receiving midostaurin at the time of the approval of amendment 4. Participants were treated until the time of disease progression.