cancel
Showing results for 
Search instead for 
Did you mean: 

SapScript

Former Member
0 Kudos

I want to print the line item wise text that is maintained in me23n.

In me23n, we have text for each line item. I want to print all that text.

But only partial of it is coming. I am not able to find why the whole text is not coming.

In script , I wrote the code as

PERFORM GET_INCLUDE_TEXT IN PROGRAM YMMR_MEDRUCK

USING &EKPO-EBELN&

USING &EKPO-EBELP&

CHANGING &TEXT&

ENDPERFORM

IF &TEXT1& NE ' '

&TEXT&

ENDIF

And in se38 in YMMR_MEDRUCK, i wrote the code as,

FORM get_include_text tables IN_PAR structure ITCSY

OUT_PAR structure ITCSY.

data : EBELN like EKPO-EBELN,

EBELP like EKPO-EBELP,

TNAME like STXH-TDNAME.

data : TLINE like TLINE occurs 0 with header line.

data : TEXT type STRING.

  • data : TEXT1 type STRING.

read table IN_PAR with key 'EKPO-EBELN'.

if SY-SUBRC = 0 .

EBELN = IN_PAR-VALUE.

endif.

read table IN_PAR with key 'EKPO-EBELP'.

if SY-SUBRC = 0 .

EBELP = IN_PAR-VALUE.

endif.

concatenate EBELN EBELP into TNAME.

call function 'READ_TEXT'

exporting

  • CLIENT = SY-MANDT

ID = 'F03'

LANGUAGE = SY-LANGU

NAME = TNAME

OBJECT = 'EKPO'

  • ARCHIVE_HANDLE = 0

  • LOCAL_CAT = ' '

  • IMPORTING

  • HEADER =

tables

LINES = TLINE

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.

endif.

loop at TLINE.

concatenate TEXT TLINE-TDLINE into TEXT separated by ' '.

condense TEXT.

endloop.

refresh TLINE.

clear TLINE.

read table OUT_PAR with key 'TEXT'.

if SY-SUBRC = 0.

OUT_PAR-VALUE = TEXT.

modify OUT_PAR index SY-TABIX.

endif.

ENDFORM. " get_include_text

During debugging, I checked that all the text is coming in se38(i.e. in OUT_PAR).

But in script When i display &TEXT&, only partial of it gets displayed.

I am not able to find the error, Why only part of it gets printed.

While displaying the text in script i.e. &TEXT&, I am using paragraph format NE. So do i have to make any extra settings in this paragraph format.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Declare the TEXT as maximum lenght, then it will display all the text, if you are delcared that variable in the Driver program then increase the length and declare it at the TOP of the program, and if it is SAPSCRIPT then declare it maximum length 255 charecters

Regads

Sudheer

former_member196280
Active Contributor
0 Kudos

Nothing is wrong in your approach....

In SAP script text symbols can hold 60 character, so try to split your long text into differnet variables and display it in your form.

Close the thread if your question is answered.

Regards,

Sairam