ABAP CR / PR Technical Specification
Created By : Shiti Anand Rai
Created On : 22.10.2014
1. Header
Issue No: 1409-0463
Issue Description: New AFE report with payment information
Issue Type CR [ X ] PR []
Start Date End Date
Current Status [X ] Close [ ] Under [ ] Yet to start
Development
Module FICO
Functional (3)
Consultant(s)
2. Functional Specification:
3. Technical Specification: (Issue/Requirement Analysis in Technical Terms.)
R/3 Object Details :
T. Code (If Any) ZPTM_TRX307
Object Name ZPTM_AFE_RPT_PAYM_INFO
Object Type ABAP Report
Transport Request No EDAK919207
Transport information:
Change Request # Task # Object Identifier Object Type(Program,
(Program ID, Layout Transaction, Layout
Set ID, etc) Set)
EDAK919207 EDAK919208 ZPTM_AFE_RPT_PAY Program
M_INFO
EDAK919207 EDAK919208 ZPTM_AFE_RPT_PAY Program
M_INFO_PARAM
EDAK919207 EDAK919208 ZPTM_AFE_RPT_PAY Program
M_INFO_TOP
EDAK919207 EDAK919208 ZPTM_TRX307 Transaction
EDAK919207 EDAK919257 ZPTM_AFE_RPT_PAY Program
M_INFO
Message details:
Message type Message number Message
E 001
Selection screen information:
Name Table Field/ Select-option (S) Comments Default Value
Check box/ or Parameter (P) (Range,
Radio button - Single/Multiple
(with group) Selection,
Patterns,
Mandatory, etc.)
S_POSID ( D . PRPS-POSID S Optional- N/A
) Range/Multiple
Selection
S_PBUKR PRPS-PBUKR S Optional- N/A
(D .) Range/Multiple
Selection
S_KSTAR COEP-KSTAR S Optional- N/A
(D .) Range/Multiple
Selection
S_AUFNR CAUFVD-AUFNR S Optional- N/A
(D .) Range/Multiple
Selection
P_WBS ( Include Check-Box P Optional-Single N/A
WBS ) Selection
P_AUF ( Include Check-Box P Optional-Single N/A
Order ) Selection
Processing Logic:
START-OF-SELECTION
Step: - 0001
The fields PSPNR (WBS Element), POSID (Work Breakdown Structure Element (WBS Element)),
PBUKR (Company code for WBS element), OBJNR (Object number), AEDAT (Change date for
Order Master) are retrieved from table PRPS (WBS (Work Breakdown Structure) Element Master
Data) where POSID in S_POSID (from selection screen) AND PBUKR in S_PBUKR (from
selection screen).
Step: - 0002
The fields AUFNR (Order Number), AEDAT (Change date for Order Master), BUKRS (Company
Code), OBJNR (Object number) are retrieved from table AUFK (Order master data) where
AUFNR in S_AUFNR (from selection screen) AND BUKRS in S_PBUKR (from selection screen)
AND AUART equals to 'PM06'.
Step: - 0003
CALL FUNCTION 'STATUS_READ'
EXPORTING
client = sy-mandt
objnr = lt_prps_temp-objnr
only_active = 'X'
TABLES
status = it_stat
EXCEPTIONS
object_not_found = 1
OTHERS = 2.
Step: - 0004
CALL FUNCTION 'BAPI_ACC_CO_DOCUMENT_FIND'
EXPORTING
document = ls_document
TABLES
select_criteria = lt_selc
doc_headers = lt_doch
return = lt_ret.
Step: - 0005
The fields KOKRS (Controlling Area), BELNR (Accounting Document Number), BUZEI (Number
of Line Item Within Accounting Document), WTGBTR (Total Value in Transaction Currency),
WOGBTR (Total Value in Object Currency), WKGBTR (Total Value in Controlling Area Currency),
OBJNR (Object number), GJAHR (Fiscal Year), KSTAR (Cost Element), VRGNG (CO Business
Transaction), TWAER (Transaction Currency), OWAER (Currency Key), GKONT (Offsetting
Account Number), GKOAR (Offsetting Account Type), WERKS (Plant), EBELN (Purchasing
Document Number), EBELP (Item Number of Purchasing Document), BUKRS (Company Code)
are retrieved from table COEP (CO Object: Line Items (by Period)) for all entries obtained from
table ( populated in step :- ) where KOKRS equals to 'TRNX' AND BELNR equals to DOC_NO of
table AND OBJNR equals to OBJNR of table AND GJAHR equals to FISC_YEAR of table AND
WRTTP equals to '04' AND KSTAR in S_KSTAR (from selection screen) AND VRGNG equals to
'COIN'.
Step: - 0006
CALL FUNCTION 'K40C_COBK_CHECK_GET'
EXPORTING
use_message_handler = 'X'
i_cobk = i_cobk
TABLES
itcobk = it_cobk
EXCEPTIONS
document_not_found = 1
OTHERS = 2.
Step: - 0007
CALL FUNCTION 'FAGL_GET_BKPF_SEL'
EXPORTING
it_selection = gt_selection_full[]
IMPORTING
et_bkpf = t_bkpf[]
EXCEPTIONS
not_found =1
OTHERS = 2.
Step: - 0008
CALL FUNCTION 'FAGL_GET_ITEMS_BSAS'
EXPORTING
i_selection = gt_selection_full
IMPORTING
flag_cursor_open = gd_cursor_open
CHANGING
c_t_faglpose = it_selg.
Step: - 0009
CALL FUNCTION 'FAGL_GET_ITEMS_BSAS'
EXPORTING
i_selection = gt_selection_full
IMPORTING
flag_cursor_open = gd_cursor_open
CHANGING
c_t_faglpose = it_selg.
Step: - 0010
The fields EBELN (Purchasing Document Number), EBELP (Item Number of Purchasing
Document), ZEKKN (Sequential Number of Account Assignment), VGABE (Transaction/event
type, purchase order history), GJAHR (Fiscal Year), BELNR (Accounting Document Number),
BUZEI (Number of Line Item Within Accounting Document), LFBNR (Document No. of a
Reference Document), LFPOS (Item of a Reference Document) are retrieved from table EKBE
(History per Purchasing Document) for all entries obtained from table COEP ( populated in
step :- 0005 ) where EBELN equals to EBELN of table COEP AND EBELP equals to EBELP of
table COEP AND VGABE equals to '1' OR equals to '2' OR equals to '3'.
Step: - 0011
The fields BUKRS (Company Code), BELNR (Accounting Document Number), GJAHR (Fiscal
Year), BLART (Document Type), AWKEY (Reference Key) are retrieved from table BKPF
(Accounting Document Header) for all entries obtained from table ( populated in step :- ) where
AWTYP equals to 'RMRP' AND AWKEY equals to AWKEY of table.
Step: - 0012
The fields KOKRS (Controlling Area), BELNR (Accounting Document Number), GJAHR (Fiscal
Year), REFBT (Document type of reference document), REFBN (Reference Document Number),
REFBK (Company code of FI document), BLART (Document Type) are retrieved from table
COBK (CO Object: Document Header) for all entries obtained from table COEP ( populated in
step :- 0005 ) where KOKRS equals to 'TRNX' AND BELNR equals to BELNR of table COEP AND
GJAHR equals to GJAHR of table COEP AND REFBK equals to BUKRS of table COEP.
Step: - 0013
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = it_data-kstar
IMPORTING
output = it_data-kstar.
Step: - 0014
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = it_data-gkoar
IMPORTING
output = it_data-gkoar.
Step: - 0015
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = it_data-ebeln
IMPORTING
output = it_data-ebeln.
Step: - 0016
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = it_data-ebeln
IMPORTING
output = it_data-ebeln.
Step: - 0017
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = it_data-ebeln
IMPORTING
output = it_data-ebeln.
Step: - 0018
The fields BUKRS (Company Code), LIFNR (Account Number of Vendor or Creditor), UMSKS
(Special G/L Transaction Type), UMSKZ (Special G/L Indicator), AUGDT (Clearing Date), AUGBL
(Document Number of the Clearing Document), ZUONR (Assignment Number), GJAHR (Fiscal
Year), BELNR (Accounting Document Number), BUZEI (Number of Line Item Within Accounting
Document), BUDAT (Posting Date in the Document), BLART (Document Type) are retrieved from
table BSAK (Accounting: Secondary Index for Vendors (Cleared Items)) for all entries obtained
from table ( populated in step :- ) where BUKRS equals to BUKRS of table AND BELNR equals
to REFBN of table AND GJAHR equals to L_GJAHR of table.
Step: - 0019
The fields BUKRS (Company Code), BELNR (Accounting Document Number), GJAHR (Fiscal
Year), BLART (Document Type), BUDAT (Posting Date in the Document), CPUDT (Day On Which
Accounting Document Was Entered), TCODE (Transaction Code), BKTXT (Document Header
Text) are retrieved from table BKPF (Accounting Document Header) for all entries obtained from
table BSAK ( populated in step :- 0018 ) where BUKRS equals to BUKRS of table BSAK AND
BELNR equals to AUGBL of table BSAK AND CPUDT equals to AUGDT of table BSAK.
Step: - 0020
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = it_final-lifnr
IMPORTING
output = it_final-lifnr.
Step: - 0021
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = it_final-posid
IMPORTING
output = it_final-posid.
Step: - 0022
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = it_final-co_belnr
IMPORTING
output = it_final-co_belnr.
Step: - 0023
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = it_final-gkont
IMPORTING
output = it_final-gkont.
Step: - 0024
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = it_final-refbn
IMPORTING
output = it_final-refbn.
Step: - 0025
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = it_final-fi_belnr
IMPORTING
output = it_final-fi_belnr.
END-OF-SELECTION
Step: - 0026
The fields BUKRS (Company Code), LIFNR (Account Number of Vendor or Creditor), UMSKS
(Special G/L Transaction Type), UMSKZ (Special G/L Indicator), AUGDT (Clearing Date), AUGBL
(Document Number of the Clearing Document), ZUONR (Assignment Number), GJAHR (Fiscal
Year), BELNR (Accounting Document Number), BUZEI (Number of Line Item Within Accounting
Document), BUDAT (Posting Date in the Document), BLART (Document Type) are retrieved from
table BSAK (Accounting: Secondary Index for Vendors (Cleared Items)) for all entries obtained
from table ( populated in step :- ) where BUKRS equals to BUKRS of table AND BELNR equals
to REFBN of table AND GJAHR equals to L_GJAHR of table.
Step: - 0027
The fields BUKRS (Company Code), BELNR (Accounting Document Number), GJAHR (Fiscal
Year), BLART (Document Type), BUDAT (Posting Date in the Document), CPUDT (Day On Which
Accounting Document Was Entered), TCODE (Transaction Code), BKTXT (Document Header
Text) are retrieved from table BKPF (Accounting Document Header) for all entries obtained from
table BSAK ( populated in step :- 0018 ) where BUKRS equals to BUKRS of table BSAK AND
BELNR equals to AUGBL of table BSAK AND CPUDT equals to AUGDT of table BSAK.
Step: - 0028
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = it_final-lifnr
IMPORTING
output = it_final-lifnr.
Step: - 0029
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = it_final-posid
IMPORTING
output = it_final-posid.
Step: - 0030
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = it_final-co_belnr
IMPORTING
output = it_final-co_belnr.
Step: - 0031
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = it_final-gkont
IMPORTING
output = it_final-gkont.
Step: - 0032
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = it_final-refbn
IMPORTING
output = it_final-refbn.
Step: - 0033
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = it_final-fi_belnr
IMPORTING
output = it_final-fi_belnr.
Step: - 0034
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
is_layout = wa_layout
it_fieldcat = lt_fieldcat
i_save = 'A'
TABLES
t_outtab = lt_final.
Relevant function modules:
Function Module name Description
BAPI_ACC_CO_DOCUMENT_FIND Read CO Document for Manual Actual Postings
CONVERSION_EXIT_ALPHA_OUTPUT Conversion exit ALPHA, internal->external
FAGL_GET_BKPF_SEL Not Available
FAGL_GET_ITEMS_BSAS Not Available
K40C_COBK_CHECK_GET Not Available
REUSE_ALV_GRID_DISPLAY Output of a simple list (single-line)
STATUS_READ Read Object Status (JSTO and JEST)
Test Cases and Test Results (If Applicable):
Tested and found ok
Remarks: