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

Perform statement

Former Member
0 Likes
783

Hi all,

I am using perform statement in sap script.

I need take a "Terms of payment" text in a PO, the length of text is 180, but when return the text to script only take the 80 first words.

The ABAP code is:

data: text(255) type c.
call function 'READ_TEXT'
  exporting
   id = id
   language = language "sy-langu
   name = name
   object = object
  tables
   lines = tlinetab 
  exceptions
    others = 8.
 if sy-subrc = 0.
  loop at tlinetab.
    concatenate text tlinetab-tdline into text
    separated by space.
  endloop.
 endif.
 clear tlinetab.
 refresh : tlinetab.  clear tlinetab. 
 read table out_table with key name = 'TEXT'.
 ind = sy-tabix.
 write text to out_table-value.
 out_table-value = out_table-value.
 modify out_table index ind.

**********
The Sap Script code is:

/:   DEFINE &ZID& = 'F07'                
/:   DEFINE &ZOBJECT& = 'EKKO'           
/:   PERFORM TEXTOS IN PROGRAM ZPEDIDO   
/:     USING &ZOBJECT&                   
/:     USING &ZID&                       
/:     USING &EKKO-EBELN&                
/:     CHANGING &TEXT&                 
/:   ENDPERFORM 

When I´m debugging the ABAP program the value that take the variables text and out_table-value is correct, but in the script is wrong.

How I resolve this problem?

Thank for u help.

John.


1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
662

Hi John,

How is your variable &TEXT& declared?

If it is done as a locale variable in the SAPscript form using the "DEFINE" clause, the maximum length will be 60 characters.

Try to define a variable in your main print program. This might work better.

See also:

http://help.sap.com/saphelp_47x200/helpdata/EN/d1/8031d0454211d189710000e8322d00/content.htm

Regards,

Arjan Aalbers

4 REPLIES 4
Read only

former_member182371
Active Contributor
0 Likes
662

hi,

i´m not very sure but i think sapscript just allowed 72 columns.

try something with tlinetab-tdformat = '=' to make the line continue.

Best regards

Read only

0 Likes
662

Hi John,

I dont see any issue with code, can you check if the window size is small ?.

Change the size of the window and try.

Rgds,

Mano Sri

Read only

0 Likes
662

Hi Mano Sri, the variable "TEXT" is truncate when return to script. When this variable is in ABAP is ok, but when return to script is wrong.

Read only

Former Member
0 Likes
663

Hi John,

How is your variable &TEXT& declared?

If it is done as a locale variable in the SAPscript form using the "DEFINE" clause, the maximum length will be 60 characters.

Try to define a variable in your main print program. This might work better.

See also:

http://help.sap.com/saphelp_47x200/helpdata/EN/d1/8031d0454211d189710000e8322d00/content.htm

Regards,

Arjan Aalbers