2008 Oct 26 8:24 AM
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
2008 Oct 26 10:31 AM
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@
2008 Oct 26 9:06 AM
in PBO.
if sy-tcode = PA40.
LOOP AT SCEEN.
<change the parameters u required>
ENDLOOP.
regards,
santosh
2008 Oct 26 10:31 AM
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@
2008 Oct 26 11:31 AM
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.