Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problem in selection screen

Former Member
0 Likes
469

SELECTION-SCREEN : BEGIN OF BLOCK BLOCK2.

SELECTION-SCREEN : BEGIN OF BLOCK BLOCK1 WITH FRAME TITLE TEXT-000.

SELECT-OPTIONS :S_OBJID FOR HRP1000-OBJID ,"MATCHCODE OBJECT PLOM NO INTERVALS ," OBLIGATORY PLOM.

date for HRT1035-EVDAT OBLIGATORY.

PARAMETERS:A1 RADIOBUTTON GROUP z1 DEFAULT 'X',

B1 RADIOBUTTON GROUP z1 ,

C1 RADIOBUTTON GROUP z1,

d1 RADIOBUTTON GROUP z1,

E1 RADIOBUTTON GROUP z1 .

SELECTION-SCREEN : END OF BLOCK BLOCK1.

SELECTION-SCREEN : END OF BLOCK BLOCK2.

This is my selection screen.

other event.

at selection-screen output.

date-sign = 'I'.

DATE-OPTION = 'BT'.

date-low = sy-datum.

date-low+6(2) = '01'.

CALL FUNCTION 'DATE_GET_MONTH_LASTDAY'

EXPORTING

I_DATE = sy-datum

IMPORTING

E_DATE = date-high.

append date.

at selection-screen on value-request for S_OBJID-low .

call function 'RH_OBJID_REQUEST' "XMKBCEK002468

exporting

plvar = '01'

otype = 'ZS'

dynpro_repid = sy-repid

dynpro_dynnr = sy-dynnr

  • dynpro_plvarfield = 'PPHDR-PLVAR'

  • dynpro_otypefield = 'PPHDR-OTYPE'

dynpro_searkfield = 'S_OBJID-LOW'

importing

sel_object = f4_objec

exceptions

cancelled = 1

wrong_condition = 2

nothing_found = 3

illegal_mode = 4

internal_error = 5

others = 6.

if sy-subrc = 0.

move f4_objec-realo to S_OBJID-LOW.

endif.

Problem:In the selection screen current date is coming.

when ever i press enter each time date append in the selection screen.

Plz help.

3 REPLIES 3
Read only

Former Member
0 Likes
405

Why you don't check dat is initial before append

if date[] is initial.
append date.
endif.

Enjoy

Read only

0 Likes
405

Thank u.

problem is solved

Read only

Former Member
0 Likes
405

Hi,

Write the logic of date i.e

*initialization.*
date-sign = 'I'.
DATE-OPTION = 'BT'.
date-low = sy-datum.
date-low+6(2) = '01'.
CALL FUNCTION 'DATE_GET_MONTH_LASTDAY'
EXPORTING
I_DATE = sy-datum
IMPORTING
E_DATE = date-high.
append date.

Regards,

Madhukar Shetty