Link between EQUI + EQUIZ with IMRG

Hi Gurus
i want to develop a report where on selection screen user enters euipment number and date of measurement.
now my problem is that how can I link EQUI with IMRG table
so that I can enter euipment no and specifies only reading date then i m not able to fetch the date based on euipment lying in this date range.
This date is found in table IMRG field is IDATE
If any ways i van find a relationship from equipment no (EQUI) and IMRG ( IK17 T code)
Plz help

Hi
Thanks Raam , I will check your program and try to implement it
my requirements are as below which is a rough estimation for fuel calculation
and based on the below program you tell me please how to proceed with final internal table , This program is not correct just to get an idea how I need the program.
REPORT Z_ESLP_FUEL LINE-SIZE  180 LINE-COUNT 75
         NO STANDARD PAGE HEADING.
TABLES : equi,
         equz,
         imptt,
         imrg,
         eqkt.
Type Declaration
TYPES: BEGIN OF ty_data  ,
         equnr      type equnr,         " Euipment no
         eqktx      type eqkt-eqktx,    " Equipment Text
         idate      type idate,         " Measuring Date
         recdu      type imrg-recdu,    " Unit of measuring ='KM','L','H'
         recdv      type imrg-recdv,    " Counter reading data
       END OF ty_data.
TYPES: BEGIN OF ty_final,
         equnr           type equnr,           "  Equipment no
         eqktx           type eqkt-eqktx,      "  Equipment Text
         min_date       type imrg-idate,      "  Min Date
         min_km      type imrg-recdv,      "  Max Km
         max_km      type imrg-recdv,      "  Min km
         t_max_min_km      type imrg-recdv,      "  Total min_km-max_km
         max_date       type imrg-idate,      "  Max Date
         min_hr      type imrg-recdv,      "  Max hr
         max_hr       type imrg-recdv,      "  Min hr
         t_max_min_hr      type imrg-recdv,      "  Total min_hr-max_hr
         min_lit     type imrg-recdv,      "  Max lit
         max_lit     type imrg-recdv,      "  Min lit
         t_max_min_lit      type imrg-recdv,      "  Total min_lit-max_lit
         fuel_con       type p decimals 2,    "  Total_hrs / t_max_min_hr
         km_l           type p decimals 2,    "  km / L
         lit_per_hr     type p decimals 2,    "  fuel comsumed / t_max_min_hr
       END OF ty_final.
DATA:    i_data TYPE TABLE OF ty_data,        " internal table
         wa_data TYPE ty_data,                  " work area
         i_final TYPE TABLE OF ty_final,        " internal table
         wa_final TYPE ty_final.                " work area
  SELECTION-SCREEN BEGIN OF BLOCK blk WITH FRAME.
  SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
  SELECT-OPTIONS: p_equnr FOR equi-equnr no-extension no intervals,
                  p_idate FOR imrg-idate,   "NO-EXTENSION NO INTERVALS OBLIGATORY,
                  p_recdu FOR imrg-recdu.   "NO-EXTENSION NO INTERVALS default 'M3'" OBLIGATORY.
  SELECTION-SCREEN END OF BLOCK blk1.
  SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002.
  SELECTION-SCREEN END OF BLOCK blk2.
  SELECTION-SCREEN END OF BLOCK blk.
TOP-OF-PAGE.
FORMAT INTENSIFIED ON.
WRITE:/1(40) ' INVESTMENT LIMITED  '.
WRITE:/50(40) ' FUEL CONSUMPTION REPORT ' CENTERED   ,
         2 'Page', sy-pagno.
         FORMAT INTENSIFIED OFF.
  WRITE:/50(40) '----
' CENTERED .
  FORMAT INTENSIFIED ON.
  WRITE:/2 sy-datum COLOR 3, sy-uzeit .
  "WRITE:/1 S903-SPMON ."p_yearf.
  ULINE.
  "CENTERED.
   write: /2 'Date From     :'.
   write: /2 'Equipment No  :'.
   write: /2 'Unit          :'.
write: /2 'Period From   :'   ,p_yearf, ' Period to :' , p_yeart.
write: /2 'Sold to Party :'left-justified,p_kunag-low , '  to   '  , p_kunag-high.
write: /2 'Plant         :' left-justified , s_werks-low, '  to   '  , s_werks-high.
write: /2 'UOM           :' left-justified ,s_vrkme-low.
  SKIP.
  ULINE.
  WRITE:/1 sy-vline,
    2   'EQUIP NO',              10 sy-vline,
    11  'NAME',                  40 sy-vline,
    41  'min_date',              50 sy-vline,
    51  'max_date',              60 sy-vline,
    61  'min_km',                70 sy-vline,
    71  'max_km' ,               80 sy-vline,
    81  't_max_min_km',          90 sy-vline,
    91  'min_hr',               100 sy-vline,
    101 'max_hr',               110 sy-vline,
    111 't_max_min_hr' ,        120 sy-vline,
    121 'min_lit',              130 sy-vline,
    131 'max_lit',              140 sy-vline,
    141 't_max_min_lit',        150 sy-vline,
    151 'fuel_con',             160 sy-vline,
    161 'km_l',                 170 sy-vline,
    171 'lit_per_hr',           180 sy-vline,
  FORMAT COLOR 3 ON.
  ULINE.
END-OF-PAGE.
START-OF-SELECTION.
select cequnr beqktx bidate brecdv b~recdu
into corresponding fields of i_data
from equi AS a
         inner join equiz as b
         on a~equnr = b.equnr
         inner join imptt as c
         on aobjnr = cmpobj
         inner join eqkt as d
         on aequnr = dequnr
         inner join imrg as e
         on epoint = cpoint
         where c~equnr in p_equnr
         and
         b~idate in p_idate
         and
         b~recdu in p_recdu.   
SORT i_data BY recdv descending.
LOOP AT i_data INTO wa_data.
        CLEAR: wa_data.
        READ TABLE i_data into wa_data
             WITH KEY equnr = wa_data-equnr.
            WITH key objnr = wa_data-mpobj.
BINARY SEARCH.
APPEND wa_data to wa_final.
*max_date
select single max(idate) into corresponding fields of
i_final from imrg
         where c~equnr in p_equnr
         and
         b~idate in p_idate
         and
         b~recdu in p_recdu.
sort i_final by idate DESCENDING .
LOOP AT i_final INTO wa_final.
MOVE-CORRESPONDING i_final to wa_final-max_date.
append i_final to wa_final-max_date.
*min_date
select single min(idate) into corresponding fields of
i_final from imrg
         where c~equnr in p_equnr
         and
         b~idate in p_idate
         and
         b~recdu in p_recdu.
sort i_final by idate ASCENDING .
LOOP AT i_final INTO wa_final.
MOVE-CORRESPONDING i_final to wa_final-min_date.
append i_final to wa_final-min_date.
*max_km
select single max(recdv) into corresponding fields of
i_final from imrg
     where c~equnr in p_equnr
        and
        b~idate in p_idate
        and
        b~recdu = 'KM'.
sort i_final by recdv DESCENDING .
loop at i_final into wa_final.
MOVE-CORRESPONDING i_final wa_final-max_km .
append i_final to wa_final-max_km.
*min_km
select single min(recdv) into corresponding fields of
i_final from imrg
     where c~equnr in p_equnr
        and
        b~idate in p_idate
        and
        b~recdu = 'KM'.
sort i_final by recdv ASCENDING .
loop at i_final into wa_final.
MOVE-CORRESPONDING i_final to wa_final-min_km .
append i_final to wa_final-min_km.
total max and min km
t_max_min_km = max_km - min_km
append i_final to wa_final-t_max_min_km.
*max_hr
select single max(recdv) from imrg into corresponding fields of i_final
where c~equnr in p_equnr
        and
        b~idate in p_idate
        and
        b~recdu = 'H'.
sort i_final by recdv DESCENDING .
LOOP AT i_final into wa_final.
MOVE-CORRESPONDING i_final to wa_final-max_hr.
append i_final to wa_final-max_hr.
*min_hr
select single min(recdv) from imrg into corresponding fields of i_final
where c~equnr in p_equnr
        and
        b~idate in p_idate
        and
        b~recdu = 'H'.
sort i_final by recdv ASCENDING .
LOOP AT i_final into wa_final.
MOVE-CORRESPONDING i_final to wa_final-min_hr.
append i_final to wa_final-min_hr.
t_max_min_hr
total max and min hr
t_max_min_hr = min_hr - max_hr
*MOVE CORRESPONDING i_final to wa_final-t_max_min_hr .
append i_final to wa_final-t_max_min_hr.
*max_lit
select single max(recdv) from imrg into corresponding fields of i_final
where c~equnr in p_equnr
        and
        b~idate in p_idate
        and
        b~recdu = 'l'.
sort i_final by recdv DESCENDING.
LOOP AT i_final into wa_final.
MOVE-CORRESPONDING i_final to wa_final-max_recdv.
append i_final TO wa_final-max_recdv.
*min_lit
select single min(recdv) from imrg into corresponding fields of i_final
where c~equnr in p_equnr
        and
        b~idate in p_idate
        and
        b~recdu = 'l'.
sort i_final by recdv ASCENDING.
LOOP AT i_final into wa_final.
MOVE-CORRESPONDING i_final to wa_final-min_recdv.
append i_final to wa_final-min_recdv.
*t_max_min_lit
total max and min lit
t_max_min_lit = min_lit - max_lit
*MOVE CORRESPONDING t_max_min_lit to i_final.
append i_final to wa_final-t_max_min_lit.
*fuel_con
*fuel_con = t_max_min_hr .
*km_l
km_l = t_max_min_km / t_max_min_lit.
*MOVE CORRESPONDING km_l to i-final.
append i_final to wa_final-km_l  .
lit_per_hr
*lit_per_hr = wa_final-fuel_con / wa_final-t_max_min_hr.
*append i_final to wa_final-lit_per_hr.
     IF SY_SUBRC EQ 0.
     PERFORM prepare_final_rec USING 'M'. "Modift Exixting Record
    ELSE.
    PERFORM prepare_final_rec USING 'A'. "Append New Record
     ENDIF.
     ENDLOOP.
      LOOP AT i_final INTO wa_final.
      WRITE:/1  sy-vline,
             2  wa_final-equnr,                 10 sy-vline,
            11  wa_final-eqktx,                 40 sy-vline,
            41  wa_final-min_date,              50 sy-viine,
            51  wa_final-max_date              60 sy-vline,
            61  wa_final-min_km,                70 sy-vline,
            71  wa_final-max_km,                80 sy-vline,   
            81  wa_final-t_max_min_km,          90 sy-vline,
            91  wa_final-min_hr,               100 sy-vline,
            101 wa_final-max_hr,               110 sy-vline,
            111 wa_final-t_max_min_hr,         120 sy-vline,
            121 wa_final-min_lit,              130 sy-vline,
            131 wa_final-max_lit,              140 sy-vline,
            141 wa_final-t_max_min_lit,        150 sy-vline,
            151 wa_final-fuel_con,             160 sy-vline,
            161 wa_final-km_l,                 170 sy-vline,
            171 wa_final-lit_per_hr,           180 sy-vline.
      ENDLOOP.
      uline.
*&         FORM PREPARE_FINAL_REC                     
           TEXT                                       *
     ->P_0670      text

Similar Messages

  • Linking between Activity network with Billing Document

    Hi Gurus,
        I have a requirement that I need to link between Activity, network with Billing Document number. By standard we can link only WBS-Element and Billing Document Number. How can I link between Activity, Network with Billing Doc. I want to develope a report for this.
    Kindly help me regarding this. I need some clue regarding this.
    Thanks,
    Ravi

    revenue can only be posed to WBS
    networks are meant for cost capture and scheduling
    so as per std sap what you want is not possible

  • Link between QMEL-QMNUM and IMRG-MDOCM

    Hello friends,
    this is related to PM(Plant Maintenance) module...
    i want the link between QMEL-QMNUM (Notification Number) and IMRG-MDOCM(Measurement Document) or IMRG-POINT(Measuring Point),
    Scenario : Depending on certain conditions, I am creating notification for the given measuring point.
      IF ( w_cdsuf = 'X' AND w_vlcod = 'NK' )
    Perform Notif_create. using bdc method.
    Since notification is getting created when it has to be created,,i mean everything is working fine.
    But, Ineed to know the Notification number created against the Measurement Document.
    If at all tehre is any link,please let me know..
    Thanks,
    Siddhartha Prakash.

    Hi,
    The link between the tables QMEL and IMRG can be achieved by using the table "IEQT_WL_MP", where we have to use the Equipment number in the QMEL to retrieve the Measuring Point Object .
    Regards,
    Smart Varghese
    Edited by: smartvarghese on May 25, 2009 11:48 AM

  • Database link between the databases with the same name

    Hi,
    I need to establish a db link between two databases that are named the same way on two different servers.
    server 1 has a database dev1 and server2 has a database dev1. The tnsnames on server2:
    DEV1 =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = server2)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = DEV1)
    DEV1_server1 =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = server1)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = dev1)
    Can anyone let me know a way to create a database link between the two above?
    Thanks.

    Hi,
    Am not sure what problem you are facing in creating a db link
    create database link dev1_server1 connect to x identified by x using "dev1_server1"
    create database link dev1_server2 connect to x identified by x using "dev1_server2"where dev1_server1 and dev2_server2 are the tns entry in tnsnames.ora file of server2 and server1 respectively.
    Regards
    Anurag

  • Go URL linking between two reports with no relation

    Hi Experts,
    Sorry this question may have been asked numerous times, but I was not able to fetch the required response.
    I have two reports Repor1 based on Table 1 having columns A and B, Report2 based on Table2 having columns C and D.
    First is it possible to create a go URL moving between two reports based on tables having no replationship between them?
    My requirement is to create a hyperlink on column B in Report1 so that when a user clicks on the hyperlink it takes you to report2 and filters report2 column C using values of Table1 coulmn A. Table1 and Table2 have no relationship between them.
    Thanks in advance,
    Anura

    I had two columns in my report1 first being market and second being a measure value, i provided the following link in the formula for my measure value and made that as HTML data format, my Report2 contains the market column with one more additional coloumn and i want my second report to be filtered based on Market value in Report1.
    I don't know why but the URL that is being displayed here is not the actual url, please click on the URL to knowthe complete url that I mentioned for the formula
    '’||CAST(Sales Measures.Dollars AS CHAR)||’'
    The value of Market.Region is not being passed correctly as my Report2 gives the following message in the results view when i move from Report1 to Report2 via the hyperlink
    Region is equal to '||Markets.Region||'style="text-decoration:none;
    Please suggest what is going wrong?
    Thanks in advance,
    Edited by: Anurag007 on Jul 29, 2010 2:46 AM

  • Linking between article pages with hyperlinks

    Hi,
    Having trouble  getting text hyperlinks between articles to work when uploaded to the  iPad, the hyperlink was created from text with a navto:articlename url  in the hyperlinks panel. I am using CS5.5 and folio builder 1.1.3, if  anyone could point me in the direction of a tutorial which is relevant  to my problem that would be great. I think I am doing everything  correctly but alas it just wont work.
    One of the articles is titled 'Offers specific' in the folio builder so I created a hyperlink with a url 'navto:Offers specific' on a different article, is this correct? Is the space between Offers and specific a problem?
    Thanks in advance,
    Colm

    Colm,
    try navto:// insteda of just navto:
    The space should not be a problem, but I, personally, avoid spaces in
    hyperlink names.
    —Johannes

  • How to make link between xcelsius components with sap data using Web servic

    Hi all,
    I have a doubt regarding connection between Xcelsius components and SAP data.
    I created one Web service using Function module and made a connection between xcelsius and that web service using binding URL. It shows imput and output parameters perfectly.
    But I cant get any idea as to how to connect Xcelsius components with these parameters.
    Can anybody help me out..
    please its urgent.
    Thanks,
    Simadri

    Have you bound your output parameters to ranges of cells? Select the item, then click the icon to the right of the Insert In: box and select the cells.
    Add a spreadsheet component to your chart and bind it to the cells, then preview the model. Do you see the data coming through?
    If you do, then you can click File > Snapshot > Export Excel Data. Then close Preview mode, and import data from spreadsheet and select the sheet you just exported. This gives you real data to work with when designing the dashboard.
    Hope that helps.

  • Problems with Dinamic Link between Premiere pro CC and After Effects CC

    I'm having serious problems with dinamic link between premiere pro and after effects, really serious problems that have 2 big projects in trouble (a documentary and a video clip) and I had to redo all the work pipeline to the consumer.
    The documentary for a spanish TV was made on CC 2014 and a video clip was made on CC. Both of them with a lot of after effects composition in the premiere pro timeline. Render freeze, a lot of playback issues, and many more problems... Until I decided to remove these links between premiere and after effects and render out all the after effects compositions one by one and insert as clips in premiere pro. 1 week working away with back and fourth.
    I've got a huge workstation:
    i7 4990
    32Gb ram
    GTX780 3gb
    256 gb system ssd
    2 Tb project storage
    *All my hardware and software are update.
    I know that a lot of folks are on the same huge problem and I want to ask everyone:
    How do you save this?
    What is your pipeline?
    Are there any solution?
    Best practice to use dinamic link in a huge project?
    Thanks,
    Ruben Gimenez.
    R&D iceblink.es
    www.rambot.es

    Thank You, Jim -
    Unfortunately that specifically did not work.
    Based on another comment sent to me, here is what did.
    In PProCC
    File > Adobe Dynamic Link > New After Effects Composition
    In AECC
    From that composition created from PPro, I imported the project (aep) initially created in AECC from another team member. Saved the file.
    Back in PProCC
    File > Adobe Dynamic Link > Import After Effects Composition
    Magic.

  • How do i link itunes between two computers with different Apple ID's

    how do I link itunes between two computers with different Apple ID

    You need to set up two user accounts on the mac.  System Preferences>Users & Groups.  Then each user can set up apple IDs for itunes and icloud any way they want.

  • Is there any link between oe_order_headers_all and hz_cust_accounts tables. I need to find the cust_account_id for some order_number. Please help me with this

    Is there any link between oe_order_headers_all and hz_cust_accounts tables. I need to find the cust_account_id for some order_number. Please help me with this

    you can link
    OOH.invoice_to_org_id=CUST.cust_account_id   -- invoice customer
    OOH.sold_to_org_id=CUST.cust_account_id   -- sold to customer
    OOH.ship_to_org_id=CUST.cust_account_id   -- ship to customer

  • CIN - Link between Excise invoice No (created in MIRO) with Material Document (GR)

    Dear Experts,
                 I have done Miro for excise duty (CIN) of Import Purchase order and then posted the material document in MIGO_GR referencing PO, i have entered the Excise invoice No (created in  MIRO ) in the commercial excise invoice no tab,while processing MIGO. Need the link between the tables containing invoice and Goods receipt for report development.
    Thanks & Regards
    Thangavel ganesh

    The commercial invoice number in MIGO just pulls the excise data from the MIRO. It does not get stored in any of the material document tables.
    For reporting you will need to go through PO history tables: EKBZ

  • Link between HCM Processes Forms with portal

    Hello Friend's,
          Can anyone tell me how to link HCM processes application with portal. I created process in backend. tell me how to call that process in my portal.

    Hi Ramesh,
    i am not sure you got the process in Portal or not, but this steps helps you to get process in portal.
    Go to SPRO --> Personal Management - HR Administrative Services - Configuration Process for HCm Processes and Forms - Process Configuration -- Setup Processes -- Validity for Processes -- Select Specify Valid Processes for start Application -- now it will prompt with Role of Initiator slect Manager/Employee/HR admin specfic start and end date
    and still we have one more step to do...
    hope it helps pls let me know if you face any problems in setting up HCM forms and processes i will try to help you out.
    Regards
    Vijai

  • Create or remove link between a webi doc and a category with SDK

    Hi,
    I'd like to use SDK to assign a category to a webi document, or to "uncategorized" document (remove the link between the document and a Corporate Category).
    I first tried to select the document in the infostore (via infoobjects, "select * from CI_INFOOBJECTS where SI_ID = xxx") and use the "delete" option on the "SI_CORPORATE_CATEGORIES", but obviously, this is not the right method.
    If someone has a little idea of how I can manage this link between a webi doc and a corp. category, I would be very grateful.
    Thanks !
    David

    Hi,
    This is much easier than it looks like, although it's not intuitive.
    For example, when some webi is in a category, categories where the webi is linked are underlined in blue:
    If you click in those blue marked categories and click Accept, you're unlinking the webi/report/dashboard from that category:
    -->
    Hope it helps
    Alberto

  • LInk Between Equipment & calss type

    hi! All
         is there any Link between Equipment no. and Class type of it. Bz i need to fetch the class type for a Equipment No. to fetch its class attributes details.
    Thanks and Regards,
    Kv

    Hi Kv,
    AUSP - Character values
    KSML - Character of a class
    KLAH - Class Header
    KSSK - Object to class
    CABN - Characteristics
    KLAT - Class Header text
    EQUI - Equipments
    EQUI - Equipment time segments
    EQKT - Equipment texts
    try to relate these tables with OBJEK, CLINT, ATINN, EQUNR, HEQUI, IMERK
    The link goes linke this,,,
    EQUI-> KSSK->KLAH>CABN/KSML->AUSP.
    here OBJEK = EQUNR
    Hope this helps..
    Thanks & regards,
    Dileep .C

  • Link between Delivery and Sales Order Schedule Line

    Hi Gurus,
    I have a requirement in which i need to display quantity and amount at schedule line level and also the delivery and delivery item for each schedule line.
    For example, if there is a sales order O1 and item 10 for which we have 3 schedule lines and 3 deliveries as well say D1, D2 and D3.
    Report should be something like this
    Sales Order    Item   Schedule Line    Delivery    Del Item   Confirmed Order Qty
    O1                 10      1                       D1           10            5
    O1                 10       2                      D2            10            5
    O1                 10       3                      D3            10            4
    How can i determine that a particular delivery corresponds to which schedule line of that saler order-item?
    We have the link between delivery and sales order but is there any way that we can get the link of delivery at schedule line level?
    Please help.
    Regards,
    Gaurav

    Hi,
    I suppose you must check with SD functional consultant and the post should also be in the logistics SD forum and not BI. But I suppose there is know specific link between the schedule line of SO to the Delivery. It is more like a bucket flow for ex.
    Sale order   Item    Schedule line  qty
    SO1            Item1     Sch1            10
    SO2            Item1      Sch2           10
    Delivery Item QTy
    DO1       IT1   15
    DO2       IT1    5
    In this case qty 15 is distributed over both SO1 and SO2, and SO2 ITem1 Sch2 has link to both the DOs
    So I am not sure if you can establish a one to one link, please check with your SD consultants.
    Regards,
    Ashwin G

Maybe you are looking for