Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

!! FM for subtotal D in Billing Document

Former Member
0 Kudos
642

Hi Expert,

I faced one problem about FM subtotal D in Billing Document.

Currently I want use FM 'WB2_CALCULATE_PROFIT94' to calculate subtotal D, but I don't know how to use this FM,

I was entering I_DOC_TYPE = Document category, I_DOCUMENT =Billing document No. and I_ITEM = Billing document Item No, and come out nothing.

Can anyone help to look into it? Is there anything missing?

Regards,

May.

6 REPLIES 6

Former Member
0 Kudos
128

Hi May,

Go to the transaction SE37.

Enter the name of the function module and press execute(F8).

Fill the import parameters and execute again.

To know what to fill in the import parameters, please refer to the link below:

WB2_CALCULATE_PROFIT94 Sales subtotal calculation - Function - ABAP - SAP

If you do not get any result, this mean data is not present.

Regards,

Ashvin

Jelena
Active Contributor
0 Kudos
128

This FM is not released and I seriously doubt it does what you're expecting it to do. 'Subtotal D' doesn't seem like a standard SAP term and I can only guess it's some kind of a subtotal in the SD pricing procedure. If so and if it's so important, why can't it just be assigned to one of the Subtotal fields (in VBRP) in the configuration?

It's very ineffective to use ABAP to "reverse-engineer" pricing after the fact.

@Ashvin - please don't refer SCN members to that se80 web site because they just copy SAP documentation with no added value. I'm very surprised they haven't been shut down yet.

Former Member
0 Kudos
128

Hi Jelena,

Noted. Thanks for the information.

Regards,

Ashvin

Former Member
0 Kudos
128

Jelena,

Thanks for your reply.

Subtotal D is maintained in V/08 pricing procedure. I am not sure how to the the value of subtotal D.

Is there any FM/Method to get the this value?

0 Kudos
128

Hi Huang,

Table T683S(Pricing Procedure: Data) may be helpful.

Regards

Sreekanth

Jelena
Active Contributor
0 Kudos
128

OK, I see now. If you look at the dropdown, you'll see that 'D' means that the value is copied to XWORKD. This is a variable available (from what I understand) in the pricing user exits and routines.

From the original post it's not clear what you're trying to achieve exactly. But if you already have a document and are trying to get that value after the fact (e.g. for a report) then it won't help you much. I'm not aware of any FMs that you could run and get just a subtotal value. But even if there were, it would be very inefficient in a report that would run for many documents at a time. If a value is relevant to reporting then it should rather be configured with subtotal 1...6, then it'd be available in VBRP as I mentioned above (take a look at FM PRICAT_SUBTOTALS_READ).

For additional information you might want to google XWORKD - there are many posts on SCN and other sites.