2009 Dec 17 2:15 PM
Hi all, I have a Statement
SELECT * FROM ltak
INTO TABLE lt_help for all entries in gt_tree
WHERE bdatu = gt_tree-node_key.
It doesnt want to compile, because the field bdatu is not of the same type like my field node_key.
How can I process this statement, or how can I convert it ?
Thanks,
Regards,
HProkoph
Edited by: Rob Burbank on Dec 17, 2009 9:26 AM
2009 Dec 17 2:22 PM
Hi,
Just declare one additional field of same length of BDATU as in gt_tree.
Before passing it in for all entries, change the field ias required inside the loop and modify the table.
Then use the new modified field further in for all entries.
Sorry, Jayanthi,
I think I misunderstand your help.
How do I cange the table inside some loop?
That is my question.
The data type of node_key is char(12)
Thanks,
Regards,
Hprokoph
2009 Dec 17 2:22 PM
Hi,
Just declare one additional field of same length of BDATU as in gt_tree.
Before passing it in for all entries, change the field ias required inside the loop and modify the table.
Then use the new modified field further in for all entries.
2009 Dec 17 2:29 PM
SOrry, but if I loop over the table gt_tree and then do the "select for all entries in" inside the loop,
I have a very bad performance.
Or do I misunderstand you?
Regards,
HProkoph
2009 Dec 17 2:35 PM
Hello,
This is what you were suggested before
"Add a extra field in the internal table gt_tree
data: begin of gt_tree occurs 0,
,,,,,,,
,,,,,,,
bdatu1 like ltak-bdatu,
end of gt_tree.
"before the select statement
loop at gt_tree.
gt_tree-bdatu1 = gt_tree-node_key.
modify gt_tree.
endloop.
SELECT * FROM ltak
INTO TABLE lt_help for all entries in gt_tree
WHERE bdatu = gt_tree-bdatu1.
Vikranth
2009 Dec 17 2:29 PM
What is the data type of variable node_key?
BDATU is of type DATS 8.
It won' be possible in your select statement with different data type .Declare it as like SY-DATUM
2009 Dec 17 2:35 PM
Sorry, Jayanthi,
I think I misunderstand your help.
How do I cange the table inside some loop?
That is my question.
The data type of node_key is char(12)
Thanks,
Regards,
Hprokoph
2009 Dec 17 2:37 PM
Thank you for replying me, now I understand, what to do.
Thanks,
Regards,
HProkoph
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |