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: 
julia_bender
Active Participant
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).





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



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             sy-langu
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_data-f_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...

9 Comments
Former Member
0 Kudos

Hi Julia,

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

Thanks

Katrice

julia_bender
Active Participant
0 Kudos

Thanks Katrice 🙂

Former Member
0 Kudos

good to know.

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

Thanks,

Krishna.

karsten_heth
Active Participant

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

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.

Former Member
0 Kudos

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"

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

 
julia_bender
Active Participant
0 Kudos

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

julia_bender
Active Participant
0 Kudos
Done 🙂