cancel
Showing results for 
Search instead for 
Did you mean: 

Standard Text not getting refreshed.

Former Member
0 Kudos

Hi All,

I am working on a script where in I got to use a standard text. I am printing the text on script. And no error is coming. But when I print more than 1 invoice continuously I am getting the same standard text multiple times.

Can any one help me?

Thanks

Kalyan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Kalyan,

I hope you are not clearing the standard text before you populate it.

Please use below set of function modules.

data:

lt_text TYPE STANDARD TABLE OF tline,

ls_header LIKE thead,

ls_text TYPE tline.

CALL FUNCTION 'DELETE_TEXT'

EXPORTING

id = ls_header-tdid

language = ls_header-tdspras

name = ls_header-tdname

object = ls_header-tdobject

savemode_direct = 'X'

textmemory_only = 'X'

EXCEPTIONS

OTHERS = 2.

CALL FUNCTION 'COMMIT_TEXT'

EXPORTING

savemode_direct = 'X'.

REFRESH lt_text.

or call a separate perform from the script after calling particular subroutine where you are populating the standard text....

/: PERFORM CLEAR_TEXT IN PROGRAM ZFIF_REPORT

/: USING &REGUH-LAUFD&

/: CHANGING &GV_KEY&

/: ENDPERFORM

Form details...Call the perform from standard scrpt text load program SAPLSTXG....

FORM clear_text TABLES input_parm STRUCTURE itcsy

out_parm STRUCTURE itcsy.

CONSTANTS:

lc_name TYPE char30 VALUE 'TEXT_LINES'.

PERFORM mm_create_new(saplstxg) USING lc_name.

PERFORM init_text_buffer(saplstxg).

ENDFORM.

Thanks ...

Former Member
0 Kudos

thanks kasturi,

this was a big issue, i stucked up...

Now i am free.

Former Member
0 Kudos

Hi kalyan,

i am facing the same issue can u explain how to resolve this issue

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi kalyan,

are you reading the text into a string. In that case ensure you ahve cleared teh string before each time the standard text is being read. Secondly, if the standard text has more than 1 Line, then you need to loop and read all the line of the standard text.

Let us know if your problem revolves around the above

Cheers,

Varna

Former Member
0 Kudos

Hi,

Please check the text element where u r calling in print program. ( check in the loop --- endloop statement). and also let me know where u r using this standard text ( in MAIN WINDOW or VAR window).

Regards,

Chandra Kavali