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: 

User exit for SU01

Former Member
0 Kudos

Hi geniuses,

I need to validate field USDEFAULTS-KOSTL of Logon Data at SU01 transaction. I tried to find a user exit but the one that exists works only when you log-on to SAP. Somebody can give me a solution on this, please?

Thanks and kind regards,

Marcela.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi,

Fallow the below steps may be helpful for you

Here are the steps:

Step 1: Execute program ‘RSMODPRF’, entering the data element of the field

Step 2: Create function module when prompted, and add you code to the source section using the parameter

‘INPUT’ as the field value you are checking.

Step 3: Save and activate Function and execute transaction ‘CMOD’.

Step 4: Choose option: Goto-> Text Enhancements->Data elements->New DE cust docu.

Step 5: Enter data element

Step 6: Save and activate

Step 7: Execute program ‘RSMODPRF’ again but this time leave data element field blank.

Step 8: Select the checkbox for the data element you have just created and choose option: Field exit->Activate

This will now be active for all instances of this data element, but you can assign specific program and screen

combinations by pressing the ‘Assign prog./screen’ button. You can also change the code you entered in the field

exit function module by pressing the ‘Edit FM’ button.

Regards,

GUDURI

15 REPLIES 15

Former Member
0 Kudos

hi,

Fallow the below steps may be helpful for you

Here are the steps:

Step 1: Execute program ‘RSMODPRF’, entering the data element of the field

Step 2: Create function module when prompted, and add you code to the source section using the parameter

‘INPUT’ as the field value you are checking.

Step 3: Save and activate Function and execute transaction ‘CMOD’.

Step 4: Choose option: Goto-> Text Enhancements->Data elements->New DE cust docu.

Step 5: Enter data element

Step 6: Save and activate

Step 7: Execute program ‘RSMODPRF’ again but this time leave data element field blank.

Step 8: Select the checkbox for the data element you have just created and choose option: Field exit->Activate

This will now be active for all instances of this data element, but you can assign specific program and screen

combinations by pressing the ‘Assign prog./screen’ button. You can also change the code you entered in the field

exit function module by pressing the ‘Edit FM’ button.

Regards,

GUDURI

0 Kudos

Thanks Guduri for your answer. The problem is that your solution ends in a field exit and we are not able to use it. Any other suggestion???

Thanks again and regads,

Marcela.

0 Kudos

Thanks for your answer. I use this program before posting the question and the only user exit that appears is the one that I mentioned before, the one that works when you log-on tu SAP.

Regards,

Marcela.

0 Kudos

Does this note helps you, incase if you not come across....367660

Thanks

Manohar

0 Kudos

I think you can use BADI SMUM_USER_CREATE. Pl check.

0 Kudos

Bad answer... I implement it but doesn't work. Thanks the same for your help.

Kind regards,

M.

0 Kudos

Hi Marcela, have u solved your problem ??

I myself have a similar situation, but with field USLOGOND-ACCNT, Account Id ...

After tried all stuff, nothing ...

Then I saw this forum, and i thought here's the answer, but no ..., the same problems.

PAS

0 Kudos

Hi,

We solved it but changing final users's procedure, not with user exit. Sorry...

Regardas,

M.

Former Member
0 Kudos

Hi Marcela,

U can use the below program to find out the userexits for a tcode from that list you pick the correct one i think..

report zuserexit no standard page heading.

tables : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.

tables : tstct.

data : jtab like tadir occurs 0 with header line.

data : field1(30).

data : v_devclass like tadir-devclass.

parameters : p_tcode like tstc-tcode obligatory.

select single * from tstc where tcode eq p_tcode.

if sy-subrc eq 0.

select single * from tadir where pgmid = 'R3TR'

and object = 'PROG'

and obj_name = tstc-pgmna.

move : tadir-devclass to v_devclass.

if sy-subrc ne 0.

select single * from trdir where name = tstc-pgmna.

if trdir-subc eq 'F'.

select single * from tfdir where pname = tstc-pgmna.

select single * from enlfdir where funcname =

tfdir-funcname.

select single * from tadir where pgmid = 'R3TR'

and object = 'FUGR'

and obj_name eq enlfdir-area.

move : tadir-devclass to v_devclass.

endif.

endif.

select * from tadir into table jtab

where pgmid = 'R3TR'

and object = 'SMOD'

and devclass = v_devclass.

select single * from tstct where sprsl eq sy-langu and

tcode eq p_tcode.

format color col_positive intensified off.

write:/(19) 'Transaction Code - ',

20(20) p_tcode,

45(50) tstct-ttext.

skip.

if not jtab[] is initial.

write:/(95) sy-uline.

format color col_heading intensified on.

write:/1 sy-vline,

2 'Exit Name',

21 sy-vline ,

22 'Description',

95 sy-vline.

write:/(95) sy-uline.

loop at jtab.

select single * from modsapt

where sprsl = sy-langu and

name = jtab-obj_name.

format color col_normal intensified off.

write:/1 sy-vline,

2 jtab-obj_name hotspot on,

21 sy-vline ,

22 modsapt-modtext,

95 sy-vline.

endloop.

write:/(95) sy-uline.

describe table jtab.

skip.

format color col_total intensified on.

write:/ 'No of Exits:' , sy-tfill.

else.

format color col_negative intensified on.

write:/(95) 'No User Exit exists'.

endif.

else.

format color col_negative intensified on.

write:/(95) 'Transaction Code Does Not Exist'.

endif.

at line-selection.

get cursor field field1.

check field1(4) eq 'JTAB'.

set parameter id 'MON' field sy-lisel+1(10).

call transaction 'SMOD' and skip first screen.

Regards,

GUDURI

Former Member
0 Kudos

Hi,

Try this enhancement - SUSR0001.

This should work.

Pravat.

*Reward points if helpful<i></i>

0 Kudos

Thanks for ypur answer... The one that you suggest works when you log-on to system and not when you exec SU01 or SU02.

Regards,

M.

Former Member
0 Kudos

We solved the problem changinf end-user procedure because we could not find any user-exit or BADI to do it.

0 Kudos

Hi Marcel,

Thanks for the exit, i think it doesn't work for what we need ...

I put an oss message about that issue, let's see if they answer me

Bye,

PAS

Former Member
0 Kudos

Check this user exit : SUSR0001

Former Member
0 Kudos

Thanks everybody for the good and useful ideas!!!