Posts

BDC Session Method Program

BDC - Session Method BDC (Batch Data Communication):        It Transfers or upload the data’s(records) from Legacy(Non SAP) system to SAP system.  Batch input means bulk amount of data. It is a programming method. Types: It has two types  1. CALL TRANSACTION METHOD.  2. SESSION METHOD (CLASSICAL). Session Method: 1. Asynchronous Processing. 2. Synchronous database updates. 3. Transfer of data for multiple transactions. Using FM bdc_insert. 4. As compared to call transaction, this is slow. 5. Best suited for bulk transfer. 6. Automatic error handling. 7. Error logs are created. 8. The value of sy-subrc is never returned. Because records are stored  temporary in session and after the records are updated   to the database. 9. You can store the sessions and it can be used for later processing.                                                         10. it can handle small amount of data as well as large amount of data. 11. Function modules : üF4_FILENAME ( Open the leg

Looping Statements in SAP ABAP

Loops In a loop, a statement block is executed several times in succession. There are four kinds of loops in ABAP: ·        Unconditional loops using the DO statement. ·        Conditional loops using the WHILE statement. ·        Loops through internal tables and extract datasets using the LOOP statement. ·        Loops through datasets from database tables using the SELECT statement. This section deals with DO and WHILE loops. SELECT is an Open SQL statement, and is described in the Open SQLsection. The LOOP statement is described in the sections on internal tables and extract datasets. Unconditional Loops To process a statement block several times unconditionally, use the following control structure: DO [n TIMES] ...   [statement_block] ENDDO. Use the TIMES addition to restrict the number of loop passes to n. If you do not specify any additions, the statement block is repeated until it reaches a termination statement such as EXIT or STOP (see below). The system field s

Control Break Statements in SAP ABAP

Control Break Statements in SAP ABAP Control break statements are like events inside the loop. There are 5 control break statements in ABAP. These are used within loop.(Except ON CHANGE OF which can be used outside the loop as well) AT FIRST - ENDAT AT NEW - ENDAT AT END OF - ENDAT AT LAST - ENDAT ON CHANGE OF Explanation: AT FIRST : Will trigger at the first run of the loop. AT LAST: Will trigger at the last run of the loop. The below 3 events are normally used when the table is sorted. AT END OF : When we use At end for a field, it will trigger whenever there is any change in any of the fields from the left to that of the particular field. The trigger point will be the at the last occurrence  of the same value for the field. AT NEW: When we use At new for a field, it will trigger whenever there is any change in any of the fields from the left to that of the particular field.The trigger point will be the at the first occurrence of the new value for the field.

Data base Tables in SAP ABAP

Database Tables Database Tables A table is two dimensional data matrix i.e. it’s the combination of rows and columns. The rows contain the data record and columns contain the field.Tables can be containing zero or multiple records or rows. Ex: Employee Table. Types of Tables 1. Client Dependent 2. Client Independent Client Dependent:- If the first field of a table is MANDT and data type is CLNT then it is called client dependent table. The length will be always 3. Client Independent: - If the first field contains other than the MANDT then it is called client independent table . The client dependent tables are again of three types. 1. Transparent tables. 2. Pooled Tables. 3. Clustered Table. 1.Transparent Tables A transparent table in the dictionary has one to one relationship with a table in the database. Its structure in R/3 Data dictionary corresponding to a single database table. The database table has the same name, the same number of fields and the fields

Work area operations in SAP ABAP

Access Methods to Individual Table Entries There are three ways to access a single table entry: Access Using a Work Area When you access individual table entries using a work area, you are not working directly with the data in the table. Instead, you work with another data object as a work area. The work area is an interface to the entries in the internal table, and must be convertible into the line type of the internal table. The most efficient working method is to use a work area compatible with the line type of the internal table. When you read data from a table record, the data you are reading overwrites the current contents of the work area. You can then use this data in the program. When you write data to the internal table, this must first be placed in the work area. The system then transfers it from the work area to the appropriate table entry. Data transfer follows the rules of assigning data using MOVE. This graphic is explained in the accompanying text If the internal