How to create radiobutton in webdynpro

In my screen we have to enter the material no in I/O Box and click on Create radio button and press ok  button means. It should go to Create View..
How to give action code for create  radiobutton and where we have to enter the code..
Please post the sample code for giving action to radiobutton.... Tell in step by step process

Hi,
When you want to navigate to create view?. when click on Ok button or when selecting radio button..?
If you want to navigate to create view when click on ok button you need to write in OnActionOk. else for radio button also you will have one event called onSelect. You can create an action for that and write your code.
In onActionOk or onActionCreate,
Read the attribute using wizard to which you bind your radio button texts.
Let say you created a node called NODEA with cardinality 0..n and you created attribute TEXT under NODEA and you binded your radiobutton texts to TEXT attribute under node.
Now Read the attribute TEXT under NODEA using wizard.
now it will automatically generate code.
Now lv_text contains the selected radio button text.
if lv_text is create,
Navigate to create view using fire outbound plug.
check this code below,
DATA lo_nd_rdb TYPE REF TO if_wd_context_node.   " here rdb is your node name.
    DATA lo_el_rdb TYPE REF TO if_wd_context_element.
    DATA ls_rdb TYPE wd_this->Element_rdb.
    DATA lv_text TYPE wd_this->Element_rdb-text.
*   navigate from <CONTEXT> to <RDB> via lead selection
    lo_nd_rdb = wd_context->get_child_node( name = wd_this->wdctx_rdb ).
*   @TODO handle non existant child
*   IF lo_nd_rdb IS INITIAL.
*   ENDIF.
*   get element via lead selection
    lo_el_rdb = lo_nd_rdb->get_element( ).
*   alternative access  via index
*   lo_el_rdb = lo_nd_rdb->get_element( index = 1 ).
*   @TODO handle not set lead selection
    IF lo_el_rdb IS INITIAL.
    ENDIF.
*   get single attribute
    lo_el_rdb->get_attribute(
      EXPORTING
        name =  `TEXT`
      IMPORTING
        value = lv_text ).   " this lv_text contains your selected radio button value
if lv_text = 'Create'.
wd_this->fire_to_create_plg(       " here to_create is the outbound plug name.
elseif ....
endif.
check this article for navigation demo: [Navigation in WDA|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/308ebfe9-a07a-2c10-e494-9849d50efc88?QuickLink=index&overridelayout=true]
Hope this helps u,
Thanks & Regards,
Kiran.

Similar Messages

  • How to create Radiobutton in webdynpro abap

    Hi experts,
    I am new to webdynpro abap.I have been given 1 scnario in webdynpro abap to develope:the scnario is as follows:
      In first screen there are n no of user are present, i hv to select any user using radiobutton then that user will  able to write some text or message in second screen or view( i hv to decide where user can write text or message).similarly other user which has been selected by radiobutton will able to write text in screen or view belongs to them respectbly. Then if user click on save or delete button the text should be saved or deleted from ztable.
                                                      I think i hv to create TEXTVIEW or TEXTEDIT so that respective user can write text or message in their view or screen. Please suggest me how to prossed.How to create TEXTVIEW & TEXTEDIT & what is its use.
    Secondly please give me steps to create Radiobutton in webdynpro abap.
    Thanks In advance,
    Sanjay

    Hi,
    Refer the Standard comp : wdr_test_events . View - Radiobutton.
    SAP Online help : http://help.sap.com/saphelp_erp2005/helpdata/EN/c0/e8884118aa1709e10000000a155106/frameset.htm
    For TextView and TextEdit :
    Refer this  : http://help.sap.com/saphelp_erp2005/helpdata/EN/6a/a6884121a41c09e10000000a155106/frameset.htm.
    This will give a clear idea with diagram about both these UI element.
    Edited by: Saurav Mago on Aug 21, 2009 8:35 AM

  • How to create webservice in Webdynpro java

    Hi Experts,
          I need to develop one application in Visual Composer.Since VC doesn't support coding so i need to create Webservice in webdynpro java and use that webservice in VC.Can any one of you please suggest how to create Webservice in Webdynpro Java.
    Regards,
    Prasanna.

    Hi prasanna,
    Refer this links.
    /people/sridhar.k2/blog/2006/09/12/creating-and-exposing-bapi-as-web-service-and-using-it-in-web-dynpro
    BAPI Exposed as Web Service
    Connect R/3 from Java web application
    Web Dynpro integration with R/3
    http://help.sap.com/saphelp_nw04s/helpdata/en/82/6a0e7bbe744276bf393654b9b576ed/frameset.htm
    Regards,
    karthik.

  • How to create cookies in webdynpro and How to read from cookies

    Hi all
    Please let us know how to create cookies and how to store and retrieve the data from cookies in webdynpro.
    we have the following requirement in each and every webdynpro form we have dropdownbox UI element , when ever a user logins into portal then he will select his state from the dropdownbox UI element then when even again the same user logs into portal and select the state field then the previously existing value which ever used in cookies that should be selected as dropdownbox.
    can you please send sample codes how to create and read the data from cookies in webdynpro?
    if you have any useful links or documents on this cookies in webdynpro then it would be great help to us.
    Thanks in advance.
    Regards
    Kalki reddy

    Hi,
    Have a look at the following thread:
    Re: How to use Cookies in Web DynPro?
    This may help you.
    Regards.
    Rajat

  • How to create radiobuttons dynamically

    Hi,
    I've always used static simpletypes when I created radiobuttons dynamically, but now I'm trying to get the possible answers of a radiobutton from a RFC.
    My scenario is:
    I use an initial RFC which returns me a table with questions, desciptions,...and then I use a 2nd RFC with the identifier of each question and SAP returns the different possible answers the user could choose in the radiobutton. All possible answers will be strings.
    Can you help me?
    wdDoInit
    ======
    //execute first RFC: Zhr_Bapi_Appraisal_Getdetail_Input
    wdContext.currentZhr_Bapi_Appraisal_Getdetail_InputElement().setAppraisal_Id(codeBapi2);       wdContext.currentZhr_Bapi_Appraisal_Getdetail_InputElement().setPernr(pernBapi2);
    wdContext.currentZhr_Bapi_Appraisal_Getdetail_InputElement().setPlan_Version("01");
    wdThis.wdGetBapiEvaluacionesCust0Controller().executeBapi_Appraisal_GetDetail();
    wdThis.wdGetBapiEvaluacionesCust0Controller().executeZhr_Bapi_Appraisal_Getdetail_Input();
    for (int i=0; i<IAppraisal_DataSalidaNode dataSalidaNode = wdContext.nodeOutputSalida().nodeAppraisal_DataSalida().size(); i++){
    //execute second RFC:Bapi_Appraisal_Scale_Getdetail_Input
    wdContext.currentBapi_Appraisal_Scale_Getdetail_InputElement().setElement_Id(element.getElement_Id());     wdContext.currentBapi_Appraisal_Scale_Getdetail_InputElement().setElement_Type(element.getElement_Type());
    wdContext.currentBapi_Appraisal_Scale_Getdetail_InputElement().setPlan_Version("01");
    wdThis.wdGetBapiEvaluacionesCust0Controller().executeBapi_Appraisal_Scale_Getdetail_Input();
    // if the second RFC returns a anything different form null I would like to create/edit generic simpletype to create the radiobutton possible answers
    if (wdContext.nodeOutputSalida2().size>0){
    //which code should I use here?? I guess that something like this:
    for (int j=0; j<wdContext.nodeOutputSalida2().size; j++){
    IwdAttibuteInfo info=wdcontext.node<nodename>().getNodeInfo().getAttribute(<Attribute name created in the Node>);
    ISimpleTypeModifiable stm=info.getModifiableSimpleType();
    IModifiableSimpleValueSet svs=stm.getSVServices().getModifiableSimpleValueSet();
    svs.put(""+j,wdContext.nodeOutputSalida2().getAnswerElementAt(j).getAnswerText());
    Edited by: Joan Roda on Jun 13, 2008 10:24 AM

    Hi Armin,
    I am encountering a similar problem.
    The texts property is supposed to be bound to an element in the context, but it need to provide more than one text (and one element only has one value, if I am correct).
    How can I show more than one element in the radiobuttongroup?
    Thanks, Johannes

  • Reg:how to create radiobuttons in fuctionmodule

    hai,
    I facing one problem i got requirement to create raio buttons in function module.
    Is it poosible to create radiobuttons in functionmodules.
    could any body suggest me.
    regards,
    Chaitanya

    Hi,
    Open the function group that has this function module in SE80 and right click on the fucnction group name and select Create->Screen.
    You can call that screen in your Function module using CALL SCREEN.
    Click on Layout to goto Screen painter SE51 and add radio buttons there.
    OR Double clikc on the screen number in the below statement.
    CALL SCREEN 9000.
    When you double click on 9000 in your function module you will be taken to Screen painter there you can add radio buttons.
    Regards,
    Sesh

  • How to create iview from webdynpro application  abap

    hi ,
    i have built webdynpro Application ABAP with adobe interactive form in it. i want this as part of the page in portal .
    Can you point me how to do it ...some resources .
    thank you
    chandra.

    Hi,
    Logon to portal, Content Administration->Portal Content and by right clicking, select New iView. In the "Template Selection" select SAP Web Dynpro iView. In the 2nd step, give the name and id of the iView. In the 3rd step you have the option to select either 'Java' or 'ABAP'. In your case select ABAP.In the 4th step, select the System and supply namespace and application name of your Web Dynpro ABAP Application. Click and Next->Finish. Now you will find the iView for your web dynpro ABAP application.
    A doc on integrating web dynpro appl in portal,
    http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/0c7b2f25-0c01-0010-f2a2-f8a65a9dcad9
    Hope this helps.
    Regards,
    Srinivasan T
    <b>Helpful answer=>points</b>

  • Need infn about how to create reports in webdynpro

    hi
    pls help me to solve asset utilization
    scenario:
    there are 3 types of assets(laptops/desktops/servers)
    there are 3 shifts
    i need to infn from swipe card/access card
    i should calculate  asset utilization
    will u pls explain me the procedure
    which toll i can go
    for
    is it possible in webdynpro to create reports with bar charts
    thank u

    Hi Vani,
    *Its possible to create a reports and Charts in Webdynpro Java.
    *There are lot of UI element funcationalities are available in webdynpro Java.
    *See this link,
    http://help.sap.com/saphelp_nw04/helpdata/en/5c/1b76bc3da0504e8b535cf3e154eaa7/content.htm
    *you can store your asset information from R/3 and bring those data
    into Webdynpro java by using adaptive RFC model.
    *Please visit this link,
    <a href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/28113de9-0601-0010-71a3-c87806865f26?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d">Webdynpro Sample Applications ans Tutorials</a>
    Regards,
    Ramganesan K.

  • How to create variant in Webdynpro

    Hi Gurus,
    I have created a WebDynpro report (WD Application). I have around 10 input fields on my first view.
    My second view will display an ALV report.
    Now I want to create variant for my selection screen( on my first view) so that the user will not need to always give
    values to all the 10 input fields. Please let me know if you have any solution for this.
    Thanks,
    Pradeep

    >Please tell me I am missing some setting somewhere
    No, your statements are accurate and increasingly a request that I hear from customers.  I pass on this request to the people who do the portfolio planning.  Also the ASUG UI Influence Council has recently taken up this topic as well.  It would also be helpful if you add your voice to the sticky thread on this forum asking for enhancement suggestions.  All these things help add weight to a feature request.
    Some thoughts from the SAP side - We do have personalization and configuration - some tasks that were done iwth variants could be acomplished with these new techniques.  Also variant were originally designed for background processing.  Since Web Dynpro ABAP can't be ran in the background anyway, that use case is out.
    Personally I would like to see variants at least built into the Select-Options reusable component. It seems like a nice ballance between the requirements.
    >This is really crazy when considering user specific ALV display variants can be saved -- but not shared as Global variants.
    You can create global layouts for the ALV by logging on in Admin mode.  Are you just saying you would like to be able to "promote" user specific layouts to global ones?

  • How to Create IViews in WebDynpro java

    Hi Experts,
    I want to Create the I View of my WD Application.
    So how can i create it.
    Can you send me the Step-by-step Procedure for it.
    Regards,
    DS

    Hi DS,
                Whatever application u create in WD, has to be integrated with portal as IViews. u can check this for details
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b0446f5c-fcb9-2910-e082-88becbe3ddc9">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b0446f5c-fcb9-2910-e082-88becbe3ddc9</a>
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/0c7b2f25-0c01-0010-f2a2-f8a65a9dcad9">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/0c7b2f25-0c01-0010-f2a2-f8a65a9dcad9</a>
    regards
    Sumit
    Message was edited by:
            Sumit Malhotra

  • How to create a dynamic radiobutton in webdynpro dynamically

    HI,
    I want to create radiobutton in webdynpro dynamically.But this button in not enabled.Code:-
         IWDNodeInfo info =wdContext.getNodeInfo().addChild("RadioBUttonDymanicNode",null,true,false,true,false,false,true,null,null,null);
         IWDRadioButton rb = (IWDRadioButton)view.createElement(IWDRadioButton.class,null);
         String testAtt = "testAtt";
         info.addAttribute ("testAtt","ddic:com.sap.dictionary.string");
         rb.bindSelectedKey("RadioBUttonDymanicNode." + testAtt);
         rb.bindKeyToSelect("aa");
         rb.setEnabled(true);
         theTransContainer1.addChild(rb);
    Please suggest me how to make it enable.
    Regards
    -Sandip

    Hi Sandip,
    Try this code inside the wdModifyView(),
    if (firstTime)
            IWDRadioButtonGroupByKey radioButtonGroup =(IWDRadioButtonGroupByKey)
            view.createElement(IWDRadioButtonGroupByKey.class, "MyRadioButtonGroupByKey");
            radioButtonGroup.bindSelectedKey(<attributeName>);
            radioButtonGroup.setEnabled(true);
            IWDTransparentContainer container=(IWDTransparentContainer)
            view.getElement("RootUIElementContainer");
            container.addChild(radioButtonGroup);
    Regards
    Kishan

  • Creating attachment in Webdynpro for ABAP

    Hi Expertrs,
                      I am new to webdynpro for ABAP. I have a requirement like I need to create an attachment in webdynpro screen. I have searched the forums and I got the class CL_GOS_SRV_ATTACHMENT_CREATE and method EXECUTE_ITS. but when I call this method I am getting dump in the method.
    Can anybody please suggest me how to create attachment in webdynpro for ABAP?
    When ever attachment is created and clicks on save button workflow will be triggered and a workitem appears portal when ever the user click on the display attachment I need to display the created attachemnt.
    Please suggest me.
    Thank You.
    Ranganadh

    Hi,
    Please follow the steps below;
    Follow these steps;
    1.create a node 'FILEUPLOAD' with 2 attributes
    a) FILECONTENT type XSTRING
    b) FILENAME type STRING
    2. Create a fileuplaod uielement
    a) bind the data property with attribute 'FILECONTENT'
    b) bind the filename property with attribute 'FILENAME'
    3. Create a button 'UPLOAD'
    a) create the action method for this button
    Paste the following code in this method
    Data l_node type ref to if_wd_context_node.
    Data l_stru type wd_this->elements_cn_fileupload.
    l_node = wd_context->get_child_node( 'FILEUPLOAD' ).
    l_node->get_static_attributes( importing static_attributes = l_stru ).
    "save l_stru-fielcontent in database. Your file will be saved in the database in XSTRING format.
    Now when you want to display  this file;
    1. Create a Node 'FILEDOWNLOAD' with 1 attribute
    a) FILE type XSTRING
    2. Create a filedownload uielement
    a) bind the data property with the attribute 'FILE'
    Fetch the file from databased and set the File attribute of teh filedownload uielemnt to display the file.
    Hope this helps!
    Radhika.

  • How to create a node with attributes at runtime in webdynpro for ABAP?

    Hi Experts,
             How to create a node with attributes at runtime in webdynpro for ABAP? What classes or interfaces I should use? Please provide some sample code.
    I have checked IF_WD_CONTEXT_NODE_INFO and there is ADD_NEW_CHILD_NODE method. But this is not creating any node. I this this creates only a "node info" object.
    I even check IF_WD_CONTEXT_NODE but i could not find any method that creates a node with attribute.
    Please help!
    Thanks
    Gopal

    Hi
       I am getting the following error while creating a dynamic context node with 2 attributes. Please help me resolve this problem.
    Note
    The following error text was processed in the system PET : Line types of an internal table and a work area not compatible.
    The error occurred on the application server FMSAP995_PET_02 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: IF_WD_CONTEXT_NODE~GET_STATIC_ATTRIBUTES_TABLE of program CL_WDR_CONTEXT_NODE_VAL=======CP
    Method: GET_REF_TO_TABLE of program CL_SALV_WD_DATA_TABLE=========CP
    Method: EXECUTE of program CL_SALV_WD_SERVICE_MANAGER====CP
    Method: APPLY_SERVICES of program CL_SALV_BS_RESULT_DATA_TABLE==CP
    Method: REFRESH of program CL_SALV_BS_RESULT_DATA_TABLE==CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~MAP_FROM_SOURCE_DATA of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~MAP_FROM_SOURCE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~UPDATE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_VIEW~MODIFY of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMPONENT~VIEW_MODIFY of program CL_SALV_WD_A_COMPONENT========CP
    My code is like the following:
    TYPES: BEGIN OF t_type,
                CARRID TYPE sflight-carrid,
                CONNID TYPE sflight-connid,
             END OF t_type.
      Data:  i_struc type table of t_type,
      dyn_node   type ref to if_wd_context_node,
      rootnode_info   type ref to if_wd_context_node_info,
      i_node_att type wdr_context_attr_info_map,
      wa_node_att type line of wdr_context_attr_info_map.
          wa_node_att-name = 'CARRID'.
          wa_node_att-TYPE_NAME = 'SFLIGHT-CARRID'.
          insert wa_node_att into table i_node_att.
          wa_node_att-name = 'CONNID'.
          wa_node_att-TYPE_NAME = 'SFLIGHT-CONNID'.
          insert wa_node_att into table i_node_att.
    clear i_struc. refresh i_struc.
      select carrid connid into corresponding fields of table i_struc from sflight where carrid = 'AA'.
    rootnode_info = wd_context->get_node_info( ).
    rootnode_info->add_new_child_node( name = 'DYNFLIGHT'
                                       attributes = i_node_att
                                       is_multiple = abap_true ).
    dyn_node = wd_context->get_child_node( 'DYNFLIGHT' ).
    dyn_node->bind_table( i_struc ).
    l_ref_interfacecontroller->set_data( dyn_node ).
    I am trying to create a new node. That is
    CONTEXT
    - DYNFLIGHT
    CARRID
    CONNID
    As you see above I am trying to create 'DYNFLIGHT' along with the 2 attributes which are inside this node. The structure of the node that is, no.of attributes may vary based on some condition. Thats why I am trying to create a node dynamically.
    Also I cannot define the structure in the ABAP dictionary because it changes based on condition
    Message was edited by: gopalkrishna baliga

  • How to create a webdynpro view dynamically and embed into view container?

    Hi all,
    Anyone knows how to create a view dynamically and embed the view into an existing view container?
    My layout looks like this:
    I have an existing view named main_view.
    Inside main_view, I create a view ui container named vcu_view.
    I embed the main_view into my window.
    I need the codes to create a view dynamically and embed the view into the view container. Anyone have any idea?
    Thanks in advance.
    Rgds,
    Siong Chao

    hi Siong Chao   ,,
    empty view insence ..( create a view without any UI element in it  ) in design time ..
    >
    Siong Chao wrote:
    > Hi Chinnaiya,
    >
    > How do you create an empty view dynamically then? Thanks in advance.
    i think we cannot create a new view dynamically because it is a webdynpro restriction ..
    NOTE: experts correct me if i am wrong in this answer
    Regards
    Chinnaiya P

  • How to create the PDF file in WebDynpro?

    Hi.
           How to create PDF file in Webdynpro?
    I have one WD screen In there i have one File Download action. Once i click that it will open one PDF file which consisting of all details.
    Pls reply me.
    with regards,
    Gobintah.R

    Hi
    Check these links
    Re: Opening a PDF File from WebDynpro
    Re: Generating PDF file using FOP API in Web Dynpro
    http://help.sap.com/saphelp_nw04/helpdata/en/1a/ff773f12f14a18e10000000a114084/frameset.htm
    Thanks
    Edited by: Anup Bharti on Oct 16, 2008 11:51 AM

Maybe you are looking for

  • Pdf file not saving imputed information

    i am trying to save a pdf file that i have filled out, but when i save it and go back to look at it, the text information i have filled out is blank. how do i save my text? i am filling out an applictaion.

  • Has anyone seen this iTunes Match message before?

    iTunes crashed during upload to iTunes match (one week and 3,500 tracks in to a 7,500 track upload) and on restarting it wants me to 'add this computer' as it's forgotten that the library is already in the process of uploading to iTunes Match. On cli

  • Best Practices for Loading Data in 0SD_C03

    Hi, Guru, I want to know which is the best practice to have information about Sales, billing, delivery. I know it has this Datasources. • Sales Order Item Data - 2LIS_11_VAITM • Billing Document Data: Items - 2LIS_13_VDITM • Billing Document Header D

  • IPad keeps rebooting itself after updating to iOS 8.3

    Just updated an iPad 3 to iOS 8.3 from iOS 8.2 .  Update took a while to install (over 20 minutes) and then the Apple logo appeared for a bit then the screen went black for about 10  minutes.  The device was fine for a while and then started rebootin

  • Curve 8900 rollerball​, moves but doesnt respond!

    I was out in the rain today (for a very short time) with my phone in my coat pocket.  When I got indoors I noticed water on the casing.  I quickly dried it off, took battery out etc to dry it but there was no water in there. My rollerball is not resp