Update DBTAB updating only part of records

Hello Gurus, Need your help.
I have an Update Dbtable with Internal Table statement in my ABAP. My IT (Internal table) is a hashed table with same keys and fields as my DB table. Suppose I have 30K records in my IT, ultimately only say 9K records gets updated eventhough all the 30K records exists in the DB table. Next time when I run, it might update 9500 entries but not all again. So this statement is behaving quite badly. Am not doing any Commits, which automatically happens after I run the program. So can you suggest me something, which can solve my issue? or is there anything bad which am doing?
Regards
Shrirama

Here it is.
Line: -
<TABLES /bic/ay2ws1za000.>
TYPES: BEGIN OF ty_docno,
       doc_number TYPE /bic/ay2ws1za000-doc_number,
       s_ord_item TYPE /bic/ay2ws1za000-s_ord_item,
       END OF ty_docno,
       BEGIN OF ty_status,
       doc_number TYPE /bic/ay2ws1za000-doc_number,
       s_ord_item TYPE /bic/ay2ws1za000-s_ord_item,
       rejectn_st TYPE /bic/ay2ws2za000-rejectn_st,
       END OF ty_status.
DATA: l_is_datapack LIKE STANDARD TABLE OF /bic/ay2ws1za000.
Data: l_ih_datapack like hashed table of /bic/ay2ws1za000 with unique
key /BIC/Y_REQSID /BIC/Y_PACKNO /BIC/YRECNO.
DATA: l_ih_docno TYPE HASHED TABLE OF ty_docno WITH UNIQUE KEY
table_line,
      l_is_status TYPE SORTED TABLE OF ty_status WITH NON-UNIQUE KEY
      doc_number s_ord_item.
DATA: ls_docno TYPE ty_docno.
DATA:  l_answer(1)              TYPE c,
       l_error(1)               TYPE c,
       l_tab1(16)               type c,
       l_tab2(16)               type c,
       l_tab3(16)               type c,
       l_tab4(16)               type c.
FIELD-SYMBOLS: <ls_datapack> TYPE /bic/ay2ws1za000,
               <ls_docno> TYPE ty_docno,
               <ls_status> TYPE ty_status.
REFRESH: l_is_datapack[],
         l_ih_docno[],
         l_is_status[].
CLEAR  l_answer.
clear l_tab1.
clear l_tab2.
clear l_tab3.
clear l_tab4.
Selecting records to update from 4 tables.
SELECT * FROM /bic/ay2ws1za000
  APPENDING TABLE l_is_datapack
  WHERE /bic/y_reqsid eq '0003424029' AND
        calquart1 NE '9'.
SELECT * FROM /bic/ay2ws1za100
  APPENDING TABLE l_is_datapack
  WHERE /bic/y_reqsid eq '0003424029' AND
        calquart1 NE '9'.
SELECT * FROM /bic/ay2ws1za200
  APPENDING TABLE l_is_datapack
  WHERE /bic/y_reqsid eq '0003424029' AND
        calquart1 NE '9'.
SELECT * FROM /bic/ay2ws1za300
  APPENDING TABLE l_is_datapack
  WHERE /bic/y_reqsid eq '0003424029' AND
        calquart1 NE '9'.
Collecting the doc number for lookup.
LOOP AT l_is_datapack ASSIGNING <ls_datapack>.
  ls_docno-doc_number = <ls_datapack>-doc_number.
  ls_docno-s_ord_item = <ls_datapack>-s_ord_item .
  ASSIGN ls_docno TO <ls_docno>.
  COLLECT <ls_docno> INTO l_ih_docno.
ENDLOOP.
Lookup into another table. infact 7 tables appending IT.
IF l_ih_docno[] IS NOT INITIAL.
  SELECT doc_number s_ord_item rejectn_st FROM /bic/ay3ws2aa000
    APPENDING TABLE l_is_status
    FOR ALL ENTRIES IN l_ih_docno
    WHERE doc_number = l_ih_docno-doc_number AND
          s_ord_item = l_ih_docno-s_ord_item .
  SELECT doc_number s_ord_item rejectn_st FROM /bic/ay3ws2ab000
    APPENDING TABLE l_is_status
    FOR ALL ENTRIES IN l_ih_docno
    WHERE doc_number = l_ih_docno-doc_number AND
          s_ord_item = l_ih_docno-s_ord_item.
  SELECT doc_number s_ord_item rejectn_st FROM /bic/ay3ws2ba000
    APPENDING TABLE l_is_status
    FOR ALL ENTRIES IN l_ih_docno
    WHERE doc_number = l_ih_docno-doc_number AND
          s_ord_item = l_ih_docno-s_ord_item.
  SELECT doc_number s_ord_item rejectn_st FROM /bic/ay3ws2bb000
    APPENDING TABLE l_is_status
    FOR ALL ENTRIES IN l_ih_docno
    WHERE doc_number = l_ih_docno-doc_number AND
          s_ord_item = l_ih_docno-s_ord_item.
  SELECT doc_number s_ord_item rejectn_st FROM /bic/ay3ws2bc000
    APPENDING TABLE l_is_status
    FOR ALL ENTRIES IN l_ih_docno
    WHERE doc_number = l_ih_docno-doc_number AND
          s_ord_item = l_ih_docno-s_ord_item.
  SELECT doc_number s_ord_item rejectn_st FROM /bic/ay3ws2bd000
    APPENDING TABLE l_is_status
    FOR ALL ENTRIES IN l_ih_docno
    WHERE doc_number = l_ih_docno-doc_number AND
          s_ord_item = l_ih_docno-s_ord_item.
  SELECT doc_number s_ord_item rejectn_st FROM /bic/ay3ws2za000
    APPENDING TABLE l_is_status
    FOR ALL ENTRIES IN l_ih_docno
    WHERE doc_number = l_ih_docno-doc_number AND
          s_ord_item = l_ih_docno-s_ord_item.
SELECT doc_number s_ord_item rejectn_st FROM /bic/ay3ws2zb000
    APPENDING TABLE l_is_status
    FOR ALL ENTRIES IN l_ih_docno
    WHERE doc_number = l_ih_docno-doc_number AND
          s_ord_item = l_ih_docno-s_ord_item.
ENDIF.
LOOP AT l_is_datapack ASSIGNING <ls_datapack>.
updating the fields by reading from IT.
  READ TABLE l_is_status ASSIGNING <ls_status>
  WITH KEY doc_number = <ls_datapack>-doc_number
           s_ord_item = <ls_datapack>-s_ord_item
           BINARY SEARCH.
  IF sy-subrc = 0.
    <ls_datapack>-rejectn_st = <ls_status>-rejectn_st.
  ENDIF.
ENDLOOP.
sort l_is_datapack[] ascending by /BIC/Y_REQSID /BIC/Y_PACKNO
/BIC/YRECNO.
Delete adjacent duplicates from l_is_datapack[] comparing /BIC/Y_REQSID
/BIC/Y_PACKNO /BIC/YRECNO.
l_ih_datapack[] = l_is_datapack[].
refresh l_is_datapack[].
refresh l_is_status[].
refresh l_ih_docno[].
IF l_ih_datapack[] IS NOT INITIAL.
Updating the original tables with this new read field.
    UPDATE /bic/ay2ws1za000 FROM TABLE l_ih_datapack .
    IF sy-subrc NE 0.
      write /'/bic/ay2ws1za000-inserted 0 records'.
    else.
      write /'/bic/ay2ws1za000-inserted records successfully'.
    ENDIF.
    UPDATE /bic/ay2ws1za100 FROM TABLE l_ih_datapack.
    IF sy-subrc NE 0.
      write /'/bic/ay2ws1za100-inserted 0 records'.
    else.
      write /'/bic/ay2ws1za100-inserted records successfully'.
    ENDIF.
    break-point.
    UPDATE /bic/ay2ws1za200 FROM TABLE l_ih_datapack.
    IF sy-subrc NE 0.
      write /'/bic/ay2ws1za200-inserted 0 records'.
    else.
      write /'/bic/ay2ws1za200-inserted records successfully'.
    ENDIF.
    UPDATE /bic/ay2ws1za300 FROM TABLE l_ih_datapack.
    IF sy-subrc NE 0.
      write /'/bic/ay2ws1za300-inserted 0 records'.
    else  .
      write /'/bic/ay2ws1za300-inserted records successfully'.
    ENDIF.
    refresh l_is_datapack[].
ENDIF.
Line: -
Most of the times, it update around only 9500 entries.
Edited by: Sriram k on Jul 28, 2009 7:34 AM I dont know how to show the new lines...:(

Similar Messages

  • After Update ATV Displays Only Part of Picture

    After the new update- 12/2/2010 when I try to sync photos over Home Sharing and show them as a slideshow it shows only some of the picture- the rest of the image is grey like in the old days when you would only get part of an image on a slow modem.

    Yes- I've tried deleting the itunes cache in the folder, moving photos to a new folder, tried 2 different computers, and toasted the ATV and it still happens.
    Inputing a static IP and your apple ID just to view photos is a huge pain. Am I the only one who feels herded when using Apple products?

  • Updating only the last record.

    Hi,
    I have a scenario where we get more than 1 record based on style. Everytime the new record comes in, I need to update the last record inserted. It requires a procedure to do it, but need some help on how to just update the last record only and not all the previous received records.
    Here is the scenario.
    create table test_1 as
    with data_Set as
    ( select 'ABCD' style, 20080101 date_received, 2 duration,20080301 expire_Date from dual union all
    select 'PQRS' style, 20080201 date_received, 2, 20080401 expire_Date from dual
    ) select * from data_set
    so now on next run when i get another record
    insert into test_1
    select 'ABCD' style, 20080401 date_received, 3 duration,20080701 expire_Date from dual.
    now the procedure should insert the incoming record and also update the expire_date for the previous record to a day before date_received for the new record. I am ok doing it when its only 2 records , but when i get another record of same style, i dont want to update all the previous received records. I only want to update the last record on file.
    can anyone suggest?

    STYLE     DATE_RECEIVED     DURATION     EXPIRE_DATE     SEQ_INSERTED
    110427     7/31/2006     0     7/31/2006     2
    110427     9/1/2007     12     9/1/2008     2
    110427     8/2/2008     24     8/2/2010     3
    468130     3/13/1997     0          2
    468130     3/13/1997     12     3/13/1998     2
    468130     1/12/2008     12     1/12/2009     3
    Here is my data set
    and here is the query i use to update, does it look correct?
    update test b
    set ( expire_Date) =
    (select start_date - 1
    from test a
    where (style_no, date_received) in
    (select style_no, max(date_received)
    from test c
    group by style_no
    and a.style_no = b.style_no
    and style_no in ('468130','110427')

  • Trying to update only certain selected records

    I crated a query to select certain records as follows:
    SELECT     TOP (100) PERCENT BUDGETDB_VENDR_1.VENDOR, MAX(dbo.MMDDYY(BUDGETDB_APCHK.CHECK_DATE)) AS CHKDATE, BUDGETDB_VENDR_1.VNSTATUS
    FROM          BUDGETDB_VENDR AS BUDGETDB_VENDR_1 LEFT OUTER JOIN BUDGETDB_APCHK ON BUDGETDB_VENDR_1.VENDOR = BUDGETDB_APCHK.VENDOR
    GROUP BY BUDGETDB_VENDR_1.VENDOR, BUDGETDB_VENDR_1.VNSTATUS
    HAVING  (BUDGETDB_VENDR_1.VNSTATUS = 'A') AND (MAX(dbo.MMDDYY(BUDGETDB_APCHK.CHECK_DATE)) < CONVERT(DATETIME, '2012-10-01 00:00:00', 102)) OR (BUDGETDB_VENDR_1.VNSTATUS = 'A') AND (MAX(dbo.MMDDYY(BUDGETDB_APCHK.CHECK_DATE))
    IS NULL)
    The query runs and only returns 7400 out of 9300 records.  I need to update the status of these 7400 records to inactive.  However, when I use the following to update, it updates all 9300 records not the 7400 selected.  Please advise.
    UPDATE    BUDGETDB_VENDR
    SET             
    VNSTATUS = 'I'
    WHERE     EXISTS
    (SELECT     TOP (100) PERCENT BUDGETDB_VENDR_1.VENDOR, MAX(dbo.MMDDYY(BUDGETDB_APCHK.CHECK_DATE)) AS CHKDATE,
         BUDGETDB_VENDR_1.VNSTATUS
    FROM          BUDGETDB_VENDR AS BUDGETDB_VENDR_1 LEFT OUTER JOIN
    BUDGETDB_APCHK ON BUDGETDB_VENDR_1.VENDOR = BUDGETDB_APCHK.VENDOR
                 GROUP BY BUDGETDB_VENDR_1.VENDOR, BUDGETDB_VENDR_1.VNSTATUS
    HAVING      (BUDGETDB_VENDR_1.VNSTATUS = 'A') AND (MAX(dbo.MMDDYY(BUDGETDB_APCHK.CHECK_DATE)) < CONVERT(DATETIME,
               '2012-10-01 00:00:00', 102)) OR
    (BUDGETDB_VENDR_1.VNSTATUS = 'A') AND (MAX(dbo.MMDDYY(BUDGETDB_APCHK.CHECK_DATE)) IS NULL))

    Hi,
    Try with this query.
    UPDATE   
    BUDGETDB_VENDR
    SET             
    VNSTATUS = 'I'
    FROM         
    BUDGETDB_VENDR AS BUDGETDB_VENDR_1
    LEFT OUTER JOIN BUDGETDB_APCHK
    ON BUDGETDB_VENDR_1.VENDOR
    = BUDGETDB_APCHK.VENDOR
    GROUP
    BY BUDGETDB_VENDR_1.VENDOR, BUDGETDB_VENDR_1.VNSTATUS
    HAVING 
    (BUDGETDB_VENDR_1.VNSTATUS
    = 'A')
    AND (MAX(dbo.MMDDYY(BUDGETDB_APCHK.CHECK_DATE))
    < CONVERT(DATETIME,
    '2012-10-01 00:00:00', 102))
     OR
    (BUDGETDB_VENDR_1.VNSTATUS
    = 'A')
    AND (MAX(dbo.MMDDYY(BUDGETDB_APCHK.CHECK_DATE))
    IS NULL)
    Thanks, RajaSekhara Reddy . K

  • I updated the software on my phone but i had to delete my music to open up enough space, now only part of my music will load on my phone, what do i do?

    i updated the software on my phone but i had to delete my music to open up enough space, now only part of my music will load on my phone, what do i do?

    ***, a text I tried to send but saved,chops up and pastes in the forum question in my attempt to reach out for a technical resolve of my phone, not my heart. Hahaha.

  • When updating to target only few records got added to the target

    When updating to target only few records got added to the target from the transferred recordsu2026what could be the reason?
    Edited by: MohanDP on Jun 28, 2010 7:44 PM

    Hi Mohan,
    When updating to target only few records got added to the target from the transferred recordsu2026what could be the reason
    There might be a routine in your Transformation which might be filtering few records(or)
    It is possible that you will have multiple records for one keyfield in PSA. But when you try loading the same to datatarget like Cube, the result will be added.
    For ex, say you have Profit center US00000593 in PSA with two rows with keyfigure(say some ABC) values 100 & -50.
    Then when you load the data to datatarget, you will have only one row in it with Profit center US00000593 & values for keyfigure ABC=50 (i.e 100-50=50). So most of the times we will be having added records less than transferred records.
    Hope it is clear!
    Regards,
    Pavan

  • DS sends updates to DB only in commit (can't find modified data in same TX)

    Hello experts!
    We have a physical data service mapping a simple Oracle database table. When we update one record in the database (invoking submit on the DS), and use a function in that same dataservice to get the refreshed record, the updated column comes with the OLD value. But after the transaction ends (we isolated this is a simple JWS), the database gets updated.
    The most strange fact: we also did a test using another Data Service to do the update, now mapping a stored procedure to do the updates (without commits in body). Then the test works fine.
    The conclusion I can reach is DSP is holding the instance somewhere after the submit() and is not sending it to the database connection. I understand that the commit is not performed, but if I do a query in the same TX, I should see my changed, shouldn't I?
    We use WL 8.1.6 with DSP 2.5.
    We´d appreciate very much if yuo guys could help.
    Thanks,
    Zica.

    Let me get your scenario straight
    client starts a transaction
    client calls submit to update a data services
    client calls read to re-read the update value (does not see update)
    client ends the transaction
    If you read now, you will see the update
    And you're wondering why the first read doesn't seem the update values?
    By default, ALDSP 2.5 reads are through an EJB that has trans-attrib=NotSupported - which means if you do a read within a transaction, that transaction is suspended the call is made without any transaction, then the transaction is resumed. So this is one reason you don't see the read. To do the read via an EJB method with trans-attribute=Required. See TRANSACTION SUPPORT at http://e-docs.bea.com/aldsp/docs25/javadoc/com/bea/dsp/dsmediator/client/DataServiceFactory.html
    If you are using the control, the control will need to specify
    @jc:LiquidData ReadTransactionAttribute="Required"
    That is only part of the solution. You will also need to configure your connection pool with the property KeepXAConnTillTxComplete="true" to ensure that your read is on the same connection as your write.
    <JDBCConnectionPool CapacityIncrement="2"
    KeepXAConnTillTxComplete="true" />
    Then I have to ask - if your client already has the modified DataObject in memory, what's the purpose of re-reading it? If all you need is a clean ChangeSummary so you can do more changes (the ChangeSummary is not cleared when you call submit), you can simply call myDataObject..getDataGraph().getChangeSummary().beginLogging()

  • How to update a Z d/b table record from report - urgent

    Dear SDN Team Members,
    I have created a ztable for list of all active customers. 
    This ztable has link with other SAP Standard D/b tables and I need to compare the entries with my ztable. 
    After doing so, I need to update a DATE field (called last_req_date) from the program.
    Until now, i only worked on internal tables and update the fields in internal table.  But this time I need to update my zTable and i've not updated any records of the database tables directly from the program.
    Please kindly provide the complete syntax and procedure on how to update z database table.
    Your help will be appreciated and points will be awarded for the same.
    Thanks in Advance.
    Best Regards!
    Krishna.

    Hi,
    To update or Insert fields into teh dbase table.
    INSERT INTO dbtab [CLIENT SPECIFIED] VALUES wa.
    INSERT INTO (dbtabname) [CLIENT SPECIFIED] VALUES wa.
    2. INSERT dbtab [CLIENT SPECIFIED] FROM TABLE itab. oder
    INSERT (dbtabname) [CLIENT SPECIFIED] FROM TABLE itab.
    3. INSERT dbtab [CLIENT SPECIFIED]. oder
    INSERT *dbtab [CLIENT SPECIFIED]. oder
    INSERT (dbtabname) [CLIENT SPECIFIED] ...
    1.TABLES SCUSTOM.
    SCUSTOM-ID        = '12400177'.
    SCUSTOM-NAME      = 'Robinson'.
    SCUSTOM-POSTCODE  = '69542'.
    SCUSTOM-CITY      = 'Heidelberg'.
    SCUSTOM-CUSTTYPE  = 'P'.
    SCUSTOM-DISCOUNT  = '003'.
    SCUSTOM-TELEPHONE = '01234/56789'.
    INSERT INTO SCUSTOM VALUES SCUSTOM.
    2.TABLES SAIRPORT.
    SAIRPORT-ID   = 'NEW'.
    SAIRPORT-NAME = 'NEWPORT APT'.
    INSERT SAIRPORT.
    To UPDATE
    TABLES SFLIGHT.
    UPDATE SFLIGHT SET   SEATSOCC = SEATSOCC + 3
                   WHERE CARRID   = 'LH'   AND
                         CONNID   = '0400' AND
                         FLDATE   = '19950228'.
    TABLES SFLIGHT.
    UPDATE SFLIGHT CLIENT SPECIFIED
                   SET   SEATSOCC = SEATSOCC + 3
                   WHERE MANDT    = '002'  AND
                   WHERE CARRID   = 'LH'   AND
                         CONNID   = '0400' AND
                         FLDATE   = '19950228'.
    TABLES SCUSTOM.
    SCUSTOM-ID       = '00017777'.
    SCUSTOM-DISCOUNT = '003'.
    UPDATE SCUSTOM.
    OR UPDATE dbtab FROM TABLE itab.

  • Update trigger - Updating only updated columns

    Hi All,
    I need a trigger to be created on table VNDR(with so many columns, only a few are shown in below script) after insert or update.
    It will insert or update the same data in a table having similar structure in another DB.
    For update part, updating each column value even if a single column is updated would not be the better way.
    please suggest any better optimized way.
    CREATE OR REPLACE TRIGGER TRG_VNDR
       AFTER INSERT OR UPDATE
       ON VNDR
       REFERENCING NEW AS NEW OLD AS OLD
       FOR EACH ROW
    BEGIN
          IF INSERTING
          THEN
             INSERT INTO VNDR@MMMM (VNDR_ID,
                                         VEND_TYP,
                                         CURRENCY_CD,
                                         VNDR_AREA_CD,
                                         DA_FLG,
                                         CREATE_DATE,
                                         UPDATE_DATE,
                                         DELETE_FLG,
                                         DELETE_DATE,
                                         UPDATE_DSCR,
                                         VNDR_CNAME,
                                         VNDR_CABB,
                                         VNDR_CADDRS,
                                         VNDR_EADDRS2,
                                         VNDR_EADDRS5,
                                         VNDR_EADDRS3,
                                         VNDR_STATE,
                                         VNDR_EADDRS4,
                                         VNDR_CNTR,
                                         VNDR_HNDL,
                                         VNDR_TEL)
                  VALUES (:NEW.VNDR_ID,
                          :NEW.VEND_TYP,
                          :NEW.CURRENCY_CD,
                          :NEW.VNDR_AREA_CD,
                          :NEW.DA_FLG,
                          SYSDATE,
                          :NEW.UPDATE_DATE,
                          :NEW.DELETE_FLG,
                          :NEW.DELETE_DATE,
                          :NEW.UPDATE_DSCR,
                          :NEW.VNDR_CNAME,
                          :NEW.VNDR_CABB,
                          :NEW.VNDR_CADDRS,
                          :NEW.VNDR_EADDRS2,
                          :NEW.VNDR_EADDRS5,
                          :NEW.VNDR_EADDRS3,
                          :NEW.VNDR_STATE,
                          :NEW.VNDR_EADDRS4,
                          :NEW.VNDR_CNTR,
                          :NEW.VNDR_HNDL,
                          :NEW.VNDR_TEL);
          ELSIF UPDATING
          THEN
             UPDATE SMGR.VNDR@MMSL
                SET VEND_TYP = :NEW.VEND_TYP,
                    CURRENCY_CD = :NEW.CURRENCY_CD,
                    VNDR_AREA_CD = :NEW.VNDR_AREA_CD,
                    DA_FLG = :NEW.DA_FLG,
                    CREATE_DATE = :NEW.CREATE_DATE,
                    UPDATE_DATE = SYSDATE,
                    DELETE_FLG = :NEW.DELETE_FLG,
                    DELETE_DATE = :NEW.DELETE_DATE,
                    UPDATE_DSCR = :NEW.UPDATE_DSCR,
                    VNDR_CNAME = :NEW.VNDR_CNAME,
                    VNDR_CABB = :NEW.VNDR_CABB,
                    VNDR_CADDRS = :NEW.VNDR_CADDRS,
                    VNDR_EADDRS2 = :NEW.VNDR_EADDRS2,
                    VNDR_EADDRS5 = :NEW.VNDR_EADDRS5,
                    VNDR_EADDRS3 = :NEW.VNDR_EADDRS3,
                    VNDR_STATE = :NEW.VNDR_STATE,
                    VNDR_EADDRS4 = :NEW.VNDR_EADDRS4,
                    VNDR_CNTR = :NEW.VNDR_CNTR,
                    VNDR_HNDL = :NEW.VNDR_HNDL,
                    VNDR_TEL = :NEW.VNDR_TEL
              WHERE VNDR_ID = :NEW.VNDR_ID;
          END IF;
    END;

    Assuming, you want only a particular column value to get updated below scenarios which could occur.
    1) You will insert null values for all other columns.
    2) You will update already existing row with the new value.
    If you go with Option 1, there remains no way to audit and identify which record actually got changed.
    If you go with Option 2, there is no use of Trigger itself.
    On a second thought, you are using trigger to update some other table. Why would you require that? Triggers are normally meant for auditing purposes and to retain history, but if you are updating another similar table with similar values, why can't you update this table directly without the trigger?
    I don't see any reason to believe that only one particular columns should get updated. IMHO, triggers should ideally be used only for INSERTING.
    Ishan

  • Updation of RG23A register (PART II) with Vendor Rejection

    Dear ALL
    We are doing the Vendor Rejection with mvmt type '122'  with good issue indicator 'IPD' . The Part I register is updated perfectly. after MIGO , we create excise Invoice thru J!IS (Posting of Excise Invoice). Here perfectly the GLs are getting effected but the Part II register is not carrying the effect. The J_1iPart2 table hold these entry with Register Type 'D' , and the same is not located in Part II print out . 
    Can any one help me to resolve this issue , the user wants the details of Vendor Return Excise in the PART II register .
    Regards
    AVS

    Hi Anjali,
    Go to SPRO-Log Gen-Tax on goods movement-India-Account determination
    -Specify excise accounts per transactions
    Here check whether Debit/Credit & Account name are maintained properly for OTHR.
    Also check whether you are using subtransaction type for Return to vendor, if yes then OTHR with that sub trax type should have been maintained.
    Now-Specify G/L acct per trax-
    Here check the G/L assignments for yous excise group & trax type 'OTHR' (Also sub trax type, if it is there).
    Also make sure, you are selecting 'Only part 1' option at the time of 122.
    Check all these settings,
    Regards,
    Piyush

  • ADF and MSSQL 2005 problems - FOR UPDATE clause allowed only for DECLARE C

    Hi all.
    I have a legacy application which uses MS SQL server 2000 / 2005. I've started to build up a new version of this application using JDev + ADF stack.
    Everything went ok until I've tried to update some data in a Form. I'm getting this error:
    com.microsoft.sqlserver.jdbc.SQLServerException: Line 1: FOR UPDATE clause allowed only for DECLARE CURSOR
    Can someone figure out what's wrong?
    1) In a MSSQL server connection string, normally we define the 'SelectMethod' parameter to 'cursor', as follows: jdbc:sqlserver://$host$:$port$;databaseName=dbserver;SelectMethod=cursor
    Since I was not able to do this through my project's 'Application Resources > Connections' screen, I could not evaluate if this is the cause
    2) I'm trying to follow the steps of an Oracle tutorial (http://www.oracle.com/technology/obe/obe11jdev/ps1/ria_application/developriaapplication_long.htm#ad), of course using MS SQL server instead of Oracle, and using some master->detail tables like the example suggests (in the tutorial, I've reached the step 11, then tried to update a record, which causes the mentioned exception)
    Follows the stacktrace:
    <Utils><buildFacesMessage> ADF: Adding the following JSF error message: Line 1: FOR UPDATE clause allowed only for DECLARE CURSOR.
    com.microsoft.sqlserver.jdbc.SQLServerException: Line 1: FOR UPDATE clause allowed only for DECLARE CURSOR.
         at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
         at com.microsoft.sqlserver.jdbc.IOBuffer.processPackets(Unknown Source)
         at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source)
         at com.microsoft.sqlserver.jdbc.SQLServerStatement.getMoreResults(Unknown Source)
         at com.microsoft.sqlserver.jdbc.SQLServerStatement.seekToOutParams(Unknown Source)
         at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.getPrepStmtHandle(Unknown Source)
         at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doPrepExec(Unknown Source)
         at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(Unknown Source)
         at oracle.jbo.server.BaseSQLBuilderImpl.doEntitySelectForAltKey(BaseSQLBuilderImpl.java:707)
         at oracle.jbo.server.BaseSQLBuilderImpl.doEntitySelect(BaseSQLBuilderImpl.java:546)
         at oracle.jbo.server.EntityImpl.doSelect(EntityImpl.java:7789)
    Regards,
    Luciano S. Lorencini, SCJP, SCWCD

    So, I`ve created a test project and use the MSSQL flavor to create my Business Components.
    After repeated all the steps, the error did not happen again.
    But some strange behavior happen: I change some data and click the "Submit" button. The changed data appears ok in screen, but the changes were not committed in database!
    Do I need to explicitly tell ADF to commit that changes somewhere?
    Greetings,
    Luciano S. Lorencini, SCJP, SCWCD

  • Simulate update in Transformation using a single record

    In an update rule, it was possible from the monitor to simulate the update of an infoProvider.  During the simulation, you could choose to select only certain records of the PSA for simulation. This was very useful if you wanted to simulate only a single problematic record.
    In a transformation using a DTP, I can find out how to add the breakpoints and debut a start routine in a transformation, but I cannot find a way to do that simulation using only a single record from the PSA.
    The only option I can find is to create a DTP that has a filter that restricts the PSA down to a single record, but this is time consuming as you first have to find a way to filter the PSA to select a unique record.
    I have tried to use the ENTER DATA PACKAGE when setting the breakpoints, but this does not seem to allow this to happen.
    Is there a similar function in the DTP that allows you to simulate the update on a single selectable record?

    Hi Kevin,
    this function is not available from the transformation, yet check the DTP, where you can set the processing to serial. You can then change breakpoints at the processing steps of the DTP, and will also be asked to enter for which package you want to simulate the DTP or use the expert mode [next to processing mode] (I hope this is correct since I couldn't verify it in the system due to time constraints).
    Please search also the forum, since the topic simulation of DTP was already a topic here.
      Cheers
         SAP NetWeaver BI Organisation

  • Display Records Updated While Updating Database

    In my web application, an admin is allowed to login and do a mass update to a table where it could update several thousand records. These records are for when new fields are created and default values are created so that applications for older users are still able to process. Basically all I'm trying to do is display what the current status is of a database update in the form "xxx of yyyyy records updated."
    The way it works is that the admin comes to the page, specifies the field to be inserted, and hits the update button. The application goes off to this action class which processes all the updates through JDBC. Once the updates are completed, the JSP is rendered saying how many records were updated. The problem is that this processing can take 15 minutes or more sometimes and we would like to be able to see the progress as it goes. It would be ideal to have it update after every 50 or 100 records are processed.
    How can I do this while the action class is still executing?

    Carpediem104 wrote:
    I had read that thread and unfortunately, it wasn't entirely helpful. We don't use Struts and our action classes work a little bit differently. ... in that it takes only 2 parameters: HttpServletRequest and HttpServletResponse; there are no From objects passed in or action mappingsThen adapt. No one knows your system but you. There are examples in that page, and several links to other pages with several more examples.
    Carpediem104 wrote:
    . We also avoid using session variables, iframes, and beans. It will be hard to do without session variables.. And why no beans? Are you just talking EJBs or JavaBeans in general?
    Carpediem104 wrote:
    Perhaps it is still usable and I'm missing something, but I'm leaning more towards using AJAX to execute the action and then using request.setAttribute() every time the transaction is committed. Then I can use javascript to update the HTML.
    But a request attribute can store information from one request to the next, which you will need to do to get the working progress.
    One idea, provide a hook to the running process in ServletContext with unique keys to identify which process belongs to which update view. Then store the unique key in a cookie or as a URL parameter. Each submit (AJAX or not) use the ID to get the process out of the ServletContext and read the progress from there.
    How is this better than a session? It isn't just more work.
    The other option would be to use Pushlets. Pushlets use a servlet that never closes the connection to the client to continuously feed data to it. This way, your application would start a process and for doing the work and a Pushlet for displaying the progress. You pass a reference of the Pushlet to the worker and the worker regularly informs the Pushlet of its progress. The Pushlet then sends a javascript line to the client updating the display with new information.
    If you Google Pushlets you will learn how to use them.
    Edited by: Carpediem104 on Jul 29, 2008 9:19 AM

  • Create id, update id with date for each record

    Hi,
    Please give me brief idea or document for this concept:
    I need create id, create date, update id, update date for each record inserted or updated in database (in few tables).
    1) how user id can be obtained?
    2) Is it better if i use views instead of tables for this?
    3) is it possible for each record?
    Please show me complete scenario. a piece of code can also be helpful.
    thanx in advance.

    only.ashish99 wrote:
    Hi,
    Please give me brief idea or document for this concept:
    I need create id, create date, update id, update date for each record inserted or updated in database (in few tables).
    1) how user id can be obtained?SELECT
    2) Is it better if i use views instead of tables for this?It depends.
    post EXPLAIN PLAN for both.
    3) is it possible for each record?yes
    How do I ask a question on the forums?
    SQL and PL/SQL FAQ

  • Update-changed-fields-only tag

    I have a problem using the "update-changed-fields-only" tag in oc4j v 9.0.2.0.0:
    I set it on true but it still make the update on ALL the entity fields :(
    This is a real problem when I made independent changes on different fields of the same record in one method using different instances of a entity bean: the container makes a final update on ALL the fields losing changes I previousely made in the method.
    Is there a way to avoid this?
    Thanks

    Valentin -- This is the first I heard of this happening. Can you send a simple test case (including source) to [email protected] and I will take a look at it?
    Thanks -- Jeff

Maybe you are looking for