Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SQ01 DIsplay Problem (Can v write abap code ) Sql Query

Former Member
0 Likes
347

Hi

Need help in SQL Query

I generated one sql query which has the following output in general .

-


Customer name description amount

-


asrq1 sharekhan Amount payed 10

asrq1 sharekhan Amount Advance 20

asrq1 sharekhan Amount due 30

but i need the output in the following way

-


Customer name AMount payed Amount Advance Amount Due

-


asrq1 sharekhan 10 20 30

and iam new this sql query but came to know we can write code ..but iam unable to initiliaze to write

a peace of code as i dont know what are the select-options defined ..i saw in the include but didnt got it

% comes prefix of select-options,and iam unable to get he internal table which is displayed in the query .

can anyone help me in this answers will be awarded points.

1 REPLY 1
Read only

Shafiq_Rehman1
Active Contributor
0 Likes
257

First, I will suggest to go for ABAP report for this kinda requirement.

If you really want to go for it through SQ01, even then you will have to write some ABAP to display the records in one row. You will need to create three custom fields.

I will give Psudo for one field:

Field Name := ZAmountPayed

Select Amount_Payed into varAmountPayed from Table Where Emp# = '12345'

ZAmountPayed := varAmountPayed

Convert the above into relative ABAP code and create 2 more similar fields, and you should be all set.

You have to know the table names and any other calculations to get the right data.