‎2006 May 22 9:55 AM
Hello,
I have requirement to read the document flow of a sales document.
Actually i am using a select statement for the table VBFA. But then it is taking a very long time the performance is very bad.
I remember having used a fucntion module some time before but cant recall the name.
Kindly let me know if anyone of you know which is the function module to read the document flow of a sales document.
Thankyou.
‎2006 May 22 10:05 AM
Dear Brijesh,
You explain your correct requirement, and i shall say you which tables to use for the correct link and faster performance.
regards
Lakshminarayanan
‎2006 May 22 10:10 AM
Hi Lakshminarayan,
The exact requirement is to fetch the shipment number i.e Shipment notfication number.
I have the delivery as the input, one more issue here is that for the delivery there would be a select option so if no select option then all the deliveries would be considered.
this is the code i have written
DATA : BEGIN OF g_t_tknum OCCURS 0,
vbelv LIKE likp-vbeln,
vbeln LIKE vttk-tknum,
shtyp LIKE vttk-shtyp,
END OF g_t_tknum.
SELECT vbelv vbeln
INTO CORRESPONDING FIELDS OF TABLE g_t_tknum
FROM vbfa
WHERE vbelv IN s_vbeln
AND posnv = '000000'
AND vbtyp_n = '8'
AND vbtyp_v = 'J'.
‎2006 May 22 10:22 AM
See for getting the shipment document against a delivery no, you can go to table VTTP, pass the delivery no into the field VTTP-VBELN.
You can get the shipment document.
For getting the transportation planning point plant you can put a join against VTTK and VTTP and get the field vttk-tplst. This field is same as the plant where order/delivery/invoice has been issued.
Hope this solves your issue.
Lakshminarayanan
Message was edited by: Lakshminarayanan Jagannathan
‎2006 May 22 10:40 AM
‎2006 May 22 11:18 AM
Thankyou,
i was not aware of this will keep it in mind from next time to rewaard the points.
‎2006 May 22 10:09 AM
<b>RV_ORDER_FLOW_INFORMATION </b> Reads sales document flow of sales document after delivery and billing
Don't forget also check direct reference documents for the both starting document # and preceding/following document types that you are searching for (For example, if you search delivery for the given SO, check also LIPS-VGBEL and LIPS-VGPOS, if it's possible with regard to performance).
regards
vinod
‎2006 May 22 10:12 AM
Hi,
check these FM's <b>RV_FLOW</b>
<b> RV_ORDER_FLOW_INFORMATION </b>
Regards
vijay
‎2006 May 22 10:29 AM