2006 Dec 12 2:58 PM
Hi,
in an badi of an extractor for BW, for every line in the data internal table function module READ_TEXT is used to get some standard text related to the line. When found, only the first 7 characters of the first line will be used, and move one of the fields of the records.
But the use of the function results in runtime errors when the internal table with data is to big.
Is there are better / faster way to do it job without runtime errors ?
regards,
Hans
2006 Dec 12 3:31 PM
2006 Dec 12 4:17 PM
Not sure, but you might execute FM COMMIT_TEXT after each READ_TEXT. This may slow it down (then again it may not). But I think it will also clear some memory and avoid run time errors.
Rob
2006 Dec 12 5:11 PM
first you need to determine why you are getting runtime errors... is it really because you have too many texts linked to your items or you just have inefficient code which selects/processes these texts.
then you can actually use select from STXH & STXL tables to select just first line if it's the only line which is required.
Would be really good to see the code to be able to help 🐵
2006 Dec 13 6:32 AM
2006 Dec 13 2:01 PM
2006 Dec 13 2:04 PM
No, i didnt. I dont think it increases the performance. The time out can be avoided by resetting the counter by using function module TH_REDISPATCH.
Hans
2006 Dec 13 2:14 PM
I suggested it because some SAP FMs don't clear out memory after each call. If you call the same FM many times in a program, it may try to read whatever is in memory before going to the database. Then when it does go to the database, the data is added to memory and also returned to you.
I'm not saying this is the case, or that it will definitely help, but I doubt if it could hurt at all.
Rob
2006 Dec 13 2:37 PM
2006 Dec 13 2:48 PM