cancel
Showing results for 
Search instead for 
Did you mean: 

How to Concatenate number and string to assign to a string variable

apoorva_singh
Active Participant
0 Kudos

Hi.

I am new to studio and would like to find out how following can be done.

I am reading opportunity's Expected Value and Currency code which i want to store in a text field and use it for Display in my PDF report.

var expval = oppt_tab.SalesForecast.ExpectedRevenueAmount.content;                              <== 1900.00

var expvalcurr = oppt_tab.SalesForecast.ExpectedRevenueAmount.currencyCode;                <== USD

       

want to get output like below :

                     

                OpptLine.Opptexpectedval =  1900.00 USD

What should be syntax to do it.

Thanks

Apoorva

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member200567
Active Contributor
0 Kudos

Hi Apporva,

var result = expval.RoundToString(2).Concatenate(" ").Concatenate(expvalcurr);

FYI: You can find detail in SAP Cloud Applications Studio documentation.

For parsing to String from Numeric :

7.2.5.1.13 Numeric (Reuse Library)

For Concatenating string :

7.2.6.4 Built-In Functions for Strings

Best Regards,

Fred