Issue in Modifying custom table

Hi Experts
Program Y00_MM modifying custom table Y00_IFS074 using internal table.
we have a sales company code field in table.
Internal table company code value is 00021345 .
But in custom table it updated as 21345. It should be 00021345.
few days back no problem with table updation. Now only i'am getting this issue. There is no changes in Report.
Kindly help me.

Hi,
Please use the below FM for the field BUKRS.
FM : CONVERSION_EXIT_ALPHA_OUTPUT.
This FM will add the leading zeros according to the field length.
Hope this will resolve your problem...

Similar Messages

  • Strange issue in updating custom table after upgrade ECC6.0! Please help!

    Hello everyone:
        I have some code (shown below) that deletes and updates some SAP tables and one custom table:
        DELETE T5UBV   FROM TABLE DEL_T5UBV.
      DELETE ZCHRZIP FROM TABLE DEL_ZCHRZIP.
      MODIFY ZCHRZIP FROM TABLE WRITE_ZCHRZIP.
      MODIFY T5UBV   FROM TABLE WRITE_T5UBV.
    COMMIT WORK.
    For SAP table the code above works fine but for custom table it overrides all exisiting data! It should keep some existing data in custom table ZCHRZIP and append any extra data from internal table WRITE_ZCHRZIP. This functions as designed if I run in fore ground but in background it just overrides instead of modifying and appending! This is happening only after upgrade ECC6.0. Any thoughts? Please let me know.
    Thanks.
    Mithun

    Mithun,
    Comment below code
    DELETE ZCHRZIP FROM TABLE DEL_ZCHRZIP.
    <b>Reward if it helps,</b>
    Satish

  • Performance issue in a custom table

    Hi All,
    I have  a ztable used in a program wherin I have a doubt of performance issue in selection.Its like :
        SELECT ship_no invoice_no
          INTO TABLE it_ship_no_hist
          FROM zco_cust_hist
          FOR ALL ENTRIES IN it_freight
          WHERE ship_no = it_freight-tknum.
    there are 7 key fields in this table out of which one ( tknum ) is used in a where condition.The table is without any index.
       For performance purpose should I create an index with the very field 'tknum' in the index..can I do that or index should be created only along with non key fields.

    Hi,
    a table has - besides a few exceptions - always one index that is the primary key. The fields are the key fields in the same order as in the table.
    The primary key is always there and therefore not displayed under the botton 'index'.
    Is tknum a key field? What are the key fields in correct order? If it is in the key and maybe the first one, then it does not make sense that you create an index.
    Siegfried

  • Including transport request while modifying the custom table

    Hello Experts,
    I have a scnerio like, I have to insert/modify some records in my custom table. Now we want that these records should come under a transport request, so that we can track which records are for which user.
    I am developing a report and including a parameter for transport request in the selection screen. So the report will take TR number directly from selection screen, but how to include it for the records inserted.
    Regards,
    Harjeet

    Hello Altaf,
    I think you did'nt understood my issue. I am not using and transaction. I am creating a report program which inserts new entries into my custom table based on the flat file on my presentation server.
    Now I want these entries to be inside a transport request which is there in the selection screen.
    Hope this gives the clear idea of my specification.
    Regards,
    Harjeet

  • "CX_SY_OPEN_SQL_DB" ERROR  when modifying a custom table

    Dear friends,
    I get this runtime error "DBIF_RSQL_SQL_ERROR"
    "CX_SY_OPEN_SQL_DB" excpetion raised while am trying to modify a custome table . says deadlock detected while waiting for resourcebelow is the code snippet please suggest solution on how to avoid the error. thanks for the help in advance.
    kathy
    *Get all packspec levels
      lt_levels                            =  iv_packspec_content-levels.
      loop at lt_levels into ls_levels.
        if ls_levels-hutyp is not initial.
          ls_zpackspec-guid                =  ls_levels-guid.
          ls_zpackspec-aennr               =  ls_levels-aennr.
          ls_zpackspec-total_quan          =  ls_levels-total_quan.
          ls_zpackspec-level_type          =  ls_levels-level_type.
          ls_zpackspec-/cfscmx/nest_fc     =  ls_levels-/cfscmx/nest_fc.
          ls_zpackspec-maxstack            =  ls_levels-maxstack.
          ls_zpackspec-unit_tw             =  ls_levels-unit_tw.
          ls_zpackspec-g_weight            =  ls_levels-g_weight.
          ls_zpackspec-unit_tv             =  ls_levels-unit_tv.
          ls_zpackspec-g_volume            =  ls_levels-g_volume.
          ls_zpackspec-trgqty              =  ls_levels-trgqty.
          ls_zpackspec-flg_minimum_ps      =  ls_levels-flg_minimum_ps.
          ls_zpackspec-creadat             =  sy-datum.
          ls_zpackspec-matid               =  iv_packspec_content-content-matid.
          ls_zpackspec-hu_create           =  ls_levels-hu_create.
          ls_zpackspec-unit_gw             =  ls_levels-unit_gw.
          ls_zpackspec-g_capa              =  ls_levels-g_capa.
          ls_zpackspec-unit_gv             =  ls_levels-unit_gv.
          ls_zpackspec-hutyp               =  ls_levels-hutyp.
          ls_zpackspec-block               =  ls_levels-block.
          ls_zpackspec-length              =  ls_levels-length.
          ls_zpackspec-width               =  ls_levels-width.
          ls_zpackspec-height              =  ls_levels-height.
          ls_zpackspec-unit_lwh            =  ls_levels-unit_lwh.
          ls_zpackspec-nest_ftr            =  ls_levels-nest_ftr.
          if not ls_elementgroup is initial.
            sort ls_elementgroup by guid.
            read table ls_elementgroup assigning <ps_el_group>
                                        with key guid = ls_levels-elementgroup
                                   binary search.
            if <ps_el_group> is assigned.
              ls_elemgroup = <ps_el_group>-elements.
            endif.
            sort ls_elemgroup by hurelevant.
            read table ls_elemgroup assigning <ps_elem>
                                     with key hurelevant = 1
                                binary search.
            if sy-subrc eq 0.
              ls_zpackspec-hurelevant      =  <ps_elem>-hurelevant.
            endif.
          endif.
          append ls_zpackspec  to  lt_zpackspec.
          clear  ls_zpackspec.
        endif.
      endloop.
    **Update Packspec data for each level in the table ZPACKSPEC.*
      *if not lt_zpackspec is initial.*
        *modify zpackspec from table lt_zpackspec.*
        *ev_zpackspec  =   lt_zpackspec.*
      *endif.*

    Kathy - do you have duplicate entries for the same key fields in the internal table you are using for the update?
    Rob

  • Text truncation issue in custom table

    Hello Experts.
    We are uploading file from program and updating custom table including two fields where each one is 100 chars.
    Now when I am trying to upload with my user's id and end user's id then data is uploaded succesfully . But when end user try to upload data from his system then only first field is filled , second field does not updated.
    Would you please let me know where it can be issue and how can be solved.
    Regards,
    Shiv

    Hello All,
    We are uploading file from upload function module and updating data using Update command in custom table. This code is working fine for almost all users. But it is not working for 3-4 end user.
    Would that be issue of SAP GUI or some thing else.

  • How to MODIFY A CUSTOM TABLE  FROM A FLAT FILE

    Dear Friends,
                     I have a requirement where i have to upload data from excel file to my custom table  so i have used a FM
    'TEXT_CONVERT_XLS_TO_SAP' and i have collected data into a internal table , till here i am able to get data correctly , now i hae to upload this data into a custom table .
    the flat file is having  6 fields and the custom table is having
    8 fields , for uploading the data into this custom table from the internal table where i have collected above iam getting problem . Actually iam using a modify statement to update the custom table .
    the flat file which i have collected into the internal table is as below :
      IDNo.     Name     Date      Location   Designation  Dept
      101       Raja      4/12/2007  Delhi      Manager      HR
      102       James    4/12/2007  Delhi      Clerk          HR
    Custom table  is having the below fields
    IDNO.  Name  Date  Location Designation  Dept   Manager
    101                                                                   Raja
    now when i run the program iam getting the problem   while usign the modify statment is the ID no which is already having
    a record as  IDno = 101  and manger = Raja.......with the other fields   name , date, location,designation and dept as blank.
    if i want to fill this fields from my flat file the modify statment
    just filling all the fields  for the ID no = 101  and manager field which already having Raja as being overwritten by space .....
    becasue this field is not being there in the flat file.
    the code iam using as follows.
    The flat file is having with the below structure
    TYPES: BEGIN OF t_emp_data,
              IDNO(11) TYPE c,
             Name(13) TYPE c,
             Date(20) TYPE c,
              Location (40) TYPE c,
             Designation(40) TYPE c,
             Dept(40) TYPE c,
             end of t_emp_data.
    The Custom Table(ZEMP_DATA) is having with the below structure
    TYPES: BEGIN OF t_emp_data_table,
              IDNO(11) TYPE c,
             Name(13) TYPE c,
             Date(20) TYPE c,
              Location (40) TYPE c,
             Designation(40) TYPE c,
             Dept(40) TYPE c,
             Manager(20) type c,  -- this is the extra field in table
             end of t_emp_data_table.
    data :
    it_empdata TYPE STANDARD TABLE OF t_emp_data,
    it_empdata_tmp TYPE STANDARD TABLE OF t_empdata_tmp,
    wa_empdata_tmp  type t_empdata_tmp,
    wa_empdata type t_emp_data.
    loop at it_empdata into  wa_empdata.
      move-corresponding  wa_empdata to   wa_empdata_tmp.
      modify ZEMP_DATA  from  wa_empdata_tmp .
    endloop.
    could any one please let me know what i have to do inorder to not get the manager field data not being overwritten with the modify statment , for the IDNo. 101  . I want the data which is already ( manager = Raja) shouldnt not be get overwritten with Space.
    please help me in this regard
    Regards
    Madhuri.

    Hi,
    use a slect statement before
    "move-corresponding wa_empdata to wa_empdata_tmp."
    select manager
    from ztable
    into wa_empdata_tmp-manager
    where id = 100.
    regards,
    lavanya

  • Not Updating Customized Table when System having Performance Issue

    Hi,
    This is actually the same topic as "Not Updating Customized Table when System having Performance Issue" which is posted last December by Leonard Tan regarding the user exit EXIT_SAPLMBMB_001.
    Recently we changed the program function module z_mm_save_hide_qty to update task. However this causes more data not updated. Hence we put back the old version (without the update task).  But now it is not working as it used to be (e.g. version 1 - 10 records not updated, version 2 with update task - 20 records not updated, back to version 1 - 20 records not updated).
    I tried debugging the program, however whenever I debugged, there is nothing wrong and the data is updated correctly.
    Please advise if anyone has any idea why is this happening. Many thanks.
    Regards,
    Janet

    Hi Janet,
    you are right. This is a basic rule not to do any COMMIT or RFC calls in a user exit.
    Have a look at SAP note 92550. Here they say that exit EXIT_SAPLMBMB_001 is called in the update routine MB_POST_DOCUMENT. And this routine is already called in UPDATE TASK from  FUNCTION 'MB_UPDATE_TASKS' IN UPDATE TASK.
    SAP also tells us not to do any updates on SAP system tables like MBEW, MARD, MSEG.
    Before the exit is called, now they call 'MB_DOCUMENT_BADI' with methods MB_DOCUMENT_BEFORE_UPDATE and MB_DOCUMENT_UPDATE. Possibly you have more success implementing the BADI.
    I don't know your situation and goal so this is all I can tell you now.
    Good luck!
    Regards,
    Clemens

  • Small issue with custom table cell editor and unwanted table row selection

    I'm using a custom table cell editor to display a JTree. Thing i notice is that when i select a value in the tree pop-up, the pop-up closes (as it should) but then every table row, from the editing row to the row behind the pop-up when i selected the value becomes highlighted. I'm thinking this is a focus issue, but it thought i took care of that. To clairfy, look at this: Before . Notice how the "Straightening" tree item is roughly above the "Stock Thickness" table row? When i select Straightening, this is what happens to my table: After .
    My TreeComboBox component:
    public class TreeComboBox extends JPanel implements MouseListener {
        private JTextField itemField;
        private TreeModel treeModel;
        private ArrayList<ActionListener> actionListeners = new ArrayList<ActionListener>();
        private Object selectedItem;
         * Creates a new <code>TreeComboBox</code> instance.
         * @param treeModel the tree model to be used in the drop-down selector.
        public TreeComboBox(TreeModel treeModel) {
            this(treeModel, null);
         * Creates a new <code>TreeComboBox</code> instance.
         * @param treeModel the tree model to be used in the drop-down selector.
         * @param selectedItem tree will expand and highlight this item.
        public TreeComboBox(TreeModel treeModel, Object selectedItem) {
            this.treeModel = treeModel;
            this.selectedItem = selectedItem;
            initComponents();
         * Returns the current drop-down tree model.
         * @return the current <code>TreeModel</code> instance.
        public TreeModel getTreeModel() {
            return treeModel;
         * Sets the tree model.
         * @param treeModel a <code>TreeModel</code> instance.
        public void setTreeModel(TreeModel treeModel) {
            this.treeModel = treeModel;
         * Returns the selected item from the drop-down selector.
         * @return the selected tree object.
        public Object getSelectedItem() {
            return selectedItem;
         * Sets the selected item in the drop-down selector.
         * @param selectedItem tree will expand and highlight this item.
        public void setSelectedItem(Object selectedItem) {
            this.selectedItem = selectedItem;
            String text = selectedItem != null ? selectedItem.toString() : "";
            itemField.setText(text);
            setToolTipText(text);
         * Overridden to enable/disable all child components.
         * @param enabled flat to enable or disable this component.
        public void setEnabled(boolean enabled) {
            itemField.setEnabled(enabled);
            super.setEnabled(enabled);
        public void addActionListener(ActionListener listener) {
            actionListeners.add(listener);
        public void removeActionListener(ActionListener listener) {
            actionListeners.remove(listener);
        // MouseListener implementation
        public void mouseClicked(MouseEvent e) {
        public void mouseEntered(MouseEvent e) {
        public void mouseExited(MouseEvent e) {
        public void mousePressed(MouseEvent e) {
        public void mouseReleased(MouseEvent e) {
            showPopup();
        private void initComponents() {
            setLayout(new GridBagLayout());
            itemField = new JTextField();
            itemField.setEditable(false);
            itemField.setText(selectedItem != null ? selectedItem.toString() : "");
            itemField.addMouseListener(this);
            add(itemField, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0,
                    GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
        private void showPopup() {
            final TreePopup popup = new TreePopup();
            final TreeComboBox tcb = this;
            final int x = itemField.getX();
            final int y = itemField.getY() + itemField.getHeight();
            int width = itemField.getWidth() + popupButton.getWidth();
            Dimension prefSize = popup.getPreferredSize();
            prefSize.width = width;
            popup.setPreferredSize(prefSize);
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    popup.show(tcb, x, y);
                    popup.requestFocusInWindow();
        private void fireActionPerformed() {
            ActionEvent e = new ActionEvent(this, ActionEvent.ACTION_PERFORMED, "TreeComboBoxSelection");
            for (ActionListener listener : actionListeners) {
                listener.actionPerformed(e);
        private class TreePopup extends JPopupMenu {
            private JTree tree;
            private JScrollPane scrollPane;
            public TreePopup() {
                initComponents();
                initData();
            private void initData() {
                if (treeModel != null) {
                    tree.setModel(treeModel);
            private void initComponents() {
                setFocusable(true);
                setFocusCycleRoot(true);
                tree = new JTree();
                tree.setRootVisible(false);
                tree.setShowsRootHandles(true);
                tree.setFocusable(true);
                tree.setFocusCycleRoot(true);
                tree.addTreeSelectionListener(new TreeSelectionListener() {
                    public void valueChanged(TreeSelectionEvent e) {
                        tree_valueChanged(e);
                scrollPane = new JScrollPane(tree);
                add(scrollPane);
            private void tree_valueChanged(TreeSelectionEvent e) {
                DefaultMutableTreeNode node = (DefaultMutableTreeNode) tree.getLastSelectedPathComponent();
                setSelectedItem(node.getUserObject());
                fireActionPerformed();
                this.setVisible(false);
    }My TreeComboBoxTableCellEditor:
    public class TreeComboBoxTableCellEditor extends AbstractCellEditor implements TableCellEditor, ActionListener {
        protected TreeComboBox treeComboBox;
        protected ArrayList<CellEditorListener> cellEditorListeners = new ArrayList<CellEditorListener>();
        public TreeComboBoxTableCellEditor(TreeComboBox treeComboBox) {
            this.treeComboBox = treeComboBox;
            treeComboBox.addActionListener(this);
        public Object getCellEditorValue() {
            return treeComboBox.getSelectedItem();
        public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
            treeComboBox.setSelectedItem(value);
            return treeComboBox;
        public void actionPerformed(ActionEvent e) {
            stopCellEditing();
    }Any thoughts?
    Edited by: MiseryMachine on Apr 3, 2008 1:21 PM
    Edited by: MiseryMachine on Apr 3, 2008 1:27 PM

    As I said, you have to have empty context elements before additional rows will be open for input.
    For instance if you want to start with 5 rows available for input do the following to your internal table that you will bind:
    data itab type standard table of sflight.
    do 5 times.
      append initial line to itab.
    enddo.
    context_node->bind_table( itab ).
    The other option if you need n number of rows is to add a button to the table toolbar for adding more rows. When this button is pressed, you add a new context element to the node - thereby creating a new empty row in the table.

  • Modifying a custom table

    i have added three new fields to a custom table. A lot of programs are using that table. Does it affect any of those or while transporting it to PROD it activates all those programs and displays the error if any such process

    Hi Deepthi,
    This can be an issue if the fields have been added in the middle of the structure in the table. Since if you are using commands like INTO TABLE (which does a field to field mapping) the program(s) would start dumping.
    I would suggest before you release the transport with the changes you test (by executing) programs which are using this table. Just a syntax check might not suffice.
    Aditya

  • Modifying the custom tables TBZ* generated by EEWB for BUPA?? Advisable?

    Hi,
    We have added new fields in BUPA using EEWB. The new fields are automatically added in the new section created on screen. Now our requirement is to move these fields to one of the existing sections and delete the new section. Is it advisable?
    I assume that in the EEWB extension wizard, we do not have any option of generating the new fields in existing custom sections. Please correct me if I am wrong.
    As per our current plan, To accomplish this change we are planning to modify the tables TBZ3H, TBZ3I, TBZ3C and TBZ3D for the view--> section --> screen mapping. Will that be enough or some more changes will be required?
    Also, a new BDT application is created for the new section and there are corresponding entries in TBZ0A, TBZ0B, TBZ0C and TBZ1F. Now we are not sure that if we modify/delete these entries, how the system would behave. Any pointers are welcome!!
    Specially for TBZ1F entries, should the new events function modules created for the new application be assigned to the already existing application.
    Please advise.

    http://scn.sap.com/people/rakesh.chugh/blog/2009/12/28/deletion-of-eewb-extensionproject-in-sap-crm-for-bupa
    Just in case you are looking for this info

  • Custom Table Control in VA21/22/23 Tranaction Issue

    Hi Friends,
    Working on SAP R/3 Release 4.6C.
    There is a custom Table Control in one of the screen of VA21 Transaction.
    My requirement is to insert one more Field/Column to this table Control.
    The following are the sequence of fields in Table Control.
    Column1
    Column2
    Column3
    Column4
    After Inserting the Field in the middle of Column1 and Column2.
    The Sequence of Table Control is getting Changed.
    The Table Control has to show like this.
    Column1
    Column2     "New Field which is added
    Column3
    Column4
    Column5
    But I'm getting as below
    Column5
    Column3
    Column2     "New Field which is added
    Column1
    Column4
    When executing the Table Control Screen in SE51 with Screen Name and Screen Number,I am getting the perfect output.
    When executing thro VA21/22/23, Iam getting sequence mismatch.
    Anyone come across this scenario. Please guide to solve this.
    Thanks.

    Solved.
    Thanks.

  • Regarding custom currency data element issue in custom Table.....

    Hello,
    I am currently working on creation of a Z custom table in SAP. There is data coming from
    mainframe for amount field in the form -9999.9999.
    To store data like this I am creating a custom Z data element with Z domain definition as follows:
    Data type; Curr
    No of characters: 5
    Decimal places: 4
    Sign box is checked.
    Now when I use this Z data elemnt for a firle in custom table, while activating, it asks for table refernce and table field. What do I give it here ?
    Please help.
    Regards,
    Jainam..

    Hi Jainam,
    very basic ABAP knowledge: A field of type CURR isn used to store a currency amount. Every currency field must be connected to a currency key of type CUKY.
    The same concept applies for quantities and units.
    You can spare a lot of trouble if you look at standard tables and programs, copy or use data elements and/or structures from standard.
    If you want to re-invent the world, you may need more than seven days.
    Regards,
    Clemens

  • Prompt for transport request if records are added/modified for custom table

    Hello Experts,
    A couple of questions,
    1. How do we prompt user to create a TR whenever he changes a record in my custom table
    via SM30? my custom table has a maintenance type of 'C' - customizing already.
    2. How do we transport the custom table contents to another client?
    Thank you guys and take care!

    Hello
    Regarding (1) just have a look at a standard maintenance view like V_T001W (SE11 -> menu Utilities -> Table Maintenance Generator ):
    Here you can see that the option Standard Recording Routine is chosen which is responsible for prompting for a transport request as soon as records of the table/view are changed.
    Regards
      Uwe

  • Creating Customized Table and Modify Table Maintenance Screen

    Hi,
    I have already created customized table and generate the table maintenance screen, however i encountered 1 problem which is i cannot add new PAI and PBO module in the flow logic. Every time i wanna add new module, i will be getting error message saying that my user currently editing the screen. Any suggestion ?
    Thanks.
    Jon

    Hi <b>Jonathan</b>,
    Please close all the windows and relogin
    For making PAI and PBO modules, Please activate all the Table and its maintainence view.
    Now first make emptu file with <main filename>_PAI and <main filename>_PBO save and activate them.
    Now put the logic in them and then activate now call these in the main prog.. it should work...
    While activation all the sub program modules should be activated already... i suggest select all the prog and sub progs and activate them all at once...so the system automatically takes care of inner activations first...
    If u have some more quereies... please feel free to contact me...
    Regards,,
    <b>Abhishek</b>

Maybe you are looking for