NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

FUNCTION zsgslcfm_display.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(IV_BUKRS) TYPE TB_BUKRS OPTIONAL
*" REFERENCE(IV_RFHA_D) TYPE VTBFHA-RFHA OPTIONAL
*" REFERENCE(IV_RANL_D) TYPE VTBFHA-RANL OPTIONAL
*" REFERENCE(IV_KONTRH_D) TYPE VTBFHA-KONTRH OPTIONAL
*" REFERENCE(IV_DOCUMENT_NO_D) TYPE BKPF-BELNR OPTIONAL
*" REFERENCE(IV_YEAR) TYPE BKPF-GJAHR OPTIONAL
*" REFERENCE(IV_RFHA_C) TYPE VTBFHA-RFHA OPTIONAL
*" REFERENCE(IV_RFHA_S) TYPE VTBFHA-RFHA OPTIONAL
*" REFERENCE(IV_RANL_C) TYPE VTBFHA-RANL OPTIONAL
*" REFERENCE(IV_KONTRH_C) TYPE VTBFHA-KONTRH OPTIONAL
*" REFERENCE(IV_DOCUMENT_NO_C) TYPE BKPF-BELNR OPTIONAL
*" RAISING
*" CX_SY_DYN_CALL_PARAM_NOT_FOUND
*"----------------------------------------------------------------------

*&---------------------------------------------------------------------*
*& Function Module Name: ZSGSLCFM_DISPLAY *&
*& Author Name : Shafquat Khan *&
*& Functional Name : Shafquat Khan *&
*& Module : SLC *&
*& Description : Transaction Display and Change *&
*& Request No : TRDK905864 *&
*& Transaction Code : *&
*&---------------------------------------------------------------------*
* Change History
*----------------------------------------------------------------------*
* Date | Programmer |Requestor |Request | Description |
* | | | | |
*&---------------------------------------------------------------------*

DATA: ls_vtbfha TYPE vtbfha,
ls_but100 TYPE but100,
ls_bkpf TYPE bkpf.
DATA: lv_activitytype LIKE vtbfhazu-sfgzustt,
lv_companycode LIKE vtbfha-bukrs,
lv_dealno LIKE vtbfha-rfha,
lv_dealtype LIKE vtbfha-sfgtyp,
lv_producttype LIKE vtbfha-sanlf.
DATA: lv_rltyp LIKE but100-rltyp VALUE 'TR0151'.


CONSTANTS: c_p510 TYPE vtbfha-sanlf VALUE '510',
c_p520 TYPE vtbfha-sanlf VALUE '520',
c_p530 TYPE vtbfha-sanlf VALUE '530',
c_p540 TYPE vtbfha-sanlf VALUE '540',
c_p550 TYPE vtbfha-sanlf VALUE '550',
c_p560 TYPE vtbfha-sanlf VALUE '560',
c_p580 TYPE vtbfha-sanlf VALUE '580',
c_p570 TYPE vtbfha-sanlf VALUE '570',
c_p740 TYPE vtbfha-sanlf VALUE '740',
c_p770 TYPE vtbfha-sanlf VALUE '770',
c_p790 TYPE vtbfha-sanlf VALUE '790',
c_a20 TYPE tb_sfgzuty VALUE '20',
c_a30 TYPE tb_sfgzuty VALUE '30',
c_chan TYPE char4 VALUE 'CHAN',
c_disp TYPE char4 VALUE 'DISP',
c_x TYPE char1 VALUE 'X',
c_voue TYPE at02a-trtyp VALUE 'VOUE'.

"This is the logic for Financial Transaction Change and Display
IF iv_bukrs IS NOT INITIAL AND ( iv_rfha_d IS NOT INITIAL OR iv_rfha_c IS NOT INITIAL OR iv_rfha_s IS NOT INITIAL ).

IF iv_rfha_d IS NOT INITIAL.
DATA(lv_rfha) = iv_rfha_d.
ELSEIF iv_rfha_c IS NOT INITIAL.
lv_rfha = iv_rfha_c.
ELSEIF iv_rfha_s IS NOT INITIAL.
lv_rfha = iv_rfha_s.
ENDIF.

SELECT SINGLE bukrs
rfha
sanlf
sfgtyp
FROM vtbfha INTO ( ls_vtbfha-bukrs , ls_vtbfha-rfha , ls_vtbfha-sanlf , ls_vtbfha-sfgtyp )
WHERE bukrs = iv_bukrs
AND rfha = lv_rfha.

SELECT SINGLE sfgzustt
FROM vtbfhazu
INTO lv_activitytype
WHERE bukrs = iv_bukrs
AND rfha = lv_rfha.

IF sy-subrc = 0.

lv_companycode = iv_bukrs.
lv_dealno = lv_rfha.
lv_producttype = ls_vtbfha-sanlf.
lv_dealtype = ls_vtbfha-sfgtyp.

CLEAR lv_rfha.
IF iv_rfha_d IS NOT INITIAL. "Display

CALL FUNCTION 'TB_TRANSACTION_TO_DISPLAY'
EXPORTING
activitytype = lv_activitytype
companycode = lv_companycode
dealno = lv_dealno
dealtype = lv_dealtype
producttype = lv_producttype
EXCEPTIONS
transaction = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.

ELSEIF iv_rfha_c IS NOT INITIAL. "Change
CALL FUNCTION 'TB_TRANSACTION_CALL'
EXPORTING
activitytype = lv_activitytype
companycode = lv_companycode
dealno = lv_dealno
dealtype = lv_dealtype
producttype = lv_producttype
transactiontype = 3
* EXCEPTIONS
* TRANSACTION = 1
* TRANSACTIONTYPE = 2
* OTHERS = 3
.
IF sy-subrc <> 0.
ENDIF.

ELSEIF iv_rfha_s IS NOT INITIAL.

CASE lv_producttype.
WHEN c_p510 OR c_p520 OR c_p530 OR c_p540 OR c_p550 OR c_p560 OR c_p580 OR c_p570 OR c_p740 OR c_p770 OR c_p790.
SELECT SINGLE memoryid_rfha, tcode FROM at02a
INTO @DATA(ls_at02a)
WHERE sanlfor = @lv_producttype
AND sfgtyp = @lv_dealtype
AND sfgzustt = @c_a20.
IF sy-subrc = 0.
PERFORM settle_dlg USING ls_at02a-memoryid_rfha 'TM_54' iv_rfha_s iv_bukrs.
ENDIF.
WHEN OTHERS.
SELECT SINGLE memoryid_rfha, tcode FROM at02a
INTO @ls_at02a
WHERE sanlfor = @lv_producttype
AND sfgtyp = @lv_dealtype
AND sfgzustt = @c_a30 "@lv_activitytype
AND trtyp = @c_voue.
IF sy-subrc = 0.
PERFORM settle_dlg USING ls_at02a-memoryid_rfha ls_at02a-tcode iv_rfha_s iv_bukrs.
ENDIF.
ENDCASE.
ENDIF.
ENDIF.


"This is the logic for Security ID Display and Change
ELSEIF iv_ranl_d IS NOT INITIAL OR iv_ranl_c IS NOT INITIAL.

IF iv_ranl_d IS NOT INITIAL.

CALL FUNCTION 'SECURITY_DIALOG'
EXPORTING
i_security_number = iv_ranl_d
i_dialog_mode = c_disp "'DISP'
* I_FIX_NUMBER = ' '
i_mode_changeable = c_x
EXCEPTIONS
invalid_security_number = 1
invalid_parameter_combination = 2
OTHERS = 3.
IF sy-subrc <> 0.
ENDIF.
ELSEIF iv_ranl_c IS NOT INITIAL.

CALL FUNCTION 'SECURITY_DIALOG'
EXPORTING
i_security_number = iv_ranl_c
i_dialog_mode = c_chan "'CHAN'
* I_FIX_NUMBER = ' '
i_mode_changeable = c_x
EXCEPTIONS
invalid_security_number = 1
invalid_parameter_combination = 2
OTHERS = 3.
IF sy-subrc <> 0.
ENDIF.
ENDIF.
"This is the logic for Partner Number Display and Change
ELSEIF iv_kontrh_d IS NOT INITIAL OR iv_kontrh_c IS NOT INITIAL.

IF iv_kontrh_d IS NOT INITIAL.
CALL FUNCTION 'FTR_PARTNER_DISPLAY'
EXPORTING
pi_partner_id = iv_kontrh_d
pi_partner_role = lv_rltyp
* PI_COMPANYCODE = ' '
EXCEPTIONS
partner_not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.

ELSEIF iv_kontrh_c IS NOT INITIAL.

FREE MEMORY ID 'BPA'.
SET PARAMETER ID 'BPA' FIELD iv_kontrh_c .
CALL TRANSACTION 'BUP3'.

ENDIF.

"This is the logic for Document Number Display and Change
ELSEIF ( iv_document_no_d IS NOT INITIAL OR iv_document_no_c IS NOT INITIAL ) AND iv_year IS NOT INITIAL.

IF iv_document_no_d IS NOT INITIAL.

SET PARAMETER ID 'BLN' FIELD iv_document_no_d .
SET PARAMETER ID 'BUK' FIELD iv_bukrs.
SET PARAMETER ID 'GJR' FIELD iv_year."DATE+0(4).
CALL TRANSACTION 'FB03' AND SKIP FIRST SCREEN.

ELSEIF iv_document_no_c IS NOT INITIAL.

SET PARAMETER ID 'BLN' FIELD iv_document_no_c .
SET PARAMETER ID 'BUK' FIELD iv_bukrs.
SET PARAMETER ID 'GJR' FIELD iv_year."DATE+0(4).
CALL TRANSACTION 'FB02' AND SKIP FIRST SCREEN.

ENDIF.

ENDIF.

ENDFUNCTION.

FORM settle_dlg USING memoryid_rfha tcode p_rfha_s p_bukrs.


IF NOT memoryid_rfha IS INITIAL.
SET PARAMETER ID memoryid_rfha FIELD p_rfha_s.
ENDIF.
SET PARAMETER ID 'FAN' FIELD p_rfha_s.
SET PARAMETER ID 'BUK' FIELD p_bukrs.
CALL TRANSACTION tcode AND SKIP FIRST SCREEN.

ENDFORM.
     
 
what is notes.io
 

Notes is a web-based application for online 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 14 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

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.