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

remove line break

Former Member
0 Likes
1,805

Hello!

The follwing sap script code is given.

Z1 is a paragrah with a tab position. ,,&gv_s_pal& has to be positioned directly behind of &gv_s_meins& by the output. But in order to assign &gv_s_pal&

the paragraph Z1 I wrote in in the next line. There is line break in the output.

How can it be removed (line break)

Regards

Ilhan

=    ,,,,,,,,&gv_s_posnr&,,&gv_s_pstyv&,,&gv_s_matnr&&gv_s_konv&   
=    ,,&gv_s_meins&                                                
Z1   ,,&gv_s_pal&                                                 

7 REPLIES 7
Read only

Former Member
0 Likes
1,303

To say it with other words.

Hello

the problem is having an absolute position.

e.g.

How can I do that in SAP-Script?

&gv_s_posnr& must be positioned at 70

&gv_s_pstyv& must be positioned at 80

&gv_s_matnr& must be positioned at 90

&gv_s_konv& must be positioned at 100

&gv_s_meins& must be positioned at 110

,&gv_s_pal& must be positioned at 120

s.o

Regards

Ilhan

Read only

0 Likes
1,303

Create a paragraph format say ZZ and define exact tab positions in it. Like

ZZ First Tab:70 char

2nd Tab: 80 char

3rd Tab: 90 char

etc....

Also to restrict that your variable output len. do not increase from the defined tab length, you should restrict output by the number of characters like

&gv_s_matnr& will become &gv_s_matnr(10)&

&gv_s_konv& will become &gv_s_konv(10)&

So using a combination of a paragraph with specified tab positions and restricted output length of variables, you can achieve the desired results.

ZZ ,,&gv_s_posnr(10)&,,&gv_s_pstyv(10)&,,&gv_s_matnr(10)&.................all other vars

Cheers

RJv
Read only

0 Likes
1,303

Dear Rashid,

Your hints are very useful. By the way I still have a question.

I have many variables how can I continue in the next line

without a line break while assigning also to the paragraph ZZ ?

The length of the line in the Sap-Script-Editor is restricted so it is

necessary to continue in the next line. To not have a line break

which format command is the right one for extended line.

e.g.

ZZ ,,&gv_s_posnr(10)&,,&gv_s_pstyv(10)&,,&gv_s_matnr(10)&

?? ,,&gv_s_name(10)&,,&gv_s_xxx(5)&

??,,,,&gv_s_city(10)&,,&gv_s_xxx(6)&

Read only

0 Likes
1,303

Do not put anything in the paragraph style field. so your example will be

ZZ ,,&gv_s_posnr(10)&,,&gv_s_pstyv(10)&,,&gv_s_matnr(10)&

,,&gv_s_name(10)&,,&gv_s_xxx(5)&

,,,,&gv_s_city(10)&,,&gv_s_xxx(6)&

The field below ZZ will be space or blank. This way you can continue typing in 2/3/4... lines where as internally for SAPSCRIPT editor it is still one line

In fact if you open the F4 help list for paragraph formats, you will see that for continous text, the value is blank or space. Some other common formats are following

  • Default Paragraph

/: Command Line

/* Comment Line

/ Line Feed

Continuous Text

etc

RJv
Read only

Former Member
0 Likes
1,303

Hi

You have to define the TAB settings in the Paragraph(ZA) format with the relavent size/space and have to use in the script

ZA &gv_s_posnr&,,&gv_s_pstyv&,,&gv_s_matnr&,,&gv_s_konv&,,&gv_s_meins&

,,&gv_s_pal&

Reward points for useful Answers

Regards

Anji

Read only

Former Member
0 Likes
1,303

hi,

use PROTECT and END PROTECT statement as

PROTECT

st1,

st2,

st3,

............

........

ENDPROTECT.

if helpful reward some points.

With regards,

Suresh.A

Read only

Former Member
0 Likes
1,303

create as windows

<b>window1 -> matnr

window2->meins

window3->quatiy

window4->total

window5->date .. etc .</b>

<b>windows width are

window1 -> start(1) width(10) height (10) .

window2 -> start(12) width(10) height (10) .

window3 -> start(23) width(10) height (10) .

window4 -> start(35) width(10) height (10) .

window5 -> start(47) width(10) height (10) . etc .</b>

so that windows will be like column and each window will have one fields ...

so even if that data is not there for any of the field it wont change the display.

reward points if it is usefulll

Girish