Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
ulrich_miller
Employee
Employee
0 Kudos
270

What is the IDR?


The IDR, found in the header area of OIF and GAF floorplans, is to display information in label/value pairs that are relevant to the data processed in the application.

This blog describes how the content of label/value pairs can be changed at runtime via ABAP APIs.

Step-by-step: Changing the values


You can access the IDR API using the following code:

DATA: LO_IDR TYPE REF TO IF_FPM_IDR.
DATA: LO_FPM TYPE REF TO IF_FPM.
LO_FPM = CL_FPM=> GET_INSTANCE( ).
LO_IDR = LO_FPM-> GET_SERVICE( IF_FPM_CONSTANTS=>IDR ).

Now that you have the API for the IDR, you can use it in the following way:

DATA: LT_ITEM_GROUP_KEYS TYPE T_ITEM_GROUP_KEYS.
LT_ITEM_GROUP_KEYS = LO_IDR->GET_ITEM_GROUP_KEYS( ).

The table LT_ITEM_GROUP_KEYS now contains all the keys of the available label/value pairs that exist in the IDR area.

What you can do next is to use the following API methods to see which key is related to which label/value pair:

DATA: LT_ITEM_GROUP_KEYS TYPE T_ITEM_GROUP_KEYS.
LT_ITEM_GROUP_KEYS = LO_IDR->GET_ITEM_GROUP( … ).

You can make changes to them as follows:

LO_IDR->CHANGE_ITEM_GROUP_BY_VAL( ) or
LO_IDR->CHANGE_NAVIGATION_ITEM( ) or
LO_IDR->CHANGE_IMAGE_ITEM( ).

Which method you use depends on the type of the label/value pair (texts, navigation links or icons).

If a label/value pair has been created as a value reference to a Web Dynpro context element attribute, changing the context element automatically updates the value (that is, there is no need to use the IDR API for this).

 

Ulrich Miller