Questions related to "SAP Query" which consists of subareas such as "Queries", "InfoSets", "InfoSet Queries", "User Groups", "Translation/Query", and "QuickViewer".
Questions tagged [sap-query]
31 questions
5
votes
1 answer
IN operator in check statement
In SQ02 transaction, I want to use the check command.
Can I replace the OR operator with another operator, which shorts the command?
Is there an operator like IN, which exists in SQL?
The check command is something like:
CHECK SKB1-BUKRS EQ '1000'…

hag
- 53
- 1
- 5
4
votes
1 answer
VBA Code for Making Entire Rows Bold based on a Cell value in the Query table
I have a table in the range (G15:AL540) generated through SAP Query. I need to make all the rows Bold if the Cells in Column L Contains the word "Main Investigation". I did it using Conditional Formatting (=$L16="Main investigation") and it worked.…

Sai
- 43
- 1
- 1
- 3
3
votes
1 answer
Detect if report is a SAP query
I have an ABAP program which calls a report and converts its output to JSON.
Unfortunately this does not work for SAP Queries like described in this question.
How can I detect if a report is an SAP Query or not if have the name of the report as…

guettli
- 25,042
- 81
- 346
- 663
3
votes
1 answer
SUM through RBDRSEG lines in ABAP Query
I am having trouble figuring out where to start/how to get the correct output.
I am very new to ABAP coding. I am trying to create an Infoset query and need to do a bit of coding in SQ02.
I have two tables joined - one being RBKP as the header for…

justin derouin
- 33
- 1
- 1
- 3
2
votes
3 answers
Conditional aggregation of VBAK/VBAP fields into single row in infoset
I encounter the following problem.
What I want to do
I want to create an infoset that would regroup, for a given Purchase Order, data from the VBAK table with several lines from the VBPA table that should be dispatched to different fields.
Example…

Frederi ROSE
- 297
- 2
- 9
2
votes
2 answers
How to loop at Table only having ref to data
I am using the function Module RSAQ_QUERY_CALL, getting back a table:
DATA: gr_data TYPE REF TO data.
CALL FUNCTION 'RSAQ_QUERY_CALL'
EXPORTING
query = 'ZXXXXXXXX'
usergroup = 'XXX'
VARIANT = 'TEST'
…

inetphantom
- 2,498
- 4
- 38
- 61
2
votes
1 answer
Function module RSAQ_REMOTE_QUERY_CALL selection parameters
I'm trying to use function module RSAQ_REMOTE_QUERY_CALL via the RFC call (.NET Connector 3) but I have a problem with selection parameters. My query has two parameters:
Material (SP$00001)
Language Key (SP$00002)
I would like to provide them from…

Eori
- 67
- 1
- 7
2
votes
2 answers
Why is this custom program named AQZZ...?
I found a 'Z' transaction calling a program not in the customer space.
This program "seems" to be something developed by the customer, meaning its name is
"AQZZZFI_ABC=====ZPYORD========", where "ABC" is the name of the company, and the creator of…

vlad-ardelean
- 7,480
- 15
- 80
- 124
1
vote
0 answers
Is there a way to create a SQVI query in SAP with a complex conditional "WHERE" clause?
I am trying to create an SAP data query using SQVI (or SQ01) to display all entries that meet certain criteria. I can use the 'Selection Fields' tab to have a user specify any of these parameters, but I want to be able to query the data with more…

Simon Arneberg
- 11
- 4
1
vote
1 answer
SQL Error invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause
Here is my query - created through SAP Query tool:
SELECT DISTINCT
T1.CardCode,
T1.CardName,
T1.Phone1,
T1.GroupCode,
T1.Territory,
T2.Street,
T2.Block,
T2.City,
T2.ZipCode,
T2.County,
T2.State,
…

Erin Klanderman
- 31
- 1
- 4
1
vote
1 answer
SAP query - BSEG and BKPF
I have two tables in SAP ERP, BSEG and BKPF, can we identify which transactions came from BSIS, BASS, BAUD, BSAD, BSIK or BSAK? If yes then how? which columns and filters should we use?

ASP
- 45
- 4
1
vote
2 answers
Converting MATNR via conversion exit fails for custom table
I'm trying to select the latest date of a material movement from MSEG, but the material needs to be in stock and that is sourced from a bespoke table which uses unconverted Material names.
I've tried using the CALL FUNCTION…

DDoze
- 53
- 2
- 9
1
vote
1 answer
cl_salv_bs_runtime_info=>get_data_ref() returns no data
I have this code, which works very nice for a lot of reports:
if IV_SELECTION_SET_VARIANT is INITIAL.
SUBMIT (IV_REPORT_NAME)
WITH SELECTION-TABLE selection_table
AND RETURN.
ELSE.
SUBMIT (IV_REPORT_NAME)
WITH SELECTION-TABLE…

guettli
- 25,042
- 81
- 346
- 663
1
vote
1 answer
How do I do a SELECT DISTINCT using a SAP Infoset Query?
For Example: Using table ITOB; if I select EQUNR and ANLNR, I get multiple entries (mostly due to non-unique ILOAN, TPLNR and DATBI records). How can I do the equivalent of:
select distinct equnr anlnr from itob into (itob-equnr, itob-anlnr)
…

Esti
- 3,677
- 8
- 35
- 57
1
vote
1 answer
Add SELECT-OPTIONS for infoset
I'm not able to add properly a Select-Option for a Parameter into an infoset.
I got this parameters in the selection screen:
REPORT RSAQDVP_TEMPLATE .
*
*---------------------------------------------------------------------*
* declarations
* …

SimonFreeman
- 205
- 1
- 7
- 17