Entering data into custom table programmatically

Hi,
I want to send data in internal table to a custom Z-table through a report program. How can I do this?
Thanks in advance.

Hi
I have written this code:
LOOP AT it_status INTO wa_status.
      IF wa_status-m_typ = 'E'.
        wa_ztable-mandt = sy-mandt.
        wa_ztable-aufnr = wa_status-aufnr.
        wa_ztable-objnr = wa_status-objnr.
        wa_ztable-charg = wa_status-charg.
        wa_ztable-matnr = wa_status-matnr.
        wa_ztable-autyp = wa_status-autyp.
        wa_ztable-auart = wa_status-auart.
        wa_ztable-m_typ = wa_status-m_typ.
        wa_ztable-msg = wa_status-msg.
        wa_ztable-user_id = sy-uname.
        wa_ztable-date_occur = sy-datum.
        wa_ztable-aufnr = sy-uzeit.
        INSERT into zqm_qn_testorder values wa_ztable.
        CLEAR wa_ztable.
      ENDIF.
    ENDLOOP.
But the records are not appended.
The database table zqm_qn_testorder doesn't have a table maintainence generator created.
Is it require to create parameter transaction and then pass these vales by calling the transaction?
Thanks.

Similar Messages

  • 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 store the flat file data into custom table?

    Hi,
    Iam working on inbound interface.Can any one tell me how to store the flat file data into custom table?what is the procedure?
    Regards,
    Sujan

    Hie
    u can use function
    F4_FILENAME
    to pick the file from front-end or location.
    then use function
    WS_UPLOAD
    to upload into
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL FUNCTION 'F4_FILENAME'   "Function to pick file
        EXPORTING
          field_name = 'p_file'     "file
        IMPORTING
          file_name  = p_file.     "file
      CALL FUNCTION 'WS_UPLOAD'
       EXPORTING
         filename                       = p_file1
        TABLES
          data_tab                      = it_line
    *then loop at it_line splitting it into the fields of your custom table.
    loop at it_line.
              split itline at ',' into
              itab-name
              itab-surname.
    endloop.
    then u can insert the values into yo table from the itab work area.
    regards
    Isaac Prince

  • What is the transaction code to enter data into mkpf table

    Hi,
    I want to enter data into mkpf table but through a transaction code.
    What is the transaction code?
    Thanks.
    deniz.

    Hi,
    Go to SE16N transaction code.
    Now you enter the table name ex: u201CMKPF u201C, if u wants to insert the values.
    in Command bar
    you enter the transaction code u201C &SAP_EDIT u201D. 
    Press enter.
    Then click on execute button. 
    Now here I would like to change some data.
    Here we can do any operation in application tool bar.
    Enter values
    And click on save button.  
    Regards,
    Sujit

  • Mass upload of data into Custom table

    Hello all,
                I made search in SDN and could not find the best solution to my problem and hence posting .
               What is the best way for Mass upload of data into Custom database table ?
               I think LSMW would not be a viable option as it would take longer time .
               Locking of the table also needs to be taken care.
               PLease let me know if you have a alternative to this and the best way to do this .
    Comradely,
    K.Sibi

    Hi Sibi,
    See Lock objects are required when we enter the data through screen level, or multiple users should not enter the data at same time.
    Create one Lock object in SE11, It automatically creates FM.
    DEQUEUE_EYTEST2                Release lock on object EYTEST2
    ENQUEUE_EYTEST2                Request lock for object EYTEST2
    Call these FM in your program.
    EX: Refer this links
    1 http://help.sap.com/saphelp_nw70/helpdata/en/41/7af4c8a79e11d1950f0000e82de14a/content.htm
    2 http://wiki.sdn.sap.com/wiki/display/Snippets/lockingandunlockingofthe+tables
    Rgds
    Aeda

  • Customer master creation or entering data into customer master.

    Hi Friends
    Can any give good example to create customer master from Account group to entering customer master data? so that to move forward.
    Thanks in advance.

    2.1     Customer Master
    2.1.1     Account Group
    2.1.1.1       Maintain Number Range for Account Group
    Use
    The purpose of this activity is to control number range of Account Group.
    Procedure
    Access the activity using one of the following navigation options:
    IMG --> Financial Accounting (New) --> Accounts Receivable and Accounts Payable --> Customer Accounts --> Master Data --> Preparations for Creating Customer Master Data --> Create Number Ranges for Customer Accounts --> Select the Icon to maintain Number Range
    Transaction Code: SPRO
    Data to be maintained:
    No | From      | To | Current No | Ext (Tick in Check Box)
    01 | 0000000001 | 0000099999 | 0 | No
    02 | 0000100000 | 0000299999 | 0 | No
    XX | A | ZZZZZZZZZZ |      Yes
    2.1.1.2       Assign Number Range to Account Group
    Use
    The purpose of this activity is to maintain number range of Account Group.
    Procedure
    Access the activity using one of the following navigation options:
    IMG > Financial Accounting (New) > Accounts Receivable and Accounts Payable > Customer Accounts > Master Data > Preparations for Creating Customer Master Data > Assign Number Ranges to Customer Account Groups
    Transaction Code     : SPRO
    Data to be maintained:
    Group | Name | Number Range
    0001 | Sold-to party | XX
    0002 | Goods recipient | XX
    0003 | Payer | XX
    0004 | Bill-to party | XX
    2.1.1.3       Define Account Groups with Screen Layout (Customers)
    Use
    In this step, you determine the account group of the customer.
    Procedure
    Access the activity using one of the following navigation options:
    IMG > Financial Accounting (New) > Accounts Receivable and Accounts Payable > Customer Accounts > Master Data > Preparations for Creating Customer Master Data > Define Account Groups with Screen Layout (Customers)
    Transaction Code     : SPRO
    The groups indicated below are a few examples. There are many groups in Standard SAP & if we require additional Group, it can be copied from appropriate group & maintained.
    Group | Name
    0001 | Sold-to party
    0002 | Goods recipient
    0003 | Payer
    0004 | Bill-to party
    0005 | Prospective customer
    0006 | Competitor
    Select Sold-to-party > go to Details > Double Click on General data / Company code data / Sales data. It will take to next screen which details Tab Pages of General data / Company code data / Sales data. Double Click on Tab Page for example: Address, Control, Marketing & so on. Here you can maintain whether the field is to be Suppress, Req. Entry, Opt. entry or Display
    2.1.2     Process to Create Customer Master
    2.1.2.1     Initial Screen of Customer Master Maintainance
    Use
    The purpose of this activity is to maintain Customer Master Data. Customer Master Can be created for Sales & Distribution, in which it will be possible to maintain General Data Tab & Sales Area Tab. Alternatively it is also possible to maintain Complete / FI, in which it is possible to maintain General Data, Company Code Data & Sales Area Data (Complete) or General Data & Company Code (F1)
    Procedure
    Access the activity using one of the following navigation options:
    SAP Easy Access >      Logistics > Sales and Distribution > Master Data > Business Partner > Customer > Create > Sales and Distribution / Complete
    Transaction Code     : VD01 / XD01
    Fields to be maintained in Initial Screen (referring Complete):
    Field - Functionality
    Account Group - Take a drop down & select appropriate Account Group
    Customer     Enter manually
    Company Code - Take a drop down
    Sales Organization - Take a drop down
    Distribution Channel - Take a drop down
    Division - Take a drop down
    A Customer can be created with reference to an existing Customer & necessary data can be changed.
    Reference
    Field - Functionality
    Customer - Enter manually
    Company Code - Take a drop down
    Sales Organization - Take a drop down
    Distribution Channel - Take a drop down
    Division - Take a drop down
    2.1.2.2     General Data of Customer Master Maintenance
    Use
    The purpose of this activity is to maintain General Data. General Data is applicable to the customer centrally. Incase of extending Customer to another Sales Area, General data will remain the same.
    Procedure
    Fields to be maintained are as under:
    <u>ADDRESS</u>
    Field - Functionality
    Title - Take a drop down
    Name - Enter manually
    Search Term - Enter Manually (Optional)
    Street - Enter Manually (Optional)
    House No - Enter Manually (Optional)
    Postal Code - Enter manually
    City - Enter manually
    Country - Take a drop down
    Region - Take a drop down
    <u>Control Data</u>
    Field - Functionality
    Vendor - Enter Manually (Optional) – To establish Customer Vendor Relationship.
    Trading Partner - To be maintained incase of Inter-company Customer,
    The above is for Illustration purpose. Please ensure to maintain the fields required.
    2.1.2.3     Company Code Data of Customer Master Maintenance
    Use
    The purpose of this activity is to maintain Company Code Data. This is maintained by an FI person.
    Procedure
    Fields to be maintained are as under:
    <u>Account Management</u>
    Field - Functionality
    Recon. Account - Take a drop down (Mandatory)
    <u>Payment Transaction</u>
    Field - Functionality
    Terms of payment - Take a drop down.
    The above is for Illustration purpose. Please ensure to maintain the fields required.
    2.1.2.4     Sales Area Data of Customer Master Maintenance
    Use
    The purpose of this activity is to maintain Company Code Data. This is maintained by an FI person.
    Procedure
    Fields to be maintained are as under:
    <u>Sales</u>
    Field- Functionality
    Sales Office - Take a drop down & maintain the appropriate SBU
    Currency - Maintain the local / export currency.
    Exch. Rate Type- Maintain ‘M’, incase of export / inter-company(if required) only.
    Cust. Pric. Proc -This is maintained to pick the pricing procedure in Sales Order & Billing Document. It should always be maintained.
    Customer Stat. Gr - This is recommended to be maintained to enable the data to flow to SAP standard report.
    <u>Shipping</u>
    Field -Functionality
    Delivery Priority - Take a drop down & maintain the appropriate for Delivery purpose.
    Order Combination - Maintain the tick
    Shipping Condition -Take a drop down & maintain the appropriate for Delivery purpose.
    Delivery Plant - Take a drop down & maintain the appropriate Plant.
    <u>Billing</u>
    Field - Functionality
    Incoterm - Take a drop down & select. Maintain the Description manually.
    Terms of payments -Take a drop down & select.
    Account assignment Group -Take a drop down & maintain the appropriate. This is very important to be maintained, else it will give an error to release the billing document to accounting.
    Tax - Take a drop down & select ‘0’ or appropriate.
    The above is for Illustration purpose. Please ensure to maintain the fields required.
    Regards,
    Rajesh Banka
    Reward points if helpful

  • Need help with entering data into a table.

    I just created a table, but I can't enter information.  I don't want the data linked to a datasource.  I just want it to save to the form like all of the other fields.

    Even when I create a simple table, no ability to enter information.  Please help.  I know this must be a simple answer, but surprised that there is no response.

  • Error Message when entering data into a table from an array

    When i use the following:
    stmt.executeUpdate("INSERT INTO Car " + "VALUES (" + temp + ", " + carData[0] + ", " + carData[1] + ", " + carData[2] + ", " + carData[3] + ", " + carData[4] + ", " + carData[5] + ", " + carData[6] + ", " + carData[7] + ", " + carData[8] + ", " + carData[10] + ", " + carData[11] + ", " + carData[12] + ", " + carData[9] + ", " + carData[13] + ", " + carData[14] + ", " + carData[15] + ", " + carData[16] + ", " + carData[17] + ", " + carData[18] + ", " + carData[19] + ", " + carData[20]+")");
    i get the following error message:
    SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'Audi A2 (Standard & SE)'.
    where: 'Audi A2 (Standard & SE)' is the value stored in carData[4].
    Can anyone help?

    You need to enclose carData[0],carData[1] etc in single quotes, if they are String(s). Otherwise you can use PreparedStatement.
    PreparedStatement ps = con.prepareStatement("Insert into car values(22 questions marks)");
    ps.setInt(1,temp);
    for(int i=0;i<21;i++) ps.setString(i+2,carData[ i ]);
    int count=ps.executeUpdate();
    Sudha

  • R12 - Approach to Insert into custom table after payment is done

    Hi,
    I have a requirement to insert into a custom table after invoice payment in R12. Code units are already in place to load data from ap tables to custom one.
    I have identified 2 ways in which this can be done:
    1. Call from the business event oracle.apps.ap.payment
    2. Call after the program 'Send separate remittance advice' completes, again as a business event after the concurrent program completes i.e. to use 'Request Completed' business event.
    My questions are as below:
    1. Is there any other way in which I can write to a custom table after payment is done
    2. How else can after report trigger be fired for SRA in R12 (without customizing the standard SRA java conc pgm)
    3. When exactly business event 'oracle.apps.ap.payment' will be fired? Will it be fired for all payments irrespective of the way payment is done like thru PPR, payment workbench, etc?
    Please share your thoughts on this.
    Thanks,
    Kavipriya

    in our case, we have created a database trigger on IBY_PAY_INSTRUCTIONS_ALL, to insert the requisite data into custom tables whenever the payment status is "Ready for Printing"

  • How the data is entered  in the customized table

    Hi,
    In implemenation scenario when we create generic extraction ,   how the data is entered
    in the customized table if it is huge data  ( around 5000 records)
    Regards,
    Vivek

    Hi Vivek,
    Follow bellow steps:
    1.Goto RSO2.
    Choose Datasource from bellow of Three
    a). Transaction Data
    b). Master data Attributes
    c). Master data Text
    2.Specify Application component(SD/MM..)
    3.There are three extraction methods to fill datasource.
    4.Select extraction method extracts the data from a transparent table or database view.
    5.Select Extraction from View, then we have to create the View.
    a).Specify the view name.
    b).Choose the view type (Database view) from bellow mentioned views.
    i). Database view.
    ii). Projection view.
    iii).Maintainance view.
    iv). Help view.
    6. Specify Tables and Join Conditions and define view fields.
    7. Assign View to Datasource
    8. Once you specify view in Data source, the extract structure will generate.
    9. you can check the data in RSA3.
    Regards,
    Suman

  • How  to  insert data into custom database table from an hcsf

    i want to insert data into database table that i have created from an hcsf.
    example :
    say i have created a table in oracle database and i hav created a hcsf file.now i want that when somebody fills in that hcsf and click submit ,i want that entries should be updated in my database table.
    plzzz reply ASAP(it's urgent)

    you'll need a bit of Java code... extract the data during a check-in filter, and insert it into the database.
    check out the "DataAccess" component in the HowToComponents for query-running examples, and the "DynamicPrefix" component for a check-in filter example.
    I have older copies here:
    http://bezzotech.com/library

  • Inserting data into one table using another table

    Hi i have 2 tables
    CREATE TABLE N_SET
    N_ST_ID NUMBER(38) NOT NULL, ---- PK
    N_ST_NM VARCHAR2(50 BYTE) NOT NULL,
    N_ST_DSC VARCHAR2(200 BYTE),
    DFTID NUMBER ------ FK
    CREATE TABLE RZ
    NST_ID NUMBER(38) NOT NULL, ---- FK
    RID NUMBER(38) NOT NULL, --- PK
    RNM VARCHAR2(30 BYTE) NOT NULL
    I entered the data into the N_SET table using sequence in column N_ST_ID (using procedure)
    Now i need to enter the data into RZ table where NST_ID should contain the value of N_SET.N_ST_ID
    so for this i've written another procedure
    but confused how to write the select statement to retrieve the above condition..
    Could you help me in this please...

    Hi,
    I have a table Target whose structure is
    create table employee
    id VARCHAR2(20),
    name VARCHAR2(20),
    employee_seq NUMBER not null
    -- Create sequence
    create sequence test_seq
    minvalue 1
    maxvalue 999999999999999999999999999
    start with 5
    increment by 1
    nocache
    cycle;
    create table emp
    id VARCHAR2(20)
    name VARCHAR2(20)
    INSERT INTO emp
    ( id, name )
    VaLUES ( '100','test1');
    commit;
    INSERT INTO emp
    ( id, name )
    VaLUES ( '100','test2');
    commit;
    i have to insert into the TARGET table the fsa value from
    SOURCE table along with the sequence number using sequence test_seq.nextval.
    INSERT INTO employee
    ( id, name, employee_seq )
    SELECT id, ename, ( select test_seq.nextval from dual )
    FROM emp ;

  • How to insert data into a table only when data has changed its value (when compared to the previous inserted value)

    I wish to insert data into a table only when the value of the inserted data has changed. Thus, in a time series, if the value of the data at time, t-1, is 206 then if the data to be inserted at time t is 206, then it is skipped (not entered).
    If the value of the data at time t+1 is 206, it is skipped also; until the value changes, so if the value at t+1 was 205, then that would be inserted, and if at time t+2 the data is 206, it would be inserted too.
    What is the best way to do it without increasing overheads?

    This view works:
    SELECT
    i.IDNO,i.[Date],i.[Level]
    FROM
    mytable i
    INNER
    JOIN mytable
    d
    ON
    d.IDNO
    = i.IDNO-1
    WHERE
    i.[Level]
    <> d.[Level]
    on this mytable below.  A trigger could be quite useful here although I am cautious using them. However I wish to avoid the overhead by not having a temp table (which could be sizable).  mytable below
    should give 3 lines. The IDNO is an identity column.
    IDNO
    Item
    Date
    Level
    1
    X24
    12/23/13 10:41
    22996
    2
    X24
    12/23/13 10:41
    22996
    3
    X24
    12/23/13 9:21
    23256
    4
    X24
    12/23/13 9:21
    23256
    5
    X24
    12/23/13 9:22
    23256
    6
    X24
    12/23/13 9:22
    23256
    7
    X24
    12/23/13 9:22
    22916

  • How to input data into a table with columns?

    I am trying to input data into a table.  My table have 5 columns and an unlimited amount of rows.  I created a program in LabView that enters the data into the table but it enters all of the data in one row.  I would like to enter the first set of information into the first column, the second set of info into the second  column and so on.  I am including a copy of the program that I am working with.  I would like the number of runs to be put into the first column (it should count down like number 5 in first row, number 4 in second row, number 3 in third row, and so on).  I would like the applied voltage to be placed in the second column, and so on.  Any help or information will be greatly appreciated.  I am working with LabView Version 6.1 and 8.0.  I am submitting the vi from 6.1. 
    Attachments:
    FJ-PROGRAM.vi ‏68 KB

    Pondered,
    I looked at your code and I think you might be making things too complicated. I've included a very simple example that demonstrates how to write a 2D array of integers to a table. Hope you find this helpful. It is in LV 7.1.
    Chris C
    Chris Cilino
    National Instruments
    LabVIEW Product Marketing Manager
    Certified LabVIEW Architect
    Attachments:
    rows - columns.vi ‏17 KB

  • Inserting Data into nested table

    I am exploring the differences between OBJECT & RECORD.
    As i am still in process of learning, I found that both are structures which basically groups elements of different datatypes or columns of different datatypes, one is used in SQL and other is used in PL/SQL, please correct me if I am wrong in my understanding.
    Below i am trying to insert data into an table of type object but i am unsuccessful can you please help.
    CREATE OR REPLACE type sam as OBJECT
    v1 NUMBER,
    v2 VARCHAR2(20 CHAR)
    ---Nested Table---
    create or replace type t_sam as table of sam;
    --Inserting data----
    insert into table(t_sam) values(sam(10,'Dsouza'));
    Error Message:
    Error starting at line 22 in command:
    insert into table(t_sam) values(sam(10,'Dsouza'))
    Error at Command Line:22 Column:13
    Error report:
    SQL Error: ORA-00903: invalid table name
    00903. 00000 -  "invalid table name"
    *Cause:   
    *Action:

    Ariean wrote:
    So only purpose of equivalent SQL types concept of nested tables is to use them as one of the data types while defining an actual table?
    Sort of - you can definitely use them for more than just "defining an actual table". (I'm fairly certain you could pass a nested table into a procedure, for example - try it, though - I'm not 100% sure on that - it just "makes sense". If you can define a type, you can use it, pass it around, whatever.).
    Ariean wrote:
    And that nested table could be a record in SQL or an Object in PLSQL or just simple datatype(number,varchar etc)?
    Nested tables are just like any other custom data type. You can create a nested table of other data types. You can create a custom data type of nested tables.
    It could get stupidly .. er, stupid O_0
    CREATE TYPE o_myobj1 AS object ( id1   number, cdate1  date );
    CREATE TYPE t_mytype1 AS table of o_myobj1;
    CREATE TYPE o_myobj2 AS object ( id2   number,  dumb  t_mytype1 );
    CREATE TYPE t_dumber AS table of o_myobj2;
    O_0
    Ok, my brain's starting to hurt - I hope you get the idea
    Ariean wrote:
    Secondly is my understanding correct about OBJECT & RECORD?
    I can't think of any benefit of describing it another way.

Maybe you are looking for

  • Error 1003 occurred at ABAPI Dist Chg and Save VIs.vi

    I used to be able to build executable file for my application. However when I upgrade to LV8 and try to build executable file, I got the following message. Error 1003 occurred at ABAPI Dist Chg and Save VIs.vi -> ABAPI Dist Build LLB Image.vi -> ABAP

  • HELP CAN'T FIGURE OUT HOW TO USE CONVERTORS

    Help I got 5th generation ipod for christmas. I have been trying to use convertors for movies but having no luck. Which is the best and easiest to use. Think I must be thick. Please help.

  • PHDs on multiple computers, NHDs on others

    I'd like to set up a system in which each user has one (or perhaps more than one, if possible) computer on which they use a portable home directory, but I'd like to allow them to log in from other people's main machines using their network directory.

  • Deployed Webdynpro content

    Hi All,    i have created one webdynpro iview using NWDS and i deployed through sdm.    After that i checked under webdynpro--> content administrator and i found the deployed content. Now if i want to find the deployed webdynpro ivew in portal under

  • Flash 9 download not working on my Mac 10.4.10

    The download starts and then I get a message that it can not open the ....dmg file; the associated helper application (it would be nice if it told me which one) does not exist. Change the association in your preferences (change to what? where and how