UKM_CASE , Belgelenen Kredi Kararına Buton Ekleme
Belgelenen kredi kararları ekranına eposta gönderme düğmesi eklenmesi.
1- Olayda kullanılabilir işlevler tablosuna scmgfunction tablosuna satır eklenecek : ZNOTES_MAIL (F)
2- Olay: Profilin kullanılabilir işlevleri SCMGFUNCPROFF tablosuna menü için bir satır eklenecek : ZNOTES_MAIL
Profil FIN_DCD
3-SE18 `den SCMG_CASE_FCODE_S implement edilecek.
IMPLEMENT name : ZNOTES_SEND_EMAIL
Filtre ZNOTES_MAIL ( Tablolara Eklenen Menü filtreye eklenecek)4- execute methodunda GUID kullanılarak gerekli notlar alınabilir.
method if_ex_scmg_case_fcode_s~execute.
data: lv_guidid type SCMG_CASE_GUID.
data: lv_name type tdobname.
data: lt_poid type srm_list_poid .
data: ls_poid type srmpoid .
data: lt_selections type standard table of thead.
data: lt_selections_all type standard table of thead.
data: ls_selections type thead.
data: iref_poid type ref to if_srm_poid.
data: lt_lines type standard table of tline.
data: lt_mail_content type zXXXX_t_notesemail.
data: ls_mail_content type zXXXX_s_notesemail.
data: ls_DCD_ATTR type UKM_DCD_ATTR.
****************************************************************************
****************************************************************************
lv_guidid = im_case->g_backend->get_guid( ).
* Get POID
iref_poid = im_case->g_backend->if_scmg_case_read~get_note_poid( ) . " GET_POID( ).
* Call method at POID
lt_poid = iref_poid->get_sp_poid( ).
SELECT SINGLE * into ls_DCD_ATTR from UKM_DCD_ATTR where CASE_GUID = lv_guidid.
* Belgeye ait bilgiler ls_DCD_ATTR içindedir.
refresh lt_selections_all.
loop at lt_poid into ls_poid.
lv_name = ls_poid-value && `*`.
refresh lt_selections.
call function `SELECT_TEXT`
exporting
* CLIENT = SY-MANDT
* DATABASE_ONLY = ` `
* TEXTMEMORY_ONLY = ` `
object = `SCMG_CASE`
name = lv_name
* IMPORTING
* ENTRIES =
tables
selections = lt_selections
exceptions
wrong_access_to_archive = 1
others = 2.
if sy-subrc <> 0.
* Implement suitable error handling here
endif.
append lines of lt_selections to lt_selections_all.
endloop.
sort lt_selections_all by tdfdate descending tdftime descending.
loop at lt_selections_all into ls_selections.
refresh lt_lines.
call function `READ_TEXT`
exporting
* CLIENT = SY-MANDT
id = ls_selections-tdid
language = ls_selections-tdspras
name = ls_selections-tdname
object = ls_selections-tdobject
* ARCHIVE_HANDLE = 0
* LOCAL_CAT = ` `
* IMPORTING
* HEADER =
* OLD_LINE_COUNTER =
tables
lines = lt_lines
exceptions
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
others = 8.
if sy-subrc <> 0.
* Implement suitable error handling here
endif.
clear ls_mail_content.
move-corresponding ls_selections to ls_mail_content .
ls_mail_content-lines[] = lt_lines[].
append ls_mail_content to lt_mail_content.
endloop.
break-point.
if lt_mail_content[] is not INITIAL.
* Eposta gönderme kodları ilave edilebilir.
endif.
endmethod.
data: lv_guidid type SCMG_CASE_GUID.
data: lv_name type tdobname.
data: lt_poid type srm_list_poid .
data: ls_poid type srmpoid .
data: lt_selections type standard table of thead.
data: lt_selections_all type standard table of thead.
data: ls_selections type thead.
data: iref_poid type ref to if_srm_poid.
data: lt_lines type standard table of tline.
data: lt_mail_content type zXXXX_t_notesemail.
data: ls_mail_content type zXXXX_s_notesemail.
data: ls_DCD_ATTR type UKM_DCD_ATTR.
****************************************************************************
****************************************************************************
lv_guidid = im_case->g_backend->get_guid( ).
* Get POID
iref_poid = im_case->g_backend->if_scmg_case_read~get_note_poid( ) . " GET_POID( ).
* Call method at POID
lt_poid = iref_poid->get_sp_poid( ).
SELECT SINGLE * into ls_DCD_ATTR from UKM_DCD_ATTR where CASE_GUID = lv_guidid.
* Belgeye ait bilgiler ls_DCD_ATTR içindedir.
refresh lt_selections_all.
loop at lt_poid into ls_poid.
lv_name = ls_poid-value && `*`.
refresh lt_selections.
call function `SELECT_TEXT`
exporting
* CLIENT = SY-MANDT
* DATABASE_ONLY = ` `
* TEXTMEMORY_ONLY = ` `
object = `SCMG_CASE`
name = lv_name
* IMPORTING
* ENTRIES =
tables
selections = lt_selections
exceptions
wrong_access_to_archive = 1
others = 2.
if sy-subrc <> 0.
* Implement suitable error handling here
endif.
append lines of lt_selections to lt_selections_all.
endloop.
sort lt_selections_all by tdfdate descending tdftime descending.
loop at lt_selections_all into ls_selections.
refresh lt_lines.
call function `READ_TEXT`
exporting
* CLIENT = SY-MANDT
id = ls_selections-tdid
language = ls_selections-tdspras
name = ls_selections-tdname
object = ls_selections-tdobject
* ARCHIVE_HANDLE = 0
* LOCAL_CAT = ` `
* IMPORTING
* HEADER =
* OLD_LINE_COUNTER =
tables
lines = lt_lines
exceptions
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
others = 8.
if sy-subrc <> 0.
* Implement suitable error handling here
endif.
clear ls_mail_content.
move-corresponding ls_selections to ls_mail_content .
ls_mail_content-lines[] = lt_lines[].
append ls_mail_content to lt_mail_content.
endloop.
break-point.
if lt_mail_content[] is not INITIAL.
* Eposta gönderme kodları ilave edilebilir.
endif.
endmethod.