cancel
Showing results for 
Search instead for 
Did you mean: 

selection-screen

Former Member
0 Kudos

Hi,

I have a requirement where in which if the values for 2 fields in selection-screen is entered,the 3rd field should be mandatory.Can anyone tell me the logic for this?

Regards,

Hema

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Abaper can control screen layout by Loop At Screen ... EndLoop. I think you need customize standard program by Modification.

Sample Code:

-


...

Select-Options: S_WAERS for IT_BKPF-WAERS Modif ID M8.

Include YFI_INCLUDE_PRINTING_CN.

DATA: G_SFName(30) type C,

G_FM_Name type RS38L_FNAM,

G_SAKNR type char10,

G_Page type I.

DATA: G_RepType type char3 Value 'VRL'.

Initialization.

Import G_RepType from Memory ID 'MI_REPTYPE_RPCN'.

If G_RepType EQ 'VRL'.

SY-Title = 'Voucher (Loc. Curr.)'.

S_WAERS = 'IEQRMB'.

Else.

SY-Title = 'Voucher(Fgr. Curr.)'.

EndIf.

At Selection-Screen Output.

LOOP AT SCREEN.

IF Screen-Group1 = 'M8 ' And G_RepType EQ 'VRL'.

Screen-Active = '0'.

ELSE.

Screen-Active = '1'.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

Start-Of-Selection.

...

-


Former Member
0 Kudos

U can do this by inplementing an user exit with the help of abaper giving him the spec like

If value in field 1 and fileld 2 is not blank then prmpt an error message saying that entry in field 3 is mandatory.

Reward if helpful