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

Initialization for Date Fields on PNP Selection screen

Former Member
4,122

Hi All,

I need to initialize the date on the LDB PNP selection screen to today.

I gave the following code in the Initialization

  • Set the Key Date to Today

pnptimr1 = 'X'.

but this doesn't get reflected on the selection screen.

Please suggest.

Thanks,

Suryakiran D.

1 ACCEPTED SOLUTION
Read only

Former Member
2,348

Hi Suryakiran,

Try this way it is working for me.


  INITIALIZATION.
  <b>pnptimed ='D'.</b> 
  

Hope this solves your issue.

Thanks&Regards,

Siri.

11 REPLIES 11
Read only

Former Member
0 Likes
2,348

Hi Kiran,

Do like this....

tables:pernr.

at selection-screen output.

PNPTIMR6 = ' '.

pnptimr1 = 'X'.

Thanks

Eswar

Read only

0 Likes
2,348

If we do this at selection screen output,

even if i select someother date, it will be reset back to today...

I just want it as the defualt one, not hte hardcoded one...

Read only

Former Member
0 Likes
2,348

For select-options initialize as:

select-options: s_docdat for vbak-erdat.

initialization.

move 'I' to s_docdat-sign.

move 'BT' to s_docdat-option.

move sy-datum to s_docdat-high.

subtract 7 from sy-datum.

move sy-datum to s_docdat-low.

append s_docdat.

Read only

0 Likes
2,348

I dont need to give a select option. PNP LDB provides the dates selection block.

I just need to initialize them.

Read only

0 Likes
2,348

Hi SuKi,

Use this

at selection-screen output.

loop at screen.

if screen-name = 'PNPTIMR6'.( I mean if this is the

default RB clicked)

clear : PNPTIMR6.

PNPTIMR1 = 'X'.

modify screen.

endif.

endloop.

Regards,

GSR.

Read only

0 Likes
2,348

Srinivas garu,

This doens't help.

I just wnat to default, not hardcode.

Read only

Former Member
0 Likes
2,348

Use following

At selection-screen output.

PNPTIMR2 = 'X'.

PNPTIMR6 = ' '.

ensure u have another event starting in ur Z program.

Read only

Former Member
0 Likes
2,348

Hi Suryakiran,

1. Only as Default.

2. Use this.

DATA : firstover TYPE c.

AT SELECTION-SCREEN OUTPUT.

IF firstover = ''.

firstover ='X'.

pnptimr6 = ''.

pnptimr1 = 'X'.

ENDIF.

regards,

amit m.

Read only

Former Member
0 Likes
2,348

Hi,

1. Is the problem solved?

regards,

amit m.

Read only

Former Member
0 Likes
2,348

Try the following

1. U can try using event LOAD OF PROGRAM instead of Initialize.

regards,

Sumeet Mishra

Read only

Former Member
2,349

Hi Suryakiran,

Try this way it is working for me.


  INITIALIZATION.
  <b>pnptimed ='D'.</b> 
  

Hope this solves your issue.

Thanks&Regards,

Siri.