cancel
Showing results for 
Search instead for 
Did you mean: 

Radiobuttongroup and inputfield

Former Member
0 Kudos
96

Hi:

I have a requirement, i have the following field in a view

<crmic:gridLayoutCell columnIndex = "1" rowIndex = "5" colSpan = "3" ><crmic:label design = "label" id = "Sex"

for = "//Customer/SEXO"

text = "Sexo" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex = "4" rowIndex = "5" colSpan = "3" ><htmlb:inputField id = "Sex"

width = "100%"

maxlength = "10"

value = "//Customer/SEXO" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="8" rowIndex="5" >

This field it's supossed to be hidden, and a radiobuttongroup has to have the entered value for example:

1, Male

2, Female

and the selected value of that radiobuttongroup must be passed to the field, now i don't know how to set the value on the field, and how to set value to the radiobutton, could you help me?

Thanks & regards

Accepted Solutions (0)

Answers (3)

Answers (3)

raja_thangamani
Active Contributor
0 Kudos

Andres,

Just i tested this code & works fine. here is the code. Let me know if you any issue.

<%@page language="abap" %>
<%@extension name="htmlb" prefix="crmic" %>
<crmic:content design="design2003" >
  <crmic:page title=" " >
    <crmic:form>
      <%
  data: selected type string.
  data:i_formfields       TYPE tihttpnvp,
  wa_formfields      TYPE ihttpnvp.
  CALL METHOD request->get_form_fields
  CHANGING
  fields = i_formfields.
  data: event type ref to cl_htmlb_event.
  event ?= cl_htmlb_manager=>get_event( runtime->server->request ).
  if event is not initial and EVENT->SERVER_EVENT = 'radioclick'.
  READ TABLE i_formfields INTO wa_formfields WITH KEY name = 'group1'.
  selected = wa_formfields-value.
  if selected = '1'.
*  SEXO = 'Male'.
    Customer->SEXO = 'Male'
  elseif selected = '2'.
*  SEXO = 'Female'.
    Customer->SEXO = 'Female'
  endif.
  endif.
      %>
      <crmic:radioButtonGroup id          = "Group1"
                              columnCount = "3"
                              selection   = "<%= selected %>" >
        <crmic:radioButton id      = "r1"
                           text    = "Male"
                           key     = "1"
                           onClick = "radioclick" />
        <crmic:radioButton id      = "r2"
                           text    = "Female"
                           key     = "2"
                           onClick = "radioclick" />
      </crmic:radioButtonGroup>
      <crmic:gridLayout id          = "mygrid"
                        rowSize     = "2"
                        columnSize  = "6"
                        cellSpacing = "1"
                        cellPadding = "1" >
        <crmic:gridLayoutCell columnIndex = "3"
                              rowIndex    = "1"
                              colSpan     = "1" >
          <crmic:label design = "label"
                       id     = "Sex"
                       for    = ""//Customer/SEXO"
                       text   = "Sexo" />
        </crmic:gridLayoutCell>
        <crmic:gridLayoutCell columnIndex = "4"
                              rowIndex    = "1"
                              colSpan     = "1" >
          <crmic:inputField id        = "Sex"
                            width     = "100%"
                            maxlength = "50"
                            value     = ""//Customer/SEXO" />
        </crmic:gridLayoutCell>
      </crmic:gridLayout>
    </crmic:form>
  </crmic:page>
</crmic:content>

Former Member
0 Kudos

Hi Andres,

Use the following code ...

<b>Layout </b>

<%@page language="abap"%>

<%@extension name="htmlb" prefix="htmlb"%>

<htmlb:content design="design2003">

<htmlb:page title = "radi group ">

<htmlb:form>

<htmlb:radioButtonGroup id = "myRadioButtonGroup1"

columnCount = "1"

>

<htmlb:radioButton id = "male"

text = "Male"

onClick = "MyRadioButtonClick" />

<htmlb:radioButton id = "female"

text = "Female"

onClick = "MyRadioButtonClick" />

</htmlb:radioButtonGroup>

<htmlb:inputField id="radiovalue"

value="<%= radio_value%>"/>

</htmlb:form>

</htmlb:page>

</htmlb:content>

<b> OnInputProcessing </b>

class cl_htmlb_manager definition load.

data: event type ref to cl_htmlb_event.

event = cl_htmlb_manager=>get_event( runtime->server->request ).

if event->name = 'radioButton' and event->event_type = 'click'.

data: radiobutton_event type ref to cl_htmlb_event_radiobutton.

radiobutton_event ?= event.

endif.

data: dd_listbox_event type ref to cl_htmlb_event_selection.

case event->id.

when 'male'.

radio_value = '1' .

when 'female'.

radio_value = '2' .

endcase.

Rgds,

Jothi.

Do Close the thread if you are satisfied with the answer.

raja_thangamani
Active Contributor
0 Kudos

Andres,

As contn of Thread "Fill dropdownlist"..YOu mentioned its giving runtime error. Could you please mention the error so that i can help you rectify that error.

Raja T

Former Member
0 Kudos

Ha Raja:

The error that i'm having ocurrs because i'm using a view not a bsp and this view uses the tag <crmic:traybody> instead of a form, so when i put the form tag it gives an "unknown runtime error", so is there any way to do that without having to use the <crmic:form> tag?

Thanks & regards

raja_thangamani
Active Contributor
0 Kudos

Andres,

If you are using HTMLB then you have to use <crmic:form>. Could you please post your code(Layout of view) so we can fix it ASAP.

Raja T

Former Member
0 Kudos

Hi:

This is my code

<%@page language="abap" %>

<%@extension name="htmlb" prefix="htmlb" %>

<%@extension name="xhtmlb" prefix="xhtmlb" %>

<%@extension name="bsp" prefix="bsp" %>

<%@extension name="CRM_BSP_IC" prefix="crmic" %>

<crmic:tray2 id = "Search_Customer_B2B"

title = "Consulta Titular"

height = "100%,403"

width = "100%">

<crmic:trayBody2>

<crmic:gridLayout columnSize = "10"

cellSpacing = "1"

rowSize = "15"

widthPredefine = "TRUE"

height = "100%"

width = "100%">

<crmic:gridLayoutCell columnIndex="8" rowIndex="1" colSpan="2"

><crmic:link id="searchContact" onClick="searchCont" text="Búsqueda Compareciente"

/>

</crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="1" rowIndex="4" colSpan="3"><crmic:label design = "label"

for = "//SearchCustomer/Sexo"

text = "Sexo"

/></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="4" rowIndex="4" colSpan="4"><crmic:inputField id = "Sexo"

width = "100%"

maxlength = "35"

value = "//SearchCustomer/Sexo" /></crmic:gridLayoutCell> <--This is the inputfield that i want to save tha value of the radiobutton

</crmic:gridLayout>

</crmic:trayBody2>

</crmic:tray2>

Thanks & regards

raja_thangamani
Active Contributor
0 Kudos

Andres,

Here is the code. I tested it works fine. After pasting this code you need to do one change, where ever you see SEXO in TAGS change it to "//SearchCustomer/Sexo". In case of ABAP replace SEXO with "SearchCustomer->Sexo"

Even i mentioned that comments with "<---"

<%@page language="abap" %>
<%@extension name="htmlb" prefix="htmlb" %>
<%@extension name="xhtmlb" prefix="xhtmlb" %>
<%@extension name="bsp" prefix="bsp" %>
<%@extension name="CRM_BSP_IC" prefix="crmic" %>
<htmlb:content design="design2003" >
  <htmlb:page title=" " >
    <htmlb:form>
      <%
  data: selected type string.
  data:i_formfields       TYPE tihttpnvp,
  wa_formfields      TYPE ihttpnvp.
  CALL METHOD request->get_form_fields
  CHANGING
  fields = i_formfields.
  data: event type ref to cl_htmlb_event.
  event ?= cl_htmlb_manager=>get_event( runtime->server->request ).
  if event is not initial and EVENT->SERVER_EVENT = 'radioclick'.
  READ TABLE i_formfields INTO wa_formfields WITH KEY name = 'stdradiobuttongroup'.
  selected = wa_formfields-value.
  if selected = '1'.
  SEXO = 'Male'. " <--- Change it to SearchCustomer->Sexo
  elseif selected = '2'.
  SEXO = 'Female'.  "<---Change it to SearchCustomer->Sexo

  endif.
  endif.
      %>
      <crmic:tray2 id     = "Search_Customer_B2B"
                   title  = "Consulta Titular"
                   height = "100%,403"
                   width  = "100%" >
        <crmic:trayBody2>
          <crmic:radioButtonGrp id          = "group1"
                                  columnCount = "3"
                                  selection   = "<%= selected %>" >
            <crmic:radioButton id      = "r1"
                               text    = "Male"
                               key     = "1"
                               onClick = "radioclick" />
            <crmic:radioButton id      = "r2"
                               text    = "Female"
                               key     = "2"
                               onClick = "radioclick" />
          </crmic:radioButtonGrp>
          <crmic:gridLayout id          = "mygrid"
                            rowSize     = "2"
                            columnSize  = "6"
                            cellSpacing = "1"
                            cellPadding = "1" >
            <crmic:gridLayoutCell columnIndex = "3"
                                  rowIndex    = "1"
                                  colSpan     = "1" >
              <crmic:label design = "label"
                           id     = "Sex"
                           for    = "SEXO" "<--Change it to "//SearchCustomer/Sexo

                           text   = "Sexo" />
            </crmic:gridLayoutCell>
            <crmic:gridLayoutCell columnIndex = "4"
                                  rowIndex    = "1"
                                  colSpan     = "1" >
              <crmic:inputField id        = "Sex"
                                width     = "100%"
                                maxlength = "50"
                                value     = "<%= SEXO %>" /> "<-- change it to "//SearchCustomer/Sexo"
            </crmic:gridLayoutCell>
          </crmic:gridLayout>
        </crmic:trayBody2>
      </crmic:tray2>
    </htmlb:form>
  </htmlb:page>
</htmlb:content>

Hope this should solve the problem.

Raja T

Message was edited by:

Raja T

Former Member
0 Kudos

Hi:

I used the example you gave me and it gives me the following error:

View BuPaSearchB2B.htm Cannot Be Displayed

An exception has occurredException Class CX_BSP_ELEMENT_EXCEPTION

Text: : BSP element may be used once only

Program: CL_BSP_ELEMENT================CP

Include: CL_BSP_ELEMENT================CM007

Source Text Row: 3

do you have any idea on what may be the problem

here is the complete code of my view

<%@page language="abap" %>

<%@extension name="htmlb" prefix="htmlb" %>

<%@extension name="xhtmlb" prefix="xhtmlb" %>

<%@extension name="bsp" prefix="bsp" %>

<%@extension name="CRM_BSP_IC" prefix="crmic" %>

<%

data: lv_country type land1,

ls_country type t005t,

lv_region type regio,

ls_region type t005u.

  • fill longtext for country

lv_country = SearchCustomer->get_Country( 'COUNTRY' ).

if not lv_country is initial.

select single * from t005t

into ls_country

where SPRAS eq sy-langu

and land1 eq lv_country.

endif.

  • fill longtext for region

lv_region = SearchCustomer->get_State( 'REGION' ).

if not lv_region is initial and

not lv_country is initial.

select single * from t005u

into ls_region

where SPRAS eq sy-langu

and bland eq lv_region

and land1 eq lv_country.

endif.

data: bupacontroller type ref to cl_Crm_ic_bupacontroller_impl.

DATA: lv_title type string.

bupacontroller ?= controller->get_custom_controller( 'BuPaController' ).

if bupacontroller->get_active_identify_viewset( ) eq 'E'.

lv_title = runtime->get_otr_text( alias = 'crm_ic_appl/bupaAccountandProduct' ).

else.

lv_title = runtime->get_otr_text( alias = 'crm_ic_appl/bupaAccount' ).

endif.

data:

lv_r2 type i value 2,

lv_r3 type i value 3,

lv_r4 type i value 4,

lv_r5 type i value 5,

lv_r6 type i value 6,

lv_r7 type i value 7,

lv_r8 type i value 8,

lv_c4 type i value 4,

lv_c6 type i value 6,

lv_colspan2 type i value 2,

lv_colspan3 type i value 3,

lv_c_street type i value 4,

lv_c_houseno type i value 8,

lv_c_region type i value 5,

lv_c_zip type i value 4.

if screen_variant eq '013'.

lv_r3 = 3.

lv_r4 = 4.

lv_r5 = 7.

lv_r6 = 6.

lv_r7 = 5.

lv_r8 = 8.

lv_c4 = 6.

lv_c6 = 4.

lv_colspan2 = 3.

lv_colspan3 = 2.

elseif screen_variant eq '004'.

lv_c_street = 5.

lv_c_houseno = 4.

lv_c_region = 4.

lv_c_zip = 8.

endif.

%>

<crmic:tray2 id = "Search_Customer_B2B"

title = "Consulta Titular"

height = "100%,403"

width = "100%">

<crmic:trayBody2>

<crmic:gridLayout columnSize = "10"

cellSpacing = "1"

rowSize = "15"

widthPredefine = "TRUE"

height = "100%"

width = "100%">

<crmic:gridLayoutCell columnIndex="8" rowIndex="1" colSpan="2"

>

</crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="1" rowIndex="2" colSpan="3"><crmic:label design = "label"

for = "//SearchCustomer/Name1"

text = "Nombre/Apellidos(Pat./Mat.)"

/></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="4" rowIndex="2" colSpan="2"><crmic:inputField id = "Name1"

width = "100%"

maxlength = "35"

value = "//SearchCustomer/Name1" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="6" rowIndex="2" colSpan="2"><crmic:inputField id = "Name2"

width = "100%"

maxlength = "35"

value = "//SearchCustomer/Name2" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="8" rowIndex="2" colSpan="2"><crmic:inputField id = "SecName"

width = "100%"

maxlength = "35"

value = "//SearchCustomer/SecName" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="1" rowIndex="3" colSpan="3"><crmic:label design = "label"

for = "//SearchCustomer/Alias1"

text = "Alias"

/></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="4" rowIndex="3" colSpan="4"><crmic:inputField id = "Alias1"

width = "100%"

maxlength = "35"

value = "//SearchCustomer/Alias1" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="1" rowIndex="4" colSpan="3"><crmic:label design = "label"

for = "//SearchCustomer/Sexo"

text = "Sexo"

/></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="4" rowIndex="4" colSpan="4"><crmic:inputField id = "Sexo"

width = "100%"

maxlength = "35"

value = "//SearchCustomer/Sexo" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="8" rowIndex="4" colSpan="2"> <crmic:button id = "Siac"

text = "Consulta Titular SIAC"

/></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="1" rowIndex="5" colSpan="3"><crmic:label design = "label"

for = "//SearchCustomer/Birthdate"

text = "Fecha de nacimiento"

/></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="4" rowIndex="5" colSpan="4"><crmic:inputField id = "Birthdate"

width = "100%"

maxlength = "35"

type = "DATE"

showHelp = "TRUE"

value = "//SearchCustomer/Birthdate" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="8" rowIndex="5" colSpan="2"> <crmic:button id = "Sirli"

text = "Consulta Titular SIRLI"

/></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="1" rowIndex="6" colSpan="3"><crmic:label design = "label"

for = "//SearchCustomer/ActState"

text = "Estado de origen"

/></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="4" rowIndex="6" colSpan="4"><crmic:inputField id = "ActState"

width = "100%"

maxlength = "35"

value = "//SearchCustomer/ActState" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="1" rowIndex="7" colSpan="3"

><crmic:label design = "label"

id = "Street"

for = "//SearchCustomer/Street"

text = "Calle"/>/<crmic:label design = "label"

id = "HouseNo"

for = "//SearchCustomer/HouseNo"

text = "N° (edificio)"/></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="<%=lv_c_street %>" rowIndex="7" colSpan="4"><crmic:inputField id = "Street"

width = "100%"

maxlength = "25"

value = "//SearchCustomer/Street" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="<%=lv_c_houseno %>" rowIndex="7"><crmic:inputField id = "HouseNo"

width = "100%"

maxlength = "10"

value = "//SearchCustomer/HouseNo" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="1" rowIndex="8" colSpan="3"><crmic:label design = "label"

text = "Población/Ciudad"

for = "//SearchCustomer/City" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="4" rowIndex="8" colSpan="5"><crmic:inputField id = "City"

width = "100%"

maxlength = "25"

value = "//SearchCustomer/City" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="1" rowIndex="9" colSpan="3"

><crmic:label design = "label"

id = "ZipCode"

for = "//SearchCustomer/ZipCode"

text = "Código postal"/>/<crmic:label design = "label"

id = "State"

for = "//SearchCustomer/State"

text = "Estado"/></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="<%=lv_c_zip %>" rowIndex="9"><crmic:inputField id = "ZipCode"

width = "100%"

maxlength = "10"

value = "//SearchCustomer/ZipCode" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="<%=lv_c_region %>" rowIndex="9"><crmic:inputField id = "State"

width = "100%"

maxlength = "3"

helpId = "CRM_IC_REGION_SHLP"

helpInputFields = "State=BLAND;Country=LAND1"

helpOutputFields = "State=BLAND;Country=LAND1"

value = "//SearchCustomer/State" /><crmic:inputField id = "RegionLong"

disabled = "TRUE"

visible = "FALSE"/></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="<%=lv_c_region + 1 %>" rowIndex="9" colSpan="3"><crmic:inputField id = "RegionName"

width = "100%"

disabled = "TRUE"

valueDescription = "TRUE"

value = "<%= ls_region-bezei %>" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="1" rowIndex="10" colSpan="3"><crmic:label design = "label"

id = "Country"

text = "País"

for = "//SearchCustomer/Country" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="4" rowIndex="10"><crmic:inputField id = "Country"

width = "100%"

maxlength = "3"

helpId = "CRMST_ADDRESS_BUIL-COUNTRY"

helpOutputFields = "Country=KEY"

value = "//SearchCustomer/Country" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="5" rowIndex="10" colSpan="4"><crmic:inputField id = "CountryName"

width = "100%"

disabled = "TRUE"

valueDescription = "TRUE"

value = "<%= ls_country-landx %>"/></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="1" rowIndex="11" colSpan="3"><crmic:label design = "label"

text = "Teléfono"

for = "//SearchCustomer/Phone" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="4" rowIndex="11" colSpan="5"><crmic:inputField id = "Phone"

width = "100%"

maxlength = "25"

value = "//SearchCustomer/Phone" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="1" rowIndex="12" colSpan="3"><crmic:label design = "label"

text = "Dir. Correo-E"

for = "//SearchCustomer/Email" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="4" rowIndex="12" colSpan="5"><crmic:inputField id = "Email"

width = "100%"

maxlength = "25"

value = "//SearchCustomer/Email" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="8" rowIndex="3" colSpan="2"> <crmic:button id = "Search"

onClick = "search"

priority = "1"

text = "Consulta Titular SPC"

/></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="8" rowIndex="6" colSpan="4"> <crmic:button id = "Reset"

onClick = "reset" disabled = "<%= disable_clear_button %>"

text = "Nueva Búsqueda"

/></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="1" rowIndex="14" colSpan="8" horizontalAlignment="LEFT">

<crmic:button id = "New"

onClick = "new"

text = "Alta Titular"

/>

</crmic:gridLayoutCell>

</crmic:gridLayout>

</crmic:trayBody2>

</crmic:tray2>

raja_thangamani
Active Contributor
0 Kudos

Andres,

I couldn't see any of the tags

<htmlb:content design="design2003" >
  <htmlb:page title=" " >
    <htmlb:form>................

   </htmlb:form>
  </htmlb:page>
</htmlb:content>

in your code. Please have a close look. Also try to copy <b>only the code</b> which i sent into in ur view & try to enhnace as you want. While adding new tag test it before developing the entire application. That way you can find out the error quickly.

Raja T

Message was edited by:

Raja T

Former Member
0 Kudos

Hi Raja:

Sorry i posted the code just after i erased those tags, but the error appears when i add those tags, when i remove them from my view it works just fine except the radiobuttons, and when i add the tags to my code it gives me the error, heres the full code, i did not added the part of radiobuttongroup, because the error seems to be because of the tags, do you have any idea on what may be causing the error?

<%@page language="abap" %>

<%@extension name="htmlb" prefix="htmlb" %>

<%@extension name="xhtmlb" prefix="xhtmlb" %>

<%@extension name="bsp" prefix="bsp" %>

<%@extension name="CRM_BSP_IC" prefix="crmic" %>

<htmlb:content design="design2003" >

<htmlb:page title=" " >

<htmlb:form>

<%

data: lv_country type land1,

ls_country type t005t,

lv_region type regio,

ls_region type t005u.

  • fill longtext for country

lv_country = SearchCustomer->get_Country( 'COUNTRY' ).

if not lv_country is initial.

select single * from t005t

into ls_country

where SPRAS eq sy-langu

and land1 eq lv_country.

endif.

  • fill longtext for region

lv_region = SearchCustomer->get_State( 'REGION' ).

if not lv_region is initial and

not lv_country is initial.

select single * from t005u

into ls_region

where SPRAS eq sy-langu

and bland eq lv_region

and land1 eq lv_country.

endif.

data: bupacontroller type ref to cl_Crm_ic_bupacontroller_impl.

DATA: lv_title type string.

bupacontroller ?= controller->get_custom_controller( 'BuPaController' ).

if bupacontroller->get_active_identify_viewset( ) eq 'E'.

lv_title = runtime->get_otr_text( alias = 'crm_ic_appl/bupaAccountandProduct' ).

else.

lv_title = runtime->get_otr_text( alias = 'crm_ic_appl/bupaAccount' ).

endif.

data:

lv_r2 type i value 2,

lv_r3 type i value 3,

lv_r4 type i value 4,

lv_r5 type i value 5,

lv_r6 type i value 6,

lv_r7 type i value 7,

lv_r8 type i value 8,

lv_c4 type i value 4,

lv_c6 type i value 6,

lv_colspan2 type i value 2,

lv_colspan3 type i value 3,

lv_c_street type i value 4,

lv_c_houseno type i value 8,

lv_c_region type i value 5,

lv_c_zip type i value 4.

if screen_variant eq '013'.

lv_r3 = 3.

lv_r4 = 4.

lv_r5 = 7.

lv_r6 = 6.

lv_r7 = 5.

lv_r8 = 8.

lv_c4 = 6.

lv_c6 = 4.

lv_colspan2 = 3.

lv_colspan3 = 2.

elseif screen_variant eq '004'.

lv_c_street = 5.

lv_c_houseno = 4.

lv_c_region = 4.

lv_c_zip = 8.

endif.

data: selected type string.

data:i_formfields TYPE tihttpnvp,

wa_formfields TYPE ihttpnvp.

CALL METHOD request->get_form_fields

CHANGING

fields = i_formfields.

data: event type ref to cl_htmlb_event.

event ?= cl_htmlb_manager=>get_event( runtime->server->request ).

if event is not initial and EVENT->SERVER_EVENT = 'radioclick'.

READ TABLE i_formfields INTO wa_formfields WITH KEY name = 'stdradiobuttongroup'.

selected = wa_formfields-value.

if selected = '1'.

SearchCustomer -> Sexo = 'Male'.

elseif selected = '2'.

SearchCustomer -> Sexo = 'Female'.

%>

<crmic:tray2 id = "Search_Customer_B2B"

title = "Consulta Titular"

height = "100%,403"

width = "100%">

<crmic:trayBody2>

<crmic:gridLayout columnSize = "10"

cellSpacing = "1"

rowSize = "15"

widthPredefine = "TRUE"

height = "100%"

width = "100%">

<crmic:gridLayoutCell columnIndex="8" rowIndex="1" colSpan="2"

>

</crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="1" rowIndex="2" colSpan="3"><crmic:label design = "label"

for = "//SearchCustomer/Name1"

text = "Nombre/Apellidos(Pat./Mat.)"

/></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="4" rowIndex="2" colSpan="2"><crmic:inputField id = "Name1"

width = "100%"

maxlength = "35"

value = "//SearchCustomer/Name1" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="6" rowIndex="2" colSpan="2"><crmic:inputField id = "Name2"

width = "100%"

maxlength = "35"

value = "//SearchCustomer/Name2" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="8" rowIndex="2" colSpan="2"><crmic:inputField id = "SecName"

width = "100%"

maxlength = "35"

value = "//SearchCustomer/SecName" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="1" rowIndex="3" colSpan="3"><crmic:label design = "label"

for = "//SearchCustomer/Alias1"

text = "Alias"

/></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="4" rowIndex="3" colSpan="4"><crmic:inputField id = "Alias1"

width = "100%"

maxlength = "35"

value = "//SearchCustomer/Alias1" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="1" rowIndex="4" colSpan="3"><crmic:label design = "label"

for = "//SearchCustomer/Sexo"

text = "Sexo"

/></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="4" rowIndex="4" colSpan="4"><crmic:inputField id = "Sexo"

width = "100%"

maxlength = "35"

value = "//SearchCustomer/Sexo" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="8" rowIndex="4" colSpan="2"> <crmic:button id = "Siac"

text = "Consulta Titular SIAC"

/></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="1" rowIndex="5" colSpan="3"><crmic:label design = "label"

for = "//SearchCustomer/Birthdate"

text = "Fecha de nacimiento"

/></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="4" rowIndex="5" colSpan="4"><crmic:inputField id = "Birthdate"

width = "100%"

maxlength = "35"

type = "DATE"

showHelp = "TRUE"

value = "//SearchCustomer/Birthdate" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="8" rowIndex="5" colSpan="2"> <crmic:button id = "Sirli"

text = "Consulta Titular SIRLI"

/></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="1" rowIndex="6" colSpan="3"><crmic:label design = "label"

for = "//SearchCustomer/ActState"

text = "Estado de origen"

/></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="4" rowIndex="6" colSpan="4"><crmic:inputField id = "ActState"

width = "100%"

maxlength = "35"

value = "//SearchCustomer/ActState" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="1" rowIndex="7" colSpan="3"

><crmic:label design = "label"

id = "Street"

for = "//SearchCustomer/Street"

text = "Calle"/>/<crmic:label design = "label"

id = "HouseNo"

for = "//SearchCustomer/HouseNo"

text = "N° (edificio)"/></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="<%=lv_c_street %>" rowIndex="7" colSpan="4"><crmic:inputField id = "Street"

width = "100%"

maxlength = "25"

value = "//SearchCustomer/Street" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="<%=lv_c_houseno %>" rowIndex="7"><crmic:inputField id = "HouseNo"

width = "100%"

maxlength = "10"

value = "//SearchCustomer/HouseNo" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="1" rowIndex="8" colSpan="3"><crmic:label design = "label"

text = "Población/Ciudad"

for = "//SearchCustomer/City" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="4" rowIndex="8" colSpan="5"><crmic:inputField id = "City"

width = "100%"

maxlength = "25"

value = "//SearchCustomer/City" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="1" rowIndex="9" colSpan="3"

><crmic:label design = "label"

id = "ZipCode"

for = "//SearchCustomer/ZipCode"

text = "Código postal"/>/<crmic:label design = "label"

id = "State"

for = "//SearchCustomer/State"

text = "Estado"/></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="<%=lv_c_zip %>" rowIndex="9"><crmic:inputField id = "ZipCode"

width = "100%"

maxlength = "10"

value = "//SearchCustomer/ZipCode" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="<%=lv_c_region %>" rowIndex="9"><crmic:inputField id = "State"

width = "100%"

maxlength = "3"

helpId = "CRM_IC_REGION_SHLP"

helpInputFields = "State=BLAND;Country=LAND1"

helpOutputFields = "State=BLAND;Country=LAND1"

value = "//SearchCustomer/State" /><crmic:inputField id = "RegionLong"

disabled = "TRUE"

visible = "FALSE"/></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="<%=lv_c_region + 1 %>" rowIndex="9" colSpan="3"><crmic:inputField id = "RegionName"

width = "100%"

disabled = "TRUE"

valueDescription = "TRUE"

value = "<%= ls_region-bezei %>" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="1" rowIndex="10" colSpan="3"><crmic:label design = "label"

id = "Country"

text = "País"

for = "//SearchCustomer/Country" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="4" rowIndex="10"><crmic:inputField id = "Country"

width = "100%"

maxlength = "3"

helpId = "CRMST_ADDRESS_BUIL-COUNTRY"

helpOutputFields = "Country=KEY"

value = "//SearchCustomer/Country" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="5" rowIndex="10" colSpan="4"><crmic:inputField id = "CountryName"

width = "100%"

disabled = "TRUE"

valueDescription = "TRUE"

value = "<%= ls_country-landx %>"/></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="1" rowIndex="11" colSpan="3"><crmic:label design = "label"

text = "Teléfono"

for = "//SearchCustomer/Phone" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="4" rowIndex="11" colSpan="5"><crmic:inputField id = "Phone"

width = "100%"

maxlength = "25"

value = "//SearchCustomer/Phone" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="1" rowIndex="12" colSpan="3"><crmic:label design = "label"

text = "Dir. Correo-E"

for = "//SearchCustomer/Email" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="4" rowIndex="12" colSpan="5"><crmic:inputField id = "Email"

width = "100%"

maxlength = "25"

value = "//SearchCustomer/Email" /></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="8" rowIndex="3" colSpan="2"> <crmic:button id = "Search"

onClick = "search"

priority = "1"

text = "Consulta Titular SPC"

/></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="8" rowIndex="6" colSpan="4"> <crmic:button id = "Reset"

onClick = "reset" disabled = "<%= disable_clear_button %>"

text = "Nueva Búsqueda"

/></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="1" rowIndex="14" colSpan="8" horizontalAlignment="LEFT">

<crmic:button id = "New"

onClick = "new"

text = "Alta Titular"

/>

</crmic:gridLayoutCell>

</crmic:gridLayout>

</crmic:trayBody2>

</crmic:tray2>

</htmlb:form>

</htmlb:page>

</htmlb:content>

Thanks & regards

raja_thangamani
Active Contributor
0 Kudos

Andres,

Based on your code, there 2 endifs are missing which i highlighted in Bold.

  if event is not initial and EVENT->SERVER_EVENT = 'radioclick'.
  READ TABLE i_formfields INTO wa_formfields WITH KEY name = 'stdradiobuttongroup'.
  selected = wa_formfields-value.
  if selected = '1'.

      Sexo = 'Male'.
  elseif selected = '2'.

     Sexo = 'Female'.

<b> endif.

endif.</b> %>

I corrected that error in my system, its working fine. Even after correcting the endif error, if you still face an issue, start the BSP from scrach & start adding the one tag at a time & test it now & then. This way you can find while adding which TAG its throwing an error.

Raja T

Message was edited by:

Raja T

Former Member
0 Kudos

Hi Raja:

I've tested theo code and corrected ths endif's missing' but the error still appears, i've tested adding tag by tag and the error appears at the beginning when i add these tags:

<crmic:content design="design2003" >

</htmlb:content>

do you have any idea on what coul be the cause of that message, or it is not possible to use a tray tag and content tag in the same view?

thanks & regards

raja_thangamani
Active Contributor
0 Kudos

Andres,

Here the content Tag is from HTMLB not from CRMIC.

Have a look at this.

Add only this tag & try to test it.

<%@page language="abap" %>
<%@extension name="htmlb" prefix="htmlb" %>
<%@extension name="xhtmlb" prefix="xhtmlb" %>
<%@extension name="bsp" prefix="bsp" %>
<%@extension name="CRM_BSP_IC" prefix="crmic" %>

<htmlb:content design="design2003" >
  <htmlb:page title=" " >
    <htmlb:form>


     </htmlb:form>
   </htmlb:page>
</htmlb:content>

Raja T

Message was edited by:

Raja T

Former Member
0 Kudos

Hi Raja:

Sorry for not answering until now, i wasn't at the office, sorry if i not explained myself to clear, i've added those three pairs of tags, and when i add them to my view it gives me the error, i don't know what may be causing it, do you have any idea?

Thanks & regards

raja_thangamani
Active Contributor
0 Kudos

Andres,

I hope you used <b>only</b> these tag in view..Not any other codes to find the errors.

<%@page language="abap" %>
<%@extension name="htmlb" prefix="htmlb" %>
<%@extension name="xhtmlb" prefix="xhtmlb" %>
<%@extension name="bsp" prefix="bsp" %>
<%@extension name="CRM_BSP_IC" prefix="crmic" %>
 
<htmlb:content design="design2003" >
  <htmlb:page title=" " >
    <htmlb:form>
 
 
     </htmlb:form>
   </htmlb:page>
</htmlb:content>

If still you have an issue, please post your all the code from Controller & Model class code to analyse more..

Raja T

Message was edited by:

Raja T