Ztables or  custom tables

hi to all abap gurus
my querry os as follows
have u ever created ztables so far . if so pls tell some situtations (scneraios) where u have created z tables . it is one of the interview question asked ?
pls tel, in deatail . points will be rewred for good answers .

Hi,
Generally when we are developing some Z transactions with our own data
then we create our Own Z TABLES and use them.
For particular business process specific to client requirement we create table
& view.
For example:
The client would not post the invoices directly into MIRO , Instead would require a table in which the details can be stored . In a predefind time interval,The end user would upload the details from the table to the MIRO which will be done through a program deve.loped by us....
Regards,
Priyanka.

Similar Messages

  • Custom Transaction for maintence of custom table

    hi friends,
                i have created a custom table. and for it i need to have a custom maintenence transactions.the custom transaction should consits of insert, copy a row and upload....
    but i dont think we have an upload feature in SM30,
    now my doubt is how can I solve  this,,, by  any other method & dilaog program being my last priority.
    Please let me know if u guys get some idea
    Thanks  in advance
    Tina

    Hi
    U can use the fm GUI_UPLOAD to read and store the file in internla table, after transfer the data from internal table to database table. This is an example:
    PARAMETERS: P_FILE(120).
    DATA: FILENAME TYPE STRING.
    DATA: T_FILE LIKE TABLE OF <ZTABLE>.
    START-OF-SELECTION.
      FILENAME = P_FILE.
      CALL FUNCTION 'GUI_UPLOAD'
           EXPORTING
                FILENAME = FILENAME
           TABLES
                DATA_TAB = T_FILE.
      INSERT <ZTABLE> FROM T_FILE.
    You can use this program only if the file have the same structure of Z-TABLE, otherwise you have to elaborate the data of T_FILE before inserting in the database.
    Max

  • 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

  • File to SAP R/3 custom table using PI

    Hi ,
    Any once can help me with File to Custom table updation possibilities using PI.
    Regards,
    Kiran

    Hi Kiran,
    You can do like I mentioned in the above blog.
    Also would suggest not to write to the database directly from PI. Ask an abaper or yourself write a code like an ZBAPI through which you can send data to the table. Then in that case you need to send data to ZBAPI like file - xi - rfc scenario.
    One more possibility is you can create a proxy and then send data to proxy and then let the proxy upload the data in the ztable.
    If you have any specific questions you can ask here.
    Regards,
    ---Satish

  • Unable to delete last entry in Custom table

    Hi,
    I have one custom table which allows only some specific entries to be maintained in the table.I have used a standard table as a check table for dis.I found no issue while maintaining entries in the table.But when i try to delete the last entry in the table i get the message "No entry exist".Long textNo entries were found when importing data from the database.
    Kindly help.

    Hi,
    If it is not possible through table maintainence then write a small Z program to delete the entries in devlopment system and then if then if you want you can transfer those to other systems.
    delete from ZTABLE where {give your condition for the last record}.
    Regards,
    Sandipan

  • Clearing Custom Table

    I have a custom table ztable, what is the best way to clear all contents ?

    megan,
        u can clear the custom table but deleting the contents.
    Go to SE11>give the table name->press F6 function key(change)--->give ctrlshiftF10 key -
    >execute, it will show the contents.
    there is an option to select all the contents and the delete button is also available in the menu.
    hope this helps u.
    Regards...
    Arun.

  • Inserting a single field in a custom table

    hi all,
    can u tell me hw could i insert a single field in the custom table.
    i have abt 6 fields in the custom table.
    5 fields are already populated...
    i have to insert one field ..i dont want to use insert statement.
    thanx in advance

    HI,
    You can use UPDATE statement
    UPDATE ztable SET SIXTH_FIELD  = 'value'
                  WHERE key_field = 'asdf'.
    Thanks
    Naren

  • How to populate date & time when user enter data for custom table in sm30

    Can anyone tell me How to populate system date & time when user enter data for custom table in sm30..
      Req is
      i have custom table and using sm30 user can enter data.
    after saving date i want to update date & time in table
    Pls let me know where to write the code?
    Thanks in Advance

    You have to write the code in EVENT 01 in SE54 transaction. Go to SE54, enter your Ztable name and in the menu 'Environment-->Events'. Press 'ENTER' to go past the popup message. In the next screen, click on 'New Entries'. In the first column, enter 01 and in the next column give some name for your routine(say UPDATE_USER_DATE_TIME). Then click on the souce code icon that appears in blue at the end of the row. In the code, you need logic like below.
    FORM update_user_date_time.
      DATA: f_index LIKE sy-tabix.
      DATA: BEGIN OF l_total.
              INCLUDE STRUCTURE zztable.
      INCLUDE  STRUCTURE vimtbflags.
      DATA  END OF l_total.
      DATA: s_record TYPE zztable.
      LOOP AT total INTO l_total.
        IF l_total-vim_action = aendern OR
           l_total-vim_action = neuer_eintrag.
          MOVE-CORRESPONDING l_total TO s_record.
          s_record-zz_user = sy-uname.
          s_record-zz_date = sy-datum.
          s_record-zz_time = sy-uzeit.
          READ TABLE extract WITH KEY l_total.
          IF sy-subrc EQ 0.
            f_index = sy-tabix.
          ELSE.
            CLEAR f_index.
          ENDIF.
          MOVE-CORRESPONDING s_record TO l_total.
          MODIFY total FROM l_total.
          CHECK f_index GT 0.
          MODIFY extract INDEX f_index FROM l_total.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " UPDATE_USER_DATE_TIME
    Here ZZTABLE is the Z table and ZZ_USER, ZZ_DATE, and ZZ_TIME are the fields that are updated.

  • How to cpature hard deletes in custom table?

    Hello Team,
    We have custom table in SAP attached to the application tcode.
    As per business requirement, user can delete few items in transacation( hard deletes).
    We are planning to delete these records from custom table if user delete them in Tcode. However the we need track all of these deleted records.
    Since the record physically deleted from this table, please let me know how to capture the deleted record.
    I heard about CDPOS and CDHDR not sure this table has deleted records. and also DBTABLOG as well.
    What is main diffrence between CDPOS/CDHDR with DBTABLOG interms tracking these deleted records. Our basis team recommending not use DBTABLOG table, since its huge table and its hard for them to archvie.
    Like to listen expert advices.
    Thanks
    Angelo

    Rob,
    Do you want me write Z program to read hard deletes from DBTABLOG and update another Ztable that stores only delted records/
    Pls advice,
    Thanks
    Angelo

  • ALE/IDOC[custom table transfer]

    Hi All,
    I have a doubt regarding the type of programs used to post the idocs using ALE in the outbound process.
    Please also tell me which program I will use to post a custom table of mine to another server using ALE/IDOC.
    Please also tell me the procedure to do the same mentioned above.
    Please help. Its a urgent requirement...........................
    Thanks in advance......................................................

    Hi Guru,
    if you cannot use a standard idoc then you´ll need to create a custom one starting from the segment (WE31) where you can create an Idoc segment starting from your own Z table structure using the wizard.
    Then you´ll need to also create the idoc type (WE30) and link the segment to the IDoc.
    Then you´ll need to create a message type and link the message type to the Idoc type (WE81, WE82).
    Then you´´ll use RFC "MASTER_IDOC_DISTRIBUTE" to populate the IDOC and send the data.
    This is a sample code just to give you an idea:
    DATA:          
      Z_SEGNAME(7) TYPE C VALUE 'SEGMENT',
      Z_MESTYPE(9) TYPE C VALUE 'MESSAGE',
      Z_IDOC_TYPE(8) TYPE C VALUE 'IDOC'.
    DATA:
      IDOC_CONTROL LIKE EDIDC,
      T_COMM_CONTROL LIKE EDIDC OCCURS 0 WITH HEADER LINE,
      IDOC_DATA LIKE EDIDD OCCURS 0 WITH HEADER LINE.
    *Reads data from Z table
    SELECT *
    FROM ZTABLE
    INTO TABLE L_ZTABLE.
    *Set the control data info required for the distribution
    IDOC_CONTROL-MESTYP = Z_MESTYPE.
    IDOC_CONTROL-DOCTYP = Z_IDOC_TYPE.
    *Populate the IDoc
    LOOP AT L_ZTABLE.
      CLEAR IDOC_DATA.
      IDOC_DATA-SEGNAM = Z_SEGNAME.
      IDOC_DATA-SDATA = ZTABLE.
      APPEND IDOC_DATA.
    ENDLOOP.
    *Deliver the IDOC as defined in distribution model/partner profile
    CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE' IN UPDATE TASK
      EXPORTING
        MASTER_IDOC_CONTROL          = IDOC_CONTROL
      TABLES
        COMMUNICATION_IDOC_CONTROL     = T_COMM_CONTROL
        MASTER_IDOC_DATA               = IDOC_DATA
      EXCEPTIONS
        ERROR_IN_IDOC_CONTROL               = 1
        ERROR_WRITING_IDOC_STATUS          = 2
        ERROR_IN_IDOC_DATA               = 3
        SENDING_LOGICAL_SYSTEM_UNKNOWN      = 4
        OTHERS                         = 5.
    IF sy-subrc = 0.
      COMMIT WORK.
    ENDIF.

  • ALE/IDOC[custom table]

    Hi All,
    I have a doubt regarding the type of programs used to post the idocs using ALE in the outbound process.
    Please also tell me which program I will use to post a custom table of mine to another server using ALE/IDOC.
    Please also tell me the procedure to do the same mentioned above.
    Please help. Its a urgent requirement...........................
    Thanks in advance......................................................

    hi,
    u can do it using CHANGE POINTERS method.For this u need to do the following configurations.
    1>WE81
    2>WE31
    3>WE30
    4>WE82
    5>SCDO
    6>BD61
    7>BD52
    8>BD50
    9>BD60
    10>WE20
    11>BD64.
    First create an object in tcode -SCDO,there u specify ur tablename.
    now the fields which are there in the ztable,in the further characteristics of the dataelement u need to check the check box CHANGE DOCUMENT HEADER.Now in SCDO u need to generate the upgarde program,the sap will generate four includes,u need to call them in ur program.
    U need to write one FM ,where u need to use the FM's.
    CHANGE_POINTERS_READ,
    CHANGE_POINTERS_STATUS_WRITE.
    Regards,
    nagaraj

  • Update ztable from database table directly

    hi all,
    can u tell me the possible ways to update a ztable from database table directly.
    i mean is there anyway to update ztable whenever entry is created in database table .
    i dont want to update using insert,modify statements.
    points will be rewarded to all hlpful answers.

    A slightly dirty solution:
    Use SAP functions for reading from CDHEADER and CDPOS tables [with enough filters such that you extract minimum records possible] to read changes to MARA table fields since last run of your program. Use this information to update your ZTABLE. I would recommend having a table maintainance generator on ZTABLE. The actual update should be by a BDC by calling transaction SM30 for ZTABLE maintainance. Now the program may be set up as a batch job running 1ce an hour. You get updates to the extent of 1 hour latency.
    Alternatively, you may look if an opportunistic BADI / user Exit is there alongside MM01/02 transactions - assuming the latter are the only ones updating MARA. In this BADI you may write the code to update ZTABLE- again, look to do it by BDC call transaction sm30 to maintain ZTable. To lighten up the code -load on BADI you may simply raise a custom event and move on. You will configure a job that runs your program when that particular event is raised. This will need the 'burden' of figuring out the changes, though.
    An elegant way would be to fire a MATMAS fIDOC for every change to Material, capture that and turn back the changes to ZTABLE. This will facilitate the delta load.

  • Problem in adding custom table's field in MM46

    Hi,
    I have a complex requirement of adding fields of custom table in MM46 for mass maintance.
    I did most of the part but dont know what is missed.
    Steps that i followed
    1. used tcode MASSOBJ- I Added Ztable name to application table for Object type - BUS1001001.Here i dont know what to provide in other attributes of entry example Number, DB table etc. [SCREENSHOT OF MASSOBJ|https://plus.google.com/photos/114088763388693559922/albums/5704943614516268609]
    2. Used tcode OMSR- I added entry of Ztable'field  here i gave selection group as 211, maint status as KDEVALBQPSZXCFG
    alv group- blank. [screen shot of OMSR |https://plus.google.com/photos/114088763388693559922/albums/5704943614516268609]
    After doing these steps Table name and field of table is visible in mm46. But problem is  Field is not editable that is in display mode only. 
    Pleae see this snapshot - [error image|https://plus.google.com/photos/114088763388693559922/albums/5704938582830478801]
    Please help me by telling what i missed and am i adding right attributes for entries in MASSOBJ AND OMSR?
    Thanks.
    Waiting for expert's comments.
    Reagards
    Rahul
    Please do not use words like 'urgent'
    Edited by: Rob Burbank on Feb 3, 2012 11:31 AM

    Hi Rahul,
    Wellcome to SDN. Perhaps you know it, and although it's for older releases, perhaps it could help you. Please, see SAP Note 381942 - Mass changes for logistics data in the article master.
    I hope this helps you
    Regards
    Eduardo

  • Customizing table Changes to another system

    Hello all,
    When ever changes occurred to  personnel area HR table T500P then the changes needs to be replicated in  another system.
    how to capture the change log details?
    Please provide the inputs.
    Regards
    Aravind

    Hi,
    First  : In the table T500P , some of the field data elements dont have change log checked. so we will not able to use  CDHDR and CDPOS  table. I have to capture all the changes for this table.
    Second: technical setting of the table has data log change check box is ticked but SCU3 is not activated . so this one also we can't use .
    Third: Transporting data from on system to another system:For this  there is no T500P table exist in the SRM system.
    could you please elaborate how to use this step? 
    Fourth:
    1. creating Ztable as copy of T500P  and update the ztable with T500P data.
    2. write events for this table to update T500P and also trasfer the data.
    but thing is we should have to maintain custom table . If T500p changes then  it  will not update the ztable.
    Fifth: I came to know that there is one message type "CONDA2"  for Synchronizing Customizing Data Between Systems.
    but don't know the procedure to get the complete solution.
    Please provide your inputs..
    Regards
    Aravind.

  • Setting a default initial value to a CHAR type field in a custom table

    Is it possible to set a default initial value to a field in a customer table(Ztable) that is not SPACE?  SAP sets the initial value to " " space for datatype CHAR.
    I am looking at creating a field in a table that would always default to 'X' on creation of a new row.
    Your response is appreciated..

    Hi,
    I believe this cannot be done..
    If you are inserting the row through a program then you can insert the field value to be 'X'.. If the value is not passed ..Then it will be blank..
    If you are using table maintenance then in the PAI ..you can insert values..
    Thanks,
    Naren

Maybe you are looking for

  • Video from iPhone to iMovie on Mac and quality issues

    Task:  Wanting to take video from my iPhone 5 into iMovie HD Version 6.0.3 to do some editing, trimming, transitions, etc.  I have done this on many occasions but have NEVER been able to share/export the finished product with any kind of quality resu

  • English Version for field description in CO reports

    Hi, I am using a standard SAP report from CO -> example : S_ALR_87013599. However, when logon in English version, the fields description are not in English. Some other reports do not have this problem. When I logon in Chinese language, it is ok. The

  • Mail does not work after yosemite upgrade

    I have two iMac desktops, one iMac 27" bought this year and another iMac 24" bought four years ago. I applied the Yosemite upgrade for both they were both running the Maverick with no problem at all), the new one works flawlessly but the old one has

  • Oracle 10g Forms Download

    Hi, I need to download Oracle 10g Forms and Reports. What all will I have to download alongwith besides the Oracle Database 10g. Will I also have to dowload Applications Server for Forms, Web util services for forms etc. or anything else. Please guid

  • Adding time stamp while archiving the file in b2b

    Hi I want to add the time stamp when archiving the file when I am using file/ftp channel. can anybody tell me how can I do that. otherwise it is overwriting the exising file in archive directory. Thanks Sri