Skip to Content
Technical Articles
Author's profile photo Julia Bender

** TEAM FPM ** – How to integrate longer texts into your FPM application?

Hello everybody,

the possibility how to integrate documentation objects from SE61 into an FPM application via the explanation control is well-known.

Within transaction SE61 you create a document object and refer later to it within your OVP floorplan configuration (see below screenshots, click on them to enlarge).

Explanation.png

SE61.png

However  the explanation is only visible if the quick help is being activated via right-mouse click:

Quick_Help.PNG

Having a longer text within your FPM application which should be there from quite the beginning of the application runtime, can be achieved by the following way:

The idea is to use the text maintained via SE61 within other parts of your FPM application, e.g. within the Form UIBB. It would be a good idea doing this e.g. via the Formatted Text View.

Within this UI element of the form configuration you just can edit a normal text, but not a document object from SE61. Furthermore within the configuration layer you are limited to 255 characters due to translation reasons.

This is why there is a possibility to programmatically give the information via feeder class which document object from SE61 should be taken – either for the Formatted Text View or Formatted Text Edit.

Therefore you need the following coding snippet:

* Replacing the current text with a SE61 document object
DATA lv_header TYPE thead.
DATA lv_lines  TYPE tlinetab.

CALL FUNCTION ‘DOCU_GET’
EXPORTING
id                ‘TX’ ” doku_id
langu             sylangu
object            ‘FPM_CBA_FR’ ” your document object from se61
IMPORTING
head              lv_header
TABLES
line              lv_lines
EXCEPTIONS
no_docu_on_screen 1
no_docu_self_def  2
no_docu_temp      3
ret_code          4
OTHERS            5.

ms_dataf_textview_text =
cl_wd_formatted_text=>create_from_sapscript(
sapscript_head  lv_header
sapscript_lines lv_lines )->m_xml_text.

 

This coding converts the document object to a SAP Script Text.

This text now you just have to assign to the correct field component of CS_DATA within GET_DATA of your feeder class and the documentation should be now displayed properly on the FPM application. For beautification reasons you can also remove the label from the Formatted Text View via the form configuration.

At the end the documentation object within the application could look like this…

Assigned Tags

      9 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hi Julia,

      Nice informative blog, which reduces the efforts of the developer.Keep posting.All the best 🙂 .

      Thanks

      Katrice

      Author's profile photo Julia Bender
      Julia Bender
      Blog Post Author

      Thanks Katrice 🙂

      Author's profile photo Former Member
      Former Member

      good to know.

      For a similar requirement, I used a WD Component and Window in a freestyle UIBB.

      Thanks,

      Krishna.

      Author's profile photo Karsten Heth
      Karsten Heth

      Very helpful. A screenshot of the final result would be great.

      Author's profile photo Julia Bender
      Julia Bender
      Blog Post Author

      Done 🙂

      Author's profile photo Former Member
      Former Member

      Thank you for the informative blog.

      We had a similar requirement to add custom text in the 'edit address' screen in the persinfo application and the above steps helped a lot.

      Author's profile photo Former Member
      Former Member

      Very helpful. Thanks..

      Just to add, those who want non-HTML We text, they can use this method call instead

      "lcl_docu_utility->get_general_docu_as_wad_text"

      Author's profile photo Umesha A M
      Umesha A M

      Hi Julia,

      Thanks a lot for Very nice info.

      Could you please let me know how can I handle my own long text field in FPM.

      I already appended my custom field in DDIC structure and added the same in screen.

      However, if any value is entered into the field I need to handle those values in background manually by pushing or pulling from custom table.

       

       

      Thanks & Regards

      Umesha A M

       

      Author's profile photo Julia Bender
      Julia Bender
      Blog Post Author

      Hello Umesha!

      Thanks for your feedback!

      If you have appended the DDIC structure you should be able to enhance the above mentioned methods of the affected GUIBB feeder class and continue as described above.

      Best regards, Julia