Application Development 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: 

How to append text with variable

former_member459142
Participant
0 Kudos

This FM i m using for pop-up massage

CALL FUNCTION 'POPUP_CONTINUE_YES_NO'

EXPORTING

DEFAULTOPTION = 'Y'

TEXTLINE1 =

TEXTLINE2 = ' is Balance quantity' & quant & 'Do you want to continue '

TITEL = '-'

START_COLUMN = 1

START_ROW = 6

IMPORTING

ANSWER = result

i want to display this massage in popup -- ' is Balance quantity' & quant & 'Do you want to continue '

"quant" is variable which giving quntity

this line is giving error while activating , so tell me how i append text with variable

thanks

7 REPLIES 7

Former Member
0 Kudos

Hi,

Pass the quantity to character type variable and try concatenating again.

Regards

Former Member
0 Kudos

Hi,

Concatenate  'is Balance quantity'  quant  'Do you want to continue' into  L_string separated by space.
CALL FUNCTION 'POPUP_CONTINUE_YES_NO'
EXPORTING
DEFAULTOPTION = 'Y'
TEXTLINE1 = 
TEXTLINE2 = l_string        " cHANGE
TITEL = '-'
START_COLUMN = 1
START_ROW = 6
IMPORTING
ANSWER = result

I355602
Advisor
Advisor
0 Kudos

Hi,

Use:


data : v_msg(50) type c,
     v_temp1(10) type c,
     v_temp2(10) type c.
v_temp1 = 'is Balance quantity'.
v_temp2 = 'Do you want to continue'.
concatenate v_temp1 <quantity_field> v_temp2 into v_msg separated by space.

Now pass this v_msg in textline.

Regards,

Tarun

Former Member
0 Kudos

Hi Gupta,

Declare a text element t000 with the text 'is Balance quantity and quant and Do you want to continue' and use the below statement.

REPLACE text-000 WITH quant(variable) INTO lv_text(another variable).

Pass this variable lv_text to the FM.

Hope this helps.

Regards

Gowthami

GauthamV
Active Contributor
0 Kudos

Use this.

[append text with variable|https://forums.sdn.sap.com/click.jspa?searchID=23294976&messageID=6759361]

Former Member
0 Kudos

Hi,

do one thing b4 calling the FM store that text and variable into another variable and define it

like text(40) type c and store in it, then pass this variable to the FM as a text.

Regards

vijay

former_member459142
Participant
0 Kudos

thnks