I would like to create an EXCEL-file with values from the purchase order display in transaction CSP2 (grid control). To create the EXCEL-file I want to use an RFC to add fields from other tables. Is there an example of that in your documentation?

Use GuiXT Controls and the Native Control Interface for reading the grid values. For an examples, see our Tips, Tricks & Samples, "Native Control Interface", "Read a hole grid".