Application Development and Automation 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: 
Read only

Hiding Fields in Module Pool Infotype Based on Transaction

Former Member
0 Likes
968

Hi Experts,

I have an custom infotype developed for this infotype

if it is called through PA30 the fields should be editable and if the same is called through an action from the transaction PA40 the fields should be non-editable.

Please advice what changes I need to do in the module pool program of the infotype.

Regards,

IFF

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
644

Hi IFF,

Try this

if sy-tcode = PA30.

LOOP AT SCEEN.

screen-input = 1.

screen-action = 1.

screen-output = 1.

Modify Screen. " very important

ENDLOOP.

endif.

if sy-tcode = PA40.

LOOP AT SCEEN.

screen-input = 0.

screen-action = 0.

screen-output = 1.

Modify Screen. " very important

ENDLOOP.

endif.

Cheers!!

Venk@

3 REPLIES 3
Read only

SantoshKallem
Active Contributor
0 Likes
644

in PBO.

if sy-tcode = PA40.

LOOP AT SCEEN.

<change the parameters u required>

ENDLOOP.

regards,

santosh

Read only

Former Member
0 Likes
645

Hi IFF,

Try this

if sy-tcode = PA30.

LOOP AT SCEEN.

screen-input = 1.

screen-action = 1.

screen-output = 1.

Modify Screen. " very important

ENDLOOP.

endif.

if sy-tcode = PA40.

LOOP AT SCEEN.

screen-input = 0.

screen-action = 0.

screen-output = 1.

Modify Screen. " very important

ENDLOOP.

endif.

Cheers!!

Venk@

Read only

Former Member
0 Likes
644

See basically the infotype calling can happen through PA30/ PA40

So in order to run the actions it has to be from PA40 only . Now you want the fields of this infotype to be in display mode or indirectly you dont want to run the actions at all by changing some values //reason y u want to keep the values in display mode .

So its not in U R CUSTOM infotype where u need to code this but in a place where u can control the actions and tcode.

remember for Infotype's in HR there will be a include

ZXPADU01 -->to handle PBO processing

ZXPADU02 --> to handle PAI "

So in order to make u r criteria work u need to carry the code in ZXPADU01.

Assign all the fields of ur custom INFOTYPE '9xxx' TO A SCREEN GROUP SAY 001. " this is very important ,hope u r clear on this

In ZXPADU01.

CASE INFOTYPE .

when '9XXX' . "--->UR CUSTOM INFOTYPE NO

If sy-tcode = 'PA40'

loop at screen .

if screen-group1 = '001'.

screen-input = 0. "--> to make it non editable.

modify screen.

endif.

endloop.

endif. "end pa40

If sy-tcode = 'PA30'

loop at screen .

if screen-group1 = '001'.

screen-input = 1. "--> to show it editable.

modify screen.

endif.

endloop.

endif. "end pa30

endcase.

br,

Vijay.