About Custom Field Names and Text Fields in Infoset Queries

Author: Jogeswara Rao Kavala

Introduction:

The author in his other documents mentioned about the limitations of Infoset Queries, where we might need to go for ABAP codes. Here he wants to share one feature of Infoset Queries here ,which he considers a big advantage. That is the Text fields are available without any separate effort.

I’ll explain this:

Text Fields: One of the biggest Advantages of Infoset Quries

Consider the field EQUNR (Equipment Number), It has a Short Text field associated with it, namely EQKTX. But this is not available in the main table for Equipment ( EQUI ). This is available in another table EQKT.  This is true with almost all fields having a text field associated with them. The advantage, we are talking about is, in Infoset, the  Text field of a Key field comes along with its parent filed. This means when you are using EQUI table in your Infoset, you will find the EQKTX field is attached to the EQUNR field.  Let’s see how.

Compare the field icons in the following picture:

The icons indicate that, First  two fields are associated with their respective Text fields, and the 3rd one is a field is without one.

When you select one such field (from first two) to your field group in Infoset for query, this field will appear in two parts in SQ01.

  1. Field Name
  2. Text: Field name

So you can make use of this. (Naturally, everyone will be happy to have these Bonus fields giving Field Descriptions)

Custom Filed Names: 

To be able to give our own filed names, is one of the many advantages we have in Infoset Query when compared to Quick Viewer (SQVI).

Let’s learn bout it.

There are 3 cases here:

  1. Changing the Key Field Name
  2. Changing the Text Field Name , when it is editable
  3. Changing the Text Filed Name when it is non-editable.

Case 1 & Case2

In SQ02, double click on any field (you’ve taken to Field Group folder). Say EQUNR (Equipment).

In the right lower half of the window, the field name editor window appears.

column heading1.JPG

Observe here the field names are editable. You change the field names as per your requirement.

Also, you see the Associated Text field is also available and editable.

Now, let’s say we have changed this field names as under.

column heading2.JPG

Now let’s see the SQ01 output before and after these changes.

Before

alv1.JPG

After

alv2.JPG

Case3:

While working with Infosets,  I found the associated text field related to many fields, were not editable. In such  cases I could give custom field names to the main fields only. For changing the field names of their text fields, I’ve adopted the following method.

This is with the help of  a  Local Field in SQ01

( Here, for the convenience of documentation, I am giving the same example of Equipment field to illustrate this case, by assuming that this text field is not editable.)

So, I am unable to change my Equipment Text field in the Infoset (SQ02).

I came to SQ01, and created a Local field this way.

But, before that I gave a Short name to the Text field of Equipment number  as EQTXT

local filed define.JPG

( It is assumed that readers know how to give Short Names to existing fields and create Local fields, in SQ01.  In case difficulty please refer to this document Infoset Query: User Defined Fields )

So we did these steps.

  1. We have given a short name EQTXT to available Equipment text field.
  2. Created a Local field names EQPTXT and defined as above.

(We have given a field name ‘Machine Description’)

And then we have selected this field (in Local Additional fields node) in the Basic list section.

Saved the query and Executed.

See the result

alv3.JPG

The things discussed in the document are not complex, but used in almost every Infoset Query-work.

Hope this definitely benefits some of the Infoset Query lovers.

Jogeswara Rao K

To report this post you need to login first.

3 Comments

You must be Logged on to comment or reply to a post.

Leave a Reply