‎2009 Jul 27 4:27 AM
I wrote the following PBO:
LOOP AT SCREEN.
IF screen-name = 'field1'.
screen-required = '1'. "set as mandatory
ENDIF.
MODIFY SCREEN.
ENDLOOP.
Will this automatically return error if it's left empty when it is executed?
Or I have to write the following in PAI:
IF field1 IS INITIAL.
MESSAGE e020.
‎2009 Jul 27 4:32 AM
Hi,
You just need to add it in the PBO. Nothing needs to be added in the PAI.
‎2009 Jul 27 4:38 AM
You have to write it in PBO.
LOOP AT SCREEN.
IF screen-name = 'field1'.
screen-required = '1'. "set as mandatory
ENDIF.
MODIFY SCREEN.
ENDLOOP.
IF field1 IS INITIAL.
MESSAGE e020.
ENDIF.
‎2009 Jul 27 4:45 AM
I added the LOOP AT SCREEN part on PBO. I haven't really do anything in PAI yet. But when I execute the screen, there's no response. Anything I need to put in PAI in order to test that out? If I need to put that part of
IF field1 IS INITIAL.
message e021.
I do not see why I need to put that screen-required = 1 at PBO.
‎2009 Jul 27 4:49 AM
Hi,
If you want to check the mandatory-check on some button click, then you have too write in PAI as
CASE sy-ucomm.
WHEN 'F_BUTTON'.
IF field1 IS INITIAL.
message e021.
ENDIF.
ENDCASEThanks,
Sri.
‎2009 Jul 27 4:56 AM
Hi Sri,
In that case, do I still need to write screen-required = '1' at PBO?
‎2009 Jul 27 4:57 AM
>
> Hi Sri,
>
> In that case, do I still need to write screen-required = '1' at PBO?
Hi,
No need to write it in PBO again.
Thanks,
Sri.
‎2009 Jul 27 3:59 PM
Hi, I solved my problem by setting 'required' at screen painter. With this, I do not need to write any codes in PBO nor PAI.