Notes
Notes - notes.io |
DATA:lt_wei TYPE TABLE OF zfsborst_wt.
"Double Click
UNASSIGN <fs_data>.
READ TABLE gt_data ASSIGNING <fs_data> INDEX rs_selfield-tabindex." INDEX row.
IF sy-subrc EQ 0.
CASE r_ucomm.
WHEN '&IC1'.
CASE rs_selfield-fieldname.
WHEN 'ZRFHA'.
"Transaction
CALL FUNCTION 'TB_DEAL_DISPLAY'
EXPORTING
i_bukrs = <fs_data>-zbukrs
i_rfha = <fs_data>-zrfha.
WHEN 'ZFAC_RFHA'.
"Facility Transaction
CALL FUNCTION 'TB_DEAL_DISPLAY'
EXPORTING
i_bukrs = <fs_data>-zbukrs
i_rfha = <fs_data>-zfac_rfha.
WHEN 'ZRANL'.
"Class ID
* CALL FUNCTION 'ZFSBORFM_DISPLAY'
* EXPORTING
* iv_bukrs = <fs_data>-zbukrs
* iv_ranl_d = <fs_data>-zranl.
CALL FUNCTION 'SECURITY_DIALOG'
EXPORTING
i_security_number = <fs_data>-zranl
i_dialog_mode = 'DISP'
* I_FIX_NUMBER = ' '
i_mode_changeable = 'X'
EXCEPTIONS
invalid_security_number = 1
invalid_parameter_combination = 2
OTHERS = 3.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
WHEN 'ZKONTRH'.
"Facility Transaction
CALL FUNCTION 'FTR_PARTNER_DISPLAY'
EXPORTING
pi_partner_id = <fs_data>-zkontrh
* PI_PARTNER_ROLE = 'TR0151'
* PI_COMPANYCODE = ' '
EXCEPTIONS
partner_not_found = 1
OTHERS = 2.
WHEN 'WEI_RATE_C'.
CLEAR: lt_wei.
IF <fs_data>-zranl IS INITIAL.
lt_wei = gt_wt.
DELETE lt_wei WHERE zrfha <> <fs_data>-zrfha.
ELSE.
lt_wei = gt_wt_sec.
DELETE lt_wei WHERE zranl <> <fs_data>-zranl.
ENDIF.
"Weighted Cal FM
** CALL FUNCTION 'ZFSBORFM_WT'
** EXPORTING
** im_bukrs = <fs_data>-zbukrs
** im_rfha = <fs_data>-zrfha
** im_ranl = <fs_data>-zranl
** im_oamt = <fs_data>-open_amt
** im_wt_type = 'C'
** im_bp_name = <fs_data>-zbp_desc
** im_bp = <fs_data>-zkontrh
** im_prd = <fs_data>-zsgsart
** im_prd_desc = <fs_data>-zprd_desc
** TABLES
** rt_date = p_date
** it_wei = lt_wei.
ENDCASE.
ENDCASE.
ENDIF.
"Save Data
* CASE e_salv_function.
* WHEN 'SAVE_DATA'.
** PERFORM save_data.
* WHEN OTHERS.
* ENDCASE.
ENDFORM. "user_command
*&---------------------------------------------------------------------*
*& Form DATES
*&---------------------------------------------------------------------*
FORM dates .
DATA: lv_sdate TYPE sy-datum,
lv_edate TYPE sy-datum.
lv_sdate = p_year && p_mon && '01'.
lv_edate = p_year && p_mon && '01'.
CALL FUNCTION 'RP_LAST_DAY_OF_MONTHS'
EXPORTING
day_in = lv_edate
IMPORTING
last_day_of_month = lv_edate.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
p_date-low = lv_sdate. "" Start DAte
p_date-high = lv_edate. "" End Date
p_date-sign = 'I'.
p_date-option = 'BT'.
APPEND p_date.
gv_mdays = p_date-high - p_date-low + 1. "" No . Of Days
gv_snext = p_date-high + 1.
gv_sprev = p_date-low - 1.
DATA : lv_yearchk TYPE numc4,
lv_sfdate TYPE dats,
lv_efdate TYPE dats.
CASE p_mon .
WHEN '01' OR '02' OR '03'.
lv_yearchk = p_year - 1 .
lv_sfdate = lv_yearchk && '04' && '01' .
lv_efdate = p_year && '03' && '31' .
c_365 = lv_efdate - lv_sfdate + 1 .
c_36500 = c_365 * 100.
WHEN OTHERS.
lv_yearchk = p_year + 1 .
lv_sfdate = p_year && '04' && '01' .
lv_efdate = lv_yearchk && '03' && '31' .
c_365 = lv_efdate - lv_sfdate + 1 .
c_36500 = c_365 * 100.
ENDCASE.
ENDFORM. " DATES
FORM fcat USING p_fieldname p_name. "CHANGING lt_fcat. "LIKE LINE OF LT_FCAT.
* DATA: ls_fcat TYPE zfsborst_alv_fcat.
CLEAR ls_fcat.
"Fieldcatalog
ls_fcat-fieldname = p_fieldname.
IF p_name IS NOT INITIAL.
ls_fcat-seltext_l = p_name.
ls_fcat-seltext_m = p_name.
ls_fcat-seltext_s = p_name.
ENDIF.
CASE ls_fcat-fieldname.
"Assign Hotspot to Fields in ALV
WHEN 'ZRANL' OR 'ZRFHA' OR 'ZFAC_RFHA' OR 'ZKONTRH'.
ls_fcat-hotspot = 'X'.
ls_fcat-no_zero = 'X'.
WHEN 'WEI_RATE_C'.
* ls_fcat-hotspot = 'X'.
ls_fcat-decimals_out = 4.
WHEN 'ZE_RATE' OR 'ZE_SPREAD' OR 'ZE_FINAL' OR 'MRG_RATE' OR 'LBR_RATE'.
ls_fcat-decimals_out = 4.
ENDCASE.
APPEND ls_fcat TO lt_fcat.
CLEAR ls_fcat.
ENDFORM.
*&---------------------------------------------------------------------*
*& Form STYLE_COLOR
*&---------------------------------------------------------------------*
*& text
*&---------------------------------------------------------------------*
*& --> p1 text
*& <-- p2 text
*&---------------------------------------------------------------------*
FORM style_color CHANGING p_color TYPE lvc_t_scol.
CLEAR gt_color.
gt_color = VALUE #( ( fname = 'WEI_RATE_C' color-col = 5 color-int = 0 )
( fname = 'WEI_INT_C' color-col = 5 color-int = 0 )
( fname = 'WEI_C' color-col = 5 color-int = 0 )
( fname = 'OPEN_AMT' color-col = 7 color-int = 0 )
( fname = 'ADD_AMT' color-col = 7 color-int = 0 )
( fname = 'RED_AMT' color-col = 7 color-int = 0 )
( fname = 'CLOSE_AMT' color-col = 7 color-int = 0 )
( fname = 'ZE_RATE' color-col = 1 color-int = 0 )
( fname = 'ZE_SPREAD' color-col = 1 color-int = 0 )
( fname = 'ZE_FINAL' color-col = 1 color-int = 0 ) ).
p_color = gt_color[].
CLEAR gt_color.
ENDFORM.
*&---------------------------------------------------------------------*
*& Form MONTH_F4
*&---------------------------------------------------------------------*
*& text
*&---------------------------------------------------------------------*
*& --> p1 text
*& <-- p2 text
*&---------------------------------------------------------------------*
FORM month_f4 .
DATA: lv_id TYPE vrm_id,
lt_values TYPE vrm_values.
"Month
SELECT mnr, ktx
FROM t247
INTO TABLE @DATA(lt_mon)
WHERE spras = @sy-langu.
IF sy-subrc = 0.
lt_values = CORRESPONDING #( lt_mon MAPPING key = mnr
text = ktx ) .
ENDIF.
"DD Values
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'P_MON'
values = lt_values.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
ENDFORM.
*&---------------------------------------------------------------------*
*& Form HIDE
*&---------------------------------------------------------------------*
*& text
*&---------------------------------------------------------------------*
*& --> p1 text
*& <-- p2 text
*&---------------------------------------------------------------------*
FORM hide .
LOOP AT SCREEN .
IF screen-group1 = 'IMP'.
screen-active = 0.
ENDIF.
* IF p_str = abap_true AND screen-group1 = 'SC1'.
* screen-active = 0.
* ENDIF.
MODIFY SCREEN.
ENDLOOP.
REPLACE '-T' WITH space INTO p_l1.
ENDFORM.
|
Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 12 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team