SAP Reports / Programs | Financial Accounting | Localization(FI-LOC) SAP FI

J_1BLFD1 SAP ABAP Report - Magnetic File of Notas Fiscais







J_1BLFD1 is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). It is used for You use this program to generate a magnetic file that reports all incoming and outgoing notas fiscaĆ­s (NF) containing at least one material on legally defined product lists (I and II), consisting primarily of packaging materials and chemicals...see full standard documentation available for this report. Also check out the submitted Comments related to this SAP report and the details below to see which OBJECTS it interacts with such as TABLES, FUNCTION MODULES, INCLUDES ETC.

If you would like to execute this report or see the full code listing simply enter J_1BLFD1 into the relevant SAP transactions such as SE38 or SE80


Transaction Code(s):

Below is a list of transaction codes which are relevant to this SAP report

J1B_LFD1 - IN359-Magnetic file on Notas Fiscais


ABAP code to call this SAP report using the submit statement

This report can be called from another progam/report simply by using the ABAP SUBMIT statement, see below for example ABAP code snipts of how to do this.






SUBMIT J_1BLFD1. "Basic submit
SUBMIT J_1BLFD1 AND RETURN. "Return to original report after report execution complete
SUBMIT J_1BLFD1 VIA SELECTION-SCREEN. "Display selection screen of submitted report to user
    See more syntax options for the ABAP SUBMIT statement


Text pool values


Selection Text: TESTRUN = Test Run
Selection Text: PRESSERV = Download to Local PC
Selection Text: LFLAYOUT = D .
Selection Text: LAYOUT = D .
Selection Text: FILE_P = File Name (Local)
Selection Text: FILE_A = File Name (Server)
Selection Text: APPLSERV = Download to Application Server
Selection Text: 1ST_RUN = D .
Title: Magnetic File of Notas Fiscais
Text Symbol: 512 = Start of Magnetic File Content
Text Symbol: 511 = Magnetic File of Notas Fiscais
Text Symbol: 510 = Number of Records
Text Symbol: 509 = Total Number of Records
Text Symbol: 508 = Messages List
Text Symbol: 507 = and in "File name," enter the path, directory, and name of the file.
Text Symbol: 506 = To generate a file, execute the program again without selecting "Test Run"
Text Symbol: 505 = You have only executed a test run (displayed on the screen only). No file has been generated.
Text Symbol: 500 = The file has been downloaded to
Text Symbol: 390 = Error List
Text Symbol: 201 = Number of Records
Text Symbol: 200 = Register
Text Symbol: 104 = Report Selection
Text Symbol: 103 = Administrative Data
Text Symbol: 101 = Output


INCLUDES used within this REPORT J_1BLFD1

INCLUDE J_1BLFD1_ACC.


TABLES used within REPORT and the associated SELECT statement:





No SAP DATABASE tables are accessed within this REPORT code!


Function Modules used within report and the associated call statement:

J_1BREAD_BRANCH_DATA CALL FUNCTION 'J_1BREAD_BRANCH_DATA' EXPORTING branch = j5_brnch "branch code bukrs = j5_bukrs "company code IMPORTING address1 = address branch_data = branch_data cgc_number = cgc_number EXCEPTIONS OTHERS = 04.

FILE_VALIDATE_NAME CALL FUNCTION 'FILE_VALIDATE_NAME' "1598898 EXPORTING "1598898 logical_filename = gc_filename "1598898 eliminate_blanks = space "1598898 CHANGING "1598898 physical_filename = file_a "1598898 EXCEPTIONS "1598898 logical_filename_not_found = 1 "1598898 validation_failed = 2 "1598898 OTHERS = 3. "1598898

J_1B_CFOP_GET_VERSION CALL FUNCTION 'J_1B_CFOP_GET_VERSION' EXPORTING land1 = address-country region = address-region date = j5_pdate-low IMPORTING cfoplength = cfop_length EXCEPTIONS date_missing = 1 version_not_found = 2 OTHERS = 3.

MESSAGES_INITIALIZE CALL FUNCTION 'MESSAGES_INITIALIZE'.

J_1B_NF_PARTNER_READ CALL FUNCTION 'J_1B_NF_PARTNER_READ' EXPORTING partner_type = j_1bnfdoc-partyp partner_id = j_1bnfdoc-parid partner_function = j_1bnfdoc-parvw doc_number = j_1bnfdoc-docnum IMPORTING parnad = parnad EXCEPTIONS OTHERS = 04.

MESSAGE_STORE CALL FUNCTION 'MESSAGE_STORE' EXPORTING arbgb = '8B' msgty = 'E' msgv1 = j_1bnflin-reftyp msgv2 = j_1bnflin-refkey msgv3 = j_1bnfdoc-nfnum msgv4 = j_1bnfstx-taxtyp txtnr = '456'.

MESSAGES_GIVE CALL FUNCTION 'MESSAGES_GIVE' TABLES t_mesg = t_mesg EXCEPTIONS OTHERS = 1.

MESSAGES_SHOW CALL FUNCTION 'MESSAGES_SHOW' EXPORTING corrections_option = ' ' corrections_func_text = ' ' object = text-390 EXCEPTIONS no_messages = 2.

GUI_DOWNLOAD CALL FUNCTION 'GUI_DOWNLOAD' "1589471 EXPORTING "1589471 FILENAME = file_p_help "1589471 FILETYPE = 'ASC' "1589471 TRUNC_TRAILING_BLANKS = ' ' "1589471 TRUNC_TRAILING_BLANKS_EOL = ' ' "1589471 TABLES "1589471 DATA_TAB = gt_result "1589471 EXCEPTIONS "1589471 FILE_WRITE_ERROR = 1 "1589471 NO_BATCH = 2 "1589471 GUI_REFUSE_FILETRANSFER = 3 "1589471 INVALID_TYPE = 4 "1589471 NO_AUTHORITY = 5 "1589471 UNKNOWN_ERROR = 6 "1589471 HEADER_NOT_ALLOWED = 7 "1589471 SEPARATOR_NOT_ALLOWED = 8 "1589471 FILESIZE_NOT_ALLOWED = 9 "1589471 HEADER_TOO_LONG = 10 "1589471 DP_ERROR_CREATE = 11 "1589471 DP_ERROR_SEND = 12 "1589471 DP_ERROR_WRITE = 13 "1589471 UNKNOWN_DP_ERROR = 14 "1589471 ACCESS_DENIED = 15 "1589471 DP_OUT_OF_MEMORY = 16 "1589471 DISK_FULL = 17 "1589471 DP_TIMEOUT = 18 "1589471 FILE_NOT_FOUND = 19 "1589471 DATAPROVIDER_EXCEPTION = 20 "1589471 CONTROL_FLUSH_ERROR = 21 "1589471 OTHERS = 22. "1589471

FILE_VALIDATE_NAME CALL FUNCTION 'FILE_VALIDATE_NAME' "1598898 EXPORTING "1598898 logical_filename = gc_filename "1598898 eliminate_blanks = space "1598898 CHANGING "1598898 physical_filename = file_a "1598898 EXCEPTIONS "1598898 logical_filename_not_found = 1 "1598898 validation_failed = 2 "1598898 OTHERS = 3. "1598898

J_1B_NF_PARTNER_READ CALL FUNCTION 'J_1B_NF_PARTNER_READ' EXPORTING partner_type = *j_1bnfdoc-partyp partner_id = *j_1bnfdoc-parid doc_number = *j_1bnfdoc-docnum partner_function = *j_1bnfdoc-parvw IMPORTING parnad = wa_parnad EXCEPTIONS OTHERS = 04.

J_1B_NF_VALUE_DETERMINATION CALL FUNCTION 'J_1B_NF_VALUE_DETERMINATION' EXPORTING nf_header = j_1bnfdoc * IMPORTING * ext_header = TABLES nf_item = wk_item nf_item_tax = wk_item_tax ext_total_tax = wk_intax.

CONVERSION_EXIT_CUNIT_INPUT CALL FUNCTION 'CONVERSION_EXIT_CUNIT_INPUT' EXPORTING input = it_records-nfunt IMPORTING output = lv_unit EXCEPTIONS unit_not_found = 1 OTHERS = 2.

MATERIAL_UNIT_CONVERSION CALL FUNCTION 'MATERIAL_UNIT_CONVERSION' EXPORTING matnr = it_records-matnr meinh = lv_unit IMPORTING output = dummy_menge umren = i_denom1 umrez = i_num1 EXCEPTIONS conversion_not_found = 1 input_invalid = 2 material_not_found = 3 meinh_not_found = 4 meins_missing = 5 no_meinh = 6 output_invalid = 7 overflow = 8 OTHERS = 9.

MATERIAL_UNIT_CONVERSION CALL FUNCTION 'MATERIAL_UNIT_CONVERSION' EXPORTING matnr = it_records-matnr meinh = it_records-statunt extended_conv = 'X' no_output = 'X' IMPORTING umren = i_denom2 umrez = i_num2 EXCEPTIONS conversion_not_found = 1 input_invalid = 2 material_not_found = 3 meinh_not_found = 4 meins_missing = 5 no_meinh = 6 output_invalid = 7 overflow = 8 OTHERS = 9.

SCP_REPLACE_STRANGE_CHARS CALL FUNCTION 'SCP_REPLACE_STRANGE_CHARS' EXPORTING intext = p_text_in * INTEXT_LG = 0 * INTER_CP = '0000' * INTER_BASE_CP = '0000' * IN_CP = '0000' * REPLACEMENT = 46 IMPORTING outtext = p_text_out * OUTUSED = * OUTOVERFLOW = EXCEPTIONS invalid_codepage = 1 codepage_mismatch = 2 internal_error = 3 cannot_convert = 4 fields_not_type_c = 5 OTHERS = 6.

MATERIAL_UNIT_CONVERSION CALL FUNCTION 'MATERIAL_UNIT_CONVERSION' EXPORTING matnr = it_records-matnr meinh = it_records-nfunt * meins = extended_conv = 'X' no_output = 'X' IMPORTING * output = umren = i_denom1 umrez = i_num1 EXCEPTIONS conversion_not_found = 1 input_invalid = 2 material_not_found = 3 meinh_not_found = 4 meins_missing = 5 no_meinh = 6 output_invalid = 7 overflow = 8 OTHERS = 9.

UNIT_CONVERSION_SIMPLE CALL FUNCTION 'UNIT_CONVERSION_SIMPLE' EXPORTING * input = it_records-nfqty "1574535 input = 1 "1574535 unit_in = ls_materialunit-voleh unit_out = const_milliliter IMPORTING output = volume_capacity EXCEPTIONS conversion_not_found = 1 division_by_zero = 2 input_invalid = 3 output_invalid = 4 overflow = 5 type_invalid = 6 units_missing = 7 unit_in_not_found = 8 unit_out_not_found = 9 OTHERS = 10.

MATERIAL_UNIT_CONVERSION





CALL FUNCTION 'MATERIAL_UNIT_CONVERSION' EXPORTING matnr = it_records-matnr meinh = const_milliliter * meins = extended_conv = 'X' no_output = 'X' IMPORTING * output = umren = i_denom2 umrez = i_num2 EXCEPTIONS conversion_not_found = 1 input_invalid = 2 material_not_found = 3 meinh_not_found = 4 meins_missing = 5 no_meinh = 6 output_invalid = 7 overflow = 8 OTHERS = 9.



Contribute (Add Comments)

Although this basic information may have limited use it does provide an easy to find location to store any knowledge about this program/report.

The contribute/comments section below therefore offer's an opportunity for anyone to add additional information. This can be anything from useful hints, tips and screen shots to relevant SAP notes or anything else you feel is relevant to this report.

This will then be available for everyone to easily find by simply searching on the report name J_1BLFD1 or its description.