2023 May 12 2:45 PM
I've faced challenges while attempting to create a transaction variant for a custom transaction code. Is it technically feasible to utilize SHD0 to create transaction variants for such custom transaction codes?
2023 May 12 5:36 PM
It works the same for both custom and standard transaction codes.
2023 May 13 1:42 PM
Absolutely, it works the same way as for a standard transaction.
But since it is a client object, it is often easier to adapt the program to react to the transaction code.
2023 May 13 3:11 PM
Despite trying many times, I'm unable to do so.
Is it correct to understand that in SAP (S/4), transaction variants cannot be created for the selection screen of a custom program?
I would like to create a variant for the selection screen items (such as default value settings and hidden items) of a custom report program. I plan to create two transaction variants, create a transaction code for each of these transaction variants, and then assign authorization roles.
2023 May 13 4:06 PM
It is correct that transaction variants cannot be created for the selection screen of a custom program. If you try, you get the error message. To be more exact, you cannot create a Screen Variant for a Selection Screen.
2023 May 14 12:58 AM
Thank you for your response.
In most cases, a custom program requires a selection screen, so I understood that it's impossible to create a transaction variant for a custom transaction code.
In custom transactions, I believe there are often requests to change the items on the selection screen (such as default value settings and hidden item) for each user. If there are any alternatives other than creating a transaction variant, could you please let me know?
2023 May 14 6:48 AM
For Selection Screens, you may use Program Variants.
As Raymond said:
2023 May 14 1:42 PM
Thank you for your reply.
If, for example, we want to prepare different selection screens for two departments in the selection screen of a certain custom report program, we first need to create two types of variants, and then select "Program and selection screen (report transaction)" on the first screen by executing SE93 and then set the variant we created in "Start with variant" item on the next screen, I understand that we can handle it.
My recognition is that, in other projects as well, if we want to change the selection screen settings depending on the department, we create as many variants as there are settings, and by creating as many transaction codes as there are, we are dealing with it.
I didn't know until now that we can only create transaction variants for standard transaction codes with the creation of transaction variants in SHD0. Thank you for your answer. If there is any misunderstanding about this matter or if you notice anything, I would appreciate it if you could teach me.
2023 May 15 1:58 AM
I'd like to seek clarification on one aspect of program variants. Specifically, when executing the transaction code with a designated variant, is there a mechanism in place to prevent users from modifying these variants? From a security standpoint, it would be ideal to restrict the ability of users to alter these variants.
2023 May 15 7:55 AM
Just in case it was not clear enough: transaction variants work both for custom and standard transaction codes. As Raymond said: "it works the same way as for a standard transaction." But a screen variant doesn't work for Selection Screens (whatever they are custom and standard). Again, no different between custom and standard.
I guess you want to implement authorization checks. You must implement these checks in custom programs by design.
For information, in the authorization trace of my 7.40 system, I don't see standard authorization checks for using and saving program variants.
2023 May 15 1:26 PM
Mr.Sandra
Thank you once again for your insightful response and suggestions. They have greatly contributed to my understanding.