A Study to Evaluate the Safety, Pharmacokinetics (PK) and Pharmacodynamics (PD) for TAK-906 in Participants With Diabetes Mellitus and Gastroparesis (DG) or With Idiopathic Gastroparesis (IG)

The purpose of this study is to evaluate the safety, PK and PD of TAK-906 in participants with Gastroparesis (GP).

The drug being tested in this study is called TAK-906 maleate. TAK-906 maleate is being tested to treat people who have DG or IG. This study will assess the safety, tolerability, PK/PD and food effect of TAK-906 and will determine the effect of TAK-906 on gastric emptying (GE).

The study enrolled a total of 51 participants. This study will be conducted in two parts: Part 1 and Part 2. Part 1 will consist of 48 participants enrolled in 3 active treatment groups and 1 placebo group. Participants in Part 1 will be randomly assigned (by chance, like flipping a coin) to one of the 3 active treatment groups or 1 placebo group-which will remain undisclosed to the participant and study doctor during the study (unless there is an urgent medical need):

* TAK 906 maleate 5 mg
* TAK 906 maleate 25 mg
* TAK 906 maleate 100 mg
* Placebo

All participants who will complete Part 1 of the study will be eligible for enrollment in Part 2. Part 2 consisted of 21 participants who completed Part 1 and were assigned to the 2 open-label treatment groups as follow:

* TAK-906 maleate 25 mg Fed + TAK-906 maleate 25 mg Fasted: crossover design, with a minimum 7-day washout in doses of each period.
* Metoclopramide 10 mg

This multi-center trial will be conducted the United States. The overall time to participate in this study is approximately 8 weeks. Participants will make a final visit to the clinic 10-14 days after receiving their last dose of study drug for a follow-up assessment.

Eligibility Criteria:
Inclusion Criteria

In order to be eligible for participation in this trial, the participant must:

1. Has a documented diagnosis of diabetes mellitus gastroparesis (DG) or idiopathic gastroparesis (IG).
2. Has a body mass index (BMI) greater than or equal to (\>=) 18 and less than or equal to (\<=) 40 kilogram per square meter (kg/m\^2) at the Screening Visit.
3. Be a non-smoker who has not used tobacco or nicotine-containing products (example, nicotine patch) for at least 6 months prior to trial drug administration of the initial dose of trial drug/invasive procedure.
4. Has symptoms for gastroparesis (GP) (that is, chronic postprandial fullness, abdominal pain, postprandial nausea, vomiting, loss of appetite and/or early satiety) the past 3 months.
5. Has documented slow gastric emptying (GE), with delayed GE by 13C-Spirulina gastric emptying breath test (GEBT) at Screening defined as \>=80th percentile. Note: If a participant has had a documented scintigraphy or GEBT within the last 12 months that confirms the diagnosis of delayed GE, a screening GEBT would not be required.
6. Has nausea subscale (of American Neurogastroenterology and Motility Society Gastroparesis Cardinal Symptom Index-Daily Diary \[ANMS-GCSI-DD\]) symptom score \>=2 at least 3 of 7 days during Screening.
7. Has haemoglobin A1c (HBA1c) less than (\<) 10 percent (%) (for diabetes mellitus only).

Exclusion Criteria

The participant must be excluded from participating in the trial if the participant:

1. Has acute severe gastroenteritis and pronounced dehydration in the past 48 hours prior to Screening, gastric pacemaker, chronic parenteral feeding or persistent severe vomiting.
2. Has a known disturbance of small intestinal absorption, exocrine pancreatic function, liver metabolism, and pulmonary function.
3. Has a history of anorexia nervosa or bulimia.
4. Previous history of bezoars (the presence of retained liquid, bile, or small amounts of poorly organized food residue is permitted).
5. Difficulty swallowing solid food or pills.
6. Prior surgery involving the luminal gastrointestinal (GI) tract (cholecystectomy, appendectomy, and hysterectomy are permitted if performed greater than (\>) 3 months prior to SmartPill test).
7. Any abdominal or pelvic surgery within the past 3 months.
8. Known or history of inflammatory bowel disease.
9. Has active diverticulitis, diverticular stricture, and other intestinal strictures.
10. Had major surgery, donated or lost 1 unit of blood (approximately 500 milliliter \[mL\]) within 4 weeks prior to the pretrial (screening) visit milligram per deciliter (mg/dL) (14.99 millimole per liter \[mmol/L\]) during any visit up to and including the randomization visit (Period 1 Day 1 predose). Note: If the participant meets this exclusion criterion and the investigator believes that the value is not consistent with the participant's current self-monitoring blood glucose values, the participant should not be excluded at this time. The visit can be repeated within 5 to 7 days.
11. Has had diabetic ketoacidosis (within the prior 4 weeks).