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: 

ISSUE in SApScript

Former Member
0 Kudos

Hi,

i am calling a subroutine in a Page window.

the subroutine returns lines/text of Char 255 (which is the OUT_PAR-Value STRUCTURE ITCSY ).

but while gettin printed only 80 to 81 characters are getting printed.

kindly advice how to get all the permissible OUT_PAR-Value (which is Char(255)) to be printed.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

can you check this in debugging either where you are populating OTAB or in script what value you are getting ?

else you can use OFFSET to print the lines

V_TEXT+0(80)

V_TEXT+80(80) like that.

Regards

srikanth

16 REPLIES 16

Former Member
0 Kudos

Dear Pavithra,

It looks like the page window width is not sufficient. It might accomodate only 80 characters. Try to increase window width or phrase the text into multiple lines.

Regards,

Prasanth

0 Kudos

the page window is the MAIN window.

and has its sufficient height and width.

Former Member
0 Kudos

can you check this in debugging either where you are populating OTAB or in script what value you are getting ?

else you can use OFFSET to print the lines

V_TEXT+0(80)

V_TEXT+80(80) like that.

Regards

srikanth

0 Kudos

I HAVE TRIED TEH OFFFSET.

THEN ALSO ITS PRINTING UP TO 81 AND AFTER THAT A BLANK LINE.

I HAVE DEBUGGED TEH SUBROUTINE IS RETURNING THE OUT_PAR-VALUE OF 255 . BUT WHILE DEBUGGING THE RESPECTICE CHANGIN PARAMETER ONLY 81 CHARECTERS ARE POPULATING.

Thanks & regards.

Pavi.S

0 Kudos

can you do like this.

OTAB-VALUE = <YOUR 255 character variable>

<b>CONDENSE 0TAB-VALUE NO-GAPS.</b>

MODIFY OTAB TRANSPORTING VALUE WHERE NAME = '<FIELDNAME>'.

Can you check the length after CONDENSE.

regards

srikanth

0 Kudos

even with CONDENSE staement it gives max of 81 characters only.

0 Kudos

Hello,

In the subroutine from where are u getting the text.

Can u paste ur subroutine,so that I can get clear idea.

Regards

0 Kudos

Pavithra,

Debug the SUbroutine and check wether u are getting the complete text.

Regards

0 Kudos

Hi

Try This:

Break your output of 255 characters into lines of 72 vharacters each and print. This might solve the issue.

Hope This Helps

Anirban

Former Member
0 Kudos

Hi,

Kindly check your printer parameters also, since they influence the output of your form ot a larger extent. You can check with your BASIS regarding this.

Reward if the info. is of any help.

Regards

Former Member
0 Kudos

Hello,

Try to increase the width of the Page window.

And debug ur script,and at the page window try to absorve wether the complete text is coming to the fields.

Please check and let me know if u face still any problem.

Regards,

naimesh_patel
Active Contributor
0 Kudos

Hello,

It seems your variable in the subroutine has the length of 80.

Can you check that ?

FORM GET_NUM_TEXT TABLES I_INVAL STRUCTURE ITCSY

I_OUTVAL STRUCTURE ITCSY.

DATA: W_TEXT LIKE REOML-MSGTXT. <b><< check the length of this variable</b>

w_text = 'this is for test'.

  • Modifing I_OUTVAL with the value of W_TEXT

READ TABLE I_OUTVAL WITH KEY 'W_TEXT' .

IF SY-SUBRC EQ 0 .

MOVE WORDS-WORD TO I_OUTVAL-VALUE.

MODIFY I_OUTVAL INDEX SY-TABIX .

ENDIF .

ENDFORM. " GET_NUM_TEXT

regards,

Naimesh

0 Kudos

hi,

i have debugged teh subroutine and the out_par-value is taking max of 255 charecters.

I TRIED DECLARING THE CHANGING VARIABLES INSIDE TEH FORM.

FORM GET_TERMSNCOND TABLES IN_PAR STRUCTURE ITCSY

OUT_PAR STRUCTURE ITCSY.

DATA : F03 LIKE ITCSY-VALUE,

F07 LIKE ITCSY-VALUE,

F05 LIKE ITCSY-VALUE,

F08 LIKE ITCSY-VALUE,

F13 LIKE ITCSY-VALUE.

EVEN THEN TEH OUTPUT IS ONLY 81 CHARECTERS.

0 Kudos

Hi,

The Subroutine will return you 255 Characters, its no problem but while printing in SAPScript it will only print as many characters as it can hold, varies from 72 to 81, for other characters you have to break into subsequent lines and display.

Hope it Helps

Anirban

0 Kudos

Hello,

change you data declaration like

data: f03 type BAPI_TLINE. " field with 255 char

and try.

Regards,

Naimesh

Former Member
0 Kudos

Dear Pavithra,

Could you check technical information of the field used in PERFORM statement in script. It might have 80 characters length.

Regards,

Prasanth