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

ISSUE in SApScript

Former Member
0 Likes
1,557

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
Read only

Former Member
0 Likes
1,440

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
Read only

Former Member
0 Likes
1,440

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

Read only

0 Likes
1,440

the page window is the MAIN window.

and has its sufficient height and width.

Read only

Former Member
0 Likes
1,441

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

Read only

0 Likes
1,440

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

Read only

0 Likes
1,440

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

Read only

0 Likes
1,440

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

Read only

0 Likes
1,440

Hello,

In the subroutine from where are u getting the text.

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

Regards

Read only

0 Likes
1,440

Pavithra,

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

Regards

Read only

0 Likes
1,440

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

Read only

Former Member
0 Likes
1,440

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

Read only

Former Member
0 Likes
1,440

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,

Read only

naimesh_patel
Active Contributor
0 Likes
1,440

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

Read only

0 Likes
1,440

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.

Read only

0 Likes
1,440

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

Read only

0 Likes
1,440

Hello,

change you data declaration like

data: f03 type BAPI_TLINE. " field with 255 char

and try.

Regards,

Naimesh

Read only

Former Member
0 Likes
1,440

Dear Pavithra,

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

Regards,

Prasanth