SAP ISPAM_GN_INVOICE_CREATE Function Module for IS-M/AM: Create Billing Document
ISPAM_GN_INVOICE_CREATE is a standard ispam gn invoice 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 IS-M/AM: Create Billing 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 ispam gn invoice create FM, simply by entering the name ISPAM_GN_INVOICE_CREATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: JHF1
Program Name: SAPLJHF1
Main Program: SAPLJHF1
Appliation area: J
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function ISPAM_GN_INVOICE_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 'ISPAM_GN_INVOICE_CREATE'"IS-M/AM: Create Billing Document.
EXPORTING
IN_INVOICE_DATE = "
IN_WITH_POSTING = "Checkbox Field
IN_WITH_ENQUEUE = "Checkbox Field
* IN_WITH_DOCUMENT_ADD = 'X' "Checkbox Field
* IN_SAMMELGANG_AKTIV = 'X' "Checkbox Field
* IN_VORGABE = "
IN_TJ180 = "Initial Values of Transaction in IS-M
CHANGING
* IO_JHTAK = "
* IO_PROTO = "
TABLES
* XTHEAD = "
* TT_ENQOBJ = "
XKOMFK = "
* XJHTFK = "
* XJHTFP = "
* XJHTFPA = "
* XKOMV = "
* YJHTFK = "
* YJHTFP = "
* YJHTFPA = "
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLJHF1_001 IS-M/AM: Sort Billing Interfaces -Itab XKOMFKGN - Order-Related
EXIT_SAPLJHF1_003 IS-M/AM: Pricing for Billing: Header Price Fields. Fill Debit-Side & RevD
EXIT_SAPLJHF1_004 IS-M/AM: Pricing for Billing: Item Price Fields. Fill Debit-Side & RevD
EXIT_SAPLJHF1_005 IS-M/AM: Number Assignment for Billing
EXIT_SAPLJHF1_006 IS-M: Account Determination for Billing: Fill Header Communication Struct.
EXIT_SAPLJHF1_007 IS-M/AM: IS-M: Account Determination for Billing: Fill Item Comm.Struct.
EXIT_SAPLJHF1_008 IS-M/AM: Billing Split Using Billing Header Field ZUKRI
EXIT_SAPLJHF1_010 IS-M/AM: Generate Billing Document: Check and Enhance Header and Item
EXIT_SAPLJHF1_011 IS-M/AM: Billing: Prior to Update
EXIT_SAPLJHF1_012 IS-M/AM: Billing: Prior to Accessing Pricing
EXIT_SAPLJHF1_013 IS-M/AM: Change Billing Document - Fill Dynamic Section of XJHTFP
EXIT_SAPLJHF1_014 IS-M/AM: Generate Billing Document: Enhance Header /Item After Pricing
EXIT_SAPLJHF1_015 IS-M: CO-PA Object Determination, Fill Communication Structure
EXIT_SAPLJHF1_016 IS-M/AM: Billing Document with Revenue Object Data Prior to Update
EXIT_SAPLJHF1_101 IS-M/AM: Fill Billing Interface - Sales Agent Payment
EXIT_SAPLJHF1_102 IS-M/AM: Sort Billing Interface Itab XKOMFKGN - Sales Agent Settlement
EXIT_SAPLJHF1_103 IS-M/AM: Pricing in Billing: Fill Header Price Fields - Credit-Side
EXIT_SAPLJHF1_104 IS-M/AM: Pricing in Billing: Fill Item Price Fields - Credit-Side
EXIT_SAPLJHF1_105 IS-M/AM: Fill Billing Interface - Sales Agent Payment Deduction
EXIT_SAPLJHF1_201 IS-M/AM: Enhance Revenue Distribution Interface for Billing Documents
EXIT_SAPLJHF1_202 IS-M/AM: Revenue Objects for a Billing Dataset
IMPORTING Parameters details for ISPAM_GN_INVOICE_CREATE
IN_INVOICE_DATE -
Data type: JHTFK-FKDATOptional: No
Call by Reference: No ( called with pass by value option)
IN_WITH_POSTING - Checkbox Field
Data type: XFELDOptional: No
Call by Reference: No ( called with pass by value option)
IN_WITH_ENQUEUE - Checkbox Field
Data type: XFELDOptional: No
Call by Reference: No ( called with pass by value option)
IN_WITH_DOCUMENT_ADD - Checkbox Field
Data type: XFELDDefault: 'X'
Optional: No
Call by Reference: No ( called with pass by value option)
IN_SAMMELGANG_AKTIV - Checkbox Field
Data type: XFELDDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
IN_VORGABE -
Data type: JHF1_KOMFK_VOR_STROptional: Yes
Call by Reference: No ( called with pass by value option)
IN_TJ180 - Initial Values of Transaction in IS-M
Data type: TJ180Optional: No
Call by Reference: No ( called with pass by value option)
CHANGING Parameters details for ISPAM_GN_INVOICE_CREATE
IO_JHTAK -
Data type: JHFS_JHTAK_STROptional: Yes
Call by Reference: No ( called with pass by value option)
IO_PROTO -
Data type: JHF1_PROTO_STROptional: Yes
Call by Reference: Yes
TABLES Parameters details for ISPAM_GN_INVOICE_CREATE
XTHEAD -
Data type: JHF1_XTHEAD_TABOptional: Yes
Call by Reference: No ( called with pass by value option)
TT_ENQOBJ -
Data type: JHF1_ENQ_OBJ_TABOptional: Yes
Call by Reference: No ( called with pass by value option)
XKOMFK -
Data type: JHF1_RJHKOMFKG_TABOptional: No
Call by Reference: No ( called with pass by value option)
XJHTFK -
Data type: JHF1_XJHTFK_TABOptional: Yes
Call by Reference: No ( called with pass by value option)
XJHTFP -
Data type: JHF1_XJHTFP_TABOptional: Yes
Call by Reference: No ( called with pass by value option)
XJHTFPA -
Data type: JHF1_XJHTFPA_TABOptional: Yes
Call by Reference: No ( called with pass by value option)
XKOMV -
Data type: JHF1_XKOMV_TABOptional: Yes
Call by Reference: No ( called with pass by value option)
YJHTFK -
Data type: JHF1_JHTFK_TABOptional: Yes
Call by Reference: Yes
YJHTFP -
Data type: JHF1_JHTFP_TABOptional: Yes
Call by Reference: No ( called with pass by value option)
YJHTFPA -
Data type: JHF1_JHTFPA_TABOptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for ISPAM_GN_INVOICE_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: | ||||
| lt_xthead | TYPE STANDARD TABLE OF JHF1_XTHEAD_TAB, " | |||
| lv_io_jhtak | TYPE JHFS_JHTAK_STR, " | |||
| lv_in_invoice_date | TYPE JHTFK-FKDAT, " | |||
| lt_tt_enqobj | TYPE STANDARD TABLE OF JHF1_ENQ_OBJ_TAB, " | |||
| lt_xkomfk | TYPE STANDARD TABLE OF JHF1_RJHKOMFKG_TAB, " | |||
| lv_io_proto | TYPE JHF1_PROTO_STR, " | |||
| lv_in_with_posting | TYPE XFELD, " | |||
| lt_xjhtfk | TYPE STANDARD TABLE OF JHF1_XJHTFK_TAB, " | |||
| lv_in_with_enqueue | TYPE XFELD, " | |||
| lt_xjhtfp | TYPE STANDARD TABLE OF JHF1_XJHTFP_TAB, " | |||
| lv_in_with_document_add | TYPE XFELD, " 'X' | |||
| lt_xjhtfpa | TYPE STANDARD TABLE OF JHF1_XJHTFPA_TAB, " | |||
| lv_in_sammelgang_aktiv | TYPE XFELD, " 'X' | |||
| lt_xkomv | TYPE STANDARD TABLE OF JHF1_XKOMV_TAB, " | |||
| lv_in_vorgabe | TYPE JHF1_KOMFK_VOR_STR, " | |||
| lt_yjhtfk | TYPE STANDARD TABLE OF JHF1_JHTFK_TAB, " | |||
| lv_in_tj180 | TYPE TJ180, " | |||
| lt_yjhtfp | TYPE STANDARD TABLE OF JHF1_JHTFP_TAB, " | |||
| lt_yjhtfpa | TYPE STANDARD TABLE OF JHF1_JHTFPA_TAB. " |
|   CALL FUNCTION 'ISPAM_GN_INVOICE_CREATE' "IS-M/AM: Create Billing Document |
| EXPORTING | ||
| IN_INVOICE_DATE | = lv_in_invoice_date | |
| IN_WITH_POSTING | = lv_in_with_posting | |
| IN_WITH_ENQUEUE | = lv_in_with_enqueue | |
| IN_WITH_DOCUMENT_ADD | = lv_in_with_document_add | |
| IN_SAMMELGANG_AKTIV | = lv_in_sammelgang_aktiv | |
| IN_VORGABE | = lv_in_vorgabe | |
| IN_TJ180 | = lv_in_tj180 | |
| CHANGING | ||
| IO_JHTAK | = lv_io_jhtak | |
| IO_PROTO | = lv_io_proto | |
| TABLES | ||
| XTHEAD | = lt_xthead | |
| TT_ENQOBJ | = lt_tt_enqobj | |
| XKOMFK | = lt_xkomfk | |
| XJHTFK | = lt_xjhtfk | |
| XJHTFP | = lt_xjhtfp | |
| XJHTFPA | = lt_xjhtfpa | |
| XKOMV | = lt_xkomv | |
| YJHTFK | = lt_yjhtfk | |
| YJHTFP | = lt_yjhtfp | |
| YJHTFPA | = lt_yjhtfpa | |
| . " ISPAM_GN_INVOICE_CREATE | ||
ABAP code using 7.40 inline data declarations to call FM ISPAM_GN_INVOICE_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 FKDAT FROM JHTFK INTO @DATA(ld_in_invoice_date). | ||||
| DATA(ld_in_with_document_add) | = 'X'. | |||
| DATA(ld_in_sammelgang_aktiv) | = 'X'. | |||
Search for further information about these or an SAP related objects