Hello everyone,
I'm trying to connect table ekpo and lips in order to get the sum of the field LGMNG for every PO and its corresponding VBELN from VBAP and VBELN from VBFA. The pql code I am using is the following one:
BIND("EKPO", PU_SUM("GSR_VBAP", BIND("GSR_VBFA", "GSR_LIPS"."LGMNG")))
This works well when I only have unique VBELN from VBFA for a VBELN from VBAP. My problem is when I have differents VBELN from VBFA for one same VBELN from VBAP, as it sums all te quantities as one, when I want it sepparated.
In my OLAP TABLE I only want to show the first VBELN from VBFA, so I use this code: BIND("EKPO",PU_FIRST("GSR_VBAP","GSR_VBFA"."VBELN"))
but i get the quantities from LGMNG for all the other VBELN from VBFA which belong to the same VBELN from VBAP.
I hope can help here. Many thanks.