How to Use Dynamic SO10 Text in BRF+ Adobe Form Output
In this post ,I would like to share with you, how to use dynamic SO10 text elements on standard Adobe form that you maintain with SFP tcode and also show you, how to achieve same thing with BRF+ Adobe form outputs those need to be maintained in Adobe Live Cycle application.
For non BRF+ cases, If you want to use SO10 text elements with their styles in Adobe form, you can go to SFP transaction, create a form and add TEXT element to context, bind that text element to a text object on layout. That is it, it will work nicely.
You can drag and drop from context to layout. It will create necessary element on layout with bindings.
First lets see, how we can do it with SFP tcode.
And sample code to read to text for the case above
METHOD fill_doc_ship_type_txt. DATA: exref TYPE REF TO cx_root. TRY. CLEAR docstc-ship_type_text_name. IF docstc-vstel IS NOT INITIAL AND docstc-vsart IS NOT INITIAL. "Some logic to determine name docstc-ship_type_text_name = 'ZDLVY_XYZ' && docstc-vstel && '_' && docstc-vsart. CONDENSE docstc-ship_type_text_name NO-GAPS. IF langu IS INITIAL. langu = 'E'. ENDIF. docstc-ship_type_text_langu = langu. CALL FUNCTION 'READ_TEXT' EXPORTING id = 'ST' language = docstc-ship_type_text_langu name = docstc-ship_type_text_name object = 'TEXT' TABLES lines = docstc-ship_type_text "Contains text lines, type TSFTEXT EXCEPTIONS id = 1 language = 2 name = 3 not_found = 4 object = 5 reference_check = 6 wrong_access_to_archive = 7 OTHERS = 8. IF sy-subrc <> 0. IF langu NE 'E'. result = fill_doc_ship_type_txt( langu = 'E' ). ELSE. result-status = c_stat_warning. IF NOT sy-msgid IS INITIAL. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 INTO result-status_text. ENDIF. ENDIF. ELSE. result-status = c_stat_success. ENDIF. ELSE. result-status = c_stat_error. ENDIF. CATCH cx_root INTO exref. result-status = c_stat_error. result-status_text = exref->get_text( ). ENDTRY. ENDMETHOD.
That is it for SFP form. With those steps above, you can use TEXT element with dynamic text objects in non BRF+ forms.
But, if you want to have same functionality with BRF+, you need to download your form from fiori app “Maintain Form Templates” and then edit form in Adobe Live Cycle Designer. Once you complete editing you need to upload them back. The problem is, Adobe Live Cycle Designer does not have context to add TEXT object. It does not know about SAP SO10.
Now lets see how to do that.
First we need to add tags to our SO10 text.
In XYZ_get_entityset method we will read our text and concatenate it according SO10.
Add a table to list rows, as you would do for any table view.
And if you print, you will see;
There were blog posts and answers to give clues on solving BRF+ and SO10 case. But there was not a complete answer. Therefore I decided to write a post. Hope that helps you.
If you know an alternative solution, please add it to comments.
Thanks for reading.
A blog post on dynamically placing image on form from se78.
And this class is quite useful : cl_ssf_xsf_utilities , check the methods.