Get sales order from invoice

hello all.
i have two importent questions and i hope you can help me.
1. is there any way to get the sales order that the invoice is based on, in the xml and not as remark ? (can be as data and i will add it to the xml).
2. in sbo there is a option to print any document when it is added to the data base. i want to override this and disable this option using sdk for a specific form or client, how do i do that  please?
thank you in advance.
Alon

Hello Alon,
Answers:
2. in sbo there is a option to print any document when it is added to the data base. i want to override this and disable this option using sdk for a specific form or client, how do i do that please?
You can just turn this option off on specific documents (AdministrationSystem InitializationPrint Settings By Document tab).
1. is there any way to get the sales order that the invoice is based on, in the xml and not as remark ? (can be as data and i will add it to the xml).
Sure, you have to create a small addon, which locates the basis document of the invoice (eg delivery or sales order). If you have multiple sales orders as a basis document of the invoice, you has to save them by individually.
You can find here a query which uses a special feature of SQL to track the sales document flow
/people/janos.nagy/blog/2010/01/07/reqursive-queries-in-production-sales-analysis
Regards
János

Similar Messages

  • Condition Type to be excluded whil creating Return sales Order from invoice

    Hi Frnds,
    I have the following requirement.
    Sales order order is created and its delivered and invoiced too. This sales order has some freight pricing condition types (RCD1, RCD2...)included since its shipped to customer.
    When the customer wants to return the goods, there is a return sales order is created with reference to the invoice created above. Now, the RCD1 and RCD2... should not get copied to return sales order.
    How do i achieve this? Please let me know any user exit, BAdi or Enhancement spot where i can add code to avoide these condition types from being picked up.
    SAP system is ECC 6.0
    Regards.,
    Karthick C

    It can be achieved by implementing a custom requirement routine. If you go to the the transaction VOFM, you will find "requirement" in MENU. You select 'Pricing' on drilling-down it. Following document may help you in creating requirement routine..
    http://saptechsolutions.com/pdf/VOFMCopyRequirementRoutines.pdf
    All requirement routines has similar pattern of writing... Your code may look like as follows:
    FORM KOBED_901.
    sy-subrc = 4.            "By deault condition is false.
    If NOT XKOMK-AUART = 'RE'.                   "RE is returing order type.
       sy-subrc = 0.        "This means For other than returning orders all others condition is true.
    endif.
    ENDFORM
    Once you activate routine, ask functional consultant to attach this to the Condition RCD1 and RCD2. Then, You'll not get RCD1 and RCD2 for Return sales Order.
    Please check and confirm and revert back if you want further details..
    Edited by: Pikle Audumbar on Oct 17, 2009 1:09 AM

  • Get Sales Orders from R/3 to CRM

    Hi,
    I want to get a list of the latest 3 sales orders which were placed for a Business partner.
    The Sales orders are being created in R/3 and i want to be able to get this data into the CRM system.
    The CRM middleware is not configured to sync R/3 to CRM.
    How can i do this?
    Regards
    Shivani

    Hi Shivani,
    I am not sure whether I understood your question or not. But if you want to use standard MW to exchange the data then you need to do the following.
    I am assuming your R/3 and CRM are connected to each other ( check the same using tr. SM50 and test the connection from one system to other system)
    1> check the queues R3A* & CSA* are registered in transaction SMQR
    2> check the tr. SMQS for your destination system.
    3> check for the site R/3 - OLTP and check for the subscription ALL BUSINESS TRANSACTION (MESG) Subscripition. - > this is for data transfer from CRM to R/3.
    4> define the no. range for transactions and transaction types etc.
    then you can load the object SALESDOCUMENT using the transaction R3AS - put some filter for this adaptor object so that it will bring only those transaction which you want to.
    Reffer to the Best practice guide for further details. you can get this in site help.sap.com.
    Hope this will help.
    Thanks,
    Vikash.

  • Get Sales order from Billing document number

    Given Billing document number from VBRK-VBELN, how to get the Sales order number VBAK-VBELN?

    Please check table VBFA.
    Below code might give you some idea:
    PARAMETERS: P_VBELN TYPE VBELN OBLIGATORY.
    DATA: COMWA TYPE VBCO6.
    DATA: IT_VBFA TYPE TABLE OF VBFA,
          WA_VBFA TYPE VBFA.
    COMWA-VBELN = P_VBELN.
    CALL FUNCTION 'RV_ORDER_FLOW_INFORMATION'
      EXPORTING
       BELEGTYP            = 'M'
       COMWA               = COMWA
      TABLES
        VBFA_TAB            = IT_VBFA
    EXCEPTIONS
       NO_VBFA             = 1
       NO_VBUK_FOUND       = 2
       OTHERS              = 3.
    LOOP AT IT_VBFA INTO WA_VBFA WHERE VBTYP_N = 'C'.
       WRITE:/ WA_VBFA-VBELN.
    ENDLOOP.
    Kind Regards
    Eswar

  • How to right a logic to get sales order from agnetry in salesordercreateBAPI

    I am working on a Agentry project where I need to get the Sales Order number from backend SAP, for any newly created SalesOrder. When the User creates a new Sales order, he gets a local order id on the client device. When the user transmits data, the Original Sales Order number should be fetched from the backend.
    Kindly help me to create the JAVA coding for this task.
    Regards,
    Sumit Goyal
    Tags edited by: Michael Appleby

    Hello Surya,
    There is no such direct way to get the data but you can follow the below process.
    You can get this details by defining/designing a new Query.
    To develop a new query
    1. use SQ01 through infoset create query
    2. Use SQVI direct query by giving table.
    Purchase Requision :-
    Use Table EBKN  for the same and give field VBELN as selection field. Input your sales order it will give you the purchase requisitions exist against the sales order at output level.
    Purchase Order :-
    Use Table EKKN  for the same and give field VBELN as selection field. Input your sales order it will give you the purchase orders exist against the sales order at output level.
    Hope it will help.
    Regards
    AG.

  • Sales Office copying from Sales order to Invoice ( order related billing)

    Hi
    In sales invoice (vf01) is there any field for Sales Office.
    In order related billing . how we can copy sales office from sales order to Invoice.
    Regards\Adnan

    Hi Adnan,
    In Invoice you can find Salees office filed In the Item data >in the Item Detail tab>under Sales Order Data here you can get the sales office which you enter in the sales order.
    I hope it will help you,
    Regards,
    Murali.

  • Any function module or bapi to get sales order number and invoice number?

    hi all,
    with delivery order number provided, do we have any function module or bapi to get sales order number
    and invoice number?
    thanks.

    Hi,
    Check
    BAPI_SALESORDER_CREATEFROMDAT1
    BAPI_REMUREQSLISTA_CREATEMULT  Agency Business: BAPI Create Invoice Lists from Vendor Billing Documents
    BAPI_REMUREQSLISTB_CREATEMULT  Agency Business: BAPI Create Invoice Lists from Payment Documents
    BAPI_REMUREQSLISTC_CREATEMULT  Agency Business: BAPI Create Invoice Lists from Posting Lists
    BAPI_REMUREQSLIST_CHANGEMULT   Agency Business: Change Invoice List Documents BAPI
    BAPI_REMUREQSLIST_GETLIST      Agency Business: BAPI Determine Detailed Data for Invoice List Documents
    BAPI_REMUREQSLIST_RELEASE      Agency Business: BAPI Release Invoice List Documents to FI
    Edited by: Neenu Jose on Nov 26, 2008 8:53 AM

  • Which table I can get sales order no from delivery numbar.

    Hi,
    I want sales order no from delivery no. right now I am using table VBFA where I am passing VBELN and POSNN and geting sales order no. but performance of select query is very poor bcouse I am not passing first two key fields in the select query.
    Is there any other tablefrom where we can get sales order no. from delivery no. so that performance of report can be improved.
    Thanks,

    hi,
    sales doc header ( table VBAK ) copy to Delivery header table( LIKP)
    sales doc item table ( VBAP) copy to Delivery item table( LIPS)
    you can see this in copy control VTLA ,
    now u want slaes doc no. from dilv doc. no.
    so go to t-code se11.....
    fill table LIKP u will get VBELN field for deliv doc no, & TERNR field for sales doc. no.
    so if u want to call sales doc no from dilv doc no.. u can use table LIKP in ur report.
    i hope it will help u.

  • RFC to get sales orders for customers from r/3 to crm ..

    Hello,
    Is there already a FM (RFC) in place to get the list of sales orders from r/3 to crm.
    CRM middleware is not configured to get this data from r/3 to crm .. so am looking out for a r/3 FM module which i could call from crm system to get the sales orders as an export parameter ..
    Regards
    Shivani

    Hi,
    If you are replicating the sales order from R3 to CRM then you will get all the orders present in CRM. If that is not the case then you need to write one RFC in R3 to get the desired data as R3 is governed by Select queries on tables instead of Function modules in CRM.
    So if you want to fetch any information from R3 then you need to create RFC and use select query to get the data.
    Thank you.
    Ashish

  • Text copy from customer master to Sales order and invoice

    Dear friends,
    when i maintain the text in the customer master ther needs to copy to sales order and from sales order to invoice.
    Can you please guide me how to do this config
    Thanks
    Raju.

    Dear Raju,
    First you need to do the Text determination for all areas(i.e Customer Sales and distribution,Sales order header,delivery header and billing header) through VOTXN transaction.
    -->Create the Customer text ID under Object KNVV
    Maintain the text for Text ID in the customer master >sales area data>Extras-> Text
    To copy the customer text to the sales order you need to keep KNVV table as Text object in the sales order text access sequence for the text ID.
    If you want to copy the sales order header text to the invoice header first you need to copy the sales order header text to the delivery header from delivery you can copy to invoice.
    When you want to copy the Text from Sales order to delivery the Access sequence will place a role
    If you want to copy the sales order text to the delivery document The Text Object should be VBBK in the delivery Header Text determination access sequence for that Text ID
    Again you can copy the text from delivery to Billing document through checking the Delivery Text field in the billing document detail screen (Top most bottom of the screen).
    Go to VOFA transaction select your billing document type then go in to the details here you can find the Delivery Text field you just check that check box.
    Now system will copy the sales order header text to the delivery header then it will copy to the invoice header.
    I hope this will help you,
    Regards,
    Murali.

  • Flowing of the Condition  type from Sales Order to invoice

    Dear All,
    I'm facing a problme in the copying the condition types from Sales order to Invoice.
    The details are as mentioed below:
    I have a Condition type CONC and made the Copy of the Condition typs as ZDIS.So that CONC's value will be debited and ZDIS' value will be credited in the FI..
    But ALL the condition types which i have mentioed including tax and discounts condition types are copying from Sales order to invoice.Except CONC.
    I have checked all the copy controls,i'm sure those are OK.Bcoz other condition types are working perfectly fine.
    What could be the reason for this???
    Will be any setting for on condition type level for copy controls???
    Please Guide me its URGENT.
    Thanks
    Vinay

    hi
    from which condition type u have copied this CONC , can u pl elaborate more on this.
    and just write what is exact scenario and whats going wrong?
    in copy controls check for pricing source and pricing type.
    regards
    mandar

  • How to get sales order data in substitution of fi-docu from GM posting ?

    How to get sales order data in substitution of FI documents from goods movement posting?
    When I posting a material document with movement type "501E", the system will creating a FI document automatically. And I need to get the sales order data in the substitution of FI document.
    I tried to export the data of the material document in user-exit "MB_CF001 Updating of material document data upon posting", but this user-exit does not triggered in the posting process at all. what's the problem?
    Do you have better solution or idea for this? Please help me. Thank you!

    Hello Harish,
    Please use BAPI_BUSPROCESSND_GETDETAILMUL to read details of sales order. This works as a remote enabled counterpart of CRM_ORDER_READ.
    Similarly if you want to display sales order from R/3, use FM BAPI_BUSPROCESSND_DISPLAY.
    Regards
    Kaushal

  • Load Sales Order from Xml file

    Hi,
    I want to load a sales order from xml file. How can I do so? Where I'll get the xml schema for Sales Order or other documents (delivery,invoice etc)?
    Plz reply with code and xml file.

    When I'm going to load SO from xml file, it's showing an error:
    "The connected value 0 was not found in table Uasge of Nota Fiscal".
    What is this table for? Which attribute is related with this table?
    How can I find out that?

  • Sales order to invoice AR flow, SD involved

    hi,
    I have to give demo to my client on AR.
    Its a full flow from Sales order to till the money deposited in our bank account.
    For this process a sales order, delivery, invoice , customer, gl account, and bank shold be involved.
    I hope i explained the issue clearly ,, if still any info needed ,, get back to me.
    Thanks in advance
    Thurla

    HI,
    I want full flow from selling of goods to till we get the money deposited in the bank.
    In that process a sales order, delivery, invoice documents should be involved.I guess all r that in SD module.
    Thats the core requirement and anyways there will be a gl a/c, customer and a bank will be involved in this process.
    I hope the query is much clearer
    Thanks
    Thurla

  • Sales order to invoice ... using web service

    I am trying to take the released sales order all the way to invoice.
    Sales Order > Release >  Delivery Propsal > Release > Invoice Request
    Once I am at Invoice Request the status of my sales order (invoice) is "Processed" when it should be "To Be invoiced"
    I am not clear on this:
    When I am at Work Center : OutBound Logistics > Delivery Control: Delivery Proposal
    How and which web service do I use to "Post Goods Issue"(in the GUI when "Post Goods Issue" button is clicked it requires you to fill out "Actual Quantity").
    In this screen shot:
    the first item was create through the GUI use the Devlivery Propsal "Post Goods Issue" button.
    the second item was created through ManageSalesOrder web service.
    Any feedback will be greatly appreciated!

    HI,
    I want full flow from selling of goods to till we get the money deposited in the bank.
    In that process a sales order, delivery, invoice documents should be involved.I guess all r that in SD module.
    Thats the core requirement and anyways there will be a gl a/c, customer and a bank will be involved in this process.
    I hope the query is much clearer
    Thanks
    Thurla

Maybe you are looking for

  • Converted songs from Windows Media Player to itunes show up in the library but will not play

    I just installed itunes for the purpose of converting my Windows Media Player library to itunes.  I went through the install and added the music folder.  itunes went through the conversion process overnight and all of my songs appear in the music lib

  • How do I correct fine line across screen?

    A fine line has developed from top to bottom of my computer screen (system 10.5.8). Is there any simple way to remove it?

  • JButton border not visible

    Hi I have an swing app which works fine on a 1024x768 resolution, ie the GUI components are displayed okay. I tried to run the app on a screen with high resolution 1280*1024 and the button border is not visible. It just shows the text and the image i

  • Firefox keeps opening a YouTube tab over and over

    I have two separate PCs that run the latest version of Firefox. The homepage on both is the same...www.centurylink.net When Firefox has been opened for a couple minutes it adds a tab of a YouTube page of a McDonalds Super Bowl commercial. As time goe

  • Added A/R invoice with Serial or Batch

    why i keep get this error? [INV1.WhsCode][line: 1] , 'The selected quantity of batch/serial numbers is greater than the open quantity. the quantity is more than enough any idea?