Thursday, July 2, 2015

SAP ABAP ALV

There are total four types of views, based on the way in which the view is implemented and the methods that are permitted for accessing the view data. They are - Database Views, Projection Views, Maintenance Views, and Helps Views,.


Among these four types of database views, only 'Database Views' implements INNER JOIN, rest all implements an OUTER JOIN. The detail description of each views has been discussed further below.

- Database View (SE11)

Database views are implement an inner join, that is, only records of the primary table (selected via the join operation) for which the corresponding records of the secondary tables also exist are fetched. Inconsistencies between primary and secondary table could, therefore, lead to a reduced selection set.

- Help View ( SE54)

Help views are used to output additional information when the online help system is called.

When the F4 button is pressed for a screen field, a check is first made on whether a matchcode is defined for this field. If this is not the case, the help view is displayed in which the check table of the field is the primary table. Thus, for each table no more than one help view can be created, that is, a table can only be primary table in at most one help view.

 - Projection View

Projection views are used to suppress or mask certain fields in a table (projection), thus minimizing the number of interfaces. This means that only the data that is actually required is exchanged when the database is accessed.

A projection view can draw upon only one table. Selection conditions cannot be specified for projection views.

- Maintenance View ( SE54 )

Maintenance views enable a business-oriented approach to looking at data, while at the same time, making it possible to maintain the data involved. Data from several tables can be summarized in a maintenance view and maintained collectively via this view. That is, the data is entered via the view and then distributed to the underlying tables by the system.
========================================================================
ABAP Reports:
classical and interactive:
- SY-LSIND - list number from 0 to 21.
- SY-lisel - contains data of selcted line.
- Interactive report events:

  1. At line selection
  2. AT user command 
  3. AT PFn
  4. TOP-OF-PAGE during line selection

ABAP Report Types
ABAP report types are those ones available in some report's attributes screen, i.e. :
Executable program
Function group (containing function modules)
Include
Interface pool
Class pool
Module pool
Subroutine pool
=======================================================================

========================================================================

ABAP List Viewer :
Also ALV means ABAP List Viewer. Most convenient way to use it is through reuse library (cf. transaction se83) available from release 4.6 of SAP R/3.
ALV is available in two modes: list and grid. List mode is good old list processing with standard functionnalities, and grid mode is using a new OCX object displaying grids 

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
            I_CALLBACK_PROGRAM       = 'Prog.name'
            I_STRUCTURE_NAME         = 'I_ITAB'
            I_DEFAULT                = 'X'
            I_SAVE                   = 'A'
       TABLES
            T_OUTTAB                 = I_ITAB.
  IF SY-SUBRC <> 0.
    WRITE: 'SY-SUBRC: ', SY-SUBRC .
  ENDIF.

- FM REUSE_ALV_COMMENTRY_WRITE to add logo in your report output.
- you can first upload image in tcode OAER.

- REFRESH_TABLE_DISPLAY to refresh the alv grid.
- I_SOFT_REFRESH , used to display only Icons.
========================================================================

SALV:

        CALL METHOD CL_SALV_TABLE=>FACTORY
          IMPORTING
            R_SALV_TABLE = O_ALV
          CHANGING
            T_TABLE      = T_MARA.
      CATCH CX_SALV_MSG INTO LC_MSG .
    
* Calling Set PF status method
    CALL METHOD SET_PF_STATUS
      CHANGING
        CO_ALV = O_ALV.       "set_end_of_page
* Calling the top of page method
    CALL METHOD SET_TOP_OF_PAGE
      CHANGING
        CO_ALV = O_ALV.
* Calling the End of page method
    CALL METHOD SET_END_OF_PAGE
      CHANGING
        CO_ALV = O_ALV.
************************************************************************
* Displaying the ALV
* Here we will call the DISPLAY method to get the output on the screen
************************************************************************
    O_ALV->DISPLAY( ).

 METHOD SET_TOP_OF_PAGE.
    DATA: LO_HEADER TYPE REF TO CL_SALV_FORM_LAYOUT_GRID,
          LO_H_LABEL TYPE REF TO CL_SALV_FORM_LABEL,
          LO_H_FLOW  TYPE REF TO CL_SALV_FORM_LAYOUT_FLOW.

========================================================================
Reuse_ALV_GRID:
ALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        i_callback_program          = sy-repid
        i_callback_top_of_page      = 'TOP-OF-PAGE' "see FORM
        i_callback_html_end_of_list = 'END_OF_LIST_HTML' "see FORM

*       is_layout                   = gd_layout
        it_fieldcat                 = li_fcat[]
        i_save                      = 'X'
      TABLES
        t_outtab                    = li_mara
      EXCEPTIONS
        program_error               = 1
        OTHERS                      2.
========================================================================
SPILIT Container :

  1. Create a custom container for  cl_gui_custom_container.
  2. Create O_DD_DOC for CL_DD_DOCUMENT.
  3. Create split container for CL_GUI_SPLITTER_CONTAINER for 2 rows and 1 column.
  4. create 2 containers for CL_GUI_CONTAINER.
  5. Assign first part of ( row 1 ) to container 1.
  6. Assign part 2 to container 2.
  7. Create a grid for container 2 for CL_GUI_ALV_GRID.
  8. Then create a local class and method for TOP_OF_PAGE event of grid.
  9. do set handler and rise event,
  10. ADD_TEXTADD_PICTUREADD_GAP, etc. ADD_TEXT is used to add the text and also you can specify the color,font size,font type.


Friday, June 19, 2015

SP ABAP : Performance Tuning

What tools can be used to help with performance tuning?

  1. ST05 : this is used to trace performance of the program. it trace SQL performance and mainly used to trace the performance of the select statements used in the program.
  2. SAT : used to measure the application performance. it analyse the runtime performance of the program.
  3. ST12 : this is combination of ST05 and SAT transactions.
  4. EPC (Tcode SLIN) and CI (Tcode SCI ) tools.

What are the steps to optimize the ABAP Code?

http://wiki.scn.sap.com/wiki/display/ABAP/ABAP+Performance+and+Tuning
  1. DATABASE
    1. Use WHERE clause in your SELECT statement to restrict the volume of data retrieved.  Very important !!
    2. Design your Query to Use as much index fields as possible in your WHERE statement
    3. Use INNER (or OUTER under some circumstances) JOIN in your SELECT statement to retrieve the matching records at one shot
    4. Avoid using nested SELECT statement and SELECT within LOOPs, better use JOINs or FOR ALL ENTRIES. Use FOR ALL ENTRIES when  the internal table is already there or the end of some processing. Try JOINs if the SELECT are right behind each other
    5. Avoid using INTO CORRESPONDING FIELDS OF TABLE during buffered access. Otherwise use the most appropriate for the program.
    6. Avoid using SELECT * and Select only the required fields from the table.
    7. Avoid using ORDER BY in SELECT statements if it differs from used index  (instead, sort the resulting internal table), because this may add additional work to the database system which is unique, while there may be many ABAP servers
    8. INDEX: Creation of Index for improving performance should not be taken without thought. Index speeds up the performance but at the same time adds two overheads namely; memory and insert/append performance. When INDEX is created, memory is used up for storing the index and index sizes can be quite big on large transaction tables! When inserting new entry in the table, all the index's are updated. More index more time. More the amount of data, bigger the indices, larger the time for updating all the indices
    9. Avoid Executing an identical Select (same SELECT, same parameter) multiple times in the program. Buffer in your abap code.
    10. Avoid using join statements if adequate standard views exist no performance impact
  2. TABLE BUFFER:
    1. Defining a table as buffered (SE11) can help in improving the performance but this has to be used with caution. Buffering of tables leads to data being read from the buffer rather than from table. Buffer sync with table happens periodically, only if something changes which is happen rarely. If this table is a transaction table chances are that the data is changing for a particular selection criteria, therefore application tables are usually not suited for table bufferung. Using table buffering in such cases is not recommended. Use Table Buffering for configuration data and sometimes for Master Data.. 
    2. Avoid using complex Selects on buffered tables-, because SAP may not be able to interpret this request, and may transmit the request to the database- The code inspector tells which commands bypass the buffer
  3. Internal tables
    1. Use HASHED tables where-ever possible. Otherwise SORTED tables. STANDARD tables should be the last choice.
    2. Use assign instead of into in LOOPs for table types with large work areas, if the data is being modified.
    3. When in doubt call transaction SE30/SAT and check your code.
    4. If you must use a STANDARD table and you are using a READ, sort the table appropriately and use the addition BINARY SEARCH to speed up the search. 

  4. http://wiki.scn.sap.com/wiki/display/ABAP/ABAP+Performance+and+Tuning
  5. Use SLIN and code inspector tools.











Thursday, June 18, 2015

SAP ABAP : SD Brief

SD Flow:

INQUIRY->QUOTATION->SALE ORDER->Delivery->SHIPPING->BILLING-

  1. Customer's Inquiry 
  2. Customer request a quotation - created referring inquiry 
  3. Sales Order creation - created referring quotation.(  when customer placed an order )
  4. Shipping - Ship the goods to customer
  5. delivery
  6. Billing/Invoicing
  7. Post goods Issue
Transaction Codes:
  1. Inquiry : VA11/VA12/VA13
  2. Quotation : VA21/VA22/VA23
  3. Sales Order : VA01/VA02/VA03 - VBAP VBAK
  4. Delivery : VL01N/VL02N/Vl03N - LIKP LIPS
  5. Shippment :  VT01/VT02/VT03 - VTTK VTTP
  6. Billing  : VF01/VF02/VF03 : VBRK VBRP
  7. Invoice : VF21 : VBRK VBRP
SD Master Data : 
  1. Condition Master data 
    • Pricing data
    • Rebate data
    • output master data
  2. Customer master data XO01/XO02/XO03
  3. Material master data  
  4. CUST/MAT Info record  VD51
    •  mapping of customer name of material to sap name of material.
  5. Output master master data (Optional) 

========================================================================

Below is the standard sales and distribution(SD) document flow in SAP .
VBFA is the document flow table

INQUIRY

VA11 is the T-code for inquiry and related tables are VBAK, VBAP.Once inquiry is done customer requests quotation.

QUOTATION

T-code for quotation in VA21, tables are VBAK, VBAP.After quotation flow goes for purchase order.

PURCHASE ORDER

Purchase order t-code is ME21N, related tables are EKKO, EKPO.Based on purchase order sales order will be created.

SALES ORDER

Sales order t-code is VA01, related tables are VBAK, VBAP. Once sales order is created, delivery will be done.

DELIVERY

T-code for delivery order is VL01N, tables are LIKP, LIPS. Next the goods should be dlivered through shipping

SHIPPING

Shipping t-code is VT01, related tables are VTTK, VTTP.Once goods are shipped, go for billing.

BILLING

Billing t-code is VF01, tables are VBRK,VBRP. Every bill has invoice...next provide invoice.

INVOICE

Invoice t-code is VF21, related tables are VBRK, VBRP.Invoice end of sales flow.
=================================================================================

Enhancement Scenario:
  • Addition of tab , Item Level : VF01 SD Invoice
    • http://wiki.scn.sap.com/wiki/pages/viewpage.action?pageId=235803375
    • Step 1 : Got to SE11 table VBRP
    • Step 2 : Add a Z structure to this table with one field Zadd for example.
    • Step 3 : Create a Z program and write code to that program.
    • Step 4 : add layout in the screen of this Z program. use structure field.
    • Step 5 : Go to SE80 and give th eprogram name of the VF01 Transaction. (SAPMV60A)
    • Step 6 : Find enhancement point and implement it with following logic:
      • Implement CUST_ITEM_ACTIVATE 
=================================================================================
VOFM : 
  • VOFM routines are ABAP code written in Forms.
  • VOFM provides the user with the benefit of choosing from one of the standard delivered by SAP or writing their own.
  • VOFM basically is for the implementation team and not for the end user.
  • Copying Requirements : This is provided by SAP to support SD and logistics requirements.
  • In each area of VOFM, SAP delivers routines using the name space from 1 to 599.
  • SAP customers can create their own VOFM routines using the name space from 600 to 999.
  • New VOFM routines created at a customer site are not overwritten by a software upgrade.
  •  http://www.newtosap.info/2014/01/vofm-routinesa-short-guide.html
  • VOFM routines can be used to propose/alter the business process and it can be triggered for particular condition. Ex: Pricing condition ZCIL which will trigger the routine whenever it’s used.
  • There are various categories in VOFM like Data Transfer, Requirements, Formulae’s etc. Depending upon the category, the routine or exit will be called. Ex: any routine done in Formula’s category will be triggered during the computation of formula of a particular pricing condition. One has to choose the correct category and create a new routine.
  • V/08 for assigning routine number to the required pricing procedure.
  • http://www.saptechsolutions.com/pdf/InsideVOFM.pdf
=====================================================================


Condition Record: 
  • The following new transactions are offered:
    • Create conditions (transaction VK31)
    • Create conditions with reference (transaction VK34)
    • Change conditions (VK32)
    • Display conditions (VK33)
========================================================================Enterprise structure in SD : 
  1. Client  - TATA
  2. Company Code - TCS  
  3. Sales Area :
    • Sales Organisation (Delhi) 
    • Distribution channel (online, retail store)
    • Division 
  4. Plant
  5. Shipping Point 
  6. Loading Point 

Element of SD Org Structure:

    • Sales Organization
    • Distribution Channel
    • Division
    • Sales Office
    • Sales Group
  • Internal structure: 
    • Sales Office
    • Sales Group
    • Sales Person 
========================================================================

Shipment Process in SAP SD : ( http://scn.sap.com/docs/DOC-45032 )

1. Creation of Sales Order - VA01
2. Creation of Outbound Delivery - VL01N

Shipment process will start form here
 3. Creation of Condition Record for Forwarding Agent, : VK11
  • Give condition type (we can create them by copy standard)
  • Give the service agent and Tf zone point of dep.
  • give the Amount unit and save it .
Service Agent used to calculate net amount in the Shipment cost doc.

 4. Creation of Shipment Document : VT01N
(Note- Shipment document we can create with reference to outbound delivery before PGI or after PGI)
  • A shipment document will be created against one or more delivery.
 5. Creation of Shipment Cost Document VI01
   A) PO and service entry sheet will be created automatically by the system.
 6. Enter Vendor’s Invoice (Invoice receipt and verification). MIRO
======================================================================== 






Saturday, June 13, 2015

SAP ABAP MACRO

Syntax : 

define Macro1.
....&1... &2...
end-of-definition.

Only used in local program.
Mainly abbreviation for some line of codes in a program.
we cannot debug so we should avoid using macros.

Friday, June 5, 2015

SAP ABAP : Control break events

These events are used inside the loops in ABAP program. There are 5 such events available in ABAP:

  1. AT FIRST - ENDAT
    • Will trigger at the first run of the loop.
  2. AT NEW - ENDAT
    • Will Trigger when new value for the applied field.
  3. AT END OF - ENDAT
    • will trigger for the last occurrence of the same value in the applied field.
  4. AT LAST - ENDAT
    • Will Trigger withe the last run of the loop,
  5. ON CHANGE OF
    • Trigger every time change in the value of applied filed. can also be used outside loop.
We must use a temporary workarea to display values in the 3 (2,3,5) control events. otherwise we get values like ***.


SAP ABAP : ENHANCEMENT

https://sites.google.com/site/programminginterviewquestions/enhancements

http://sapignite.com/sap-abap-interview-questions-and-answers/


1. What are the different ways in which you can make changes to SAP standard software ?

Customizing

Enhancements to the SAP Standard

Modifications to the SAP Standard

Customer Development

1. Source code enhancements (plug-ins)
2. Function group enhancements
3. Class Enhancements
4. Kernel-BADI enhancements

New BADI/KERNEL BADI : GET BADI/CALL BADI
Classic BADi : CAll cl_exithandller->get_instance

===========================================================

Enhancement :

    • Whenever we need to enhance any standard SAP delivered functionality by introducing new code. there are several ways to achieve this:
      • Code Modification : This required access key. not recommended. 



      • User Exits : there are some routines in the standard code start with USEREXIT_*. These subroutines are delivered by SAP but you can add code to them. this is manageable because they are in a single include.
        • To find user exits in SD :
          • Got to SE80
          • Select package VMOD
          • we have all the includes for user exits
        • In user Exit MV45AFZ1 we have subroutine userexit_save_document_prepare this can be used to add checks before a document saved. (VL02 ).
        • In user exit MV45AFZZ (sales order exit ), USEREXIT_MOVE_FIELD_TO_VBKD
      • Customer Exits : Function module not delivered by SAP. we can implement our code.  customer exits are nothing but a include in customer name space will be provided in the function module which starts with CALL CUSTOMER.
        • SAP creates customer exits for special programs, screens, menus within standard applications.
        • Type of customer exit
          • Screen exit : Call Customer Sub ScR
          • function module exit : Call Customer Function
          • menu exit : +US00 
      • BADI (Business add ins):
        • are based on oops concept.
        • multiple implementation.
        • Filter Badi.
  • Enhancement Point and enhancement section
      • Enhancement point does not offer any default code implementation whereas Section offers a default logic between ENHANCEMENT SECTION and END ENHANCEMENT SECTION. whenever you implement enhancement section standard automatically insert this logic to your code, you may keep it or may not.
      • ENHANCEMENT-POINT is the empty placeholder for the code where as ENHANCEMENT-SECTION is the placeholder with default code.
      • Enhancement point are provided on some specific place whereas the enhancement section is there to replace some special lines of code.
  • Implicit Enhancement Vs Explicit Enhancement
      • Implicit Enhancement are provided by SAP at the beginning and End of code blocks like subroutines, type definitions etc.
      • Explicit enhancements you can implement anywhere in the code.
      • Here is both of the options mean:
        • Declaration – When you choose this type, the implementation would be created and treated as Static implementation. Means, it would be always available in all the clients.
        • Code– When you choose this option, the implementation would be Dynamic implementation. It would be only called based on switch’s status if the switch is assigned.
===========================================================

Classic BADI : ME_PROCESS_PO_CUST /DOCUMENT_AUTH02
New BADI : DOCUMENT_STATUS02 / DOCUMENT_STATUS





SAP ABAP Web Services

Internal Session - call transaction / call screen / call dialog - export /import - ABAP Memory
External Session - new session within SAP - SPA?GPA - SAP Memory


SOAP - Simple Object Access Protocol
XML - eXtensible mark up language
WSDL - Web Service Definition Language
UDDI - Universal Description , Discovery and Integration 


What is Web Service ?

  • The web service is a system of communication using SOAP protocol over the web.
  • Web service is based on :
    • SOAP protocol to exchange data
    • WSDL to declare description
    • UDDI to reference the service 
WS Provider:
  • This is a service provided by the SAP to the outside world.
Security level in the WEB service configuration in SAP ABAP
  • This level of security is a incident in SOAMANAGER configuration. the level determine the minimum authentication required for a web service.
    • High - HTTPS with heavy authentication 
    • Medium - Basic authentication (user/pwd) with SSL (SSL is a technique for encryption)
    • Low - Basic authentication (user/pwd) without SSL
    • No - No Authentication is required
Customize the Web Service
  • Go to SOAMANAGER and create binding for the web service.
  • generate WSDL for the binding.
  • then we can use binding URL for the use of this web service.
  • Other service can use this WSDL to access this provider web service.
WS Consumer:
  • Create Consumer from SE80.
  • Create Port using SOAMANAGER
  • Execute consumer from SE80



Wednesday, May 27, 2015

SAP ABAP ALE IDOC 2

SAP ABAP  ALE IDOC 2
  1. Steps to create a ALE system:
    1. Go to transaction SALE.
    2. Name a logical system. (<server_name>CLNT<client_number>)
      • S21CLNT800
    3. Assign logical system to the client.
      • Sender S21
    4. DO both the above steps in target system too. create a logical system and assign this to a client.
    5. Go to transaction SM59 in source system, to create an RFC connection to the target system.
    6. Test the connection and test remote login.
    7. Create a Port using transaction WE21.
    8. Goto transaction BD64 to create model view. (only if you have two different systems)
      • Add message type
      • create partner peofile
    9. GO to transaction BD10 to send a material (MATMAS)
    10. in target system goto transaction BD11 and check the same material you going to receive.
    11. BD12 to send a customer.
    12. BD13 to get a customer.
    13. BD87 to process Idocs which are in error.
    14. WE19 is a test tool for Idocs.
    15. WE09 to search data in Idoc segment.
    16. Function Module MASTER_IDOC_DISTRIBUTE to create an outbound Idoc in your system.
=============================================================
Common steps :

1) Define Logical system @ sender (SALE)  : S21CLNT811
   S21CLNT800

In any distributed environment, each participating system must have a unique ID to avoid confusion. In SAP, the name of the logical system is used as the unique ID. This name is assigned explicitly to one client in an SAP system.

2) Assign Logical system to Client (SALE) : Client 811 IDES-ALE: Production
           Client 800 Sender S21
3) Configuration of RFC connection (SM59) : RFC Destination     S21CLNT811 
   RFC Destination     S21CLNT800
4) Test Connection (SM59).
5) Creating RFC ports (WE21): A000000077
A000000079
=============================================================

=============================================================

For example two clients in the same R/3 instance.

Client 900 = 800 source system   table ZDC_HBHT_IDOC_2 with data

Client 800 = 811 reciever system table ZDC_HBHT_IDOC_2 without data


To transfer the data between two clients the table structures and their data types should be match.  

In this example, Client 900 is Source system, and Client 800 is destination system.

In Client 900 I have created a customized table and inserted some records.

In Client 800 I have created only table. 
=============================================================


Steps in Client 800:
1) Create Segment ( WE31 )      : ZSEG_HT
2) Creating Basic IDOC Type ( WE30 )      : ZIDC_HB 
3) Realease Basic Type IDOC ( WE30 Menu ) : 
4) Creating message Type   ( WE81 )      : ZMSG_HT
5) Assign Message Type to Basic IDOC Type (WE82) :   
6) Creating Model View and Distributing and Generating Partner profile (WE20) (BD64): ZMV_HBHT 
Target system S21CLNT811                  
Model view ZMV_HBHT has been created
7) Partner : S21CLNT811

8) Create reportZ_HBHT_TEST_IDOC_SENDER      : Idoc Generated 0000000001037851

=============================================================
Steps in Client 811:
1) Create a function module      : Z_HBHT_IDOC_RECIEVER
2) Assign FM to Logical Message (WE57): Z_HBHT_IDOC_RECIEVER Function module ZIDC_HB ZMSG_HT Inbound Message Type
3) Define Input Method for Inbound Function Module              (BD51): Z_HBHT_IDOC_RECIEVER 2
4) Creating Process Code: (WE42): ZPCD
5) Generating the Partner Profile (BD64): Partner No. S21CLNT800
6) Transferring the IDOC control records from Client 900 to 800      : Idoc Generated 0000000001037852 in sender 
======================================================================


========================================================================
To communicate with each other. SAP has designed for R/3 systems its own communication tool IDocs, it is even possible, using a middle ware EDI system, to have R/3 system communicate by Idocs on its side, with an open system by XML files on the other side,

    1. Idoc segment  : A segment is a record, defined as such in the database vocabulary. There is no hierarchical structure within the segment.
    2. Sections: An Idoc is made of three sections. control data and status. control section have only single segment, whereas other two sections may have one or more segments.
      • Status section is not transported with the Idoc, only control and data sections are. status is taken from the last segment in the idoc status section.
        • Status
        • Message
      • Control section represents the header section of an Idoc, it contains information about both sender and receiver systems.
        • Idoc Number
        • Direction (1 for outbound , 2 for inbound)
        • Status : current status of Idoc.
        • Basic Type
        • Extension Type
        • Message Type
        • Sender or Receiver information
        • Port
        • Partner number
        • Partner Type (LS, KU, Vendor, ...)
        • SAP Release version number of the Idoc.
        • Output Mode : 2 for immediate sending , collective sending.
      • Data Section :it contains one or many segments which are arranged in hierarchical order. there is a concept of child and parent segment,  a child segment may not exist if there is not the parent segment.
        • Every segment of the data section must have character field format.
    3. Structure of interface:
      • A view of the distribution mode
      • No, one or many filters
      • A sending system
      • A receiving system
      • A message Type
      • For outbound process:
        • A port to emit to
        • An output mode
        • A packet size
        • A basic IDoc type
      • For inbound interface
        • A process code
    4. View of the distribution model is only obligatory if filters need to be applied. BD64.
    5. Message Type and Basic Idoc Type:
      • A message Type is conceptually represents nature of the Idoc.
      • MATMAS is a message type which belong to many Idoc Type Like MATMAS01, MATMAS02 etc..

    6. Partner profiles: Dealing with every interface which do not have filters.
========================================================================
Idoc Important tables:
  • EDCIM : extension Type
  • EDCIMT : Description for the Idoc Type
  • EDADMDEB : Storage of debugger setting
  • EDBAS : Basic Idoc Types
  • EDBAST : store the description for the basic Idoc Type
  • EDE1T : text table fro outbound process code
  • EDE2T : text table for inbound process code
  • EDE5T : Text table for error processing process code
  • EDE6T: text table for process code for inbound process code
  • EDID4 : Idoc data record fro ECC 4.0
  • EDIDD_OLD : Idoc data record
  • EDIDOT : Short description for I doc Type
  • EDIFCT : IDoc: Assignment of FM to log. message and IDoc type
  • EDIMSG : Output types and assignment to Idoc types
  • EDIPOA : Table for ALE port definition
  • EDIQI : Rfc queue for inbound Idoc
  • EDIQO : Rfc queue for outbound 
  • EDISDEF : Segment Definition for Idoc
  • EDP12: 
  • EDP13: Partner profiles (outbound ) 
  • EDP21 : Partner profiles ( Inbound ) 
  • TEDE1: Process code for output type
  • TEDE2: Process code for input type
========================================================================
Customizing an outbound Interface:
  1. Creation of a new segment type WE31
  2. Creation of new Idoc Basic Type WE30
  3. Creation of new message type WE81
  4. Association with message type to Idoc type : WE82
  5. Launch BD64 (display Distribution Model ) 
    1. Create distribution model
    2. Distribute the distribute model view
    3. Generate and manage partner profile
  6. BD59 : 
Integration of an inbound Idoc :
  1. BD51  : used to register to a function module.
  2. WE57 : function module integrated to a message type.
  3. WE42 : used to inbound process code integration 
  4. WE41 : used to outbound integration
4.1 Useful transactions for IDocs
BD87 : Status Monitor for ALE Messages
SALE : Display ALE Customizing
WE02 : Display IDoc
WE05 : IDoc Lists
WE09 : Search for IDoc in Database
WE19 : Test tool

4.2.1 Outbound IDocs statuses
Statut Description
0 Not used, only R/2
1 IDoc generated
2 Error passing data to port
3 Data passed to port OK
4 Error within control information of EDI subsystem
5 Error during translation
6 Translation OK
7 Error during syntax check
8 Syntax check OK
9 Error during interchange handling
10 Interchange handling OK
11 Error during dispatch
12 Dispatch OK
13 Retransmission OK
14 Interchange Acknowledgement positive
15 Interchange Acknowledgement negative
16 Functional Acknowledgement positive
17 Functional Acknowledgement negative
18 Triggering EDI subsystem OK
19 Data transfer for test OK
20 Error triggering EDI subsystem
21 Error passing data for test
22 Dispatch OK, acknowledgement still due
23 Error during retransmission
24 Control information of EDI subsystem OK
25 Processing despite syntax error (outbound)
26 Error during syntax check of IDoc (outbound)
27 Error in dispatch level (ALE service)
28 Not used
29 Error in ALE service
30 IDoc ready for dispatch (ALE service)
31 Error - no further processing
32 IDoc was edited
33 Original of an IDoc which was edited
34 Error in control record of IDoc
35 IDoc reloaded from archive
36 Electronic signature not performed (timeout)
37 IDoc added incorrectly
38 IDoc archived
39 IDoc is in the target system (ALE service)
40 Application document not created in target system
41 Application document created in target system
42 IDoc was created by test transaction

4.2.2 Inbound IDocs statuses
Status Description
50 IDoc added
51 Application document not posted
52 Application document not fully posted
53 Application document posted
54 Error during formal application check
55 Formal application check OK
56 IDoc with errors added
57 Test IDoc: Error during application check
58 IDoc copy from R/2 connection
59 Not used
60 Error during syntax check of IDoc (inbound)
61 Processing despite syntax error (inbound)
62 IDoc passed to application
63 Error passing IDoc to application
64 IDoc ready to be transferred to application
65 Error in ALE service
66 IDoc is waiting for predecessor IDoc (serialization)
67 Not used
68 Error - no further processing
69 IDoc was edited
70 Original of an IDoc which was edited
71 IDoc reloaded from archive
72 Not used, only R/2
73 IDoc archived
74 IDoc was created by test transaction

============================================================================================================
configuration of IDoc inbound process:

  • Follow the below steps.
    1. Go to NACE transaction
    2. Select V1 application and select OUTPUT TYPES
    3. Select the requred output type and double click on Processing routines.
    4. Enter Medium as DISTRIBUTION ALE, Program as RSNASTED and Routine as ALE_PROCESSING.
    5. Save it.

    Follow the below steps to configure the condition records:
    1. Go to NACE
    2. Select V1 application and select CONDITION RECORDS
    3. Select the requred output type and click on Condition records
    4. Selection screen will be displayed.
    5. Go for execution. In that screen enter the selection criteria. For eg Conditin record is based on Sales document type then
    Sales doc type = OR
    Funt = SP
    Partner -

    leave it blank. It means there is no restriction on partner numbers.
    Medium = A
    date/time = 4
    Lan = EN.
    Note: patner isleft blank means, the sales order of type OR can be send to all partners.
    6. .save it.

    Hope u did the ALE configuratins