SAP for Higher Education and Research Discussions
Spark conversations about student engagement, research optimization, and administrative efficiency using SAP in higher education and research. Join in!
cancel
Showing results for 
Search instead for 
Did you mean: 

SLCM Audit Handbook Appendix: Possible Errata

Former Member
0 Kudos

Hi,

I was recently scrutinizing some of the code provided in Michael Fan's helpful appendix to the SLCM Audit Handbook, and believe I have found a couple of problems with the implementation of the BAdI HRPIQ00SI2_PINDX_CAL. Since this is code that ships with EHP3, maybe there is an OSS note out there for this, or maybe one needs to be filed. I don't have access to an EHP3 system, however - if one needs to be filed. And, since the suspected problems appear in a manual, I am not sure where to file for corrections for that.

(1) And 'ENDIF' statement seems to be out of place:


  READ TABLE it_keyfigures INTO ls_keyf_suby WITH KEY iosem = 'SUBY'.
  IF sy-subrc = 0.
  ENDIF.
  CASE flt_val.

  ENDCASE.
ENDMETHOD.

I am guessing that it should be:


  READ TABLE it_keyfigures INTO ls_keyf_suby WITH KEY iosem = 'SUBY'.
  IF sy-subrc = 0.
    CASE flt_val.

    ENDCASE.
  ENDIF.
ENDMETHOD.

(2) The 'SR03' case looks suspicious especially in the context of 'SR02' and 'SR04':


WHEN 'SR03'.
  es_result-acpi_value = ls_keyf_suby-weighting.
  es_result-acpi_unit = '%'.

I am guessing that it should read:


WHEN 'SR03'.
  es_result-acpi_unit = '%'.
  READ TABLE it_keyfigures INTO ls_keyf_suba WITH KEY iosem = 'SUBA'.
  IF sy-subrc = 0.
    es_result-acpi_value = ls_keyf_suby-weighting / ls_keyf_suba-weighting * 100.
  ENDIF.

Thanks,

Eric

Edited by: Eric McDonald on Apr 24, 2008 5:15 PM

6 REPLIES 6

Former Member
0 Kudos

Hi Eric,

I belive delivered code is right.

1) Endif.

If you place endif the way you are suggesting you are skipping if No 'Fulfilled Subreqmts' is found. I don't think you want to do that. In that case you want es_result-acpi_value as initial.

2) SR3.

SR3 is suppose to report total weighting of fulfilled sub-requirements as a

percentage.

ls_keyf_suby-weighting is already percentage and you can notice that it also passing es_result-acpi_unit as '%'.

Thanks,

Prabhat Singh

0 Kudos

Hi Prabhat,

1) Endif.

If you place endif the way you are suggesting you are skipping if No 'Fulfilled Subreqmts' is found. I don't think you want to do that. In that case you want es_result-acpi_value as initial.

The IF - ENDIF appears to be worthless as shipped. It does nothing. Furthermore, the ABAP documentation indicates that a return code of 0 for "READ TABLE" indicates success, so wrapping the CASE block with the IF block would make sure that it is executed only when a fulfilled subrequirement is found. The code, as shipped, could reference fields of an initial structure, I think.

2) SR3.

SR3 is suppose to report total weighting of fulfilled sub-requirements as a

percentage.

ls_keyf_suby-weighting is already percentage and you can notice that it also passing es_result-acpi_unit as '%'.

Then the only difference between SR3 and SR4 should be the unit? That seems odd to me.

Thank you,

Eric

0 Kudos

Eric,

1) Endif. Sometimes they put some extra code without any reason. I found a similar case in one of OSS note as well.Don't worry about that.

2) That's the only b/w difference SR3 and SR4 .

SR3:-Returns the total weighting of fulfilled sub-requirements as a percentage.

SR4:-Returns the total weighting of fulfilled sub-requirements as a number

and Unit is going to take care of percentage or number.

Thanks,

Prabhat Singh

0 Kudos

Prabhat,

2) SR3.

SR3 is suppose to report total weighting of fulfilled sub-requirements as a

percentage.

ls_keyf_suby-weighting is already percentage and you can notice that it also passing es_result-acpi_unit as '%'.

2) That's the only b/w difference SR3 and SR4 .

SR3:-Returns the total weighting of fulfilled sub-requirements as a percentage.

SR4:-Returns the total weighting of fulfilled sub-requirements as a number

and Unit is going to take care of percentage or number.

I guess I don't understand why one would want to have two identical values with different units, especially if the values are inherently associated with one of those units (% and not ST).

Are you sure that weightings are actually percentages? Based on a discussion which I had with Volker Albert in this forum last year, he suggested using weighted subrequirements to solve a problem I was wrestling with. But, he made no mention that the weights of all subrequirements in a requirement had to sum to 100, and, indeed, his example did not meet such a constraint.

Thanks,

Eric

0 Kudos

Eric,

Yes, Technically overall requirement weighting percentage should sum up to 100 percent.

Thanks,

Prabhat Singh

0 Kudos

OK, Prabhat, thanks for the info.

(I would award you a couple of points for that answer, but I didn't pose this thread as a question so I can't. Sorry.)