Example Order and Invoice in the SDK examples

hi all,
i am programming with the DI API in VB6 and i want to perform a normal order and invoice transaction! The example which comes with the SDK is in .NET! How can i do this in VB6, because at the moment i have certain problems to combine the business partners with the corresponding items, they are selling!
Thanks for your help!

Hi
Here is an example of how to add a sales order. The invoice is very similar, just change the document type.
  Dim oBP As SAPbobsCOM.BusinessPartners
        Dim BPCodeStr As String
        oBP = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oBusinessPartners)
        Dim oOrderDoc As SAPbobsCOM.Documents
        oOrderDoc = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders)
        BPCodeStr = BPCode.Text
        If oBP.GetByKey(BPCodeStr) Then
            oOrderDoc.CardCode = BPCodeStr
            oOrderDoc.DocDueDate = Now
            oOrderDoc.Lines.ItemCode = Item1.Text
            oOrderDoc.Lines.Quantity = Qty1.Text
            oOrderDoc.Lines.Add()
            oOrderDoc.Lines.ItemCode = Item2.Text
            oOrderDoc.Lines.Quantity = Qty2.Text
            lRetCode = oOrderDoc.Add
            If lRetCode <> 0 Then
                MessageBox.Show("Not Added")
            ElseIf lRetCode = 0 Then
                oCompany.GetNewObjectCode(OrderStr)
                MsgBox(OrderStr)
            End If
        End If
Hope this helps

Similar Messages

  • Hide the cost and margin fields on Sales Orders and Invoices

    Hi all,
    I need to hide the cost and margin fields in Sales Orders and Invoices. We sell our products to our employees sometimes, hence we don't want them to know cost and margin information.
    Can this be done?
    Cheers

    Go to VOV7 & as per the Item category ,de - select the Check Box Determine Cost.
    Else remove the Condition Type VPRS & Margin Condition type from the Pricing Procedure
    Best Regards,
    Ankur

  • Apply different exchange rate types in sales order and invoice

    Dear Experts,
    How to configure different  exchagnes in sales order and invoice?
    For example, use average exchange rate in sales order but current exchange rate in invoice.
    Thanks!
    Regards,
    Wang Hui

    Hi all,
    I also need to apply different exchange rate between sales order and Invoice.
    E.g:
    condition type currency (komv-waers)          sales document currency (komk-waerk)         company currency (t001-waers)
    In my example, each of above currencies can be different:
    komv-waers = EUR
    komk-waerk = USD
    t001-waers = GBP
    I tried through VTFL transaction but it is not working in all situations cause VTFL allows me to manage situations where
    komk-waerk NE T001-waers
    But I need to convert condition types where
    komk-waerk EQ T001-waers but
    komv-waers NE komk-waerk
    Can I manage this situation through SAP standard and/or VTFL transaction?
    Is there any other solution?
    I really hope you can help me
    Thanks a lot
    Regards
    Andrea

  • Purchase Order and Invoice creation

    Hi All,
    I am having some fields related to Purchase order and Invoice creation, i have to find out the tables to which tables these fields belongs to.
    Below are the Header fields:
    Wrbtr  Tcode - MIRO,
    Lfsnr   Tcode - MIGO,
    Evertn Tcode - Me32k,
    Kbetr  Tcode - Me32k,
    Kschl  Tcode - Mek1,
    Selkz  Tcode - Mek1,
    Werks Tcode - Mek1,
    Evart   Tcode - Me31k,
    Frgco  Tcode - Me35k,
    Sddat  Tcode - Me35k,
    Below are the Detail fields:
    Kbetr   Tcode - Mek1,
    Konwa Tcode - Mek1,
    Lgobe  Tcode - Me21n,
    Planloc Tcode - Me31k,
    Datab   Tcode - Mek1,
    Datbi    Tcode - Mek1,
    Fromdate  Tcode - Me31k,
    Todate      Tcode - Me31k,
    i have to retrive all these fields from tables, so plz anybody give me exact tables to use in the select quries to retrive these fields.
    Thanks in advance,
    Balu.

    Hi,
    U can get the req fields as follows:
    Below are the Header fields:
    1)Wrbtr Tcode - MIRO- table rseg ,field-wrbtr
    give belnr (invoice no ) & BUZEI(item)  if known, else, give ebeln,ebelp.
    2)Lfsnr Tcode - MIGO,-table mkpf,give mblnr (mat doc no ) & ZEILE(item) field-xblnr  or give ebeln,ebelp
    3)Kbetr Tcode - Me32k,
    table:konp or konv.
    Pass ebeln to ekko, wil get KNUMV.Pass KNUMV as KNUMH  in 1 of the tables- konp or konv,wil get kbetr.
    4)Kschl Tcode - Mek1,
    Pass ebeln,ebelp to table ekpo, get mwskx(taxcode), u will get condition type kschl from FM -FI_TAX_GET_CONDITION_TYPES.
    or
    table:konh or konp or konv.
    Pass ebeln to ekko, wil get KNUMV.Pass KNUMV   as KNUMH in 1 of the tables-konh or konp or konv, wil get kschl.
    5)Werks Tcode - Mek1,-table-ekpo, field-werks(give ebeln,ebelp)
    Below are the Detail fields:
    1)Kbetr Tcode - Mek1,
    Pass ebeln to ekko, wil get KNUMV.Pass KNUMV as KNUMH in 1 of the tables- konp or konv,wil get kbetr.
    2)Konwa Tcode - Mek1,
    Pass ebeln to ekko, wil get KNUMV.Pass KNUMV as KNUMH in 1 of the tables- konp or konv,wil get konwa.
    3)Lgobe Tcode - Me21n,give ebeln.ebelp in table ekpo, get lgort.pass lgort to table t001l, u wil get lgobe.
    4)Datab Tcode - Mek1,table-konh,field datab
    Pass ebeln to ekko, wil get KNUMV.Pass KNUMV as KNUMH  in - konh ,wil get datab.
    5)Datbi Tcode - Mek1,table-konh,field databi
    Pass ebeln to ekko, wil get KNUMV.Pass KNUMV as KNUMH in  table- konh,wil get databi.
    Hope its useful to u.

  • Importing Sales orders and Invoices thru DTW

    Hi every one,
    I am facing a unique problem when using DTW to import sales orders and invoices through DTW.
    I am using the two templates- Documents and Document Lines. But the imported Invoice or the sales order(In both cases) the dicount field in the row is taking a negetive discount value. Let me elaborate....
    1. I am taking a BP which has been alloted a Particular pricelistcode in the BP Master.( say it be Purchase price).
    2. Now In the Doc_lines Template I have put the value in the price column- (eg. Rs. 500).
    3. Now the itemcode used in the template is already having a masters and the prices are also defined in SAP B1. Say the Purchase price defined for the item is Rs.400
    4.When I am importing the order/nvoice then the discount field in the row automatically takes a value of -25%, the unit price has the value Rs.400 and the Total Field shows Rs.500.
    ( this Implies that the price I have suggested to Import i.e. Rs500 is some how not taken by the system. The system takes the price defined for the BP and then adjusts it with the price suggested by the user during import) So a negetive discount is taken.
    On the other hand if the same procedure is followed for an item where the prices are not updated in the master data then there is no such problem. the unit price field reflects the price which is given in yhe template.
    please suggest a way to get out of this problem.

    Hi Debraj,
    Try the following..
    In Admin > System init > Document Settings > General Tab ..Calculate the Row total using Unit price ....... leave this  unchecked
    Also, at the Document_lines template fill the discount column with 0
    Suda

  • Report to list manual changes to conditions in sales orders and invoices

    Hi experts,
    Is there a Standard Report to list the manual changes of pricing conditions in sales orders and invoices?
    Should be a selection on the field KONV-KMPRS.
    Please advice.
    Rgds,
    Pri

    Hi priya,
    In the Sales Order,Select Environment and then Changes to See all Changes made.
    Follow the Same procdure for Invoice also.
    There is no Standard report as such to see the changes.
    Thanks,
    Neelima.

  • How to create Sales order and Invoice in Foreign Currency

    Dear All,
    What are the procedures I have to do to create the sale order and Invoice in Foreign currency.
    Is it enough if I maintain the currency in the Customer Master and Excahge rate OBBS.
    or
    We have to do someting in the Sales order (Change the currency document header level)?
    Kindly explain.
    Regards,
    Mullairaja

    Dear Mullairaja
    Under customer master you can maintain currency eg. usd, eur etc. that will do.. (hope you have maintain diift. Dist. Channel for Export sales and maintain Recon A/c for export revenue.) This will copy to Sales order.
    Under t.code OB08 we maintain the Currency Exchange Rates which will help for copying control.
    Under Displaying Billing document - Accounting -  you can click on Display Currency Tab,  here you will understand the rate conversion  i.e from USD to INR.
    Thanks & Regards
    Hrishikesh K

  • Creation of u201CHeader Textu201D in sales Order and Invoice

    Dear friends,
            Can any one guide me the complete configuration settings that are required for creation of u201CHeader Textu201D in sales Order and Invoice. Please help me to overcome this issue.
    Regards,
    Bhanu.

    Hello Bhanu...
    Hope you are aware of the configurations you need to maintain for the Text determination.Anyway, herewith are the steps that may help you to accomplish your requirement.
    Text Determination procedure for sales document header:
    Text can be determined at sales document header level or it can be imported from customer master. The process is...
    Define Text types:Path: Imgsales and distributionbasic functionstext controldefine text types
    Select sales document header. Click on text types go to new entries and define text types. For Eg:Z1
    Define Access sequence:
    Select sales document header
    Click on change icon
    Click on access sequence control button under dialog structure
    Go to new entries and define access sequence number with description.Ex: 55
    Save it and exit
    Define text determination procedure:
    Go to new entries
    Define text determination procedure.Ex: ZX save it and exit
    Assign text id's to text determination procedure:
    Select your text determination procedure(ZX)
    click on text id's in text procedure control button under dialog structure
    go to new entries and maintain entries. Text id:assign text id (Z1) that we defined in the previous step
    Specify sequence No-10
    Check Reference: this indicator specify that the text is reference or copies from preceding object
    Text in obligatory: text will be displayed during copying. the value of this field specifies whether text is obligatory or not and if it is obligatory the how it is to be displayed
    Apart from this... you also have to maintain the text in the Customer master as mentioned in the previous mail..
    For this you have to maintain the customer text.Do the following steps.
    1. Go to Customer master, Choose from the Menu Extras --> Text and mention the text
    2. Then in a sales order automatically wehn you are entering that sold to party..the header message will be appearing..
    In a nutshell i would request you to check weather you have maintained the Sales-Customer text KNVV and also that you have maintained all the required customizing settings for the text procedure, access sequence etc were completed....?
    Also make sure that the text type is also inclueded in the text determination procedure of the sales document header...
    Note: If all the settings of text determination exists and still if the text is not appearing then In sales document Header Text procedure, select sales header procedure, then select Texts in procedure. Check for the Header note, No. box is checked. This check mark ensures text is to be displayed when it is copied..
    Its should be working if all the requried setting are made....
    Reward if this helps..
    Thanks,
    Safeer Rahman

  • Inconsistent updation of sales group in Sales order and invoice

    Dear all,
        The sales office and sales group is properly updated in the specific sales area master data of the customer but not flowing in the sales order and subsquently in the invoice. For some documents it gets updated and for others the filed is blank.
    I have checked the master data and also the documents and found no errors. Please help in how to solve the issue. I need 100% updation of sales office and sales group in the order and invoice. Please advice how to solve the issue.
    Regards,
    Parthasarathy.R

    Dear Parthasarathy,
    Request You to post the same query in SD Forum
    You will get quick response there
    this is PP forum
    Hope You Understand
    Regards
    kumar

  • Change Picking data, then call Delivery Note and Invoice in the background

    I have designed a GUI where the picking data (from table LIPS) is changed.  Now my SD consultant wants the program, when a SAVE or CONTINUE button is clicked, to do the Delivery Note and Invoice in the background.
    To quote:
    Your progrm must change the values in the delivery in txn VL02n, when the delivery is saved it updates LIKP and LIPS amongst othr tables. When the invoice / billing doc is created it is done with ref to the delivery. Billing doc created using txn VF01, the main tables of the billing doc are VBRK (header) and VBRP (item).  And for completion sake, tables VBAK and VBAP are the sales order tables!
    In my PAI module, how do I do the calling of these two functions?
    The consultant suggested I use a BDC. Why can't I use Call Transaction.... ?   What is the best way to do this?
    At the moment, my SAVE button updates an internal table of LIPS, and for test purposes it exits to List Processing to test if the amounts changed correctly.
    Hope someone can help.

    Hi
    Ok.
    Do you mean "Accual GI Date" in Item overview ?
    I have performed a test. When I check "Goods Issue delivery" indeed it has posting date in the past.
    Now for the invoice:
    I set
    "Billing date"
    "Serv. rendered" date
    and "Prining date" in the past.
    Would it be enough to post everything in the last month ?
    regards
    Rafal

  • Material in order and invoice, but i don't want it appears in delivery

    Hi Gurus,
    I have a problem. I have a dummy material (insurance) which is a service. I want that material appears in order and invoice (va02, vf02) like a normal item, but i don't want this material in the delivery (vl02).
    I change item category for this dummy material to LEIS (service without delivery, before was DIEN, with delivery), but it still appears in delivery.
    I have to do it through materials. We have ruled out a solution based in price conditions.
    Can you help me? Have you some ideas what i have to do?
    thanks,
    Abel

    First of all, thank you to everyone has answered to my post.
    I've tried with some of your solutions and it works for take the material out of the delivery, but our problem still being there, because we have to do the billing from the delivery. When we do billing, this dummy material doesn't appear in the invoice.
    Maybe what I asked before is impossible, so i think  there's another option. The problem we have is about delivery note which includes this service. But, can I print the delivery note without this material? I wouldn't like modify the printing program, there's another option for taking the items which i don't want to see out of the output?
    thanks to everyone,
    abel

  • I just paid for and downloaded the wrong version of Adobe Acrobat X Pro. I downloaded the Microsoft version and I have a Mac running OX Yosemite. How do I get a credit for what I ordered and then reorder the correct Mac version of Adobe Acrobat X Pro

    I just paid for and downloaded the wrong version of Adobe Acrobat X Pro. I downloaded the Microsoft version and I have a Mac running OX Yosemite. How do I get a credit for what I ordered and then reorder the correct Mac version of Adobe Acrobat X Pro

    If you ordered Acrobat via subscription, then you can use either Windows or Mac version.  Just download/install the Mac version, then activate it with your Adobe ID.
    If you purchased the perpetual license, then you need to Contact Customer Care bu chat or phone.

  • Missing Weight in Sales Order and Invoice

    Hi  My Friends,
    We create first Sales Order then PR created automatically, then we create PO. Only at this time we know the net/gross weight, so we update the PO.
    We want this weight appear on the Sales Order and then on the billing document.
    Is it possible?
    Thanks
    R

    Weight information should come from material master. If you update the PO it wont reflect in SO.
    maintain the weight info in Material Master, Delete the line item created already & check.
    Otherwise maintain it manually in sales order

  • I've created an iphoto book and have ordered through "buy book" option. Now my family would like to order more, can they order and pay for the book using their apple ID?

    I've created an iphoto book and have ordered and purchased a number of copies through the 'buy book' option. My family abroad would like to order more, can they order and pay for the same book through their own apple account?

    No - you need ot order and have them pay you
    LN

  • Does LCCS work on iOS, such as iPhone? Can I use the SDK examples to develop an app for mobile?

    I'm working on a project to create an air application which will have a chat area, webcam, and open videos in real time. This should also work on iOS.
    Can I use the same examples in the SDK to create this app by using flash builder 4.5? Is there any tutorials will help me in this topic?
    One more Question, by using LCCS, can I open a loaded videos/YouTube videos in a real time? Is there is any tutorial or example? In the adobe LiveCicle Collaboration web site, there is an example for The Video Livingroom. Is there a tutorial/code for this example?
    Your help is really appreciated.
    Thank you
    Suha

    I think these guys had success on the iOS:
    http://forums.adobe.com/thread/855200?tstart=60

Maybe you are looking for

  • How do I install Photoshop on my new computer  using my original installation disc?

    I get a message that I must check a box that indicates it will search my hard disc.  Of course, the new hard disc has no record of installation.  It seems be geared for installing an upgrade.

  • Anyone experience "Zap" sound after loading Mavericks

    I loaded Mavericks and then Parallels 9 on my MacBook Pro.  Immediately following that upgrade, I began to hear at irregular intervals a zapping sound, like an arcing. The sound would immediately proceed some other sound (beep for an event for instan

  • InCopy workflow with packages

    I am using the InCopy CS5 workflow and sending icap files to external clients for editing. The client edited the file and then sent back an .idap file. If someone other than myself who made the original .icap files tries to update the Indesign templa

  • Error in unmarshelling

    Hi all I am reading multiple files from FTP server and updating them into database. below u can see is part of my code. (I checked my xml in test loader , its successfully unmarchalled) logger.info( "&&&& jcdEqStylesMdmToCdb: 1 " ); m_BatchFtpOut.get

  • SharePoint Document Upload Control and Office 2013

    Couple of users are using SharePoint 2010 site on Windows 7 via internet explorer 9. They are seeing a red X in the upload control. I checked and they are not using 64-bit edition of Internet Explorer. Tehy recently got upgraded to Office 2013. Has i