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: 

How to enable one parameter & to disable another by using different tx'n

Former Member
0 Kudos

Hi all,

Could you please shoot out my doubt :

By using different transactions(Tx'n-A & Tx'n-B) how can we enable & disable parameters in one selection screen .(These two transactions are using to access same selection screen)

Example: we have created two parameters p1 & p2 in one selection screen.

If you are using transaction (Tx'n-A) p1 should be enabled & p2 should be disabled

If you are using transaction (Tx'n-B) p2 should be enabled & p1 should be disabled.

Could you please exaplain the process.Thanks in Advance.

Regards,

Ranjith.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

use screen group for p1 and p2, for example the screen group = 'B1' for p1, and 'B2' for p2.

use at-selection screen event:

if sy-tcode = tx'n A.

LOOP AT SCREEN.

IF screen-group1 EQ 'B1'.

screen-input = 1.

MODIFY SCREEN.

ENDIF.

IF screen-group1 EQ 'B2'.

screen-input = 0.

screen-invisible = 1.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ELSE.

LOOP AT SCREEN.

IF screen-group1 EQ 'B1'.

screen-input = 0.

screen-invisible = 1.

MODIFY SCREEN.

ENDIF.

IF screen-group1 EQ 'B2'.

screen-input = 1.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

hope this will solve ur issue

3 REPLIES 3

Former Member
0 Kudos

use screen group for p1 and p2, for example the screen group = 'B1' for p1, and 'B2' for p2.

use at-selection screen event:

if sy-tcode = tx'n A.

LOOP AT SCREEN.

IF screen-group1 EQ 'B1'.

screen-input = 1.

MODIFY SCREEN.

ENDIF.

IF screen-group1 EQ 'B2'.

screen-input = 0.

screen-invisible = 1.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ELSE.

LOOP AT SCREEN.

IF screen-group1 EQ 'B1'.

screen-input = 0.

screen-invisible = 1.

MODIFY SCREEN.

ENDIF.

IF screen-group1 EQ 'B2'.

screen-input = 1.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

hope this will solve ur issue

Manohar2u
Active Contributor
0 Kudos

Former Member
0 Kudos

Hi

Check This

if sy-tcode = 'TX1'.

loop at screen.

if screen-group1 = 'p1'.

screen-input = 1.

modify screen.

elseif screen-group1 = 'p2'.

screen-input = 0.

screen-invisible = 1.

modify screen.

endif.

endloop.

elseif sy-tcode = 'TX2'.

loop at screen.

IF screen-group1 = 'p1'.

screen-input = 1.

modify screen.

elseif screen-group1 = 'p2'.

screen-input = 0.

screen-invisible = 1.

modify screen.

endif.

endloop.

endif.

Regards

Gregory

<b><REMOVED BY MODERATOR></b>

Message was edited by:

Alvaro Tejada Galindo