Trouble creating custom combobox

I'm building a custom component consisting of a combo box
that autopopulates with a list of states. So far it works fine
except I can't retreive the selected item from an instance when the
user makes a new selection. I've tried setting a custom property
& setting the value equal to the current selection using a
"change" event handler on the combobox but I could only retreive
the value that was selected when the component was initialized, not
when a new item is selected. I've tried setting up the class in the
.as file to extend the "mx.controls.ComboBox" class instead of the
usual "mx.core.UIComponent". That exposed the normal combobox
properties to the caller, but the "selectedItem.data" property
always comes up blank. Has anyone dealt with this issue before?? If
so, I REALLY hope you managed to resolve it!!

This Forum is to discuss issues of the forums.  Best to post in Forum of application you are using.  Here is link to list.  http://forums.adobe.com/index.jspa

Similar Messages

  • Trouble creating custom AreaRenderer for AreaChart

    Quick first question: if I purchase the charting package, do
    I get the source code? That would certainly solve my problems.
    OK the real question: Does anyone have a quick example class
    that is a custom AreaRenderer for an AreaChart?
    I'm trying to create a custom AreaRenderer implementation.
    According to the docs, I need to implement the "AreaRenderer"
    interface (not IAreaRenderer (?)) which supposedly lives in
    mx.charts.renderers.interfaces but Flex Builder complains that the
    interface is not found.
    Link to the docs:
    http://livedocs.macromedia.com/flex/15/asdocs_en/mx/charts/renderers/interfaces/AreaRender er.html
    Alternatively I've tried simply extending AreaRenderer but
    the methods: beginDraw, draw and endDraw don't seem to be there or
    are not overridable?

    Ugh I always figure these things out just after I post. I've
    been banging my head on this for over a day too.
    Anyway, for anyone else all you do is extend ProgrammaticSkin
    and implement IDataRenderer. Here is my sample class:
    package
    import mx.core.IDataRenderer;
    import mx.skins.ProgrammaticSkin;
    import mx.charts.series.items.AreaSeriesItem;
    import mx.charts.series.renderData.AreaSeriesRenderData;
    import flash.display.Graphics;
    public class MyAreaRenderer extends ProgrammaticSkin
    implements IDataRenderer
    private var _data:AreaSeriesRenderData;
    public function get data():Object
    return _data;
    public function set data(d:Object):void
    _data = d as AreaSeriesRenderData;
    override protected function updateDisplayList(width:Number,
    height:Number):void
    super.updateDisplayList(width, height);
    var g:Graphics = graphics;
    g.clear();
    g.moveTo(width,height);
    g.beginFill(0xFF0000);
    for (var index:String in _data.filteredCache)
    var item:AreaSeriesItem = _data.filteredCache[index];
    g.lineTo(item.x, item.y);
    g.endFill();
    I'd still like to know if you get the source code to the
    charting package though.

  • Trouble creating custom ciscojabbersetup.msi

    Cisco jabber docs say I can use orca and edit the MSI which I can however, On install of the client it does not honor those edits.   I've done many of these for other apps but no luck with this one.  the JabberBootstrap: Action has a target of "PresenceServerType: [TYPE]" "PresenceServer: [ADDRESS]"  and so on.  What is the correct syntax that I should be using?   I have tried with and without the [ ] and still no luck.  Installs fine but at the end it asks for the server type and login server info.  Any help is appreciated. Thanks

    Thanks for the reply Jas.  What we are trying to do is package the MSI to contain our config information as you mentioned in your reply.  We want them to go to our site download the MSI and install it without having to know the config info.  Largely decentralized users.   The issue that I am seeing is when I add the correct config info in the "CustomAction" table inside the MSI file and then save it via ORCA, the info I inserted into the "Target"  are ignored when the MSI is executed on a machine.  So as for syntax within the "Target" what should that look like? 
    From within the MSI:  "PresenceServerType: [TYPE]" "PresenceServer: [ADDDRESS]" "PresenceDomain: [DOMAIN]" "UserLanguageID: [LANGUAGE]"...... and so on....
    Should the syntax be with the [ brackets ]  or without?  or with and quotes around the text or #s? or with brackets and quotes. ex. 
    "PresenceServerType: [CUP]"   or  "PresenceServerType: "CUP""  "PresenceServerType: ["CUP"]"
    I have tried them all and still no luck..  

  • I'm having trouble with custom ringtones.  I have downloaded the free software "makeTones" and have created some ringtones.  I then copied those to Mac and played them in ITunes.  My Itunes does not have a ringtone tab.  I can not sync the ringtones.

    I'm having trouble with custom ringtones.  I have downloaded the free software "makeTones" and have created some ringtones.  I then copied those to Mac and played them in ITunes.  My Itunes library does not have a ringtones tab.  I can not sync the ringtones (or I don't know how)!  Please help.

    Yes, the file extension is M4R.  Does it matter where I save these files on my Macbook?  I then opened them in Itunes and played them.  I did find the Tones folder in Itunes but the Tones or Ringtones tab does not show up when I select Iphone (within Itunes).  When I open the Tones folder in the Library, it is empty.  Thanks in advance for your help.

  • Trouble skinning AS2 ComboBox component

    I'm using Flash CS3 and want to create a custom ComboBox. I've followed the steps outlined in "Editing component skins in a new document" (http://livedocs.adobe.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/html/wwhelp.htm?cont ext=Flash_MX_2004&file=00002045.html#1120753), but every time I get to the step where I drag the ComboBox Assets folder from the HaloTheme.fla library into my library, if I test movie at that point my combobox has become an unclickable white rectangle with no label, button or anything. Am I doing something wrong? Any suggestions would be welcome.
    Thanks!

    start with a new fla and follow the directions.

  • Custom combobox problem

    Hi,
    With the help of JDC i am able to finish the work of creating the customized comobo but I'm stuck at the edge.
    I have a customized comobobox, which can show multiple columns in its combo popup, but only one item of column should be shown as selected in combo, This i achieved when combobox status is editable. but not working when combo is non editable.
    kindly see( can execute too ) the code and let me know where i'am going wrong.
    public class TestCoeusComboBox2 extends javax.swing.JFrame {
    /** Creates new form TestCoeusComboBox2 */
    public TestCoeusComboBox2() {
    initComponents();
    private void initComponents() {
    jPanel1 = new javax.swing.JPanel();
    //jPanel1.setLayout( new java.awt.GridLayout(2,4,10,10));
    jPanel1.setLayout( new java.awt.FlowLayout());
    java.util.Vector people = new java.util.Vector();
    for( int i= 0 ; i< 15 ; i++ ){           
    people.add(new ComboBoxBean(""+i,"Yaman kumar-"+i));
    javaEditable = new javax.swing.JLabel("java-Editable");
    javaNonEditable = new javax.swing.JLabel("java-NON Editable");
    coeusEditable = new javax.swing.JLabel("Coeus - Editable ");
    coeusNonEditable = new javax.swing.JLabel("Coeus - NON Editable");
    coeusComboEditable = new CoeusComboBox(people,true);
    coeusComboEditable.setPopupSelectionBackground(Color.yellow);
    coeusComboEditable.setPopupBackground(Color.white);
    coeusComboNonEditable = new CoeusComboBox(people,false);
    coeusComboNonEditable.setPopupSelectionBackground(Color.gray);
    coeusComboNonEditable.setPopupBackground(Color.white);
    javaComboEditable = new javax.swing.JComboBox(people);
    javaComboEditable.setEditable(true);
    javaComboNonEditable = new javax.swing.JComboBox(people);
    javaComboNonEditable.setEditable(false);
    addWindowListener(new java.awt.event.WindowAdapter() {
    public void windowClosing(java.awt.event.WindowEvent evt) {
    exitForm(evt);
    jPanel1.setPreferredSize(new java.awt.Dimension(1000, 200));
    jPanel1.add(javaEditable); jPanel1.add(javaComboEditable);
    jPanel1.add(javaNonEditable); jPanel1.add(javaComboNonEditable);
    jPanel1.add(coeusEditable); jPanel1.add(coeusComboEditable);
    jPanel1.add(coeusNonEditable); jPanel1.add(coeusComboNonEditable);
    getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER);
    pack();
    /** Exit the Application */
    private void exitForm(java.awt.event.WindowEvent evt) {
    System.exit(0);
    * @param args the command line arguments
    public static void main(String args[]) {
    new TestCoeusComboBox2().show();
    private javax.swing.JPanel jPanel1;
    private CoeusComboBox coeusComboEditable;
    private CoeusComboBox coeusComboNonEditable;
    private javax.swing.JComboBox javaComboEditable;
    private javax.swing.JComboBox javaComboNonEditable;
    private javax.swing.JLabel javaEditable;
    private javax.swing.JLabel javaNonEditable;
    private javax.swing.JLabel coeusEditable;
    private javax.swing.JLabel coeusNonEditable;
    * @(#)CoeusComboBox.java 08/29/2002, 5:06 AM
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.plaf.basic.*;
    import javax.swing.plaf.metal.*;
    import javax.swing.event.*;
    import java.util.Vector;
    import javax.swing.border.*;
    public class CoeusComboBox extends JComboBox {
    private boolean editable = false;
    private Color popupSelBackground ;
    private Color popupBackGround;
    * Initializes the properties of CoeusComboBox as it needs to set custom Renderers
    * and Editors for CoeusComboBox
    private void initProperties(){       
    CoeusComboBoxRenderer renderer= new CoeusComboBoxRenderer();
    CoeusComboCellEditor editor = new CoeusComboCellEditor();
    setBorder(new LineBorder(Color.black,1));
    setRenderer(renderer);
    setEditor(editor);
    //setEditable(true);
    /** Creates a new instance of CoeusComboBox */
    public CoeusComboBox() {
    super();
    setUI(new StateComboBoxUI());
    initProperties();
    * Constructor with default ComboBoxModel
    public CoeusComboBox(ComboBoxModel aModel) {
    super(aModel);
    setUI(new StateComboBoxUI());
    initProperties();
    * Constructor with default items that are shown in popup when the combo is selected
    public CoeusComboBox(final Object[] items) {
    super(items);
    setUI(new StateComboBoxUI());
    initProperties();
    * Constructor with default items that are shown in popup when the combo is selected
    * @param items An array of elements that are shown in popup
    * @param editable Status of ComboBox, If true the combobox value can be modified.
    public CoeusComboBox(final Object[] items, boolean editable) {
    super( items);
    this.editable =editable;
    setEditable(editable);
    setUI(new StateComboBoxUI());
    initProperties();
    * Constructor with default items that are shown in popup when the combo is selected
    * @param items a Vector of combobox items.
    public CoeusComboBox(Vector items) {
    super(items);
    setUI(new StateComboBoxUI());
    initProperties();
    * Constructor with default items that are shown in popup when the combo is selected
    * @param items A vector of items that are shown in popup
    * @param editable Status of ComboBox, If true the combobox value can be modified.
    public CoeusComboBox(Vector items, boolean editable){
    super( items);
    this.editable = editable;
    setEditable(editable);
    setUI(new StateComboBoxUI());
    initProperties();
    * Sets combobox Popup Background Color
    * @param color background color of Combobox popup.
    public void setPopupBackground( Color color){
    this.popupBackGround = color;
    * Sets combobox Popup Selection Background Color
    * @param color Selected Item background color of Combobox popup.
    public void setPopupSelectionBackground( Color color){
    this.popupSelBackground = color;
    * Sets the Status(Editable/NonEditable) of combobox, Based on which the combo
    * value can be changed. Default is not editable
    * @param flag If true the combobox is editable.
    // public void setEditable( boolean flag){
    // editable = flag;
    * An inner class to set the Default renderer for CoeusComboBox. As this combobox
    * can show multiple columns in combo popup, so add number columns to this panel, like
    * that as many as number panel will be added to panel as many items available in combobox.
    * that is rendered in every cell.
    class CoeusComboBoxRenderer extends JPanel implements ListCellRenderer {
    private JLabel left;
    private JLabel right;
    private JLabel middle;
    * Constructor to set the layout and border for this panel.
    public CoeusComboBoxRenderer() {
    //setLayout(new GridLayout(1, 2,0,0));
    BoxLayout boxLayout =new BoxLayout(this,BoxLayout.X_AXIS);
    setLayout( boxLayout);
    setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3));
    left = new JLabel();
    middle= new JLabel();
    right = new JLabel();
    add(left);
    add(middle);
    add(right);
    * An overridden method to render this component in desired cell.
    public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
    if (isSelected) {
    if(popupSelBackground == null ){
    popupSelBackground = list.getSelectionBackground();
    setBackground(popupSelBackground);
    setForeground(list.getSelectionForeground());
    } else {
    if( popupBackGround == null){
    popupBackGround = list.getBackground();
    setBackground(popupBackGround);
    setForeground(list.getForeground());
    if( value instanceof ComboBoxBean ){
    ComboBoxBean comboBoxBean = (ComboBoxBean) value;
    left.setText(comboBoxBean.getCode());
    middle.setText(" ");
    right.setText(comboBoxBean.getDescription());
    return this;
    }// end of CoeusComboBoxRenderer class
    * An inner class to set the editor of CoeusComboBox when it gets focus and about to be
    * selected by the user
    class CoeusComboCellEditor extends javax.swing.plaf.basic.BasicComboBoxEditor {
    public CoeusComboCellEditor() {
    super();
    System.out.println(" editable "+editable);
    editor.setEditable(true);
    //editor.setBackground(editorSelBackground);
    }// end of CoeusComboCellEditor
    }// end of CoeusComboBox
    * @(#)StateComboBoxUI.java 08/20/2002 9:21 AM
    import javax.swing.plaf.basic.*;
    import javax.swing.*;
    public class StateComboBoxUI extends BasicComboBoxUI{
    * Creates the ComboBox popup that is displayed when the implemented combobox is selected.
    * As in Basic LAF the combobox does not provide the horizontal scrollbar for popup this
    * method is overridden with that property.
    protected ComboPopup createPopup(){
    BasicComboPopup popup = new BasicComboPopup(comboBox){
    protected JScrollPane createScroller() {
    return new JScrollPane( list, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
    ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED );
    }//end of method createScroller
    return popup;
    }//end of method createPopup
    * The Class is used to populate any combo box
    public class ComboBoxBean implements java.io.Serializable{
    private String code;
    private String description="";
    /** Default Constructor */
    public ComboBoxBean() {
    /** Constructor with parameters */
         public ComboBoxBean(String code, String description) {
                   this.code = code;               this.description = description;
    * This method gets the Code
    * @return String code
    public String getCode() {
    return code;
    * This method sets the Code
    * @param String code
    public void setCode(String code) {
    this.code = code;
    * This method gets the Description
    * @return String description
    public String getDescription() {
    return description;
    * This method sets the Description
    * @param String description
    public void setDescription(String description) {
    this.description = description;
    public String toString(){
    return getDescription();

    Gregor,
              As an alternative way i did take "selectedItem" away from MXML and used it on "creationComplete". But not i am running in to different problem which i am going to open as new discussion.
    Between i have documented this issue on my blog @ http://www.srinivaskusunam.com/2009/05/13/flex-combobox-selecteditem-problem/
    Thanks,
    Srini

  • Creating custom UI panels : where to start ?

    Hi,
    i've had a  hard time searching for clear information on how to create custom panels in InDesign.
    Maybe the wrong keywords, i dont know, but here i am
    I would like to create a panel displaying all the "text variables" and their actual values and be able to edit them right there.
    I have no idea where to start, any primers ? Cues ? Ressources ?
    Many thanks for the help !
    Ugo

    Well i was actually asking myself the very question : do i really need a panel ?
    So far i found a script thhat pretty much does what i need :
    run the script opens a window
    When all the fields are populated, hit continue and the custom text variables are updated with the freshly entered information
    Now i need to tweak this code to suit my variables and find a way to "get" the current values instead of the defaults ones populating the form.
    So i guess i can always execute the script to update, correct and update the variable and anytime, saving me the trouble of going about creating a plugin (this scared me more that anything )
    I'll make sure it runs and see whats up. Any chance i can ask you later for support if i hit a rock?
    Again thanks for the kind help, i now have ressources and some vocabulary to find stuff!
    Ugo

  • JTable with custom combobox

    Hi
    I been trying to create a JTable with a custom combobox, that is in a column the lists contained within each combobox is unique. I tried using a renderer, even though the combo appears I cannot select the combo for editing. Any suggestions on how to get the combo working properly would be appreciated thanks.

    It's been a few years since I did something like this, but my recollection is that you should implement the TableCellEditor interface and have the getTableCellEditor method return your custom combo box. Then, either override getCellEditor in your JTable to return your custom TableCellEditor or (better) call tableColumn.setCellEditor for the column you're interested in, passing an instance of your TableCellEditor. I suggest you return the same JComboBox from your implementation of getTableCellEditor every time, and either replace the underlying model or have a custom model in which you can easily switch the contents on-the-fly.
    Having done this in the past, I remember that it's quite easy to leak stuff - I wouldn't advise making a new JComboBox every time.
    Regards,
    Huw

  • Trouble loading custom saved Premiere Pro CS6 keyboard shortcuts

    Hello Everyone,
    I'm having trouble loading custom saved Premiere Pro CS6 keyboard shortcuts. I have a saved .kys set-up file but there is no load button visible in the Keyboard Shortcuts dialog. It took a while to make the shortcuts. Very frustrating. Any tips appreciated.
    Thanks,
    FB

    IIRC ..the "load" is done from a drop down menu giving you the choices of the Default Presets as well as your custom set.  NAmed as per  "whatever.kys"
    Did you create them in your current Premiere or are you importing them from elsewhere?

  • I am having trouble with custom color settings. It randomly reverts back to North American General Purpose without warning. This is a big problem for me. My customers (professional photographers) expect consist colors in my printing. Help!

    I am having trouble with custom color settings. It randomly reverts back to North American General Purpose without warning. This is a big problem for me. My customers (professional photographers) expect consist colors in my printing. Help!

    Do you even know how to nuke and re-set Photoshop's preferences, colorplak?  Your last post seems to reveal that you don't understand what I'm talking about. Here's a link you can click on:
    Preference file functions, names, locations | Photoshop CC
    To re-create the preferences files for Photoshop, start the application while holding down Ctrl+Alt+Shift (Windows) or Command+Option+Shift (Mac OS). Then, click Yes to the message, "Delete the Adobe Photoshop Settings file?"
    Note: If this process doesn't work for you while you're using a wireless (bluetooth) keyboard, attach a wired keyboard and retry.
    Important: If you re-create the preferences by deleting the Adobe Photoshop CC Settings file, make sure that you only delete that file. If you delete the entire settings folder, you also delete any unsaved actions or presets.
    Reinstalling Photoshop does not remove the preferences file. Before reinstalling Photoshop, re-create your preferences.
    Note for Photoshop 14.1 and later: If you use Generator and reset your Preferences, Generator is disabled. Choose Preferences > Plug-ins to turn it back on.
    Video: Julieanne Kost created a video that takes you through two ways of resetting your Photoshop preferences. The manual preference file removal method is between 0:00 - 5:05. The keyboard shortcut method is between 5:05 - 8:18. The video is located here.
    Mac OS
    Important: Apple made the user library folder hidden by default with the release of Mac OS X 10.7. If you require access to files in the hidden library folder to perform Adobe-related troubleshooting, see How to access hidden user library files.

  • How to create Custom error message in SharePoint 2013

    Hi,
    I have created one document library.On uploading the same file SharePoint throws error as"server error.The same file exit".
    But my requirement is not to show the SharePoint default message.I wanted to create custom message and show the pop up for the same file upload.
    Is there any way to create any custom error page or can I manipulate SharePoint default error page?
    Any help?
    Thank you

    Hi,
    You can create an event receiver to set the validation error messages.  One such post to redirect the custom error page is as follows
    https://social.msdn.microsoft.com/Forums/office/en-US/2bc851f6-e04b-4550-b87f-9b874a290482/sharepoint-event-receivers-and-custom-error-messages?forum=sharepointdevelopmentlegacy
    Create custom error page for SharePoint event receiver
    Please mark it answered, if your problem resolved or helpful.

  • I am planning to create custom defined  DSO Object & Info cube

    Hi ,
                     i am planning to create custom defined  DSO Object & Info cube.what ratio i can calculate what is the keyfields & what are the data fields in DSO.How can i calculate.
                     2. how can i create  suitable dimensions, suitable characterstics  for dimensions.what ratio i can decide.
    Thanks,
    chandu.

    Hi Diego Garu,
                               Thanks for your fast response.i
    VBELN     VBAP     2LIS_11_VAITM                                              0DOC_NUMBER
    POSNR     VBAP     2LIS_11_VAITM                                                0S_ORD_ITEM
    KUNNR     VBAK     2LIS_11_VAHDR                                                 0SOLD_TO
    VBELN     VBRP     2LIS_13_VDITM                                                    0BILL_NUM
    FKDAT     VBRK     2LIS_13_VDHDR                                                 0BILL_DATE
    INCO1     VBRK     2LIS_13_VDHDR(INCO1FieldNot Available in Data Source)     0INCOTERMS
    ZTERM     VBRK     2LIS_13_VDHDR(Payment terms field Not Available in Data Source)                                                                                0UCPYTERMS
    NETWR     VBRP     2LIS_13_VDITM                                                           0NETVAL_INV.
                                           here data is coming from the multible tables.that why i am planning to create custom defined data source based on view. here how can i calucate dso is suitable or cube is suitable.
    suppose dso is suitable how can i decide which on is the data field and which one is the key field.
                                        how can i decide how many dimensions are needed here.and which chara are suitable for that dimensions.
    Thanks ,
    chandu.

  • How to Created custom report for Ship not Billed (SD/FI)?

    Hi all,
    I am anticipating  to write some abap reports..Here is one of them..
    Anyone can help  me with writing a Report , how to do 'Custom Report for shipped not Billed(SD/FI)' ..But since I am new to Abap , if you wish to reply, please use a little more detail and simple explanation, step by step so I can understand what is the idea, how it can be acheived...what kind of report should be used , techniques, tables etc...:)
    Appreciate your help!
    Regards,
    Boby

    Hi Boby,
    You need to create custom transaction to achive these results.
    you will have selection-screen ,it would be :
    Date : Here date would be mandatory  - Ranges Option
    Customer  - Optional field - Ranges
    Order #  Sales Order (Optional) Ranges
    Invoice #  - Invoice # (Optional) Ranges
    You will get the data based on ur selection-screen criteria ...
    First you will have customer order details from diffrent table
    VBAK,
    VBAP,
    LIKP
    LIPS
    VBRK,
    VBRP
    KNA1,
    VBFA Tables ( See the my sample program )
    Output would be :
    Customer #   Custome Name    Order #   Delivery #   Invoice #   Netpr, Netquantity ,
    Check the condition  whether invoice table has VBRK-RFBSK  = ''.
    See the my sample program : This is sales report by monthly..
    REPORT ZFDSALES_REPORT no standard page heading
                           message-id zwave.
    Data Declaration Part
    TYPE-POOLS
    type-pools : slis.
    Tables
    tables : VBAK,
             VBAP.
    Internal table for VBAK Table
    data : begin of i_vbak occurs 0,
           vbeln like vbak-vbeln,
           bstnk like vbak-bstnk,
           vdatu like vbak-vdatu,
           end of i_vbak.
    Internal table for VBAP and MATNR
    data : begin of i_vbap occurs 0,
           vbeln like vbap-vbeln,
           matnr like vbap-matnr,
           kdmat like vbap-kdmat,
           kwmeng like vbap-kwmeng,
           netpr like vbap-netpr,
           maktx like makt-maktx,
           end of i_vbap.
    Internal tables
    data : begin of i_sales occurs 0,
           vdatu like vbak-vdatu,
           bstnk like vbak-bstnk,
           matnr like vbap-matnr,
           maktx like makt-maktx,
           kdmat like vbap-kdmat,
           kwmeng like vbap-kwmeng,
           netpr  like vbap-netpr,
           end of i_sales.
    Variable for ALV
    data : v_repid like sy-repid,
           gt_fieldcat    type slis_t_fieldcat_alv.
    Selection-screen
    selection-screen : begin of block blk with frame title text-001.
    select-options : s_vbeln for vbak-vbeln,
                     s_erdat for vbak-erdat,
                     s_ernam for vbak-ernam,
                     s_vdatu for vbak-vdatu obligatory,
                     s_BSTNK for vbak-BSTNK,
                     s_KUNNR for vbak-kunnr,
                     s_matnr for vbap-matnr,
                     s_KDMAT for vbap-KDMAT.
    selection-screen : end of block blk.
    Initilization
    initialization.
      v_repid = sy-repid.
    S T A R T  -  O F  -  S E L E C T I O N ****************
    start-of-selection.
    Get the data from VBAK and VBAP Tables
      perform get_vbak_vbap.
    E N D  -  O F  -  S E L E C T I O N *****************
    end-of-selection.
    Display the data
      perform dispolay_data.
    *&      Form  get_vbak_vbap
          Get the data from VBAK and VBAP Table
    FORM get_vbak_vbap.
    Get the data from VBAK Table
      select vbeln bstnk vdatu from vbak into table i_vbak
                         where vbeln in s_vbeln
                         and   bstnk in s_bstnk
                         and   vdatu in s_vdatu
                         and   kunnr in s_kunnr
                         and   erdat in s_erdat
                         and   ernam in s_ernam.
      if sy-subrc ne 0.
        message e000(zwave) with 'No data found for given selection'.
      endif.
    Get the data from VBAP Table
      select avbeln amatnr akdmat akwmeng a~netpr
             b~maktx into table i_vbap
             from vbap as a inner join makt as b on bmatnr = amatnr
             for all entries in i_vbak
             where a~vbeln in s_vbeln
             and   a~kdmat in s_kdmat
             and   a~abgru = space
             and   a~matnr in s_matnr
             and   a~matnr ne '000000000000009999'
             and   a~matnr ne '000000000000004444'
             and   a~matnr ne '000000000000008888'
             and   a~matnr ne '000000000000001111'
             and   a~werks = '1000'
             and   b~spras = 'E'
             and   a~vbeln = i_vbak-vbeln.
      if sy-subrc ne 0.
        message e000(zwave) with 'No data found for given selection'.
      endif.
      sort i_vbak by vbeln.
      sort i_vbap by vbeln matnr.
      loop at i_vbap.
        read table i_vbak with key vbeln = i_vbap-vbeln
                                binary search.
        if sy-subrc eq 0.
          i_sales-bstnk = i_vbak-bstnk.
          i_sales-vdatu = i_vbak-vdatu.
          i_sales-matnr = i_vbap-matnr.
          i_sales-kdmat = i_vbap-kdmat.
          i_sales-maktx = i_vbap-maktx.
          i_sales-netpr = i_vbap-netpr.
          i_sales-kwmeng = i_vbap-kwmeng.
          append i_sales.
        else.
          continue.
        endif.
        clear : i_sales,
                i_vbap,
                i_vbak.
      endloop.
      sort i_sales by vdatu bstnk matnr.
      refresh : i_vbap,
                i_vbak.
    ENDFORM.                    " get_vbak_vbap
    *&      Form  dispolay_data
          Display the data
    FORM dispolay_data.
    Fill the Fiedlcat
      PERFORM fieldcat_init  using gt_fieldcat[].
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                =
      I_BUFFER_ACTIVE                   = ' '
          I_CALLBACK_PROGRAM                = v_repid
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
      I_CALLBACK_TOP_OF_PAGE            = ' '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         =
          IT_FIELDCAT                       = gt_fieldcat[]
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
      IT_EVENTS                         =
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      IT_ALV_GRAPHICS                   =
      IT_ADD_FIELDCAT                   =
      IT_HYPERLINK                      =
      I_HTML_HEIGHT_TOP                 =
      I_HTML_HEIGHT_END                 =
      IT_EXCEPT_QINFO                   =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
        TABLES
          T_OUTTAB                          = i_sales
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
    ENDFORM.                    " dispolay_data
    *&      Form  fieldcat_init
          text
         -->P_GT_FIELDCAT[]  text
    FORM fieldcat_init USING  e01_lt_fieldcat type slis_t_fieldcat_alv.
      DATA: LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    Delivery Date
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'VDATU'.
      LS_FIELDCAT-OUTPUTLEN    = 12.
      LS_FIELDCAT-TABNAME    = 'I_SALES'.
      ls_fieldcat-seltext_L = 'Delivery Date'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    Purchase Order #Material Description
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'BSTNK'.
      LS_FIELDCAT-OUTPUTLEN    = 25.
      LS_FIELDCAT-TABNAME    = 'I_SALES'.
      ls_fieldcat-seltext_L = 'Purchase Order #'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    Material
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-REF_FIELDNAME    = 'MATNR'.
      LS_FIELDCAT-REF_TABNAME    = 'MARA'.
      LS_FIELDCAT-FIELDNAME    = 'MATNR'.
      LS_FIELDCAT-TABNAME    = 'I_SALES'.
      ls_fieldcat-seltext_L = 'Material #'.
      ls_fieldcat-seltext_M = 'Material #'.
      ls_fieldcat-seltext_S = 'Material #'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    Material Description
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MAKTX'.
      LS_FIELDCAT-OUTPUTLEN    = 40.
      LS_FIELDCAT-TABNAME    = 'I_SALES'.
      ls_fieldcat-seltext_L = 'Material Description'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    Customer Material #
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'KDMAT'.
      LS_FIELDCAT-OUTPUTLEN    = 35.
      LS_FIELDCAT-TABNAME    = 'I_SALES'.
      ls_fieldcat-seltext_L = 'Customer material no.'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    Quantity
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'KWMENG'.
      LS_FIELDCAT-OUTPUTLEN    = 15.
      LS_FIELDCAT-TABNAME    = 'I_SALES'.
      ls_fieldcat-seltext_L = 'Quantity'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    Net Price
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'NETPR'.
      LS_FIELDCAT-OUTPUTLEN    = 15.
      LS_FIELDCAT-TABNAME    = 'I_SALES'.
      ls_fieldcat-seltext_L = 'Net Price'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    ENDFORM.                    " fieldcat_init
    Reward Points if it is helpful
    Thanks
    Seshu

  • How to create custom cloumns in report

    Hi,
    I want to create custom columns in the reports(columns which are not present in active subject area. Please help.
    Thanks
    Arpita

    Arpita,
    You can create a calculated column using any Field (Presentation Column) in any Presentaion Table.
    Eg: You want to calculate the difference between the Start and End Date of an Activity.
    1. Simply Create a report on the Activities SA (Analytics or Real-time doe not matter here)
    2. Add the required Coumns
    3. To calculate the difference between the Start and End time.
    - add the below fields from Activity
    - Click the 'Fx' icon any field that you would like to display the calculated value in.
    - Replace the existing formula in this field with TIMESTAMPDIFF(SQL_TSI_DAY, Activity."Created Date", Activity."Completed Date") - This is your calculated value
    Activity ID     Subject     Created Date     Completed Date     Difference
    AXXX-IHJ1W     Prepare Proposal     10/31/2011 6:39:43 AM     11/18/2011 4:48:54 AM     18
    For more details, I would suggest you look at the CRM On Demand Bookshelf or click the hlp link in CRM On Demand.
    Hope this helps!
    Thanks,
    Royston

  • How to create custom infotype for training and event management

    hai freinds can any one tell me how to create custom infotype for training and event managment with following fields
    PS No – PA0000-> PERNR
    Name   - PA0001 -> ENAME
    IS PS.No. – PA0001-> PS no. of Immediate Superior
    IS name PA0001 -> ENAME
    thanx in advance
    afzal

    Hi,
    Your question is not clear for me. Since it is a TEM infotype, it could be a PD infotype.
    If you wish to create a PD infotype, use transaction PPCI to create the infotype.
    But before that you need to create a structure HRInnnn (where nnnn is the infotype number) with all the fields relevant for the infotype.
    If you wish to create a PA infotype, use transaction PM01 to create the infotype.
    But before that you may be required to create a strcuture PSnnnn  (where nnnn is the infotype number) with all the fields relevant for the infotype.
    Regards,
    Srini

Maybe you are looking for

  • New 9XX movement and Serial Numbers

    Greetings, I have created two new movements (901/902) copies of 561/562, these are inventory correction movements and I have changed very little on the actual movement type configuration other then some of the G/L account mapping. The inventory that

  • When does a JTabbedPane set the size of the component inside a tab?

    I would like to know how big a component inside a tab is directly after I've added it to a tab in a JTabbedPane. I thought once I've "added" a component via the JTabbedPane.add(String, Component) method, the Component would be realized with correct s

  • Using Axis web service

    Hi, are there anyone who use axis webservice in PI. I'm using .Net web service easily but Axis webservice is problem.When i import. It doesn't show all parameter structure therefore it isn't used in message mapping etc. thank.

  • Comcast modem/printer problem

    With my new Comcast Xfinity modem, connecting printers to the modem via Ethernet no longer works. They can't be found on my wi-fi network. Comcast told me this modem uses a different IP address system, and if I "set up" my printers again they will re

  • VOD Picture Audio Choppy

    We've had FIOS for years, and suddenly this week the VOD is having a problem.  The shows play, but the picture is choppy (almost pixellated), and sound goes in and out. I called FIOS and did a hard reset of the router, problem still exists.