Posted: Thu Dec 31, 2009 3:40 pm Post subject: Question for logic in formula? SAP QUERY - INFOSET report
Hi friends,
sorry for my English but my Russian is better when i read.
So my question is, how to say brrrr....
i create for my client one report in SAP query. The last change on my InfoSet is to create one formula, and put this formula in InfoSet ABAP coding place END-OF-SELECTION.
My question is how to create logic and ABAP code of formula for every one Delivery document number?
report is
Delivery(Dl) Batch(Bt) Material(Mn) chracteristic name(CN) chracteristic value(CV) Delivery quantity(Q) SU Gross weight(Gw) WUn Mtyp(Mt)
80000061 10010010 EK757604BK 100 M 100.000 KG MCFE
80000061 104 EK759064BK 100 M 84.400 KG MCFE
80000061 900 EK759064BK DRUM_CONDITION N 100 M 84.400 KG MCFE
80000061 901 EK759064BK DRUM_CONDITION N 100 M 84.400 KG MCFE
80000061 3125010 3 ST 1.200 KG MRM1
80000061 EK757604BK 0 M 0 KG MCFE
80000061 EK759064BK 0 M 0 KG MCFE
80000061 EK759064BK 0 M 0 KG MCFE
Delivery(Dl)
Batch(Bt)
Material(Mn)
chracteristic name(CN)
chracteristic value(CV)
Delivery quantity(Q)
SU
Gross weight(Gw)
WUn
Mtyp(Mt)
Internal table of query is %dtab
My question is how to create logic and ABAP code of formula for every one Delivery document number, like subtotal line after every one delivery document?
IF
Mt = MRM1
then
(Gw-of drum) / (Q) of (WUn where WUn is ST) * count (CV-N(only new))
else 0
or alphabetical example:
We sale two types of material:
cable and drum.
Drum can be NEW(N) or OLD().
When we sold drums Material type is MRM1.
The value of characteristic on drums, our client put in characteristic on cable. So we know that drum(exp: matnr: 3125010) is new(N) from cable (exp: EK759064BK) when value of characteristic's cable is 'N'.
And my client must know how many new drums, and how many wight are they in every one delivery document.
new example and result who we expect:
1 new and 1 old drum
Delivery(Dl) chracteristic name(CN) chracteristic value(CV) Material(Mn) Delivery quantity(Q) SU Gross weight(Gw) WUn Mtyp(Mt)
80000044 DRUM_CONDITION N EK759064BK 100 M 84.400 KG MCFE
80000044 EK759064BK 0 M 0 KG MCFE
80000044 EK759064BK 100 M 84.400 KG MCFE
80000044 3125010 2 ST 800 KG MRM1
result must be: 1 new drum and 400kg
so plz help me to create this hard, for me, formula.[list=][/list][list=][/list]
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.