cancel
Showing results for 
Search instead for 
Did you mean: 

Routing characteristics - counter in table PLMK?

ralitsa_dakova
Explorer
0 Kudos

Hi gurus,

I have a situation where I am supposed to identify the routing characteristics which are basically displayed in CA03.

I am supposed to do that by:

  1. 1. first searching for the PLNNR in table PLKO where I have only one group counter and one line for my group - so this is pretty simple.
  2. 2. Then I pass the PLNNR to table PLPO where I see that I have 6 nodes and 6 counters - so six line altogether, all in one task list type.
  3. 3. I go to table PLAS where again, using PLNNR I find out that only one of my 6 nodes is deleted - has a deletion indicator therefore, the corresponding operation does not exist. Only one task list type and it is N.

so far so good. The issue rises in step 4:

  1. 4. I go to table PLMK where I enter only the PLNNR, I enter the PLNTY and I get all inspection characteristics assigned. Some of them have deletion flags so I go to step 5:
  2. 5. I try to compare the counters in order to find which is the most current and existing data. As far as I understand, the largest counter for a certain combination of PLNNR+Node+Characteristic is the valid one. However, in CA03 I do not see e.g. characteristic number 10 while in the PLMK table the largest counter for this characteristic does not have a deletion flag; no change number is noted and so on.

Can someone assist with explaining the logic of counters in table PLMK and whether there is another table where by counter, PLNNR, Node and characteristic one could fine whether this particular characteristic is blocked? I was looking for a relationship similar to the one with table PLKO and PLAS unfortunately I couldn't find one.

Thank you in advance,

Raly

Accepted Solutions (1)

Accepted Solutions (1)

busyaban7
Active Contributor

Hi Ralista,

Attempting to explain you the logic I can think of starting form Material master check.

1) Table - MAPL ==> Input MATNR, WERKS, PLNTY ("Q") ==> PLNNR (inspection Plan), PLNAL (GrC)

2) For every unique MAPL-PLNNR & MAPL-PLNAL combination get the below details -

     ZKRIZ = Additional Critical Counter ==> Collect all these values

         a) If only one record exist for MAPL-ZKRIZ, then consider the single result for ZAEHL.

        

               * MAPL-PLNNR + PLNAL + ZKRIZ + ZAEHL => Check if LOKEZ = "X" [YES] or "BLANK" [NO]

               YES => Means, this record is deleted and hence no active MIC calculation can happen for this record.

               NO => This is a valid record, against which the MIC calculation can happen.

          b) If for the same MAPL-PLNNR + PLNAL + ZKRIZ combination, there are more than one similar records for ZKRIZ, then check the latest value for LOKEZ and check if this is "X" [YES] or "BLANK" [NO]. Follow the above logic.

          c) If more than one non-similar records available for ZKRIZ for the same MAPL-PLNNR + PLNAL, the check the latest value for ZKRIZ mapped with latest value of LOKEZ = "X" [YES], or "Blank" [NO]. Follow the above logic.

From the above three searches, you will be able to get all the active inspection plans and group counters, against which you need to check the MIC assignment via tables PLKO => PLAS => PLPO => QPMK.

3. PLKO ==> PLNNR (MAPL-PLNNR), PLNTY = "Q", PLNAL (MAPL-PLNAL) ==> ZAEHL.

4. PLAS ==> Consider the influence of sequence PLNFL. We need to consider the order in the below format -

PLNNR + PLNAL + PLNFL (consider the highest value like 0, 1..) + ZAEHL ==> PLNKN (node#). Check if LOEKZ = "BLANK". means non-deleted.

Note: Normally it's "0" in my data so I take this as the final record during calculation.

5. Pass this value for node form PLAS through PLPO, to check if LOEKZ = BLANK. Means MIC assignment was deleted or not. Get the operation number VORNR, which is active.

6. Now in PLMK, provide PLNTY = "Q", PLNNR = the active record which is not deleted in above checks, PLNKN = received form PLAS, MERKNR = received form VORNR, get the non-deleted records for LOKEZ = "BLANK".

=> In the output, you will get VERWMERKM = MIC available in the operation, which is non-deleted.

NOTE: Please remember not to delete the LOKEZ = "X" records before the comparison so that you can find the latest value for Counter, crit. counter. Only after that you can remove the deleted records for subsequent calculations.

Hope this gives you a boarder picture on the relationship to find out the correct NODE against which your check will be performed.

Please double check the above explained logic and feedback.

Thanks,

Arijit

Abinathsiva
Active Contributor

Great one neatly explained helped a lot... Thanks..

Answers (2)

Answers (2)

busyaban7
Active Contributor
0 Kudos

Hi Ralista,

Please confirm if you got the answer you are looking for.

Thanks,

Arijit

ralitsa_dakova
Explorer
0 Kudos

Thank you for your help!

busyaban7
Active Contributor
0 Kudos

Thanks Ralista.

john_lutz
Active Participant
0 Kudos

Hi - try to use function CP_EX_PLAN_READ instead, if possible.

Regards,

John


ralitsa_dakova
Explorer
0 Kudos

Hi John,

Thank you for your answer.

The idea is not only to read using the function but to be able to identify by some combination of fields whether this particular line from PLMK should be displayed or not. I understand that the counter have a logic and this is unclear at this point.

Could you help out with this?

anand_rao3
Active Contributor
0 Kudos

Hi, I also had faced the similar issue in the past where I had to correlate group counters within tables POKO, PLPO and PLMK to fetch some information. Later I could fix this up using function module CP_EX_PLAN_READ!

What conditional filters you want to apply on data from PLMK table? I believe the similar data is reflected in PLMK_EXP table of this FM as that in PLMK table. You mentioned about characteristic blocking. Is is so that, you have maintained 5 MICs in certain operation and want to print only 4 out of them?

Anand