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.

Similar Messages

  • Function Module to get PO details based on Plant and PO date

    Hi
    1. Is there any Function Module to get PO details based on Plant and PO date?
    2. Is there any Function Module to get Material document details based on PO number?
    Thanks
    Narendra

    hi,
    check these standard reports.
    ME2L - By vendor
    ME2M - By material
    MSRV3 - By service
    ME2K - By account assignment
    ME2C - By material group
    ME2B - By tracking number
    ME2N - By PO number
    ME2W - By supplying plant
    also chck this func module.
    REPL_LIST_PURCHASE_ORDER_READ
    reward if hlpful.

  • Function Module to get pernr number based on first name and last name

    Hi All,
    What is the Function Module to get pernr number based on first name and last name.
    Could you please help me.
    T@R.
    Vidya

    hi Vidya,
    you can get perner from PA0002 based on firs name and last name.
    use select query and get perner.

  • Is there any function module for getting distribution list name

    Hi all,
    Is there any function module for getting distribution list name when there is same description for two distribution list name.
    or
    help me how to fetch the correct distribution name when there is same description.
    In order to send mails.
    Tell me ASAP.
    thanks
    sagar.

    http://www.sapbrainsonline.com/REFERENCES/FunctionModules/SAP_function_modules_list.html
    list of Fms

  • Is there any function module to get the variables used in a query?

    Hi experts
    Please, do you know if is there any function module to get the variables used in a query?
    Thanks and regards
    Luis

    Hi Srini
    Yes, I have checked the tables but I need a function module
    Thanks anyway!
    Luis

  • Any function module to get all items in SAP INBOX

    hi All
    I am trying to get all the items in my SAP Inbox via rfc.
    Can anyone help me with any function module to get all items in SAP INBOX.
    Thanks

    Hi Mukesh,
    Step 1. Use FM SO_USER_READ_API1 to get the folder details of the user
    Step 2. Use FM SO_FOLDER_READ_API1 of the respective folder. You can read the Inbox, Workflow Inbox depending on what folder you read. The function modules are documented well as well with examples.
    Hope this will  help u,
    Thanks & Regards
    Kiran

  • Any function module for getting fiscal year week numbers

    can any one provide me function module for getting fiscal year week numbers ? if no function module please let me know work around.
    Thanks!
    Lakshmikandh

    hi,
    Use FM <b>'DATE_GET_WEEK'</b>...
    parameter D1 LIKE SCAL-DATE.
    Data w like scal-week.
    CALL FUNCTION <b>'DATE_GET_WEEK'</b>
    EXPORTING
    date = D1
    IMPORTING
    WEEK = W
    EXCEPTIONS
    DATE_INVALID = 1
    OTHERS = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    write W+4(2).
    Regards,
    Santosh

  • Any Function Module For getting Shipment Details

    Hi All,
    I want to get all details of shipment. i tired , but unable to get any function? I was able to find the creation or change shipment function modules, but not able to find the function module for getting the details for Shipment.
    like BAPI_SHIPMENT_CHANGE           Change Shipment
    BAPI_SHIPMENT_CREATE           Create Shipment
    similary
    Do you have any idea for getting (display)the details of Shipments?
    Regards,
    Raju

    hi,
    you can use
    VTTP,VTTK
    or
    RV_SHIPMENT_READ

  • Any function module to get Stock and value of material on a given date?

    Hi Friends
    Is there any function module available to get Stock/and  value of material on a given date?
    Thanks
    Harish

    Sorry I didn't elaborate the requirement.
    I am asked to develop a custom report for inventory management. For range of materials it is required to display stock and value on particular date and GRs GIs for the range.
    I need function module to use in Zreport.
    Thanks
    Harish

  • Any Function Module to get date by passing week and year

    Hi,
       Is there any Function Module available to get date by passing week and year. For example, Week 24, Year 2005 and you get the date.
    Regards,
    Mira

    WEEK_GET_FIRST_DAY
    pass 'YYYYWW' (200524) to WEEK parameter it will give you the week start date
    Raja

  • Any Function Module to get Service Conditions in Service Contracts???

    Hi All,
    I have created a function module inside which I have written BDC code for changing Service Contracts (ME32K).
    I have used Item_condition and item_cond_validity structures in Table parameters.
    For changing the conditions related to services, I need to know first which ones of those conditions were already there in the database for the contract and which ones are newly put in item_condition structure.
    Similar reqmnt I had for Services also, for which I got the FM - MS_FETCH_SPEC_FOR_LIST, wherein I am giving Package number from Ekpo and getting the services related to item. I need something similar for Conditions also.
    Is there any Function module wherein by giving the item and service info, I can get the conditions related to that particular Service? Or else any way using SAP std tables, I can get this info.
    Please respond if anyone has this info.
    Thanks a lot!
    Navita

    Hi Mukesh,
    Step 1. Use FM SO_USER_READ_API1 to get the folder details of the user
    Step 2. Use FM SO_FOLDER_READ_API1 of the respective folder. You can read the Inbox, Workflow Inbox depending on what folder you read. The function modules are documented well as well with examples.
    Hope this will  help u,
    Thanks & Regards
    Kiran

  • Is there any function module to get the purchase order conditions from EONP

    Hi,
    I want to get the EONP and EONH table details for the purchase orders with the help of function module. Can anyone tell me any function module name which would give me those details.
    Thanks,
    Atanu

    Hi
    Check with BAPI function module BAPI_PO_GETDETAIL and BAPI_PO_GETDETAIL1.
    Regards
    Srilaxmi

  • Is there any function module to download abap data to a word document?

    Hi all,
    I know that the downloading to word can be done by ole automation...But is there any function module in sap which can do the same....?? please let me know your expert comments.......

    Hello Rich,
    I have tried the function module word_ole_formletter ..but i am facing a problem...once i execute the program i can see that the data is coming to word document but it is coming in read only mode and again reverting back to a blank document as was befor the data is coming to word document..Can you suggest where i am going wrong...Also I tried to debug the function module but the break point is not coming to the function module ....

  • 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

  • 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

Maybe you are looking for