2007 May 14 5:31 AM
I am trying to display an ABAP variable in an HTML page. What is the syntax for the same? Kindly help.
2007 May 14 8:00 AM
So this concatenation takes place in an abap variable or an html variable.
And what is the syntax going to be like??
2007 May 14 5:51 AM
which HTML page?
a BSP page ?
or
ITS generated page?
or HTML in HTML viewer control within SAPGUI?
Raja
2007 May 14 5:59 AM
2007 May 14 6:19 AM
2007 May 14 6:29 AM
I already tried that...Its not displaying nething...This is my syntax...
data: l_r_tmp_var type i.
l_r_tmp_var = I_VALUE.
IF I_X = 2 AND I_VALUE > 200000.
C_CELL_CONTENT = '<table><tr><td colspan=6 style="background:green;height:20px"><%= l_r_tmp_var %></td></tr></table>'.
ENDIF.
Plz tell me where I am going wrong??
2007 May 14 6:34 AM
are you sure its a BSP?
how are you presenting the c_cell_content in the page?
let me know where you have written this code? i mean from which transaction?
2007 May 14 6:35 AM
it looks to that you are writing this code in the table interface class which is used in BW webtemplate
correct me if i am wrong
2007 May 14 6:53 AM
if its webtemplate (table interface class) it has to be like below
concatenate '<table><tr><td colspan=6 style="background:green;height:20px">'
l_r_tmp_var
'</td></tr></table>' into C_CELL_CONTENT
2007 May 14 7:15 AM
Thats exactly what im doing...modifying a class to change the properties of the table in a web template. Srry its not a BSP page....
I tried ur syntax..
concatenate '<table><tr><td colspan=6 style="background:green;height:20px">'l_r_tmp_var'</td></tr></table>' into C_CELL_CONTENT.
.It gives an error..
After "'<table><tr><td colspan=6 style="background:green;height:20px">'", there must be a space or equivalent character (":", ",", "."). (":", "
And when i remove the single quotes from the variable...it gives an error...
Unable to interpret "'<table><tr><td colspan=6
style="background:green;height:20px">l_r_tmp_var</td></tr></table>'".
Possible causes: Incorrect spelling or comma error.
Plz help...
2007 May 14 7:32 AM
copy paste the below code.
concatenate `<table><tr><td colspan=6 style="background:green;height:20px">`
l_r_tmp_var
`</td></tr></table>`
into C_CELL_CONTENT.Regards
Raja
2007 May 14 7:52 AM
Ok its workin now....I changed the variable's type definition to char.
Thnx a lot.
Can u plz solve one more problem?
"<table><tr><td colspan=6 style="background:green;height:20px">l_r_tmp_var
`</td></tr></table>"
Instead of this I want a longer code....but it gives an error saying "Literals that take up more than one line are not permitted.
"
is there any soln to this problem??
2007 May 14 7:56 AM
Literals that take up more than one line are not permitted.
the above error will happend if the open quote and close quote are not in the same line
why do you want long line.
you can split it and use concatenate to concatenate into a string
2007 May 14 8:00 AM
So this concatenation takes place in an abap variable or an html variable.
And what is the syntax going to be like??
2007 May 14 8:04 AM
concatenation in abap
concatenate `text literal 1` `text literal 2 ` abap_var1 abap_var2 into result_var .
2007 May 14 8:07 AM