2021 Dec 29 10:47 AM
first select query ..............
second select query ................
append wa to it.
endselect.
endselect.
bascially first iteration get write data and appned but in second iteration it complete fetch the data of second select query and appned and then after it go to first select query then fetch data from data base table and then append it show output of 4 lines but i want the output of just 2 lines
mean fetch data from first and second select query at same time and append same iteration then second iteration fetch data from both select queries then append at same time please suggest any solution for ALV
first select query ..............
second select query ................
append wa to it.
endselect.
endselect.
bascially first iteration get write data and appned but in second iteration it complete fetch the data of second select query and appned and then after it go to first select query then fetch data from data base table and then append it show output of 4 lines but i want the output of just 2 lines
mean fetch data from first and second select query at same time and append same iteration then second iteration fetch data from both select queries then append at same time please suggest any solution for ALV
2021 Dec 29 10:56 AM
2021 Dec 29 10:57 AM
Your problem is not about ALV (the final goal), it's about how to fill the internal table from database tables.
I don't understand your question, please share the code you have tried.
Moreover please edit your question, select your code and press the button [CODE], which makes the code appear colored/indented, it will be easier for people to look at it. Thank you!
2021 Dec 29 11:32 AM
2021 Dec 29 11:40 AM
code is:::
select field from table into wa where......
select field2 from table2 into wa where......
append wa to it.
endselect.
endselect.
first it complete iteration of nearest select query and then it move to second select query
output shoould be:::
1 2 3
4 5 ( 2 and 4) from first select query data and (3 and 5 )is output of second select query
but it display output is 4 lines. there we cannot apply join please suggest any solution
2021 Dec 29 12:06 PM
Please use CODE button to format your text.
See how I do it:
select field from table into wa where......
select field2 from table2 into wa where......
append wa to it.
endselect.
endselect.Input from "table":
2
4Input from "table2":
3
5Actual output:
3
5
3
5output shoould be:::
2 4
3 5
I guess you want to transpose, right?
2021 Dec 29 12:21 PM
I also put the same code as u write but this logic is not wright???
2021 Dec 29 1:23 PM
You didn't understand. I have just rewritten your own code, I'm just asking you to pay attention to formatting of your question and comments. You missed the important thing of what I said. Never mind.
2021 Dec 30 5:15 AM
output of first internal table is::
1 2 3
4 5
in second internal table we also get two values like :
1 6
7
HOW I CAN APPEND THE VALUE OF SECOND INTERNAL TABLE IN FIRST INTERNAL TABLE WITH EXISTING DATA + WITH CURRENT LINE
MY DESIRED OUTPUT IS :::::
1 2 3 6
4 5 7
IN ALV
PLWASE SUGGEST SOLUTION NOW
How can move data from one internal table to another internal table with existing data.
2021 Dec 29 11:41 AM
Hi,
instead of
select ...
append wa to lt_table
endselect try to use
select *
from ..
appending table lt_table.
2021 Dec 29 11:49 AM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |