How to Compel SAP Users to Go To Particular Transactions as per Roles after Log On?

How to Compel SAP Users to Go To Particular Transactions as per Roles after Log On?
Customer Exit

Execute a pre-decided Exchange Code after Client Logs in.

How to Compel SAP Users to Go To Particular Transactions as per Roles after Log On? Your client won’t generally come to you griping about the presentation of some custom report (read HANA execution) or accompany a prerequisite to construct some perplexing Point of interaction which converses with the non-SAP world without RFCs and Web Administrations (read OData and UI5 improvement). Allow us to accept, there actually exist a few Clients who accompany typical SAP determinations which can be planned utilizing ordinary SAP ABAP.

One such solicitation which I as of late gotten was to cause explicit clients to execute specific arrangements of custom projects/t-codes after they sign on to Drain GUI.

Furthermore, each chose clients have explicit/different custom program to be executed just in the wake of signing in. For instance, these custom projects are ready/notice programs that illuminate clients about some business. How to Compel SAP Users to Go To Particular Transactions as per Roles after Log On?

Allow me to expound somewhat more.

User_A will be given a custom modular program (say ZVOIDED) that will list all void really looks at made on the earlier days.

Then, User_B will be given two projects. First with the ZNOTIF_01 program and an installment notice due for the week (ZNOTIF_02).

You could contend, for such prerequisite same difference either way” “Set Start Exchange”? The SAP standard “Set start exchange” will be of little use for this solicitation furthermore, the client has the ability to erase it assuming that it is considered irritating for them.

Set default start transaction

To accomplish this solicitation, we will utilize what we know best, for example our own Client Leave (Upgrade Procedure). The underneath t-codes, works and incorporate would be utilized.

i) T-Code CMOD

ii) Standard SAP Enhancement SUSR0001 (found from SMOD)

iii) Component/Function Module EXIT_SAPLSUSF_001

iv) Include program ZXUSRU01

v) T-Code SU01

Let us dive a little deeper.

1) Execute CMOD, enter the custom project and click “Create”. Follow the standard transport request.

CMOD

PS: We accept, you know how to find Client Ways out. On the off chance that you don’t have the foggiest idea, kindly let us know. We would be glad to compose something on Upgrade Methods also.

Also Read: How to Find BADIs?

2) Enter any short text description and click on “Enhancement assignments” button.

Enhancement Project

3) Input “SUSR0001” on the Enhancement column and click “Components” button.

Function Exit

4) Double click on the “EXIT_SAPLUSF_001” function exit.

EXIT_SAPLUSF_001

5) Double click the include “ZXUSRU01” and press “ENTER”.

ZXUSRU01

6) Yet, before we begin coding on the incorporate “ZXUSRU01”, we will initially continue to SU01 (Client profile) to add some distinguishing proof job for the Client.

7) Execute SU01 and input the username. For this venture, we chose to utilize the TELETEX field on the specialized strategy to recognize what program/t-codes should be set off for the client on sign on. Double tap “Other correspondence” button.

8) Select TTX (Teletex). Click OK.

communication method

9) It is here on the Keep up with Teletex numbers, where we input the exchange code appointed to the specific client. For User_A, input ZVOIDED. What’s more, for the User_B, input ZVOIDED and ZNOTIF likewise. Along these lines, User_B will have two columns while User_A simply have just 1 line. Whatever entered on TTX will be executed on the Client leave we have made.

10) Back on the CMOD t-code, double tap on the incorporate “ZXUSRU01” and enter the accompanying code. The rationale is basic. Whatever t-code is kept up with for the Client in the Teletex field, that ought to be executed in the Client Exit for the client (for example Refer to Exchange as “TxCode”).

*&---------------------------------------------------------------------*
*&  Include           ZXUSRU01                                         *
*&---------------------------------------------------------------------*
DATA: t_ttx TYPE TABLE OF BAPIADTTX.
DATA: TxCode(30) TYPE c.
DATA: tab_return TYPE bapiret2 OCCURS 1.
FIELD-SYMBOLS: <fs_ttx> TYPE BAPIADTTX.

Call Function 'BAPI_USER_GET_DETAIL'
Exporting
username = sy-uname
**     Importing
**         address  = s_address
Tables
return   = tab_return
ADDTTX   = t_ttx.

IF SY-SUBRC EQ 0.
LOOP AT t_ttx ASSIGNING <fs_ttx>.
*        break-point.
TxCode =< fs_ttx>-TELETEX.

IF TxCode IS NOT INITIAL.
CALL TRANSACTION TxCode.

ENDIF.

ENDLOOP.
ENDIF.

11)  Check and activate CMOD project.

12) Test the code by logging as the client. Program(s) will be executed in view of the information kept up with in his/her profile.

 

Sample Outputs.

i. Payment Due List Notification.

ii. Voided Cheque Details.

That is all there is to it. The necessities from the Clients are need based. What’s more, to give them an imaginative arrangement is the obligation of any Designer. We needn’t bother with to be on HANA or construct Fiori Applications to help our Clients. In some cases a similar age old SAP blue screen with conventional DB and a similar ABAP language can be a lifeline.

Trust this straightforward article helps some out of luck.

 

YOU MAY BE INTERESTED IN

How to find badi in sap abap ?
ALV with an Editable Row
Create and Consume Business Add-in(BAdI) in ABAP

 

X
WhatsApp WhatsApp us