08-29-2008 9:08 AM
In my requirement in the selection screen have to enter the company code,fiscal year and posting date.Posting date should be got based on the fiscal year.Have done coding to fetch the posting date.Now how to bring this posting date to the selection screen
08-29-2008 9:20 AM
Hi Saranya,
You can do like this.
At selection-screen on field fiscal_year.
* Get Posting date based on fiscal year entered on the screen.
Move it to w_posting_date.
set one flag variable. w_flag = 1.
At selectin-screen .
if w_flag = 1.
loop at screen.
if screen-name = 'POSTING_DATE'.
Posting_date = w_posting_date. "Pass the value here.
Modify screen.
endif.
endloop.
endif.
Regards,
Rajitha.
08-29-2008 9:09 AM
08-29-2008 9:11 AM
Hi,
You can put your select query for posting date in INITIALIZATION event with target field posting date.
such that posting date field will have a default value when selection screen will be displayed.
One more way is that because you want posting date based on fiscal year, you can put your select query in AT SELECTION-SCREEN ON FIELD (<posting_date>)
Regards
Abhijeet
08-29-2008 9:14 AM
Hi,
Pass the value in the initialiaztion.
data:
w_date type d.
parameters:
p_date type d.
initialization.
select sinlgle date
from your table
into w_date.
if sy-subrc eq 0.
move w-date to p_date.
endif.
Now you can see the selected date on your selection screen.
Regards,
Rama.
08-29-2008 9:20 AM
Hi Saranya,
You can do like this.
At selection-screen on field fiscal_year.
* Get Posting date based on fiscal year entered on the screen.
Move it to w_posting_date.
set one flag variable. w_flag = 1.
At selectin-screen .
if w_flag = 1.
loop at screen.
if screen-name = 'POSTING_DATE'.
Posting_date = w_posting_date. "Pass the value here.
Modify screen.
endif.
endloop.
endif.
Regards,
Rajitha.