Ansicht
Dokumentation

EXIT_SAPLFICP_002 -

EXIT_SAPLFICP_002 -

CL_GUI_FRONTEND_SERVICES - Frontend Services   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.
SAP E-Book

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 importing them there, of changing them again and then finally updating them there. During the import transaction on the side of the receiver, the user exit gives the user the option of modifying read documents from the file before importing into the database. Automatic posting key types, document types or transaction type 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 has created 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:

  1. (Table): T_EBKPF: This table contains all the document headers of all the documents which were read from the transport file (which were previously specified by the user). If they are edited, the edited version is then written into the database afterwards.
  2. (Table): T_EBSEG: This table contains all the line items of above documents. They can also be edited and stored afterwards.
  3. (Export): E_CHANGE_FLAG: Must be set to 'X' if changes should be transferred to T_EBSEG/T_EBKPF.
  4. (Error): ERROR: This error is not eliminated by the standard program. If the function exit determines an 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.






General Material Data   Fill RESBD Structure from EBP Component Structure  
This documentation is copyright by SAP AG.

Length: 2912 Date: 20240419 Time: 120400     sap01-206 ( 30 ms )