Creating a Table Infotype

💡

Once again, I continue the “infotype” theme. This time — creating a table infotype. Infotypes are divided into two categories:

  • Field infotype
  • Table infotype

The first category (Field infotype) includes infotypes in which fields are provided for one-time data storage. Each field in the infotype can only be used to store information once.

The second category (Table infotype) includes infotypes whose fields can be filled in multiple times. These fields are available for repeated use within a single infotype record.

Objective

Create a table infotype named “Schedule.” Let’s assume that this infotype is intended to store schedules of events important to the company. The infotype should contain the following fields:

  • Day
  • Time block 1
  • Time block 2
  • Time block 3

A record in the “Schedule” infotype might look like this:

DayTime block 1Time block 2Time block 3
19:00–12:0012:00–13:0013:00–17:00
29:00–12:0012:00–13:0013:00–17:00
39:00–12:0012:00–13:0013:00–17:00

1. Creating Structure PT9nnn

Create a structure named PT9nnn, where nnn is the number of the infotype you’re creating. In this example, I’ll use the number 9905 for the “Schedule” infotype.

Select the type of object to be created.

On the next screen, you need to define the fields used in the infotype. I won’t go into too much detail with the data elements for the fields. To demonstrate the main concept and data representation in a table infotype, using the CHAR data type will be sufficient.

Activate the created structure.

2. Creating the Infotype

Run transaction PPCI. Enter the number and name of the infotype, and click the Create button.

In the Infotype category section, select the Table infotype radio button and click the corresponding button.

In the window that appears, confirm the creation of the new infotype.

If the operation is successful, an information message window will appear.

3. Defining Allowed Object Types and Time Constraints for the New Infotype

Open view T777I in transaction SM30.

The newly created infotype will already be listed among the available ones. You only need to define the time constraint and the object for which this infotype will be available. I’ll use object O, with time constraint 3.

Save the changes.

4. Testing

Run transaction PP01, select the object for which the new table infotype is available, and create a new record.

Fill in the infotype fields.

Save the changes.

As you can see, the same fields were used multiple times within a single infotype record.

P.S.

Note how the data is stored in the table infotype. Open table HRP9nnn in transaction SE16N, where nnn is your infotype number.

The data saved for the object will not appear in HRP9nnn.
You can find it in table HRT9nnn, using the value of field TABNR from the HRP9nnn table.