Kindly request you to search the forum before posting. You will see many posts with helpful answers
You may refer to the following thread from SAP Library which explains with example.
http://help.sap.com/saphelp_nw70/helpdata/EN/e7/5f983c1a356858e10000000a114084/content.htm
http://help.sap.com/saphelp_nw70/helpdata/EN/45/6148bab9ac1deee10000000a155369/content.htm