Declarative rule and capture table condition causing issue

Hi
I have one table which is replicating all the commands except delete and truncate. Also I do have declarative rule which rename the schema from source to target.
When I perform insert operation, it replicates. When i perform delete operation it also captures. but it shouldn't do because we have capture rule not to replicate the delete command.
When I perform truncate, which is not capturing since the condition fulfilled.
I used step_number=0 for declarative rule to rename the schema from source to target while capturing the changes.
Is there any way to override the rules or change the order while capturing the changes?
please do share your thoughts and help me to resolve the situation.
Thanks
Bala

let me explain about my situation.
Table rule defined as below
BEGIN
DBMS_STREAMS_ADM.ADD_TABLE_RULES(
table_name => 'HR.ACCOUNT',
streams_type => 'CAPTURE',
streams_name => 'CAPTURE_TO_&destsid',
queue_name => '&source_strmadmin_user..&sourcesid._TO_&destsid',
include_dml => true,
include_ddl => false,
and_condition => ':lcr.get_command_type() != ''DELETE''',
include_tagged_lcr => false,
source_database => '&source_tns',
inclusion_rule => true);
END;
DML rule for rename schema as below
SET SERVEROUTPUT ON
DECLARE
v_dml_rule VARCHAR2(80);
v_ddl_rule VARCHAR2(80);
BEGIN
DBMS_STREAMS_ADM.ADD_TABLE_RULES(
table_name => 'HR.ACCOUNT',
streams_type => 'CAPTURE',
streams_name => 'CAPTURE_TO_&destsid',
queue_name => '&source_strmadmin_user..&sourcesid._TO_&destsid',
include_dml => true,
include_ddl => false,
include_tagged_lcr => false,
source_database => 'HRDEMO.TESTDOMAIN.COM',
dml_rule_name => v_dml_rule,
ddl_rule_name => v_ddl_rule,
inclusion_rule => true);
DBMS_OUTPUT.PUT_LINE('Capture DML Rule for HR.ACCOUNT => ' || v_dml_rule);
DBMS_STREAMS_ADM.RENAME_SCHEMA(
rule_name => v_dml_rule,
from_schema_name => 'HR',
to_schema_name => 'HR_REPORT',
step_number => 0,
operation => 'ADD');
END;
Whenever insert/update happens in HR.ACCOUNT table, it captures and replicate the changes. It shoudln't capture the delete changes and but it does capture. How to modify or override the delete capture situation.
Is there any way to change the transaformation number, i tried with step_number 0 to 5, it still captures delete changes? How do we avoid delete capture in source database?
Please help.
Thanks
Bala

Similar Messages

  • I have a 2012 Macbook Pro and the GPU is causing issues with Yosemite. How can I resolve this issue?

    I have a 2012 Macbook Pro and the GPU is causing issues with Yosemite. There are a number of issues I have run across:
    If I have four tabs open on Safari then I start to get a flickering on the screen from the GPU refreshing
    When I leave the computer alone for more than 20 mins the screen saver should start -- what happens is that the screen goes to black. When I move the cursor I do not get the login screen. I have to reboot
    FireFox Web browser will not run
    I get issues with the computer running very slowly
    I have already turned off the transparency option in settings. Any ideas??
    Cheers
    Matt
    MacBook Pro, OS X Yosemite (10.10), GPU / Video Card with Yosemite

    Do you have more than one OS on the Mac?
    You may want to look at something like http://bjango.com/mac/istatmenus/. This has a Free Trial window, but it is a commercial application. If there are any heat/sensor issues, this may help.
    A SMC Reset or PRAM/NVRAM reset may also help.
    Intel-based Macs: Resetting the System Management Controller (SMC) - Apple Support
    Startup key combinations for Intel-based Macs - Apple Support

  • SWCONT and SWR_CONT, different structure causing issue!

    Hi experts,
    I am having a issue with my design, while trying to trigger a workflow from a program. I am calling the workflow directly using 'SAP_WAPI_START_WORKFLOW' in a FM.
    The problem is that few tables need to be passed for the SO header and item data. The container table type created using FM 'SWC_ELEMENT_SET' is 'SWCONT' and the WF WAPI expects it to be 'SWR_CONT'. Structures are different and even passing the table data in itab type from SWCONT to SWR_CONT using MOVE_CORRESPONDING does not help.
    I do not think that creating classes and events would help as the data structure to be passed to WF remains the same.
    regards
    VJ

    Hi SNJY,
    Thanks for your response.
    Now, imagine hard-coding for all the SO data record won't tht be fun... lol
    i am using 'SWC_ELEMENT_SET'
        PERFORM set_container
                              TABLES
                                    t_event_container
                              USING 'Header_Info'
                                    wa_order_header_in.
    to take in a itab and populate the container table with data, as shown below:
           ELEMENT TAB_INDEX ELEMLENGTH TYPE VALUE
         HEADER_INFO     000000     116     u     BAPISDHD1
         HEADER_INFO     000001     010     C
         HEADER_INFO     000002     070     C
         HEADER_INFO     000003     010     C
         HEADER_INFO     000004     004     C     OR
         HEADER_INFO     000005     010     C
         HEADER_INFO     000006     004     C     0001
         HEADER_INFO     000007     002     C     00
         HEADER_INFO     000008     002     C     01
         HEADER_INFO     000009     003     C     001
         HEADER_INFO     000010     004     C
         HEADER_INFO     000011     008     D     00000000
         HEADER_INFO     000012     001     C
         HEADER_INFO     000013     008     D     00000000
         HEADER_INFO     000014     004     C
         HEADER_INFO     000015     004     C
    where as the 'SAP_WAPI_START_WORKFLOW' expects the input_container to have
    'ELEMENT' 'VALUE' structure...
    Now, if we look at the output from SWC_ELEMENT_SET it has 'HEADER_INFO' for ELEMENT not the actual field names of the structures. so the move-corresponding also doesnot help.
    i hope this puts the situation more clearly.
    rgds
    VJ

  • Aggregation rules and pivot tables

    I have 3 measures in a pivot table out which 2 have aggregation rule set to SUM. The third measure has aggregation rule set to NONE.
    Although the third measure is a number I do not wish to show a grand total as it is the value in local currency and hence not additive as different regions have different currencies.
    However the Pivot table does not display the values of the third measure if the aggregation rule is set to NONE. The cells are blank.
    Is this expected behavior ? Can I over-ride this behavior ?
    Thanks

    What I have is a measure, value of inventory in local currencies. It is not additive because in the context of the report that I am working.
    I cannot move it to a dimension. One option I have is to move it to the rows section. But that messes up the format that is expected by the client.
    Any other ideas ?

  • Custom WQL global condition causing issues

    I created a custom Global Condition, that is causing my application to fail to install, with an error code of 0x80041005(-2147217403)  With out this requirement the application will install as intended.  The condition is:
    Setting Type: WQL query
    Data Type: Boolean
    Namespace: root\cimv2
    Class: Win32_QuickFixEngineering
    Property: HotFixID
    WQL query WHERE clause: HotFixID='KB2919355'
    Using powershell I get the following on one of the test computers:
    PS C:\Users\Administrator> $hotfix = "Select hotfixid from Win32_QuickFixEngineering where hotfixid='KB2919355'"
    PS C:\Users\Administrator> Get-WmiObject -query $hotfix
    __GENUS : 2
    __CLASS : Win32_QuickFixEngineering
    __SUPERCLASS :
    __DYNASTY :
    __RELPATH :
    __PROPERTY_COUNT : 1
    __DERIVATION : {}
    __SERVER :
    __NAMESPACE :
    __PATH :
    HotFixID : KB2919355
    PSComputerName :
    In the Requirement of the application I made the Operator: Equals and the Value: True.  When I simulate the deployment they are not, part of the "Requirements Not Met" tab, so I assume the requirement is working, but it is still failing.
    Any sugestions?

    I am seeing this in the AppIntentEval.log every time I attempt to deploy the application with the Custom Global condition.
    No dependencies for DeploymentType ScopeId_F79D5897-0BDA-46D4-8021-140E88B338D5/DeploymentType_14694d25-3c2e-4d69-84ce-29bfb37abffd/11. AppIntentEval 5/12/2014 1:36:31 PM 2628 (0x0A44)
    No dependencies for DeploymentType ScopeId_F79D5897-0BDA-46D4-8021-140E88B338D5/DeploymentType_dec8eb4c-e543-4a39-92a3-e0ca943f49c8/2. AppIntentEval 5/12/2014 1:36:31 PM 2628 (0x0A44)
    Evaluating Application policies for (Removed) AppIntentEval 5/12/2014 1:36:31 PM 2628 (0x0A44)
    Rejecting ScopeId_F79D5897-0BDA-46D4-8021-140E88B338D5/RequiredApplication_1876a49f-4da8-4454-8d5c-8095251c32fc/11 due to evaluation error AppIntentEval 5/12/2014 1:36:31 PM 2628 (0x0A44)
    ScopeId_F79D5897-0BDA-46D4-8021-140E88B338D5/DeploymentType_14694d25-3c2e-4d69-84ce-29bfb37abffd/11 :- Current State = Error, Applicability = Unknown, ResolvedState = None, ConfigureState = NotNeeded, Title = App_Name - Windows app package (*.appx, *.appxbundle) AppIntentEval 5/12/2014 1:36:31 PM 2628 (0x0A44)
    ScopeId_F79D5897-0BDA-46D4-8021-140E88B338D5/DeploymentType_dec8eb4c-e543-4a39-92a3-e0ca943f49c8/2 :- Current State = NotInstalled, Applicability = NotApplicable, ResolvedState = None, ConfigureState = NotNeeded, Title = Old_App - Windows app package (*.appx, *.appxbundle) AppIntentEval 5/12/2014 1:36:31 PM 2628 (0x0A44)
    ScopeId_F79D5897-0BDA-46D4-8021-140E88B338D5/Application_1876a49f-4da8-4454-8d5c-8095251c32fc/11 :- Current State = Error, Applicability = Unknown, ResolvedState = None, ConfigureState = NotNeeded, Title = App_Name AppIntentEval 5/12/2014 1:36:31 PM 2628 (0x0A44)
    ScopeId_F79D5897-0BDA-46D4-8021-140E88B338D5/RequiredApplication_1876a49f-4da8-4454-8d5c-8095251c32fc/11 :- Current State = Error, Applicability = Unknown, ResolvedState = None, ConfigureState = NotNeeded, Title = ApplicationIntentPolicy AppIntentEval 5/12/2014 1:36:31 PM 2628 (0x0A44)
    No dependencies for DeploymentType ScopeId_F79D5897-0BDA-46D4-8021-140E88B338D5/DeploymentType_14694d25-3c2e-4d69-84ce-29bfb37abffd/11. AppIntentEval 5/12/2014 1:39:20 PM 1508 (0x05E4)
    No dependencies for DeploymentType ScopeId_F79D5897-0BDA-46D4-8021-140E88B338D5/DeploymentType_dec8eb4c-e543-4a39-92a3-e0ca943f49c8/2. AppIntentEval 5/12/2014 1:39:20 PM 1508 (0x05E4)
    Evaluating Application policies for (Removed) AppIntentEval 5/12/2014 1:39:20 PM 1508 (0x05E4)
    Rejecting ScopeId_F79D5897-0BDA-46D4-8021-140E88B338D5/RequiredApplication_1876a49f-4da8-4454-8d5c-8095251c32fc/11 due to evaluation error AppIntentEval 5/12/2014 1:39:20 PM 1508 (0x05E4)
    ScopeId_F79D5897-0BDA-46D4-8021-140E88B338D5/DeploymentType_14694d25-3c2e-4d69-84ce-29bfb37abffd/11 :- Current State = Error, Applicability = Unknown, ResolvedState = None, ConfigureState = NotNeeded, Title = App_Name - Windows app package (*.appx, *.appxbundle) AppIntentEval 5/12/2014 1:39:20 PM 1508 (0x05E4)
    ScopeId_F79D5897-0BDA-46D4-8021-140E88B338D5/DeploymentType_dec8eb4c-e543-4a39-92a3-e0ca943f49c8/2 :- Current State = NotInstalled, Applicability = NotApplicable, ResolvedState = None, ConfigureState = NotNeeded, Title = Old_App - Windows app package (*.appx, *.appxbundle) AppIntentEval 5/12/2014 1:39:20 PM 1508 (0x05E4)
    ScopeId_F79D5897-0BDA-46D4-8021-140E88B338D5/Application_1876a49f-4da8-4454-8d5c-8095251c32fc/11 :- Current State = Error, Applicability = Unknown, ResolvedState = None, ConfigureState = NotNeeded, Title = App_Name AppIntentEval 5/12/2014 1:39:20 PM 1508 (0x05E4)
    ScopeId_F79D5897-0BDA-46D4-8021-140E88B338D5/RequiredApplication_1876a49f-4da8-4454-8d5c-8095251c32fc/11 :- Current State = Error, Applicability = Unknown, ResolvedState = None, ConfigureState = NotNeeded, Title = ApplicationIntentPolicy AppIntentEval 5/12/2014 1:39:20 PM 1508 (0x05E4)

  • How to create new rules and using 'From' condition ?

    All,
    I know, rules are a quota max as 256 ko.
    So, my problem is to move all mail from external writer of my directory.
    I want to create a folder Inbox\external where all mail have to be move on except internal mail.
    So I looked at :
    [-From <RecipientIdParameter[]>] ; [-FromAddressContainsWords <MultiValuedProperty>] and [-ExceptIfFrom <RecipientIdParameter[]>]  but, because of quota limitation, I could add all internal exchange recipients.
    Any idea ?
    Thanks

    Hi,
    If you would like to move the emails from external senders to a specific folder using Inbox rule.
    I’d recommend you create a  Dynamic Distribution Group and name it as
    internalrecipients. Then set it as All recipients in the filter tab. Now it is a group which contains all users and contacts in your organization.
    Next, set the Inbox rule in your client as below:
    Click on the Inbox folder and  new a Rule.
    Apply the rules on messages I receive.
    Send only to me.
    Move to the specified folder (new a folder named external).
    Except if from people or public group (internalrecipients).
    Run the rule now on message already in “Inbox”
    Finish.
    See if it works as you expected.
    Regards,
    Rebecca Tu
    TechNet Community Support

  • Row Curr/No Rows and ADF Table- Found the issue but no solution Attn: Frank

    I have an ADF table that has ten rows of data. I have set it to show 5. When I try to go to the next page by clicking "Next" and do a "Show All" I get Row Currency error and "No Rows." However, if I set the ADF Tbale to shopw 10 rows, it shows them all. Any ideas?
    I have been looking at it for a week.

    Error
    JBO-35007: Row currency has changed since the user interface was rendered. The expected row key was oracle.jbo.Key[]
    On the jspx, I have:
    ***** No rows yet. ******************
    In the message log, I have
    oracle.adf.controller.faces.lifecycle.FacesPageLifecycle addMessage
    WARNING: JBO-35007: Row currency has changed since the user interface was rendered. The expected row key was oracle.jbo.Key[]
    Oh, by the way, I see the message below, before any error happened
    Jun 11, 2008 12:29:38 PM oracle.adfinternal.view.faces.taglib.ValidatorTag createValidator
    SEVERE: attribute 'validatorId' is missing
    Jun 11, 2008 12:29:38 PM oracle.adfinternal.view.faces.taglib.ValidatorTag doStartTag
    WARNING: could not create validator for validatorId:null and binding:#{bindings.MenuId.validator}
    Jun 11, 2008 12:29:42 PM

  • Custom Page layout and related tmp files causing issues

    Hello,
    I am trying to create custom page layouts using Design Manager and then editing the html file using a text editor.
    I have created a content type (inherited from Page content type) and used this content type for my page layout. I used the snippet manager to add relevant webpart zones and snippets I needed and published the page layout. Under status it shows conversion
    successful but I can see another file with similar name to my page laout but with ~RF119c862.TMP being created. 
    Even if I publish my page layout my webparts (via snippets I added) doesn't reflect in the page. I checked the preview of my page layouts and webparts appear when it is in draft mode but the moment I publish it loses all snippets (webparts). 
    I checked the html even after the page layout is published and I can see all webpart zones, my divs and snippet code there, somehow once I publish it the corresponding aspx page doesn't get updated.
    Has anybody come across this before, I'm trying this on Office 365 tenant site.
    Regards,
    Manoj
    -- The opinions expressed here represent my own and not those of anybody else -- http://manojvnair.blogspot.com

    I have seen a similar problem on-prem when a client had distributed cache misconfigured, but as your problem is with SPO, I doubt that is the problem.
    Try creating another page layout but keep its associated content type untouched. Try adding snippets and such, publish and see what happens. If that works, then there must be something wrong with your custom content type.
    Also, when you save a change to your .html page layout, open its associated aspx page layout in SPD and see if your changes were reflected there as well. As soon as your edit a html page layout and save your changes, SharePoint should automatically update
    your aspx page layout right away.
    Eric Overfield - PixelMill -
    blog.pixelmill.com/ericoverfield -
    @EricOverfield

  • How do you handle update and delete rules for fact tables?

    I have a fact table with a composite key of 5 columns. Two of the columns are FKs to the date dimension. I was setting the delete/update rules for the FK relationship in SSMS and it had a problem with me creating cascade action on the FKs that connected
    to the date dimension.
    What is the proper way to set up FK relationships in fact tables with SSMS when  you have composite keys as most fact tables do?

    Yeah I understand all that. What I'm trying to do is to protect my database from RI violations that occur by production support people blowing away stuff in a dimension table but forgetting to blow away related records in the fact table. I want those fact
    records deleted automatically so we don't have orphan records which was a real issue at a previous engagement. Production support is usually just people that know SQL and some relational modeling. It's not too likely they will understand the details of dimensional
    modeling enough such that they would know that they had to blow away the fact record first.
    My problem is I have a FK to a role playing dimension (the date dimension in this case). So basically I have to columns in the fact table that have a FK relationship to the PK of the date dimension. When I create both relationships SSMS and try to have both
    of them cascade delete SSMS has an issue with it.
    The error I get is:
    Unable to create relationship '[relationship name]'
    Introducing Foreign Key constraint '[constraint name]' on table '[table name]' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other foreign key constraints.
    I can go ahead and put no action and the table will save fine. The question now becomes how does the cascade delete actually work. Can I just set one part of the key to cascade delete?
    Actually I just realized that this is an even bigger design issue. What DOES happen to a fact record when one of it's dimensions gets deleted and I've got full RI set up on the table?
    Or am I totally thinking about this wrong. Do you set up cascade deletes in a dimensional model? Is there a way to prevent deletes from the dimension table if there are related fact records?

  • Issue Using Boolean Attribute in Decision Tables Conditions

    I'm using Oracle BPM Suite 11g 11.1.1.4.0 for my application. In my business rules, I need to use the nillable boolean attribute in Decision Table conditions, so I import java.lang.Boolean class in the Java Facts, I append .booleanValue() to the condition. I validate the rule, it's ok. Then I deploy my application to server, when I test the my process, i encounter a error:
    <bpelFault><faultType>0</faultType><operationErroredFault xmlns="http://xmlns.oracle.com/LoanApprovalRules/LoanApprovalRules_DecisionService_1"><part name="payload"><errorInfo xmlns="http://xmlns.oracle.com/LoanApprovalRules/LoanApprovalRules_DecisionService_1"><errorMessage>The class 'com.oracle.xmlns.bpm.bpmobject.data.loaninfoobject.LoanInfoObjectType' has no member named 'hasAssets'. at line 6 column 3 in main</errorMessage></errorInfo></part></operationErroredFault></bpelFault>
    HasAssets is Bool type. If I remove java.lang.Boolean in Java Fact, and remove conditions of hasAssets, the process run perfectly.
    Can you help me?
    Thanks.

    I'm using Oracle BPM Suite 11g 11.1.1.4.0 for my application. In my business rules, I need to use the nillable boolean attribute in Decision Table conditions, so I import java.lang.Boolean class in the Java Facts, I append .booleanValue() to the condition. I validate the rule, it's ok. Then I deploy my application to server, when I test the my process, i encounter a error:
    <bpelFault><faultType>0</faultType><operationErroredFault xmlns="http://xmlns.oracle.com/LoanApprovalRules/LoanApprovalRules_DecisionService_1"><part name="payload"><errorInfo xmlns="http://xmlns.oracle.com/LoanApprovalRules/LoanApprovalRules_DecisionService_1"><errorMessage>The class 'com.oracle.xmlns.bpm.bpmobject.data.loaninfoobject.LoanInfoObjectType' has no member named 'hasAssets'. at line 6 column 3 in main</errorMessage></errorInfo></part></operationErroredFault></bpelFault>
    HasAssets is Bool type. If I remove java.lang.Boolean in Java Fact, and remove conditions of hasAssets, the process run perfectly.
    Can you help me?
    Thanks.

  • LSMW-Allocation Rule and Table creation.

    Hi Team,
    I need to create Allocation Rule and Table by using LSMW. I tried it using Recording method.
    Here issue I am facing is, I need to define Header and Item structure. Upto creation of Header data everything works fine
    For Allocation Rule, we require to upload multiple Customer or Sites with Quota as an Item data against one Base Site group  as in below format.
          SBELN  EKORG  EKGRP  SVBEZ     ARTKL        FILKLP           VQUOT 
    H     0001   1000        A07       Test      246402648   DUMMYGRP
               FILNR   VQUOT 
    D        500055   0
    D        500103   0
    D        500201   206
    For Allocation table, we require to upload multiple customer/sites against single Article and same for next articles as in below format.
      AUFAR  EKORG  EKGRP   BEZCH VKSTP WEFDT     VKSTP  WVDAT       MATNR PMNGE FILKL ASTRA
    H ZNLV     1000     A09          Test     D          03012014  D         21022014 0
            MATNR PMNGE FILKL ASTRA
    D      1234     40         21
    D      1234    40         23
    D      12345  10        10
    Could you please let me know, what changes I need to make in LSMW code so that it will read all Item data and update same at once.
    Thank you in advance.
    Regards,
    Rahul

    I went to SM30. But I dont <b>what to do there to make the field come in SE16</b>.In sm30 when I clicked on No restrictions and display, the field which was missing not able to see. But when I click on restrictions and display, the field is there.

  • Can too large a folder cause issues and effect performace of my Mac Pro

    Hi, I have a 180 gb folder filled with important data within my Home folder. This folder has a many subfolders as well. The folder is on my startup drive and where I have Snow Leopard installed. Can too large a folder cause issues with my mac and effect performance? Thanks

    another way to ask, would you make better use of, and improve I/O and performance, if you used your other drive bays? yes.
    Boot drives with even less than 50% free is probably not a good idea. All depends on whether 200GB is on 1TB or on 500GB drive. And how fragmented free space even.
    Lifting, loading and writing or copying 4GB files of course does have an impact, so if you work with 2GB files in CS5....
    Having a dedicated type boot drive, media drive (and isolate media and library files) as well as scratch drive is normally done with Mac Pro.
    The biggest bang in performance: lean mean SSD boot drive.

  • Field symbols as Table name and in where condition in a select statement

    Hello All,
    I have a scenario where I need to get user input on table name and old field value and new field value. Then based on user input, I need to select the record from the database. The column name for all the tables in question is different in the database, however there data type is the same and have same values.
    I am not able to use a field symbol for comparing the old field value to fetch the relevant record in my where clause.
    I cannnot loop through the entire table as it has 10 millilon records, please advice on how to add the where clause as field symbol as the table name is also dynamically assigned.
    Here is my code:
    DATA: TAB       LIKE SY-TNAME,
          TAB_COMP1 LIKE X031L-FIELDNAME,
          TAB_COMP2 LIKE X031L-FIELDNAME,
          NO_OF_FLD TYPE N.
    DATA: BEGIN OF BUFFER,
            ALIGNMENT TYPE F,
            C(8000)   TYPE C,
          END OF BUFFER.
    FIELD-SYMBOLS: <WA>   TYPE ANY,
                  <COMP1> TYPE ANY,
                  <COMP2> TYPE ANY.
    GET TABLE NAME GIVEN BY USER IN LOCAL VARIABLE
      TAB = TAB_NAME.
    CREATE FIELD NAME BASED ON THE TABLE NAME ENTERED.
      CASE TAB_NAME.
      WHEN 'OIUH_RV_GL'.
          KEY FIELD
            TAB_COMP1  = 'GL_GL_SYS_NO'.
            NO_OF_FLD  = 1.
      WHEN 'OIUH_RV_OPSL'.
          KEY FIELD
            TAB_COMP1  = 'OPSL_GL_SYS_NO'.
            NO_OF_FLD  = 1.
      WHEN 'OIUH_RV_OTAX'.
          NOT THE ONLY KEY FIELD
            TAB_COMP1  = 'OTAX_GL_SYS_NO'.
            TAB_COMP2  = 'OTAX_TAX_POS_NO'.
            NO_OF_FLD  = 2.
      WHEN 'OIUH_RV_GTAX'.
          NOT THE ONLY KEY FIELD
            TAB_COMP1  = 'GTAX_GL_SYS_NO'.
            TAB_COMP2  = 'GTAX_TAX_POS_NO'.
            NO_OF_FLD  = 2.
      WHEN OTHERS.
            EXIT.
      ENDCASE.
    SET FIELD SYMBOL WITH APPROPRIATE TYPE TO BUFFER AREA.
    ASSIGN BUFFER TO <WA> CASTING TYPE (TAB).
    How to add where clause and remove the if condition in the select -- endselect
    SELECT * FROM (TAB) INTO <WA>. 
      ASSIGN COMPONENT TAB_COMP1 OF STRUCTURE <WA> TO <COMP1>.
      IF NO_OF_FLD = 2.
        ASSIGN COMPONENT TAB_COMP2 OF STRUCTURE <WA> TO <COMP2>.
      ENDIF.
      IF <COMP1> = OLD_SYS_NO.
        code for updating table would come here
          WRITE: 'MATCH FOUND'.
          EXIT.
      ENDIF.
    ENDSELECT.
    Please advice. Thanks much.
    Edited by: Shipra Jhunjhunwala on Jul 22, 2009 1:33 PM
    Edited by: Shipra Jhunjhunwala on Jul 22, 2009 1:34 PM
    Edited by: Shipra Jhunjhunwala on Jul 22, 2009 1:35 PM

    1. Create single column table for holding field name depending on the table entered.
    2. Take input from user: for e.g. table_name
    3. Using case load single column table with required fields
       for e.g.
      CASE TAB_NAME.
       WHEN 'OIUH_RV_GL'.
             Append 'GL_GL_SYS_NO' to KEY_FIELD --> KEY_FIELD is the single line internal table as mentioned in step 1.
       WHEN 'OIUH_RV_OPSL'.
             Append 'OPSL_GL_SYS_NO'.
       WHEN 'OIUH_RV_OTAX'.
             Append 'OTAX_GL_SYS_NO' to KEY_FIELD.
               APPEND 'OTAX_TAX_POS_NO' to KEY_FIELD.
       WHEN 'OIUH_RV_GTAX'.
             Append 'GTAX_GL_SYS_NO' to KEY_FIELD.
               APPEND 'OTAX_TAX_POS_NO' to KEY_FIELD.
       WHEN OTHERS.
          EXIT.
       ENDCASE.
       Now depending on the table name you have required column ready
    4. Create dynamic internal table using following sudo code
       Fill the fieldcatlog using the single column field table and DD03L table, See what all columns from DD03L you want to fill in field catlog table
       loop at internal table with all the fields.
        move it to field catalog.
        append field catalog.
       endloop.
    5. Pass this field catalog table to static method create_dynamic_table method
       DATA table TYPE REF TO DATA. --> data object for holding handle to dynamic internal table.
       call method cl_alv_table_create=>create_dynamic_table
       exporting
          it_fieldcatalog = fieldcatalog_tab
       importing
          ep_table = table.
    6. Now assign table reference to field symbol of type table.
       ASSIGN table->* to <field-tab>.
    7. Also create work area <field-wa> using refrence of table.
       create data object wa LIKE LINE OF <field-tab>.
       ASSIGN wa->* to <field-wa>.
    8. Also define field symbol for field name.
       for e.g. <field_name>
    4. Dynamic internal table is ready
    5. Now execute the select statement as follows:
       SELECT (KEY_FIELD)
         INTO <ITAB> --> created dynamically above
          FROM (TABLE_NAME)
         WHERE (WHERE).  --> WHERE is single line internal table having line type of CHAR72. So for every old value there will be one line
         Where condition is same as like we give in static way only difference in this case it will stored in internal table line wise.
        In this case you need to append all your where condition line by line in to WHERE.     
    5. To fill this dynamic internal table using ASSIGN COMPONENT <Comp_number> OF STRUCTURE <field-wa> TO <field-name>
       So in this case if first field of structure STRUCT1 is user_id then sudo-code will be
       loop at internal table containing list of fields into field_wa --> single column field table
           ASSIGN COMPONENT field_wa OF STRUCTURE <field-wa> TO <field>. "Here field_wa is wa area for single column internal table holding all the fieldnames.
           Now <field-name> points to user_id field. Move some value into it as nornally we do with variables.
           Move <your_new_value> to <field-name>. --> Assign new value
            or
            <field-name> = <your_new_value>.
       Endloop.
    6. After completing all the fields one row will be ready in <field_wa>.
       APPEND <field_wa> to <field_tab>.
    Hope this helps you.
    Thanks,
    Augustin.

  • DIFF: Field string ,Structure and Internal table declaration

    Hai,
           what is the diference between  Field string ,Structure in ABAP program and Internal table declaration and how it will work ?
    Thank you
    ASHOK KUMAR.

    hi,
    Look this u will get a good idea.
    *& Report  ZTYPES                                                      *
    REPORT  ZTYPES                                                  .
    * Table declaration (old method)
    DATA: BEGIN OF tab_ekpo OCCURS 0,             "itab with header line
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
    END OF tab_ekpo.
    *Table declaration (new method)     "USE THIS WAY!!!
    TYPES: BEGIN OF t_ekpo,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
    END OF t_ekpo.
    DATA: it_ekpo TYPE STANDARD TABLE OF t_ekpo INITIAL SIZE 0,      "itab
          wa_ekpo TYPE t_ekpo.                    "work area (header line)
    * Build internal table and work area from existing internal table
    DATA: it_datatab LIKE tab_ekpo OCCURS 0,      "old method
          wa_datatab LIKE LINE OF tab_ekpo.
    * Build internal table and work area from existing internal table,
    * adding additional fields
    TYPES: BEGIN OF t_repdata.
            INCLUDE STRUCTURE tab_ekpo.  "could include EKKO table itself!!
    TYPES: bukrs  TYPE ekpo-werks,
           bstyp  TYPE ekpo-bukrs.
    TYPES: END OF t_repdata.
    DATA: it_repdata TYPE STANDARD TABLE OF t_repdata INITIAL SIZE 0,   "itab
          wa_repdata TYPE t_repdata.                 "work area (header line)
    Regards
    Reshma

  • How to check which RFCs causing issues in the system and RFC response times

    Hi,
    We have an issue with the RFC response times in CRM and need investigstion. We need to know which Which RFCs causing issues and how we can solve the problems.
    Regards

    Hi,
    chek the below code
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_EXIST
    EXPORTING
    FILE = W_FILENAME
    RECEIVING
    RESULT = W_RESULT
    EXCEPTIONS
    CNTL_ERROR = 1
    ERROR_NO_GUI = 2
    WRONG_PARAMETER = 3
    NOT_SUPPORTED_BY_GUI = 4
    others = 5.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-* MSGNO WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    IF W_RESULT IS INITIAL.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_EXIST
    EXPORTING
    DIRECTORY = W_FILENAME
    RECEIVING
    RESULT = W_RESULT
    EXCEPTIONS
    CNTL_ERROR = 1
    ERROR_NO_GUI = 2
    WRONG_PARAMETER = 3
    NOT_SUPPORTED_BY_GUI = 4
    OTHERS = 5.
    IF SY-SUBRC <> 0.
    ENDIF.
    ENDIF.
    IF W_RESULT = 'X'.
    RC = '1'.
    ELSE.
    RC = '0'.
    ENDIF.
    reward if helpful.
    Regards,
    nagaraj

Maybe you are looking for

  • How to Print File as the same as picture/fax viewer ?

    Hallo : I wrote a program which can let the specified png file to be printed. (png file is about 17xx * 11xx, output to A4 paper) The goal is the print result as the same as the windows built-in picture/fax viewer (by Full Page Fax Print Mode) And I

  • AppLocker service issue: AppIDSvc not running, but enforcement working.

    I have a strange problem with AppLocker.  I configured the service (AppIDSvc) and some policies using group policy and deployed it to some computers in my domain.  I logged onto one of the systems and verified that AppIDSvc was running, and that enfo

  • How can I add a digital download (pdf) to an autoresponder from a web form?

    I have a simple web form on my site, name and email.  I know how to access and edit the autoresponder email, but I dont know how to add a digital download.  I want the auto responder to include a PDF.  Can anyone help me with this? G

  • Template problem with a scroll

    Hi, This is Niranjan Reddy. I am using the ADF Ritch client with JDeveloper 11g Premier 1. I created a template with a panelstrech layout(position:absolute;width:100%;height:100%). My requirment is to increase the height of the layout when the compon

  • Changing the Label of the LDB - PNP Screen Field(Date field)

    Hi, I got a req. to change the label of the field "Data Selection Period".  This field is from PNP LDB. Pls let me know, is there any FM or any other process?