SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Месяц и год в drildown списке на селекционном экране



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP
View previous topic :: View next topic  
Author Message
Leshik
Участник
Участник



Joined: 14 Nov 2007
Posts: 8

PostPosted: Wed Dec 26, 2007 11:54 am    Post subject: Месяц и год в drildown списке на селекционном экране Reply with quote

Может кто-нибудь подсказать, как решить вопрос из темы?
Также мне надо получить первый и последний день месяца в программе и отобразить справа на селекционном экране.

Например:
Месяц: Февраль Год:2008 - '01.02.2008 - 29.02.2008'.
Back to top
View user's profile Send private message
july7
Старший специалист
Старший специалист



Joined: 10 Oct 2007
Posts: 109
Location: Киров

PostPosted: Wed Dec 26, 2007 3:03 pm    Post subject: Reply with quote

Эти ссылки Вам помогут:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a07a330f-126c-2910-c684-d2a45f0f37dd
http://sapboard.ru/forums/viewtopic.php?t=32610 (примеры в SAP: DEMO_DYNPRO_DROPDOWN_LISTBOX, RSDEMO_DROPDOWN_LISTBOX)
http://www.sapnet.ru/viewtopic.php?t=1167
Back to top
View user's profile Send private message
Lord
Профессионал
Профессионал



Joined: 10 Sep 2007
Posts: 168

PostPosted: Wed Dec 26, 2007 10:31 pm    Post subject: Reply with quote

Пример с sdn

Code:
TYPE-POOLS: vrm.

parameters : p_month(2) type n as listbox visible length 10,
p_year(4) type n as listbox visible length 10.

DATA : W_DATE type d, w_ldate type d.

initialization.

  perform user_drop_down_list_fordt.
  perform user_drop_down_list_foryr.

start-of-selection.

  concatenate p_year p_month '01' into w_date.

  call function 'BKK_GET_MONTH_LASTDAY'
    exporting
      i_date = w_date
    IMPORTING
      E_DATE = w_ldate.

  write /: w_date,w_ldate.

*build user_drop_down_list

form user_drop_down_list_fordt.

  data: name type vrm_id,
           list type vrm_values,
           value like line of list.

  data: t_months type t247 occurs 0 with header line.

  clear list. refresh list.
  name = 'P_MONTH'.

  select * into table t_months
    from t247 where spras eq 'EN'.

  sort t_months ascending by mnr.

  loop at t_months.
    clear value.
    value-key = t_months-mnr.
    value-text = t_months-ltx.
    append value to list.
  endloop.

*Set the values
  call function 'VRM_SET_VALUES'
    exporting
      id = name
      values = list.

endform.

*for year...
form user_drop_down_list_foryr.

  data: name type vrm_id,
           list type vrm_values,
           value like line of list.

  clear list. refresh list.
  name = 'P_YEAR'.

  do 50 times.
    value-key = 1980.
    value-key = value-key + sy-index.
    append value to list.
  enddo.

*Set the values
  call function 'VRM_SET_VALUES'
    exporting
      id = name
      values = list.

endform.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.