WRITE AS RADIOBUTTON ?

Hi,
I want to display my table's one field as radio button. But not in parameters section. How can I write my table's field as radio button?
Thanks.

Hi,
You can tryout writing table field as checkbox.
Regards,
Raj
WRITE - Output as checkbox
Effect
Outputs the field f as a checkbox. The contents of the first character of f is interpreted as the "status":
' ' = not selected
'X' = selected
The user can change this as required.
Note
To prevent the user changing the contents of the checkbox, you can use the addition ... INPUT OFF . The checkbox is then nothing more than a status display and can only be changed by programming.
In technical terms, a checkbox behaves exactly like an input field with a length of 1 (FORMAT INPUT ).
Examples
DATA: MARKFIELD(1) TYPE C VALUE 'X'.
WRITE MARKFIELD AS CHECKBOX.           "checkbox selected
MARKFIELD = SPACE.
WRITE MARKFIELD AS CHECKBOX.           "deselected
WRITE MARKFIELD AS CHECKBOX INPUT OFF. "deselected, protected

Similar Messages

  • JRadioButton actionListener shows troble.plz help.

    hai forum,
    My project has a part where i select a class file,display its methods and then display JTextFields for the parameters of the method in a separate panel.
    My problem is that clicking different radio buttons(methods) do not bring about a change in the panel.
    my code for selecting and displaying method is
            public void selectClass_actionPerformed(ActionEvent e)
                if(e.getSource()==selectClass)
                    //refresh panel
                    methodPanel.removeAll();
                    methodPanel.revalidate();
                    //  Code To Generate a FileChooser
                     //instantiate class FilterClass
                    JFileChooser jfilechooser=new JFileChooser();
                    Filterclass filter=new Filterclass();
                    //Set selection mode for file chooser
                    jfilechooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
                    //set file filter
                    jfilechooser.setFileFilter(filter);
                    int returnVal = jfilechooser.showOpenDialog(this);
                    if(returnVal == JFileChooser.APPROVE_OPTION)
                        try
                                String str = jfilechooser.getSelectedFile().getName();
                                String parent=jfilechooser.getSelectedFile().getParent();
                                classFileList.addItem(str);
                                classFileList.disable();
                                // Create a File object on the root of the directory containing the class file
                                File file = new File(parent);
                                // Convert File to a URL
                                URL url = file.toURL();         
                                URL[] urls = new URL[]{url};
                                // Create a new class loader with the directory
                                ClassLoader cl = new URLClassLoader(urls);
                                StringTokenizer st = new StringTokenizer(str,".");
                                String s = st.nextToken ();
                                 Class c = cl.loadClass(s);
                                //Get the Methods Of the Selected Path
                                Method methods[]=c.getDeclaredMethods();
                                for(int i=0;i<methods.length;i++)
                                    int modifiers=methods.getModifiers();
    if(Modifier.isPublic(modifiers)||Modifier.isStatic(modifiers))
    String a= "";
    a=methods[i].getName();
    //Get the Parameters
    Class[] parameterTypes=methods[i].getParameterTypes();
    String parameterString = "";
    for(int k=0;k<parameterTypes.length;k++)
    if(k==0)
    parameterString = parameterTypes[k].getName();
    else
    parameterString = parameterString+","+parameterTypes[k].getName();
    parameterCount = parameterTypes.length;
    System.out.println("num of para"+parameterCount);
    /*Create RadioButton Dynamically*/
    String radioName=a+"("+parameterString+")";
    j=new JRadioButton(radioName);
    methodPanel.add(j,true);
    methodlistPane.getViewport().add(methodPanel,null);
    j.setBounds(100,(100+(i*50)),100,50);
    group.add(j);
    //Class methodradioactionlistener implemented below
    j.addActionListener(new MethodRadioActionListener());
    }//end of if loop
    }//end of for loop
    }//end of try loop
    catch(Exception e1)
    StringWriter sw = new StringWriter();
    e1.printStackTrace(new PrintWriter(sw));
    String stacktrace = sw.toString();
    System.out.println("stacktrace = " + stacktrace);
    }//end of catch loop
    }//end of if loop
    }//end of e.getsource loop
    }//end of method loop
    And my MethodRadioActionListener is
            private class MethodRadioActionListener implements ActionListener
                public void actionPerformed(ActionEvent e1)
                        if(parameterCount==0)
                            textfieldPanel.removeAll();
                            textfieldPanel.repaint(); 
                            JLabel nopara = new JLabel();
                            nopara.setText("NULL PARAMETER");
                            nopara.setBounds(new Rectangle(210, 80, 175, 25));
                            textfieldPanel.add(nopara);
                            textFieldPane.getViewport().add(textfieldPanel,null);
                        } //END OF IF LOOP
                        else if(parameterCount>0)
                            textfieldPanel.removeAll();
                            textfieldPanel.repaint();
                            tf = new JTextField[parameterCount];
                            for(int j = 0; j < tf.length; j++)
                                //DISPLAYS TEXT FIELDS
                                tf[j] =new JTextField(null,5);
                                textfieldPanel.add(tf[j],true);
                                tf[j].setBounds((100+(j*100)),100,100,10);
                                textFieldPane.getViewport().add(textfieldPanel,null);
                            } //END OF FOR LOOP
                        } //END OF ELSE IF LOOP
                } //END OF ACTION PERFORMED METHOD
             } //END OF CLASS
             Clicking the radio button do not bring about any change.A single textfield is generated always.
    Plz help me fix my mistake.
    Thank you.

    Yes, as you mentioned only one action is being done that is of the last method.I tried bringing the code ,ParameterCount=k; ,inside for loop so that it takes thenumber of parameters of only one method that i select.But still i find the same kind of action takes place.
    Is there any other way out to solve my problem?How can i get the parameterCount of only one single method?
    Is it advisable to write the radioButton actionPerformed method inside the actionPerformed method for selectClass menuItem, rather than as a separate class.
    Thank you

  • About User command & SET Parameter

    Hi All,
    What is the User Command? What it means? And how to handle in normal and ALV Report..?
    What is happening when I write the statement like below.
    SET PARAMETER ID 'TAB' FIELD 'ZPCA' ? What is the purpose of set parameter in the program..?
    Akshitha.

    Hi,
    see this prog..
    sy-ucomm is for doing the functions what the user wishes to do at that particular event. You use it in menus and other place . this mainly in using <pfstatus>
    USER COMMAND will perform actions on radiobutton click, or wen puhbutton is cliketced
    in this if the user clicks a push button, see bold letters..in the prog
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 10(15) lb1.
    PARAMETERS : a(10).
    SELECTION-SCREEN COMMENT 40(15) lb2.
    PARAMETERS : b(10).
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN PUSHBUTTON 10(10) lb3 USER-COMMAND pb1.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN PUSHBUTTON /10(10) lb5 USER-COMMAND pb3.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN PUSHBUTTON /10(10) lb4 USER-COMMAND pb2.
    *SELECTION-SCREEN BEGIN OF SCREEN 200 AS WINDOW TITLE T2.
    SELECTION-SCREEN BEGIN OF BLOCK b1.
    PARAMETERS : ch1 AS CHECKBOX, ch2 AS CHECKBOX, ch3 AS CHECKBOX.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2.
    PARAMETERS : rb1 RADIOBUTTON GROUP a,
                 rb2 RADIOBUTTON GROUP a,
                 rb3 RADIOBUTTON GROUP a.
    SELECTION-SCREEN END OF BLOCK b2.
    *SELECTION-SCREEN END OF SCREEN 200.
    INITIALIZATION.
      lb1 = 'ENTER A VALUE'.
      lb2 = 'ENTER B VALUE'.
      lb3 = 'DISPLAY'.
      lb4 = 'EXIT'.
      lb5 = 'CALL NEXT'.
    AT SELECTION-SCREEN.
      CASE sy-ucomm.
        WHEN 'PB1'.
          LEAVE TO LIST-PROCESSING.
          WRITE : a, b.
          IF ch1 = 'X'.
            LEAVE TO LIST-PROCESSING.
            WRITE 'FIRST CHECKBOX IS SELECTED'.
          ENDIF.
          IF ch2 = 'X'.
            WRITE :/ 'SECOND CHECKBOX IS SELECTED'.
          ENDIF.
          IF ch3 = 'X'.
            WRITE :/ 'THIRD CHECKBOX IS SELECTED'.
          ENDIF.
          IF rb1 = 'X'.
            WRITE :/ 'FIRST RADIOBUTTON'.
          ELSEIF rb2 = 'X'.
            WRITE :/ 'SECOND RADIOBUTTON'.
          ELSEIF rb3 = 'X'.
            WRITE :/ 'THIRD RADIOBUTTON'.
          ENDIF.
        WHEN 'PB2'.
          LEAVE PROGRAM.
        WHEN 'PB3'.
          CALL SELECTION-SCREEN 200.
      ENDCASE.
    SET parameter :
    this is used to pass a value from one report a memory n from there we can use in the same report or the other report..
    SAP memory is a memory area to which all main sessions within a SAPgui have access. You can use SAP memory either to pass data from one program to another within a session, or to pass data from one session to another.  Application programs that use SAP memory must do so using SPA/GPA parameters (also known as SET/GET parameters). These parameters can be set either for a particular user or for a particular program using the SET PARAMETER statement. Other ABAP programs can then retrieve the set parameters using the GET PARAMETER statement. The most frequent use of SPA/GPA parameters is to fill input fields on screens
    Hope this helps u,
    Regards,
    Arunsri
    Edited by: Arunsri on Mar 11, 2008 11:52 AM

  • How to write Validations for RadioButton

    Hi All,
    in my Application , two RadioButtons and one submitbutton is there, in that
    1. yes
    2. no
    both are radio buttons
    when i click on submit button, without selecting any one of those radiobuttons ,
    it shud display error message, this errormessage i have written in iwdmessage.
    it shud show this error message, instead of displaying nullpointer exception.
    how to write validation for this.
    please help me.
    regards
    sush

    Hi shushma,
    Simply put a check that:
    If(wdContext.current<YOUR_NODE>Element().get<YOUR_ATTRIBUTE_NAME> !=null){
    else{
    // Show the error messages
    //Displaying the error message is very easy.
    //You can report exception using the message manager API's. You will get this easily on SDN.
    I hope this helps! if you need ay further help please let me know.
    Thanks and Regards,
    Pravesh

  • Unable to delete request from write-optimized DSO (Error during rollback)

    Hi Gurus,
    I am trying to delete a delta request from a Write-Optimized DSO. This request was uploaded with a DTP from another Write-optimized DSO.
    The actual overall status of the request is RED and the description of that status is now: 'Error during rollback of request DTPR_4JW6NLSVDUNYY3GTD6F4DQJWR; only rollback allowed'.
    I checked the log of all Request Operations in DataStore (from the same line where the red request is now) and I see my several attemps to delete this request under a RED radiobutton with the title Rollback.  The details for this error are the following:
    Could not delete request data from active table
    Message no. RSODSO_ROLLBACK114
    Diagnosis
    The system could not delete the request data from the active table of a write-optimized DataStore object.
    System Response
    Write-optimized DataStore object: DTFISO02
    Active table: /BIC/ADTFISO0200
    Request: DTPR_4JW6NLSVDUNYY3GTD6F4DQJWR
    Procedure
    Search for Notes containing the key words "Delete write-optimized DSO PSA"
    I am relatively new to SAP BI 7.0 and I do not know how to delete this request.  Any help will be highly appreciated !!
    Leticia

    Hi Leticia:
    Take a look at the SAP Notes below.
    Note 1111065 - "701: Delta consistency check for write-optimized DSOs"
    Note 1263877 - "70SP20: Delta consistency check for write-optimized DSOs"
    Note 1125025 - "P17:PSA:DSO:ODSR missing in PSA process for write-opt. DSO"
    Additionally, some ideas from the alternative presented on the blog by KMR might help you.
    "How to generate a selective deletion program for info provider"
    Regards,
    Francisco Mílán.

  • How to hide the select-options fields on radiobutton select in webdynpro

    hi
    Could you please help how to hide the select-option fields in webdynpro
    there are four radio buttons
    for every radiobutton there is corresponding the select_option filed is associated to it
    user as only provision select  one radio button and reset of the select-option fileds should be hidden
    which ever the radio button is selected corresponding the select-options fileld should be displayed
    please find the attachement below

    Hi Nine,
    To hide select options you should use interface method REMOVE_SELECTION_SCREEN_ITEM of IF_WD_SELECT_OPTIONS.
    Sample code :
    Write the below code in the Event handler of Radio Button.
    DATA lv_r_helper_class TYPE REF TO if_wd_select_options.
    lv_r_helper_class = lo_interfacecontroller->init_selection_screen(
    lv_r_helper_Class->REMOVE_SELECTION_SCREEN_ITEM(exporting i_id = 'Select_option1_id1').
    This will hide first select option of your screen.Similarly pass select_option_id2 to hide it and so on.
    Regards,
    Ravikiran.k

  • How to pass radiobuttons using a submit statements.

    Hi All,
    Can anyone tell me how to pass radiobuttons using Submit statement.
    My problem is that I am able to pass one select option and one parameter using the statement:
    submit (v_repid) to sap-spool without spool dynpro
                       spool parameters s_print_parms
                       using selection-screen '1000' WITH SELECTION-TABLE t_rspar_tab
                       and return.
    This selection screens got to check selections based on 2 radio buttons available in the selection screen which also i need to pass through SUBMIT.Please let me know how do i pass this to the Submit statement.
    Thankx in advance...
    Helpful answers will be rewarded fully...

    Hi Susanth,
                   Create Variant for the calling program, Give that variant( here in the below program variant for calling program that I created is VAR1) in the calling program in SUBMIT Statement.
    <b>
    CALLING PROGRAM:
    </b>
    data:
      w_variant(5) TYPE c VALUE 'VAR1'.
    SUBMIT YH625_CALLED_PROGRAM USING SELECTION-SET w_variant.
    <b>CALLING PROGRAM:</b>
    TABLES spfli.
    parameters:
          w_radio1 RADIOBUTTON GROUP g1,
          w_radio2 RADIOBUTTON GROUP g1.
    SELECT-OPTIONS s_table FOR spfli-carrid.
    WRITE '*************** This is Called program output **********************'.
    Hope this solves your problem.
    If you any query you are welcome.
    Regards,
    V.Raghavender.

  • Using javascript to make a text box invisible by clicking a radiobutton

    hi
    my radiobuttons are for a persons title eg Mr Miss Mrs Ms and value 5 is for other.
    when i click other i want a text box to appear that a user can write in, and if the user changes their mind after writing in the box i want the text box to disappear
    you may of noticed i am new to java. this is the code i have used for my text box
    topmostSubform.Page1.titleother::calculate - (JavaScript, client)
    if (titlebox.rawValue == 5)
    this.presence = "visible";
    else
    this.presence = "invisible";
    this.rawValue;
    i have tried variations of this script but it still doesnt work the way it should. i tried searching forums and help files but couild not find an answer to this simple problem... can anyone help

    thnaks for your post thomas i appreciate your help on this :)
    yes it did put 'other' in my text box.
    i managed to overcome the proble using a workaround, it isnt ideal but it works. i put a clickevent in the radiobuttons and changed the text box from calculated to optional

  • How to write the dynamic code for RadioGroupByKey and Check Boxes?

    Hi,
    Experts,
    I have created a WD ABAP application in that i have used RadioGroupByKey and CheckBox Ui elements but i want how to write the dynamic code to that i want to display male and female to RadioGroupByKey and 10  lables to check boxs.
    Please pass me some idea on it and send any documents on it .
    Thanks in advance ,
    Shabeer ahmed.

    Refer this for check box:
    Do check :
    bind_checked property is bind to a node with cardinality of 1:1
    CHECK_BOX_NODE <---node name
    -CHECK_BOX_VALUE <--attribute name of type wdy_boolean
    put this code under your WDDOMODIFYVIEW:
    DATA:
    lr_container TYPE REF TO cl_wd_uielement_container,
    lr_checkbox TYPE REF TO cl_wd_checkbox.
    get a pointer to the RootUIElementContainer
    lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
    lr_checkbox = cl_wd_checkbox=>new_checkbox(
    text = 'WD_Processor'
    bind_checked = 'CHECK_BOX_NODE.CHECK_BOX_VALUE'
    view = view ).
    cl_wd_matrix_data=>new_matrix_data( element = lr_checkbox ).
    lr_container->add_child( lr_checkbox ).
    Refer this for Radiobutton :
    dynamic radio button in web dynpro abao
    Edited by: Saurav Mago on Jul 17, 2009 10:43 PM

  • Choosing variant blocks radiobutton values.  Is there a work around?.

    Dear Forum participants,
    I have a simple radiobutton group:
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
    PARAMETERS :  R3ALL RADIOBUTTON GROUP RG3,
                  R3DEL RADIOBUTTON GROUP RG3,
                  R3CCC RADIOBUTTON GROUP RG3.
    SELECTION-SCREEN END  OF BLOCK B1.
    Which I then use in the code for instance:
      if r3all = 'X'.
           write : / r3all.
      elseif r3del = 'X'
            write : / r3del.
      elseif r3CCC = 'X'.
            write : / r3CCC.
      endif.
    The selection and code works fine if I don't select a variant.
    If I call a selection screen variant with one of the radio buttons set (for instance with r3del = 'X'), then changing the radiobutton selection on the screen after the having called up the variant is ignored.  Debug in the code shows that r3del is always set,  even if I selected another button like r3CCC.
    Anyone know why or how I can fix this behavior?  Or is this and SAP bug?

    Thanks for your idea SaiRam .  I tried this but it did not work.  I also created a new variant and if, after I choose the variant, I change the radio button selection, only the variant's value is used, not the one newly selected.

  • How to display text in colour and arrange radiobuttons in sequence

    Hi all,
    according to my requirement  the screen should be appear like this Rate Caregory in green colour
    under this Select Action should be displayed in blue colour
    under this three radiobuttons should be displayed like this sequence
    copy  Massupload  Automated Rate Processing if copy radiobutton is selected remaining should be disabled.
    but for me the radiobuttons are displaying one by one i have to display it in the above sequence manner.
    kindly send me the steps how to achieve this functionality.
    Thanks & Regards,
    Naveen

    data nodeinf type ref to if_wd_context_node_info.
    data node type ref to if_wd_context_node.
    node = wd_context->get_child_node( 'ZRADIO' ). "ZRADIO is the node name
    nodeinf = node->get_node_info( ).
    data lt_vs type table of WDR_CONTEXT_ATTR_VALUE.
    data ls_vs type WDR_CONTEXT_ATTR_VALUE.
    ls_vs-text = 'Copy'.
    ls_vs-value = '1'.
    append ls_vs to lt_vs.
    You dont need to write this code. just give '1' in the key to select porperty of the radio button.'
    and create on label also for each radio button. three labels for three radio buttons.
    and as you said if i create an attribute name flag type wdy_boolean and if i bind it readonly property of all radiobuttons.suppose if i select copy radiobutton remaining two will be disabled.
    actually it will disable all the three radio buttons.
    but in anycase your requirement is that user should not be able to select the other radio buttons once he has selected one.
    that requirement will be fulfilled by this.
    thanks
    sarbjeet singh

  • How to catch a switching of radiobutton in "AT SELECTION-SCREEN"

    Hi,
    I have a selection screen with 2 radiobuttons in group 001.
    I need to perform some code when I change a status of particular radiobutton (checked - unchecked).
    I have a code in AT SELECTION SCREEN ON RADIOBUTTON GROUP 001 but this code is not executed on changing a status of particular radiobutton.
    Any help is appreciated.
    Thank you.
    Marian

    Check the sample code.
    REPORT  ypra_sample56.
    SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-001.
    PARAMETER: p_r1 RADIOBUTTON GROUP rg1 USER-COMMAND vend DEFAULT 'X',
               p_r2 RADIOBUTTON GROUP rg1,
               p_r3 RADIOBUTTON GROUP rg1.
    SELECTION-SCREEN END OF BLOCK a1.
    SELECTION-SCREEN BEGIN OF BLOCK a2 WITH FRAME TITLE text-002.
    PARAMETER: p_c1 TYPE c AS CHECKBOX,
               p_c2 TYPE c AS CHECKBOX,
               p_c3 TYPE c AS CHECKBOX,
               p_c4 TYPE c AS CHECKBOX,
               p_c5 TYPE c AS CHECKBOX.
    SELECTION-SCREEN END OF BLOCK a2.
               INITIALIZATION
    INITIALIZATION.
      PERFORM enable_fields.
               AT SELECTION SCREEN OUTPUT
    AT SELECTION-SCREEN OUTPUT.
      PERFORM sel_screen_output.
               START OF SELECTION
    START-OF-SELECTION.
      DATA: ws_data TYPE tarifnr.
      ws_data  =  'ZPNGT_EM1'.
      IF ws_data CA '1' OR ws_data CA '2' .
        WRITE:/ ws_data.
      ENDIF.
    *&      Form  sel_screen_output
          Selection screen Output
    FORM sel_screen_output.
      IF p_r1 EQ 'X' OR p_r2 EQ 'X'.
        PERFORM enable_fields.
      ENDIF.
      IF p_r3 EQ 'X'.
        LOOP AT SCREEN.
          IF screen-name EQ 'P_C4' OR screen-name = 'P_C5'.
            screen-input = '1'.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " sel_screen_output
    *&      Form  enable_fields
          enable fields in selection screen
    FORM enable_fields .
      IF p_r1 EQ 'X' OR p_r2 EQ 'X'.
        LOOP AT SCREEN.
          IF screen-name EQ 'P_C4' OR screen-name EQ 'P_C5'.
            screen-input = '0'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " disable_fields
    Regards,
    Prakash.

  • Show normal report or alv report for the radiobutton that was selected

    Hello... i'm a begginer on Abap, so I hope to writly espose my question...
    I'm trying to modifie an report i have to, when the user choose the values for selection, he also can choose if the output is shown as a normal view or as an alv. I want to do it by using radiobuttons, but I don´t no how to organise my code for the selected radiobutton...
    Thanks

    Hi,
    Copy and paste this code. undestand the logic.
    TABLES: vbrp.
    TYPE-POOLS: slis.
    TYPES: BEGIN OF gs_vbrp,
           vbeln TYPE vbrp-vbeln,  "sales order
           matnr TYPE vbrp-matnr,  "material no
           arktx TYPE vbrp-arktx,  "material description
           ntgew TYPE vbrp-ntgew,  "quantity
           gewei TYPE vbrp-gewei,  "quantity unit
           netwr TYPE vbrp-netwr,  "currency
           werks TYPE vbrp-werks,  "plant
           END OF gs_vbrp.
    DATA: it_vbrp TYPE STANDARD TABLE OF gs_vbrp,
          wa_vbrp TYPE gs_vbrp.
    DATA: fcat TYPE slis_t_fieldcat_alv,
          wa_fcat TYPE slis_fieldcat_alv.
    DATA: lyout TYPE slis_layout_alv,
          event TYPE slis_t_event,
          wa_event TYPE slis_alv_event.
    select-options: s_vbeln for vbrp-vbeln.
    parameters: p_alv type c radiobutton group AA,
                P_NORMAL TYPE C RADIOBUTTON GROUP AA.
      SELECT vbeln
             matnr
             arktx
             ntgew
             gewei
             netwr
             werks
             FROM vbrp
             INTO TABLE it_vbrp
             FOR ALL ENTRIES IN IT_VBRP
             WHERE vbeln EQ IT_VBRP-VBELN.
    IF P_ALV = 'X'.
    define imacro.
    wa_fcat-fieldname   = &1.
    wa_fcat-tabname     = &2.
    wa_fcat-reptext_ddic = &3.
    wa_fcat-col_pos     = &4.
    append wa_fcat to fcat.
    clear wa_fcat.
    end-of-definition.
    imacro 'VBELN'   'it_vbrk' 'PO Document'   '1'.
    imacro 'MATNR'   'it_vbrk' 'material no.'       '2'.
    imacro 'ARKTX'   'it_vbrk' 'Mat. description'   '3'.
    imacro 'NTGEW'   'it_vbrk' 'quantity'        '4'.
    imacro 'GEWEI'   'it_vbrk' 'quantity unit'     '5'.
    imacro 'NETWR'   'it_vbrk' 'net price'   '6'.
    imacro 'WERKS'   'it_vbrk' 'plant'     '7'.
    ****************DEFINE LAYOUT
    lyout-zebra             = 'X'.
    lyout-colwidth_optimize = 'X'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
       I_CALLBACK_PROGRAM                = sy-cprog
      I_CALLBACK_PF_STATUS_SET          = ' '
       I_CALLBACK_USER_COMMAND           = 'USER'
      I_CALLBACK_TOP_OF_PAGE            = 'MY NAME'
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
       I_GRID_TITLE                      = 'I M THAT'
      I_GRID_SETTINGS                   =
       IS_LAYOUT                         = lyout
       IT_FIELDCAT                       = fcat
      TABLES
        T_OUTTAB                          = IT_VBRP
    EXCEPTIONS
       PROGRAM_ERROR                     = 1
       OTHERS                            = 2
    ELSE.
    LOOP AT IT_VBRP INTO WA_VBRP.
    WRITE: /5 WA_VBRP-VBELN, WA_VBRP-MATNR.
    ENDLOOP.
    ENDIF.
    Cheers,
    Rudhir

  • NEED CODE FOR RADIOBUTTON SELECTION

    Hi,
    I have a requirement that I need to display 5 Radiobuttons on output, when I select 1st Radiobutton it should show the message that "Button 1 is selected". like that if I select remaining Buttons they should display individually like 2,3,4,5 are selected.
    I Need the coding and the steps from scratch to end.
    Good answers are given excellent points.

    Hi Manikandan,
    First create a simple type in Dictionary. In the webDynpro structure go to [Dictionary -> Local Dictionary -> data Types -> Simple Types].
    Create a simple type, with <b>Enumeration</b> from <i>Enumeration tab</i> values like 1,2,3,4,5 as per your requirement.
    Now in create a attribute in context node (<i>Say: Selection</i>)and assign the type from the <b>Simple Type</b>. Select the package which you may have entered while creating the simple type and then finally bind this simple type with this attribute.
    Now create a UI element [<b>RadioBUttonGroupByKey</b>], in the <b>SelectedKey</b> property of this UI element bind the attribute which you have now created.
    Create a Action for this dropdown UI element. In this action you can write this code:
    String selection = wdThis.wdGetContext().currentContextElement().getSelection();
           if(selection.equalsIgnoreCase("1")){
           wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess("Button 1 is selected");
           else if(selection.equalsIgnoreCase("2")){
    wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess("Button 2 is selected");
           else if(selection.equalsIgnoreCase("5")){
    wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess("Button 5 is selected");
    I hope this will help you. For any further queries kindly revert back.
    Regards
    Pravesh

  • How to write selection-screen block on 15th position?

    Hello all,
    I want to write selection-screen block on 15th position, How can I do this?
    I know that we can write parameter/select-option on perticuler position using following code.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE t7.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN POSITION 15.
    PARAMETERS: fdat LIKE SY-DATUM,
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK b1.
    It writes parameter(FDAT) on 15th position. How can I write whole block on 15th position?

    Hi,
    For this u have to use comment lines. See the below simple program...
    SELECTION-SCREEN COMMENT /2(50) TEXT-001 MODIF ID SC1.
    SELECTION-SCREEN SKIP 2.
    SELECTION-SCREEN COMMENT /10(30) COMM1.
    SELECTION-SCREEN ULINE.
    PARAMETERS: R1 RADIOBUTTON GROUP RAD1,
    R2 RADIOBUTTON GROUP RAD1,
    R3 RADIOBUTTON GROUP RAD1.
    SELECTION-SCREEN ULINE /1(50).
    SELECTION-SCREEN COMMENT /10(30) COMM2.
    SELECTION-SCREEN ULINE.
    PARAMETERS: S1 RADIOBUTTON GROUP RAD2,
    S2 RADIOBUTTON GROUP RAD2,
    S3 RADIOBUTTON GROUP RAD2.
    SELECTION-SCREEN ULINE /1(50).
    INITIALIZATION.
    COMM1 ='Radio Button Group 1'.
    COMM2 ='Radio Button Group 2'.
    LOOP AT SCREEN.
    IF SCREEN-GROUP1 = 'SC1'.
    SCREEN-INTENSIFIED = '1'.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.

Maybe you are looking for