Вы находитесь на странице: 1из 10

Error handling

For more information about the required settings see the ALE Area Menu: SAP Menu -> Tools -> IDoc Interface/ALE -> Administration -> Runtime Settings -> Error and Status Processing (WE46).

Error Handling in ALE Outbound Processing


If an error occurs in the ALE layer, the faulty IDoc is saved and a workflow is generated. The ALE administrator can process the error through the workflow.

Error Handling in ALE Inbound Processing


Any errors that occur during ALE processing are handled as follows: y y


The processing of the IDoc causing the error is terminated. An event is triggered. This event starts an error task (work item): The employees responsible will find a work task in their workflow inboxes. An error message is displayed when the work task is processed.

 The error is corrected in another window and the IDoc can then be resubmitted for processing.

If the error cannot be corrected, the IDoc can be marked for deletion.

y Once the IDoc has been successfully posted, an event is triggered that terminates the error task. The work task then disappears from the inbox. Reposting IDocs with Errors If the processing of the inbound IDoc resulted in an error (IDoc status 51 - Application document not posted, or 63 - Error passing IDoc to application), you can use the report RBDMANI2 to resubmit the IDoc. In this program you can select specific errors. The program can also be scheduled as a periodic job to collect IDocs that could not be posted because of a lock problem.

Exception Handling: Procedure

Use
The following table provides an overview of the errors defined in the standard system and the SAP tasks which are linked to the errors using the process codes. Possible (but not all!) causes of error are specified to aid troubleshooting. Error IDoc could not be generated IDoc could not be generated under MC Process code EDIM SAP task TS30000020 Possible causes (examples) Inbound: Error reading file; Outbound: Error generating IDoc from an MC record No process code in the additional partner profile MC parameters; Error when writing the application data in the IDoc.

EDIN: Evaluates the partner data from the MC record EDIL EDII

TS70008037

Status file could not be read completely Error during inbound processing Error during outbound processing Error during outbound processing affecting all IDocs in an IDoc stack ("Output mode: Collect IDocs") IDoc syntax error (outbound; syntax check activated in partner profiles) IDoc syntax error (inbound; syntax check activated in partner profiles) Error status reported Error status reported

TS70008373 TS00008068 Process code does not exist; Error during forwarding to ALE services Error during forwarding using RFC; Error writing file Error during forwarding using RFC; Error writing file; Port does not exist

EDIO

TS00007989

EDIP

TS60001307

EDIX

TS00008070

EDIY

TS00008074

EDIS EDIR

TS30000078 TS70008125: In contrast to TS30000078, you can resend the IDoc here

Conversion error in EDI subsystem Conversion error in EDI subsystem

You start error processing by executing the corresponding work items in your Business Workplace. If a file read error could be corrected, for example, the IDocs which have not yet been read can be read and stored in the database manually, by starting report program RSEINB00.

Exception handling in the application, which can respond to the status 51 (application document not posted), is similar to exception handling in the IDoc Interface. The exception handling tasks in the IDoc interface are summarized in task group TG70000015, those from logistics applications in task group TG20000011. You can display task groups with the Business Workflow Explorer.

Status Description 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 Not used, only R/2 IDoc generated Error passing data to port Data passed to port OK Error within control information of EDI subsystem Error during translation Translation OK Error during syntax check Syntax check OK Error during interchange handling Interchange handling OK Error during dispatch Dispatch OK Retransmission OK Interchange Acknowledgement positive Interchange Acknowledgement negative Functional Acknowledgement positive Functional Acknowledgement negative Triggering EDI subsystem OK Data transfer for test OK Error triggering EDI subsystem Error passing data for test Dispatch OK, acknowledgement still due Error during retransmission Control information of EDI subsystem OK Processing despite syntax error (outbound) Error during syntax check of IDoc (outbound) Error in dispatch level (ALE service) Not used Error in ALE service IDoc ready for dispatch (ALE service) Error - no further processing IDoc was edited Original of an IDoc which was edited Error in control record of IDoc IDoc reloaded from archive Electronic signature not performed (timeout) IDoc added incorrectly IDoc archived

39 40 41 42 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74

IDoc is in the target system (ALE service) Application document not created in target system Application document created in target system IDoc was created by test transaction IDoc added Application document not posted Application document not fully posted Application document posted Error during formal application check Formal application check OK IDoc with errors added Test IDoc: Error during application check IDoc copy from R/2 connection Not used Error during syntax check of IDoc (inbound) Processing despite syntax error (inbound) IDoc passed to application Error passing IDoc to application IDoc ready to be transferred to application Error in ALE service IDoc is waiting for predecessor IDoc (serialization) Not used Error - no further processing IDoc was edited Original of an IDoc which was edited IDoc reloaded from archive Not used, only R/2 IDoc archived IDoc was created by test transaction

SALE Area Menu for ALE configurations.It includes transactions for Logical System definition and linking it to a client, Transactions for RFC Destination and Port Definition Etc. SM59 RFC Destination Here we specify the login settings for the destination including the I.P address or Application Server name and the User name and password.The information entered here is used to run Remote Function Calls(RFC ) on the destination server .We can create number of types of RFC Destinations but 3 types are important . R/3 (R/3 to R/3), LS(logical system) and TCP/IP. The name of the RFC destination should be same as that of Logical System as it helps in creation of automatic partner profiles. WE21 Port Definition. There are 6 types of ports but only 2 types File and Transactional RFC types of ports are important. We have to specify the RFC Destination before a port can be created. WE57 This is used to assign the Inbound function module to the Message Type and to the IDOC Type. WE42 This is used to define the process Code for Inbound Processing. BD95 Define Filter object type .We can specify the field and the table it belongs to as a filter object . BD59 Assignment of Filter object type to the Message Type .Here we create the link between Filter object and the segment and the message type and the segment Field.

BD50 Set message Type to reducible. BD65 Define Mandatory Fields. BD64 Distribution Model . Also known as Customer Distribution Model Used to define all the messages that will be exchanged between remote systems and the name of thes logical systems. Any filters can also be specified. The model once created has to be distributed on every system which will be communicating ,It can be maintained on only One system. BD21 Creating IDOcs from change pointers. This can be used to create IDOCs from change pointers for a particular message LIKE MATMAS. BD22 This can be used to delete change pointers. BD87 Status Monitor. Idocs can be selected base on number of criteria and there processing status can be seen in detail.

BD10 Material Master Data Distribution . Based on Message MATMAS. BD12 Customer Master Data Distribution . Based on Message CREMAS. BD14 Vendor Master Data Distribution Based on Message DEBMAS . BDFG Generate ALE Interface for BAPI. Here we specify the Business Object and the BAPI Function module for which the interface has to be created. WE31 Segment Editor. This is used to create segments. We create the segment type and segment definition is automatically created by editor e.g. Z1DUMMY is segment type and Z2DUMMY is the segment definition .We specify the fields and the data elements these cp\orresponds to create segments. WE30 IDOC Editor It is used to create a new IDOC Type or IDOC Extension .We specify the segments that will be addd to the IDOC type. WE02/05 IDOC List. Various selct options and parameters are provided to select IDOCs depending on the date, direction , mesage type etc. WE20 Partner Profile Here we create partner profile for each and every partner from / to which the messages will be exchanged.There are 6 types of PF generally only profiles of type LS(Logical System) ,KU(Customer) ,LI(Vendor) is used. We specify the partner number and partner type and the agent and the agent type responsible for handling of errors . For every message send to the partner we have a outbound record and for evry message coming from the partner we have the inbound record . We specify the message in the otbound/inbound records ,double clicking will take us to the detailed screen where the IDOC Type ,Port and whether the IDCO will be immediatelt processed or collected are mentioned.

CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE' EXPORTING VALUE(MASTER_IDOC_CONTROL) LIKE EDIDC STRUCTURE EDIDC " Control record of master IDoc VALUE(OBJ_TYPE) LIKE SERIAL-OBJ_TYPE DEFAULT '' VALUE(CHNUM) LIKE SERIAL-CHNUM DEFAULT '' TABLES COMMUNICATION_IDOC_CONTROL STRUCTURE EDIDC " Control records of created comm. IDocs MASTER_IDOC_DATA STRUCTURE EDIDD " Data records of master IDoc EXCEPTIONS ERROR_IN_IDOC_CONTROL " Incorrect entry in IDoc control record ERROR_WRITING_IDOC_STATUS " Error when writing IDoc status records ERROR_IN_IDOC_DATA " Incorrect entry in IDoc data records SENDING_LOGICAL_SYSTEM_UNKNOWN " Own logical system unknown CALL FUNCTION 'CHANGE_POINTERS_READ' EXPPORTING VALUE(ACTIVATION_DATE_HIGH) LIKE SY-DATUM DEFAULT SPACE VALUE(ACTIVATION_DATE_LOW) LIKE SY-DATUM DEFAULT SPACE VALUE(ACTIVATION_TIME_HIGH) LIKE SY-UZEIT DEFAULT '000000' VALUE(ACTIVATION_TIME_LOW) LIKE SY-UZEIT DEFAULT '000000' VALUE(CHANGE_DOCUMENT_OBJECT_CLASS) LIKE CDPOS-OBJECTCLAS DEFAULT SPACE VALUE(CREATION_DATE_HIGH) LIKE SY-DATUM DEFAULT SPACE VALUE(CREATION_DATE_LOW) LIKE SY-DATUM DEFAULT SPACE VALUE(CREATION_TIME_HIGH) LIKE SY-UZEIT DEFAULT '000000' VALUE(CREATION_TIME_LOW) LIKE SY-UZEIT DEFAULT '000000' VALUE(MESSAGE_TYPE) LIKE BDCPS-MESTYPE VALUE(READ_NOT_PROCESSED_POINTERS) LIKE BDCPS-PROCESS DEFAULT 'X' TABLES CHANGE_POINTERS STRUCTURE BDCP MESSAGE_TYPES STRUCTURE BDMSGTYP OPTIONAL EXCEPTIONS ERROR_IN_DATE_INTERVAL ERROR_IN_TIME_INTERVAL

CALL FUNCTION change_pointers_status_write. IMPORTING VALUE(MESSAGE_TYPE) LIKE EDIDC-MESTYP TABLES CHANGE_POINTERS_IDENTS STRUCTURE BDICPIDENT Examples of Inbound function modules are IDOC_INPUT_BLAOCH IDoc inbound processing: change Ccontract IDOC_INPUT_BLAORD IDoc inbound processing: Create Contract IDOC_INPUT_MATMAS01 IDoc inbound processing: Material Master Examples of Outbound function modules are IDOC_OUTPUT_BLAOCH IDOC_OUTPUT_BLAORD

RBDMANIN SAP Report - Start Error Handling for Non-Posted IDocs


RBDMANIN is a standard ABAP report available within your SAP system (depending on your version and release level). Below is the standard documentation available for this report and a few details of other objects it interacts with such as tables, function modules, includes etc. If you would like to see the full code listing simply enter the object name( RBDMANIN ) into the relevant SAP transaction such as SE38 or SE80 Within the comments section below there is also an opportunity for anyone to be able add useful hints and information specific to this SAP object. This means that you and other users will be able to find these details quickly by simply searching on the object name.

SAP Documentation for program RBDMANIN

TRANSACTION CODE: WPIA DESCRIPTION This report attempts to post the inbound IDocs with status '51' (Application document not posted) When you execute this report, you can select the IDocs you wish to process by IDoc number, creation date, time, message type or sender. In the error status field, you can specify a status code which establishes further selection criteria. The status code gives a more precise selection criterion for the IDoc status. The 'Import in background' checkbox has the following significance: y If the checkbox is marked, the IDoc processing is triggered immediately without the IDocs being displayed. Following the processing, a list of the IDoc status values is output. y If the checkbox is not marked, the selected IDocs are displayed one after the other. You can then start the processing of each individual IDoc separately. PRECONDITION

OUTPUT The report outputs a list of the IDocs processed with their IDoc number, message type, status value after processing and a description. Documentation extract taken from SAP system, Copyright (c) SAP AG

Includes used within report:


INCLUDE MBDCONST.

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:
No SAP FUNCTION MODULES are executed within this report code!

Text pool values


Selection Text: SO_STACO = Error Status Selection Text: SO_SNPRT = Partner Type of Sender Selection Text: SO_SNPRN = Partner Number of Sender Selection Text: SO_SNPFC = Partner Function of Sender Selection Text: SO_MESTY = Logical Message Type Selection Text: SO_MESFC = Message Function Selection Text: SO_MESCO = Message Variant Selection Text: SO_DOCNU = IDoc Selection Text: SO_CRETI = Created At Selection Text: SO_CREDA = Created On Selection Text: P_WODIAL = Import in Background Title: Start Error Handling for Non-Posted IDocs Text Symbol: O02 = Data is being selected Text Symbol: O01 = (& of &) IDoc & is being processed Text Symbol: C02 = Online Processing Text Symbol: C01 = Process IDocs? Text Symbol: 006 = IDoc is still being processed Text Symbol: 005 = Description Text Symbol: 004 = St Text Symbol: 003 = MsgTyp Text Symbol: 002 = IDoc Text Symbol: 001 = The following IDocs have been sent to the application:

IDOCS: How Basis troubleshoot IDOCS error status 51 and status 68


30 December, 2007 at 5:00 am Filed under EDI How Basis troubleshoot IDOCS error error status 51 and status 68 Steps:
1. From Basis point of view, the technical problem that we have to look at is the transmission of the IDOC. 2. Firstly we execute BD87. 3. Enter IDOCS status 51 and press enter. You shall see below screen shot. As we can see, error Status 51 are application or data related error.

4. For status 68 error, we do the same thing. Use BD87 Enter 68 on IDOC status.

5. As there is no error message. We double click Without error message to see the IDOC details.

6. Go to status record to see what has happened with the IDOC process. As seen in the picture, the error 68 was because the IDOC had status 51 which is caused by application/data error.

7. Look at transaction SM58 for any hanging or error tRFC (most of IDOC use tRFC/Asynchronous). If any check the error message. 8. If the partner type is LS which is logical system, you can check and test connection of RFC connection via SM59. 9. In this case, there is no error tRFC on SM59 which proves those error are not Basis issue.

Вам также может понравиться