Trigger custom program on creation sales invoice (VF01)

Hello,
I need to trigger a custom program whenever a user creates a sales invoice.
Apparently, there's no change document created at creation, only on updating an invoice. There seems no user exit/badi which gets triggered on saving an invoice...
Is there someone who could help me a bit ?
thanks !

Hi,
Find Badi Like this.
1) Go to the transaction SE37 to find your function module.
2) Locate the function SXV_GET_CLIF_BY_NAME.
3) Put a breakpoint there.
4) Now open a new session.
5) Go to your transaction.
6) At that time, it will stop this function.
7) Double click on the function field EXIT_NAME.
8) That will give you name of the BADI that is provided in your transaction.
Also Check this .
[Link|http://www.uber-goober.com/forums/showthread.php?t=101884]
[https://forums.sdn.sap.com/click.jspa?searchID=17414617&messageID=6233206]
Rhea.
Edited by: rhea on Oct 14, 2008 10:25 AM
Edited by: rhea on Oct 14, 2008 10:27 AM

Similar Messages

  • Customer payment report against sales invoice

    Dear Experts.
    My client has requirement to track customer payment against sales invoice. Actually client sometimes do partial payment also. I know we can get from bsid(open item) & bsad(cleared item) table. I unable to find actual required data.
    regards
    sanjay verma

    Dear Sanjay,
    Apart form the FBL5N,  Please check the below path for more standard reports which helps you to fulfill your requirement.  Hope its helpful.
    In SAP Easy Access screen
    Regards,
    Inthiyaz

  • User-exit or Customer Exit while save of Invoice (VF01)

    Hi,
    I want ot sand mail on the time of click on save button of VF01.
    Can any one tell user-exit or Customer exit which hit while save of invoice.
    Regards
    Durgesh Kumar

    Hello,
    You can use RV60AFZZ. Please check sy-tcode = 'VF01' on this user-exit.
    Regards,
    Burak

  • How to display the Customer Name in the Sales invoice form

    Hi All!
    May I know the table from which I select the customer name for a certain customer number?
    Thanks in advance!

    Hi,
    Kna1 is the customer master table there you can find the name1 filed
    Thanks,
    NN.

  • Apply Deposit Invoice to Sales Invoice

    Hello,
    How we can apply the deposit (customer prepayment) to the sales invoice to clear the customer’s account balance using AR public API. I am using Oracle EBS 11.5.10.2.
    Appreciate help.
    Regards,
    Anirudha

    Hi
    I found the following information in metalink - "Oracle Receivables Deposits API: Sample Scripts, Known Issues/Patches [ID 266964.1]" and it says you will not be able to Deposit Invoice to Sales Invoice using API.
    Please review the above note in metalink and refer the Known Issues / Patches section point number 2 to get the BUG associated with it.
    Thanks
    Manish

  • Sale Invoice TCODE

    Dear All
    What is tcode for sale Invoice?
    Thanks in Advance
    Alok

    Hi Alok
    T-code to create sales invoice---- VF01
    T-CODE to change the Invoice -
    VF02
    T-CODE to display the Invoice --- VF03
    Regards

  • Changedocument for sales invoice creation

    When the sales invoice is changed in VF02, an entry is created in changedocument table CDHDR. But when the invoice is created in VF01 no entry is created in the table CDHDR.
    Is there a way to enable creation of entry when invoice is created?
    The change document object for sales invoice is  FAKTBELEG

    Hi!
    You can try to setup output control for billing document:
    - define your own access sequence or expand existing one with one more access based on KOMKBV3-TRTYP field (transaction type)
    - assign access sequence to corresponding output type
    - maintain condition records for corresponding output type with transaction type "V" - Change
    - setup processing routines for corresponding output type. Here it is medium "T" - Tasks (SAP Business Workflow). I didn't try myself to invoke workflow in such a way but it seems this stays for such purposes. Even if not you can try medium "8" - Special function and link your custom program which triggers workflow execution.
    This settings will lead to triggering output control whenever billing document is changed or created (this works for standard print medium for me) and invoke workflow execution (almost sure).
    Regards,
    Maxim.

  • Sales Invoice........creation

    Hi All
    Actually I am developing a sales Invoice, I have designed it on smartforms. Now I need to write the print program. I am not able to understand where actually this sales Invoice would be triggerd so that it can be printed.
    In VF01, when I enter the Sales Document number and click save it creates a invoice number.
    Does any body know how it works, when the Invoice number is generated it should print the Sales Invoice.
    Please guide
    regards
    AJ

    Hi!
    You can try to setup output control for billing document:
    - define your own access sequence or expand existing one with one more access based on KOMKBV3-TRTYP field (transaction type)
    - assign access sequence to corresponding output type
    - maintain condition records for corresponding output type with transaction type "V" - Change
    - setup processing routines for corresponding output type. Here it is medium "T" - Tasks (SAP Business Workflow). I didn't try myself to invoke workflow in such a way but it seems this stays for such purposes. Even if not you can try medium "8" - Special function and link your custom program which triggers workflow execution.
    This settings will lead to triggering output control whenever billing document is changed or created (this works for standard print medium for me) and invoke workflow execution (almost sure).
    Regards,
    Maxim.

  • To save the sales order number in custom table while creation of the order.

    Hi Experts,
    Does there exist any exit to save the sales order number in a custom table while the sales order is created in VA01. The requirement is to capture the sales order number in a Z table when a field (payment terms ) is changed during the sales order creation.
    Regards,
    Sunitha

    Hi Sunita,
    You can store your data in the User exit MV45AFZZ in the form 'userexit_save_document'.
    You can navigate to MV45AFZZ from SE38 wherein an access key needs to be generated for that program, if you know to implement enhancement points then you can create an implicit enhancement point in this form without generating an access Key.
    Regards,
    Ravi Kiran

  • How to email the sales invoice to customer on his email id

    hi masters,
    i have got one report for development in which i have to send the sales invoice to that respective customer's email ID(email id of any domain like yahoo, gmail etc). and like this they want to send the there respective invoice to all customer's email id. i am first time working on email sending report for the external email address. plz help me how to sort out this problem?
    thanks
    Vicky

    Hi check the following program:
    REPORT zemail_gm.
    *********Variable Declarations *****************************
    DATA: gv_form_name TYPE rs38l_fnam, " Used to store the function module generated by Smartform
    gv_bin_filesize TYPE i, " Store the file size
    gv_pos TYPE i,
    gv_len TYPE i,
    gv_tab_lines TYPE i.
    ********Constants *******************************************
    Data : gc_text(11) type c value 'Form Output',
    gc_tst(3) type c value 'TST',
    gc_testing(7) type c value 'Testing'.
    *********Work Area Declarations *****************************
    DATA: gs_docdata TYPE sodocchgi1, " Data of an object which can be changed
    gs_ctrlop TYPE ssfctrlop, " Smart Forms: Control structure
    gs_outopt TYPE ssfcompop, " SAP Smart Forms: Smart Composer (transfer) options
    gs_otfdata TYPE ssfcrescl, " Smart Forms: Return value at end of form printing
    gs_reclist TYPE somlreci1, " SAPoffice: Structure of the API Recipient List
    gs_pdf_tab TYPE tline, " Workarea for SAP Script Text Lines
    gs_objbin TYPE solisti1, " SAPoffice: Single List with Column Length 255
    gs_objpack TYPE sopcklsti1. " SAPoffice: Description of Imported Object Components
    *********Internal tables Declarations *****************************
    DATA: gt_reclist TYPE TABLE OF somlreci1, " SAPoffice: Structure of the API Recipient List
    gt_pdf_tab TYPE TABLE OF tline, " SAPscript: Text Lines
    gt_otf TYPE TABLE OF itcoo, " OTF Structure
    gt_objbin TYPE TABLE OF solisti1, " SAPoffice: Single List with Column Length 255
    gt_objpack TYPE TABLE OF sopcklsti1. " SAPoffice: Description of Imported Object Components
    CLEAR : gv_form_name,
    gs_ctrlop,
    gs_outopt,
    gs_otfdata,
    gv_bin_filesize,
    gv_pos,
    gv_len,
    gv_tab_lines.
    START-OF-SELECTION.
    • Generate Function Module name
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    formname = 'ZPDF_G'
    IMPORTING
    fm_name = gv_form_name
    EXCEPTIONS
    no_form = 1
    no_function_module = 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.
    • Assigning values to Form Control Structure and Form Composer
    gs_ctrlop-getotf = 'X'.
    gs_ctrlop-no_dialog = 'X'.
    gs_outopt-tdnoprev = 'X'.
    • Getting the OTFDATA
    CALL FUNCTION gv_form_name
    EXPORTING
    control_parameters = gs_ctrlop
    output_options = gs_outopt
    user_settings = 'X'
    IMPORTING
    job_output_info = gs_otfdata
    EXCEPTIONS
    formatting_error = 1
    internal_error = 2
    send_error = 3
    user_canceled = 4
    OTHERS = 5.
    IF sy-subrc 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    • Assigning the OTFDATA to OTF Structure table
    CLEAR gt_otf.
    gt_otf] = gs_otfdata-otfdata[.
    • Convert the OTF DATA to SAP Script Text lines
    CLEAR gt_pdf_tab.
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
    format = 'PDF'
    max_linewidth = 132
    IMPORTING
    bin_filesize = gv_bin_filesize
    TABLES
    otf = gt_otf
    lines = gt_pdf_tab
    EXCEPTIONS
    err_max_linewidth = 1
    err_format = 2
    err_conv_not_possible = 3
    OTHERS = 4.
    IF sy-subrc 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    • Assigning the Description of the object sent in the mail
    CLEAR gs_docdata.
    gs_docdata-obj_name = gc_tst.
    gs_docdata-obj_descr = gc_testing.
    • Assigning the email id to Structure of the API Recipient List table
    CLEAR : gt_reclist, gs_reclist.
    gs_reclist-receiver = w_id. " Here give the mail ID
    gs_reclist-rec_type = 'U'.
    APPEND gs_reclist TO gt_reclist.
    • Passing the SAP Script text lines to SAPoffice: Single List with Column Length 255 table
    CLEAR : gs_objbin, gs_pdf_tab.
    LOOP AT gt_pdf_tab INTO gs_pdf_tab.
    gv_pos = 255 - gv_len.
    IF gv_pos > 134. "length of pdf_table
    gv_pos = 134.
    ENDIF.
    gs_objbin+gv_len = gs_pdf_tab(gv_pos).
    gv_len = gv_len + gv_pos.
    IF gv_len = 255. "length of out (contents_bin)
    APPEND gs_objbin TO gt_objbin.
    CLEAR: gs_objbin, gv_len.
    IF gv_pos < 134.
    gs_objbin = gs_pdf_tab+gv_pos.
    gv_len = 134 - gv_pos.
    ENDIF.
    ENDIF.
    ENDLOOP.
    IF gv_len > 0.
    APPEND gs_objbin TO gt_objbin.
    ENDIF.
    • Filling the details in SAPoffice: Description of Imported Object Components table
    DESCRIBE TABLE gt_objbin LINES gv_tab_lines.
    CLEAR gs_objbin.
    READ TABLE gt_objbin INTO gs_objbin INDEX gv_tab_lines.
    IF sy-subrc = 0.
    gs_objpack-doc_size = ( gv_tab_lines - 1 ) * 255 + STRLEN( gs_objbin ).
    gs_objpack-transf_bin = 'X'.
    gs_objpack-head_start = 1.
    gs_objpack-head_num = 0.
    gs_objpack-body_start = 1.
    gs_objpack-body_num = gv_tab_lines.
    gs_objpack-doc_type = 'PDF'.
    gs_objpack-obj_name = 'ATTACHMENT'.
    gs_objpack-obj_descr = 'test'.
    APPEND gs_objpack TO gt_objpack.
    ENDIF.
    • Sending the Form Output in the PDF format to email
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = gs_docdata
    put_in_outbox = 'X'
    commit_work = 'X'
    TABLES
    packing_list = gt_objpack
    contents_bin = gt_objbin
    receivers = gt_reclist
    EXCEPTIONS
    too_many_receivers = 1
    document_not_sent = 2
    document_type_not_exist = 3
    operation_no_authorization = 4
    parameter_error = 5
    x_error = 6
    enqueue_error = 7
    OTHERS = 8
    IF sy-subrc 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ELSE.
    WRITE 'Sent Successfully'.
    ENDIF.
    SUBMIT rsconn01
    WITH mode EQ 'INT'
    AND RETURN.
    END-OF-SELECTION.
    Regards,
    Rock.

  • Trigger IDOC_OUTPUT_ORDRS using custom program.

    Hello.
    I have a requirement to send an order response (ORDERS05) IDoc by calling FM IDOC_OUTPUT_ORDRS using a custom program.  Wanted to know if anyone had suggestions on the best approach.  We are using much of the native mapping and adding a few segments (which I would handle updating in the customer exits).
    My biggest question is how to setup the call to IDOC_OUTPUT_ORDRS.  I think I need to simulate the NAST table entry.  Is that the recommended approach?  Any tips or hints would be appreciated.
    Thanks,
    Cal
    Edited by: Cal on Feb 3, 2009 7:07 PM

    Actually condition technique based on which output determination works - is designed for exactly what you are asking - triggering the output type under certain conditions.
    You can create ouput condition records with key fields that represent your business conditions: for example certain sales org, distrib channel, certain sales order type can only trigger the output. You can make it as finer as you want (like even including sold-to as a criteria), like you can include any field that appears in the sales document as a criteria to trigger the idoc.
    The tables that store condition records - condition tables - are custom created with your business field combination that you want to base the triggering upon.
    Goto the IMG path:
    IMG -> SD -> Basic functions -> Output control -> Output determination -> Maintain output determination for sales documents.
    1. A o/p determination procedure is assigned to sales document type
    2. A o/p determination procedure comprise a list of output types, which are checked sequentially by the system
    3. Custom condition tables with new business criteria can be assigned to new or existing access sequence
    4. Access sequence is attached to output type
    How the system triggers a particular output type during application document processing, say sales order processing:
    1. From the sales document type, the o/p determination procedure is determined
    2. The system then checks the output types inside the procedure one by one
    3. Say at output type 1, the system checks to see what access sequence it has
    4. The access sequence comprises of 1 or more condition tables.
    5. The system then checks each condition table, by comparing the key fields of the condition table with the correpsonding sales document fields - like comparing sales org, documen type in the condition record with what the sales document has. If every thing matches, the output type is triggered.
    I have just simplified the whole o/p determination. There are several other features which are controlle at o/p determination, procedure, output type and access sequence levels. Spend some time one these, it is a neat, flexible and future proof concept. You will never regret! )

  • NAV 2013 R2; How to run a customized report (206 sales invoice) in the classic client

    Hello, in preparing a newly installed NAV 2013 R2, I'm questioning the following:
    In the Development Environment I have customized report 206 Sales - Invoice in the Design menu View Layout with the space of the logo (by Microsoft SQL Server Report Builder) and
    finally saved and compiled.
    When I do run it connects to the server of what I call the classic client or the real NAV 2013 R2 and I can select a posted sales invoice to show the new layout and the result is
    fine as customized as I wanted.
    When I later ordinary print one of the posted sales invoices this customized logo layout doesn't appear on the print. I print in PDF and paper. When I make a next new sales invoice
    this new layout is not in use either.
    Another thing is run print started from the Development Environment is called Sales - Invoice in the header and not just Invoice that it the name when printing when invoicing and
    printing of posted documents.
    Additionally this form of Sales - Invoice shows our company details and good information as web, e-mail, bank account and bank name that is well demanded on a perfect invoice.
    How to get these informations out normally?
    Is the classic client having a wrong report as sales invoice?
    How to run a customized report (206 sales invoice) in the classic client NAV 2013 R2?
    It is like the customized report (206 sales invoice) is not in use yet in the classic client.
    All you wise people out there are welcomed to help me now
    Best regards
    Carsten

    Try on Dynamics Community forum: https://community.dynamics.com/nav/f/34.aspx

  • Sales invoice print program

    Hi All
    Does any body know in normal process, when is the print program for Sales Invoice is triggered.
    cheers
    AJ

    The triggering tc : vf03 , with an output type.

  • How to print customer Sales Invoice directly from FI module?

    Hi,
    How to print customer Sales Invoice directly from FI module without using SD's t-code VF02 and VF03?

    hi,
    only way in FI is Correspondence functionality usage. Please config it and use F.61 or F.64 to print it.
    regds,
    raman

  • How to trigger a standard workflow task in customizing program?

    Hi experts,
    Does any1 have any ideas about how to trigger a standard workflow task in customizing program? Is there any FMs can be used to do this?
    Thx in advance. Points will be rewarded.
    Vincent

    will followiign Fms help -
    'SWE_EVENT_CREATE'
    SWR_START_WORKFLOW
    SWU_START_WORKFLOW

Maybe you are looking for

  • I want to open a document in a link without having to save it first.

    When reading an email or looking at a web page I always have to save a document before I can open it. I used to be able to click on the link and was given the option to open or save the file. I no longer get the option. I do not want to save all thes

  • ActionEvent Vs FocusListener

    Hi all, and thx in advance. My problem look like the Bug ID: 4224932 Environment Description : -     I have some some JtextField. -     each JtextField have an difference instance of FocusListener listener. -     On focusLost I�m doing a validation (

  • How can I Show PDF in C# and disable user interaction

    I am testing the C# example project BasicIacOCX. I can run the project and there I can hide the toolbar of the Acrobat-control (pdfWindowLeft.setShowToolbar(false);). But if I press F8 the toolbar is visible again. Now I found out nothing how I can d

  • HOW TO DEBUG EXTERNAL ABAP PROGRAM

    HI ALL , I am new to Webdynpro Java.  I am unabe to debug the ABAP program through  web dynpro java application  . I want to debug the external  abap program through web dynpro java application. If it possible please let me know the required procedur

  • ALV tree display

    Hi, I have to make a list with three hierarchical levels. By the 2nd level I know how. My dout is how to add the 3rd hierarchical level? The code i use is: FORM create_alvtree_hierarchy .   DATA: ld_ebeln_key TYPE lvc_nkey,         ld_ebelp_key TYPE