Mani,
Are IDocs being sent from SAP R/3 to the customers (SH parties)?
The triggering of the output (EDI of billing doc) and the sending to RFC is done by SAP R/3. Thereafter sending the output (EDI bill) is done by the middleware (e.g. SAP PI etc.)
So this requirement - not send to all 5 SH is probably setup in the middle ware system.
How many partner profiles are created? Probably one for the SP or....is it one for each customer (SP, SH, SH, SH...)