Fun. Module to get MSEG data based on EBELN and EBELP

I need to get records from MSEG by passing EBELN and EBELP.
I have written SELECT query.
I am getting the data, but it is taking much time in Production.
Is there any Function module to get MSEG data based on EBELN and EBELP.
Thanks

Hi ,
       You can select from table EKBE based on purchase order number and Item number .
Please reward if useful.

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 the dates from the year and the period

    Is there a function Module to get the dates from the year and the period

    Check with :
    To get last day of period use .
    LAST_DAY_IN_PERIOD_GET.
    To get last of month Use :
    RE_LAST_DAY_OF_MONTH
    HRVE_LAST_DAY_OF_MONTH
    LAST_DAY_OF_MONTHS
    ISB_PREVIOUS_PERIOD_DATE_GET
    Thanks
    Seshu

  • How to get past date based on duration and factory calender?

    Hi All,
    when i enter the duration ,i want to get the past date based on factory calender w.r.t current date
    i.e if current date is 26th jun and duration is 10 , the past date should be 12th jun (which should exclude all holidays and weekends).
    Thanks
    Vasumathi

    Hi,
    Please check this FM: I think this will resolve ur issue.
    END_TIME_DETERMINE
    Cheers,
    Vijay.

  • Function module to get posting date from posting year and posting period

    Hi all,
    I need a function module which will return posting date when posting period and fiscal year is passed to it..
    Thanks and regards,
    Puja.

    Hi puja
    try this FM
    this will solve ur problem
    G_POSTING_DATE_OF_PERIOD_GET
    G_POSTING_DATE_OF_YEAR_GET
    FCJ_CHECK_POSTING_DATE
    Cheers
    Snehi Chouhan

  • BAPI or Function Module to get MSEG table data based on PO Number (EBELN)

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

    Hi,
    check the Bapis Givem below
    BAPI_PO_GETITEMS
    http://abap.wikiprog.com/wiki/BAPI_PO_GETDETAIL1
    you will get the detail.
    Regards

  • 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.

  • Function Module to Delete ODS Data based on Request

    Hi All,
    Is there any specific function module to delete ODS data based on Request.
    I found the program RS_DEL_ODS_1 which is using the FM RSAR_ODS_API_DEL.
    But this FM is deleting the request at PSA level.
    Is there any alternate FM?Or is there any ABAP Program or so?

    Hi,
    Deletion of specific request is not perimitted for ODS objects. You can delete the most recent request, but if you delete any previous requests, all the requests up to that request will also be deleted.
    You can do it by write an ABAP program to identify the specific requests to be deleted for ODS.
    Regards
    CSM Reddy

  • Function module to get md04 data

    I need function module to get below data of the material as per the mrp area.
    Thanks,
    Kiran

    Hello Kiran and Kumar
    As I have explained in the following thread, BAPI_MATERIAL_STOCK_REQ_LIST should be used instead of MD_STOCK_REQUIREMENTS_LIST_API.
    Material shortage report after mrp run.
    BR
    Caetano

  • Extract Data Based on Year and Month

    My clients have taken an Oracle DB TimeStamp field and
    downloaded it to Access in a TEXT field format.
    Sample data: 20060401001348CS
    All I am trying to do is extract data based on year and
    month. I have equal to 200604*, 200604%. Have also tried to used
    LIKE.
    Nothing works. It just can't be that dificult. Please help.
    Thanks

    After breaking my inquiry down into bits and pieces the
    problem is not just the LIKE, it is a combination of events. The
    entire picture is this:
    User selects Year from a drop down (2006), then selects month
    from drop down (04). I then build a variable called
    EventReport Date with the statement <cfset EventReportDate
    = Session.InquiryYear & Session.InquiryMonth & "%">
    It correctly displays as 200604% - When used by itself as
    below, it works just fine.
    WORKS
    <cquery name="GetEventCount" datasource="CountyDB">
    Select count(AD_ID) as EventCount, TYCOD, TYP_ENG, CURENT,
    CDTS
    FROM aeven
    WHERE CDTS LIKE '#EventReportDate#'
    Group By AG_ID, TYCOD, TYP_ENG, CURENT, CDTS
    </cfquery>
    WORKS (additional WHERE criteria)
    <cquery name="GetEventCount" datasource="CountyDB">
    Select count(AD_ID) as EventCount, TYCOD, TYP_ENG, CURENT,
    CDTS
    FROM aeven
    WHERE ((AG_ID = '#Session.InquiryAgencyCode#') AND (CURENT =
    'T'))
    Group By AG_ID, TYCOD, TYP_ENG, CURENT, CDTS
    </cfquery>
    FAILS **** There is something wrong with the combination of
    the WHERE clause items
    <cquery name="GetEventCount" datasource="CountyDB">
    Select count(AD_ID) as EventCount, TYCOD, TYP_ENG, CURENT,
    CDTS
    FROM aeven
    WHERE ((AG_ID = '#Session.InquiryAgencyCode#') AND (CURENT =
    'T')
    AND (CDTS LIKE '#EventReportDate#'))
    Group By AG_ID, TYCOD, TYP_ENG, CURENT, CDTS
    </cfquery>
    NOTE: There is not an error message, it just comes back with
    zero records.
    MORE LOST THAN EVER! Thanks for your help
    Ron

  • Get Sales data based on MSEG entries

    Hi,
    I have retrieved some entries from mseg table by joining with MKPF based on budat. Now i would like to get the purchase related data based on the details in MSEG.
    Could you please help joinig mseg entries with EKKO , EKPO ,LIKP, LIPS or VBEP.
    Thanks in advance

    Hi,
    MSEG will have the details of PO and Line item. Based on these details, we can get the relevant Purchase Requisition from the table EKPO by passing the PO & Line item.
    If the PR is creted with reference to Sale Order, then the details of the PR will be available in table VBEP. So that you can pass the PR number in VBEP and get the Sales Order Number. With Sales Order Number You can link LIKP & LIPS
    Regards
    Ramakrishna

  • 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.

  • Getting aggregated data based on Date in Webi.

    Hi,
                  I have a requirement to display last 6 Months Receviables Month Wise in Webi. And i am getting data based on clearing Date in Bex query. And data from Bex query will be like
           Month             Measure
         01.01.2014       12
         06.01.2014       15
         15.01.2014       16
        02.02.2014        8
        05.02.2014       10
        12.03.2014        4
        14.03.2014        6
        18.03.2014       10
        21.03.2014        20
        30.03.2014       30
       03.04.2014        30
    And i want aggregated data as
    Month  Measure
    Jan      43
    Feb     18
    Mar     66
    Apr     30

    Hi Satish,
    Have you tried below:
    Create Month1 object as =Month([Month]) and [total]as =Sum([Measure])
    Then drag both Month1 and total objects in report block.
    Regards,
    Yuvraj

  • Function module to give a date based on a particular date and interval.

    Hi there,
    I am writing a code where I need to to find another date
    based on a key date and and an interval.
    Is there any function module where I pass the date and the interval
    (say 30) and it gives me a new date after subtracting 30 from it.
    Or is there any piece of code which does it?
    Thanks in advance.
    Regards,
    Kate

    hi Kate,
    you can try ?
    data : date2 like sy-datum.
    date2 = yourdate - 30.
    hope this helps.

  • Function Module to get Last date of previous year

    Is there any function module to get the Last date of the previous year. e.g, if i give date as 03/02/2009 the output  should be 31/12/2008.

    pls use below 2 FM's
    CALL FUNCTION 'MONTH_PLUS_DETERMINE'
              EXPORTING
                months  = -1
                olddate = curent_date
              IMPORTING
                newdate = w_prevdate.
    CALL FUNCTION 'RP_LAST_DAY_OF_MONTHS'
              EXPORTING
                day_in            = w_prevdate
              IMPORTING
                last_day_of_month = w_lastdayprevmonth
              EXCEPTIONS
                day_in_no_date    = 1
                OTHERS            = 2.

Maybe you are looking for