11-26-2010 12:57 AM
Hi All,
I have a requirement to read Smartform Text module in my program. I have searched SDN for any existing questions on this but I couldn't find any help. I thought we can use READ_TEXT but seems it is not helpful. Could you please let me know any FM or class method available for this. You can use example Smartform text module SF_ADRS_FOOTER.
Regards,
Yellappa.
11-26-2010 1:03 AM
I have got one more function module SSFRT_READ_TEXTMODULE which helped me. I am closing the thread.
11-26-2010 1:31 AM
Hi,
Below is the sample report to read the text of text module.
report ztest_date.
data: lr_form type ref to cl_ssf_fb_smart_form.
data: lr_node type ref to cl_ssf_fb_node.
data: lr_text type ref to cl_ssf_fb_text_item.
data: ls_varheader type ssfvarhdr.
data: ls_text type tline.
start-of-selection.
create object lr_form.
try.
call method lr_form->load
exporting
im_formname = 'SF_ADRS_FOOTER'.
catch cx_ssf_fb .
endtry.
if lr_form is bound.
read table lr_form->varheader into ls_varheader index 1.
if sy-subrc = 0.
lr_node ?= ls_varheader-pagetree.
if lr_node is bound.
lr_text ?= lr_node->obj.
if lr_text is not initial.
loop at lr_text->text into ls_text.
write:/ ls_text-tdline.
endloop.
endif.
endif.
endif.
endif.
08-19-2014 1:43 PM
Hi,
Used below code:
DATA :
| T_LINES | TYPE TABLE OF | TLINE |
| W_TDLINES | TYPE | TLINE |
| V_WORK | TYPE | CHAR255 |
1) Call FM READ_TEXT and pass
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = 'Z038'
LANGUAGE = sy-langu
NAME = BIL_NUMBER
OBJECT = 'VBBK'
TABLES
lines = T_LINES
IF sy-subrc = 0.
LOOP AT t_lines INTO W_TDLINES.
CONCATENATE V_WORK W_TDLINES-TDLINE INTO V_WORK SEPARATED BY SPACE.
CONDENSE V_WORK.
CLEAR W_TDLINES.
ENDLOOP.
REFRESH T_LINES.
ENDIF.
OR
2 ) See below attached screen shot