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

Sapscript - displaying two text fields after truncating the spaces.

Former Member
0 Likes
1,512

Hi Friends,

In a sapscript, I have to display the name of the vendor which is in two different fields each of length 40 chars. The first one may be filled to the maximum and the remaining goes into the second field and may occupy only 30 or 35 chars. I need to display the two side by side and the space available is 70 chars. I am using an existing script and I am not able to print the two side by side. It is going to the next line. How do I truncate the trailing spaces of either field. Please help. It is quite urgent.

Thanks,

BP.

13 REPLIES 13
Read only

Former Member
0 Likes
1,429

make use of condense thhat is e.g.

&field1(C)&

plz reward if useful

vivek

Read only

0 Likes
1,429

Hi,

I have tried using the &field(C)& in the text editor but it has not worked. I have not changed anywhere else and I have not touched the driver program.

Rgds

BP

Read only

0 Likes
1,429

Hi Bindhu,

Wht are the fields you need to display...can You plz send the code so that I can change it..and send You ....

regards

sg

Read only

0 Likes
1,429

Hi Sunil,

Well this is the f110_prenum_chck. and the fields are reguh-znme1, reguh-znme1.

This comes in the address in check section where only the field name 1 and name 2 are required to be displayed.

My editor has the following.

ADDRESS PARAGRAPH AS

NAME &REGUH-ZNME1&, &REGUH-ZNME2&

NAME &REGUD-ZNM1S&, &REGUD-ZNM2S&

ADDRESSNUMBER

ENDADDRESS

Kindly help out. slightly urgent

Thanks,

BP.

Read only

0 Likes
1,429

Hi Bindu,

Increase the window length in Layout .

This may be due to that. If the window is small then the values will come to next line automatically.

reward if helpful

raam

Read only

0 Likes
1,429

Hi Raam,

I cannot increase it more than 72 chars, I get an error.

Rgds,

BP

Read only

0 Likes
1,428

Hi Bindu,

Decrease the font size in charecter format .

Due to this u may adjust them side by side

regards ,

raam

Read only

0 Likes
1,429

Hi Bindu,

use the perform to concatenate name1 and name2 to NAME and use this field in address command.

Check with the following code:

/: DEFINE &ZNAME& = ''

PERFORM ADDRESS IN PROGRAM 'PROGRAM'

USING &REGUH-ZNME1&

USING &REGUH-ZNME2&

CHANGING &ZNAME&

ENDPERFORM

FORM address

TABLES itab STRUCTURE itcsy

otab STRUCTURE itcsy.

LOOP AT itab.

CASE itab-name.

WHEN 'REGUH-ZNME1'.

l_name1 = itab-value.

WHEN 'REGUH-ZNME2'.

l_name2 = itab-value.

ENDCASE.

ENDLOOP.

use the logic.

Endform.

Read only

0 Likes
1,428

Hi

Is it not possible to do something without interfering with the driver program.

Rgds,

BP

Read only

0 Likes
1,428

Hi Bindu,

Write the perform in some subroutine pool or any program ,no need to touch the drive program.

Rajesh

Read only

0 Likes
1,428

Hi Rajesh,

I am not getting it.

Cud u please give a step by step procedure.

I will be obliged.

Thanks

BP.

Read only

Former Member
0 Likes
1,428

Hi Bindu,

concatenate the two fields in to a String variable with separated by space .

I hope this could work try it.

regards

sg

Read only

Former Member
0 Likes
1,428

Hi Bindu...

Have you tried with concatinating....

sg