2024 Sep 06 11:49 PM
hello,
I am using FM READ_TEXT to read some texts ( EKPO, L03 ) but the FM is not showing any data. When I check the database table STXH also the DB table is not showing any data, but however, when I go to the SAP standard transaction ME33L , SAP uses the same FM READ_TEXT and the FM does show all the data !
If I debug the FM READ_TEXT this is exactly the problem
1) In my program when I use the FM READ_TEXT
syst-subrc = 4 ( not found )
2) In SAP program , when SAP uses the FM READ_TEXT
syst-subrc = 0 ( everything ok ! )
any suggestions guys ?
thanks in advance,
Jimmy
2024 Sep 07 8:36 AM - edited 2024 Sep 07 8:37 AM
Debug READ_TEXT when it's called from ME33L, copy ALL of the EXACT values of the parameters into your custom report with CTRL+C and CTRL+V, and it should work. Make sure to run your report from the same client than the one where you run ME33L.
2024 Sep 07 1:12 PM
Hello,
FM READ_TEXT is the correct way to retrieve using ABAP. Since you couldn't find the data in STXH/STXL, I suspect that the object id and name could be incorrect. You can verify this by going into ME33L and double click on the long text you want to see. This usually opens a word document but you can cancel and navigate to the classic editor. At the menu, there is a header item which you can navigate too.
This will give you the text Header with all the appropriate fields. This is the information you would need to pass to the FM and verify in STXH.
IMPORT from memory ID is a runtime function. If the long text is saved it should be in STXH/STXL.
Hope that helps.
Anand
2024 Sep 09 3:13 PM
thank you very much for the answers, I'm going to try to explain the whole problem sequence
step 1. Create Scheduling Agreement in Tx. ME31L
1.1 I don't know why the system doesn't create the text in the DB table STXH / STXHL the very first time
1.2 My poor Z SAPscript doesn't find the text info. whit FM READ_TEXT
1.3 Standard SAP ME33L of course can read the text info.
step 2. someone modify the text in Tx. ME32L
2.1 this time the system create the text in the DB table STXH, STXL the second time
2.2 My poor Z SAPscript now can read the text info. with FM READ_TEXT
2.3 Standard SAP ME33L of course can read the text info.
step 3. Create another Scheduling Agreement in Tx. ME31L
3.1 Again, I don't know why the system doesn't create the text in the DB table STXH / STXHL this very
first time
3.2 Again, My poor Z SAPscript doesn't find the text info. whit FM READ_TEXT
3.3 Standard SAP ME33L of course can read the text info.
Step 4. Again, someone modify the text in Tx. ME32L
4.1 this time the system create the text in the DB table STXH, STXL ( the second **bleep** time )
4.2 My poor Z SAPscript now can read the text info. with FM READ_TEXT
4.3 Standard SAP ME33L of course always can read the text info.
I did think this was a system bug, but the system, simply can read the text info. from memory or from the DB table or boths at the same time, buy my poor Z SAPscript can't read the text info. from buffer memory, only from the DB table ?
again, any advice guys ?
2024 Sep 09 4:41 PM
Seems to be matching the behavior as highlighted by raymond_giuseppi. You can try to enter a separate text during creation to see STXH/STXL is created.
2024 Sep 09 3:50 PM
When is the Z SAPScript called? Automatically during the execution of ME31L/ME32L?
2024 Sep 09 4:51 PM - edited 2024 Sep 09 5:20 PM
In Customizing you can force adoption (e.g. Define text types for item texts)
Also browse tables T165K (header) and T165P (item) to get the copy rules (from which text to which text) so if a text is not adopted at current level, read it from previous level (material, inforecord, etc.)
VORGA | TDOBJECT | TDID | FOLGE | BSTYP | KOOBJECT | KOID | FIXIE |
L | EKPO | L03 | 0 | EKPO | L03 | ||
L | EKPO | L03 | 1 | MATERIAL | GRUN | N |
Note the FIXIE = N, so text from material master data is by default not adopted by document item.
2024 Sep 09 8:13 PM
2024 Sep 10 8:43 AM
After Raymond has posted the right solution, it makes me think that a universal solution is to use the SQL trace (ST05) to understand quickly (in minutes) what's going on.
In your case, you would see right after steps 1 or 2 (ME31L or ME32L) that the access to STXH/STXL concerns the material master data, and you would also see the values to access STXH/STXL.