cancel
Showing results for 
Search instead for 
Did you mean: 

Capture Subtotal value in Debugging

anirban_pahari
Explorer
0 Kudos

Dear All,

Can you please let me know how to get the values stored in any Subtotal in the SD pricing procedures. I need to use them downstream for my calculation in my code. I have tried with KOMP-KZWI1,KOMP-KZWI2,KOMP-KZWI3 etc. by assigning respective values in the Subtotal column. But unfortunately was unable to retrieve the same in debugging as they were returning "ZERO" value.


Would appreciate your prompt response on the same.

Regards,
Anirban

Accepted Solutions (0)

Answers (2)

Answers (2)

Jelena
Active Contributor
0 Kudos

What exactly are you trying to debug?

Also - naturally, only the items that have something in the 'Subtotal' configuration will be transferred to the KZWIn fields. Other totals are not available in any fields, to my knowledge, and can't really be used in the ABAP code.

anirban_pahari
Explorer
0 Kudos

Dear Jelena,

Thanks for your reply.

690  0   ZOCT    Octroi                                                1

700  0                   Net Taxable Price  681  699       3
710  0  JVAT       IN A/R VAT             700            

Based on the above structure of the pricing procedure we see that Subtotal 1(KOMP-KZWI1) has been assigned to Condition Type ZOCT. Whereas Subtotal 3(KOMP-KZWI3) has been assigned to Subtotal Net Taxable Price (This is not a condition type).

While debugging I want to use the value stored against KOMP-KZWI3 which is not appearing. On the contrary value against KOMP-KZWI1 is available.

Would appreciate your prompt response on the same.

Regards,
Anirban

Jelena
Active Contributor
0 Kudos

But my question is still not answered - what exactly are you debugging and why?

It doesn't seem like a far stretch to imagine that perhaps the value is filled somewhere further in the code than where you placed a breakpoint. Also how is the subtotal's value different from VBAP-NETWR?

moazzam_ali
Active Contributor
0 Kudos

Hi

KOMP-KZWI5 or KOMP-KZWI3 is the right structure to get this information and I can see the values in debugging screen in these fields. I am not an ABAPER so I can't suggest you technically but I have just checked and its working for me.

You should have asked this in ABAP forum so that some ABAPER could help you on this better.

Thank$

anirban_pahari
Explorer
0 Kudos

Dear MoazzaM,

The values which you are getting are they assigned to any Condition Type ? Because in case of condition types which have a Subtotal assigned to it values will come in debugging. But when the same is assigned to any Subtotal then it does not appear.

6900ZOCTOctroi    2
7000Net Taxable Price681699
7100JVATIN A/R VAT700  10

In the above case if we assign Subtotal to ZOCT or JVAT values will come. But How will I get the values of Subtotal " Net Taxable Price". If I assign any value in KOMP-KZWI3 in case of Net Taxable Price shall I get the value in debugging?

Regards,
Anirban

moazzam_ali
Active Contributor
0 Kudos

Hi

This is not dependant on condition type. If you have assigned subtotal to any step it should come there in debugging mode.

Once thing I have noted is that when I press enter after entering material, customer and quantity in sale order system goes in debug mode but doesn't show any value in subtotals. When I press F8 and go to condition tab then system again goes to debug mode and shows the values in subtotals as I have posted in my earlier thread. I don't know why. May be could help you here as she is good in ABAP and SD both.

Thank$