Wednesday, 8 January 2014

Automatic checks for security notes using RSECNOTE

Note 888889 - Automatic checks for security notes using RSECNOTE

 

Summary
SymptomThe SAP EarlyWatch Alert report contains selected checks about "Security". Among other things, there is a check to determine whether or not selected and required security-relevant notes or HotNews have been implemented in the system. The report displays an overall status. An administrator uses the tool RSECNOTE to create the detailed evaluation of the required security-relevant notes in the system to be analyzed.

This note responds to the following situations:

  • In the SAP EarlyWatch Alert report, the "Service Preparation Check" unit complains that Note 888889 is not implemented. As a result, the check for security-relevant notes can only be carried out partially in the "Security" section.
  • You want to use the tool RSECNOTE to check the implementation status of security-relevant notes in your system. However, this tool is not yet available in your system.
  • You require detailed information on implementing and executing the tool RSECNOTE, and on interpreting the results.
  • You call transaction ST13. In the F4 help for the "Tool Name" field, the entry RSECNOTE is missing. If you manually enter RSECNOTE and then execute it, the system issues the message "The tool RSECNOTE does not exist".
  • The tool RTCCTOOL shows that the tool RSECNOTE is missing.
Other termsEarlyWatch Alert, EWA, security, RSECNOTE, RTCCTOOL, ST13
Reason and PrerequisitesThe tool RSECNOTE is part of the software component ST-A/PI as of Release 01M_*. Correction instructions are available for the installation in Release 01L_*.

As of Support Package 3 for the Service Content Plug-In ST-SER 701_2008_2, various services in the Solution Manager require the tool RSECNOTE on the managed system to check whether or not security-relevant notes are implemented.

The service report shows that this tool is missing and makes reference to this present Note 888889.

SolutionBelow you will find:
- a guide to implementing the tool RSECNOTE
- documentation on using the tool and information about the background and further procedures

Guide for creating the tool RSECNOTE
    1. Install the tool RSECNOTE in all systems in which you want to use the tool. SAP recommends that you install Release 01M_* of the software component ST-A/PI. See Note 69455 for more information.
    You can also install the tool RSECNOTE in Release 01L_* by implementing the correction instructions using transaction SNOTE. Go to "System Change Option" in transaction SE06 and set the software component ST-A/PI and the namespaces/name ranges "General SAP Name Range", /SSA/, and /SSF/ to "Modifiable". Enter /SSA/RTC if you are asked to specify a main program for /SSA/INT.
    2. Assign the following authorizations to all the users for whom you want to provide access to the tool.
    ObjectFieldValue
    S_TCODETCDST13

    S_ADMI_FCDS_ADMI_FCDST0R

    S_PTCH_ADMTABLE' (or empty)

    COMPONENTSECURITY-CHECK

    ACTVT02 (change)

Documentation for the tool RSECNOTE
You use transaction ST13 to start the tool RSECNOTE. In transaction ST13, select the tool and start it by choosing "Execute" or F8.
Comment: As of SAP_BASIS Release 620 Support Package 55, SAP_BASIS Release 640 SupportPackage 13, SAP_BASIS Release 700 and subsequent releases, you can also start the tool as the report RSECNOTE by using transaction SA38, for example.

As a result of the tool RSECNOTE, notes that contain security corrections and notes that are relevant foryour system due to the existing software components (taking the releases and the Support Packages into account) are displayed.

The report shows the following three sections:

  • "Missing recommendations"
    This section shows the required security-relevant SAP Notes and HotNews.
    HotNews are flagged with a red traffic light and notes are flagged with a yellow traffic light.
  • "Manually confirmed recommendations"
    Report messages can also be confirmed manually. This should only happen in exceptional cases that require it.
    For example: You cannot implement a specific note using transaction SNOTE because youmanually changed the affected program beforehand. In this case, implement the correctionsmanually and confirm the message.
  • "Successfully implemented recommendations"
    This section shows the security-relevant notes and HotNews that are required for the system and that are implemented successfully.
    A note or a HotNews is no longer required if your system release or Support Package level already contains the correction. After the system is upgraded or Support Packages are imported, a note that was implemented earlier may no longer be listed.
List of security-relevant notes that are checkedThe tool RSECNOTE checks security-relevant notes or HotNews that are entered as related notes in this present note.

For Note 1298433 "Security note: Bypassing security in reginfo & secinfo", however, the system checks only that at least the required kernel patch is installed. It does not check whether the gateway has also been safeguarded.

An overview of other security-relevant notes or HotNews is provided on the SAP Service Marketplace under the quick link /SECURITYNOTES (https://service.sap.com/securitynotes).

Updating recommendationsThe quantity of checked notes or HotNews is managed online by SAP. During a check, a system loads the list automatically using the service connection to SAPNet once a day. You can also use the tool RSECNOTE to update the list manually (menu path: List -> Refresh from SAPNet).

If the system to be checked does not have an online connection to SAPNet, then you can also use a transport to import the current recommendations from another system that has a connection to SAPNet. To do this, create a "Transport of Copies" and enter the object key R3TR TABU /SSF/PTAB. Enter ND* as the table key. This means that all recommendations are selected, including the recommendations for the tools RTCCTOOL and RSECNOTE. Make sure that you have specified a table key. Start the tool RTCCTOOL or RSECNOTE before you export the transport request, to update the recommendations.

Attached to this note is the file
Transport_Files_.zip, which contains the recommendations for the tool RSECNOTE for the specified date. Use the transport files contained in it if you do not have any systems that have an online connection to SAPNet.

EarlyWatch Alert report
The SAP EarlyWatch Alert report also provides a summary of the results of the tool RSECNOTE. For further information on the SAP EarlyWatch Alert report, see Note 863362.

Note Assistant
You can use the Note Assistant (transaction SNOTE) to implement the correction instructions. You can find additional information about the Note Assistant on SAP Service Marketplace under the quick link /NOTE-ASSISTANT (https://service.sap.com/note-assistant).

Header Data


Release Status:Released for Customer
Released on:03.05.2010 07:08:40
Master Language:German
Priority:Recommendations/additional info
Category:Advance development
Primary Component:SV-SMG-SER SAP Support Services
Secondary Components:XX-INT-SR Security Response

EXTRACTION INTERVIEW QUESTIONS IN SAP BW

Q1:  WHAT ARE THE STEPS INVOLVED IN LO EXTRACTION?

Ans:
Go to Transaction LBWE (LO Customizing Cockpit)
1). Select Logistics Application
      e.g. SD Sales BW
            Extract Structures
2). Select the desired Extract Structure and deactivate it first.
3). Give the Transport Request number and continue
4). Click on `Maintenance' to maintain such Extract Structure
       Select the fields of your choice and continue
             Maintain DataSource if needed
5). Activate the extract structure
6). Give the Transport Request number and continue
Next step is to delete the setup tables
7). Go to T-Code SBIW
8). Select Business Information Warehouse
i. Setting for Application-Specific Datasources
ii. Logistics
iii. Managing Extract Structures
iv. Initialization
v. Delete the content of Setup tables (T-Code LBWG)
vi. Select the application (01 – Sales & Distribution) and Execute
Now, Fill the Setup tables
9). Select Business Information Warehouse
i. Setting for Application-Specific Datasources
ii. Logistics
iii. Managing Extract Structures
iv. Initialization
v. Filling the Setup tables
vi. Application-Specific Setup of statistical data
vii. SD Sales Orders – Perform Setup (T-Code OLI7BW)
        Specify a Run Name and time and Date (put future date)
             Execute
Check the data in Setup tables at RSA3
Replicate the DataSource
Use of setup tables:
You should fill the setup table in the R/3 system and extract the data to BW - the setup tables is in SBIW - after that you can do delta extractions by initialize the extractor.
Full loads are always taken from the setup tables

Q2: HOW DELTA WORKS FOR LO EXTRACTION AND WHAT ARE UPDATE METHODS?           

Ans:
Type 1: Direct Delta

  • Each document posting is directly transferred into the BW delta queue
  • Each document posting with delta extraction leads to exactly one LUW in the respective BW delta queues
Type 2: Queued Delta
  • Extraction data is collected for the affected application in an extraction queue
  • Collective run as usual for transferring data into the BW delta queue
Type 3: Un-serialized V3 Update
  • Extraction data for written as before into the update tables with a V3 update module
  •  V3 collective run transfers the data to BW Delta queue
  • In contrast to serialized V3, the data in the updating collective run is without regard to sequence from the update tables

Q3: HOW TO CREATE GENERIC EXTRACTOR?

Ans:
1.      Select the DataSource type and give it a technical name.
2.      Choose Create.
The creating a generic DataSource screen appears.
3.      Choose an application component to which the DataSource is to be assigned.
4.      Enter the descriptive texts. You can choose any text.
5.      Choose from which datasets the generic DataSource is to be filled.

  • Choose Extraction from View, if you want to extract data from a transparent table or a database view. Choose Extraction from Query, if you want to use a SAP query InfoSet as the data source. Select the required InfoSet from the InfoSet catalog.
  • Choose Extraction using FM, if you want to extract data using a function module. Enter the function module and extract structure.
  • With texts, you also have the option of extraction from domain fixed values.
6.      Maintain the settings for delta transfer where appropriate.
7.      Choose Save.
When extracting, look at SAP Query: Assigning to a User Group.
Note when extracting from a transparent table or view:
If the extract structure contains a key figure field, that references to a unit of measure or currency unit field, this unit field must appear in the same extract structure as the key figure field.
A screen appears in which you can edit the fields of the extract structure.
8. Choose DataSource ® Generate.
The DataSource is now saved in the source system.

Q4: HOW TO ENHANCE A DATASOURCE?    

Ans:
Step 1: Go to T Code CMOD and choose the project you are working on.
Step 2: Choose the exit which is called when the data is extracted.
Step 3: There are two options
Normal Approach: CMOD Code
Function Module Approach: CMOD Code
Step 4: Here in this step we create a function module for each data source. We create a new FM
(Function Module in SE37)
Data Extractor Enhancement - Best Practice/Benefits:
This is the best practice of data source enhancement. This has the following benefits:

  • No more locking of CMOD code by 1 developer stopping others to enhance other extractors.
  • Testing of an extractor becomes more independent than others.
  • Faster and a more robust Approach

Q5: WHAT ARE VARIOUS WAYS TO MAKE GENERIC EXTRACTOR DELTA ENABLED?  

Ans:
This field from the extraction structure of a DataSource meets one of the following criteria:
1. The field has the following type: Time stamp. New records to be loaded into the BW using a delta upload have a higher entry in this field than the time stamp of the last extraction.
2. The field has the following type: Calendar day. The same criterion applies to new records as in the time stamp field.
3. The field has another type. This case is only supported for SAP Content DataSources. In this case, the maximum value to be read must be displayed using a DataSource-specific exit when beginning data extraction.

Q6: WHAT ARE SAFETY INTERVALS?

Ans
This field is used by DataSources that determine their delta generically using a repetitively-increasing field in the extract structure.
The field contains the discrepancy between the current maximum when the delta or delta init extraction took place and the data that has actually been read.
Leaving the value blank increases the risk that the system could not extract records arising during extraction.
Example: A time stamp is used to determine the delta. The time stamp that was last read is 12:00:00. The next delta extraction begins at 12:30:00. In this case, the selection interval is 12:00:00 to 12:30:00. At the end of extraction, the pointer is set to 12:30:00.
A record - for example, a document- is created at 12:25 but not saved until 12:35. It is not contained in the extracted data but, because of its time stamp, is not extracted the next time either.

Q7: HOW IS COPA DATASOURCE SET UP?

Ans:
R/3 System
1. Run KEB0
2. Select Datasource 1_CO_PA_CCA
3. Select Field Name for Partitioning (Eg, Ccode)
4. Initialize
5. Select characteristics & Value Fields & Key Figures
6. Select Development Class/Local Object
7. Workbench Request
8. Edit your Data Source to Select/Hide Fields
9. Extract Checker at RSA3 & Extract
BW System
1. Replicate Data Source
2. Assign Info Source
3. Transfer all Data Source elements to Info Source
4. Activate Info Source
5. Create Cube on Infoprovider (Copy str from Infosource)
6. Go to Dimensions and create dimensions, Define & Assign
7. Check & Activate
8. Create Update Rules
9. Insert/Modify KF and write routines (const, formula, abap)
10. Activate
11. Create InfoPackage for Initialization
12. Maintain Infopackage
13. Under Update Tab Select Initialize delta on Infopackage
14. Schedule/Monitor
15. Create Another InfoPackage for Delta
16. Check on DELTA Option
17. Ready for Delta Load

Q8: WHAT ARE VARIOUS WAYS TO TRACK DELTA RECORDS?

Ans:
RSA7, LBWQ, Idocs and SMQ1.

INFOSET


Infoset:
1       Actually Infoset works on the rule of join on DataStore objects, standard InfoCubes (Max 2 InfoCubes only we can use that to as Left Operand) and/or InfoObjects (characteristics with master data).
2       Sometimes we come across the scenarios where we have to build a report on two/more different data targets. In this case we can use Infosets which joins two/more data targets, and we can build Query on Infoset, which gets data from tables of Infoproviders.
      Do’s and Don’ts for InfoSets
  •        Do not use more than 10 InfoProviders in one InfoSet. It is better to create multiple InfoSets depending on reporting needs.
  •        Do not use more than 10 joins in one InfoSet (especially if you expect high a data volume).
  •       InfoSet queries can be used for DataStore objects without the activated BEx Reporting indicator.
  •      Do not use calculations before aggregation on InfoSet because this may lead to wrong query results.
  •        If there are InfoSets with time-dependent master data, do not restrict the data by the fields Valid from (0DATEFROM) and Valid to (0DATETO). 

MULTIPROVIDER

MultiProvider:

èMultiProvider is one of the virtual InfoProvider, but it does not hold any data physically inti and the data is collected when the queries are executed.

èMultiprovider enables you to combine other Infoproviders into Logical group.

èIt works on Union

èWe can built MultiProvider on the Top of InfoProviders Like
1).InfoObjec  ,
2).InfoCube, 
3).DSO,
 4).InfoSet, 
5).Aggregate Levels

Why do we use MultiProvider?
1     Actually sometimes we come across the scenarios like where we have to build a report on two/more different data targets. In this case we can use Multiproviders and we can build Query on Multiprovider, which gets data from tables of Infoproviders.


Tuesday, 7 January 2014

IDOCS IN SAP

IDocs are used in most of the SAP applications for transfer of message from SAP  to other systems and vice versa. A lot of documentation is available on web for IDocs but most of them are technical in nature.  This document is written from perspective of a functional consultant and this will help in dealing with support issues related to IDoc. An effort has been made to capture all the necessary information about IDocs that a functional consultant needs to be aware of.

OVERVIEW

IDoc is an SAP object that carries data of a business transaction from one system to another in the form of electronic message. IDoc is an acronym forIntermediate Document. The purpose of an IDoc is to transfer data or information from SAP to other systems and vice versa.  The transfer from SAP to non-SAP system is done via EDI (Electronic Data Interchange) subsystems whereas for transfer between two SAP systems, ALE is used.

IDoc can be triggered in SAP system or in EDI subsystem. This depends on the direction in which IDoc is sent and is called as Inbound IDoc and Outbound IDoc accordingly. In case of outbound flow, IDoc is triggered in SAP through document message control which is then sent to EDI subsystem. EDI converts the data from IDoc into XML or equivalent format and then sends the data to partner system through Internet.
For inbound flow, EDI converts partner data and IDoc is created in SAP. After successful processing of this IDoc, Application Document is posted in SAP.
1.png

EDI STANDARDS AND IDOC

“EDI is electronic exchange of business document between the computer systems of business partners, using a standard format over a communication network”. EDI stands for Electronic Data Interchange.

For transmission of information electronically, two widely used standards are ANSI ASC X12 and EDIFACT. ANSI ASC X12 is a committee formed by representatives of major organizations, government bodies and EDI software companies which defines standards and guidelines for information interchange over EDI. UN/EDIFACT stands for United Nations EDI for Administration, commerce and Transport and was formed in 1985 using ANSI X12 and UNTDI (United Nations Trade Data interchange) as base standards. ANSI X12 describes business document as transactions and each transaction is represented by three digit number e.g. 850 – Purchase Order, 855 - Purchase Order Acknowledgement. EDIFACT describes business document as messages, represented by standard names e.g. ORDERS for purchase order.

IDOC TERMINOLOGIES

IDOC (BASIC) TYPE
IDoc Types are based on the EDI standards and mostly on EDIFACT standards. 
Basic Types (or IDoc Type) defines the structure of an IDoc. Each basic type describes standard IDoc segments, format of data fields and their size. Basic Type also defines number of segments and fields in an IDoc. All the fields that are necessary for transmission of message for a particular business transaction are mapped in different segments. It also defines the structure and relationship of IDoc segments along with mandatory and optional segments.

2.png



IDOC EXTENSION
Basic type contains all the standard fields that are necessary for carrying out a business transaction. However, if any additional values are to be sent to the partner then we can make use of the IDoc Extension feature. IDoc extension is extension of basic type and contains additional custom IDoc segments and fields that are not available in standard basic type.


IDOC SEGMENTS
IDoc segments contain the actual data that is sent to or received from a partner. These segments contain the actual values that are sent as part of IDoc transmission.
3.png
PARENT AND CHILD SEGMENTS
IDoc segment is termed as Parent segment if it contains its own segments. The dependent segments are called as child segments.
4.png




INBOUND/OUTBOUND IDOCS
IDocs sent outside the system are termed as Outbound IDocs and the ones that are received into the system, are called as Inbound IDocs.

5.png
IDOC DIRECTION
This signifies the direction is which information is sent and is similar to terminology used in mails. If information is sent outside the system then the direction is outbox when it is received into the system then direction is inbox. In SAP Outbox direction is represent by “1” i.e. outbox and Inbox direction is represented by “2”.


6.png
PARTNER
Partner is the Business Partner with which the exchange of information is to take place using IDoc. It can be a vendor or customer or any other system. Depending on the direction of information in which the information is sent it plays a role of either a “sending partner” or a “receiving partner”.


7.png

PARTNER TYPE
Partner type/role is used to identify partners within the sap systems. Partner type is KU for customer, LI for vendor and LS for Logical System.
8.png



MESSAGE TYPE
IDoc processing involves transmission or receipt of document in the form of a message, each of which represents a document in SAP. These documents can be Order, Shipment Confirmation, Advance Shipping Notification, Goods Receipt, or Invoice.  Message type is associated with Basic IDoc Type (Basic Type) and defines the kind of data or document that is exchanged with the partner.

PROCESS CODE
The process code contains the details of the Function Module that are used for IDoc processing. Message Type can be linked to the Process code.


PORT
IDoc Port contains the information about the way data is sent between the source or target system. The type of port defines the information contained within the port. For port type “Internet” Port will contain IP address of the target system. For port type “file”, directory or file name information is maintained. “tRFC” port contains information about the RFC destination of the target system. For IDoc transmission using ALE “tRFC” ports are used.

PARTNER PROFILE MAINTENANCE

PARTNER PROFILE (WE20)
Partner profile must be maintained for all the business partners to whom we want to send or receive the IDocs. The TCODE for maintaining the partner profile is WE20.

9.png

Double clicking on the Partner will show the following screen:

20.png
Partner profile contains parameters for Inbound and Outbound processing of IDocs. For each message type we can maintain, inbound/outbound options, message control, post processing options and contact information within Inbound and outbound parameters.

OUTBOUND OPTIONS (OUTBOUND PARAMETERS)
This involves sender/receiver port, Output mode and relation to IDoc type i.e. Basic Type and extension.
21.png

MESSAGE CONTROL (OUTBOUND PARAMETERS)
This contains application for which IDoc will be created e.g. EF for Purchase order, the message type of the application that will trigger the IDoc and Process Code that will convert SAP document to an IDoc. For example, if PO is to be sent to the Vendor AXXXXZ, then in the outbound option of the partner AXXXXZ we need to maintain the message type ZXX1 and link it to the Process Code ME10. So when message type ZXX1 is triggered in the PO then an IDoc will be created for the partner vendor AXXXXZ.

Process Code is linked to the Function Module in SAP that converts application data into an IDoc. Standard function modules are provided by SAP for this conversion however these can also be customized as per business needs.

22.png
Change Message Indicator indicates whether the IDoc is sent as a notification of change. For example, Purchase Order change messages are sent to vendor using EDI standard message type 860. 
24.png
Separate message type should be triggered in the purchase order for PO change. Additional line with change message type must be added in the Message control tab with change message indicator on.

10.png

INBOUND OPTIONS (INBOUND PARAMETERS)

For inbound options process code is maintained in the Inbound screen only. IDoc processing can be triggered by background program and triggered immediately.


11.png

POST PROCESSING (INBOUND/OUTBOUND PARAMETERS)

In the post processing option we can maintain the workflow details of the users or positions to which an error notification will be sent if an IDoc processing fails.

25.png
TELEPHONY (INBOUND/OUTBOUND PARAMETERS)
We can also maintain the contact details in the telephony option.
12.png

EDI STANDARD (OUTBOUND PARAMETERS)
EDI standard screen contains the details of the Standard EDI terminology used for the IDoc transmission.

26.jpg
For example, Message Type 850 is an EDI standard for Purchase Order IDoc and is linked to IDoc Message Type Orders.

IDOC STRUCTURE AND RECORDS

STRUCTURE
IDoc structure is divided into Control Record, Data Records and Status records.
27.png



These records are stored in the transparent tables in SAP. These are EDIDC, EDID4 and EDIDS.

CONTROL RECORD (EDIDC)
It contains information such as IDoc number, direction, IDoc Status, Basic Type, Message Type, Partner (Sender/Receiver), date and time of creation/update, Interchange File or ISA number,etc.

28.png
29.png



DATA RECORD (EDID4)
It contains the details of the IDoc segments.

30.png
IDoc segment has fields that contain the data necessary for posting the documents.


31.png
32.png



STATUS RECORDS (EDIDS)
IDoc Status defines the processing status of the IDoc. IDoc statuses are used to track the IDoc and its various processing states. Status Numbers represents IDoc status. Current status of the IDoc is present in Control record.

33.png
Initial Status numbers are 64 for inbound and 03 for outbound. Successful status is 53 for inbound and 16 for outbound IDocs.

SENDING AND RECEIVING IDOCS

TRIGGERING AN OUTBOUND IDOC
Outbound IDocs can be triggered from the output message types of Purchase Orders, deliveries, Material Documents, invoices, etc. The following figure shows that once the output ZXX1 of PO XXXXXXX1 is processed an IDoc “000000XXXXXXXXX1” is added/created.

34.png
The relationship between the IDoc and the application document can be found in two ways:
1. Relationship tab of IDoc
35.png
36.png


2. Relationship tab of Application Document, e.g. PO, SO, Material Document, etc.

37.png
The initial status of this IDoc will be 30, which after successful processing will convert into status 16.
38.png

A successful outbound IDoc will pass through all the above statuses in reverse order (01-03-18-06-12-16). Each status represents an IDoc validation step. If an IDoc passes all the validations it would reach status 16. These different validation steps for outbound IDocs are explained below:

01: IDoc generation successful
30: IDoc is ready to be processed by IDoc Processing job
03: IDoc data is passed to the Port
18: IDoc successfully triggered EDI subsystem
06: IDoc data translated to EDI format
12: IDoc is dispatched successfully to the partner
16: Partner has received the IDoc successfully

IDoc can possibly fail at any of the above steps during validation.

RECEIVING AN INBOUND IDOC
The initial status of an inbound IDoc is 64 and successful status is 53.

Different validation steps for inbound IDocs are explained below:
50: IDoc received successfully in the system
64: IDoc is ready to be processed by IDoc processing job
53: Application document created and saved successfully. The document number can be found by expanding the status node 53
39.png
40.png
An inbound IDoc goes through all the above statuses in reverse order (50-64-53).

IDOC PROCESSING

AUTOMATIC/IMMEDIATE PROCESSING
In this case, IDoc are processed immediately as they generated or added in the system. The check “Transfer IDoc immediately” is selected in Outbound Options and “Trigger Immediately” is selected in Inbound Option. These checks are generally used when the real time information exchange is necessary between two systems.

41.png
13.png

MANUAL PROCESSING
IDocs can also be manually processed using the TCODE BD87 in SAP.

PROCESSING VIA BACKGROUND JOB
IDoc processing by background is the most preferred way of processing the IDocs. Following Programs are used from processing the IDocs using background job:
RBDAPP01 - Inbound IDocs
RSEOUT00 - Outbound IDocs

REPROCESSING IDOCS

On the basis of IDoc statuses different programs can be used for reprocessing of failed IDocs. These are given below:


TESTING AND EDITING IDOCS

If an IDoc contains error in the data then such IDocs can be edited using TCode WE02 or WE05. When an IDoc is edited the original IDoc information(backup) is saved in a New IDoc under status 70 (for inbound) / 33 (for outbound). These IDoc stays in the system for reference only and cannot be processed. The status of the edited IDoc becomes 69 (inbound) and 32 (outbound). These IDocs can then be processed using BD87 transaction or batch jobs.

Debugging of IDocs can be done using by copying the IDocs using TCodeWE19. WE19 is a test tool for Idocs processing. WE19 copies the existing idoc and creates a new IDoc which can then be modified as per testing needs. The newly generated IDoc can also be processed using BD87.

CONVERTING IDOC STATUS

Report RRC1_IDOC_SET_STATUS can be used to change the status of IDoc. Status changes are generally needed to move an IDoc to status 68 – no further processing
14.png

SEARCHING IDOCS IN SAP

TCODE WE02/WE05: GENERAL SEARCH
IDocs can be displayed in system via TCODE WE02 and WE05. If IDoc number is not known then  search can be made on the basis of IDoc Date, Direction, BASIC TYPE, MESSAGE TYPE, and PARTNER NUMBER.Partner number can  be found in the Output Messages of the documents.

15.png
42.png

IDoc search can also be made on the basis of ISA or Transfer file Reference.
16.png

TCODE WE09: SEARCHING DATA IN IDOC SEGMENTS
If we are looking for specific information within the IDocs Segments then this can be found using TCODE WE09. This is useful if you are searching for a particular information in similar kind of IDoc within IDoc segments. For example, if you want to search a particular Purchase Order number e.g. 100000001 in multiple IDocs which lies in Segment E1EDK01 of an IDoc under field BELNR. Then the search can be executed in the following manner.
43.png

IDOC VALIDATIONS, COMMON IDOC ERRORS AND SOLUTION

17.png
Though, the IDoc failure may not be related to any of the above mentioned reasons, the best way to find the IDoc error is to compare the existing IDoc with the good example. Good example IDoc can be easily searched with any of the IDoc search methods as described above.

DOCUMENTATION FOR IDOC TYPES

IDoc documentation can be found using TCODE WE60 and can be helpful to obtain information of the IDoc Type or its particular segment. It also provides information such as  mandatory and optional segments, minimum and maximum number of segments, etc.
44.jpg

GENERAL INFORMATION FOR COMMON IDOC MESSAGE TYPES

The following list gives the Basic Type and Message Type combination for common idocs



ARCHIVING/DELETION OF IDOCS FROM DATABASE

As IDocs grow older they are archived and deleted from the database. Archived IDocs can be viewed using TCODE SARI in Achieve Explorer using archiving object as IDoc. Following are the few programs that are used for archiving and deletion of IDocs from database.