2008 Jul 09 10:17 AM
HI friends,
I have to make the seletion screen field as mandatory in SAP-Query.
Please let me know the procedure to make field as mandatory or Let me know how to validate the selection-screen field in Query.
Thanks in Advance,
Ravi
2008 Jul 09 10:22 AM
Hi,
U can write:
select-options : field like type OBLIGATORY
This will make field mandatory.
2008 Jul 09 10:20 AM
report ztest message-id zmsg.
tables :mara .
select-options:s_matnr for mara-matnr .
data: v_matnr like mara-matnr.
at selection-screen.
select matnr from mara into v_matnr where matnr in s_matnr.
if sy-subrc ne 0.
message e000 with 'enter a valid material number'.
endif.
2008 Jul 09 10:22 AM
Hi,
U can write:
select-options : field like type OBLIGATORY
This will make field mandatory.
2008 Jul 09 10:35 AM
To make a field mandatory in Sap query (SQ01) create a variant and in that variant make the field as required field (set the check box Required field). Use this variant whenever u execute the query.
Regards,
Joy.
2012 Sep 24 12:13 PM
Go to SQ02
Select your Infoset-->Change
On next Screen.
Select GoTo->Code->Initialization.
Write there code
LOOP AT SCREEN.
IF screen-name EQ 'SP$00004'.
screen-required = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
2024 May 31 9:12 PM
Thank you, this works, however it removes SELECTION BLOCKS. Which the users do not like.
I'm working on another solution. If you have an enhancement to this process, please share. I will share when the solution is found.