Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

TEXT NOT DISPLAY in smartforms .......

Former Member
0 Likes
1,741

TEXT NOT DISPLAY in smartforms .......when I debug I shaw the text but after f5 it is gone .

I declare lv_line type c in global data.where is the problem

my code is

dATA: lt_line TYPE TABLE OF tline,

      ls_line TYPE tline.



data:  NAME type THEAD-TDname,

     TDOBJECT type THEAD-TDOBJECT value 'VBBK' .

name = p_vbeln.

BREAK-POINT.

CALL FUNCTION 'READ_TEXT'

  EXPORTING

*   CLIENT                        = SY-MANDT

    ID                            = '0002'

    LANGUAGE                      = sy-langu

    NAME                          =  NAME

    OBJECT                        = TDOBJECT

*    ARCHIVE_HANDLE                = 0

*   LOCAL_CAT                     = ' '

* IMPORTING

*   HEADER                        =

*   OLD_LINE_COUNTER              =

  TABLES

    LINES                         = LT_LINE

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.

* Implement suitable error handling here

ENDIF.

BREAK-POINT.



*CLEAR LS_LINE.

READ TABLE LT_LINE INTO LS_LINE INDEX 1.

LS_LINE-TDLINE = LV_LINE.





.









TEXT NOT DISPLAY in smartforms .......when I debug I shaw the text but after f5 it is gone .

I declare lv_line type c in global data.where is the problem

my code is

dATA: lt_line TYPE TABLE OF tline,

      ls_line TYPE tline.



data:  NAME type THEAD-TDname,

     TDOBJECT type THEAD-TDOBJECT value 'VBBK' .

name = p_vbeln.

BREAK-POINT.

CALL FUNCTION 'READ_TEXT'

  EXPORTING

*   CLIENT                        = SY-MANDT

    ID                            = '0002'

    LANGUAGE                      = sy-langu

    NAME                          =  NAME

    OBJECT                        = TDOBJECT

*    ARCHIVE_HANDLE                = 0

*   LOCAL_CAT                     = ' '

* IMPORTING

*   HEADER                        =

*   OLD_LINE_COUNTER              =

  TABLES

    LINES                         = LT_LINE

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.

* Implement suitable error handling here

ENDIF.

BREAK-POINT.



*CLEAR LS_LINE.

READ TABLE LT_LINE INTO LS_LINE INDEX 1.

LS_LINE-TDLINE = LV_LINE.





.









9 REPLIES 9
Read only

venkateswaran_k
Active Contributor
0 Likes
1,432

Hi

Your statement should be like this..

LV_LINE = LS_LINE-TDLINE. 

Not...   LS_LINE-TDLINE = LV_LINE.

Also check the length of your variable  lv_line...    ( lv_line type char132 )

Regards,

Venkat

Read only

bastinvinoth
Contributor
0 Likes
1,432

Hi sharmistha mukherjee

Yes go with Venkateswaran K as suggested

Statement should be LV_LINE = LS_LINE-TDLINE.

Regards,

Bastin.G

Read only

FredericGirod
Active Contributor
0 Likes
1,432

Why using READ_TEXT in Smartforms ??

Fred

Read only

0 Likes
1,432

Hi,

my function person told me to use read_text in smartforms. and I use dis form for tcode vf02 all the program lines and data are in smartforms so I called READ_TEXT here.

sharmi

Read only

0 Likes
1,432

Hi sharmistha mukherjee

Hope you aware of include text in smartforms

If it is smartform or script you can include the text object directly with out using READ_TEXT FM

Page->Window->Text and select text type as Include text .

then pass the object Id, text id and text object for that text.

Including Text Modules (SAP Library - Smart Forms)

Regards,

Bastin.G

Read only

gurunathkumar_dadamu
Active Contributor
0 Likes
1,432

Hi Sharmistha,

try use the following code.

*-Types for text
TYPES:BEGIN OF ty_lines,
line(72)     TYPE    c,
END OF ty_lines.

data:wa_lines   TYPE ty_lines

LOOP AT LT_LINE INTO LS_LINE.
wa_lines-
line = wa_text-tdline.
*-- pass this value to your end structure.

ENDLOOP.

Hope may solve your problem.

Regards,

Gurunath

Read only

Former Member
0 Likes
1,432

hi Venkat,

thanks for ur reply ..problem solve.

sharmistha

Read only

Former Member
0 Likes
1,432

Hi Sharm,

    While transfer the data form one variable to another vaiable you should follow below coding,

*CLEAR LS_LINE.


READ TABLE LT_LINE INTO LS_LINE INDEX 1.


LS_LINE-TDLINE = LV_LINE.

*CLEAR LS_LINE.


READ TABLE LT_LINE INTO LS_LINE INDEX 1.

if sy-subrc = 0.

LV_LINE = LS_LINE-TDLINE .

endif.

After read statement check the subrc whether your internal table have that data or not.

Warm Regards,

John.

Read only

raviahuja
Contributor
0 Likes
1,432

This message was moderated.