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: 

data on sap script

Former Member
0 Kudos

hi guys ,

clear lt_lines. refresh lt_lines.

    • ML 20061016 - Wrap the Product name

call function 'RKD_WORD_WRAP'

exporting

textline = lv_product_name

  • DELIMITER = ' '

outputlen = 50

  • IMPORTING

  • OUT_LINE1 =

  • OUT_LINE2 =

  • OUT_LINE3 =

tables

out_lines = lt_lines.

  • EXCEPTIONS

  • OUTPUTLEN_TOO_LARGE = 1

  • OTHERS = 2

clear: lv_pn1, lv_pn2, lv_pn3, lv_pn4, lv_pn5.

loop at lt_lines.

case sy-tabix.

when 1.

lv_pn1 = lt_lines-line.

when 2.

lv_pn2 = lt_lines-line.

when 3.

lv_pn3 = lt_lines-line.

when 4.

lv_pn4 = lt_lines-line.

when 5.

lv_pn5 = lt_lines-line.

endcase.

endloop.

iam using the above funtion module to word wrap....im using lv_pn1 , lv_pn2 in sap script but the data is not printing but i can see the data in those fields when debugging...am i missing smthing...plz advise

regards

1 ACCEPTED SOLUTION

naimesh_patel
Active Contributor
0 Kudos

These fields lv_pn1, lv_pn2 must be global fields.

Declare them in the TOP include or before the start-of-selection.

Regards,

Naimesh Patel

2 REPLIES 2

Former Member
0 Kudos

Check the online help for the SAPscript PERFORM command for a clear example. The variables in your subroutine are not global to your SAPscript, you use structure ITCSY.

Regards,

Nick

Message was edited by:

Nick Young

naimesh_patel
Active Contributor
0 Kudos

These fields lv_pn1, lv_pn2 must be global fields.

Declare them in the TOP include or before the start-of-selection.

Regards,

Naimesh Patel