EXIT_SAPLFICP_002 -
Fill RESBD Structure from EBP Component Structure Fill RESBD Structure from EBP Component StructureThis documentation is copyright by SAP AG.
Overview EXIT_SAPLFICP_002
The document entry for external systems offers the functionality of entering documents on an SAP installation,of changing them, of then sending them by operating system file to a receiving installation, of importingthem there, of changing them again and then finally updating them there. During the import transactionon the side of the receiver, the user exit gives the user the option of modifying read documents fromthe file before importing into the database. Automatic posting key types, document types or transactiontype adjustment would be, for example, conceivable. If a document or its line item was changed, this receives a special document status 'Imported with changes' since it is different to the document sent by the sender.
The user exit can change all the fields of T_EBSEG/T_EBKPF but not the key fields MANDT, BUKRS_GLOB,BELNR, GJAHR, BUKRS_GLOB, BUZEI, since the documents would no longer be uniquely identifiable after this. Moreover, it also not allowed to insert new documents or delete old ones.
Creating EXIT_SAPLFICP_002
The function exit EXIT_SAPLFICP_002 is created via the available transaction CMOD after the user hascreated a project and assigned the extension FICT0001 to this. You can directly branch to the code via the component maintenance.
The interface of the function exit contains the following parameters:
- (Table): T_EBKPF: This table contains all the document headers of all the documents which were readfrom the transport file (which were previously specified by the user). If they are edited, the edited version is then written into the database afterwards.
- (Table): T_EBSEG: This table contains all the line items of above documents. They can also be edited and stored afterwards.
- (Export): E_CHANGE_FLAG: Must be set to 'X' if changes should be transferred to T_EBSEG/T_EBKPF.
- (Error): ERROR: This error is not eliminated by the standard program. If the function exit determinesan invalid entry, it can call up an error message (MESSAGE Exxx) to display an error on the screen. You can create the error message xxx yourself, possibly under a separate message ID.
The subsequent storing of the tables T_EBKPF and T_EBSEG in the database does not occur.
The following short example should clarify the application (code is in include ZXFEXU02):
...
LOOP AT T_EBKPF.
IF T_EBKPF-BLART = 'DR' OR T_EBKPF-BLART = 'KR'.
T_EBKPF-BLART = 'SA'.
MODIFY T_EBKPF.
E_CHANGE_FLAG = 'X'.
ELSEIF T_EBKPF-BLART <> 'SA'
MESSAGE ID 'Z1' TYPE 'E' NUMBER '999' WITH 'UNKNOWN BLART!'
RAISING ERROR.
ENDIF.
ENDLOOP.
...
EXIT.
BAL_S_LOG - Application Log: Log header data RFUMSV00 - Advance Return for Tax on Sales/Purchases
This documentation is copyright by SAP AG.
Length: 2786 Date: 20120526 Time: 164326 triton ( 160 ms )






