Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Electricity consumption

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

jogeswararao_kavala
Active Contributor
0 Kudos

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

15 REPLIES 15

jogeswararao_kavala
Active Contributor
0 Kudos

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

0 Kudos

Hi ,

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

0 Kudos

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.

0 Kudos

Hi ,

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

0 Kudos

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

0 Kudos

Hi

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

0 Kudos

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:

  • All this discussion is valid that TCM1 description will have only one pair of MPts.
  • Always the transaction data (MDocs here) should be identified through fields of Masterdata (MPts)

0 Kudos

Hi

Sorry but I didn't get this:


Jogeswara Rao Kavala wrote:

Your issue is to change the descriptions of say 1000 or 10,000 Mpts for which LSMW is the answer.


Regards,

Nav

jogeswararao_kavala
Active Contributor
0 Kudos

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.

0 Kudos

Hi,

Sorry but here we are making a report to display the electricity consumption daily and hourly.

Regards,

Nav

0 Kudos

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?

0 Kudos

Hi ,

Thanks for being so much helpful.I was looking for some different approach rather than using fields PTTXT or MDTXT but I hope as far you have explained and I feel we have only an option to use  PTTXT fields to join these as we have nothing common to fetch these data.

Regards,

Nav

0 Kudos

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

0 Kudos

I have just added more to the reply you liked just now. Please go through.

0 Kudos

Hi

Thanks once again. I got it.

Regards

Nav