cancel
Showing results for 
Search instead for 
Did you mean: 

SAPScript: How to combine two text in the same line?

Former Member
0 Kudos

Dear Gurus,

I have a case to combine hard code text and long text in the same line.

For example, i need to display following line:

'Project name:' <long_text>

How to do it in SAPScript?

Can we do it with following code?

/: 'Project name: ' INCLUDE Z_TEST OBJECT TEXT ID ST LANGUAGE &NAST-SPRAS&

Thanks & Regards,

Ari

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi,

Sorry, I didn't pay enough attention... I've written about smartforms. (But it works there )

So, please forget my previous post.

Tamá

former_member585060
Active Contributor
0 Kudos

Hi,

You can achieve that by this method,

Goto Tcode SO10

Give the Object Name 'Z_TEST' & Id

See the Paragraph format for the Text, you can do it from Menu

Format>Line . If it is /: change it to =. Save

Now in the SAPScript Text editor in which you want to print

P1 'Project Name :'

/: INCLUDE Z_TEST OBJECT TEXT ID ST LANGUAGE &NAST-SPRAS&

the output will be

Project name : Abc xyz

Regards

Bala Krishna.

Edited by: Bala Krishna on Oct 17, 2008 7:11 PM

Former Member
0 Kudos

Try


AS Project Text:
/: INCLUDE Z_TEST OBJECT TEXT ID ST LANGUAGE &NAST-SPRAS& PARAGRAPH '= '

I think this will work as long as Z_TEST only uses the default formating '*'.

Former Member
0 Kudos

Try


AS Project Text:
/: INCLUDE Z_TEST OBJECT TEXT ID ST LANGUAGE &NAST-SPRAS& PARAGRAPH '= '

I think this will work as long as Z_TEST only uses the default formating '*'.

Former Member
0 Kudos

Hello,

Try this one:

Your text 'Project name' is in a text node.

When you define the next text node for include text set the start option to 'Append directly'. (tab 'General attributes')

Hope, it works.

Tamá

Former Member
0 Kudos

Hi Tamas,

The solution that you mention is for SAPScript or smartforms?

Because i can't found text node in sapscript.

Thanks & Regards,

Ari

naimesh_patel
Active Contributor
0 Kudos

No. It is not possible the way you are proposing.

One easiest way is, include "'Project name" in the Include text.

Other way, you can create a Subroutine in the Form, In the subroutine Read the Text using the READ_TEXT, than concatenate it in a new String and print the new string to the output.

Regards,

Naimesh Patel

Former Member
0 Kudos

Dear Naimesh,

So i just need to read the standard text line by line and concatenate it to string type variable.

Let me try.

Thanks,

Ari