Skip to Content

thtmlb:inputfield problam in search view

Hi Experts,

i am facing one problem in search view.. my requirement is i have added one field in search view by using <thtmlb:inputfield> tag in .htm.

when i click on f4 it was displaying popup and selected value will populated in to that field.

but here how can i capture the selected value and one more thing if i click on search button the selected value is disparaging in that filed.

plz guide me how can i solve this..

this is the code i wrote in my .htm.

<thtmlb:inputField id = "PARTNER"

showHelp = "X"

helpId = "CRM_GPM_BUPAP_HELP"

f4Title = "Partner general"

helpInputFields = "PARTNER=PARTNER"

helpOutputFields = "PARTNER=PARTNER" />

i wrote this logic in event.

DATA: data_input TYPE REF TO cl_htmlb_inputfield,

ld_fieldid TYPE string.

me->gv_input_field = htmlb_event->if_htmlb_data~event_id.

data_input ?= cl_htmlb_manager=>get_data(

request = runtime->server->request

name = 'inputField'

id = 'PARTNER' ).

IF data_input IS NOT INITIAL.

ld_fieldid = data_input->value.

ENDIF.

but i haven't get any value in to id_fieldid.

Thanks & Regards,

Srinivas

searchfield.JPG (15.0 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on May 09, 2014 at 12:36 PM

    Hi,

    No need to Create new component, you can use your component.

    As per screen shot,

    CALL METHOD LR_COMPCO->IF_BSP_WD_WINDOW_MANAGER~CREATE_POPUP

    EXPORTING

    IV_INTERFACE_VIEW_NAME = ' ZCICCALL/CallCode '

    IV_USAGE_NAME = 'CallCode '

    IV_TITLE = 'Search Partner'

    RECEIVING

    RV_RESULT = GR_BSP_POPUP.

    And take the Usage name from Component Controller.

    Regards

    Srikanth


    Capture.JPG (86.6 kB)
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 08, 2014 at 10:04 AM

    Hi Experts,

    could you please provide some inputs regarding this requirement..

    Your inputs are greatly appreciated!!


    Thanks & Regards,

    Srinivask

    Add a comment
    10|10000 characters needed characters exceeded

    • Hello,

      Generated id will be prefixed with component id. So you have to concatenate the value of variable

      ME->COMPONENT_ID with id. example:

      data_input ?= cl_htmlb_manager=>get_data(

      request = runtime->server->request

      name = 'inputField'

      id = 'C1_W1_V2_V3_PARTNER' ).

      Regards,

      Ashik

  • author's profile photo Former Member
    Former Member
    Posted on May 09, 2014 at 10:12 AM

    Hi,

    <thtmlb:inputField disabled = "<%= enabled %>"

    id = "PARTNER"

    f4Title = "Partner general"

    showHelp = "X"

    helpOnClick = "PARTNER"

    focus = "TRUE"

    maxlength = "5"

    size = "5"

    value = "//your node/PARTNER" />

    After this you can create the 'PARTNER' event in event handler then write the below code.

    then you can capture your value into your Node.

    LR_ENTITY ?= LR_COMPCO->TYPED_CONTEXT->your node->COLLECTION_WRAPPER->GET_CURRENT( ).

    WA_SEARCH-PARTNER = LR_ENTITY->GET_PROPERTY_AS_STRING( IV_ATTR_NAME = 'PARTNER' ).

    you can get the your parner name into WA_SEARCH-PARTNER....

    for more info:

    METHOD EH_ONPARTNER.

    DATA: LR_COMPCO TYPE REF TO ZL_partner_BSPWDCOMPONEN_IMPL.

    LR_COMPCO ?= COMP_CONTROLLER.

    TYPES: BEGIN OF TY_SEARCH,

    PARTNER TYPE ZPARTNER,

    END OF TY_SEARCH.

    DATA:WA_SEARCH TYPE TY_SEARCH,

    LR_TABLINE TYPE REF TO TY_SEARCH.

    DATA: LR_COL TYPE REF TO IF_BOL_BO_COL,

    LR_VALUENODE TYPE REF TO CL_BSP_WD_VALUE_NODE.

    DATA: LR_ENTITY TYPE REF TO IF_BOL_BO_PROPERTY_ACCESS.

    LR_ENTITY ?= LR_COMPCO->TYPED_CONTEXT->your node->COLLECTION_WRAPPER->GET_CURRENT( ).

    WA_SEARCH-PARTNER = LR_ENTITY->GET_PROPERTY_AS_STRING( IV_ATTR_NAME = 'PARTNER' ).

    IF WA_SEARCH-PATNER IS NOT INITIAL .

    *For Screen

    CLEAR:LR_COL,LR_VALUENODE.

    CREATE OBJECT LR_COL

    TYPE

    CL_CRM_BOL_BO_COL.

    CREATE DATA LR_TABLINE.

    "...create value object with current line for colleciton

    CREATE OBJECT LR_VALUENODE

    EXPORTING

    IV_DATA_REF = LR_TABLINE.

    "...set current line data

    LR_VALUENODE->SET_PROPERTIES( WA_SEARCH ).

    "...add current line to collection

    LR_COL->ADD( LR_VALUENODE ).

    LR_COMPCO->TYPED_CONTEXT->SEARCH->COLLECTION_WRAPPER->SET_COLLECTION( LR_COL ).

    TYPES: BEGIN OF LTYPE_ATTR_STRUCT,

    PARTNER TYPE ZPARTNER,

    END OF LTYPE_ATTR_STRUCT.

    DATA: LT_FINAL TYPE TABLE OF LTYPE_ATTR_STRUCT,

    WA_FINAL TYPE LTYPE_ATTR_STRUCT,

    R_PARTNER TYPE RANGE OF ZPARTNER ,

    W_PARTNER LIKE LINE OF R_PARTNER.

    IF WA_SEARCH-PARTNER IS NOT INITIAL.

    W_PARTNER-SIGN = 'I'.

    W_PARTNER-LOW = WA_SEARCH-PARTNER.

    FIND FIRST OCCURRENCE OF '*' IN WA_SEARCH-PARTNER.

    IF SY-SUBRC = 0.

    W_PARTNER-OPTION = 'CP'.

    ELSE.

    W_PARTNER-OPTION = 'EQ'.

    ENDIF.

    APPEND W_PARTNER TO R_PARTNER.

    ENDIF.

    SELECT PARTNER FROM BUT000 INTO TABLE LT_FINAL WHERE PARTNER IN R_PARTNER.

    DATA: LR_TABLINE1 TYPE REF TO LTYPE_ATTR_STRUCT.

    CLEAR: LR_COL, LR_VALUENODE.

    CREATE OBJECT LR_COL

    TYPE

    CL_CRM_BOL_BO_COL.

    LOOP AT LT_FINAL INTO WA_FINAL.

    "...create line object

    CREATE DATA LR_TABLINE1.

    "...create value object with current line for colleciton

    CREATE OBJECT LR_VALUENODE

    EXPORTING

    IV_DATA_REF = LR_TABLINE1.

    "...set current line data

    LR_VALUENODE->SET_PROPERTIES( WA_FINAL ).

    "...add current line to collection

    LR_COL->ADD( LR_VALUENODE ).

    CLEAR WA_FINAL.

    ENDLOOP.

    LR_COMPCO->TYPED_CONTEXT->RESULT->COLLECTION_WRAPPER->SET_COLLECTION( LR_COL ).

    ENDIF.

    CALL METHOD LR_COMPCO->IF_BSP_WD_WINDOW_MANAGER~CREATE_POPUP

    EXPORTING

    IV_INTERFACE_VIEW_NAME = 'your interface view name'

    IV_USAGE_NAME = 'your usage name'

    IV_TITLE = 'Search Partner'

    RECEIVING

    RV_RESULT = GR_BSP_POPUP.

    CALL METHOD GR_BSP_POPUP->SET_ON_CLOSE_EVENT

    EXPORTING

    IV_VIEW = ME

    IV_EVENT_NAME = 'PARTNERSEL'.

    GR_BSP_POPUP->SET_DISPLAY_MODE( IF_BSP_WD_POPUP=>C_DISPLAY_MODE_SURROUNDED ).

    GR_BSP_POPUP->OPEN( ).

    ENDMETHOD.

    Regards

    Srikanth

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.