A FM for the Sales Document Flow ...?

Hi Friends;
I know that the Sales and Distribution Flow is kept in table VBFA .? But is there a ready function module that gives me the shipment note number  and invoice number taking reversals into consideration and giving the actual and final flow of sales order item ?
for example : input     SALES Document : SD001 item 10
                    output   shipment Notice    : 8000001 item 10
                    output   invoice number      : 9000001 item 10
Kind regards.
Erkan VAROL.

Hi,
look for example to BAPI_SALESORDER_GETLIST
CALL FUNCTION 'RV_ORDER_FLOW_INFORMATION'
Please check table VBFA. It contains all the information about document flow in SD.
Check the example program below, it is not a function call, it is a dialog call.
(Or)
report zrich_0001.
data: xvbco6 type vbco6.
data: xvbak type vbak.
parameters: p_vbeln type vbak-vbeln.
clear xvbco6. clear xvbak.
select single * from vbak into xvbak
where vbeln = p_vbeln.
move-corresponding xvbak to xvbco6.
call dialog 'RV_DOCUMENT_FLOW'
exporting
vbco6 from xvbco6
ivkorg from xvbak-vkorg
ivtweg from xvbak-vtweg.
Regards

Similar Messages

  • Error in e-commerece The text for the sales document TA RU lacking in langu

    Hi GUYS,
    I am having a e commerce scenario.
    I have done all the settings related to it. When I login with a user in EN language, and try creating a sales order ,I am able to create in e commerce.
    I have created another user with login in russian language.When I try to create a order in front end I am getting the error:
    The text for the sales document TA RU lacking in language.
    Please suggest if I have to maintain any setting specific to RU language in R/3.
    Thanks and regards,
    Nilesh

    Hi
    Please maintain the language for that sales document type using the following path...
    IMG(SPRO) - Sales and Distribution - Sales - Sales Documents - Sales Document Header - Convert Language for each Sales document type - execute and maintain the entries using 'New Entries' tab.
    Thanks,
    Ravi

  • Sales document flow(vbfa) entries are deleted

    Hi Guys,
            I am facing a problem with VBFA table. Actually for some delivery i am able to get Sales order number from VBFA table but for some delivery there is no records exists in VBFA table. So just want to know is there any program or Funtion module which delete entries from VBFA table if not then is there any functional configuration which not allowed to enter data in VBFA table. In my system i searched for all the programs and function module  but no luck.
    I can saw the Sales document flow in VL03N but no entries in VBFA table.
    thanks,
    Baidya

    Hi  Guys,
          Thanks for the replies.
    But this is true for some delivery there is no entries in VBFA table but entries are exist in LIKP and LIPS. We are using userexit in sales order program for creating delivery. The Function module  which creates delivery inside the USER-EXIT is : BAPI_OUTB_DELIVERY_CREATE_SLS.
    If anyone face this type of problem please reply..
    Thanks,
    Baidya

  • Sales document flow table VBFA

    Hi All,
    What exactly the meaning of sales document flow how the data in table VBFA  is filled I mean from which Tcodes this table data will be filled?
    I am calculating the open quantity of a particular sales document which the data (quantity delivered vbfa-rfmng ) I have to take from table VBFA and subtract this from the order quantity(vbap-kwmeng).
    Thanks&Regards
    Mahesh

    Use SE16 see the fields of VBFA.
    Normally the sales document flow is SALES ORDER -> DELIVERY-> INVOICE.
    For a particular case it can be
    SO -> Del -> PGI -> Inv -> SO (Return) -> PGR -> Inv (RE-Type) and so on.
    If we know the document no of any one of them thru VBFA we can get the precceding and the following document.
    Thanks,
    Ashish

  • Sales Order -- Purchase Req -- Purchase Order ..... Sales Document flow??

    Hi Guys,
    We have a process where we proccure few parts externally. When a sales order is created in our system based on the item category config we are able to create a purchase requition automatically. This Preq is further used to create a PO based on which the purchasing group proccures the part from the vendor.
    We are trying to identify if there is a way to find out a way if we can relate the PO number created in the sales document flow? Currently we are not able to view the PO number in the sales document flow. We are trying to identify if this is possible and if yes what needs to ne configuered to enable PO number linking in sales document flow?
    Any pointers?
    Cheers
    VJ

    Hi Bikash,
    The PO field which u r referring to on the VA01 screen is the PO number against which a SO is created. This PO number is the customers PO number. My requirement is i need to store the Intercompany PO number which is the PO number created to procure the part externally from the vendor. So its the vendor PO number and not the customer PO number.
    Secondly if i try to misuse any other field to store this PO number it dosent make sense as it would not show up in the document flow screen so it would be of no use to us. We want to enable it the std way and i am sure SAP has provided some way to do it.
    I check the OSS notes and found some interesting tips working on that hopefully should be able to resolve it.
    Cheers
    VJ

  • How can I get the correct Ship To (KNVP-KUNNR2) for a Sales Document?

    I am trying to generate a report that will (among other things) display the Ship To ID and Name for a given Sales Document.  I know the following information:
    VBAK-VBELN - Sales Document
    VBAK-VKORG - Sales Org
    VBAK-VTWEG - Distribution Channel
    VBAK-SPART - Division
    VBAK-KUNNR - Sold To Party
    I know that the table KNVP will return a list of Ship-To Customer numbers (KUNNR2) for a Sold-To Customer (VBAK-KUNNR) if I also filter by VKORG, VTWEG, and SPART (using SE16N).  What I don't know is which one of the returned values is being used in a particular Sales Document.  The customer in question has 29 Ship-To locations.  How do I find out which Partner Counter (KNVP-PARZA) the Sales Document uses? I don't know where that value would come from.  Once I can get the correct Ship-To Customer Number, I should be able to search the table KNA1 by WHERE KUNNR = KNVP-KUNNR2 and return KNA1-NAME1 for the Name of the Ship-To location.

    For a sales document?  Use VBPA with PARVW = 'WE'.  Also, use the ADRDA field to determine whether the address on the document has been manually changed.  In any case, you can use one of the many address management functions or just ADRC directly to get the name, address, etc., using the ADRNR field from VBPA or if the address is from the customer master, KNA1.

  • Standard programme for sales document flow

    hi
    Can any one tell me what is the standard report for complete slaes document flow
    Thanks
    Alka

    Hi,
    There is a standard FM:
         CALL FUNCTION 'RV_ORDER_FLOW_INFORMATION'
               EXPORTING
                  COMWA               = comwa
               TABLES
                  VBFA_TAB            = VBFA_TAB
               EXCEPTIONS
                  NO_VBFA             = 1
                  NO_VBUK_FOUND       = 2
                  OTHERS              = 3
         IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
    * Get PGI Document
         clear w_pgi_document.
         loop at vbfa_tab where vbtyp_n = 'R'.
              w_pgi_document = vbfa_tab-vbeln.
         Endloop.
    * Get INV Document
         clear w_inv_document.
         loop at vbfa_tab where vbtyp_n = 'M'.
              w_inv_document = vbfa_tab-vbeln.
         Endloop.
    * Get a/c Document
         clear w_ac_document.
         loop at vbfa_tab where vbtyp_n = '+'.
              w_ac_document = vbfa_tab-vbeln.
         Endloop.
    I hope this helps,
    Regards
    Raju Chitale
    Edited by: Matt on Dec 12, 2008 8:35 AM - Please use  tags around your code.  See how much better it looks!

  • FM for unlocking the sales document

    Dear all,
               I need to know if there is any function module which unlocks the sales document.I have a problem with CRM system,it creates the sales order thr bdoc but with another material and the sales document cannot be opened in the edit mode.I tried using DEQUEUE_EVVBAKE.But its also not working may be i am passing the wrong parameters to this FM.Please help me out.
    Reward points are Guaranteed

    Check the below thread .
    Lock Objects
    Regards,
    Maha

  • How to populate the billing plan tab for the sales order inbound

    Hi Team,
    I am new to IDOCS, I have a requirement like IDOC extension of the sales order inbound.
    Can anyone explain in brief how can i add billing plan tab in  the IDOC extension for the Sales order inbound.
    Thanks, 
    Barathi

    U need to use the table vbfa or fololow thw link
    [http://www.erpgenie.com/sap-functional/sd/read-sales-document-flow-using-a-function-module]

  • Incorrect VBFA entries for SO - PO document flow

    Hi,
    We are using a Third Party Sales orders delivery. I am facing a peculiar problem.
    Sales Order Created -> PR -> PO Created
    After PO is created, user has altered the Material Number and Ref. PR document number in PO for two items. That means the items were swapped (Ex. Items 220 & 230)
    GR is finished with confirmation from third party.
    When I see the SO document flow for each item say 220 - its shows both the PO items (220 & 230) actually it should be only 230 item inPO. The same case in the document flow of SO Item 230.
    Is there any program which corrects the incorrect VBFA entries for SO - PO flow. Already tried with program SDVBFA21 and its not working.
    My system is: ECC 6.0
    Thanks in advance for your help.
    Regards,
    AK

    Hi,
    Check the note 521416, this note give you a correction report.
    I hope this help you,
    Regards,
    Eduardo

  • CIN - Excise value posting for the material document

    Hi,
    We have assigned the routine 356(FV64A356) in the Pricing Procedure for Depot Sales where Service team issues components for the Service repair job through a Goods Issue(MIGO-261 Mvt Type) document.We are also able to create a excise invoice for the material document.
    The flow is Service Order - Goods Issue - through resource related billing a DMR is generated for the labour as well as the Goods Issued(MIGO-261), from DMR a debit memo is raised to invoice the Customer.
    The formula in the routing is, during the creation of Billing or Proforma document it picks up the excise value posted for the delivery if the excise has been posted,if the delivery is not found, then it continues with the excise value calculated in the sales order (DMR in this case)
    Is there any way or any other routine "to check for the excise value posted for the delivery ,if the delivery is not found, then check for the material documents if any linked to DMR(through Service Order)".
    Could anyone help in this regard.
    Thanks,
    Ramki.

    Hi,
    While creating the excise challan using J1IF01 you can see a excise invoice selection tab, Select the J1IF01 line item & click on this tab, here you can select the excise invoice from which the base amount will be determined.
    Thanks & Regards,

  • How to get the delivery number for the sales order

    hi
    how to get the delivery number for the sales order

    Hi,
    1. IN VA03, enter the sales order and click on the document flow button. From there you can check the delivery document.
    2. In SE11, enter VBFA(Document flow) table and enter the sales order in VBELV field and in VBTYP_N field enter 'J' to specify that you want to check if there is already a delivery document for that sales order.
    Hope it helps...
    P.S. Please award points if it helps...

  • What are the img setting to be fullfilled while copy the Sales document typ

    Hi What are the setting to be fullfilled while copy the sales document type and item category.
    Note:  I have already copied, but unable do the PGI(Post goods issue),  and Billing.
    Thanks
    Prasanna

    Hi
    Answer for this Question.
    we have set the copy control for sales order type and delivery and billing
    Regards
    Prasanna R

  • Special stock indicator for the sales order (VBAP-SOBKZ=)

    Dear All,
    I am getting a warning message while making an initial entry of stock with Mov.Typ : 561 and Special Stock Indicator (E), i.e., "The special stock indicator for the sales order (VBAP-SOBKZ=)is different from the special stock indicator in the goods movement.
    The system is allowing to post the initial entry of goods but when I am trying to do a PGI, it is throwing an error saying that, deficit of stock in the specific storage location.
    Can anybody help me out with this problem ?
    Reward points shall be awarded.
    Rgds,
    Indrajit Dey

    Hi Indrajit,
    Please post the stock with Special Stock Indicator (E), and againest sales order and item.
    Go to MB1C transaction enter Movement type,Plant and special stock indicator E.
    After that you enter Sales order Number and Item then save the document.
    Noe you try to do PGI,
    I hope it will help you,
    Regards,
    Murali.

  • How I can get the Billing Type for the sales order and its items

    How I can get the Billing Type for the sales order and its items. I mean from which SAP tables and how?

    Hi,
    You need to use two tables.
    First use VBFA. Enter the sales order number in the field Predecessar and the value M in SubCt field. This will give all the billing document number for the sales order items.
    Then use the billing document numbers in table VBRK, where in you can get the billing document type.
    Regards,

Maybe you are looking for