‎2008 Apr 24 9:00 AM
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.
‎2008 Apr 24 9:02 AM
make use of condense thhat is e.g.
&field1(C)&
plz reward if useful
vivek
‎2008 Apr 24 9:41 AM
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
‎2008 Apr 24 10:56 AM
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
‎2008 Apr 24 11:14 AM
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 ®UH-ZNME1&, ®UH-ZNME2&
NAME ®UD-ZNM1S&, ®UD-ZNM2S&
ADDRESSNUMBER
ENDADDRESS
Kindly help out. slightly urgent
Thanks,
BP.
‎2008 Apr 24 11:24 AM
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
‎2008 Apr 24 11:42 AM
Hi Raam,
I cannot increase it more than 72 chars, I get an error.
Rgds,
BP
‎2008 Apr 24 12:05 PM
Hi Bindu,
Decrease the font size in charecter format .
Due to this u may adjust them side by side
regards ,
raam
‎2008 Apr 24 12:15 PM
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 ®UH-ZNME1&
USING ®UH-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.
‎2008 Apr 24 12:40 PM
Hi
Is it not possible to do something without interfering with the driver program.
Rgds,
BP
‎2008 Apr 24 1:26 PM
Hi Bindu,
Write the perform in some subroutine pool or any program ,no need to touch the drive program.
Rajesh
‎2008 Apr 24 1:42 PM
Hi Rajesh,
I am not getting it.
Cud u please give a step by step procedure.
I will be obliged.
Thanks
BP.
‎2008 Apr 24 9:25 AM
Hi Bindu,
concatenate the two fields in to a String variable with separated by space .
I hope this could work try it.
regards
sg
‎2008 Apr 24 9:32 AM