‎2008 Oct 22 12:59 PM
Hi experts,
Is it possible to use IF...else... endif in bsp application,
I am passing some variables from abap to BSP application, and wish to run html codes according to variable value.
if flag = 'X'.
html codes
else.
message text.
endif.
‎2008 Oct 22 1:02 PM
Hi,
It is possible. You can write code in Event Handler 'On Create/On Initialization/On InputProcessing
IF event->id = 'orgButton' AND event->event_type = 'click'.
DATA: data TYPE REF TO CL_HTMLB_INPUTFIELD.
data ?= CL_HTMLB_MANAGER=>GET_DATA(
request = runtime->server->request
name = 'inputField'
id = 'id1'
).
You can also write code in the 'Layout' also.
Look this:
<% if i_mara is not initial. %> <tr> <td><b>MATNR</b></td>
</tr>
<% loop at i_mara into wa_mara. %><tr>
<td> <%= wa_mara-matnr %> </td>
</tr>
<% endloop. %> <% else. %> <tr> <td><b>MATNR</b></td>
</tr>
<% endif. %>
Regards..
Edited by: Neenu Jose on Oct 22, 2008 2:04 PM
Edited by: Neenu Jose on Oct 22, 2008 2:05 PM
Edited by: Neenu Jose on Oct 22, 2008 2:07 PM
Edited by: Neenu Jose on Oct 22, 2008 2:10 PM
‎2008 Oct 22 1:05 PM
U can as said above..have A LOOK
<% if flag = 'X'. %>
html codes
<% else. %>
message text.
<% endif. %>
Deepak
‎2008 Oct 22 1:09 PM
it is possible using the abap code directive you can do that
<% here you can write the abapcode, syntaxt is smae %>
here you write the htmlb tags or html code
<% here you can end the abapcode %>