2014 Jul 17 4:28 PM
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.
2014 Jul 17 5:00 PM
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
2014 Jul 17 9:29 PM
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.
2014 Jul 18 9:38 AM
2014 Jul 20 7:33 PM
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?
2014 Jul 21 5:17 AM
Hi Huang,
Table T683S(Pricing Procedure: Data) may be helpful.
Regards
Sreekanth
2014 Jul 21 4:09 PM
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.