class ZFQM_BADI_ADJUSTFLOW_DOWNPAYMENT definition
public
final
create public .
public section.
interfaces IF_BADI_INTERFACE .
interfaces IF_FQM_FLOW_ENHANCEMENTS_CORE .
protected section.
private section.
ENDCLASS.
CLASS ZFQM_BADI_ADJUSTFLOW_DOWNPAYMENT IMPLEMENTATION.
METHOD if_fqm_flow_enhancements_core~adjust_flows.
" ----------------------------------------------------------------------
" This sample code only covers the following scenario:
" - Down payment request cleared
" Same Vendor
" Invoice item item with Special G/L indicator: 'A'
" Down payment request item with Special G/L indicator: 'F'
" Down payment request item are cleared by the invoice document
"
" ----------------------------------------------------------------------
SELECT a~fi_document_number, a~fi_fiscal_year, a~company_code, a~fi_account, a~line_number
FROM @ct_flows AS a
INNER JOIN bseg AS b
ON a~fi_document_number = b~belnr
AND a~fi_fiscal_year = b~gjahr
AND a~company_code = b~bukrs
AND a~fi_document_line_item = b~buzei
WHERE a~certainty_level = 'PAY_N' AND a~origin_application = 'BSEGV'
AND b~koart = 'K'
AND b~umskz = 'A'
INTO TABLE @DATA(lt_invoice_flows).
IF lt_invoice_flows IS NOT INITIAL.
SELECT a~line_number
FROM @lt_invoice_flows AS a
INNER JOIN bseg AS b
ON a~fi_document_number = b~augbl
AND a~fi_fiscal_year = b~auggj
AND a~company_code = b~bukrs
AND a~fi_account = b~hkont
WHERE b~koart = 'K' AND b~umskz = 'F'
INTO TABLE @DATA(lt_line_number).
IF lt_line_number IS NOT INITIAL.
LOOP AT ct_flows INTO DATA(ls_flow).
READ TABLE lt_line_number TRANSPORTING NO FIELDS
WITH KEY line_number = ls_flow-line_number.
IF sy-subrc EQ 0.
DELETE ct_flows.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
ENDMETHOD.
ENDCLASS.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
5 | |
5 | |
4 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 |