cancel
Showing results for 
Search instead for 
Did you mean: 

Subtotal(KZWI) values not getting populated in requirement routine

Former Member
0 Kudos

Hi all,

I am a developer and having an issue where the subtotal value 4 (KOMP-KZWI4) is not getting populated in the requirement routine(916-920) when i check in the debugging mode although it has been configured in the pricing procedure. It contains the value 0 .  But the value is  getting populated when condition base value routine 913 is getting executed.

Could you please let me know whether there is any issue with the config or do I need to check something else in the code?

Accepted Solutions (0)

Answers (1)

Answers (1)

sez41
Active Contributor
0 Kudos

Hi Akhsay,

Values of KOMP must have been present at the time of pricing. I just checked in a system; in a requirement routine KOMP-KZWI* values are present. Can you paste the requirement routine code, though I do not think it's relevant to that code.

Former Member
0 Kudos

Sure Kıvanç. Here you go:


sy-subrc = 4.     "Set sy-subrc value to disable

CALL METHOD /chc/cl_mm_mlan_read=>get_mlan " Fetch Rx. assort code values by reading mlan records

  EXPORTING

    iv_matnr      = komp-matnr      "Material

    iv_aland      = lc_no           "Norway

  IMPORTING

    es_mlan       = ls_mlan_wa      " Importing MLAN structure

  EXCEPTIONS

    no_data_found = 1

    OTHERS        = 2.

IF sy-subrc EQ 0

   AND ls_mlan_wa-/chc/md_artgrp EQ lc_01 AND komp-kzwi4 < komp-kzwi3.

*if Product group is 01 and  Subtotal 4 is less then value of znr8 then set sy-subrc = 0 else 4

  sy-subrc = 0.

ELSE.

  sy-subrc = 4.

ENDIF.

Below is the screenshot while debugging . KZWI4 and KZWI3 come as 0. Also, the KSCHL value looks to be wrong. Do you think that might be the issue ?

sez41
Active Contributor
0 Kudos

Akshay,

After you exit debugging and save the transaction, what are the values of vbap-kzwi3 and vbap-kzwi4 for this item?

I do not think you should be dealing with KONP-KSCHL here, MWST is tax condition type. Rather take a look at xkomv and/or komt1 internal tables.