Skip to Content
author's profile photo Former Member
Former Member

Count on Sales Document and Item

Hi Experts ,

I need some help on the following scenario . I have a report Open Orders , which will be based on Sale Quan greater than Delivered Quan . Data in Backend

Comp Code Sales Order Sales Item Delivery Order Delivery Item Sales Quan Del Quan
1600 100 10 1 10 5 2
1600 100 10 2 10 5 3
1600 200 10 3 10 8 2
1600 200 10 4 10 8 5


As you can see data in backend is at Delivery Order Level (multiple Deliveries for a single Sale Order) . What I need the report to do is it should consider the Sale Order 100 , Sale Quantity as only 5 (though exists as two records) and compare with Delivery Quantity 5(2+3) and decide it as not open order .

For Order 200 , it should compare Sale Quantity 8 with Delivery Quantity 7 (2+5) and give it as open order .

Issues I face are only Company Code level of data should be displayed in report . Also sale order quantity should not summarize eg consider Sale Order 100 and Item 10 (first two records) , it should consider only 5 not (5+5) . I tried many ways through codes in backend , but in vain . Please help me out on this .

Text removed by moderator

Message was edited by: Matthew Billingham

Add a comment
10|10000 characters needed characters exceeded

Related questions

7 Answers

  • Best Answer
    Posted on May 24, 2013 at 11:33 AM

    Guys,

    You cannot create Exception aggregation on only sales item. Because different sales doc will have same line item (like 10, 20 etc) so you have to concatenate both sales doc and item and then place exception aggregation on this character in the query to get proper result.

    Regards,

    Raghavendra.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 24, 2013 at 12:14 PM

    Agree with your point Raghavendra. but to overcome the modelling changes and reloading of data and other practical difficulties its better to go with query level exp aggr...

    CKF1

    Create a Calculated keyfigure on sales quan and set execeptional aggregation as maximum and reference as Sales Item

    CKF2

    Create a Calculated keyfigure on CKF1 and set execeptional aggregation as maximum and reference as Sales order...

    Hope AL's suggestion is also the same...

    Thanks,

    Nithesh.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 24, 2013 at 10:51 AM

    Hi Vignesh,

    Add an infoobject in the infoprovider which concatenates and store sales order and item. Then in the query use exception aggregation as average of sales qty with reference to this newly added infoobject. This should solve your issue.

    Doubt : You posted this before and why was ur thread deleted?

    Regards,

    Raghavendra.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 24, 2013 at 11:13 AM

    Hi,

    Create a Calculated keyfigure on sales quan and set execeptional aggregation as maximum and reference as Sales Item

    Thanks,

    Nithesh.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 24, 2013 at 11:25 AM

    Hi,

    As suggested by nitesh make a new formula and put your sales quantity keyfigure inside it---Hit the aggregation tab--Exception aggregation as first value---Reference characterisitc as sales item.

    Refer this for more understanding on Exception Aggregation.

    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0b8ed5b-1025-2d10-b193-839cfdf7362a?overridelayout=true

    Hope that helps.

    Regards,

    AL

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 27, 2013 at 05:23 AM

    Hi All ,

    Thanks for your replies . I am not so good at query , hence went with padmanabans approach . But I m facing some issues as follows . In case of multiple Items within the same order , the following happens .

    Data in Backend

    Data Frontend

    As you can see , first data is aggregated according to the Concatenated Char (summed up for 10000010 and 10000020) , then the Exceptional Aggregation takes place . But my requirement is , for Conc Char 10000010 , exceptional aggregation should happen as 5 , then for Conc Char 10000020 as 5 . Then the comparison of sales Qty and Del Qty should happen as 5 Vs 3 for 10000010 , then 5 Vs 3 for 10000020 .

    Please let me know if this is possible .


    Data Backend.PNG (11.5 kB)
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 28, 2013 at 05:42 AM

    Hi ALL ,

    Thanks for all your replies and different approaches .

    AL ,

    Tried your way , but what happens is at Company Code lEvel if there are 100 Delivery Order and Items , then the system considers the first value out of them . As u have mentioned in one of replies , it is mandatory to have Order and Item in display , but the user doesnt want it that way , as it makes the report pretty huge . They want only company Code to appear . Hence have decided to do all calculations in backend .

    Nithesh ,

    Tried ur approach , but I guess best way to go will be to shift the calculations to backend .

    Padma ,

    Tried ur approach too . But facing problems in EA .

    However guys I have adapted some of ur suggestions and trying for a new way to calculate in backend . Once I get the solution , will revert . All ur answers have been helpful .

    Thanks and Regards

    Vigneshram Selvaraj

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.