SAP BAPI_CTRACDOCUMENT_CREATE Function Module for BAPI: Post FI-CA Document









BAPI_CTRACDOCUMENT_CREATE is a standard bapi ctracdocument create SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for BAPI: Post FI-CA Document processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for bapi ctracdocument create FM, simply by entering the name BAPI_CTRACDOCUMENT_CREATE into the relevant SAP transaction such as SE37 or SE38.

Function Group: FKK_BOR_DOC
Program Name: SAPLFKK_BOR_DOC
Main Program: SAPLFKK_BOR_DOC
Appliation area: F
Release date: 05-Aug-1999
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function BAPI_CTRACDOCUMENT_CREATE pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'BAPI_CTRACDOCUMENT_CREATE'"BAPI: Post FI-CA Document
EXPORTING
TESTRUN = "Switch to simulation mode (no database changes)
DOCUMENTHEADER = "Document Header
* RECKEYINFO = "Information for Reconciliation Key
* COMPLETEDOCUMENT = "Note 981920 - Complete Document
* NET_RECEIVABLES = "Note 1098983 - Receivable Amounts Are Net Amounts

IMPORTING
DOCUMENTNUMBER = "Assigned document number
RETURN = "Confirmations

TABLES
* PARTNERPOSITIONS = "Line items (open items)
* WITHHOLDINGTAX = "Withholding Tax Data for Business Partner Item
* PORPAYMENT = "ISR Payment Supplement
* GENLEDGERPOSITIONS = "Line items (offsetting items)
* REPETITIONPOSITIONS = "Line items (repetition specifications)
* POSITIONLOCKS = "Locks on open items
* DATESFORDEFERREDREVENUE = "Transfer Dates for Deferred Revenue
* EXTENSIONIN = "Customer Enhancements
* ITEMRELATIONS = "Object Relations for DFKKKO and DFKKOP
* CARDDATA = "Card Data Supplement for Business Partner Item
* GENLEDGERPOSITIONSEXT = "General Ledger Item for FI-CA Document - Supplement
.



IMPORTING Parameters details for BAPI_CTRACDOCUMENT_CREATE

TESTRUN - Switch to simulation mode (no database changes)

Data type: BAPICTRACAUX-TESTRUN
Optional: No
Call by Reference: No ( called with pass by value option)

DOCUMENTHEADER - Document Header

Data type: BAPIDFKKKO
Optional: No
Call by Reference: No ( called with pass by value option)

RECKEYINFO - Information for Reconciliation Key

Data type: BAPIRECKEYINFO
Optional: Yes
Call by Reference: No ( called with pass by value option)

COMPLETEDOCUMENT - Note 981920 - Complete Document

Data type: BAPICTRACAUX-CHECKARCHIVE
Optional: Yes
Call by Reference: No ( called with pass by value option)

NET_RECEIVABLES - Note 1098983 - Receivable Amounts Are Net Amounts

Data type: BAPICTRACAUX-CHECKARCHIVE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for BAPI_CTRACDOCUMENT_CREATE

DOCUMENTNUMBER - Assigned document number

Data type: BAPIDFKKKO-DOC_NO
Optional: No
Call by Reference: No ( called with pass by value option)

RETURN - Confirmations

Data type: BAPIRET2
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for BAPI_CTRACDOCUMENT_CREATE

PARTNERPOSITIONS - Line items (open items)

Data type: BAPIDFKKOP
Optional: Yes
Call by Reference: No ( called with pass by value option)

WITHHOLDINGTAX - Withholding Tax Data for Business Partner Item

Data type: BAPIDFKKOPWH
Optional: Yes
Call by Reference: Yes

PORPAYMENT - ISR Payment Supplement

Data type: BAPIDFKKOP_ESR
Optional: Yes
Call by Reference: Yes

GENLEDGERPOSITIONS - Line items (offsetting items)

Data type: BAPIDFKKOPK
Optional: Yes
Call by Reference: No ( called with pass by value option)

REPETITIONPOSITIONS - Line items (repetition specifications)

Data type: BAPIDFKKOPW
Optional: Yes
Call by Reference: No ( called with pass by value option)

POSITIONLOCKS - Locks on open items

Data type: BAPIDFKKOPLOCK
Optional: Yes
Call by Reference: No ( called with pass by value option)

DATESFORDEFERREDREVENUE - Transfer Dates for Deferred Revenue

Data type: BAPIFKKDEFREV_DATES
Optional: Yes
Call by Reference: Yes

EXTENSIONIN - Customer Enhancements

Data type: BAPIPAREX
Optional: Yes
Call by Reference: Yes

ITEMRELATIONS - Object Relations for DFKKKO and DFKKOP

Data type: BAPIFKKOPREL
Optional: Yes
Call by Reference: Yes

CARDDATA - Card Data Supplement for Business Partner Item

Data type: BAPIDFKKOPC
Optional: Yes
Call by Reference: Yes

GENLEDGERPOSITIONSEXT - General Ledger Item for FI-CA Document - Supplement

Data type: BAPIDFKKOPKX
Optional: Yes
Call by Reference: Yes

Copy and paste ABAP code example for BAPI_CTRACDOCUMENT_CREATE Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.

DATA:
lv_testrun  TYPE BAPICTRACAUX-TESTRUN, "   
lv_documentnumber  TYPE BAPIDFKKKO-DOC_NO, "   
lt_partnerpositions  TYPE STANDARD TABLE OF BAPIDFKKOP, "   
lt_withholdingtax  TYPE STANDARD TABLE OF BAPIDFKKOPWH, "   
lt_porpayment  TYPE STANDARD TABLE OF BAPIDFKKOP_ESR, "   
lv_return  TYPE BAPIRET2, "   
lv_documentheader  TYPE BAPIDFKKKO, "   
lt_genledgerpositions  TYPE STANDARD TABLE OF BAPIDFKKOPK, "   
lv_reckeyinfo  TYPE BAPIRECKEYINFO, "   
lt_repetitionpositions  TYPE STANDARD TABLE OF BAPIDFKKOPW, "   
lt_positionlocks  TYPE STANDARD TABLE OF BAPIDFKKOPLOCK, "   
lv_completedocument  TYPE BAPICTRACAUX-CHECKARCHIVE, "   
lv_net_receivables  TYPE BAPICTRACAUX-CHECKARCHIVE, "   
lt_datesfordeferredrevenue  TYPE STANDARD TABLE OF BAPIFKKDEFREV_DATES, "   
lt_extensionin  TYPE STANDARD TABLE OF BAPIPAREX, "   
lt_itemrelations  TYPE STANDARD TABLE OF BAPIFKKOPREL, "   
lt_carddata  TYPE STANDARD TABLE OF BAPIDFKKOPC, "   
lt_genledgerpositionsext  TYPE STANDARD TABLE OF BAPIDFKKOPKX. "   

  CALL FUNCTION 'BAPI_CTRACDOCUMENT_CREATE'  "BAPI: Post FI-CA Document
    EXPORTING
         TESTRUN = lv_testrun
         DOCUMENTHEADER = lv_documentheader
         RECKEYINFO = lv_reckeyinfo
         COMPLETEDOCUMENT = lv_completedocument
         NET_RECEIVABLES = lv_net_receivables
    IMPORTING
         DOCUMENTNUMBER = lv_documentnumber
         RETURN = lv_return
    TABLES
         PARTNERPOSITIONS = lt_partnerpositions
         WITHHOLDINGTAX = lt_withholdingtax
         PORPAYMENT = lt_porpayment
         GENLEDGERPOSITIONS = lt_genledgerpositions
         REPETITIONPOSITIONS = lt_repetitionpositions
         POSITIONLOCKS = lt_positionlocks
         DATESFORDEFERREDREVENUE = lt_datesfordeferredrevenue
         EXTENSIONIN = lt_extensionin
         ITEMRELATIONS = lt_itemrelations
         CARDDATA = lt_carddata
         GENLEDGERPOSITIONSEXT = lt_genledgerpositionsext
. " BAPI_CTRACDOCUMENT_CREATE




ABAP code using 7.40 inline data declarations to call FM BAPI_CTRACDOCUMENT_CREATE

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

"SELECT single TESTRUN FROM BAPICTRACAUX INTO @DATA(ld_testrun).
 
"SELECT single DOC_NO FROM BAPIDFKKKO INTO @DATA(ld_documentnumber).
 
 
 
 
 
 
 
 
 
 
"SELECT single CHECKARCHIVE FROM BAPICTRACAUX INTO @DATA(ld_completedocument).
 
"SELECT single CHECKARCHIVE FROM BAPICTRACAUX INTO @DATA(ld_net_receivables).
 
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!