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: 

Strange behaviour with left outer join

teja_va
Explorer
0 Kudos

Hi

I've used Left outer join in infoset and while executing the report it is not printing 0, but 0 is printed bottom of report.

The table entry has 0 for one field, other values for another field which is printing correct.

Please check below pic to be clear. I don't understand why it is coming like this.

the scale quantity field has 0 in table for LSNo 1 but it is printing at bottom.

strangely if i remove summation it disappears like below

I wanted to know am I thinking it as strange or it is like this if we use left outer join, please reply.

1 REPLY 1

Sandra_Rossi
Active Contributor
0 Kudos

The output format is not related to the left outer join.

But probably the left outer join makes 2 cases in the generated data:

  • For joined data, you see a unit of measure (1 line with 0 EA, which is summed alone as 0 EA, so it's fine).
  • For left data without join, you don't see a unit of measure (empty cell)

So, the question is more about how 0 is formatted when there is no unit of measure (or an invalid unit of measure), and when there is a unit of measure.

Note that I assume that "scale quantity" is linked to "UoM" because of the screenshots but I can't be sure.

In your case, I guess that the internal code of the ALV formats the quantities according to the unit of measure when it exists, and formats the quantity according to its actual data type and the NO ZERO option in the ALV field catalog when the unit of measure is invalid, here I suppose that SAPQuery activates the NO ZERO option by default, I don't know if it can be changed.

I think that the main question is why can't you assign a valid unit of measure to the quantity. A quantity of 1000 without unit of measure is meaningless: is it 1000 pounds, 1000 kilograms or 1000 grams?