a month ago - last edited a month ago
Dear Experts,
I need to create a relationship between a position and another object in infotype HRP1001.
Currently, I am implementing a BAdI and receiving the parameter is_ee_org_ass_repl_req.
Within the implementation, I am executing several SELECT statements inside a LOOP AT to build the required structure. However, this approach is causing performance issues due to multiple database queries.How can I avoid executing queries inside a LOOP AT, which is causing performance issues?
Regards
Request clarification before answering.
Hi,
I don't see any of the "is_ee_org_ass_repl_req-org_assignment" internal table's fields to be used in the queries. Then why to put in the loop at all. Result is always going to be same, isn't it? You can move the queries outside the loop.
If you've not shared the whole code and I assume you're using few fields from the internal table "is_ee_org_ass_repl_req-org_assignment" for selecting the data using those selects, then you can have below two options
1. Use for all entries or ranges to select data in one go and then use READ statements within the loop.
2. If you're on new ABAP version, then you can do a join also to fetch the data in one go.
this will eliminate the select within the loop.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 10 | |
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.