Transport records from a Z table in a Transfer Order


How to transport records from a Z table in a Transport Order.

How to create a table and move certain records in a transfer order

Many times in our projects, we are faced with the need to create transparent Z tables that contain records that help to modify the behavior of a Z program as well. These tables, when the program is ready, it is necessary that they be moved with all or some of your records from one client to another, so that the program in the new work environment behaves in the same way as in the client where it was designed.
However, it is very common, that once the table is moved, only the empty object is moved in a Workbench command, and that then, the functional or the key user, have to manually capture record by record so that the complete information in said table and the behavior of the program is not altered. Obviously doing this, in addition to implying a manual rework, entails that errors can be made when capturing the information, creating discrepancies in the unit tests, comprehensive tests or even in the user acceptance tests (UAT), and they are due of course, not to a glitch in the code, but to a finger error while capturing the records.
For this reason, I explain in this guide how we can create a table with a maintenance view, in such a way that the records that one selects can be transported by including them in a transfer order. So let’s get started.
Table creation
The first step, and just to exemplify, will be to create our table in transaction SE11. We will make a very simple table, which includes the client, a password, the country, first and last name of a person (it is only an example). After building it, we will do the update view, fill the table with a few records, and finally include those records in a transport order. The interesting thing about this article is that we will then make a transport order where we will include only the records whose country is equal to MX (Mexico) and then another order where only the records whose country is equal to AR (Argentina) will go. So, let’s get to work!

How to create a table and move certain records in a transfer order

We will create the table in SE11 with name ZNOMBRES. It is very important that when we create it, we choose the Delivery Class “C – Customizing table, updated by customer, regardless of SAP”, since otherwise it will not allow us to create a transport order when we use transaction SM30 with your update view.

How to create a table and move certain records in a transfer order

In the table update, we choose Display / Update allowed. We would then be like this:

How to create a table and move certain records in a transfer order

Now we start creating the fields:

How to create a table and move certain records in a transfer order
Next, we define the Extension Category of our table:
How to create a table and move certain records in a transfer order

We choose the Expandable option and numbers or characters:

How to create a table and move certain records in a transfer order

We save and activate our table.

How to create a table and move certain records in a transfer order
How to create a table and move certain records in a transfer order

We choose to create a new transfer order for our Workbench object:

How to create a table and move certain records in a transfer order

And we activate our table:

How to create a table and move certain records in a transfer order

Here it is going to ask us for the Data class. We choose

How to create a table and move certain records in a transfer order
How to create a table and move certain records in a transfer order

Our table configuration looks like this:

How to create a table and move certain records in a transfer order

We save, and our table is already active.

How to create a table and move certain records in a transfer order
How to create a table and move certain records in a transfer order
Update view

The next step is to create the update view to be able to enter records through the SM30 in our table. For this, we go to the menu Utilities → Update generator. Tab

How to create a table and move certain records in a transfer order

Here, we fill as shown below:
Authorization group: & NC &
Function group: ZNAMES (the same as the one in our table, for ease)
Recording routine: Standard recording routine. Note: if this option is not selected, it will not allow us to create a transport order for the records when we use the update view in transaction SM30.

How to create a table and move certain records in a transfer order
We click on the button Search No. of images and choose the option Propose No. of images.
How to create a table and move certain records in a transfer order

Once this is done, we click on the Create icon (or press F6):

How to create a table and move certain records in a transfer order

It asks us again for the package where we save the changes:

How to create a table and move certain records in a transfer order

We click on the Save button. Possibly send us a message that the object does not exist. We click on Save again, and it will show us the transport order where we save the table.

How to create a table and move certain records in a transfer order

e confirm by clicking ENTER or the green check mark. You are going to ask us for the package again:

How to create a table and move certain records in a transfer order

And ready! Already our update view was created successfully.

How to create a table and move certain records in a transfer order
Filling of records in the table

The next step is to fill in some records in our newly created table. For this purpose, we execute transaction SM30, as shown below.

How to create a table and move certain records in a transfer order

We introduce the name of our Table / View: ZNAMES, we choose the option “Without restrictions” and we click on the “Current” button. To introduce records to our Z table.

How to create a table and move certain records in a transfer order

We click on the New Entries button, and we begin to fill with a few records:

How to create a table and move certain records in a transfer order

So that the records of our table are as follows (this is an example, in your table you will fill the relevant records). The idea is that later we filter by the country code (MX for Mexico, and AR for Argentina).

How to create a table and move certain records in a transfer order
Transfer order creation for selected records

Now, let’s go back to the start of our SM30 transaction. Here, we enter the name of our Table / View again: ZNAMES, but now we select Indicate condition, and finally the Transport button.

How to create a table and move certain records in a transfer order

Here we will get the message:

How to create a table and move certain records in a transfer order

We click on the confirmation button, and then it will ask us to select how we are going to choose the records to generate the transport. We choose Country code (1), and click the confirm button (2).

How to create a table and move certain records in a transfer order

Here where it says From: we enter the MX value, and click the confirm button.

How to create a table and move certain records in a transfer order

We get a message:

How to create a table and move certain records in a transfer order

It tells us if we put the order in which we had previously created (it is an order in which I worked, but we are going to select a new one):

How to create a table and move certain records in a transfer order

We click on the Create order icon:

How to create a table and move certain records in a transfer order
How to create a table and move certain records in a transfer order

With this, it assigns us another order when we click on Save:

How to create a table and move certain records in a transfer order

And it shows us the selected records first:

How to create a table and move certain records in a transfer order

We select the records, and then click the Include in order button.

How to create a table and move certain records in a transfer order

This message appears below:

How to create a table and move certain records in a transfer order

We click on Record:

How to create a table and move certain records in a transfer order

It confirms that the order was modified with our records.

We can confirm in SE10 that our data is already in an order, going to see the Workbench transport orders that we created:

How to create a table and move certain records in a transfer order
If we want to make another order, but now for the Country = AR key, we repeat the steps and create a new order, to have the data separated.
How to create a table and move certain records in a transfer order