Inclusion Criteria:  Previously-identified activating Kirsten rat sarcoma viral oncogene homologue (KRAS) mutation in tumour tissue or blood prior to screening. Activating mutations may include but are not limited to: KRAS mutations in expressed region (exon) 2 (G12, G13), exon 3 (A59, Q61) and exon 4 (K117, A146). Provision of archival tumour tissue, if available, to confirm retrospectively KRAS mutation status and for biomarker assessment At least one target lesion that can be measured per Response Evaluation Criteria In Solid Tumours (RECIST) version 1.1. In patients who only have one target lesion, and a biopsy of the lesion is required, the baseline imaging must be performed at the earliest two weeks after the biopsy. Eastern Cooperative Oncology Group (ECOG) performance status of 0 or 1 at screening  Adequate organ function at screening as follows:  Absolute neutrophil count (ANC) ≥1.5 x 109/L; hemoglobin ≥9.0 g/dL; platelets ≥100 x 109/L without the use of haematopoietic growth factors or recent transfusion Total bilirubin ≤1.5 times the upper limit of normal (ULN), or ≤4 x ULN for patients who are known to have Gilbert's syndrome. Creatinine ≤1.5 x ULN. If creatinine is >1.5 x ULN, patient is eligible if concurrent glomerular filtration rate (GFR) ≥50 mL/min (measured or calculated by Chronic Kidney Disease Epidemiology Collaboration (CKD-EPI) formula). Aspartate transaminase (AST) and alanine transaminase (ALT) ≤3 x ULN if no demonstrable liver metastases, or ≤ 5 x ULN if transaminase elevation is attributable to liver metastases. Age ≥18 years of age, or over the legal age of consent as required by local legislation at informed consent. Recovery from any previous therapy related toxicity to Common Terminology Criteria for Adverse Events (CTCAE) Grade ≤1 at Cycle 1 Day 1 (except for alopecia, stable sensory neuropathy must be CTCAE Grade ≤2 and except for amenorrhea/menstruation related disorders of any grade) before the first dose. Signed and dated written informed consent in accordance with Good Clinical Practice (GCP) and local legislation prior to admission to the trial.  Further inclusion criteria apply.  Exclusion Criteria:  Previous anticancer chemotherapy or anticancer immunotherapy within 3 weeks of the first administration of trial drug. Previous anticancer hormonal treatment within 2 weeks of the first administration of trial drugs. Previous treatment with Rat sarcoma (RAS), Mitogen-activated protein kinase (MAPK) or Son of Sevenless 1 (SOS1) targeting agents  Radiotherapy within 4 weeks prior to start of treatment except as follows  Palliative radiotherapy to regions other than the chest is allowed up to 2 weeks prior to start of treatment Single dose palliative radiotherapy for symptomatic metastasis within 2 weeks prior to start of treatment may be allowed but must be discussed with the sponsor. Major surgery (major according to the investigator's assessment) performed within 4 weeks prior to start of treatment or planned during the projected course of the trial, e.g. hip replacement. Previous treatment with any investigational agent(s) or targeted treatment within 28 days prior to start of treatment. Known history of hypersensitivity to any of the excipients of BI 1701963 tablets History or presence of cardiovascular abnormalities such as uncontrolled hypertension, congestive heart failure New-York-Heart-Assocation (NYHA) classification of ≥3, unstable angina or poorly controlled arrhythmia which are considered clinically relevant by the investigator; myocardial infarction within 6 months prior to start of treatment. Uncontrolled hypertension is defined as: Blood pressure (BP) measured in a rested and relaxed condition, where systolic BP ≥140 mmHg, or diastolic BP ≥90 mmHg, with or without medication. Left ventricular ejection fraction (LVEF) <50 %. Further exclusion criteria apply.