Application Development 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: 

Get text from READ_TEXT in SAPScript

Former Member
0 Kudos

Hello all,

I want to include a dynamic text element in a SAPScript.

But by one or more reasons this text is not showed..

This is my implementation to show the text element in the editor (SE71):

In the other editor it's like this

This is how it's showed now

Normally under 'Executive Summary the text elements must be displayed..

I've check the value of VIQMEL-BAUTL in he debugger:

And yes there is some text:

The given Text name seems correct..

Does anyone know what the problem is and why the text doesn't appear on the SAPScript?

Kind regards,

Pieter

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

What happens in Sapscript debugger? Does it show the text?

Maybe you could try with LANGUAGE 'E' .

9 REPLIES 9

Former Member
0 Kudos

Hi,

What happens in Sapscript debugger? Does it show the text?

Maybe you could try with LANGUAGE 'E' .

0 Kudos

Hello Piru,

In the SAPScript debugger for the INLUDE line:

The next message is displayed:

And the value of WQMMA-STTXT is empty..

But in the ABAP code this field recieved a value (like I showed in my question).

Why is this field empty again?

Kind regards,

Pieter

0 Kudos

Hi Pieter,

It might be worth checking the variable you want to use is available from the print program.

If you go into the old version of the text editor (the second screen shot in your question) there will be a menu option something like Goto -> Print Program -> Define Print Program (the wording has changed over the releases, but it's something like that).

From there you can navigate into the variables from the print program that are available in the form.

Regards,

Nick

0 Kudos

Hi,

usually in order to call that text you would need a text element within the corresponding window:

e.g.


/E    LAST

/:      INCLUDE &VIQMEL-BAUTL&  OBJECT QMFE ID LTQM LANGUAGE EN

This element should be called within the print program:

e.g.


    CALL FUNCTION 'WRITE_FORM'

      EXPORTING

        element = 'LAST'

        window  = 'MAIN'.


Make sure you have both of them.


Best regards.

0 Kudos

Hi Pablo,

Thanks for your answer.

I created like you said, now VIQMEL-BAUTL has the correct value but still the same message underneath the screen is displayed with the value..

Kind regards,

Pieter

0 Kudos

Hi,

even the WRITE_FORM in the print program?.

Put a break-point there and see what is going on.

(generate and activate frequently, sometimes its tricky)

Best regards.

0 Kudos

Hi,

not every field in the ABAP print program can be retrieved and output in SAPscript. Only GLOBAL variables can be accessed by SAPscript. Are you sure your field is a global variable in your print program (e.g compare its location in the program to some other, working, variables in the form)?

Regards,

  Alex

rosenberg_eitan
Active Contributor
0 Kudos

Hi,

Are you using global variables ?

Regards.

thanga_prakash
Active Contributor
0 Kudos

Hello Pieter,

Did you write the command by yourself or used the below insert option.

There might be chances that you have missed one space or added while writing.

Just try to add it by the provision available as below.

Go to the line editor of the window then in menu Insert --> Text --> Standard.

Specify the text name, ID and language.

Regards,

TP