2021 May 10 2:17 PM
Hi All,
If I run a custom report from SE80 and there are no results I get an error message e.g. no results.
If I use a tcode that points to the program above, I will get redirected to SAP's initial screen.
Any ideas?
thanks
2021 May 10 2:38 PM
Hello,
did you create a tcode and assign it to the report?
Then why do you want to prohibit the execution by a tcode?
It is possible to restrict the tcode execution on the authorisation level, authorisation object S_TCODE,
https://answers.sap.com/questions/3237811/what-is-the-concept-of-stcode.html
2021 May 10 2:40 PM
Other possibility is to check in your report code against the current tcode ( i guess the sy-tcode field).
If it is equal to se38, then all is fine, otherwise abort the processing.
But i don't understand why you would want to do that.
2021 May 10 3:02 PM
The problem is that when I run the program using the tcode it sends me back to the SAP initial screen. I DO NOT want that, that's the problem.
If I run it from se80 then everything works fine. I get a no results message and everything is fine.
PS there are no LEAVE TRANSACTION LEAVE PROGRAM statements.
2021 May 10 2:47 PM
Nothing bizarre here. In ABAP, you have statements LEAVE TRANSACTION, LEAVE PROGRAM, and you can choose your logic depending on the context... Difficult to help without more information.
2021 May 10 3:17 PM
Change your program so it doesn't issue an error message.
E.g. MESSAGE i100(z) DISPLAY LIKE 'E'.
2021 May 10 4:31 PM
2021 May 11 1:55 PM
"did not work". No, I don't recognise that error message. Maybe you need to start sharing your code?
2021 May 10 7:22 PM
Do a line by line ABAP trace (SAT) and look what happens after the last line of the program.
2021 May 11 12:43 PM
Can you copy paste the line where you raise the message so that we see the syntax?
And also the next couple(~5) of lines afterwards.
2021 May 11 5:35 PM
Issue was resolved by recreating the tcode and maintaining it as program and screen. Why the down vote though?