Sei sulla pagina 1di 6

11/23/2016

HowtoaddcalcuatedfieldintheQuery

(http://go.sap.com/index.html)

Comm
unity
(http:/
/go.sa
p.com/
comm
unity.h
tml)

GetStarted(http://go.sap.com/community/gettingstarted.html)

/
Archives(/)
/
Discussion
sArchive
(/discussio
ns) /
SAPERP
Salesand
Distributio
n(SAP
SD)
(/discussio
ns/space/e
rp/sd) /

(https://onedx.find.sap.com)

(htt
ps://
sha
red
ui.s
ervi
ces.
sap.
com
/pro
tect
ed.h
tml?
ref=
http
s://a
rchi
ve.s
ap.c
om/
)

Howto
ad

Solutions (http://go.sap.com/solution.html)

d
cal
cua
ted

Support (http://go.sap.com/support.html)

fiel
din

Training (http://go.sap.com/training-certication.html)

the
Qu
ery

Community (http://go.sap.com/community.html)

Developer (http://go.sap.com/developer.html)

Partner (http://go.sap.com/partner.html)

About (http://go.sap.com/about.html)
https://archive.sap.com/discussions/thread/1245274

1/6

About (http://go.sap.com/about.html)

11/23/2016

HowtoaddcalcuatedfieldintheQuery

Howtoaddcalcuatedeldinthe
Query
Hi
Cananyoneguidemetheprocesstoaddaddtionalfieldsay"rate"inthequery(sq01)whereiam
having"Qty"&"TotalAmount"fieldsavailablefromthestandardtable.
Rate=TotalAmount/Qty
Thanksinadvance
Tejpal

(https://people.sap.com/tejpal.singh)
TejpalSingh(https://people.sap.com/tejpal.singh)
February21,2009at11:08AM
0Likes

HelpfulAnswerbyVivekSeelin(/discussions/message/7122642#7122642)

6 replies

(https://people.sap.com/vivek.seelin)

VivekSeelin(https://people.sap.com/vivek.seelin)replied
February21,2009at18:18PM

HiTejpal,
InSQ01
Openyourqueryforchange
Selectthefieldgroupsthatcontainthedataitemsyou
needtousetocreateyournewdataitem.Movetothefield
displaypage.
Onceyouhavethefieldnamesdisplayedonthescreen,
Edit>ShortNames>Switchon.
https://archive.sap.com/discussions/thread/1245274

2/6

11/23/2016

HowtoaddcalcuatedfieldintheQuery

Now,findeachdataitemyouwillneedtousetocreate
yournewdataitem.Intheshortnamefieldcreateanew
'nickname'foreachoftheseeg'TOTAMT'and'QTY'to
representtotalamount&quantity
Now,Edit>localfield>create.
shortname=thenameofyournewfield,eg'RATE'&
Fielddesc=descriptionofyrnewfield
Heading=howitwillbedisplayedintheheaderofyour
outputreport
SelectCalculationfield
Definenumberofdigitsanddecimalplaces
IntheCalculationformula,usethe'nicknames'you
previouslydefinedtocreateyourcalculation.Simple
arithmeticfunctionsaresupported,eg'TOTAMT/QTY'
wouldbetheformula
Hopetheaboveanswersyourquery.
Regards,
Vivek
0

(https://people.sap.com/vivek.sahni4)

VivekSahni(https://people.sap.com/vivek.sahni4)replied
February22,2009at06:21AM

HiVivek,
IhaveasimilarrequirementwhereinIhavebeenableto
captureGrossAmountandTaxinthequeryoutput.NowI
needtohavenewcolumnwhichwouldbeatotal(addition)
ofGrossamountandTaxamount.Ihavecreatedthis
queryinSQVI.Isitpossibletohavethis?
Thanksforyourhelp.
Rgds
0

(https://people.sap.com/vivek.seelin)

VivekSeelin(https://people.sap.com/vivek.seelin)replied
February23,2009at07:24AM

Hi,
https://archive.sap.com/discussions/thread/1245274

3/6

11/23/2016

HowtoaddcalcuatedfieldintheQuery

InSQVI,thereisnooptiontoaddacustomfieldlikein
SQ01.Somaybeifyouwantthesamefeature,createa
queryinSQ01orselecttheSQVIquery,clickonSAP
query&convertthesame&thenyoucanaddafield.
Regards,
Vivek
0

(https://people.sap.com/tejpal.singh)

TejpalSingh(https://people.sap.com/tejpal.singh)replied
February27,2009at06:39AM

DearVivek
ihaddoneallthestepsbutoutputisfollowingruntime
errorduetonewlocalfield(withoutthisfielditworksfine.)

Erroranalysis|
Anexceptionoccurredthatisexplainedindetailbelow.
Theexception,whichisassignedtoclass
'CX_SY_ARITHMETIC_OVERFLOW',wasnot
caughtin
procedure"/1BCDWB/IQT000000000030EXTR""
(FUNCTION)",norwasitpropagatedby
aRAISINGclause.
Sincethecalleroftheprocedurecouldnothave
anticipatedthatthe
exceptionwouldoccur,thecurrentprogramisterminated.
Thereasonfortheexceptionis:
Anoverflowwasdiscoveredinanongoingarithmetical
operationwith
operandsoftypeP.Possiblecausesare:
1.TheresultfieldoftypePistoosmallfortheresult.
2.Theresultoraintermediateresulthasmorethan31
decimalplaces.

https://archive.sap.com/discussions/thread/1245274

4/6

11/23/2016

HowtoaddcalcuatedfieldintheQuery

Alsowheniaddqty=1intheCONDITION(belowthe
CALCULATIONFORMULA)intheFielddefinationasper
yourlastpoint.itworksfine&givestheratevaluesforthe
qty=1only
Furtherifiputqty>1orAmt>1orbothitgivestheabove
error.
Regards
TejpalSingh
0

(https://people.sap.com/tejpal.singh)

TejpalSingh(https://people.sap.com/tejpal.singh)replied
March01,2009at06:18AM

HiFriends
AnySuggesstions??
Regards
Tejpal
0

HelpfulAnswer

(https://people.sap.com/vivek.seelin)

VivekSeelin(https://people.sap.com/vivek.seelin)replied
March01,2009at11:23AM

HiTejpal,
Canyouletmeknowthevaluesyourpassingforthe
numerator&thatforthedenominator.Alsohowhaveyu
definedthisfield?
Isuspecttheoverflowishappeningbecauseofthefield
declaration&thevaluesbeingpassedtothem.
Awaityourinputs.
Regards,
Vivek
0

https://archive.sap.com/discussions/thread/1245274

5/6

11/23/2016

HowtoaddcalcuatedfieldintheQuery

Share & Follow


(https://www.facebook.com/sapcommunitynetwork?ref=ts)
(https://www.youtube.com/user/SAPCommunities)
(https://plus.google.com/u/0/+SAPCommunities/posts)

(https://twitter.com/sapcommnet)

(https://www.linkedin.com/company/sap)
(https://instagram.com/sap/)

(http://www.slideshare.net/SAP)
Privacy(http://go.sap.com/about/legal/privacy.html) TermsofUse(http://go.sap.com/corporate/en/legal/termsof
use.html) LegalDisclosure(http://go.sap.com/about/legal/impressum.html) Copyright
(http://go.sap.com/about/legal/copyright.html) Trademark(http://go.sap.com/about/legal/trademark.html) Sitemap
(http://www.sap.com/sitemap/index.html) Newsletter(https://go.sap.com/registration/newsletter.html)

https://archive.sap.com/discussions/thread/1245274

6/6

Potrebbero piacerti anche