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

SAP Query

Former Member
0 Likes
1,022

Hi ABAP ers,

I have to genarate the one SAP query it is already exist but i want enhance that query :

Requirement is As present it is displaying only RESB table but now i need to fetch the data from LQUA with join of RESB and calculate the sum based on theree fields, Could you please tell me where i need to do the join operation and calculation.

Thanks,

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
946

Hi,

Go to tcode SQ02.

You will find a tab JOIN. Using that you join tables.

For calculating you choose GOTO tab from there select the code and in start-of-selection you can write the code after defining data.

Hope this will help you.

Regrds,

Nikhil.

8 REPLIES 8
Read only

gaursri
Active Contributor
0 Likes
946

Hi Vipin,

you can create a new infoset using tcode SQ02 from there you can use the table joins and then specify this infoset to the query you want to use remember to assign user group to it .Hope it will work fine and your query resolves quickly.

Have a best day ahead.

Read only

Former Member
0 Likes
946

HI in which place i can write my own code in SAP Query, If you have any example could you please give it will be very help full.

Read only

Former Member
0 Likes
946

Hi,

In SQ02-enter query name-->choose 'Extras' button there you can write your code in the events

Read only

Former Member
0 Likes
946

Hi,

If you are using T.Code SQVI for query development, then there is no option for writing a code.

But if you are using SQ01, SQ02, then option is there as follows;

Use SQ02 and Click on Extras Button,

A small window will appear with options to create new objects..

Click on Create button, you can create Additional Fields you want, Add new fields and Sql Queries

Hope it is clear to you,

Regds,

Anil

Read only

Former Member
0 Likes
946

Hi Vipin,

Go to Infoset (SQ02) in change mode , click on Code icon (Sfift + F8) displayed on Application bar.

You will find the 'Code section' where diffretent events are listed.

You can implement you requirement by writing code in various code section/event.

If you want to apeend any condition , perform the calcaution on any fiellds , you can implement the logic in 'Record processing Event'

Regards,

Dinesh

Read only

Former Member
0 Likes
947

Hi,

Go to tcode SQ02.

You will find a tab JOIN. Using that you join tables.

For calculating you choose GOTO tab from there select the code and in start-of-selection you can write the code after defining data.

Hope this will help you.

Regrds,

Nikhil.

Read only

Former Member
0 Likes
946

hi,

you cannot make such kind of changes directly to query. however can modify the associated infoset (by adding more tables or changing data collection logic). changes done at infoset level will be visible to your query also once you re-generate the infoset.

rgds

Read only

Former Member
0 Likes
946

The LGNUM is the join table link,,,

for any operations you nee to do that through code then look for For extras from. and

Shift{ F-5)

You can witre code Here in all evenst as reauired,,,!

aND CONTOL THR EREPORT