12-07-2020 1:27 PM
Hello all,
I am doing a query with SQ01/SQ02, I am reading a z_table that it is structured like this (4 fields for each records):
record n. 1 --> contract1, contract2, contract3, salesorder
record n. 2 --> contract4, contract5, contract6, salesorder
For the example above my final goal is to have in output 6 records, each records with 2 fields, structured like this:
record n. 1 --> contract1, sales order
record n. 2 --> contract2, sales order
record n. 3 --> contract3, sales order
record n. 4 --> contract4, sales order
record n. 5 --> contract5, sales order
record n. 6 --> contract6, sales order
Could you please suggest how can I get this result with SQ01/SQ02 transactions?
Thanks
12-07-2020 3:00 PM
IMHO for this kind of requirement forget query a build a report from scratch.
12-07-2020 4:24 PM
thanks for suggestion. If I would achieve these results just with a query, do you have any suggestions? With infoset SQ02 we can write ABAP, anyway for the moment I am not able to achieve these results
12-08-2020 1:41 PM
Did you try some join from your table to the contract table with a where clause
( contract~number EQ record~contract1 OR contract~number EQ record~contract2 OR contract~number EQ record~contract3 )
So you get 1-3 records in the query execution