Delimiting the record in custom table

Hi,
I have a cretaed a custom table with the from and to date fields.
In my requirement the date should be delimited to the new date and it should not overlap.
Eg:if the user gives input as below
A   B   01.01.2009   31.12.2010
A   B   01.01.2010    31.12.2010
then the table entries should be delimited to
A   B   01.01.2009   31.12.2009
A   B   01.01.2010   31.12.2010.
Can any one pls help me in this requirement.
Thanks,
Raju

Hi Chetan,
This is the custom BAPI they used in the existing program.
    Generate the sales order
      CALL FUNCTION 'Z_V57_BAPI_SALESORDER_CREATE'
           EXPORTING
                order_header_in     = itab_header
                testrun             = p_test
                business_object     = w_busobj
           IMPORTING
                salesdocument       = w_vbeln
           TABLES
                return              = itab_order_msg
                order_items_in      = itab_detail
                order_partners      = itab_partner
                order_schedules_in  = itab_schedule
                order_conditions_in = itab_conditions.
Here itab_detail table has the two fields VRKME and WAERK, Custom table also have these 2 fields. here i have to populate these values to custom table.
here i am not able to find where there are populating to custom table .
Regards,
Satish.

Similar Messages

  • How to delete the records from custom table???

    My requirement is,
    I have a custom table, assume as ZABC, I have updated this by my custom program, This data having table can be extracted by BI etract program(Assume ZZZ). Here I am not writing any code for extracting data from table to BI extract program, That they will do by BI extract program. But I want to write the code for
    <b>Cleanup of Z table—delete records 30 days after the BI data extractor has run.</b>
    How this is possible suggest me any method having for these???
    Thanks Sanju

    Hell Sanjana,
    Ask your basis people to do the clean up after  30 days. If you want the clean up only to be done 30 days after BI extract has been done, then u need some sort of indicator to say that BI Extract has been done , like  flag and date in a custom table which will be set as soon as extract is done. Then based on that info u need to delete a the records.
    Regards

  • Regarding how to delete the record in internal table

    Hi experts ,
    how to delete the record in intarnal table after validating the data,
    if record contains invalid fields?
    i am giving my code see this and give me the answer?
    loop at it_data into wa_data .
    Validate  Cost Center
        READ TABLE it_kostl INTO wa_kostl WITH KEY kostl = wa_data-kostl BINARY SEARCH.
        IF sy-subrc NE 0.
          PERFORM update_error_log USING wa_data
                                         text-004.
        ENDIF.
    Validate source file material ( material number )
    loop at it_mara into wa_mara .
      read table it_ausp into wa_ausp with key atwrt = wa_data-i_matnr .
               if sy-subrc NE 0 .
       PERFORM update_error_log USING wa_data
                                           text-002.
    delete it_data-objek .
         else.
      read table it_mara into wa_mara with key  matnr = wa_ausp-objek .
           if sy-subrc EQ 0 .
           wa_data-objek = wa_mara-matnr.
           wa_data-matkl = wa_mara-matkl.
         ENDIF.
         Modify it_data from wa_data  .
      endif.
    *endloop.
    Validate unit of measure (unit)
        READ TABLE it_t006 INTO wa_t006 WITH KEY msehi = wa_data-unit .
        IF sy-subrc NE 0.
          PERFORM update_error_log USING wa_data
                                         text-003.
        endif.
    Validate delivery location ( storage location )
        READ TABLE it_lgort INTO wa_lgort WITH KEY del_loc = wa_data-del_loc.
        IF sy-subrc NE 0.
          PERFORM update_error_log USING wa_data
                                         text-001.
             if wa_data-flag ='x' .
          delete it_data from  wa_data .
        endif.
        ENDIF.
    endloop.

    Hi Naren,
    First get the index number of the IT_data table and store it in one variable whose declaration like this.
    data: tabix type sy-tabix.
    while reading the internal table it_data set the tabix variable.
    tabix = sy-tabix.
    Instead of  the above use below one.
    Delete it_data-objek
    Use the Below statement it will delete  the row from the internal table.
    Delete it_data-objek index tabix
    Thanks,
    Chidanand

  • MDM API to read the Record Key Mapping table

    Hi,
    Does anybody know what class/method I can use to read the Record Key Mapping table?
    For the Business Partner table the Key Mapping table has this columns:
    <u>Default / MDM Partner ID / Remote System / Key</u>
    I have everything but the Key. How can I read it?
    Thanks in advance,
    Diego.

    GetKey Mapping is one of the available Web Services as of SP4.
    Else you could use the Java API to get the Key Mapping.
    <b>CatalogData class</b> has the following method
    <b>GetKeyMapping</b>
    public java.lang.String[][] GetKeyMapping(java.lang.String agency,
                                              java.lang.String table,
                                              int[] recordIDs,
                                              boolean isDefaultKeyOnly)
                                       throws StringExceptionRetrieves the key mapping for each record.
    Parameters:
    agency - the agency name.
    table - the table name.
    recordIDs - the list of records.
    isDefaultKeyOnly - True to retrieve only the default value, False to all key values.
    Returns: the key values for each record.

  • Sending email after deleting the records in a table

    Hi
    I am deleting the records in a table. After deleting the records,
    i want to send an email to another person. I am planning to follow this steps.
    1. Create a trigger on the table(AFTER DELETE ON table FOR EACH ROW)
    to copy the deleted records to temporary table.
    2. Read the temporary table and send an email.
    Is there any other way we can do with out creating temporary table ?.
    Govind

    I don't know what you plan to use to send the mail but here's a solution that would work.
    -- Create a send mail procedure
    create or replace procedure send_mail (
    sender      IN VARCHAR2,
    recipient   IN VARCHAR2,
    message     IN VARCHAR2)
    IS
      mailhost VARCHAR2(30) := 'localhost';
      mail_conn utl_smtp.connection;
    BEGIN
    mail_conn :=  utl_smtp.open_connection(mailhost, 25);
      utl_smtp.helo(mail_conn, mailhost);
      utl_smtp.mail(mail_conn, sender);
      utl_smtp.rcpt(mail_conn, recipient);
      utl_smtp.data(mail_conn, message);
      utl_smtp.quit(mail_conn);
    END;
    /-- Create the trigger to email deleted rows
    create or replace trigger email_del_rows
    after delete on <table>
    for each row
    declare
    msg varchar2(2000);
    begin
    msg := 'COL1  COL2  COMPANY NAME  DATE'||chr(10);
    msg := msg||:old.col1||'    '||:old.col2||'    '||:old.company_name||'       '||:old_date|| chr(10);
    msg := msg||'END OF FILE';
    send_mail('SENDER','[email protected]',msg);
    end;
    /You can make it look pretty but you get the basic idea.

  • Triggers to insert the record in a table

    I have two table 1. Holiday 2. Attendance.
    When I insert the record    in holiday table for his
     advance holiday   with empid, the same time I want to insert it attendance table
     automatically for the same date using a trigger
    Insert into attendance (empid,date,holiday) values (20078,07/10/2014,1). If holiday column value 1 represent holiday marked,
     0 represent  holiday not marked. The same thing can happen vice versa
    If employee mark his current attendance as  holiday through attendance,
     it should   be  inserted into holiday table 
    automatically using triggers.
    Insert into  Holiday (empid,date,holiday) values (20078,06/08/2014,1). If holiday column value 1 represent holiday marked,
     0 represent  holiday not marked. The same thing can happen vice versa
    Please I am looking for your help , how I can make it using triggers 
    to insert both table  in two different ways of options.
    Regards
    Pol
    polachan

    Hi polachan,
    According to your description, if you want to synchronize the data between the holiday table and the attendance table while inserting records into holiday table, you need to create a trigger on the holiday table, please try the following syntax.
    use <databasename>
    go
    create trigger Tr_holiday
    on holiday
    for insert
    as
    declare @empid varchar(20),
    @date datetime,
    @holiday int
    select @empid = empid, @date=date, @holiday=holiday from inserted
    declare @qty int
    select @qty =count(*) from attendance where empid=@empid and date=@date and holiday=@holiday
    if @qty<1
    begin
    insert into attendance
    select i.empid,
    i.date,
    i.holiday
    from inserted i
    end
    Meanwhile, if you want to insert the record into the holiday table when holiday is updated to 1 in the attendance table, you need to create another trigger on the attendance table, please try the following syntax.
    use <databasename>
    go
    create trigger Tr_attendance
    on attendance
    for update
    as
    declare @holiday int
    if update (holiday)
    begin
    select @holiday=holiday from inserted
    if @holiday=1
    begin
    insert into dbo.holiday
    select empid,
    date,
    holiday
    from inserted
    end
    end
    For more details about creating triggers in SQL Server, please review this article:
    CREATE TRIGGER (Transact-SQL).
    Thanks,
    Lydia Zhang

  • Function module or BAPI that is used to update the records in RBKP table.

    Hello All,
    Can anybody please give me the name of any Function module or BAPI that is used to update the records in RBKP table.
    Please help me
      I need to change the fiscal year in RBKP table
    Thanks in Advance,
    Regards,
    LIJO

    Hi,
    You can use the BAPIs,
    BAPI_ACC_INVOICE_RECEIPT_CHECK Accounting: Check Invoice Receipt (OAG: LOAD PAYABLE)
    BAPI_ACC_INVOICE_RECEIPT_POST  Accounting: Post Invoice Receipt (OAG: LOAD PAYABLE)
    Hope this helps.
    Regards,
    Renjith Michael.

  • Delimiting the record

    Hi,
    could you please help me with a code for delimiting the record in SAP, we are using a certain bapi for deleting or  amending the back end record  when user makes change in data at the UI

    Hi,
    I didn't get your requirement completely but if you want to delimit your string in webdynpro then you can use StringTokenizer class.
    Regards,
    Murtuza

  • Stay on the edit page once saved and see the record as a table

    I like to click on the edit of an interactive report to go to the edit page.
    Once in the edit page, I like to see not only the form to edit the record but also
    the record as a table to see what the record looks like once the save button is clicked below the edit form.
    Thanks.

    Look at the page branches. There will be one or more which goes to the first page. Change it to go to the current page instead of the first page.

  • How to transport records of custom table in SAP BI?

    Hello,
    I creeated a custom table and entered some records there. Now I would like to transport it to production.
    When I select the records and press 'transport records' the system doesnt allow me to save it under transport request.
    The following error message pops up :
    This is customization request but you need workbench one.
    But I dont see any workbench requests in this window.
    Thanks

    Go to SE09,
    Select Create Request
    It will ask for selection for type of request.
    Select 'Workbench Request' and try with this request.
    Sankar Kumar

  • Custom Oaf form inserting blank records into custom table

    Hi all,
    I have developed custom OAF form to insert vendor details mapped to custom table.
    Oaf form is working fine without giving any error.
    In back end blank records is inserting into the custom table i.e. only WHO columns (creation_Date, created_by, last_update_login etc.) values are populating correctly but the
    data which i am entering in OAF form is not populating into the table.
    Please help, tnx in advance.
    Regards,
    Mohit

    Do you have mapping of your form fields with the view object and view attribute ?

  • Is it possible to restrict changing records in customizing table in SM30?

    Hi.
    Is it somehow possible to set authorizations in a way, that a user could change only certain entries in a customizing table using SM30? What I want to achieve with this - we have an internationally used system, where consultants from different countries are working often on the same customizing tables and we would like to restrict tham to be able to change records only relevant for those countries, so they cannot change the records for other countries by mistake / on purpose. The records are usually identified by a certain "grouping" field (for instance MOLGA in table T511K or MOABW in T554S).
    So far I couldn't find anything apart from the S_TABU_DIS object, which is too rough for this requirement.
    Or maybe is there another way to achieve security in such a scenario?
    Thanks in advance for any ideas.

    Hi dusan,
    1. If u are talking about SM30 for standard table,
       then i don't think there is any such standard feature / facility,
       for restricting.
    2. If its our own Z Table, then we can go for events in table maintenance
      and write our code for same.
    3. But if such restrictions/validations are required,
       then its better to have a module pool for such thing.
      SM30 is for very simple and basic table maintenance.
    regards,
    amit m.

  • Displaying record from custom table

    I have a custom table ztable (kunnr, vbeln, erdat, erzet, flag). Using these values I would like to display the following
    Client Number (4) = '1234'
    Filler (6) = space.
    Record Type (1) = 'A'
    Client Number (15) = vrkpa-kunnr
    Customer Name (30) = adrc-name1
    This information should be displayed in the following way:
    1234  A0012345        Walmart
    Can someone help me with this code.
    Thank you!

    Okay, I see.  Is your client number always going to be '1234'?  If not, then do not assign a value to it.  Otherwise, you'll want to assign the value during your selection statement because the field will be emptied each time you clear the itab line.The same thing goes for your record type 'A'.  You need an address number, a date, and a nation as the key for table ADRC (so you need to put the necessary values into w_nation and w_begda).  I'm not sure if your customer number corresponds to the address number.  Try this:
    DATA wa_ztable TYPE ztable.
    DATA wa_adrc TYPE adrc.
    DATA w_nation type adrc-nation.
    DATA w_begda type sy-datum.
    DATA: begin of itab occurs 0,
    clientnumber(4) type c,
    filler(2) type c,
    recordtype(1) type c,
    customernumber(15) type c,
    customername(30) type c,
    customeraddress1(30) type c,
    customeraddress2(30) type c,
    customercity(17) type c,
    customerstate(2) type c,
    customerzip(9) type c,
    customercountry(17) type c,
    customercountrycode(3) type c,
    customerphnum(10) type c,
    end of itab.
    w_begda = (put your date here).
    w_nation = (put your nation code here).
    SELECT * FROM ztable INTO wa_ztable WHERE flag = space.
    itab-clientnumber = '1234'.
    itab-filler = space.
    itab-rectype = 'A'.
    itab-customernumber+0(10) = wa_ztable-kunnr.
    itab-customernumber+10(5) = space.
    SELECT SINGLE * FROM TABLE adrc INTO wa_adrc WHERE
    ADDRNUMBER = wa_ztable-kunnr AND NATION = w_nation AND DATE_FROM = w_begda.
    itab-customername = wa_adrc-name1.
    itab-customeraddress1 = wa_adrc-
    itab-customeraddress2 = wa_adrc-
    itab-customercity = wa_adrc-city1.
    itab-customerstate = wa_adrc-regiogroup.
    itab-customerzip = wa_adrc-post_code1.
    itab-customercountry = wa_adrc-
    itab-customercountrycode = wa_adrc-country.
    itab-customerphnum = wa_adrc-tel_number.
    append itab.
    clear itab.
    ENDSELECT.
    LOOP AT itab.
    *Insert your code to display line here (can just list each itab field, or use column numbers if you want to create spaces between the fields)
    ENDLOOP.
    Note on the * lines:  I don't see a field for the country text.  For the address lines, you will probably have to concatenate values from ADRC-HOUSE_NUM1 and ADRC-STREET, and possibly also use ADRC-PO_BOX as well.
    - April
    Message was edited by:
            April King

  • Issue in retrieving all the records from ADF Table with multiple row

    Hi,
    As per my requirement, I need to fill the table with multi selected LOV values and when user clicks on commit, I need to save them to database.
    I am using ADF 11g, Multi select table. Using the below ADD method, I am able to add the records but if user clicks on cancel, I need to remove those from view and clear the table as well.
    But the Issue I am facing is, in my cancel method, always I am getting half of the records. Lets assume table contains 100 records but in my cancel method, I am getting only 50 records.
    Please let me know what is the issue in my source code.
    ADD Method:
    public void insertRecInCMProcessParamVal(String commType, String processType, Number seqNumber){       
    try{
    Row row = this.getCmProcessParamValueView1().createRow();
    row.setAttribute("ParamValue7", commType);
    row.setAttribute("ProcessType", processType);
    row.setAttribute("CreationDate", new Date());
    row.setAttribute("CreatedBy", uid);
    row.setAttribute("ParamValueSeqNum", seqNumber);
    row.setAttribute("ProcessedFlag", "N");
    this.getCmProcessParamValueView1().insertRow(row);
    }catch(Exception e){           
    e.printStackTrace();
    Table Code:
    <af:table value="#{bindings.CmProcessParamValueView11.collectionModel}"
    var="row"
    rows="#{bindings.CmProcessParamValueView11.rangeSize}"
    emptyText="#{bindings.CmProcessParamValueView11.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.CmProcessParamValueView11.rangeSize}"
    rowBandingInterval="1"
    selectedRowKeys="#{bindings.CmProcessParamValueView11.collectionModel.selectedRow}"
    selectionListener="#{bindings.CmProcessParamValueView11.collectionModel.makeCurrent}"
    rowSelection="multiple"
    binding="#{backingBeanScope.backing_app_RunCalcPage.t1}"
    id="t1" width="100%" inlineStyle="height:100px;" >
    <af:column sortProperty="ParamValue6"
    sortable="true"
    headerText="#{bindings.CmProcessParamValueView11.hints.ParamValue6.label}"
    id="c1" visible="false">
    <af:inputText value="#{row.bindings.ParamValue6.inputValue}"
    label="#{bindings.CmProcessParamValueView11.hints.ParamValue6.label}"
    required="#{bindings.CmProcessParamValueView11.hints.ParamValue6.mandatory}"
    columns="#{bindings.CmProcessParamValueView11.hints.ParamValue6.displayWidth}"
    maximumLength="#{bindings.CmProcessParamValueView11.hints.ParamValue6.precision}"
    shortDesc="#{bindings.CmProcessParamValueView11.hints.ParamValue6.tooltip}"
    id="it3">
    <f:validator binding="#{row.bindings.ParamValue6.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="ParamValue7"
    sortable="true"
    headerText="Comm Type"
    id="c2">
    <af:inputText value="#{row.bindings.ParamValue7.inputValue}"
    label="#{bindings.CmProcessParamValueView11.hints.ParamValue7.label}"
    required="#{bindings.CmProcessParamValueView11.hints.ParamValue7.mandatory}"
    columns="#{bindings.CmProcessParamValueView11.hints.ParamValue7.displayWidth}"
    maximumLength="#{bindings.CmProcessParamValueView11.hints.ParamValue7.precision}"
    shortDesc="#{bindings.CmProcessParamValueView11.hints.ParamValue7.tooltip}"
    id="it4">
    <f:validator binding="#{row.bindings.ParamValue7.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="ParamValue8"
    sortable="true"
    headerText="#{bindings.CmProcessParamValueView11.hints.ParamValue8.label}"
    id="c3" visible="false">
    <af:inputText value="#{row.bindings.ParamValue8.inputValue}"
    label="#{bindings.CmProcessParamValueView11.hints.ParamValue8.label}"
    required="#{bindings.CmProcessParamValueView11.hints.ParamValue8.mandatory}"
    columns="#{bindings.CmProcessParamValueView11.hints.ParamValue8.displayWidth}"
    maximumLength="#{bindings.CmProcessParamValueView11.hints.ParamValue8.precision}"
    shortDesc="#{bindings.CmProcessParamValueView11.hints.ParamValue8.tooltip}"
    id="it2">
    <f:validator binding="#{row.bindings.ParamValue8.validator}"/>
    </af:inputText>
    </af:column>
    </af:table>
    Backing Bean Code:
    DCBindingContainer dcBindings=(DCBindingContainer)getBindings();
    DCIteratorBinding dcIterator=dcBindings.findIteratorBinding("CmProcessParamValueView1Iterator");
    RowSetIterator rs = dcIterator.getRowSetIterator();
    System.out.println("In Cancel Row Count is : "+ rs.getRowCount());
    if (rs.getRowCount() > 0) {
    Row row = rs.first();
    row.refresh(Row.REFRESH_UNDO_CHANGES);
    row.remove();
    while (rs.hasNext()) {
    int count = rs.getRowCount();
    System.out.println("Count is : "+ count);
    Row row = rs.next();
    System.out.println("Row === "+ row);
    if(row != null){                   
    row.refresh(Row.REFRESH_UNDO_CHANGES);
    row.remove();
    Thanks.

    Issue resolved.
    remove selectionListener and selectedRowKeys....
    code to get all the selectedRows.
    RowSetIterator rs = dcIterator.getRowSetIterator();
    RowKeySet rks = this.t1.getSelectedRowKeys();
    Iterator rksIter = rks.iterator();
    while (rksIter.hasNext()) {
    List l = (List) rksIter.next();
    Key key = (Key)l.get(0);
    Row row = rs.getRow(key);
    Thanks.

  • How do I update all the records in a table from the contents of another table?

    Ok some situation information, I have a pervasive database that runs our accounting software that I am pulling a product list from.  I have that list stored in a table in SQL.  From time to time we update the records in the pervasive database and
    I want to be able to pull those changes into the SQL table.  I don't want to drop the table and recreate it because if a product is no longer active in the pervasive database it will not be returned by the query (if I return all the products even the
    inactive ones I will get thousands of records rather than just a few hundred) and I do not want to loose the products from the table that are now inactive.  
    So what I want to be able to do is pull the list from pervasive, compare it to the list that exists in SQL and update any changed records, add any new records, and leave any now missing records alone(missing from the pervasive list but present in the SQL
    list).  I have no trouble pulling the records from pervasive (now) but I am a little stumped on how to do the rest.  I am not sure if this is a situation to use MERGE or not.  I also do not really need this to be done on a regular basis as the
    changes do not happen often enough for that, the ability to manually trigger it would be enough.
    Any help would be appreciated.
    David

    Hi David,
    lets say you want to go with the lookup transformation.
    lets say u want to move the data from server A table A1 to Server B table B1
    What you need to do is the following:
    Cofigure the Lookup options as follows:
    - In general -> Specify how to handle rows with no macthing entries -> "Redirect Rows to no Match Output"
    -  In Connection -> Set the ole db connection to the Server B and select the table B you want to lookup the values in your case the table where you want to input the changes 
    -  In columns -> link the product column from table A to product column in table B. And do not select any rows to output.
    - now your component is ready next you need to input. so when u connect your lookup to the destination component You will get an option to select which output you want to use - use "Lookup No Match Output".
    this will actually just allow you to add only new items only to the table B.
    Teddy Bejjani - BI Specialist @ Netways

Maybe you are looking for

  • Pages '09 and an Epson RX580 printer

    I just made the jump to an IMac. I have run into an issue with printing envelopes with my Epson RX580 printer. I downloaded and installed the newest drivers that are available for Leopard from the Epson site for this printer. When I try to print enve

  • Multiclip editing does not update Canvas window with active angle

    Hi, I am trying to do some multiclip editing but for some reason when cutting between angles the canvas viewer does not update with the video. Once I stop playback the cuts are all created properly and the video changes when playing back again. Howev

  • Flexibility problem with ( window / form ) Position in forms 10g

    Hi , I hope you are all Fine & Happy with oracle ;) I' using Oracle Developer Suite - 10g I SUCCEFULLY PUT THE FORM IN THE CENTER :D but i have a proplem to make the position of a form flexible ?:| First : I wanted to put the window in the center So

  • Backup from iPhone fills up my poor Mac.

    I have a lot of applications on my iphone, and some of them are big, I guess, as they are photo and video editing applications. When I connect my iPhone to my Mac, for instance to transfer some pictures, automatic backup starts. I have around 8 GB ju

  • Time dependent infoobjects.

    hi sapgurus,     When i am creating the infoobjects,i am facing following can some help with them. 1.Why are very putting attributes as time dependent attributes? 2.What is the importance of HIERARCHIES NOT TIME DEPENDENT AND ALSO INTERVALS PERMITTED