I need to create automatic invoice(vf01) on click of pgi.so which Bapi?

Hi all,
           I need to create automatic invoice(vf01) on click of pgi.
so which bapi shell i use and how shell i pass   outbound deliver((likp-vbeln) to document (KOMFK-vbeln) through that bapi.
Is BAPI_BILLINGDOC_CREATE is correct bapi to do so.if it is then what i have to pass in parametres.
Please suggest me.
Regards,
Himanshu

Hi,
  Thanks buddy for your kind support. Now i have below code ..plese check.
tables:  nast.
  data : bb like BAPIVBRK occurs 0 with header line ,
         re like BAPIRET1 occurs 0 with header line ,
         ss like BAPIVBRKSUCCESS occurs 0 with header line .
        bb-REF_DOC = nast-OBJKY.
       bb-REF_DOC_CA = 'J'. " commented"
          append bb.
CALL FUNCTION 'BAPI_BILLINGDOC_CREATEMULTIPLE'
EXPORTING
  CREATORDATAIN         =
  TESTRUN               =
  POSTING               =
  TABLES
    BILLINGDATAIN         = bb
  CONDITIONDATAIN       =
  CCARDDATAIN           =
  TEXTDATAIN            =
  ERRORS                =
    RETURN                = re
    SUCCESS               = ss .
I have to chek whether it works or not.
Regards,

Similar Messages

  • Help needed for creating 1 invoice for 2 different material types.

    Dear, Gurus
    I really need help here I have spent 3 days cracking my head trying to solve the problem. Problem is client was creating invoice with reference to order and while invoice was being made it would cause an invoice split. The materials involved are Trading Good and Service Material. They would like only 1 invoice. Note nothing was different except material group and item cat. of the material. payment terms billing dates partners everything is same.
    Current item config for Trading Good material is ZMPI-project item cat.
    Copying requirements   023  Item ord.ref. w/o AZ        Billing quantity     A
    Data VBRK/VBRP         000                                           Pos./neg. quantity   +
                                                                                    Pricing type         K
                                                                                    PricingExchRate type
                                                                                    Price source
    Current item config for service Material is TAD-Service
    Copying requirements   002  Item/order-related          Billing quantity     A
    Data VBRK/VBRP         001  Inv.split (sample)            Pos./neg. quantity   +
                                                                                    Pricing type         G
                                                                                    PricingExchRate type
                                                                                    Price source
    I was told to change Data VBRK/VBRP to 003 One Invoice which I did in both of these item cat. and yes they worked perfectly but at time of creating the invoice for service material the qty that showed was 11. Note: In sales order it is 1 qty. So I went back into the config of item cat TAD and changed copying requirement to 023 instead of 002 but nothing changed. Seems a qty of 10 is referencing something else which I have no idea what or where it is picking this up from. Just to see or test things I went into the sales order and tried changing the service material qty then a weird popup appears and says service order 12344456 has been blocked. (Seriously I have no idea why this would happen or should be existing at all.) Even if for some reason it is being referenced the service order that is existing is qty 1.
    I really really do need help and if someone can help me that would be god sent.
    Regards, Ali

    You did not mention what value is maintained in the field billing quantity in the copy control->Item settings. Check for the service item, what value is assigned. Put value A and re-test.
    Note that whenever you change any settings in configuration side, you need to create a new documents to test the results of the settings. You should not use the existing documents.
    When you say the document is blocked, then check the status of the sales order to find the reason for blocking (like credit block, approval etc)..
    Regards,

  • Which BAPI is needed to create an Invoice in SD??

    Hi everyone!
    I hope you all fine. I really need help to find a BAPI that makes the process of creating and registering the invoice number in SD module, also if anyone can tell me how to fill it with information so I can test it, if anybody can help me with this I'll relly appreciate it.
    Thanks for your time.

    HI
    Try with this function module 'BAPI_INCOMINGINVOICE_CREATE' is called to create Invoice.
    For sample code please use the below given link:
    http://www.geocities.com/rmtiwari/Resources/MySolutions/Dev/Integrations.html#7
    Thanks,
    Naga

  • Need to create menu on mouse right click

    I have a web application with frames with one frame have a tree.
    Now i want to right click on one node and say "Copy" the node to another location in the tree..
    My problem is that i am able to get how to create the menu option on right click.
    Can anybody suggest how to acheive this

    i'm pursuing the same thing. i believe ONE way of doing it is to add an ActionListener to the component, whether it be the frame or the node component you speak of. compare the action event object to the right click of the mouse, if it's true the trigger a menu, and ideally place the menu object next to the x,y coordinates of the mouse cursor (either to the left or to the right depending on where on the screen the cursor is.
    as far as how a menu is created i do not really know and would also like some information on that.
    i'm guessing it should be related to the JMenu object (directly a subclass of JMenuItem which in turn is a subclass of AbstractButton). That's a good place to start from. let me know if you get anywhere on this.
    -William

  • Automatic Invoice and PGI after salesorder(userexit_document_save)

    Hi All,
    Here my requirement....
    I need to do automatic Invoice and PGI for cash sales in Sales order.
    For this, I coded inside the userexit_save_document, in this userexit i'm getting the sales order number to create Invoice and delivery number to create PGI but the issue before this userexit the sales order and delivery are created but not yet committed. So, when I am trying to create pgi and invoice in this exit.... it says the document doesn't exit.
    Could anyone suggest me an methos to do that.
    fyi: in my current approach for PGI im executing the standard report 'WS_MONITOR_OUTB_DEL_GDSI' using submit by passing the delivery number .............output says 'document don't exist'
    for Invoice : I recorded the transaction 'VF01' and updating using bdc in funtion module, this function module is called from userexit_document_save using 'call function zffucn IN UPDATE TASK'..........this creates runtime error and shortdumb. when I looked in sm13 error says '00 671: ABAP/4 processor: POSTING_ILLEGAL_STATEMENT' , short text says 'Statement "CALL TRANSACTION" is not allowed in this form.'.
    is there any better way to do this???
    any suggestion will be appreciated
    Regards.

    Hi,
    I tried using perform ...ON COMMIT....
    Now i can clearly see that the sales order and delivery is created (message is displayed in the status bar)..
    when i debug the code.....this is executed at last i.e  but still it shows that 'Document xxx does not exist'. SO, I believe it is not yet committed to database.
    If I exit from that screen and enter into vf01 or standard report then it works...so its getting committed only getting out of that transaction ....i think there is some small change is missing...could anyone give suggestion.
    regards.
    Edited by: Shankar Raju Devadoss on Mar 17, 2011 11:07 PM

  • Creating Excise Invoice from Sales Delivery using DI API.

    Hi Experts,
    I have been searching a lot for any Business Object for creating Excise Invoice base on Sales Delivery using DI API.. But have not yet found any one.
    I want to create Invoice for excisable items from Sales Delivery using DI API.,for Excisable items we cannot create standalone A/R Invoice . We need to create Excise Invoice also . But How to create Excise Invoice based on Sales Delivery using DI API. Is there any Business Object for that.
    Please suggest me.
    Thanks and Regards,
    Pooja Singh.

    Hi all,
    I have not received any reply for this thread. Does this mean that there is no provision for creating Excise Invoice from Sales Delivery ? Actually I was asked to create sales delivery and then Outgoing Excise Invoice and then Sales Invoice using DI API.
    But I don't find any Business Object for this in SDK ? Is it really not possible to create Outgoing Excise Invoice from Sales Delivery using DI API.? If possible then how?
    Please reply me if anyone has got any idea in this regard.
    Thanks and Regards,
    Pooja Singh.

  • How to create an Invoice using a BAPI call from XI and trigger the sameIdoc

    Hi XI Gurus,
    I have a senario where in I need to create an Invoice from a XI using BAPI  and then I need to auto tigger the same INVOICE IDOC whcih has been created and this has to converted into EDI using Seebuger Adapter.
    1. How can be this achived??
    2. What is the BAPI that I need to use to create Invoive from XI
    3. What are all the configurations that I need to do to atuo tiggert an INVOICE Idoc when it is created.
    Please Help......
    Thanks in Advance...
    Suma

    Hi,
    Are you looking for BAPI <b>BAPI_ACC_INVOICE_RECEIPT_POST</b>?
    Hope this helps (please reward me if it does).
    Regards, Joerg

  • How ca we create an INVOICE using a BAPI and triggring the same IDoc

    Hi Gurus,
    I have a senario where in I need to create an Invoice from a remote using BAPI and then the INVOICE IDOC has to be triggered for external purpose.
    How can be this achived??
    Help me as early as possible.
    Thanks in Advance...
    Suma

    Hi,
    Are you looking for BAPI <b>BAPI_ACC_INVOICE_RECEIPT_POST</b>?
    Hope this helps (please reward me if it does).
    Regards, Joerg

  • Create STO Invoices Flow from STO PO

    Hi,
    I need to create STO invoice but I m stuck in the Shipping Doc Flow.
    Here are the steps that I had completed.
    1) Create STO PO.
        - Purchase Doc Type: ZB
        - T-COde: ME21N
    2) Create Outbound Delivery for STO PO
       - T-Code: VL10B
    3) Create Shipment with reference to the delivery
       - T-code: VT01N
       - I executed the Planning, shipment start, shipment & Shipment Completion in Deadline Tab.
       4) Create Shipping Cost Doc
       - T-code: VI01
    I put in the Shipping Number and execute.
    Why the NET Value becomes 0. And because of this, I cant transfer the shipping cost calculation.
    appreciate helps.
    Thanks.

    Hi,
    When I do a VI02, i tried to save with the Transfer checkbox check, but i got this error.
    Shipment costs 0000001081 item 000001 cannot be transferred (value 0)
    Appreciate helps.
    Thanks.

  • I need guidance putting an invoice together and printing it out...

    My next big task is pulling informaton from my DB, organizing it into an invoice template and then printing it out.
    I know the DB stuff but what do I need to use in order to organize that information into a pre-designed invoice and then printing it out with a single press of a button?

    nise_k,
    My program handles customer accounts and all of the transactions that I do with them. I need to get my program to print out invoices with certain information taken from the DB and organize it into an easy to read and professional looking invoice.
    I have allready figured out how to use the Print Class so I'm pretty sure I have the information I need to create these invoices.
    The "Single press of a button" comment was referring to just pressing a "Print Invoices" button located somewhere in my program that would print all of the invoices instead of going to a customer account, clicking "Print Invoice", preview the invoice, and then print it before going on to the next customer.
    I think the only way you could help me at this point would be if you know about a class that will take a .txt or .doc file, replace words like %CUSTOMERID% with the correct information from the DB and then printing that document without changing the layout of the invoice.

  • DEEMED INVOICE : Not able to create deemed invoice when the excise invoice

    Hi guys,
         when i create an excise invoice in background .and try to create ARE-3 in J1IA301.I am getting a error (081091004/2009 excise invoice is meant for normal invoice).
       when i create excise invoice manually  and click on goto - utilization . The excise invoice type will be local .If i click on the pencil tab it will change to EXPORT  and we can see DEEMED in blue color after this i will save and create ARE-3. ARE-3 gets generated.
      while creating excise invoice in background the EXCISE INVOICE TYPE in J1IIN will be LOCAL and we will not be able to change after this when i try to create ARE - 3 IAM GETTINGTHE ERROR..
        Please help me out of this..
        As my client wants to create the excise invoice in background while billing document is created..
    Regards,
    Shivdeep B

    Hi
    Maintain the default excise group and series groups and here select the deemed export and try
    maintain as D in export type as DEEMED
    regards

  • How to create a Sales order with ref. with serial number using BAPI

    Hi Gurus...
    I have a requirement where,  i need to create an order with reference to serial number using a BAPI.
    The inputs will be the Order type..Sales area..Sales office..Sales group..Sold-To-party..Material number...Serial number...
    When i create the order using VA01 the configuration data will be automatically copied from the BUMP order which will have all the required information.
    But to create using a BAPI, i am struck ed..Please help
    Thanks in advance..
    Srinu

    You can use this BAPI.
    You can pass ITM_NUMBER to the ORDER_ITEMS_IN parameter. I think this will act as serial number.
    Regards,
    Murali

  • Need to print a pdf on button click

    Hi,
    I need to do something similiar to what the code is doing below, except I need to create a button that when clicked will print a pdf. Not sure if it is better(easier) to add the pdf to my library and print that way or just upload the pdf to the server and print that.
    anyway here is the code I have sofar. Not sure exavtly what I need to change/modify.
    package com.wiley.as3bible.printing {
        import flash.display.Sprite;
        import flash.text.TextField;
        import flash.text.TextFieldAutoSize;
        import flash.net.URLLoader;
        import flash.net.URLRequest;
        import flash.events.Event;
        import flash.printing.PrintJob;
        import flash.display.SimpleButton;
        public class Printing extends Sprite {
            private var _printableContent:Sprite;
            private var _textField:TextField;
            private var _loader:URLLoader;
            public function Printing() {
                //Load the text from a text file
                _loader = new URLLoader();
                _loader.load(new URLRequest("http://www.rightactionscript.com/samplefiles/lorem_ipsum.txt"));
                _loader.addEventListener(Event.COMPLETE, completeHandler);
                //Create a multiline text field that autosizes.
                _textField = new TextField();
                _textField.width = 400;
                _textField.multiline = true;
                _textField.wordWrap = true;
                _textField.autoSize = TextFieldAutoSize.LEFT;
                //Create a sprite container for the text field,
                //and add the text field to it.
                _printableContent = new Sprite();
                addChild(_printableContent);
                _printableContent.addChild(_textField);
            //When the text loads add it to the text field and  then print the text
            private function completeHandler(event:Event):void {
                _textField.text = _loader.data;
                var printJob:PrintJob = new PrintJob();
                if (printJob.start()) {
                    printJob.addPage(_printableContent);
                    printJob.send();
    I know the button code should be something like:
    Printbtn.addEventListener(MouseEvent.CLICK,startPrint);
    thanks in advance for any help.

    I see what you are saying. I think I am going about this the wrong way. Really all I need is to upload the pdf to the server, since it is already created, and then in AS3 create a link that will be clickable and will download the pdf, in which case they can just print the download. I know how to do this in HTML, but not AS. Basically, it needs to be the equivalent of <a href="PathtoPDF_File">Click to download file</a>.
    also I have a message window already coded, and within this message window is where I need to add the link:
    package exam {
        import flash.display.*;
        import flash.events.*;
        import flash.text.*;
        //this class is used to create a "pop-up" window to ask users to confirm they want to exit (after clicking
        //exit exam button), and then to report back on how the submission went, and offer to resend if necessary
        public class MessageWindow extends Sprite {
            //VARIABLES
            private var feedback:TextField;
            private var confirm:YesBtn;
            private var quit:CancelBtn;
            private var resend:ResendBtn;
            public function MessageWindow (type:String, unanswered:Number=0, score:Number=0) {
                var bg:Shape = new Shape();
                bg.graphics.beginFill(0xffffff,1);
                bg.graphics.lineStyle(3,0x6fc9f4);
                bg.graphics.lineTo(400,0);
                bg.graphics.lineTo(400,250);
                bg.graphics.lineTo(0,250);
                bg.graphics.lineTo(0,0);
                bg.graphics.endFill();
                addChild(bg);
                var format:TextFormat = new TextFormat();
                format.font = "Verdana";
                format.size = "22";
                format.bold = false;
                format.color = 0x464646;
                feedback = new TextField();
                feedback.width = 300;
                feedback.x = 50;
                feedback.y = 15;
                feedback.wordWrap = true;
                feedback.autoSize = TextFieldAutoSize.LEFT;
                feedback.mouseEnabled = false;
                if (type == "confirm") {
                    feedback.text = "Are you sure you want to exit the exam?";
                    if (unanswered > 0) {
                        feedback.appendText("  You still have "+unanswered+" unanswered questions.");
                    feedback.setTextFormat(format);
                    addChild(feedback);
                    quit = new CancelBtn();
                    quit.setType("cancel");
                    quit.x = 25;
                    quit.y = this.height - (quit.height + 15);
                    addChild(quit);
                    confirm = new YesBtn();
                    confirm.setType("confirm");
                    confirm.y = quit.y;
                    confirm.x = this.width - (confirm.width + 25);
                    addChild(confirm);
                }else if (type == "success") {
                    feedback.text = "Congrats on finishing the exam!\r\nYour score is "+Math.round(score*100)+"%\r\nYou may now close the exam window.";
                    feedback.setTextFormat(format);
                    addChild(feedback);
                }else {
                    if (type == "databaseError") {
                        feedback.text = "Errors occured while saving your data.  Please retry.";
                    }else if (type == "networkError") {
                        feedback.text = "Could not contact the server.  Please make sure you are connected to the internet and try again.";
                    feedback.setTextFormat(format);
                    addChild(feedback);
                    resend = new ResendBtn();
                    resend.setType("resend");
                    resend.x = 200-(resend.width/2);
                    resend.y = this.height - (resend.height + 15);
                    addChild(resend);
    in the else if(type =="success") part in the feedback.text ="" is where I need the link to go.

  • Excise Invoice Not creating automatically

    Hello!
                      while doing Billing document using VLO1N,Excise invoice is not creating for a particular material. I checked Material Master for this particular item.I compared the Material Master for the item which is creating Excise Invoice automatically and the for the item Excise Invoice not creating automatically. Every thing is same for both the items but the excise invoice is creating automatically for one material and same Excise invoice is not creating automatically for another item.I don't know where is the exact problem is.could anyone tell me why the Excise Invoice is not creating for the particular item.
    -M.Suba

    Excise Invoice creation depends on Customizatoin of Excise group which is specific to Plant.
    Check Customization settings-
    IMG: Logistics General - Tax on Goods movements - INDIA - Basic Settings - Maintain Excise Group,
    select your excise group & choose details,
    You will observe, check box " Excise Invoice during Billing" in 'Outgoing Excise Invoice' section. This check box should be marked.
    Note: To create Billing documents - Tx :VF01 is used , not VL01N ( this is for Creating Outbound Delivery document)
    Regards,
    Reazuddin MD

  • SD : Create Excise Invoice Automatically

    This is further to my earlier query SD : creating invoice through Output Type Program
    I am opening a new thread as this is a new problem. My last thread was creating VF01 object while doing PGI for delivery (thru tcode vl02n).
    In SPRO there is a tick mark for Create Excise Invoice Automatically ( table J_1IEXGRPS field J_1IEICBATCH) which instructs the system to automatically create an outgong excise invoice .
    Can I acheive the same in my Z subroutine.

    Hi Lakshimipathy,
    What if we create excise invoice from J1IS.
    ( there will be a material document when we do PGI and based on the Assesable value and excise rate from J1ID, it has to work if its TAXINJ)
    My client does the same thing for STO , they even had a ouput programe for it.
    Any issue from the transaction type level, since in J1IIN , its DLFC and if its through J1IS its OTHR.
    Could you please advice on this.
    Thanks in Advance
    Asif Mohammed A

Maybe you are looking for

  • Strange system font problem

    Hello, I have the following problem for 2 days now: http://img154.imageshack.us/img154/1462/bild1.png I did not install anything. I tried to delete font caches but it did not help. I re-installed the system but that did not change anything. After res

  • Recording from my Car radio

    I'm new to iPOD. Can one record directly from the radio? Thanks!

  • ALV selection screen

    Hi, Iam new to A.L.V and have few queries.please tell me the coding for the below. At selection screen: Process the following validations for selection screen fields and display the appropriate error messages. 1.     Validate  the Date From (SAP Tran

  • Moving Systems Between Partitions

    What is the best way to move an SAP system from its current partition to another partition that has no SAP systems loaded on it?

  • Ability to queue songs

    Are there any plans to implement the ability to queue songs when you're listening to your ipod? I hate having to wait for a song to end before choosing the next song that I want to listen to, and playlists and On-The-Go are too restrictive.