Adding Fields to CJI3 Report
Applies to:
SAP ABAP developers with basic knowledge of Customer Exits and Basic ABAP syntaxes. For more information, visit the ABAP homepage.
Summary:
In this article, we will learn how to enhance the standard report CJI3. We will add two fields in CJI3 as an example.
Aim : To add Vendor No and Vendor Name in report CJI3.
In CJI3 report Vendor name will come for only invoices, when offsetting account type(GKONT) is K, but for GRN documents system will not show the vendor no, so to get this we need to add two fields Vendor No(LIFNR) and Name(NAME1) in CJI3 report where report should give Vendor details for GRN documents also.
Author: Faheem Ur Rahman
Company: Sterling & Wilson Ltd Created on: 10 November 2010
Author Bio
Table of Content
Enhancement Process will include the following steps: ... 3
Step 1:……… ... 3
Step 2:…… ... 4
Step 3:……. ... 7
Related Content ... 10
Enhancement Process will include the following steps:
1. Adding fields to structure “RKPOS” using field exit “CI_RKPOS” of Customer exit “COOMEP01”. 2. Adding fields to the view “V_TKALV”, so that these fields should get added to the field catalog of
CJI3 report.
3. Writing the required code in the exit “EXIT_SAPLKAEP_001”
Step 1:
Go to CMOD and Create a Project.
Go to Enhancement Assignment and add customer exit “COOMEP01” as shown below.
Click on Components
Step 2:
Now we need to add the above fields in the field catalog of CJI3.
For that we need to maintain View V_TKALV. Goto SM34, enter V_TKALV and Press Maintain button
Then select these entries and click on “Selection dependencies” as shown below :
Press on New Entries and create the following entries:
Step 3:
Add required code in “EXIT_SAPLKAEP_001”.
*&---* *& Include ZXKAEPU01
*&---* IF I_REP_OBJECT = 'PD'.
IF CS_RECORD-GKONT IS NOT INITIAL AND CS_RECORD-GKOAR = 'K'. CS_RECORD-ZZLIFNR = CS_RECORD-GKONT.
CS_RECORD-ZZNAME1 = CS_RECORD-GKONT_KTXT. ELSEIF CS_RECORD-EBELN IS NOT INITIAL.
SELECT SINGLE LIFNR FROM EKKO INTO CS_RECORD-ZZLIFNR
WHERE EBELN = CS_RECORD-EBELN. IF SY-SUBRC = 0.
SELECT SINGLE NAME1 INTO CS_RECORD-ZZNAME1 FROM LFA1 WHERE LIFNR = CS_RECORD-ZZLIFNR. ENDIF.
ENDIF. ENDIF.
I_REP_OBJECT specifies which report you are using, so as to avoid unnecessary selection we need to keep the required value only. For CJI3 report the value for I_REP_OBJECT is „PD‟.
To test this, we will check CJI3 Report.
Related Content
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.
SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk.