Lists of Transaction Code in SAP


SE11 - ABAP dictionary.
SE12 - ABAP dictionary (display only).
SE13 - Technical settings of a table. (display and change).
SE14 - Database utility.
SE15 - Repository information system.
SE16 - Data browser.
SE17 - General table display.
SE18 - BAdi builder for definitions.
SE19 - BAdi builder for implementation.
SE20 - Enhancements (Enhancements Spots).
SE21 - Package builder.
SE24 - Class builder.
SE30 - Runtime analysis.
SE32 - Text element maintenance.
SE33 - Context builder.
SE35 - Dialog module maintenance.
SE36 - Logical database builder.
SE37 - Function builder.
SE38 - ABAP Editor.
SE39 - ABAP Splitscreen editor.
SE40 - Menu painter standard maintenance.
SE41 - Menu painter.
SE43 - Area menu maintenance


If you have any Question you can contact us or mail us.We will reply you as soon as possible.

Records from one to another internal table using LOOP


Code :
REPORT ZVP_2_INTER_TBL_REC_TRANS.

TYPES: BEGIN OF STR1,
  ID TYPE CHAR10,
  NAME TYPE CHAR10,
  COUNTRY TYPE CHAR10,
  END OF STR1.

  TYPES: BEGIN OF STR2,
  ID TYPE CHAR10,
  NAME TYPE CHAR10,
  COUNTRY TYPE CHAR10,
  END OF STR2.

DATA: IT1 TYPE STANDARD TABLE OF STR1,
      WA1 TYPE STR1,

      IT2 TYPE STANDARD TABLE OF STR2,
      WA2 TYPE STR2.

WA1-ID = '1'.
WA1-NAME = 'RAJESH'.
WA1-COUNTRY = 'KOLKATA'.
APPEND WA1 TO IT1.
CLEAR WA1.

WA1-ID = '2'.
WA1-NAME = 'BINAY'.
WA1-COUNTRY = 'GUJARAT'.
APPEND WA1 TO IT1.
CLEAR WA1.

LOOP AT IT1 INTO WA1.
  WA2-ID = WA1-ID.
  WA2-NAME = WA1-NAME.
  WA2-COUNTRY = WA1-COUNTRY.
  WRITE:/ WA2-ID, WA2-NAME, WA2-COUNTRY.
ENDLOOP.

Output :


IDE Used To Test This Code : ABAP Editor.

Try this code in your computer for better understanding. Enjoy the code. If you have any Question you can contact us or mail us.We will reply you as soon as possible.

Append records from one to another internal table using APPEND LINES OF



Code :
REPORT ZVP_2_INTERNAL_TBL_REC_TRANS.

TYPES: BEGIN OF STR1,
  ID TYPE CHAR10,
  NAME TYPE CHAR10,
  COUNTRY TYPE CHAR10,
  END OF STR1.

  TYPES: BEGIN OF STR2,
  ID TYPE CHAR10,
  NAME TYPE CHAR10,
  COUNTRY TYPE CHAR10,
  END OF STR2.

DATA: IT1 TYPE STANDARD TABLE OF STR1,
      WA1 TYPE STR1,

      IT2 TYPE STANDARD TABLE OF STR2,
      WA2 TYPE STR2.

WA1-ID = '1'.
WA1-NAME = 'RAJESH'.
WA1-COUNTRY = 'KOLKATA'.
APPEND WA1 TO IT1.
CLEAR WA1.

WA1-ID = '2'.
WA1-NAME = 'BINAY'.
WA1-COUNTRY = 'GUJARAT'.
APPEND WA1 TO IT1.
CLEAR WA1.

APPEND LINES OF IT1 TO IT2.
LOOP AT IT2 INTO WA2.
WRITE:/ WA2-ID, WA2-NAME, WA2-COUNTRY.
ENDLOOP.

Output :


IDE Used To Test This Code : ABAP Editor.

Try this code in your computer for better understanding. Enjoy the code. If you have any Question you can contact us or mail us.We will reply you as soon as possible.

Modify Internal table record using Field Symbol


Code :
REPORT ZVP_FIELD_SYMBOL_PROG.

TYPES: BEGIN OF STRC,
  ID TYPE I,
  NAME TYPE CHAR10,
  COUNTRY TYPE CHAR10,
  END OF STRC.

DATA: IT TYPE TABLE OF STRC,
      WA TYPE STRC.

FIELD-SYMBOLS: <WA> TYPE STRC.

WA-ID = 1.
WA-NAME = 'SOUMYO'.
WA-COUNTRY = 'INDIA'.
APPEND WA TO IT.

WA-ID = 2.
WA-NAME = 'SUVA'.
WA-COUNTRY = 'BRAZIL'.
APPEND WA TO IT.

WA-ID = 3.
WA-NAME = 'SHAROD'.
WA-COUNTRY = 'KENYA'.
APPEND WA TO IT.

READ TABLE IT ASSIGNING <WA> INDEX 3.
IF <WA> IS ASSIGNED.
<WA>-ID = 3.
<WA>-NAME = 'SHAROD1'.
<WA>-COUNTRY = 'UK'.
ENDIF.

LOOP AT IT INTO WA.
WRITE:/ WA-ID,
        WA-NAME,
        WA-COUNTRY.
ENDLOOP.

Output :


IDE Used To Test This Code : ABAP Editor.

Try this code in your computer for better understanding. Enjoy the code. If you have any Question you can contact us or mail us.We will reply you as soon as possible.

How to call Projection View from ABAP Report


Projection View name - ZVP_PRO_VIEW

Fields available in above view -
VBELN
ERDAT
ERZET
ERNAM
VKGRP


Code :
REPORT ZVP_PROJECTION_VIEW_CALL.

DATA: ZVIEW_IT TYPE TABLE OF ZVP_PRO_VIEW,
      ZVIEW_WA TYPE ZVP_PRO_VIEW.

START-OF-SELECTION.
SELECT * FROM ZVP_PRO_VIEW INTO TABLE ZVIEW_IT UP TO 50 ROWS.

LOOP AT ZVIEW_IT INTO ZVIEW_WA.
WRITE:/
ZVIEW_WA-VBELN,
ZVIEW_WA-ERDAT,
ZVIEW_WA-ERZET,
ZVIEW_WA-ERNAM,
ZVIEW_WA-VKGRP.
ENDLOOP.

Output :


IDE Used To Test This Code : ABAP Editor.

Try this code in your computer for better understanding. Enjoy the code. If you have any Question you can contact us or mail us.We will reply you as soon as possible.

How to call Database View from ABAP Report


Database view name - ZVP_DB_VIEW
Following fields will be available in ZVP_DB_VIEW.
NAME1
KUNNR
NAME1
ORT01
PSTLZ
REGIO
VBELN
ERDAT
ERZET
ANGDT

Code :
REPORT ZVP_DATABASE_VIEW_CALL.

DATA: ZVIEW_IT TYPE TABLE OF ZVP_DB_VIEW,
            ZVIEW_WA TYPE ZVP_DB_VIEW.

START-OF-SELECTION.
SELECT * FROM ZVP_DB_VIEW INTO TABLE ZVIEW_IT UP TO 50 ROWS.

LOOP AT ZVIEW_IT INTO ZVIEW_WA.
WRITE:/ ZVIEW_WA-NAME1,
        ZVIEW_WA-KUNNR,
        ZVIEW_WA-NAME1,
        ZVIEW_WA-ORT01,
        ZVIEW_WA-PSTLZ,
        ZVIEW_WA-REGIO,
        ZVIEW_WA-VBELN,
        ZVIEW_WA-ERDAT,
        ZVIEW_WA-ERZET,
        ZVIEW_WA-ANGDT.
ENDLOOP.

Output :


IDE Used To Test This Code : ABAP Editor.

Try this code in your computer for better understanding. Enjoy the code. If you have any Question you can contact us or mail us.We will reply you as soon as possible.

How to find BAPI for a particular transaction in SAP ABAP


1. Suppose you want to find out the BAPI for create sales order, so transaction code for create a sales order is VA01, go to VA01 transaction code.

2. After that go to System -->> Status.

3. Double click on Transaction VA01 and you will see the related package which is VA.

4. Just copy the package name and go to transaction code SE80 and then choose package from the drop down menu and put the package name VA and hit enter.

5. All package related data you will see. choose Business Engineering -->> Business Object Types , double click on BUS2032 for sales order.

6. Choose Methods.

7. SaleOrder.CreateFromDat2 click on green portion and you will enter in to BAPI_SALESORDER_CREATEFROMDAT2 function module.

If you have any Question you can contact us or mail us.We will reply you as soon as possible.

Difference between RFC and BAPI in SAP ABAP


RFC
1. Its a Remote Function Call.
2. It not always use Business Object Repository.

BAPI
1. It is known as Business Application Programming Interface.
2. It use the Business Object Repository via methods.

If you have any Question you can contact us or mail us.We will reply you as soon as possible.

Difference between BDC and BAPI in SAP ABAP


BDC
1. Batch Data Communication.
2. It is not stored in Business Object Repository.
3. Here use screen.
4. Exception can handle using BDCMSGCOLL.

BAPI
1. Business Application Programming Interface.
2. BAPI stored in Business Object Repository.
3. Here use interface.
4. We can't handle exception in BAPI generally, but explicitly we can handle the exception using RETURN table or BAPIRET2 structure.

If you have any Question you can contact us or mail us.We will reply you as soon as possible.

List of Work Process in SAP ABAP


1. Dialog Work process.
2. Background work process.
3. Spool Work Process.
4. Update Work process.
5. En queue Work process.

If you have any Question you can contact us or mail us.We will reply you as soon as possible.

Classical report events in SAP ABAP


1. Load-of-program.
2. Initialization.
3. At Selection-Screen output.
4. At Selection-Screen on field.
5. At Selection-Screen on value request.
6. At Selection-Screen on help request.
7. At Selection-Screen.
8. Start-of-Selection.
9. End-of-Selection.
10. Top-of-Page.
11. End-of-Page.

If you have any Question you can contact us or mail us.We will reply you as soon as possible.

Difference between BDC Call Transaction and BDC Session Method


BDC Call Transaction
1. This is a synchronous processing.
2. Database update can be synchronous and asynchronous.
3. It is faster than session method.
4. Auto exception handling not possible here, we can handle the exception with the help of BDCMSGCOLL structure.
5. Suitable for 1 to 10000 data records.

BDC Session
1. This is an asynchronous processing.
2. Database update always synchronous
3. It is slower than call transaction method.
4. Auto exception handling possible here.
5. Suitable for more than 10000 records or mass of data records.

If you have any Question you can contact us or mail us.We will reply you as soon as possible.

BDC Call Transaction in SAP ABAP


1. Go to T-Code : SHDB for recording a transaction.

2. Give Recording name - ZVP_RCD_FI01 and give Transaction Code name FI01 and click on Start recording button.

3. Give Bank Country - IN and Bank Key - 1004785 and hit enter.

4. Then enter the following -
Bank Name - ABC Bank
Region - 25
City - KOLKATA
Bank Branch - TARATALA

5. After that press save button and again click save and click back button.

6. You will see your recording name in your screen. click the recording name and click on Program.

7. Give program name ZVP_BDC_UPLOAD_FI01, click on Transfer from recording and click on continue button and click on Source and your report program will come up.

8. Create a TXT file in desktop with content below -
IN 700153 AAA 25 INDIA KOLKATA
IN 700154 BBB 25 INDIA KOLKATA
IN 700155 CCC 25 INDIA KOLKATA
IN 700156 DDD 25 INDIA KOLKATA
IN 700157 EEE  25 INDIA KOLKATA

Source Code :
REPORT ZVP_BDC_UPLOAD_FI01
       NO STANDARD PAGE HEADING LINE-SIZE 255.

*include bdcrecx1.
TYPES: BEGIN OF TY_BANK,
       BANKS TYPE BANKS,
       BANKL TYPE BANKL,
       BANKA TYPE BANKA,
       PROVZ TYPE PROVZ,
       ORT01 TYPE ORT01,
       BRNCH TYPE BRNCH,
  END OF TY_BANK.

DATA: IT_BANK TYPE TABLE OF TY_BANK,
      WA_BANK TYPE TY_BANK.

DATA: IT_BDCDATA TYPE TABLE OF BDCDATA,
      WA_BDCDATA TYPE BDCDATA.

START-OF-SELECTION.

*perform open_group.

CALL FUNCTION 'GUI_UPLOAD'
  EXPORTING
    FILENAME                      = 'C:\Users\soumyodeep\Desktop\BDC_UPLOAD_BNKA.TXT'
*   FILETYPE                      = 'ASC'
   HAS_FIELD_SEPARATOR           = 'X'
*   HEADER_LENGTH                 = 0
*   READ_BY_LINE                  = 'X'
*   DAT_MODE                      = ' '
*   CODEPAGE                      = ' '
*   IGNORE_CERR                   = ABAP_TRUE
*   REPLACEMENT                   = '#'
*   CHECK_BOM                     = ' '
*   VIRUS_SCAN_PROFILE            =
*   NO_AUTH_CHECK                 = ' '
* IMPORTING
*   FILELENGTH                    =
*   HEADER                        =
  TABLES
    DATA_TAB                      = IT_BANK
* CHANGING
*   ISSCANPERFORMED               = ' '
* EXCEPTIONS
*   FILE_OPEN_ERROR               = 1
*   FILE_READ_ERROR               = 2
*   NO_BATCH                      = 3
*   GUI_REFUSE_FILETRANSFER       = 4
*   INVALID_TYPE                  = 5
*   NO_AUTHORITY                  = 6
*   UNKNOWN_ERROR                 = 7
*   BAD_DATA_FORMAT               = 8
*   HEADER_NOT_ALLOWED            = 9
*   SEPARATOR_NOT_ALLOWED         = 10
*   HEADER_TOO_LONG               = 11
*   UNKNOWN_DP_ERROR              = 12
*   ACCESS_DENIED                 = 13
*   DP_OUT_OF_MEMORY              = 14
*   DISK_FULL                     = 15
*   DP_TIMEOUT                    = 16
*   OTHERS                        = 17
          .
IF SY-SUBRC = 0.
MESSAGE: 'DATA UPLOADED SUCCESSFULLY' TYPE 'I'.
ENDIF.

LOOP AT IT_BANK INTO WA_BANK.

PERFORM BDC_DYNPRO      USING 'SAPMF02B' '0100'.
PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                              'BNKA-BANKL'.
PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                              '/00'.
PERFORM BDC_FIELD       USING 'BNKA-BANKS'
                              WA_BANK-BANKS.
PERFORM BDC_FIELD       USING 'BNKA-BANKL'
                              WA_BANK-BANKL.
PERFORM BDC_DYNPRO      USING 'SAPMF02B' '0110'.
PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                              'BNKA-BRNCH'.
PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                              '=UPDA'.
PERFORM BDC_FIELD       USING 'BNKA-BANKA'
                              WA_BANK-BANKA.
PERFORM BDC_FIELD       USING 'BNKA-PROVZ'
                              WA_BANK-PROVZ.
PERFORM BDC_FIELD       USING 'BNKA-ORT01'
                              WA_BANK-ORT01.
PERFORM BDC_FIELD       USING 'BNKA-BRNCH'
                              WA_BANK-BRNCH.
*PERFORM BDC_TRANSACTION USING 'FI01'.
CALL TRANSACTION 'FI01' USING IT_BDCDATA MODE 'A' UPDATE 'S'.
REFRESH IT_BDCDATA.
ENDLOOP.
*perform close_group.

*----------------------------------------------------------------------*
*        Start new screen                                              *
*----------------------------------------------------------------------*
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
  CLEAR WA_BDCDATA.
  WA_BDCDATA-PROGRAM  = PROGRAM.
  WA_BDCDATA-DYNPRO   = DYNPRO.
  WA_BDCDATA-DYNBEGIN = 'X'.
  APPEND WA_BDCDATA TO IT_BDCDATA.
ENDFORM.

*----------------------------------------------------------------------*
*        Insert field                                                  *
*----------------------------------------------------------------------*
FORM BDC_FIELD USING FNAM FVAL.
*  IF FVAL <> NODATA.
    CLEAR WA_BDCDATA.
    WA_BDCDATA-FNAM = FNAM.
    WA_BDCDATA-FVAL = FVAL.
    APPEND WA_BDCDATA TO IT_BDCDATA.
*  ENDIF.
ENDFORM.

Execute the program you will see data uploaded successfully and click on OKCODE popup and save the data and data inserted to table successfully.

You can go to SE11 and give the database name BNKA and check the content for your uploaded data.

IDE Used To Test This Code : ABAP Editor.

Try this code in your computer for better understanding. Enjoy the code. If you have any Question you can contact us or mail us.We will reply you as soon as possible.