VF02 - CHANGE BILLING DOCUMENT

Hi All,
I had a requirement, In the Transaction VF02(CHANGE BILLING DOCUMENT) after the SD billing document is created and when the option 'ReleaseToAccounting' is selected an OutBound Idoc should be created for the FI InvoiceHi All,
My question is how to create a custom idoc for FI invoices via a user exit and these idocs will be routed (via RFC) to a JAVA server/processor. Pls suggest how can i acheive this.
Is there any user exit for acheiveing this or can we proceed further without user exit also.
If so how to acheive this.
Thanks & Regards,
Anil.

Hi Anil,
SAP Java Connector - Example: Simple RFC call
Scenario:
We will call the RFC function module ZNAS_HIE1_GET_MEMBER_FARM.that returns members that have owned a farm. Input to the function is a farm number, and output is a table of members that have owned the farm and Owner number (Sequence number of owners).
Class testJCO is excuted and calls class GetMemberFarm method GetMemberFarmFromSap. Input parameters to GetMemberFarm are Farm and Owner number.
GetMemberFarmFromSap executes RFC ZNAS_HIE1_GET_MEMBER_FARM, that returns a table of members that have owned the farm from the input parameters.
GetMemberFarmFromSap loops through the table and finds the member where ZZCHCODE (Owner numer), is equal owner number from the input-parameters. and returns the member.
Code
Class testJCO
public class testJco
     public static void main(String[] args)
          GetMemberFarm testGetMemberFarm = new GetMemberFarm();
          String memberFarm= testGetMemberFarm.GetMemberFarmFromSap("0111020155","02");
          System.out.println("Memberfarm: " + memberFarm);
Class GetMemberFram
import com.sap.mw.jco.*;  //The JCO
public class GetMemberFarm {
  public String GetMemberFarmFromSap(String farm, String OwnerNumber)   
  {  String zzmemb ="";
        String memberFarm = "";
     JCO.Repository mRepository;
     JCO.Client mConnection = null;
     JCO.Function myFunction = null;
     //Create Connection to SAP
       try
            mConnection = JCO.createClient("800",           //SAP client
                                        "HFR",       //User ID
                                        "vimmer3",     //Password
                                        "EN",            //Language
                                        "53.205.22.71", //Host
                                        "03");           //System
         mConnection.connect();
         System.out.println("Connection OK");
       catch (Exception ex)
            System.out.println(ex);
      // Create function and parameters
      try
        //Create repository
        mRepository = new JCO.Repository( "GetMember", mConnection );
        //Get a function template from the repository
        IFunctionTemplate ftemplate = mRepository.getFunctionTemplate("ZNAS_HIE1_GET_MEMBER_FARM");
        //Create function
        myFunction = new JCO.Function(ftemplate);
        System.out.println("Function created");
        //Set import parameter
        JCO.Field zzfarm = myFunction.getImportParameterList().getField("ZZFARM");
        zzfarm.setValue(farm);
        System.out.println("Parameters ok");
     catch (Exception ex)       
          System.out.println(ex);
     // Execute function
     try
          mConnection.execute(myFunction);
        System.out.println("RFC Call OK");          
     catch (Exception ex)      
      {  System.out.println(ex); //Exception from function          
     // Handle return table GT_HIERARCHY
     // Loop over the table and find the record that
     // has ZZCHCODE = OwnerNumber from the
     // method parameters, and return Member for the
     // record
     JCO.Table gt_HIERARCHY = null;
     try
          gt_HIERARCHY=myFunction.getTableParameterList().getTable("GT_HIERARCHY");
          //Loop thhrough table and return the member that has
          // changecode (ZZCHCODE) = 02
          for (int i = 0; i < gt_HIERARCHY.getNumRows(); i++)
          {   gt_HIERARCHY.setRow(i);
              String zzchcode = gt_HIERARCHY.getString("ZZCHCODE");
              if (zzchcode.equals(OwnerNumber))                        
                   zzmemb = gt_HIERARCHY.getString("ZZMEMB");                   
     catch (Exception ex)      
      {  System.out.println(ex);           
     // Disconnect from SAP
     try
         mConnection.disconnect();  
         System.out.println("Disconnected from SAP");
      catch (Exception ex)
           System.out.println(ex);
      return zzmemb;
} //public class GetMemberFarm
Reward points if helpful.
Regards,
Harini

Similar Messages

  • Any BAPI/function module to change Billing document

    Is there any BAPI / FM to change the Billing document once it has been created ?
    Your help is appreciated.
    Regards,
    Ankur Bhandari

    Hi,
    Go through the forums,
    BAPI/FM for printing Billing doc.
    Re: BAPI for creating billing document
    VF02 - CHANGE BILLING DOCUMENT
    Regards,
    Azaz Ali.

  • Exit for VF01/VF02 when creating or changing billing document

    Hi,
    Can any one tell me which exit is triggered when we are creating or changing billing document
    (VF01/VF02).I alreay find the exits but not able to find the exact one.
    Thanks in Advance,
    regards,
    kishore.

    Hi
    Check This EXIT  available for VF01/VF02 And find Exact one
    SDVFX007 User exit: Billing plan during transfer to Accounting
    SDVFX008 User exit: Processing of transfer structures SD-FI
    SDVFX009 Billing doc. processing KIDONO (payment reference number)
    SDVFX010 User exit item table for the customer lines
    SDVFX011 Userexit for the komkcv- and kompcv-structures
    V05I0001 User exits for billing index
    V05N0001 User Exits for Printing Billing Docs. using POR Procedure
    V60A0001 Customer functions in the billing document
    V60P0001 Data provision for additional fields for display in lists
    V61A0001 Customer enhancement: Pricing
    Ranga

  • Can i make at vf02/vf03 billing document issue output  from a select list

    i have 2 output types YN30  an YN38 who are automaticly created ok
    but when i want to output it  sap doesnot show a choice for two types  but instead
    it shows onley the default from TVFK
    by example at va02  you get a choice from all types that are created for this order
    anyone can help me

    i dont think you understand my problem
    compare sales order output
    with invoice output
    in customizing the look identique
    but in sap
    va02   enter an order  > menu sales document > issue output to
    then a popup window is displayed with all documet type that are created for this order
        you can select one > print or display
    vf02 enter an invoice  > menu billing document issue output to> print or display
    and then  there is nolist  but onley the default document type
    you can change that or search in all types defined in sap ( not in onley the types created for this invoice )
    i need that the user can choose between the 2 types
    we work in sap 4.6C

  • Error while changing Billing document

    while opening billing document in VF02 i got got error " Period 001/2011 id not open for account type S  and G/L 1600261"
    can u tell what is that error and how to solve?

    Hi ,
    Check the below thread for reference
    Period 001/2011 is not open for account type S and G/L 421860
    Regards,
    Ajay

  • VF02 - Releasing billing document to accounting

    Hi SAP Gurus,
    Following error message is displayed while trying to release a billing document (Credit Memo) to accounting:
    "Tax statement item missing for tax code TB".
    I guess this should be in relation to pricing procedure.
    Could you please provide me some direction on how to clear this error to relaese a billing document to accounting.
    Forum point will be awarded for your inputs
    Many Thanks,
    Sreeni.

    Hi,
    Go to FTXP, select your tax code and check the percentage of the tax. If it is correct then ok.
    Now go to VK11, select your tax condition type, just maintain the tax code there and save it. Now go to VF02, and click on update select carry out new pricing and save the invoice.
    I think your problem should get solved.
    Reward points if solution helps.
    Regards,
    Allabaqsh G. Patil

  • Changing billing document date while creating billing document from vf01

    Hi gurus,
    I have requirement to change billing doc date while creating billing document from VF01.
    here I have to consider goods issue date eq billing date.
    caluculating billing date = Goods Issue + Goods in Transit duration time.
    I have done everu thing but I cant update the caluculated date, iam using the following enhancement
    Enhancement:SDVFX001
    Function Module:EXIT_SAPLV60B_001
    Include:ZXVVFU01 which are part vf01.
    here iam sending the calculated date to VBRK-FKDAT
    move cal_date to vbrk-fkdat.
    need help how to update the calculated date to VBRK-fkdat i.e billing document date
    Regards
    Bhaskar

    Hi
    No! That exit is not good for your issue
    U can use the user-exit USEREXIT_NUMBER_RANGE_INV_DATE  defined in RV60AFZC
    Max

  • BAPI to change Billing document for output type

    Hi Gurus,
            I need to know if there is a BAPI to change a Billing document SD to add a new output type.
    Thanks in advance.
    Mariano.

    Hi all,
          To be more specific, my requirement is determinate a new output type in the billing document if other output type already was printed, so as I can't determinate automaticaly the output type by standard I need to create a program to insert an output type in the billing document if other one was printed; for that I need to know if there is a BAPI to change the billing document to insert this new output type.
    Thanks,
    Mariano.

  • How to set print option for a Billing document using T-code VF02

    Hi All,
    Please suggest me the way to set print option for a Billing document for T-code VF02 and please let me know how to get print preview for any particular Billing document?
    regards
    Anand.

    Enter the billing documents detail
    Goto Goto> Header>Output.
    Check the status for your output type in this screen.
    If it is green then come back to the VF03 screen.Enter the billing document number.
    Click on Billing document-->Issue output to.
    Press (CtrlShiftF1) or click on the icon beside "Print options".
    Here you can see the print preview.
    If the status is red then click on the processing log.Here you will get the error messages.
    If the status is in yellow colour,then click on the "Further Data" button
    Set "Dispatch time" as "4 Send immediately (when saving the application)"
    Before the print preview option you should make sure you have added correct output type to the relevant billing document. To do that, go to transaction VF02.
    Enter the billing document no
    Go to Menu option -> Go to -> Header -> Output
    In that screen you have to add relevant output type. (Standard output type is RD00)
    Add that & press enter key
    Highlight that line & press "Further Data" button
    Set "Dispatch time" as "4 Send immediately (when saving the application)"
    Press "Back" Button
    again select that line & go to "Communication method" button
    Set "Logical destination" as LOCAL"
    Don't mark "Print immediately" & "Release after output" ticks. If you mark them, sa soon as you save the billing document, you'll get a print out.
    Press "Back" Button
    Save
    Now form the initial "Change Billing Document" screen, Go to Menu option; Billing Document -> Issue Output to
    You can see that output type line appear.
    select that line & press "Print Preview" button or (CTRLSHIFTF1)
    You can see the print preview.
    Alternatively you can use VF31 to print multiple print outs at same time.
    If you want to get PDF outputs of billing documents, go to your printer settings in the your computer from Control Panel.
    Set PDF Writer as "Default Printer" (Right click & select "Set as Default Printer")
    Then normal way, print the billing from SAP.
    It'll automatically send to your PDF writer. You can save it to the path you want,

  • Partner change in Billing document.

    Hello all,
    I have a user exit to change Partner in Billing document. That is EXIT_SAPLV09A_004.
    This user exit is updating partner only when I create billing document with reference to PO, if I create billing document with reference to SO it is not getting triggered at all.
    Please suggest in case if you find or have or used any BADI or User exit or Enhancement point to change Billing documents (in VF01) partner when we are creating it with reference to Sales order's outbound delivery.
    How I am trying?
    - I am creating Billing document in VF01.
    - I am creating Purchase Req (in ME51) -> Create PO ME21N -> Out bound delivery in VL10B -> Billing.
       I am creating Sales order VA01 -> Out bound delivery in VL10A -> Billing in VF01.
    Thanks in Advance.
    Mohan Vamsi

    Hi Mohan,
    Could you please tell us how you resolved it?
    I am also having the same requirement and the EXIT_SAPLV09A_004 does not get triggered.
    Thanks
    Ajith  C

  • Change Billing Date in Billing Document

    Hi,
    I want to write a program to automate Changing Billing Document.
    Currently, I do it manually :
    vfx3 -> select the billing doc which needs to be changed -> change billing doc (shift + f8) -> Go To -> Header -> Header -> manually change the billing date here -> save it.
    Do we have a function module/ bapi for this?

    Go to transaction SE37 and type in, for example, BAPIBIL, then click on the drop-down. See the whole bunch of BAPIs? I guess that
    BAPI_BILLINGDOC_EDIT might be the right one, don't you think?

  • Releasing Billing document to accounts

    Hi,
    From this new financial year starting from Apr-09 we have problem while releasing service billing document to accounts.
    When we try to release service bill using change billing document VF02 transaction and by clicking on green flag button in top tool bar the message appears as "Document 1116060027 saved  (no accounting document generated).
    Kindly help.
    With Best Regards,
    Rajkumar

    Hi Rajkumar
    "In the chart of accounts to be posted to, no accounts are defined for the tax code you used." this is your problem, please check with your FI guy to fix it.
    Or Goto Tcode VKOA and check whether for your Chart of account and your customer and material with account key MWS any account number has maintained or not?.
    If not maintain an appropriate account there.
    try and revert.

  • How to print our several Billing documents in one spool request?

    Hello all,
    I encountered a problem while printing billing document.
    Currently, we only can use VF02 to change billing document's condition type and print out Billing document. It's troublesome and waste a lot of time to change output condition type in each Billing document.
    Is there a function that will list all the billing document, so we can print the selected billing document by pick this billing documents and send to printer.
    If my description is confusing, Please let me know.

    Hi, Iimnava,
    Thanks for ur reply. But there is still some problem about this.
    Let me introduce the special setting for our company's system:
    There are 2 output condition set in SAP.
    1. First one-ZD00, it will process automatically and send to a archive software. but won't print out. all of our billing document are using this output condition.
    2. Second one-ZD01, manual print out. If we need to print out the billing document, we can go to header--output, select this output condition in the dropdown list, then set sent to Local printer. save and quit. the billing document will be printed out.
    I had tried Txn VF31 and SE38.
    1. If use repeat processing method, only pull out the billing documents with ZD01 output.
    2. If use initial processing method, only pull out the billing document with output condition-ZD00 which hasn't been sent to the archive software yet.
    So I still can't reprint the billing document with Output condition-ZD00 which has been already sent to archive software.
    Sorry for the complex situation, but it's very important that we need to reprint these billing document. hope u can help me to solve this problem....

  • Unable to release billing document to  accounting

    Dear All,
    I am cancelling billing document.The document created in July and cancelling today.
    Following error is coming in vf02 
    SD billing document cannot be cancelled. Error message F5A 005 occurs during release to accounting.
    the foreign currency valuation already done for billling document. Any idea on this.
    Best Regards,
    Sainath

    The long text of message F5A005 explains the reason of the error
    message: an item in the accounting document was valuated with an
    open item foreign currency valuation.
    When you reverse an invoice, the system tries to perform the so called
    New cancellation procedure.
    This procedure automatically clears the accounting documents.
    If the New cancellation procedure fails, then the system performs
    the Old cancellation procedure (which doesn't clear automatically
    the accounting documents).
    This is not the case when the New cancellation procedure gives an
    error, like F5A005. In this case the cancellation document cannot
    be transferred.
    To change this behaviour, you could activate the field RULE_NEW_CANCEL
    in userexit USEREXIT_FILL_XKOMK1 as described in the attached
    note 339928.

  • Canel Billing Document

    Hi,
    I want to cancel billing document thro VF11.  After entering the Billing doc no. and current date, the error log shows as "0000000  Document does not exist".    Billing document date 21.11.2008.
    Long Text
    Detail
    The document does not exist.   It was possibly not posted and therefore cannot be read from the database.
    Procedure
    Repeat the transaction at a later time.
    What can I do further and how to proceed to cancel this billing document.
    Regards,
    G. BHASKARAN

    Cust Invoice (ZCR) xxxx 27.11.08 Completed (with Green colour)
    Accounting Document xxxx 27.11.08 Not cleared (with Yellow colour)
    Cancel Invoice (ZCR) xxxx 09.01.09 Open (with Yellow colour)"
    In continuation of all your advice, I tried the following method :
    Step 01:    Enter TCode: VF02 - System shows the "Change Billing Document" screen
    Step 02:    Enter the cancelled Invoice document no.1234 to check the document flow
    Step 03:    After entering the Doc no.1234 - use "Green Flag" icon or Shift + F4
                     for Release to accounting.
    I tried the above steps can pass on the cancellation document procedure through to accounting.   
    Then the Accounting document will be cleared from "Open" to "Cleared Items" in Customer Account.
    When I tried, the system is not allowing and it shows the following msg:
    =====================================================================
    "posting period 008 2008 is not open"
    Sytem Response
    Processing cannot be continued
    Procedure
    The error can have several causes.  In order to eliminate the error, proceed as follows :
    1. Check whether the posting date was entered correctly.  The sytem determines the posting period by means of the date.
    2. Check whether the required posting period is open for posting for the variant of period period XXX and account type +.   Make sure that the period is open for posting.
    To do this, specify a period interval in which the required period for the variant of posting period XXX and account type + is contained.
    =====================================================================
    My doubt is how the system allows the cancel invoice posting at the time of cancelling Invoice
    to the period Jan 2009 (09.01.09), as billing and accounting document posting period is related to Nov 2008 (27.11.08).
    Can any one give some more guidelines.
    GB

Maybe you are looking for

  • The A12E1 error on installing Adobe CC

    Have been working on this all day. I have tried everyone's workarounds. I now give up. Adobe you have me beaten. I cannot use your flagship paid for subscription on my windows 8.1 computer. I do not want to try to fix it anymore, I feel I have done m

  • Runtime error affecting only Encore CS5

    My CS5 Creative Suite 5 Production Studio has run fine up to yesterday, on my 64 bit PC with Windows 7 Professional. Only Encore CS5 is affected...and only when I try to start a new Encore project.  The crash does not happen if I open an existing Enc

  • Nokia E66 EAP-TLS error

    Hi, I am configuring a Nokia E66 (wich is v4 in Cisco Compatible Extensions, so it supports EAP-TLS) with WPA2 EAP-TLS against IAS in a Cisco Wireless Network and I always obtain the same error in the IAS event viewer. denied accesss Authentication-T

  • What is quicktime screen recording default save location?

    I made a screen recording in Quicktime (OS X 10.8), and now I can't figure out where it saved the file.  Yes I know (now) that I could have changed the save location/name in the options before recording, but I didn't.  I just recorded.  Now I'm unabl

  • OO4O issues with Windows 2008

    I've downloaded 10203_vista_w2k8_x86_production_client.zip and performed a client install. I need to get oo4o up and running but the oo4o test page is failing with the following error: Error: Unable to create Ora Session [429][ActiveX component can't