cancel
Showing results for 
Search instead for 
Did you mean: 

How to calculate key figures in 0IC_C03

Former Member
0 Kudos

Dear Gurus,

Could you please provide all of the logic that is used to calculate the key figures in 0IC_C03.  My task is to re-create these KF's in a HANA Calculation View, but I do not have the logic and I can't find it anywhere online (I have literally searched for hours).

0RECVS_VAL

0ISSVS_VAL

0ISSBLOSTCK

0ISSCNSSTCK

0ISSQMSTCK

0ISSTRANSST

0RECBLOSTCK

0RECCNSSTCK

0RECQMSTCK

0RECTRANSST

0ISSSCRP

0ISSVALSCRP

0RECTOTSTCK

0ISSTOTSTCK

0ISSVALSTCK

0RECVALSTCK

0VENCONCON

0RECVALQM

0RECVALBLO

0RECTRFSTVA

0RECCCNSVAL

0ISSVALBLOC

0ISSCCNSVAL

0ISSVALQM

0ISSTRFSTVA

For example, I did find a mention of the following for 0RECVS_VAL .  I would like this exact same logic for all of the KF's listed above (and any others that may be missing).

  • only goods issue is considered

  IF ( SOURCE_FIELDS-BWVORG EQ '000'   "Other Receipts

    OR SOURCE_FIELDS-BWVORG EQ '001'   "Goods Receipt / Vendor

    OR SOURCE_FIELDS-BWVORG EQ '004'   "Material Transfer / Receipt

    OR SOURCE_FIELDS-BWVORG EQ '005'   "Stock Adjustment InvD

    OR SOURCE_FIELDS-BWVORG EQ '006'   "Stock Adjustment Other

    OR SOURCE_FIELDS-BWVORG EQ '010' ) "Receipt from Stock Transfer


   AND SOURCE_FIELDS-bwapplnm EQ 'MM'


  • only movements which are relevant for stock control

   AND SOURCE_FIELDS-BWBREL EQ '1'

   AND SOURCE_FIELDS-BWGEO <> 0

   AND ( SOURCE_FIELDS-BSTTYP IS INITIAL

             OR ( SOURCE_FIELDS-BSTTYP CA 'EQ' AND

               SOURCE_FIELDS-KZBWS CA 'AM' ) )

It's truly so frustrating that such standard information is impossible to find.  Please do not refer me to links, I have looked at them all, they are not helpful.  Instead, to be very helpful, please copy and paste the straight text in your answer.  Thank you so much.

Accepted Solutions (1)

Accepted Solutions (1)

john_hawk
Active Contributor
0 Kudos

Hi Karen,

Sometimes its easy to miss the obvious.

Can you install the "vanilla" or unmodified business content a Sandbox system?

You could review the "in BW" ABAP routines provided by SAP and get an idea of the underlying logic.

John Hawk

Former Member
0 Kudos

This link seems to at least include the text from the Rule Groups, I think it's as close as I'm going to get.  If anyone else has different text in their Rule Groups, please feel free to share.

0IC_C03: 2LIS_03_BF Transformation Start Routin... | SCN

Answers (3)

Answers (3)

Former Member
0 Kudos

Another helpful link, this time including 2LIS_03_UM:

This is the result of my research.  I hope it helps other people who are facing similar issues!  I still haven't figured out why 0ISSSCRP is not Stock-Relevant, does anyone know?

FIELDRULEROUTINEPROCESSKEYBWAPPLNMSTOCKTYPESTOCKCATSTOCKRELEVCQPUABUCPPVLC
0ISSVS_VAL020010100, 101, 104, 105, 106, 110, 102, 103MM,  IS-RIS INITIAL OR (E, Q AND INDSPECSTK IN A, M)1<>0
0RECVS_VAL020011000, 001, 004, 005, 006, 010, 002, 003MM,  IS-RIS INITIAL OR (E, Q AND INDSPECSTK IN A, M)1<>0
0ISSTOTSTCK030033100, 101, 104, 105, 106, 110, 102, 103MM,  IS-R1<>0
0RECTOTSTCK030034000, 001, 004, 005, 006, 010, 002, 003MM,  IS-R1<>0
0ISSVALSTCK030035100, 101, 104, 105, 106, 110, 102, 103MM,  IS-RIS INITIAL OR (E, Q AND INDSPECSTK IN A, M)1<>0
0RECVALSTCK030036000, 001, 004, 005, 006, 010, 002, 003MM,  IS-RIS INITIAL OR (E, Q AND INDSPECSTK IN A, M)1<>0
0VENCONCON040037100, 101, 104, 105, 106, 110, 102, 103MM,  IS-RK1<>0
0ISSBLOSTCK050013100, 101, 104, 105, 106, 110, 102, 103MM,  IS-RD<> K, <> R1<> 0
0RECBLOSTCK050018000, 001, 004, 005, 006, 010, 002, 003MM,  IS-RD<> K, <> R1<> 0
0ISSQMSTOCK050017100, 101, 104, 105, 106, 110, 102, 103MM,  IS-RB, L, O, R<> K, <> R1<> 0
0RECQMSTCK050015000, 001, 004, 005, 006, 010, 002, 003MM,  IS-RB, L, O, R<> K, <> R1<> 0
0ISSTRANSST050023100, 101, 104, 105, 106, 110, 102, 103MM,  IS-RF, H1<> 0
0RECTRANSST050024000, 001, 004, 005, 006, 010, 002, 003MM,  IS-RF, H1<> 0
0ISSSCRP050029MVT: 551, 552, 553, 554, 555, 556MM
0ISSVALSCRP060030MVT: 551, 552, 553, 554, 555, 556MM<> 0
0ISSCNSSTCKSTD0012-1100, 101, 104, 105, 106, 110, 102, 103MM,  IS-RK1<>0
0ISSCNSSTCKSTD0012-2100, 101, 104, 105, 106, 110, 102, 103MM,  IS-RK, L, M1<>0
0RECCNSSTCKSTD0014-1000, 001, 004, 005, 006, 010, 002, 003MM,  IS-RK1<>0
0RECCNSSTCKSTD0014-2000, 001, 004, 005, 006, 010, 002, 003MM,  IS-RK, L, M1<>0
0RECVS_VALREV0001050','051','052'MM<>0
0ISSVS_VALREV0002150','151','152'MM<>0
john_hawk
Active Contributor
0 Kudos

Hi Karen,

The question: "Why is 0ISSSCRP is not Stock-Relevant" is best directed at an MM forum, but with 20 years of getting data from MM , I'll take a stab a it.

Scrap, by its definition is unusable and has no economic value. Under GAAP (generally accepted accounting principals), it must be valued at zero. Though is may be useful to account for the physical object in the system until actual, physical destruction (think defective aircraft parts under investigation) , the scrap material should not be included in any "available for use" calculation. This is probably the reason it is not stock relevant.

Nice work on the matrix.

John Hawk

Former Member
0 Kudos

Good morning John,

I do appreciate the links that you sent, some of them were interesting for other reasons.  As I originally stated, I knew it would be difficult to find the exact information I'm looking for.  All I want is the logic of how to code the Rule Groups.

P.S. Good suggestion, but due to budget cuts, we don't have a Sandbox system.

john_hawk
Active Contributor
0 Kudos

Hi Karen,

It sounds as though you want the source code for 2LIS_03_BX, 2LIS_03_BF , and 2LIS_03_UM to recreate in SAP HANA. I would not advise proceeding in this way.

Consider mapping the output of 2LIS_03_BF and 2LIS_03_UM into cumulative (standard) key figures into Advanced DSOs with a union in a Composite InfoProvider. 

You could then save to the native HANA, if desired.


This would allow you to see the inventory at any point in time by selecting a range (begging of time - point time time desired) and using a simple SUM function. No initialization with 2LIS_03_BX required.

Be sure to review the the SAP Notes on the two extractors to identify the key fields.

(I won't provide any links, as requested.)


Please don't forget to record your final solution and to mark the question as answered.

Good luck,

John Hawk


I

Former Member
0 Kudos

Thank you for your answer John!  We are actually using the standard extractors and a cube, exactly for the point-in-time reasons you mentioned.  Because of the volume however, we could not use the standard Rule Groups -- we added that logic into the End Routine instead for the KF's that we needed at the time.

Now we have a new requirement is to isolate Scrap Inventory.  I can't do that if I don't know how to identify Scrap Inventory, and the Rule Group logic is long gone.  It's also a good time to add the other KF's that were deleted.  Identifying the KF's themselves was relatively easy, but I can't find any info on how the KF's are calculated.

john_hawk
Active Contributor
0 Kudos

Hi Karen,

I don't have an SAP system to work so I can't verify my memory.

Most of the key figure used in 0IC_C03 are restricted key figures which are calculated during extract to mimic the materiel master display through MM03 and MB5B and passed to BW.

One would have to recreated the underlying function module to replicate the results in native HANA.

If you look at the SAP help

Material Movements from Inventory Management - Inventory Management - SAP Library

You will see a field from the datasource 2LIS_03_BF :

InfoObject 0INDSPECSTK

Description Valuation Special Stock

Data Element INDSPECSTK

Field in the DataSource KZBWS

I believe this special stock indicator will determine "scrap" inventory as a characteristic in a restriction.

This link provides a nice summary of special stock

What Are Special Stocks

Note: from Material Movements from Inventory Management - Inventory Management - SAP Library

The  data record belonging to extractor 2LIS_03_BF is defined in a unique way using the key fields Material Document Number (MBLNR), Material Document Year (MJAHR), Item in Material Document (ZEILE), and Unique Identification of Document Line (BWCOUNTER).

You may wish to review SAP Note 1548125 - Interesting facts about Inventory Cubes

It has been  updated for HANA optimized InfoCubes.

https://launchpad.support.sap.com/#/notes/1548125

Also

I'm not sure I understand "Because of the volume however, we could not use the standard Rule Groups"

It might be helpful if you elaborated

Please don't forget to record your final solution and to mark the question as answered.

Good luck,

John Hawk