on ‎2022 Oct 31 10:07 AM
I have a requirement to check sy-tcode value in some of the Popup but in debugger mode I am getting sy-tcode value as blank. So I tried with Import and export statement I wrote the code as below:
Type of Lv_tcode is sy-tcode.
EXPORT lv_tcode = lv_tcode1 TO MEMORY ID 'ZPMTCODE'.
IMPORT lv_tcode to lv_tcode1 FROM MEMORY ID 'ZPMTCODE'.
but I am getting same blank value . I tried with set and get parameter ID, cl_abap_syst class too but not working
Can anyone suggest some solution?
Request clarification before answering.
The transaction code is blank because at the place you execute your code, you're no more directly in a transaction, your code runs maybe in the update task.
The ABAP memory (EXPORT/IMPORT) can't pass values from the dialog to the update task.
To pass some values from the dialog to the update task, you need to create an "Update Task" Function Module, call it and pass the parameters you want.
Depending on the exact transaction code you are using, there can be more easy solutions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 6 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.