메뉴 건너뛰기

SAP 한국 커뮤니티



SQL 실행 프로그램

열공아밥 2009.12.22 14:21 조회 수 : 69076

출처 : http://hohojj.egloos.com/1381557


 


이상하게도 ABAP workbench에 sql query tool이 빠져있음.
마침 Jayanta Narayan Choudhuri 라는 인도분이 만든 yes4sql이라는 query 툴이 있어서 개인적으로 유용하게 사용하던 중 몇몇 아쉬운 점을 고쳐서 사용하게 되었고 성능이 나쁘지 않은 듯해서 원저작자인 Mr. Choudhuri의 동의하에 소스 수정본을 공개하기로 함.

Ridiculously there's no SQL query tool in ABAP workbench.
I was trying to find solution, because standard se16 isn't enough in the field. (Lots of join and join, aggregation, ...)
Finally I found "yes4sql". It's so cool and smoothly works. But there was little lack of functions.
It didn't support aliasing, some aggregate functions, '*', implicitly listed select clause, and some other features.
Especially, increasing the number of columns in select clause makes the response time slower and slower.
So I tried to add more functionality. And here's first release of myself.
The original author, Jayanta Narayan Choudhuri, thankfully agree to distribute it freely.
I'm trying to make it robust, and so far so good. But anyone who find the bug post it here. Don't hesitate please.

ABAP source and screendd


How to make ui (screen 100)








Screen capture






(Ctrl+S) command executes query.

Sample queries
select distinct
        a~bustransid
        b~item_number
        count( distinct a~position_amt )
        max( distinct a~position_amt )
        sum( a~position_amt )
from trdv_trans_flow as a
left join tracv_accitem as b
on a~bustransid = b~bustransid
where a~bustransid in ( select bustransid from trdv_trans_flow )
group by a~bustransid b~item_number

select count( * )
from trdv_trans_flow as a
join tracv_accitem as b
on a~bustransid = b~bustransid
where a~bustransid in ( select bustransid from trdv_trans_flow )

select * from trdv_trans_flow as a
left outer join tracv_accitem as b
on a~bustransid = b~bustransid
where a~bustransid in ( select bustransid from trdv_trans_flow )

select trdv_trans_flow~bustransid flow_number from trdv_trans_flow inner join tracv_accitem as a
on trdv_trans_flow~bustransid = a~bustransid where item_number = 1