SAP has made available a report that can be used to document SAP BeX queries.
To do so, proceed as follows:
Start transaction SE38 and enter RSRQ_QUERYDEFINITION
After starting the report, provide the name of the BeX Query you need to document.
Use the search help to select the query name
Run the Report, after selecting your options
The report shows you the MultiProvider (and the components), Filters, Rows / Columns, Cells, Table View, Input Variables and Exceptions / Conditions.
All these topics can be expanded to have a detailed view.
The report can be printed and can so be used as (part of the) documentation.