‎2010 Jun 05 12:29 PM
Dear Friends,
I am display text in smartforms by using Include text .
now my condition is if text is not available in Particular Document it should Pick From other document.
regards,
S reddy
‎2010 Jun 05 1:11 PM
Hi,
How are are including the standard text now? are you using Text type as "Include text" or getting the value by creating the Program lines?
You can easily do it by creating Program lines.
Text Node
Program lines Node " Write the Logic to get the Long text
Loop Node " As we get long text in FM READ_TEXT in TLINES table, loop that
Text node " This node for printing Long textSample code
lv_tdname = WA_VBDPR-TDNAME.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = lc_0001
language = sy-langu
name = lv_tdname
object = lc_vbbp
TABLES
lines = lt_tline
EXCEPTIONS
OTHERS = 8
IF sy-subrc <> 0.
ENDIF.
IF lt_tline[] IS INITIAL.
CLEAR : lv_tdname.
lv_tdname = WA_VBDPR-TDNAME1. " Other document
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = lc_0001
language = sy-langu
name = lv_tdname
object = lc_vbbp
TABLES
lines = lt_tline
EXCEPTIONS
OTHERS = 8
.
IF sy-subrc <> 0.
ENDIF.
ENDIF.Regards
Bala Krishna
‎2010 Jun 05 1:05 PM
Hi,
Have condition in the condition.
if is initial.
write a code to fetch the data from other document.
Endif.
insert in to a text.
Thanks
Karthi.S
‎2010 Jun 05 1:11 PM
Hi,
How are are including the standard text now? are you using Text type as "Include text" or getting the value by creating the Program lines?
You can easily do it by creating Program lines.
Text Node
Program lines Node " Write the Logic to get the Long text
Loop Node " As we get long text in FM READ_TEXT in TLINES table, loop that
Text node " This node for printing Long textSample code
lv_tdname = WA_VBDPR-TDNAME.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = lc_0001
language = sy-langu
name = lv_tdname
object = lc_vbbp
TABLES
lines = lt_tline
EXCEPTIONS
OTHERS = 8
IF sy-subrc <> 0.
ENDIF.
IF lt_tline[] IS INITIAL.
CLEAR : lv_tdname.
lv_tdname = WA_VBDPR-TDNAME1. " Other document
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = lc_0001
language = sy-langu
name = lv_tdname
object = lc_vbbp
TABLES
lines = lt_tline
EXCEPTIONS
OTHERS = 8
.
IF sy-subrc <> 0.
ENDIF.
ENDIF.Regards
Bala Krishna