2005 Nov 02 8:37 AM
Hi all,
I modified the IE02 transaction by adding 5 custom fields
to the screen SAPLITO0 1050.
Now i have the requirement to disable these fields when eqtyp is 'M'.
Is there any userexit available for this purpose or i have to modify the PBO module of the screen.
Any help will be appreciated.
regards
chandu.
2005 Nov 02 8:45 AM
Hi Chandu,
you have to write a simple code under at user-command, in abap editor. if xxxxxx = ' '
disabap
elseif xxxx 'x'
enable.
endif.
and you have to uncomment in PAI.
REGARDS
VIVEK
Hi all,
I modified the IE02 transaction by adding 5 custom fields
to the screen SAPLITO0 1050.
Now i have the requirement to disable these fields when eqtyp is 'M'.
Is there any userexit available for this purpose or i have to modify the PBO module of the screen.
Any help will be appreciated.
regards
chandu.
2005 Nov 02 8:45 AM
Hi Chandu,
you have to write a simple code under at user-command, in abap editor. if xxxxxx = ' '
disabap
elseif xxxx 'x'
enable.
endif.
and you have to uncomment in PAI.
REGARDS
VIVEK
2005 Nov 02 8:56 AM
Hi,
Its a predefined program and for the screen i have a lot of PBO and PAI modules.And where I Should insert the code.
Is there any user exit available?
Could you please more eloberate.
regards
chandu.
2005 Nov 02 10:02 AM
2005 Nov 02 10:03 AM
Hi sai,
You can code in PBO Module DYNPRO_INIT_1050 of the screen 1050. Take a look at subroutine DYNPRO_FIELD_1050 in the module.
Some of the screen modifications take place here
You can assign a screen group (Group2) to all 5 custom fields that you have added and then can call subroutine DYNPRO_FIELD_MOD_GROUP2 some what like the following,
PERFORM DYNPRO_FIELD_MOD_GROUP2
USING ITO0C_SCREEN_GROUP-INACTIVE "Replace this with
"your screen group name
ITO0C_SCREEN_FIELD-INACTIVE "To disable fields
ITOB_BOOL-FALSE. "This is alway false otherwise
"it will make all other fields
"inactive
Hope this helps..
IF <your condition> EQ 'M'.
PERFORM DYNPRO_FIELD_MOD_GROUP2
USING <your screen group2>
ITO0C_SCREEN_FIELD-INACTIVE "Keep this
ITOB_BOOL-FALSE. "Keep this
ENDIF.
Sri
Message was edited by: Srikanth Pinnamaneni
2005 Nov 02 10:53 AM
Hi sri,
Thanks alot for your valuable reply.
I have one small doubt.
My condition here is ITOB-eqtyp = 'M'.
Can i specify directly in the module DYNPRO_FIELD_1050 or I should create new one some thing like.
PERFORM DYNPRO_FIELD_1050 USING ITOB-EQTYP." new module
FORM DYNPRO_FIELD_1050
USING
VALUE(I_EQTYP) LIKE ITOB-EQTYP.
if I_EQTYP = 'M'.
PERFORM DYNPRO_FIELD_MOD_GROUP2 USING ITO0C_SCREEN_GROUP-DISABLE " My group2 for all 5 fields ITO0C_SCREEN_FIELD-INACTIVE ITOB_BOOL-FALSE.
Please correct me.
Thanks alot for ur help
regards.
Chandu
2005 Nov 02 11:01 AM
Hi Sai,
If it is just based on EQTYP = 'M' and then just a routine call like the following,
IF ITOB-EQTYP EQ 'M'.
PERFORM DYNPRO_FIELD_MOD_GROUP2....
ENDIF.
then I suggest you specify it directly in the module.
If you want to write it in your own subroutine then you have to declare an include (because while creating the subroutine it will prompt you for an include) so dont go for it.
Otherwise create an include with your namespace (Z/Y/Other) and write the above code directly inside the include. No subroutine, just include the new include in the Module. In this case, you can name the include as ZLITO0O05 for example.
Sri
Message was edited by: Srikanth Pinnamaneni
2005 Nov 02 3:11 PM
Hi Sri,
for screen SAPLITO0 1050 the logic you gave me its worked.
But for screen SAPLITO0 1022 there is no specific dynpro setting module like MODULE DYNPRO_INIT_1022.If i want to disable fields for this screen 1022 then where I should insert the logic.
Waiting for your valuable reply,
regards
Chandu.
2005 Nov 03 5:12 AM
Hi Sai,
For screen 1022, You can do one of the following two things,
One - Place your logic inside module DYNPRO_INIT_SUB_ALL with an IF condition around sy-dynnr like,
IF sy-dynnr EQ '1022'.
****Your screen modification logic here
ENDIF.
Two - Create a new Module DYNPRO_INIT_1022 in the screen 1022 itself (double click and create it in the include LITO0O01) and then place your screen modification here. This way you do not have to worry about SY-DYNNR. I suggest this approach.
Hope this helps..
Sri
2005 Nov 03 7:24 AM
Hi Sri,
I tried both ways but its not working.Kindly help.
When I try to debug the control not reaching to the module.
Once again thanks alot for spending your valuable time.
regards
chandu.
Message was edited by: Sai Chand Pullepu
2005 Nov 03 8:13 AM
Hi Sai,
Did you place your PBO module in the screen 1022's flow
logic? The PBO logic should some what like following,
general dynpro settings
MODULE DYNPRO_INIT_SUB_ALL.
specific dynpro settings
MODULE DYNPRO_INIT_1022. "This is your module here..
restore active cursor position and set it
MODULE DYNPRO_CURSOR_SET.
And then in the PBO Module DYNPRO_INIT_1022 (which I assume is created in the include LIO0O01),
MODULE DYNPRO_INIT_1022 OUTPUT.
****Your screen modification logic here..
ENDMODULE.
Also did you activate/generate both the screen and program?
Please check that as well.
When you debug put a break-point in your PBO module and see whether the control goes there..
Hope this helps..
Also if possible could you give me the detailed steps that you have followed? (In case it doesnt workout after checking every thing)
Sri
2005 Nov 03 8:24 AM
Hi Sri,
Its worked The problem is i didnt activate properly.
Thanks once again fo your valuable help.
regards
chandu.