‎2006 Jul 10 2:42 PM
Dear all,
I want to select value in one table, with the value I got from the query
EX:
3 fields on my table F1(P0001-GSBER), F2(P0001-BTRTL), F3.
I extract with query F1 and F2 and I want to display F3.
Can you pls Help me
Tell me if i'm not clear.
Thx
‎2006 Jul 10 2:54 PM
You may want to try a subquery. Put your cursor on a select statement and press F1 (Help). Subquery (in 4.7) is one of the options.
rob
‎2006 Jul 10 3:26 PM
Thx Rob but i'm not using query a lot. Can you tell me step by step
sq01...
Thx
‎2006 Jul 10 3:32 PM
‎2006 Jul 10 3:39 PM
The help on subquery is in the same spot in the 4.6C help.
Without knowing more detail about your requirements, it's hard to provide more information.
Rob
‎2006 Jul 10 3:52 PM
I'll trie to be clear,
I had to make a report with Area, sub-Area. I had to display an other information depending to Area and sub-Area.
This information is store in a table.
Structure of that one is Area, Sub-Area and the famous data.
Where should I go to find subquery?
Thw rob
‎2006 Jul 10 4:02 PM
‎2006 Jul 10 4:03 PM
‎2006 Jul 10 4:12 PM
Are you talking about Adhoc query /Infoset ?
If yes Goto->SQ02.. Then click extras->Create. a pop-up will come asking additional fields/additional table etc.. Choose field and code it . Dont forget to give the sequence of field . give sequence of field accordingly .
FYI
http://www.sappoint.com/abap/ab4query.pdf
Hope thisll give you idea!!
<b>Pl... award the points.</b>
Good luck
Thanks
Saquib Khan
"Some are wise and some are otherwise"
‎2006 Jul 10 4:48 PM
OK - you may not need the subquery. See if this helps:
REPORT ztest NO STANDARD PAGE HEADING LINE-SIZE 255
MESSAGE-ID 00.
TABLES pa0001, ztab.
SELECT-OPTIONS: s_gsber FOR pa0001-gsber,
s_btrtl FOR pa0001-btrtl.
DATA: BEGIN OF itab OCCURS 0,
gsber LIKE pa0001-gsber,
btrtl LIKE pa0001-btrtl,
END OF itab.
DATA: BEGIN OF itab1 OCCURS 0,
gsber LIKE pa0001-gsber,
btrtl LIKE pa0001-btrtl,
room LIKE ztab-room,
END OF itab1.
SELECT gsber btrtl
FROM pa0001
INTO TABLE itab
WHERE gsber IN s_gsber
AND btrtl IN s_btrtl.
CHECK NOT itab[] IS INITIAL.
SELECT gsber btrtl room
FROM ztab
INTO TABLE itab1
FOR ALL ENTRIES IN itab
WHERE gsber = itab-gsber
AND btrtl = itab-btrtl.
Rob
‎2006 Jul 10 4:57 PM
‎2006 Jul 10 7:18 PM
That's entirely up to your requirements. Without them, I really can't say. What I've written is a complete program that uses select-options to try to mimic what you are trying to do. You will have to adapt the code to fit your situation.
Rob