Skip to Content
Author's profile photo Former Member

FPM Forms Scripting

FPM Forms are the new alternate User Interface (along with Adobe UI) provided by SAP in EHP6 for HCM Process and Forms.  A decent introduction about this new UI was already provided by Siddharth Rajora in this blog –

Like me, many of my friends must have already worked on “Adobe Interactive Forms” and on introduction of this new UI – FPM Forms (Web Dynpro ABAP based UI) the very first question that came to my mind was – “How does this handle the Scripting (i.e. How to dynamically make a UI field editable/visible)? Like Adobe Interactive Forms has Form Calc and Java scripts that takes care of this scripting, do we have anything special that does this scripting”. Well, I continued doing my research and found couple of ways to achieve this.

In this blog, I would like to demonstrate one of the possible ways to achieve this functionality (I shall write one more blog to demonstrate the other option too). Before diving into this topic, I would like to give a quick brief on the differences found in the EHP5 and EHP6 versions with respect to the Scripting.

New Features in EHP6

Scripting in EHP6 can be handled using the backend services. A new parameter is added to the Backend Service’s Interface (IF_HRASR00GEN_SERVICE) methods – INITIALIZE and DO_OPERATIONS in EHP6 –



The UI_ATTRIBUTES has the following fields (which is a similar structure as SERVICE_DATASETS except a new field called as “UI_ATTRIBUTE”) – 

BEGIN OF ty_s_gensrv_ui_attribute,
TYPE asr_field_group,
TYPE hrasr_fieldname,
TYPE asr_fieldindex,
TYPE hrasr_ui_attribute,
END OF ty_s_gensrv_ui_attribute .

This new field  UI_ATTRIBUTE can accommodate the following values –



Went ahead implementing this concept using the below steps –

  1. To which ever fields I intend to have this “Dynamic” behavior, I went ahead setting the “UI Attribute” to my backend service (Assumption: Necessary configuration before reaching this point) –


2. Controlled the UI Attribute in my custom backend service class’s method (INITIALIZE / DO_OPERATIONS), in my case I placed the below code in DO_OPERATIONS method –


3. Triggered the appropriate event to bring in the dynamic UI behavior –


Like for this requirement, I want to hide the “Valid From” field when the check box is set. So in order to achieve this functionality, I went ahead attaching it to “Check” event. So when user toggles on this “Check box” control, the “USER_EVENT_CHECK” event gets triggered i.e. DO_OPERATIONS method gets called which takes care of my Dynamic UI behavior using Step-2 code.

Final Outcome (The End) –

On testing this configuration, the initial screen looks like – /wp-content/uploads/2013/02/pic6_183967.png

On selecting the “Hide Display Valid From field” check box, I see the below screen –


Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Sumit Kumar Kundu
      Sumit Kumar Kundu

      Great going Kuncham 🙂 This is a far better alternative to user events in earlier P&F framework.

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Thanks Sumit.

      Author's profile photo Former Member
      Former Member

      Hi Kuncham,

      Thanks for this lovely tutorial.

      As shown in your screenshots, "Valid from" field gets hidden and its place is taken by the next field in the config.

      We were not able to achieve this even though the field gets hidden there is an empty space there which looks pretty ugly.

      Could you please help as to what shall we do to achieve the shifting of the fields?


      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Thanks for the feedback Kunjal,

      Well, I didn't do any magic in bringing the alignments together. The only thing I did was to have all these fields under the same group.

      Try that approach and let me know if it works.


      Raja Sekhar

      Author's profile photo Former Member
      Former Member

      Awesome...!!! That did work.


      Author's profile photo Shankar Reddy Chamala
      Shankar Reddy Chamala

      Hi Raj,

      In your coding part, how you accessed directly the form field ZFLAG1 in your code.


      Since in my case I have one custom infotype field as check box option and other fields which needs to be visible based on check box.

      when I tried me-> (ctrl+spacebar) no form fields are displayed. it's shows interfaces only as shown below.


      when I check in debug mode the import parameter SERVICE_DATASETS contains all fields and it's values. So, based on this I did coding and it's worked finally.

      Author's profile photo Sumit Kumar Kundu
      Sumit Kumar Kundu

      Hi Shankar,

      The checkbox to control the UI attributes of other fields is also part  of the same generic service.

      So you need to do this,

      1) Add a field ZFIELD in the generic service and then expose this field in the UI by FPM form configuration.

      2) Get the value of ZFLAG1 from service_datasets inside the event attached to the checkbox.

      3) Control the UI_ATTRIBUTES of other fields then based on the value got in step 2.



      Author's profile photo Former Member
      Former Member

      Is it possible to hide a List type form using UI attributes? I have a requirement to control the visibility of the Sections of the form based on the user action. I was able to successfully do it on FPM configurations of type "FORM". I am unable achieve this on the forms of type "LIST" eg: IT0014, IT0207. I am getting an empty table as shown below when I hide the Infotype IT0014 fields. I want to hide this table when I Hide the field attributes. Kindly help me how to achieve this.