11-16-2005 5:51 AM
Hai..
Is there any command in ABAP for calculating percentage?
How to callculate percentage?
11-16-2005 6:04 AM
Hello Hari,
I notice that this your first post on SDN. Welcome aboard, and hope you have a good time here.
Coming to your question, I'm afraid I don't understand it very well. what do you mean by a function for percentage? you just take a fraction and multiple it by 100 to get the percentage. For example, if you have two numbers , 4 and 5, and want to find out what percentage of 5 will be 4, you just do ( 4 / 5 ) * 100. Which will be 80.
Am I missing something here... ?
Regards,
Anand Mandalika.
11-16-2005 6:17 AM
Hi..tq for your reply.
Sorry for wrong question.
Actually i wnt to find the no.of records( we use this % symbol in the select query )
Is ther any such a option in the select query??
Just give me any syntax using select including % symbol.
11-16-2005 6:29 AM
Hi,
look F1 to select :
e.g.
SELECT COUNT( * ) FROM dd02l INTO sy-dbcnt
WHERE tabname = itab-tabname
AND tabclass = 'TRANSP'.
Andreas
11-16-2005 6:06 AM
HI Hari Krishna
There is NO Standard COmmand or Keyword in SAP to Calculate Percentage
x/y * 100,is the only way to calculate percentage.
You can define your own Macro or Function module,if you want.
Cheers,
Vijay Raheja
11-16-2005 6:18 AM
Hi Hari;
There is no Function for percentage calculation in SAP.
The below link will give you the Mathematical Functions and Arithmetic Operations supported in SAP.
http://help.sap.com/saphelp_erp2004/helpdata/en/fc/eb32e2358411d1829f0000e829fbfe/frameset.htm
Reward Points..
Cheers..
Afsal
11-16-2005 6:41 AM
Syntax:
Select * from datatable
where Field1 = '%01'.
it will fetch all the records where field 1 ends with 01.
% wild card character.
which can take any no.of characters