Easy Cooking: SM58 LUW_extractor in Visual Studio 2022
In this blog post we will discuss about extracting binary data from specific “Transaction ID” written in SM58 logs. I didn’t find any program or reference how I can extract such on internet so I decide to create it by myself.
Also decide to write this blog post to explain purpose and usage of it so maybe this program also will help someone else.
Problem: You want this PDF binary data extracted from tRFC LUW? If Yes please keep reading …
Ingrediencies:
Form x1
button x2
textBox x1
label x1
richTextBox x1
Result:
Problem is well described in two following SAP Note:
2608534 – Content repository does not exist – error message in transaction SM58
Symptom
When archiving through ArchiveLink from an application (with a printing program for example) the archive file is not stored on the content repository and the link entry is not created.
Additionally, the error message “Content repository does not exist” appears in the logs in the SM58 transaction with the following line:
The error message can occur with the function module:
- ARCHIV_CREATE_TABLE, or
- ARCHIV_CREATE_TABLE_MULT
1785206 – SM58 error “Obj. type not assigned to storage syst.” for ARCHIV_CREATE_TABLE or ARCHIV_CREATE_TABLE_MULT
Symptom
tRFC error message (SAP ArchiveLink: Obj. type not assigned to storage syst.) on the RFC destination SAP_AL_OUT
for the function module ARCHIV_CREATE_TABLE or ARCHIV_CREATE_TABLE_MULT.
ArchivLink specific tRFC error messages can be found in:
OAM1 transaction -> Outbound Document Archive -> Archive Requests
Resolution
- Insufficient customizing for the corresponding Document type:
-
- In the transaction SM58 or OAM1 double click on the “Transaction ID” of the corresponding tRFC item
- Check the parameters AR_OBJECT, DOC_TYPE and SAP_OBJECT
- Check the customization for the (in the previous step identified) Document type, Document class and Business object in the transactions OAD2, OAC2 and OAC3
Some time AR_OBJECT and SAP_OBJECT are empty in SM58, so you can extract pdf to find more information about object/document.
So you want to extract binary data from specific “Transaction ID” written in SM58 logs, in this case PDF file.
Procedure:
Double click on “Transaction ID” and save as “Local File…”
Figure 7. Display Data of tRFC LUW – PDF type
Figure 8. Save list in file … -> “Unconverted”
Figure 9. Save as “sample_file.txt”
LUW_extractor
Figure 10. LUW_extractor main screen
Click on button “Choose LUW”
Figure 11. Open “sample_file.txt”
Figure 12. Opened “sample_file.txt”
Click on button “extract”
Figure 13. After clicking on “extract” button
Click on button “Yes”
Figure 14. After clicking on “Yes” button PDF file is open in default program
Conclusion:
We learned how binary data in this case PDF file can be extracted from SM58 logs. Bellow are also code and release together with instruction how you can do it by yourself.
C# code and binary of LUW_Extractor you can find on my GitHub page.
Video instruction on usage you can find on YouTube.
NOTE: Primary usage is for extracting PDF files from SM58 logs, but you can also extract other binary, for example IDoc, just you need to change extension from .pdf to appropriate.
Thanks everyone for reading the blog, please comment bellow if you know better way to achieve the same.