‎2010 Jun 10 10:57 AM
Hi,
how can i select a substring of a field ang group by the result in SAP?:
SELECT left(zbnky, 4) as bank, sum ( rbetr) as sumrbetr INTO TABLE gt_data
FROM Reguh
GROUP BY bank.
Thanks
‎2010 Jun 10 5:38 PM
xavi dont make it such a wired code..
just select required fields from reguh to your internal table.. then do the calculations...
‎2010 Jun 10 10:59 AM
I don't think this SELECT construct is possible in Open SQL.
You have to select data into internal table & process the records ...
Edited by: Suhas Saha on Jun 10, 2010 3:31 PM
‎2010 Jun 10 11:04 AM
Hi xavi,
just define BANK as C, length 4 in gt_data.
reagrds
rea
Edited by: Ramy El-Arnaouty on Jun 10, 2010 4:43 PM
‎2010 Jun 10 11:08 AM
This is something very wierd kind of question.This kind of select query I guess wont work for any Languages.
Please follow the correct syntax for select statement and if you want to sum it up do the same by taking prpoer LOOP statements.
Sany..
‎2010 Jul 09 8:21 AM
There are no weird questions, only weird people .
Of course, these kind of select is possible in other SQL languages, like PL-SQL or Transact-SQL, for example.
That's the reason why i asked this question.
‎2010 Jun 10 5:38 PM
xavi dont make it such a wired code..
just select required fields from reguh to your internal table.. then do the calculations...