How to get master sales order number from delivery number
I need logic for getting master sales order number from available Delivery number.
Note: There can be many SO's in diffrent levels.
Finally i need to pick up master sales order no.
Thanks in advance.
The document flow can be read using function module RV_ORDER_FLOW_INFORMATION. Set:
COMWA-VBELN = <delivery number>
Use all default values except NACHFOLGER = ' ' because you want to read the "upstream" document flow, i.e. the sales order.