Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Creating Transaction Variants with SHD0 for Custom Transaction Codes Starting with Z,Y

0 Kudos
1,493

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?

10 REPLIES 10

Sandra_Rossi
Active Contributor
0 Kudos
1,367

It works the same for both custom and standard transaction codes.

raymond_giuseppi
Active Contributor
0 Kudos
1,367

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.

0 Kudos
1,367

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.

Sandra_Rossi
Active Contributor
1,367

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.

0 Kudos
1,367

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?

Sandra_Rossi
Active Contributor
1,367

For Selection Screens, you may use Program Variants.

As Raymond said:

  • "But since it is a client object, it is often easier to adapt the program to react to the transaction code."

0 Kudos
1,367

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.

0 Kudos
1,367

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.

Sandra_Rossi
Active Contributor
0 Kudos
1,367

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.

0 Kudos
1,367

Mr.Sandra
Thank you once again for your insightful response and suggestions. They have greatly contributed to my understanding.