How to get Accounting documents based on Billing documents

Experts,
I have a particular requirement in SD. I need to fetch the details of Accounting documents(BKPF-BELNR) and Fiscal year(BKPF-GJAHR) based on the Billing documents(VBRK-VBELN). Is there any function module to do so or any other way. Currently I am fetching this data but there is a performance issue.
Edited by: Ashish Kansara on Oct 16, 2008 1:54 PM

A quick link is to take VBRK-VBELN and use it to lookup BKPF-AWKEY. Also select BKPF-AWTYP = "VBRK" to make use of a secondary index on BKPF.
Thomas

Similar Messages

  • How to get po number based on billing document number

    Hi every body
          how to get a po number based on billing document number
    thanks in advance.
    sekhar.k

    Hi,
    Check this field VBRK-BSTNK_VF.
    Regards,
    Satish

  • Any functional module to get financial document based on billing document

    hi all,
    do we have any functional module to get accounting document (bseg-BELNR) based on billing document (bseg-VBELN)?
    i have a requirement to retrieve the clearing document (bseg-augcp) & date(bseg-augdt) from BSEG with billing document.
    billing document is not a key, so i would like to retrieve the accounting document from any function module and use that to get clearing document (bseg-augcp) & date(bseg-augdt).
    thanks.

    hi all,
    i got other option to get this....thanks.
          select single * from bkpf
          where bukrs = <data>-werks
            and AWTYP = 'VBRK'
            and AWKEY = billing doc.
          if sy-subrc EQ 0.
            select single * from bseg
            where bukrs = bkpf-bukrs
              and belnr = bkpf-belnr
              and gjahr = bkpf-gjahr.
            if sy-subrc EQ 0.
              <data>-AUGDT = bseg-augdt.
              <data>-AUGBL = bseg-augbl.
            endif.

  • How to get Accounting document number from billing document number

    Hi,
    How to get Accounting document number from billing document number i.e. from VBAK- VBELN.
    Cheta Pant

    Hi,
    VBAK is the Sale Order header table, Billing document table is VBRK.
    Sales tables (VBAK,VBAP,VBRP,VBRK) do not store accounting document numbers.
    You do other way around. Just go to SE16 and enter the Billing document number in field Billing document VBELN in BSEG or BSID or BSAD table and execute, you will find the accounting document number.
    If you just want collect this information once then you can use table BSEG, but if you think to develope a report then use table BSID and BSAD.
    Regards,
    Chintan Joshi

  • How to get the custom integrator in Manage Document Links

    Hi All,
    My requirement is "Creating Word Documents Using Web ADI", I am following the document
    Oracle® Human Resources Management Systems
    Configuring, Reporting, and System Administration Guide
    Release 12.1
    Part No. E13509-02
    From page no. 194.In that section, No.8. Use the Manage Layout Document Links page to create a link between the
    integrator and layout and the Word template.
    See: Creating Links between Template Letters and Layouts, page 2-33
    2-33>>
    Select Manage Document Links from the Web ADI menu.
    But when I click on the "Manage Document Links", I couldn't see my custom integrator to associate my word document with my integrator.
    I could see only the standard integrators.
    How to get my custom integrator in "Manage Document Links". I could see my custom integrator in define layout but not in this page.
    Thanks.
    With Regards,
    Kali.

    Hussein,
    Thanks for your reply.
    I followed the
    Note 360105.1 -Understanding and Using Web ADI in Oracle HRMS, and the section "Letters",
    I could follow all the steps, except the following,
    The reason is, when I click on Manage Documents Links, I am not getting my newly created integrator.
    If I link a standard integrator "HR People Details" to my document, that is opening properly.
    But I am not able to link my document with my integrator(which is based on my view).
    c.  Now link the template letter to the Letter Integrator and Layout.
    If not already done so, Add the function WebADI Manage Document Links to your Web ADI menu, and give it a prompt of Link Document.
    Select Link Document option , and Web ADI Mail Merge page displays. Choose your Letter Integrator. Link it to the Layout, and a list of template documents uploaded to the database is displayed. Select the template letter to be linked with the layout.
    Thanks.
    With Regards,
    Kali.

  • How to see the change logs for billing document

    Dears,
    Could you please how to see the change logs for billing document.
    My client is using ECC 6.0 & if i use VF03 > Environment > changes > does not show the changes i had made.
    Thanks in advance
    Ranjan

    hello, friend.
    you should be able to see changes done after the initial creation and saving, by going thru Environment > Changes.  try it again, and this time make sure that changes were done to the billing document prior to posting to accounting.
    normally, when configuration of Billing is done correctly, there will be little or no instances of changing anything in the Billing document,  as saving the document after creation will post this to Accounting.  of course, inclusion of a posting block in the billing type will provide you the opportunity for changes. 
    regards.

  • How to get the link of already archived document

    Dear all,
    How to get the link of already archivied document. for example i have a sales order for which subsequent documents have been archived. now i want to get the link of subsequent document.
    please give some solution
    Thanks in advance
    Thanks,
    Hemachandran.

    Hemachandran,
                The archiving object for sales order is SD_VBAK. If you run the program S3VBAKAU by transaction se38 and search based on the document numbers ( as you mentioned it is the preceeding document numbers to the current document), you will be able to retrieve the information regarding the previous sales orders.
    More information on the sales order archiving object can be found at,
    http://help.sap.com/saphelp_45b/helpdata/en/a9/55c7b690a111d1a5510000e82deaaa/content.htm
    Sojan
    <<text removed by moderator>>
    Edited by: Matt on Nov 16, 2008 5:08 PM - Do not request points

  • How can I find out in the billing document, who creat the billing.

    how can I find out in the billing document, who creat the billing.
    thanks.

    On  VF03 -Enter billing document number>>press on enter button>>you will get overview of billing document item>> select menubar>>Goto>>header>>header parthner>>you will get full screen with Name "Created By".
    Thanks&Rgds,
    Rajesh

  • How to get BP kind based on user name?

    Hi,
    How to get BP kind based on user name?
    Is there any table other than BUT000 which gives the Business partner no. and BP KIND?
    What is BLUEPRINT table?

    Hi John,
    do you mean Type:
    1     Person
    2     Organisation
    3     Group
    or Role like
    000000     Business Partner (General)
    BBP000     Vendor
    BBP001     Bidder
    BBP002     Portal Provider
    BBP003     Plant
    BBP004     Purchasing Company
    BEA001     Billing Unit
    BUP001     Contact Person
    BUP002     Prospect
    BUP003     Employee
    BUP004     Organizational Unit
    BUP005     Internet User
    The Role can be found in BUT100.
    Regards
    Gregor

  • How to get Page Count of pdf in Document library in EventHandler

    Hi,
    How to get Page Count of pdf in Document library once uploaded has been done and i would like to update the page count value in document library column of the corresponding file.
    I should achieve it in Event handler.
    Which even should i use, either ItemAdded or "ItemUpdated "?
    Thanks & Regards
    Poomani Sankaran.

    Hello,
    If you are looking for file download or view count then event handler will not work. You need to enable the analytic report to your site. Once you enable it then you can see the report within a browser or you can also create custom webpart to show count
    of specific file.
    http://blogs.msdn.com/b/ecm/archive/2010/05/03/web-analytics-in-sharepoint-2010-insights-into-reports-and-metrics.aspx
    http://sharepoint.stackexchange.com/questions/34611/count-of-files-under-a-folder-in-a-document-library
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Hello, I was wondering how to get a version of a PDF document? My Adobe shot down and I have not had time to save my document with the notes had been taken. When I reopened there were no notes on my paper. I have a mac book pro. Thx.

    Hello, I was wondering how to get a version of a PDF document? My Adobe shot down and I have not had time to save my document with the notes had been taken. When I reopened there were no notes on my paper. I have a macbook pro. Thx.

    Hi Erika1987,
    If you have not saved the document and Acrobat closed then it's not possible to retrieve the lost data on the pdf file.
    Regards,
    Rave

  • How to get fiscal period based on date and Fiscal year?

    Hi Guys,
               Can anybody tell me how to get Fiscal period based on date and Fiscal Year or fiscal year variant?
    Thanks,
    Gopi.

    Hi,
    Please refer the code below:
    *: Report:  ZFISCALYR                                                  :
    *: Date  :  2004                                                       :
    *: Description: Demonstrates how to return the corresponding fiscal    :
    *:              year and posting period for a company code and posting :
    *:              date or posting date and fiscal year variant.          :
    REPORT  zfiscalyr NO STANDARD PAGE HEADING.
    TABLES: ekko.
    PARAMETERS:     p_bukrs TYPE ekko-bukrs,
                    p_bedat TYPE ekko-bedat.
    DATA: gd_fiscalyr  TYPE bapi0002_4-fiscal_year,
          gd_fiscalp   TYPE bapi0002_4-fiscal_period.
    DATA: gd_fiscalyr2 TYPE T009B-BDATJ,
          gd_fiscalp2  TYPE bapi0002_4-fiscal_period.
    DATA: gd_periv     TYPE t009-periv.
    *START-OF-SELECTION.
    START-OF-SELECTION.
    * get fiscal year and period - (requires date and company code)
      CALL FUNCTION 'BAPI_COMPANYCODE_GET_PERIOD'
        EXPORTING
          companycodeid = p_bukrs
          posting_date  = p_bedat
        IMPORTING
          fiscal_year   = gd_fiscalyr
          fiscal_period = gd_fiscalp.
    * Alternative fiscal year function module
    * - (requires date and fiscal year variant code from T009 table)
    * gets first entry in fiscal year variant table (will need to choose
    * correct one from table rather than just using first entry)
      SELECT SINGLE periv
        FROM t009
        INTO gd_periv.
    * get fiscal year and period
      CALL FUNCTION 'DETERMINE_PERIOD'
        EXPORTING
          date                      = p_bedat
    *    PERIOD_IN                 = '000'
          version                   = gd_periv
       IMPORTING
          period                    = gd_fiscalp2
          year                      = gd_fiscalyr2
       EXCEPTIONS
          period_in_not_valid       = 1
          period_not_assigned       = 2
          version_undefined         = 3
          OTHERS                    = 4.
    *END-OF-SELECTION.
    END-OF-SELECTION.
      WRITE:/ 'From function module: BAPI_COMPANYCODE_GET_PERIOD',
            / 'Fiscal year is:', gd_fiscalyr,
            / 'Fiscal period is:', gd_fiscalp.
      SKIP.
      WRITE:/ 'From function module: DETERMINE_PERIOD',
            / 'Fiscal year is:', gd_fiscalyr2,
            / 'Fiscal period is:', gd_fiscalp2.
    Thanks,
    Sriram Ponna.
    Edited by: Sriram Ponna on Apr 17, 2008 8:59 PM

  • Create Excise invoice(J1IIN) document while creating billing document using bapi BAPI_BILLINGDOC_CREATEMULTIPLE

    Dear Experts,
    My scenario is:
    We have batch split scenario, where the parent line item of billing document has 0 quantity and its subsequent item (item with batch number) holds actual quantity data.
    When we create billing document using VF01 against delivery document, system creates billing document along with excise invoice document (J1IIN Document). And in excise document contain same number of line items that of billing document. Please see the below attachment: 
    Biiling document screen shot:
    While creating billing document, the J1IIN Document created automatically. Below is the screen-shot for the same.
    Now the issue is:
    When we create billing document using BAPI: BAPI_BILLINGDOC_CREATEMULTIPLE system creating only billing document and not creating excise invoice document.
    When we create excise document manually using J1IIN the zero quantity line items are excluded in excise invoice document.
    Please see the below screen-shot for the same; The z quantity line items are missing.
    We want excise document to be created while creating billing document using BAPI BAPI_BILLINGDOC_CREATEMULTIPLE. Or is there any other BAPI for the same purpose.
    Customization is also maintained for creating excise invoice document automatically.
    Regards,
    Rajesh Sadula.

    HI
      Pricing will be carried basing on the pricing
    procedure.
    Case1: Prices will be carried out automatically if
    necessary condition records are maintained for the
    condition type.
      For this you can go to Sales Order-> Item Conditions
    In the screen you can click on command button Analysis,
    which gives you the list of condition types associated
    to the pricing procedure. By clicking on the condition
    type you can know the action that has taken place.
    Case2: Manually forcing prices for Items.
      To do this, you have to populate ORDER_CONDITIONS_IN &
    ORDER_CONDITIONS_INX. Also note to identify the item
    numbers, you manually pass the item number for each item
    in the sales order, use the same item number for
    populating conditions.
      Parameters required:
    ORDER_CONDITIONS_IN:
      ITM_NUMBER, COND_TYPE, COND_VALUE, CURRENCY
    ORDER_CONDITIONS_INX:
      ITM_NUMBER, COND_TYPE, UPDATEFLAG, COND_VALUE,CURRENCY.
       Hope the above info helps you. Do revert back if you
    need more info.
    Kind Regards
    Eswar

  • Two FI documents for one billing document.

    Hi,
       This problem occurs rarely. We do VF04 and generate billing documents. Some billing documents thus generated were not found as actual billing documents by looking at VF03 but are posted in FI in the corresponding company code. When we see these documents in FB03, the header of the document indicates that they came from billing and are not manually posted in FI, thus indicating that billing ran, the FI document was processed, but the billing for some reason failed to be saved in SD. For each of these FI document which do not have a corresponding billing document in FI, there is one more billing document which is existing with the same billing amount and references the same details. It has a corresponding FI document too. So, the crux of the issue is there one only one billing document and two FI documents.
    SAP service has given an OSS note 92592 to find out all the orphaned FI documents and then a way to reverse these documents. This is sort of a workaround. But the root cause for this issue is not found. The note also says the following..
    "In one of the function modules called by FI/CO interface, a 'commit work' is performed.
    A 'commit work' can, for example, be triggered in a Native SQL or result from an RFC.
    A commit work is not allowed here.
    The commit work should not be performed until the billing document is transferred to the update program."
    I have gone through most of the custom codes written by us in the SD billing and FI accounting areas. None of the custom codes use 'commit work' staements. Since this issue doesn't happen frequently, we understood that this is due to a 'commit work' problem in the database but are unable to nail down on the exact piece of code.
    Any suggestions/ideas or experiences of similar instances, please share.
    Regards,
    - Raja.

    Hi Raja!
    Explicit commit work wasn't very likely (but of course you never know). Now you should extend your search for the implicit commit works -> database commit.
    "Database commits are triggered either implicitly or explicitly in an SAP system.
    <b>Implicit Database Commits</b>
    The implicit database commits in an SAP system are caused by the fact that the SAP system is logged on to the database system via its work processes . A work process can only ever execute a single database LUW but cannot interfere with the database LUWs belonging to other work processes. Since an ABAP program can be executed by different work processes during its runtime, the database LUW for the current work process must be completed each time an action takes place that leads to a change of work process. As a result, a database commit is performed implicitly in the following situation:
    Completion of a dialog step
    The program waits for a user action and does not occupy a work process during this time. The next free work process is assigned to the program in the next dialog step.
    Calling a function module in a synchronous or asynchronous Remote Function Call
    The current work process hands over control to a different work process or system.
    Completion of a function module accessed with a synchronous Remote Function Call in a separate work process
    The calling program is assigned a new work process.
    Execution of a RECEIVE statement in a callback routine specified in an asynchronous RFC
    The current work process is interrupted so that the data can be received from the other application server.
    Interruption of the current work process with a WAIT statement.
    After interruption, the program is assigned the next free work process.
    Sending error and information messages and warnings.
    These messages interrupt the current dialog step (see above).
    <b>Explicit Database Commits</b>
    Database commits can be triggered explicitly in ABAP programs in the following ways:
    Use of the corresponding database-specific native sql statement.
    Calling the function module DB_COMMIT.
    This function module, which has no parameters, encapsulates the corresponding native sql statement.
    Executing the open sql statement COMMIT WORK."
    Maybe there is somewhere a wait or sometimes a RFC is called - that are the most likely implicit commits.
    Also calls of standard FMs can contain dangerous coding - include calling of 'bigger' standard functions into your search (not something like 'MARA_SINGLE_READ', but all BAPI).
    Regards,
    Christian

  • Create a document based on specific document template using JavaScript (ECMA Script/REST API/SP Services)

    Hi,
    I have requirement to create a new document based on specific document template available in document library. Able to set the specific content type but the respective document template not being applied. I am trying with ECMAScript, REST API and SPServices
    but no luck for now. Please help me.
    Thanks,
    JP

    Hello,
    I have already tried your solution, however in that case I get the error - "UncaughtSys.ArgumentNullException: Sys.ArgumentNullException:
    Value cannot be null.Parameter name: context"...
    Also, I tried removing SP.SOD.executeFunc
    from my code, but no success :(
    Kindly suggest !!!
    Vipul Jain

Maybe you are looking for

  • Difference B/W Byname and  Bydate in communication channel ,processing.

    What is Difference bettween byname and bydate . if we give  date in processing sequence will it take on that date data or will it take all the data as date wise means all the data from target.

  • Creating a service for a daemon

    I'm working on a specialized server daemon in Google's Go language, and have a makefile that I want to have an "install" directive for, that would pu the compiled binary, the document root, the logfile directory, etc, in /opt/gochan/*, and create a s

  • How can I compose and e-mail?

    I have an icon on my desk top that gets me into my mail box. No problem. When I want to compose an e-mail I can't find a way to do so. Help.

  • Yet again "insufficient banwidth"

    In my never ending consternation with iChat….. After weeks of successful AV chats between me in Los Angeles and my brother in NYC, we started getting “insufficient bandwidth” error messages. After much yelling at my ISP I now have moderately acceptab

  • How do I download pictures from a disk to iPhotos on my MacBook Pro?

    I am working on an album for a friend whom sent me a disk of photos.  How do I download pictures from the disk to my iPhotos so I can then pick and choose which ones to print?  Thanks!  Cyndy