SAP J_1B_NF_DOCUMENT_UPDATE Function Module for Nota Fiscal System - Update document
J_1B_NF_DOCUMENT_UPDATE is a standard j 1b nf document update SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Nota Fiscal System - Update 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 j 1b nf document update FM, simply by entering the name J_1B_NF_DOCUMENT_UPDATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: J1BA
Program Name: SAPLJ1BA
Main Program: SAPLJ1BA
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update: 1
Function J_1B_NF_DOCUMENT_UPDATE 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 'J_1B_NF_DOCUMENT_UPDATE'"Nota Fiscal System - Update document.
EXPORTING
DOC_NUMBER = "Nota Fiscal document number
DOC_HEADER = "Nota Fiscal document header
TABLES
DOC_PARTNER = "Nota Fiscal document partner
* DOC_CTE_RES = "Information about resource
* DOC_TRANS_VOLUMES = "Transported Volumes
* DOC_TRAILER_INFO = "Trailer Information
* DOC_TRADE_NOTES = "Trade Notes
* DOC_ADD_INFO = "Free Usage Fields for Additional Information
* DOC_REF_PROC = "Additional Information: Referenced Processes
* DOC_SUGAR_SUPPL = "Daily Supply of Sugarcane
* DOC_SUGAR_DEDUC = "Taxes and Contributions on Sugarcane
* DOC_VEHICLE = "Nota Fiscal: Vehicle Details
* DOC_PHARMACEUT = "Nota Fiscal: Pharmaceutical
DOC_ITEM = "Nota Fiscal document item
* DOC_FUEL = "Nota Fiscal: Fuel Details
DOC_ITEM_TAX = "Nota Fiscal document item tax
DOC_HEADER_MSG = "Nota Fiscal document header message
DOC_REFER_MSG = "Nota Fiscal message references
* DOC_OT_PARTNER = "Nota Fiscal one-time account data
* DOC_IMPORT_DI = "Nota Fiscal Data for Import Documents
* DOC_IMPORT_ADI = "Nota Fiscal Data for Additions to Import Documents
* DOC_CTE_DOCREF = "Reference to the NF-e being transported
EXCEPTIONS
DOCUMENT_NOT_FOUND = 1 UPDATE_PROBLEM = 2 DOC_NUMBER_IS_INITIAL = 3
IMPORTING Parameters details for J_1B_NF_DOCUMENT_UPDATE
DOC_NUMBER - Nota Fiscal document number
Data type: J_1BNFDOC-DOCNUMOptional: No
Call by Reference: No ( called with pass by value option)
DOC_HEADER - Nota Fiscal document header
Data type: J_1BNFDOCOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for J_1B_NF_DOCUMENT_UPDATE
DOC_PARTNER - Nota Fiscal document partner
Data type: J_1BNFNADOptional: No
Call by Reference: No ( called with pass by value option)
DOC_CTE_RES - Information about resource
Data type: J_1BCTE_D_RESOptional: Yes
Call by Reference: Yes
DOC_TRANS_VOLUMES - Transported Volumes
Data type: J_1BNFTRANSVOLOptional: Yes
Call by Reference: Yes
DOC_TRAILER_INFO - Trailer Information
Data type: J_1BNFTRAILEROptional: Yes
Call by Reference: Yes
DOC_TRADE_NOTES - Trade Notes
Data type: J_1BNFTRADENOTESOptional: Yes
Call by Reference: Yes
DOC_ADD_INFO - Free Usage Fields for Additional Information
Data type: J_1BNFADD_INFOOptional: Yes
Call by Reference: Yes
DOC_REF_PROC - Additional Information: Referenced Processes
Data type: J_1BNFREFPROCOptional: Yes
Call by Reference: Yes
DOC_SUGAR_SUPPL - Daily Supply of Sugarcane
Data type: J_1BNFSUGARSUPPLOptional: Yes
Call by Reference: Yes
DOC_SUGAR_DEDUC - Taxes and Contributions on Sugarcane
Data type: J_1BNFSUGARDEDUCOptional: Yes
Call by Reference: Yes
DOC_VEHICLE - Nota Fiscal: Vehicle Details
Data type: J_1BNFVEHICLEOptional: Yes
Call by Reference: Yes
DOC_PHARMACEUT - Nota Fiscal: Pharmaceutical
Data type: J_1BNFPHARMACEUTOptional: Yes
Call by Reference: Yes
DOC_ITEM - Nota Fiscal document item
Data type: J_1BNFLINOptional: No
Call by Reference: No ( called with pass by value option)
DOC_FUEL - Nota Fiscal: Fuel Details
Data type: J_1BNFFUELOptional: Yes
Call by Reference: Yes
DOC_ITEM_TAX - Nota Fiscal document item tax
Data type: J_1BNFSTXOptional: No
Call by Reference: No ( called with pass by value option)
DOC_HEADER_MSG - Nota Fiscal document header message
Data type: J_1BNFFTXOptional: No
Call by Reference: No ( called with pass by value option)
DOC_REFER_MSG - Nota Fiscal message references
Data type: J_1BNFREFOptional: No
Call by Reference: No ( called with pass by value option)
DOC_OT_PARTNER - Nota Fiscal one-time account data
Data type: J_1BNFCPDOptional: Yes
Call by Reference: No ( called with pass by value option)
DOC_IMPORT_DI - Nota Fiscal Data for Import Documents
Data type: J_1BNFIMPORT_DIOptional: Yes
Call by Reference: Yes
DOC_IMPORT_ADI - Nota Fiscal Data for Additions to Import Documents
Data type: J_1BNFIMPORT_ADIOptional: Yes
Call by Reference: Yes
DOC_CTE_DOCREF - Reference to the NF-e being transported
Data type: J_1BCTE_D_DOCREFOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
DOCUMENT_NOT_FOUND - Nota Fiscal not found in Database
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
UPDATE_PROBLEM - Some problem during update (SY-SUBRC <> 0)
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
DOC_NUMBER_IS_INITIAL - Document number not fullfilled
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for J_1B_NF_DOCUMENT_UPDATE 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_doc_number | TYPE J_1BNFDOC-DOCNUM, " | |||
lt_doc_partner | TYPE STANDARD TABLE OF J_1BNFNAD, " | |||
lv_document_not_found | TYPE J_1BNFNAD, " | |||
lt_doc_cte_res | TYPE STANDARD TABLE OF J_1BCTE_D_RES, " | |||
lt_doc_trans_volumes | TYPE STANDARD TABLE OF J_1BNFTRANSVOL, " | |||
lt_doc_trailer_info | TYPE STANDARD TABLE OF J_1BNFTRAILER, " | |||
lt_doc_trade_notes | TYPE STANDARD TABLE OF J_1BNFTRADENOTES, " | |||
lt_doc_add_info | TYPE STANDARD TABLE OF J_1BNFADD_INFO, " | |||
lt_doc_ref_proc | TYPE STANDARD TABLE OF J_1BNFREFPROC, " | |||
lt_doc_sugar_suppl | TYPE STANDARD TABLE OF J_1BNFSUGARSUPPL, " | |||
lt_doc_sugar_deduc | TYPE STANDARD TABLE OF J_1BNFSUGARDEDUC, " | |||
lt_doc_vehicle | TYPE STANDARD TABLE OF J_1BNFVEHICLE, " | |||
lt_doc_pharmaceut | TYPE STANDARD TABLE OF J_1BNFPHARMACEUT, " | |||
lt_doc_item | TYPE STANDARD TABLE OF J_1BNFLIN, " | |||
lv_doc_header | TYPE J_1BNFDOC, " | |||
lv_update_problem | TYPE J_1BNFDOC, " | |||
lt_doc_fuel | TYPE STANDARD TABLE OF J_1BNFFUEL, " | |||
lt_doc_item_tax | TYPE STANDARD TABLE OF J_1BNFSTX, " | |||
lv_doc_number_is_initial | TYPE J_1BNFSTX, " | |||
lt_doc_header_msg | TYPE STANDARD TABLE OF J_1BNFFTX, " | |||
lt_doc_refer_msg | TYPE STANDARD TABLE OF J_1BNFREF, " | |||
lt_doc_ot_partner | TYPE STANDARD TABLE OF J_1BNFCPD, " | |||
lt_doc_import_di | TYPE STANDARD TABLE OF J_1BNFIMPORT_DI, " | |||
lt_doc_import_adi | TYPE STANDARD TABLE OF J_1BNFIMPORT_ADI, " | |||
lt_doc_cte_docref | TYPE STANDARD TABLE OF J_1BCTE_D_DOCREF. " |
  CALL FUNCTION 'J_1B_NF_DOCUMENT_UPDATE' "Nota Fiscal System - Update document |
EXPORTING | ||
DOC_NUMBER | = lv_doc_number | |
DOC_HEADER | = lv_doc_header | |
TABLES | ||
DOC_PARTNER | = lt_doc_partner | |
DOC_CTE_RES | = lt_doc_cte_res | |
DOC_TRANS_VOLUMES | = lt_doc_trans_volumes | |
DOC_TRAILER_INFO | = lt_doc_trailer_info | |
DOC_TRADE_NOTES | = lt_doc_trade_notes | |
DOC_ADD_INFO | = lt_doc_add_info | |
DOC_REF_PROC | = lt_doc_ref_proc | |
DOC_SUGAR_SUPPL | = lt_doc_sugar_suppl | |
DOC_SUGAR_DEDUC | = lt_doc_sugar_deduc | |
DOC_VEHICLE | = lt_doc_vehicle | |
DOC_PHARMACEUT | = lt_doc_pharmaceut | |
DOC_ITEM | = lt_doc_item | |
DOC_FUEL | = lt_doc_fuel | |
DOC_ITEM_TAX | = lt_doc_item_tax | |
DOC_HEADER_MSG | = lt_doc_header_msg | |
DOC_REFER_MSG | = lt_doc_refer_msg | |
DOC_OT_PARTNER | = lt_doc_ot_partner | |
DOC_IMPORT_DI | = lt_doc_import_di | |
DOC_IMPORT_ADI | = lt_doc_import_adi | |
DOC_CTE_DOCREF | = lt_doc_cte_docref | |
EXCEPTIONS | ||
DOCUMENT_NOT_FOUND = 1 | ||
UPDATE_PROBLEM = 2 | ||
DOC_NUMBER_IS_INITIAL = 3 | ||
. " J_1B_NF_DOCUMENT_UPDATE |
ABAP code using 7.40 inline data declarations to call FM J_1B_NF_DOCUMENT_UPDATE
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 DOCNUM FROM J_1BNFDOC INTO @DATA(ld_doc_number). | ||||
Search for further information about these or an SAP related objects