Custom report -extract MSEG+MKPF and MD04 Entries

Hi,
My Base requirement is to SUM up MB51 quanity values monthly and also MD04 values for same material, plant, monthly dates and upload it to a custom table .
So my code should update monthly a custom table which consists of
Material,Plant ,quantity- SEP 06,quantity-oct 06,quantity- NOV 06 ..... quantity- DEC 07.
For this I picked entries for MB51 like this & later using FM MD_STOCK_REQUIREMENTS_LIST_API to capture MD04 entries.
but with this I can get only one month at a time? What is the good way to update all entries(For all months) at a time?
SELECT MKPFMBLNR MKPFBUDAT MSEGERFMG MSEGBWART MSEGMATNR MSEGWERKS MSEG~MEINS
  INTO CORRESPONDING FIELDS OF TABLE T_MKPF
  FROM MKPF
  INNER JOIN MSEG
  ON MKPFMBLNR EQ MSEGMBLNR
  WHERE MATNR IN S_MATNR
  AND WERKS IN S_WERKS
  AND BUDAT IN S_BUDAT
  AND ( BWART = '101' OR BWART = '102').
  LOOP AT T_MKPF.
    MOVE T_MKPF TO WA_DATA.
    AT END OF MATNR.
      SUM.
      T_DATA-ERFMG = T_MKPF-ERFMG.
      T_DATA-MATNR = WA_DATA-MATNR .
      T_DATA-WERKS = WA_DATA-WERKS.
      T_DATA-BUDAT = WA_DATA-BUDAT.
      T_DATA-MEINS = WA_DATA-MEINS.
      APPEND T_DATA.
      CLEAR T_DATA.
      CLEAR : WA_DATA.
    ENDAT.
  ENDLOOP.
LOOP AT T_DATA.
    CLEAR: V_MATNR, V_PLWRK.
    MOVE T_DATA-MATNR TO V_MATNR.
    MOVE T_DATA-WERKS TO V_PLWRK.
    CALL FUNCTION 'MD_STOCK_REQUIREMENTS_LIST_API'
      EXPORTING
        MATNR                    = V_MATNR
        WERKS                    = V_PLWRK
      TABLES
        MDEZX                    = T_MDEZ
      EXCEPTIONS
        MATERIAL_PLANT_NOT_FOUND = 1
        PLANT_NOT_FOUND          = 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.
    LOOP AT T_MDEZ WHERE DAT00 IN S_BUDAT.
      IF  T_MDEZ-DELB0 = 'PldOrd' OR  T_MDEZ-DELB0 = 'PurRqs'  OR T_MDEZ-DELB0 = 'POitem' .
        MOVE ABS( T_MDEZ-MNG01 ) TO Y_MNG01.
        ADD Y_MNG01 TO X_MNG01.
        CLEAR: Y_MNG01.
      ENDIF.
    ENDLOOP.
    T_OUTPUT-ERFMG = X_MNG01 + T_DATA-ERFMG.
    SELECT SINGLE MAKTX FROM MAKT
      INTO T_OUTPUT-MAKTX
   WHERE MATNR = T_DATA-MATNR
   AND SPRAS = 'EN'.
    IF SY-SUBRC IS INITIAL.
      MOVE T_DATA-MATNR TO T_OUTPUT-MATNR.
      SHIFT T_OUTPUT-MATNR LEFT DELETING LEADING ZEROS.
      MOVE T_DATA-WERKS TO T_OUTPUT-WERKS.
      MOVE T_DATA-MEINS TO T_OUTPUT-MEINS.
      APPEND T_OUTPUT.
    ENDIF.
    CLEAR: X_MNG01.
  ENDLOOP.
Regards
Praveen
Message was edited by:
        PRAVEEN s

Hi Praveen,
Instead of picking up data from different place's, try to use single view or function module where you will get all required data.
Regards,
Amey

Similar Messages

  • Custom Reports in SQL Developer and translations files

    I try to do custom reports for our development team and I would have translated ones, like standards does.
    Does anyone have any informations on how to do that ?
    I tried with xliff file in the same directory of my custom xml but without any result.
    Has anyone new about XML schemas or DTD for customization of SQL Developer. In 2.1EA2 I haven't found anything related to this topic. Is it still maintained for the final 2.1 release ?
    P.S.
    Sorry for the ugly English. It's not my mother tongue.

    Hi Chris -
    I can't duplicate this here. Using RC1 against my EA2 t test repository works fine. Looking at the code, that message should only appear if either the Oracle version is less than "10" or some error occurs while trying to figure that out. I assume you are running something greater than version 10 or EA2 should/would not have worked. Can you let me know which Oracle and Java versions you are running with?
    Brian Jeffries
    SQL Developer Team

  • GL Custom Reports not displaying source and line item Data after Upgrade

    Hi,
    I am having this issue even though General Ledger Journal Entry Summarization is set to "No Summarization" and in SLA the Line Type is set in detail for Transfer to GL. Have you come accross a specfic example like this? Can you please guide me to what the problem may be?
    None of the GL reports is showing the Source and Line Item details.
    Thanks,
    Arun

    I am having this issue even though General Ledger Journal Entry Summarization is set to "No Summarization" and in SLA the Line Type is set in detail for Transfer to GL. Have you come accross a specfic example like this? Can you please guide me to what the problem may be?
    None of the GL reports is showing the Source and Line Item details.Have you verified the queries of those reports after the upgrade? And, when you say upgrade, do you mean from 11i to R12?
    Did you set the application context properly?
    How to set the Organization Context in R12? [ID 437119.1]
    Oracle Applications Multiple Organizations Access Control for Custom Code [ID 420787.1]
    SQL Queries and Multi-Org Architecture in Release 12 [ID 462383.1]
    Setting APPS Context is mandatory step while loading data using public APIs [ID 473615.1]
    Thanks,
    Hussein

  • Creating a custom report with detailed header and then associated detail

    I am very new to CRMOD, so this question may be basic, but I have not found any good material yet to help me out, so here goes.
    We are trying to create a Quote report that will be sent to our customers. The report needs to have both a header and detail section basically as follows:
    <Header>
    Quote Form
    Date:
    Expiration Date:
    Sales Person Name:
    Customer Name and address
    Terms
    ... some other text data ...
    <Detail>
    Standard fields that define the quote, these are easy.
    What I cannot determine how to do is create the header section. In the report designer, it only allows for a Title, logo, and another text line. Can anyone suggest another method?

    I do not have the narrative option.
    Options available are:
    Title
    Table
    Chart
    Pivot Table
    Gauge
    Active Filters
    legend
    Advanced
    --> Column Selector
    --> View Selector
    --> Funnel Chart
    --> Ticker
    According to the documentation, the narrative view should be available from the advanced menu. Am I on a different package by chance?

  • Custom Report for the Stock and Stock value for a specific date

    Hi SAP Gurus,
    Is there any SAP standard t-code or any logic to get the transcations (additions (for example: Purchases) and subtractions (Sales) to the inventory) for a particular materials in a plant and with Total Stock and also Total Stock value when that particular transaction happened?
    Our system is R/3 4.7
    I looked at the MB5B, MBCE, MBCA, MC44, MB51 and some other standard T-codes but could not find the total stock value at the time of Transaction happened.
    The history tables MBEWH and MARDH  are updated after the month end closing procedures, right, which means I will have the inventory value changing every month if material has Price "S".
    Thank you,
    -Harter

    Hi Harter,
    Unfortunately, you cannot see in a single tcode the value of stock and stock quantity on a specific date. As you yourself have pointed out, we only have to make use of the history table MBEWH, MARDH for the month wise stock quantity and value. Along with that you should also make use of the table MBEW to take teh stock quantity and value. So the total value of stock on a particular date will be
    Stock qnty = MBEWH value until the previous month (for teh specific valuation class, period etc) + MBEW value for the present date.
    But this will nto work out if you want to find out teh stock quantity and stock value on a past date basis. For past data, only  m onthwise data is available. For this anyway you can refer to MC.1 and so on reports.

  • Customer Report with Sales Employee and Due date

    Hi,
    I need to configure a report for Customers with Sales Employee & Due date.is there any standard report for this combination in SAP or Do i need to Configure separate report for this.If i need to configure this -kindly help me with some guide lines to prepare this.It would be a great help if you provide some steps to configure this Report.
    Thanks in advance
    Suvarna

    Have you tried the txn code MC-Q or the report program RMCV0500.

  • Drill down to MD04 from custom report

    Hi Abapers,
    I have a custom report that drill down to MD04 when clicking on the material number.
    When user now in MD04 they see all the PO, Pur req, Planned order, dep req, order reservation, etc. Then they click on filter to turn on the fitler and select 'availability based on order reservation" from selection rule drop down as they want to see only order reservation and not anything else (means PO, Pur req, Planned order, dep req).
    I need to know is there is a way when we exe our custom report and click on material to come to MD04 we can only see order reservation without clikcing on filter and all that extra step i mentioned above.
    Please let me know.
    Thanks in advance!

    This is not possible without enhancement. You can drill from FS-CM into FS-CD document (click the CD doc reference in claims), but not the other way round.
    - A claim object in the insurance subledger has a reference to its policy object . This allows you to see all claim related postings to a policy in the account balance display
    - Additionally the sub ledger document is storing claims payment reference number. Theoretically one sub ledger document can relate to multiple claim payments (summerized in one payment reference)
    - Usually the claim object in FS-CD is created as prefix + claim number, so it would not be too complicated to re-engineer this logic to build a jump back to the claims system. Better solution would be to determine the claim based on the payment reference provided

  • Custom Report using Metrics of Instance and Server

    Hello
    I need to create a custom report using different instance and server metrics like:
    File System Space Available
    Tablesapaces
    Database Spaces usage
    Sort in Memory
    library Cache Hit
    Data Dictionary Hit
    Buffer Cache Hit
    I already made the report, but I can´t change the size of the graphic (for a better presentation on my report)....
    Do you know how can I change the size of the report?
    I think that I´m using a "metric" so for that reason I Can´t change the size ... :(

    I am currently having a problem with this report and drilldown to KSB1, the cost centers selected int S_ALR_87013611 are not transferring to KSB1 and thus all the cost centers come up in the call to KSB1, are you experiencing this problem? I am on V4.7

  • Custom Report with Problems and incidents

    I'm trying to create a custom report of all problems and related incidents.  I can query the problemDimvw table, but I need some assistance linking to the incidents.  Anyone have a query or point me in a direction to join the necessary tables?
     What I'm trying to get is Problem ID, Title, Description, and Incident IDs linked to it.  Thanks.
    Chris

    I know PowerShell can help you with the Get-SCSMRelatedObject command but you would have to write a small script to get that to work en mass.
    http://smlets.codeplex.com/

  • Custom report listing database links

    I'm trying to determine what tables/views in the EM12c repository contain database link information (if any), so I can create a custom report using it.  Has anyone come across an EM schema description or know how to determine what objects/queries are behind a page in EM?  If the data isn't centralized in the EM schema, I recognize I could create a Group and run a query against DB_DB_LINKS to generate a link report for all the databases.  Is that a better way to do it?  I'm open to additional suggestions or tips, since I'm new to the custom reporting features ... (and not trying to reinvent the wheel here).  Thanks.

    There is no table in em repository database that contains db link information for database targets. The way to get this info is create a dblink in your em repository database for each database target then create plsql package that connect to each target over dblink and writes the info into a table in em repository table. You could also just create a sql job from em and run against each database target.
    If you need help with the plsql let me know I have several of these in my em to extract specific data I need from each db target.

  • Font issue in Custom Reports in oracle Apps R12.1.1

    Hi Friends,
    I am using Oracle Apps R12.1.1. Vision Instance.
    i develop custom report (using 10g DS ) and i used Ariel a font and i deployed custom report.it works fine
    The same report i opened in report builder and add a new parameter and used the same font Ariel and saved and then deployed but the concuurent report is showing all the columns in symbol(western) font not in arial font.
    what could be the issue? the first report shows proper font.Please let me kno the fix
    Regards

    yes i have used template.fmb only , and am using FND_KEY_FLEX.DEFINE as i mentioned earlier ,
    i have not given any where clause -- should we give any where clause to retrieve the data into the combinations(LOV)?It depends on what values you want to retrieve.
    i mean my requirement is if i give % and press tab all the valid combinations should be displayed.
    its showing no entries found.Did you review 420787.1 referenced above?
    Thanks,
    Hussein

  • Custom Reports migration during R12 upgrade

    During upgrade from 11i to R12, how do I understand from RD50s as to what would change in my custom reports in Financial, OM and SC modules? Is there a metalink document which can help me in making changes to my new data warehouse and ETLs? Please advise! Thanks - Singh

    user8599185 wrote:
    During upgrade from 11i to R12, how do I understand from RD50s as to what would change in my custom reports in Financial, OM and SC modules? Is there a metalink document which can help me in making changes to my new data warehouse and ETLs? Please advise! Thanks - SinghYou need to visit your custom objects definition/code and make sure all are valid. Oracle provide tools for seeded objects for which ones are obsolete (or not used) in R12
    Preparing Custom Development for Next Oracle E-Business Suite Release [ID 374398.1]
    EBS File Comparison Report Now Available
    https://blogs.oracle.com/stevenChan/entry/ebs_file_comparison_report_now
    Identifying Data Model Changes Between EBS 12.1.3 and Prior EBS Releases
    https://blogs.oracle.com/stevenChan/entry/ebs_data_model_1213
    https://blogs.oracle.com/stevenChan/tags/upgrades
    eTRM
    http://etrm.oracle.com/
    Thanks,
    Hussein

  • AC 5.3 - Custom Reporting

    Hi All,
    I know that in AC 5.3 SP09 we are supposed to be able to generate Custom reports, but can anyone tell me which reports the custom reports are generated in and any other software requirements that need to bve met to create teh custom reports, eg: you need Crystal Reports etc etc.
    regards
    Simon

    Great question. This has initiated a big discussion in our office.
    We would like to know which of the following is correct:
    a)  SP09 will add a data mart component to the GRC Application Server, and the client user would need to install a front end Crystal Reports tool to analyse reports from the data mart on the GRC application server. (This does not require installation of a Crystal Server instance)
    b) SP09 will install a custom connector in the GRC application server allowing data to be extracted to an external Crystal Server box to which users will connect and view reports. (This does require installation of a Crystal Server instance).
    Thanks,
    Babak

  • Report for daily production and daily sales

    Can you any body Please let me know which fields we should pick to create custom report containing production  qty and sales qty day wise for each material

    Hi Veesh,
    Whats the scenario you using there? i mean to ask
    Discrete
    REM
    or
    PP-PI
    Thanks & Regards,
    Abu Arbab

  • Custom Report for Application Catalog History

    Hi All,
    I am going to create custom report that display request and approval history from application catalog. Required parameters are Application name, requested by, approved by, request time, approval time. AFAIK there is no out of the box default report from
    SCCM 2012 SP1 that display those parameters. Which tables view and columns I could use for this purpose?
    Thanks for your help.

    The information which user installed what from the application catalog is not stored anywhere if I am not mistaken. 
    Torsten Meringer | http://www.mssccmfaq.de

Maybe you are looking for