09-25-2015 12:13 PM
Hi all,
I have two reports one for hourly consumption of electricity and other for daily consumption of electricity.Here we have got a different measuring point for the same machine one of these is termed as hour meter and another as energy meter.We have basic requirement of merging these two reports.But the problem being faced here is :
For energy meter we have Suppose:
Measuring point Description of measuring point
1 ABC energy meter
For Hour meter we have suppose:
Measuring point Description of measuring point
2 ABC hour meter
Here we don't have anything common two merge these two datas.So what we did was created a common short text for both of these measuring point to (say ABC) for the field text MDTXT(IMRG) using tcode IK12. But this makes it quite complex and lengthy.
We have used the tables IMRG and IMPTT and storing it in a ztable.So any other suggestions from your side.
Thanks
Regards
Nav
09-25-2015 12:36 PM
Hello Naveen,
Prima-facie your case looks to me as: Not a difficult requirement but you have adopted a complex route. Possible that this impressions is due to some communication gap.
My above feeling is due to:
Why should you need to search for a common field when both the MPts can be (should be) created on the same technical object (Equipment or Functional Location)?
What you are trying to achieve by putting same short text in Measuring Documents?
If I assume that you are putting same short text in a particular category of MDocs then what is the issue in retrieving a report?
Basically, the deficiency in your query is absence of report logic and specifications for a report. Otherwise the tables you have attempted are the right tables, which can cater to all your requirements in this area.
So you need to be more clear about the output format and the issues for making such report 'complex'.
Regards
KJogeswaraRao
09-25-2015 12:36 PM
Hello Naveen,
Prima-facie your case looks to me as: Not a difficult requirement but you have adopted a complex route. Possible that this impressions is due to some communication gap.
My above feeling is due to:
Why should you need to search for a common field when both the MPts can be (should be) created on the same technical object (Equipment or Functional Location)?
What you are trying to achieve by putting same short text in Measuring Documents?
If I assume that you are putting same short text in a particular category of MDocs then what is the issue in retrieving a report?
Basically, the deficiency in your query is absence of report logic and specifications for a report. Otherwise the tables you have attempted are the right tables, which can cater to all your requirements in this area.
So you need to be more clear about the output format and the issues for making such report 'complex'.
Regards
KJogeswaraRao
09-25-2015 12:55 PM
Thanks for your reply.I hope that the I lack something in explaining my requirement.Actually the problem we have is that we don't have the same equipment name and neither we have have the same measuring point.The measuring points are autogenerated everytime as I have been told .So I couldn't find any thing in common to meet my requirement so was suggested that for further reading we could create a text which is common for both and so the reports could be merged.Please have a look at the snapshot below.
Regards
Nav
09-25-2015 1:03 PM
OK Navaratan,
(Sorry for spelling your name wrong previously). First part I understood. The issue is dynamic measuring points. OK in this case linking by MDTXT can be in right direction. Means for the example you have given you will give value TCM 2 in these MDTXT fields. So what is the problem now. Your problem now should be explained in terms of why you are unable to get desired report.
09-25-2015 1:13 PM
Actually the problem here is if for every energy and hour meter we create a common text.As given in the screen shot for TCM energy meter and Tcm hour meter we gave text as TCM.
So for comparison we have to give :
IF MDTXT equals TCM then display the specified value.Similarly we have to repeat the same condition for every value and this leads to complexity and we will have to keep on making changes to it everytime if some new machines are added.So any suggestions from your side or I am still lacking something.
Regards
Nav
09-25-2015 1:17 PM
continuing the above response....
I feel there is absolutely no need for MDTXT manipulation, if you follow uniform pattern of PTTXT values. What I mean is First word of PTTXT representing the machine should be of uniform length in all MPts. For example: if we decide this to be 4char long thens TCM 2 becomes TCM2, GENERATOR 1 becomes GEN1 and so on. With this arrangement the ABAPer can easily find and group the related Documents by extracting the first 4char of the PTTXT field.
I believe the above should resolve your issue/s
KJogeswaraRao
09-26-2015 5:02 AM
I completely agree with what you said as earlier we too thought nearly the same thing but as far as I feel for every PTTXT we will have to check these .Suppose for TCM1 hour and energy meter we put a check that if PTTXT equals TCM1 then display the values but there are lots of machines and for every machine we will have to do this .I feel it will add complexity to the code.So could you give me an idea how to acheive this.
Regards
Nav
09-26-2015 5:21 AM
I do not think it will add complexity. Your issue is to change the descriptions of say 1000 or 10,000 Mpts for which LSMW is the answer.
Note:
09-26-2015 5:31 AM
09-26-2015 5:37 AM
This I am pointing at your requirement of modifying the M/pt descriptions to prefix them as discussed with TCM1, TCM2, GEN1, GEN2 etc. 1000/10000 figures I am assuming the number of M/Pts you have. Let it be whatever quantity through LSMW you will be able to change them together. OR you can do it through a BDC program whichever convenient to you.
09-26-2015 5:43 AM
Hi,
Sorry but here we are making a report to display the electricity consumption daily and hourly.
Regards,
Nav
09-26-2015 5:49 AM
Navratan Kumar,
I do not know your experience in ABAP. This point is to be clearly understood that : Yes for making a report on IMRG entries which is based on IMPTT primary key POINT you should write a code such that you link IMRG-POINT to IMPTT-POINT which is with PTTXT description. Can't you see a join to extract your required readings here?
09-26-2015 6:07 AM
09-26-2015 10:15 AM
Hello Navaratan,
If you are not using the (BEGRU) field of MPts, then you have a better opportunity to use this field for filling with codes TCM1, TCM2, GEN1, GEN2 etc. Hope you have followed. And based on this you can retrieve the IMRG records to your report. This is an alternative method to the proposed MPt desciption change.
According to this Two measuring points will have the value TCM1 one daily MPt and the other hourly MPt.
I believe these things of MPts are better than your MDTXT idea. (You will be free from entering MDTXT everytime you create a measuring document)
If you still want to go the MDoc way of identifying readings then another better method is to use Valuation codes (Catalog D). Means you need to have a code group say MPOINT under which you will maintain the Codes for all pairs TCM1, GEN1 etc. This is done with QS41 tcode and the code group is specified in each MPt. (IMPTT-CODGR). Then while creating MDoc you will select the code in the field. Based on this value (IMRG-VLCOD) you can retrieve and group the IMRG entries.
Good luck
KJogeswaraRao
09-26-2015 10:32 AM
I have just added more to the reply you liked just now. Please go through.
09-26-2015 10:42 AM