Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Abap query
1. ABAP Query
Published by Team of SAP Consultants at
SAPTOPJOBS
www.sap-topjobs.com
Copyright 2005@SAPTOPJOBS
All rights reserved. No part of this publication may be reproduced, stored in a
retrieval system, or transmitted in any form, or by any means electronic or
mechanical including photocopying, recording or any information storage and
retrieval system without permission in writing from SAPTOPJOBS.
2. TABLE OF CONTENT
INTRODUCTION ..................................................................................................3
Scenario 1.............................................................................................................4
1. Finding Database tables for creating queries.................................................4
2. Create a User group ....................................................................................19
3. Create an Infoset .........................................................................................27
4. Assign Infoset to User Group.......................................................................39
5. Create Query ...............................................................................................41
Scenario 2...........................................................................................................64
1. Creating an Infoset ......................................................................................65
2. Assign Infoset to User group........................................................................86
3. Create a Query ............................................................................................88
4. Transporting Queries .................................................................................108
3. INTRODUCTION
In every project we come across situations where the client is not satisfied by the
standard SAP reports. In such situations most of the times functional consultants
have to be at the mercy of ABAPERS. This not only costs time but also a good
deal of money for the client.
ABAP Query was a blessing in disguise for both functional SAP consultants as
well as end users of the company. Here, one could easily design various reports
without any technical knowledge. Functional consultants will find this tool very
useful and an added skill in today multi tasking environment.
We have attempted to bring you meat of ABAP query in this document. I am sure
you would find this very useful in your current job as a consultant or a end user.
4. Scenario 1
1. Finding Database tables for creating queries
We want to view the company code segment of the entire customer masters
in the company. Standard reports available do not give the desired
information. Therefore we feel the need to create an ABAP Query.
To create an ABAP query you need to know the database table where the
information exists.
How can that be obtained?
Option 1
We want to see the company code information of a customer.
Use the relevant transaction code to see the information. In this case it is
FD03
Go to the company code data
5. Position the cursor on the field Recon. account and press function
key F1 on the key board to see the field help.
7. Thus you get the Transparent table name – KNB1
Here you have easily got the table.
Option 2
Sometimes the table name is not as easily available as was available in
option 1.
In the same transaction
11. In the above screen transparent table is not visible.
Note down the field name NAME1
In another session type in transaction code SE90 in the command field.
34. You will notice in the above screen that some fields have T above them
This means that in this field text is also available.
Now we need to select fields from the table (left hand side) to the Field
Group/data fields (right hand side).
Position the cursor on
Then position the cursor on
64. Now you can execute this query
By selecting
Click
Scenario 2
In scenario 1 we saw a simple query, where in all information required was
available in a single table.
But that is not the case always. Information which we require is not available in a
single table and is scattered across in more than one table. In such as scenario
you need to create a join between these tables through a common field between
these tables.
In this scenario we want to have information of the customer master with name,
address and also the accounting information.
We have seen earlier that the customer address information is available in the
table KNA1 and the accounting information for the customer is available in the
table KNB1. These 2 tables can be joined based on the common field customer
number in them.
65. Let us proceed with creating a new query
1. Creating an Infoset
Update the following:-