Definition
Each file layout, a block buffer is assigned to each block. The Interface Toolbox does not write the block fields to this block buffer at this point. The block buffer is only transferred to the export file when the block has been processed.
Use
If you use the
User Exit After function during block processing, you can specify whether the interface block buffer is written to the export file.The Toolbox defines the interface block buffer and can be used by the user-defined form routine. If your program contains the user-defined form routine and uses the RPCIFI26 include in the Interface Toolbox, you have unlimited access to the interface block buffer.
In the RPCIFI26 include, the interface block buffer is defined as an internal table with the name BLOCKS_OUTPUT.
DATA: BLOCKS_OUTPUT TYPE PINTF_OUTPUT OCCURS 10 WITH HEADER LINE.
TYPES: BEGIN OF PINTF_OUTPUT,
SNAME(25),
LENTH(6) TYPE N,
VALUE TYPE PINTF_MAX_RECORD,
END OF PINTF_OUTPUT.
TYPES: PINTF_MAX_RECORD (4096) TYPE C.
The BLOCKS_OUTPUT-SNAME field contains the name of a structure assigned to a block. The BLOCKS_OUTPUT-LENTH field contains the length of this structure and the BLOCKS_OUTPUT_VALUE field contains the content.
SNAME |
LENTH |
VALUE |
STRUCTURE_01 |
17 |
12199601010002X00 |
STRUCTURE_02 |
20 |
Bond, James |
STRUCTURE_03 |
8 |
19961010 |
The Interface Toolbox writes the value of the BLOCKS_OUTPUT-VALUE field in the length specified in the BLOCKS_OUTPUT-LENTH field to the output file.
If you use a user-defined form routine that uses the User Exit After function for blocks, you can maintain the interface block buffer by deleting, changing, moving, or inserting entries.
INCLUDE RPCIFI26.
FORM MAINTAIN_BLOCK USING PAR_01
PAR_02
PAR_03
PAR_04
PAR_05
PAR_06
PAR_07
PAR_08
PAR_09
PAR_10
PAR_11
PAR_12
PAR_13
PAR_14
PAR_15 "Input parameters 1 - 15
RETURN_VALUE. "return parameter
RETURN_VALUE = `1`.
LOOP AT BLOCKS_OUTPUT.
IF BLOCKS_OUTPUT-SNAME = `STRUCTURE_A` AND
BLOCKS_OUTPUT-VALUE(2) = `XS`.
CLEAR BLOCKS_OUTPUT-VALUE.
BLOCKS_OUTPUT-LENTH = 10.
BLOCKS_OUTPUT-VALUE = `DS19960125`.
MODIFY BLOCKS_OUTPUT.
ENDIF.
ENDLOOP.
ENDFORM.

If you change the BLOCKS_OUTPUT interface block buffer and the value 1 is returned to the Toolbox, the Interface Toolbox exports the exact content of the interface block buffer. It is not possible to recreate the previous content of the interface block buffer.
You can use the interface block buffer for each customer form routine that uses the User Exit After function for blocks.
Example of an Interface Block Buffer
Before |
SNAME |
LENTH |
VALUE |
|
STRUCTURE_A |
12 |
XS0123456789 |
After |
SNAME |
LENTH |
VALUE |
|
STRUCTURE_A |
10 |
DS 19960125 |