Please let me know how to write the following query. Please let me know which fields to be chosen in which tables.
The report should show - Sales Order,Delivery no.,Invoice no.,Qty,Payment Recd., Outstanding as of Today, Due Date,Days Overdue
this is one of the simple queries. Have a look in the SDK documentation of your local SAP installation. There you find all tables and the fields you need to write SAP queries.
Here some tables you need to write your query:
Sales Orders: table ORDR, Sales Order positions: table RDR1
Outgoing Invoices: OINV, position per invoice: INV1
Delivery Notes: ODLN, position per delivery note: DLN1
Sorry, but I'm not going to write the whole query - this is up to you