Ansicht
Dokumentation

IDOC_INPUT -

IDOC_INPUT -

ABAP Short Reference   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

This function module triggers the method "Input" for objects IDOCPacket and IDOC. Optionally, the method can be called directly from the ALE layer.

The module determines which application function module is applicable and calls the corresponding module for the IDocs.

If required, the system:

  • updates the status records of the IDocs.
  • triggers events for the error handling/further processing.

Import parameter

No_of_retries

The number of times the function module has been called. If the number is greater than the maximum possible value in table TBD50 (input method), an error status for the IDOC is written. The application input is not executed.

Mass_Processing

Flag indicating if a packet of IDocs is to be processed or not. The packet may contain only one IDoc.

The flag controls what is to happen when an error occurs. If set, the single start event is triggered for any erroneous IDoc. If not set, the terminating event is triggered.

Input_Method

This parameter indicates if the IDoc is to processed in the foreground (dialog) or background. Possible values are:

, , - Background
,A, - Import in foreground, display all screens
,E, - Import in foreground, start with follow-up screen

Direct_CALL

Flag indicating if the function module is to be called directly from the ALE inbox or not. It controls which status values the IDoc to be processed may have:

Value Permissible status values
,X, 63 ALE/EDI Error
64 Ready to be passed to applicatrion

, , 62 Passed on to the application
51 Error when arriving in application
69 IDoc edited

IDOC_Start_Event_Enabled

Flag indicating if the IDoc start event can be triggered; when set to ,c_fase, the event is not triggered.

End_Event_Enabled

Flag indicating if the IDOC end event is to be triggered; if ,c_fase, is set, the event is not triggered.

End_Event_Always

Flag indicating if the IDOC end event is to be triggered, independent if the IDOC(s) has/have been processed successfully or not. If set to ,c_true,, the event is always triggered (End_Event_Enabled must be c_true).

Export parameter

Exception_Value

This parameter has the value of the event container's parameter "Exception". It is not equal to zero when an internal exception has been raised. Possible values are stored as defaults of the domain EXCEPTION.

Input_Succeeded_For_All

This flag is set, if all IDocs have been successfully processed. Other than that, it is not set.

Tables

Unprocessed_IDOCs

(Import parameter) A list of IDocs to be processed.

IDOC_Data

(Import parameter) IDoc data records (segments) to be processed.

The table may be empty; in this case the data records are being read from the database.

IDOC_Control

(Import/Export parameter) IDoc control records to be processed. This table may be empty; in this case the data records are being read from the database. When leaving the function module, the table contains the current control records, i.e. the current status values.

Interface to the application function module

The application function module must have the following interface:

IMPORTING
INPUT_METHOD LIKE BDWFAP_PAR-INPUTMETHD
MASS_PROCESSING LIKE BDWFAP_PAR-MASS_PROC
EXPORTING
WORKFLOW_RESULT LIKE BDWFAP_PAR-RESULT
APPLICATION_VARIABLE LIKE BDWFAP_PAR-APPL_VAR
IN_UPDATE_TASK LIKE BDWFAP_PAR-UPDATETASK
CALL_TRANSACTION_DONE LIKE BDWFAP_PAR-CALLTRANS
TABLES
IDOC_CONTRL STRUCTURE EDIDC
IDOC_DATA STRUCTURE EDIDD
IDOC_STATUS STRUCTURE BDIDOCSTAT
RETURN_VARIABLES STRUCTURE BDWFRETVAR
SERIALIZATION_INFO STRUCTURE BDI_SER
ExceptionS
WRONG_FUNCTION_CALLED

It is important that the application function module does not perform a commmit in different LUWs (Logical Units of Work).

The parameters have the following meaning:

Import parameter

Input_Method

See above

Mass_Processing

See above

Export parameter

Workflow_Result

If the parameter is zero and Mass_Processing is set, no event is triggered; if set, the IDoc status records and triggering the events is executed in the same update task, assumed that the application
function module does not perform a Commit Work.

Application_Variable

If this parameter is not INITIAL, it is passed on to the events.

In_Update_Task

This flag is to be set when the application function module has used the update task. If set, the IDoc status records and triggering the events is executed in the same update task, assumed that the application function module does not perform a Commit Work.

CALL_Transaction_Done

This flag is to be set when the application function module has not used a Call Transaction for a transaction which updates the IDoc itself (e.i. via IDOC lock). If set, no further steps are performed after the application function module has been called, because it is assumed that the transaction itself is going to perform these steps.

Tables

IDOC_CONTRL

The control records of the IDocs to be processed

IDOC_DATA

The data records of the IDoc to be processed

IDOC_STATUS

The status records of the IDoc to be processed. The application function module has to write at least one status records in the table for each IDoc; if successfully processed, status 53 is to be used, when an error occurs, status 51.

Return_Variables

(Export parameter) In this table the links between the IDocs and the application documents processed are established, in addition, the entries indicate which IDocs have beeen erroneous, which IDocs are to be processed further, and also which application documents are to be processed further.

Serialization_Info

(Export parameter) This table is for serialization. When an application performs serialization, function module idoc_serialization_check has to be called which returns the table Serialization_Info.

Exceptions

Wrong_Function_Called

This exception is to be triggered when message type and basic IDoc type are not approbriate for the funciton module.

Triggering Events

The events are stored after the process codes in Customizing are triggered in the following order: ,Start events, refers to IDoc start events for the error handling and the application events; ,Single end events, are end events for IDoc object methods; ,mass end events, are end events for IDoc packet object methods.

Triggering events depends on the following parameters:

Workflow_Result

Export parameter of thre application function module

Input_succeeded_for_all

Internal parameters set to TRUE, when all IDocs processed by the application have the status "successfully posted", otheris set to FALSE.

IDOC_Start_Event_Enabled

Interface parameter of the function module

End_Event_Enabled

Interface parameter of the function module

End_Event_Always

Interface parameter of the function module

Return_Variables

Export parameter of the application function module

In the following table, ,o, means that the event cannot be triggered in this case; ,x, means that triggering the event is required; , , means that the event can be triggered.

Parameters Value Event type --------------------____________________________________________________

IDOC Appl. Singleend Mass end
start start

Workflow_Result 0 o o
<> 0

IDOC_Start_Event_Enabled TRUE
FALSE o

End_Event_Enabled TRUE
FALSE o o

End_Event_Always TRUE x x
FALSE
--------------------____________________________________________________

When End_Event_Always is TRUE, End_Event_Enabled must also be TRUE in order to trigger the event.

To trigger ,Start events, all conmditions mentioned above must allow the action and also the export parameter "Return_Variables" of the application function module has to be filled accordingly.

Example

Notes





Parameters

DIRECT_CALL
DO_COMMIT
END_EVENT_ALWAYS
END_EVENT_ENABLED
EXCEPTION_VALUE
HOT_ONLY
IDOC_CONTROL
IDOC_DATA
IDOC_START_EVENT_ENABLED
INPUT_METHOD
INPUT_SUCCEEDED_FOR_ALL
MASS_PROCESSING
NO_OF_RETRIES
PE_IDOC_RESTART
PI_PARTNER_OPTION
PROCESS_CODE
SET_TO_TEMPERATURE
UNPROCESSED_IDOCS

Exceptions

IDOCS_DO_NOT_EXIST
IDOCS_HAVE_NO_DATA_RECORDS
IDOC_CLOSE_DB_ERROR
IDOC_CLOSE_NOT_OPEN
IDOC_CLOSE_NO_STATUS_WRITTEN
IDOC_CLOSE_PARAMETER_ERROR
IDOC_OPEN_ALREADY
IDOC_OPEN_INVALID
IDOC_OPEN_LOCK
IDOC_OPEN_NOT_EXIST
IDOC_WRITE_DB_ERROR
IDOC_WRITE_LOCK
IDOC_WRITE_NO_STATUS
IDOC_WRITE_NUMBER_INVALID
IDOC_WRITE_STATUS_INVALID
UNPROCESSED_IDOCS_EMPTY

Function Group

BD20

BAL Application Log Documentation   Vendor Master (General Section)  
This documentation is copyright by SAP AG.

Length: 10593 Date: 20240604 Time: 005119     sap01-206 ( 174 ms )