---
parser: v2
auto_validation: true
primary_tag: software-product>sap-btp--abap-environment
tags: [  tutorial>beginner, programming-tool>abap-development, software-product>sap-business-technology-platform, tutorial>license ]
time: 20
slug: abap-environment-checkout
canonical_url: https://developers.sap.com/tutorials/abap-environment-checkout
---

# Use Checkout Functionality of Branches to Switch Between Different Versions of Code
<!-- description --> Use the checkout functionality of branches to switch between different versions of your code with SAP BTP, ABAP environment.

## Prerequisites  
  - SAP BTP, ABAP environment user
  - ADT version 2.96 or higher
  - Administrator role assigned to user
  - You have finished following tutorial:  [Create Branches with SAP BTP, ABAP Environment](abap-environment-branch).

## You will learn
  - How to checkout feature branch
  - How to change your coding
  - How to transport changes
  - How to checkout master branch
  - How to test changes

## Intro
In this tutorial, wherever `XXX` appears, use a number (e.g. `000`).

---


### Checkout feature branch

1. Logon to your ABAP system in your SAP Fiori launchpad and open **Manage Software Components** application.

    ![Checkout feature branch](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-checkout/checkout.png)

    Note: If you don't know the URL of your ABAP system, then you can open your **ABAP Development Tools (ADT)**, right-click on your **ABAP system** in your project explorer, select **Properties** and click on your **system URL**.

2. In your manage software components application search for your software component **`Z_SWCT_XXX`** and select it.

    ![Checkout feature branch](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-checkout/checkout2.png)

3. Select your feature branch **`branch_xxx`** and click **Checkout** to be active with your master branch.

    ![Checkout feature branch](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-checkout/checkout3.png)

4. Click **OK**.

    ![Checkout feature branch](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-checkout/checkout4.png)

5. Refresh your recent actions to see your result.

    ![Checkout feature branch](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-checkout/checkout5.png)

6. Now you can see, that your feature branch **`branch_xxx`** is checked out successfully.

    ![Checkout feature branch](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-checkout/checkout6.png)



### Change your coding

1. Switch to your **ABAP Development Tools (ADT)**, logon to your **ABAP system**, right-click on your created ABAP class **`Z_CL_XXX`** and select **Refresh or Press `F5`** to refresh your ABAP class.

    ![Change your coding](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-checkout/change.png)

2. Now make changes in your ABAP class. Therefore replace your code of your ABAP class **`Z_CL_XXX`** with following:

   ```ABAP
   class z_cl_xxx definition
      public
      final
      create public .

      public section.
      interfaces if_oo_adt_classrun.
      protected section.
      private section.
    ENDCLASS.



    CLASS Z_CL_XXX IMPLEMENTATION.


      METHOD IF_OO_ADT_CLASSRUN~MAIN.
      out->write('Hello world! I am on branch_xxx now!').
      ENDMETHOD.
    ENDCLASS.
   ```

    ![Change your coding](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-checkout/change2.png)

3. Save and activate.

    ![Change your coding](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-checkout/change3.png)



### Transport changes

  1. Select the transport organizer in your menu and refresh your workbench to transport your changes.

      ![Transport change](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-checkout/transport.png)

  2. Right-click on your transport task and select **Release**.

      ![Transport change](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-checkout/transport2.png)

  3. Click **OK**.

      ![Transport change](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-checkout/transport3.png)

  4. Right-click on your transport request and select **Release**.

      ![Transport change](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-checkout/transport4.png)

  5. Click **OK**.

      ![Transport change](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-checkout/transport5.png)




### Checkout master branch

1. Switch to your software component **`Z_SWCT_XXX`** in **Manage Software Component**. Select your **master branch** and click **Checkout**.

    ![Checkout master branch](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-checkout/master.png)

2. Click **`OK`**.

    ![Checkout master branch](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-checkout/master2.png)

3. Refresh your recent actions to see your result.

    ![Checkout master branch](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-checkout/master3.png)

4. Now the master branch is checked out successfully. Refresh your branches as well.

    ![Checkout master branch](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-checkout/master4.png)

5. Now you can see the result as well in the branches section. The master branch is checked out successfully.

    ![Checkout master branch](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-checkout/master5.png)



### Test changes

  1. Switch to ADT and open your ABAP class **`Z_CL_XXX`**. As you can see, you are still on the feature version.

      ![Create new branch](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-checkout/test.png)

  2. Right-click on your ABAP class **`Z_CL_XXX`** and click **Refresh**.

      ![Create new branch](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-checkout/test2.png)

  3. Now you can see the coding of your master version again.

      ![Create new branch](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-checkout/test3.png)



### Test yourself



