2016 Aug 25 12:52 AM
Hi gurus.
Forgive me for such silly question but I don't have too much experience in ABAP.
I search for an answer for this question but being honest, I have no idea of an effective way to search for this.
Well, the problem is:
I build a dynamic SQL statement like this.
So, I'm facing a problem, when I execute the same statemant using SE11 I got more records than when I execute this sentence in the program, so, I record a trace for this statemant in ST05 and for my surprise I got this.
So, I ask you guys, where that DISCTINC came from? Because it is not in the lv_fields variable.
I could solve this problem by selecting the PK fields for this table but, I don't need those fields.
I very appreciate any help.
regards
Ronaldo.
2016 Aug 25 3:16 AM
Hi Ronaldo,
Maybe it is because you used for all entries in itab.
It will delete the same lines in the result when you did not use all keys field in Select statement.
Regards.
2016 Aug 25 3:16 AM
Hi Ronaldo,
Maybe it is because you used for all entries in itab.
It will delete the same lines in the result when you did not use all keys field in Select statement.
Regards.
2016 Aug 25 4:53 AM
Hi,
Actually it is documented
To get there use "google search operators "
site:http://help.sap.com/abapdocu_740/en/ "WHERE - FOR ALL ENTRIES "
In order to get all your data you need to include in the output table the full key of your input table
Regards.
Eitan.
2016 Aug 25 1:49 PM
Thank you guys!!!
So, in terms of performance, which is better, build the in condition my self or use the full qualified PK on the internal table?
best regards
Ronaldo.
2016 Aug 25 2:36 PM
Hi,
The point is not only performance.
you will not get all the records if you fail to use the full key.
Regards.