OrgModeler - Deleting scenarios

Using OrgModeler (Staged Oracle 2.9.44.1).
When I have a list of created scenarios, I can't delete.  I click on the scenario, click delete scenario and confirm I want to delete.  The pop up window disappears, my main window refreshes but my scenario is still there.
The CDS log (logging level 1 set) shows several lines with this 1 line the only one in error:
ERROR: DataAccess.performCommands : Source {Nakisa.Framework.Data.DataProcessor}: Message {Object reference not set to an instance of an object.}
I know my userid has the access level to be able to drop tables in the Oracle DB so I am unsure why the scenario isn't being deleted.
(Note:  I have tried this with and without authentication enabled.  Same behaviour)
Any ideas anyone?
Edited by: Stephen Burr on Mar 2, 2009 1:44 PM

Hi,
I need a help from you.
I am trying to have NAKISA integrated with SAP system to have org chart functionalities. by the way have got the "Org Chart" working and geting information from the Backend SAP system
But when I tried to have Org Modeler functionality in NAKISA, should I have to pull data once again from the backend system.? Or It would get it from the NAKISA's own data base ? (In where the informations  stored which came from SAP system)
My connectvity is based on Staged in Org Chart.
But I could not find the Staged method in Org Modeler.
Let me know if you could help me in this

Similar Messages

  • OrgModeler - Unable to delete scenarios

    Hi experts,
    We're on OrgModeler 3.0 SP2.
    We're not able to delete scenarios that we've created. When we right click on the scenario, the "delete scenario" isn't one of the options in the dropdown. Has anyone seen this before?
    Thanks,
    L

    Hi L,
    If the scenario that you are right-clicking is loaded then you have to Unload it before you can Delete it. Otherwise, there might be a bug if you have no delete option for any scenario.
    Best regards,
    Luke

  • Deleting scenario from Integration Repository.

    Dear All,
    I was having one scenario in the Dev server which was having all the objects in it like namespace, DT, MT, MI, MM & IM. After  testing now I want to delete the complete scenario from Repository. I have deleted all the objects like DT, MT, MI, MM & IM. But when I am deleting the namespace its giving me an error that delete the objects first. I am checking the objects and none of them is existing as I have already deleted them. I have even activated the scenario after deletion of the objects.
    When I am deleting the namespace then its giving me an error that 2 objects are already exisitng and they will be deleted irrevocably.
    Please guide me on how to delete the complete scenario fro IR.
    Regards,
    jain

    Hi nishu,
    First activate the two default data types(exchane ,log) thats created during any namespace creation and then try to delete the namespace...it should be deleted now...!!!
    If u still face the problem!!!
    click on the namespace and chek "where-used"..then u can see ...which objects are still associated with it....after deleting activate the changelist..then...delete the namespace!!!
    regards
    biplab

  • Issue in workflow - Logically Deleted Scenario

    Hi,
    We have an issue in Journal Entry Workflow. The user has tried to upload a document for Journal Entry Posting. Document is in Parked Status. In the workflow, when it has come to the required step of workflow approval and checks for the document type, it has got logically deleted. Thereby the workflow got terminated.
    Kindly let us know as how to proceed further. What would have been the reason for this automatic logical delete? Mail us the solution regarding the same.
    Regards,
    Veera

    Automatic Logical deletion ! I think this is not possible check with the log of the workitem whose user id is appearing then in the code check weter you have assigned any FM to locially delete the work item which is being trigered by mistake if not just start another WF and proceed with your work.
    Regards
    Bikas

  • Org Modeler Deletion Issue

    Hi all,
    I am having a similar issue to Steve as described here:
    OrgModeler - Deleting scenarios
    When I try to delete scenarios they don't disappear. Is there a config setting I should update to resolve this?
    Thanks,
    James
    Edited by: James Michael II on Oct 20, 2009 11:49 PM

    Hi Luke,
    I made the change in the Admin_Config and I am now getting a different error (see below - sorry its so long). What am I missing here?
    Thanks,
    James
    10/21/2009 10:33 AM:     ERROR: ApplicationConfiguration : getDataElement : data element: Nakisa_LoadUserObject does not exist.
    10/21/2009 10:33 AM:     INFO: BAPI_HROCI_BaseClass.getDataSet() :  Connecting using UserId and Password from User Object.
    10/21/2009 10:33 AM:     INFO: BAPI_HROCI_BaseClass.getDataSet() :  Connecting using UserId and Password from User Object.
    10/21/2009 10:33 AM:     INFO: BAPI_HROCI_BaseClass.getDataSet() :  Connecting using UserId and Password from User Object.
    10/21/2009 10:33 AM:     INFO: BAPI_HROCI_BaseClass.getDataSet() :  Connecting using UserId and Password from User Object.
    10/21/2009 10:33 AM:     INFO: BAPI_HROCI_BaseClass.getDataSet() :  Connecting using UserId and Password from User Object.
    10/21/2009 10:33 AM:     INFO: BAPI_HROCI_BaseClass.getDataSet() :  Connecting using UserId and Password from User Object.
    10/21/2009 10:33 AM:     INFO: BAPI_HROCI_BaseClass.getDataSet() :  Connecting using UserId and Password from User Object.
    10/21/2009 10:33 AM:     INFO: BAPI_SP_BaseClass.getDataSet() :  Connecting using UserId and Password from User Object.
    10/21/2009 10:33 AM:     INFO: BAPI_SP_BaseClass.getDataSet() :  Connecting using UserId and Password from User Object.
    10/21/2009 10:33 AM:     INFO: BAPI_SP_BaseClass.getDataSet() :  Connecting using UserId and Password from User Object.
    10/21/2009 10:33 AM:     INFO: BAPI_HROCI_BaseClass.getDataSet() :  Connecting using UserId and Password from User Object.
    10/21/2009 10:33 AM:     INFO: BAPI_HROCI_BaseClass.getDataSet() :  Connecting using UserId and Password from User Object.
    10/21/2009 10:33 AM:     INFO: BAPI_HROCI_BaseClass.getDataSet() :  Connecting using UserId and Password from User Object.
    10/21/2009 10:33 AM:     INFO: BAPI_HROCI_BaseClass.getDataSet() :  Connecting using UserId and Password from User Object.
    10/21/2009 10:33 AM:     INFO: BAPI_SP_BaseClass.getDataSet() :  Connecting using UserId and Password from User Object.
    10/21/2009 10:33 AM:     INFO: BAPI_SP_BaseClass.getDataSet() :  Connecting using UserId and Password from User Object.
    10/21/2009 10:33 AM:     INFO: BAPI_SP_BaseClass.getDataSet() :  Connecting using UserId and Password from User Object.

  • Deletion of Leave which is in Status 'SENT' by employee in SAP HR

    Hi All,
    We are using BADI  (BAdI Definition PT_ABS_REQ) for leave validation. In this validation we are checking Current Leaves with the Leaves already applied (Approved / Non-approved).
    In this process, We are trying to DELETE a leave which is in status 'SENT'.
    Issue:
    When we CREATE a new leave, importing parameter of BADI is IM_ATTABS_TAB (type PTARQ_ATTABSDATA_TAB) -Operation = INS.
    And when we DELETE the leave with 'SENT' status, It is also coming IM_ATTABS_TAB - operation = INS.
    Due to above issue, my validation is getting triggered even in DELETE scenario which is not required.
    Please help on this.
    Thanks in advance.
    Hemendra Singh

    to change the status by user, he can modify the hours in the application and resubmit
    For administrator purposes, you should cats_appr_lite, you can reject the all time and do it,
    Do not make any changes directly to CATSDB< it might cause inconsistency
    So better use standard transaction like cats_appr_lite or cats_da

  • How to explain the business requirement of a file to rfc scenario

    Hello Experts,
                       How do i explain the business requirement of
        1. FILE TO IDOC.
        2. FILE TO RFC.
        3. FILE TO JDBC scenarios?
            Cud anybody explain me how to explain the requirement of these scenarios in an interview?Cud u pls send me the example for these and the systems involved and the documents involved...helpful answers will be rewarded...
                                                                                    cheers
                                                                                    Jay.
    my mail :  [email protected]

    <b>1. FILE TO IDOC</b>.
    When u have ur master data stored in a file thru a legacy system say in some xml format then u may need to have this scenario configured.
    <b>2. FILE TO RFC.</b>
    Consider pt1 but here for example consider delete scenario. when u have deleted the mater/transaction u may need to update another file...so in this case u will need to config this scenario...y we cannot use idoc is becoz sync scneario is not possible with idoc but yes with rfc
    <b>3. FILE TO JDBC scenarios?</b>
    u have some business data extracted from a file and before u update a r3 transaction u may need to refer a datbase table to read some data baed on keyfield...so u will take a jdbc response and based on that u may validate with the data for r3 updation.
    the scenario keeps varying in real life and the above are very few examples of the kind of scenario that would exists in the business world

  • File2file scenario. Issue with Processing mode

    Doing a file2file scenario.
    The sender comm channel's processing mode is "DELETE"
    Scenario is executed successfully and i see the output message also.
    But the input file is not deleted.
    What could the reason?
    regs
    Kiran.

    Hi,
    This will not happen to this scenario if u select the processing mode as delete.the file shld be delete from the source dir.
    Check it once again and make sure that you have activated the ID objects after u make any changes.
    Do SXI_CACHE also
    Regards
    Seshagiri

  • Selected Column insert, delete and updation at replication end

    Hello,
    In GoldenGate, is there a way to get a timestamp column at target table to get updated for some selected columns from source table only. For eg.
    At source - Table Temp_Source , columns - Emp_Id (PK), Emp_Name, Department, Address
    At target - Table Temp_Target, columns - Emp_Id (PK), Emp_Name, Department, Last_Update
    The Last_Update column takes timestamp for last updation made at source table which is replicated at target end.
    Now I just want the changes made in EMP_Id, EMP_Name , Department columns to be replicated at target table and also the Last_Update to get updated for changes made in these columns only. The changes made in Address column should not affect Last_Update at target end.
    The extract or replication script for this should work for insert, update and delete scenarios for specified columns. Using COLS creates problem in insertion as it Abends the replication process.
    Is there any way I can achieve this functionality??

    At target end I have written the following code in Replication process -
    GetUpdates
    IgnoreInserts
    IgnoreDeletes
    Map <source table>, target <target table>, COLMAP (USEDEFAULTS, LAST_UPDATE = @IF((EMP_ID <> BEFORE.EMP_ID OR EMP_NAME <> BEFORE.EMP_NAME OR DEPT <> BEFORE.DEPT), @getenv("GGHEADER", "COMMITTIMESTAMP"),REFRESH_TIMESTAMP));
    But this code entertains only the Primary Key changes i.e. EMP_ID, I want the Last_update to get updated for changes in EMP_NAME and DEPT even but not for Address column change at source end.

  • Importing FR reports and deleting dims

    We recently created another application and with a fewer dimensions.
    We have a bunch of FR reports which I are needed to be imported.
    My question:
    Is there a way to delete certain dimensions from the reports before opening the reports in new application.
    And keep everything else the same?
    I am trying to avoid doing the reports all over again which will take significant amount of time.

    Are the deleted dimensions in POV?
    Then you can create a new database connection with the new App:DB in Workspace.
    in .des file check for <POV> under that header there will be
    <DIMENSION DISABLED="0" HIDDEN="0" NAME="Scenario">
    <METADATAEXPRESSION VALUE="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;COMPOSITEOPERATION TYPE=&quot;MemberQuery&quot;&gt;&lt;OPERATION TYPE=&quot;Select&quot;&gt;&lt;MULTIVALUE&gt;&lt;STRING&gt;Name&lt;/STRING&gt;&lt;/MULTIVALUE&gt;&lt;STRING&gt;Scenario&lt;/STRING&gt;&lt;/OPERATION&gt;&lt;COMPOSITEOPERATION TYPE=&quot;Filter&quot;&gt;&lt;OPERATION TYPE=&quot;Member&quot;&gt;&lt;STRING&gt;User Point of View for Scenario&lt;/STRING&gt;&lt;STRING&gt;Scenario&lt;/STRING&gt;&lt;/OPERATION&gt;&lt;/COMPOSITEOPERATION&gt;&lt;/COMPOSITEOPERATION&gt;"/>
    </DIMENSION>So in this case if you deleted Scenario, then remove this portion from the file, save the file, import it and change the database connection to the new one.
    If the dimension is in ROW or Column or Page then the process is too complicated.
    Regards
    Celvin
    http://www.orahyplabs.com
    Please mark the responses as helpful/correct if applicable

  • Schedule jobs in SRM

    Hi
    may i know the purpose of scheduled jobs in SRM like BBP_GET STATUS2 and CLEAN REQREQUP.  i just want to know why/when we are using these jobs in SRM.
    please suggest me with your finest solutions. kindly help.
    Regards
    sss

    Hello,
    BBP_GET_STATUS_2 Update Status Information
    Description:
    After the documents (purchase requisition, purchase order, reservation) have been created in the backend system for a requirement coverage request, the following references are stored in the requirement coverage request:
    The name of the backend system in which the documents exist.
    The document numbers
    Subsequent activities for the documents can take place in the backend system. For example, a goods receipt for a purchase order. Using the report "Update requirement coverage requests", you can transfer the following information on subsequent activities from the backend system to the Enterprise Buyer System:
    For the purchase requisition: the purchase order that was created with reference to the purchase requisition, the goods receipt quantity and the invoiced quantity for the purchase order
    For the purchase order: the goods receipt quantity and the invoiced quantity
    For the reservation: the quantity withdrawn
    The report always updates all requirement coverage requests for which documents have been created.
    You should only start the report in the background. We recommend starting the report daily. In this way, you ensure that the information that the user sees in the "Status and Delete" scenario is up-to-date.
    Output
    The report either issues a message stating that the changes have been made successfully, or issues an error log.
    The log can contain the following types of errors:
    In the Enterprise Buyer system, there is the information that the requirement coverage request has been transferred to the backend system (status 6), but no reference is transferred to the requirement coverage request.
    The system did not find the R/3 document to which the cross-reference is made.
    In this case, the report only writes the changes to the Enterprise Buyer system for those requirement coverage requests that do not contain errors.
    Communication errors
    CLEAN_REQREQ_UP reads table BBP_DOCUMENT_TAB and checks if the relevant follow-on document has been created for an SRM document.
    If the follow-on document exists, the object relationships for the SRM document are updated, the status is set, and the relevant entry is deleted from table BBP_DOCUMENT_TAB.
    If the follow-on document does not exist, the entry remains in table BBP_DOCUMENT_TAB, where it can be checked again the next time the report is run.
    Background:
    If follow-on documents (local or backend documents) are created for SRM documents, the checks to see if a follow-on document can be created are run synchronously. However, the actual creation of the follow-on document is carried out asynchronously.
    In order to check if a follow-on document has actually been created, an entry is written to system BBP_DOCUMENT_TAB in SRM. This entry contains the object type and object ID of the SRM document and the object type, ID and system of the follow-on document.
    You should schedule report CLEAN_REQREQ_UP as a job so that it runs at regular intervals.
    Regards, Dean
    Edited by: Dean Hinson on Jun 10, 2009 7:17 PM

  • Select records based on criteria and update those records once read

    hi,
    I am very new to bpel and DB adapters.
    I have a requirement where in I need to query two tables to fetch some records and update these selected records with a new value for field to indicate that bpel has processed these records.
    Once I select these I needs the output to be mapped to the output variable.
    I am able to select the records based on criteria , but how will i lock these records so that these records do not get processed again. This should be a very simple usecase just that I am not aware.
    Thanks,
    Robin

    Once you have finished reading the records fire an update query , update some field in the table so that it does not get picked up next time.
    if you are using polling for picking up the records, then use logical delete scenario, refer....http://docs.oracle.com/cd/E15523_01/integration.1111/e10231/adptr_db.htm#BABEEBIH

  • Handle long-running EDT tasks (f.i. TreeModel searching)

    Note: this is a cross-post from SO
    http://stackoverflow.com/questions/9378232/handle-long-running-edt-tasks-f-i-treemodel-searching
    copied below, input highly appreciated :-)
    Cheers
    Jeanette
    Trigger is a recently re-detected SwingX issue (https://java.net/jira/browse/SWINGX-1233): support deep - that is under collapsed nodes as opposed to visible nodes only, which is the current behaviour - node searching.
    "Nichts leichter als das" with all my current exposure to SwingWorker: walk the TreeModel in the background thread and update the ui in process, like shown in a crude snippet below. Fest's EDT checker is happy enough, but then it only checks on repaint (which is nicely happening on the EDT here)
    Only ... strictly speaking, that background thread must be the EDT as it is accessing (by reading) the model. So, the questions are:
    - how to implement the search thread-correctly?
    - or can we live with that risk (heavily documented, of course)
    One possibility for a special case solution would be to have a second (cloned or otherwise "same"-made) model for searching and then find the corresponding matches in the "real" model. That doesn't play overly nicely with a general searching support, as that can't know anything about any particular model, that is can't create a clone even if it wanted. Plus it would have to apply all the view sorting/filtering (in future) ...
    // a crude worker (match hard-coded and directly coupled to the ui)
    public static class SearchWorker extends SwingWorker<Void, File> {
        private Enumeration enumer;
        private JXList list;
        private JXTree tree;
        public SearchWorker(Enumeration enumer, JXList list, JXTree tree) {
            this.enumer = enumer;
            this.list = list;
            this.tree = tree;
        @Override
        protected Void doInBackground() throws Exception {
            int count = 0;
            while (enumer.hasMoreElements()) {
                count++;
                File file = (File) enumer.nextElement();
                if (match(file)) {
                    publish(file);
                if (count > 100){
                    count = 0;
                    Thread.sleep(50);
            return null;
        @Override
        protected void process(List<File> chunks) {
            for (File file : chunks) {
                ((DefaultListModel) list.getModel()).addElement(file);
                TreePath path = createPathToRoot(file);
                tree.addSelectionPath(path);
                tree.scrollPathToVisible(path);
        private TreePath createPathToRoot(File file) {
            boolean result = false;
            List<File> path = new LinkedList<File>();
            while(!result && file != null) {
                result = file.equals(tree.getModel().getRoot());
                path.add(0, file);
                file = file.getParentFile();
            return new TreePath(path.toArray());
        private boolean match(File file) {
            return file.getName().startsWith("c");
    // its usage in terms of SwingX test support
    public void interactiveDeepSearch() {
        final FileSystemModel files = new FileSystemModel(new File("."));
        final JXTree tree = new JXTree(files);
        tree.setCellRenderer(new DefaultTreeRenderer(IconValues.FILE_ICON, StringValues.FILE_NAME));
        final JXList list = new JXList(new DefaultListModel());
        list.setCellRenderer(new DefaultListRenderer(StringValues.FILE_NAME));
        list.setVisibleRowCount(20);
        JXFrame frame = wrapWithScrollingInFrame(tree, "search files");
        frame.add(new JScrollPane(list), BorderLayout.SOUTH);
        Action traverse = new AbstractAction("worker") {
            @Override
            public void actionPerformed(ActionEvent e) {
                setEnabled(false);
                Enumeration fileEnum = new PreorderModelEnumeration(files);
                SwingWorker worker = new SearchWorker(fileEnum, list, tree);
                PropertyChangeListener l = new PropertyChangeListener() {
                    @Override
                    public void propertyChange(PropertyChangeEvent evt) {
                        if (evt.getNewValue() == SwingWorker.StateValue.DONE) {
                            //T.imeOut("search end ");
                            setEnabled(true);
                            ((SwingWorker) evt.getSource()).removePropertyChangeListener(this);
                worker.addPropertyChangeListener(l);
                // T.imeOn("starting search ... ");
                worker.execute();
        addAction(frame, traverse);
        show(frame)
    }

    At the end of the day, it turned out that I asked the wrong question (or right question in a wrong context ;-): the "problem" arose by an assumed solution, the real task to solve is to support a hierarchical search algorithm (right now the AbstractSearchable is heavily skewed on linear search).
    Once that will solved, the next question might be how much a framework can do to support concrete hierarchical searchables. Given the variety of custom implementations of TreeModels, that's most probably possible only for the most simple.
    Some thoughts that came up in the discussions here and the other forums. In a concrete context, first measure if the traversal is slow: most in-memory models are lightning fast to traverse, nothing needs to be done except using the basic support.
    Only if the traversal is the bottleneck (as f.i. in the FileSystemModel implementations of SwingX) additional work is needed:
    - in a truly immutable and unmodifiable TreeModel we might get away with read-only access in a SwingWorker's background thread
    - the unmodifiable precondition is violated in lazy loading/deleting scenarios
    there might be a natural custom data structure which backs the model, which is effectively kind-of "detached" from the actual model which allows synchronization to that backing model (in both traversal and view model)
    - pass the actual search back to the database
    - use an wrapper on top of a given TreeModel which guarantees to access the underlying model on the EDT
    - "fake" background searching: actually do so in small-enough blocks on the EDT (f.i. in a Timer) so that the user doesn't notice any delay
    Whatever the technical option to a slow search, there's the same usability problem to solve: how to present the delay to the end user? And that's an entirely different story, probably even more context/requirement dependent :-)
    Thanks for all the valuable input!
    Jeanette

  • How many Solutions entries in Solution Directory?

    What is the best practice for setting up Solutions in the Solution Directory?
    Should we have one for all business processes?
    Should we have maybe something like the following?
    1. Campaign to Cash Business Processes
    2. Employee Business Processes
    3. Solution Manager -- ITIL Business Processes
    Are there any disadvantage to having multiple solution entries?
    I searched service.sap.com and this forum for an answer before posting this question.
    Regards,
    Mel Calucin
    Bentley Systems

    Hi Mel,
    I will try to answer your questions:
    1. New and to-be-modified business processes are developed and tested using Solution Manager Projects and are never developed or tested using Solution Manager Solutions; CORRECT!
    therefore, Solution Manager Solutions only contain production business processes.
    CORRECT! you can transfer the business processes in a project to a Solution to used for example "Business Process Monitoring scenario"
    2. When a Solution Manager Project is completed, business processes in that Project are copied to one or more Solution Manager Solutions; consequently, the business processses become production business processes.
    Correct!
    3. The structure of a Solution Manager Solution is the same as a Solution Manager Project; however, some tabs in a Solution Manager Solution are not modifiable and can only be populated when a business process in a Solution Manager Project is copied to the Solution Manager Solution.
    You can transfer the data from a project to a Solution, and in this case you will get the same business scenario structure that you had in SOLAR01, but you can change this structure in order to delete scenarios, or add new once.
    Also you can create a clean solution and add this Business Scenarios manually comming from different projects if you like.
    4.
    5. The business processes defined under a Solution or Project must be linked to a Logical Component
    Correct!
    The business scenarios that you define in your solutions are only use for "Business Process Monitoring" scenario.
    Usually other customer creates Solutions and add the logical components that ate included in the solution.
    6,7, 8 Logical component definition
    A logical component define the different systems, with different roles involved in a
    usual DEVclient->QUA_client->PRD_client landscape for a specific version and installation type.
    For example, a usual logical component would be:
    Z_ECC60: DEV 100 QUA 200 PRD 300
    You can also enter other system roles in this logical component
    This DEV 100,etc, has previously defined in SMSY and RFC connection created to these satellites.
    9. Correct! because the processe take place in logical components finally, in SAP or not SAP systems.
    "Given the above statements are true, the goal would be to document all business processes in Solution Manager Solutions. It is unnecessary to create Solution Manager Solutions based on system roles e.g. one for Solution Manager Solution for Production, one Solution for QA, one for Dev or combinations of system roles e.g. Dev->QA->Production. By defining one Solution Manager Solution, the system roles are also defined for the business processes contained in the Solution Manager Solution."
    The goal is to have the documentation of the business processes in the SOLMAN system.
    The Solution are mainly created for Administration and monitoring activities, based on system "basis" site, so usually Solution are created for these purposes usually after the Go live of the project.
    I mean, Solution are used for the technical part of the project.
    Although for Service Desk and Change request management scenarios more than
    technical roles must be involved.
    So, do you want to generate a report with the response times for all your productive systems? if yes, you will need to define a Solution that includes all
    the logical components available in your landscape, but only "Put in Solution" the production systems.
    Do you want to see the alerts from only want system, instead of seeing a graphic with 10 systems, you will need to create a Solution with only this system.
    Usually to have a Solution with all system is not operational, unless you have few systems.
    I have to insist in the idea that the Solution is not used by "Functional" team, mainly for "Technical" team.
    !"My quesiton is: Is it better to have one Solution Manager Solution for all business processes or to divide the business processes into multiple Solutions. If it is better to break up the business processes into multiple Solutions, what is the best way to break them up? Does SAP offer a best practice for this?"
    Usually customer even not define the Business Scenarios in their Solution for the Operational scenarios, because these Business Scenarios are not used.
    Hope this clarify your questions, best regards,
    Dolores

  • Matrix Processing

    Good Afternoon
    Experts:
    I have searched through the Forums for assistance with Matrix processing but have not found enough info to help get me started. 
    <b>Scenario:</b>
    I have a new Add-on screen for a multi-line requisition.  This screen uses a header table and a detail table.  The header table contains a record with all the unique header info for each new requisition.  The detail table contains a record for each row in the Matrix.  Adding a new requistion with mulitple lines(rows in Matrix) is no problem. 
    When I save and re-open the requisition, I need to be able to account for the updating and deleting of the rows in the Matrix.  In the past in a simpler screen, I used a transaction to delete the detail records from the table and then just re-write what was in the Matrix.  This was easier than trying to figure out how to keep track of lines that were deleted and which ones were updated since the User was able to change the order of the rows. 
    Now, I need to figure out how to manage the Matrix without deleting the detail tables and re-adding what is in the Matrix. 
    This seems like it may be a difficult undertaking.  Are there any "secrets" that you all can help me out with? Or point me in the right direction?
    Thanks,
    Ed

    Ed ...
    Here is something you could do (if I understand your problem).
    First you have to treat the Line# as some sort of Autonumber (i think we've been through this before).  I wouldn't let the user enter the number since then you could have a Primary Key violation in case they are entering an existing one.
    Then I use a complex logic to determine in a loop if the record exists already in the database and if any of it fields has changed. (ADD and UPDATE scenarios).  Here's a raw code
                                            Dim oMatrix As SAPbouiCOM.Matrix = oForm.Items.Item("mat").Specific 'matrix
                                            For i As Int16 = 1 To oMatrix.RowCount - 1
                                                Dim oCode As SAPbouiCOM.EditText = oMatrix.Columns.Item("Code").Cells.Item(CInt(Val(i))).Specific
                                                Dim oCol2 As SAPbouiCOM.EditText = oMatrix.Columns.Item("Col2").Cells.Item(CInt(Val(i))).Specific
                                                strSQL = "IF EXISTS (SELECT * FROM [@TAB1] WHERE Code = '" & oCol1.Value & "' AND U_Col2 = " & oCol2.Value & ")" & vbLf & _
                                                         "BEGIN" & vbLf & _
                                                         "     IF (SELECT U_Col2 FROM [@TAB1] WHERE Code = '" & oCode.Value & "'") <> " & oCol2.Value & "" & vbLf & _
                                                         "      UPDATE [@TAB1] SET U_Col2 = " & oCol2.Value & " WHERE Code = '" & oCode.Value & "' AND U_EmpID = " & oEmpID.Value & "" & vbLf & _
                                                         "END" & vbLf & _
                                                         "ELSE" & vbLf & _
                                                         "     IF NOT EXISTS (SELECT * FROM [@TAB1] WHERE Code = '" & oCode.Value & "' AND U_Col2 = " & oCol2.Value & ")" & vbLf & _
                                                         "      INSERT INTO [@TAB1] (Code, Name, U_Col2)" & vbLf & _
                                                         "          SELECT (SELECT CASE WHEN MAX(CAST(Code AS INT)) IS NULL THEN 1 ELSE MAX(CAST(Code AS INT)) + 1 END FROM [@TAB1])," & _
                                                         "                 (SELECT CASE WHEN MAX(CAST(Name AS INT)) IS NULL THEN 1 ELSE MAX(CAST(Name AS INT)) + 1 END FROM [@TAB1])," & _
                                                         "                 '" & oCol2.Value & "'"
                                                rst = executeSQLQuery(strSQL)
                                            Next
    The DELETE scenario should be similar but with a different construction of the query, if you are to allow the user to delete more than one record at a time.  Else you can catch the selected row over which the Delete Row command has been executed and proceed to construct the delete command query using the Keys from the Matrix.
    Hope it helps

Maybe you are looking for

  • Photoshop Elements 6.0 - Idioma

    Hola a todos:                       Algunos años atrás he comprado un ordenador y traía ya instalado (sin disco) Adobe Photoshop Elements 6.0 en inglés. Mi consulta es saber si puedo incorporar el idioma español sin tener el disco de instalación (si

  • ITunes Error -3 and QuickTime Error 1722

    Help! I'm at the end of my tether here, I've been trying to install iTunes 6.0 on Windows XP SP2 and getting the error -3. So, I tried the standalone Quicktime installer as recommended on this forum and I get the 1722 error. I've followed all the rec

  • 24P Workflow

    We got a new HD system last year with two Panasonic HPX500P cams. We do Corporate Video so we generally stick to 30/60i settings but I wanted to play around with the Cine settings on the camera. I've been digging through the menus and output some 24P

  • How to track Error message no.

    Hi, Could anyone please expalin how to track error messages using message no. Urgent??????????????????? Reg, CM

  • Mac App Store/Notes Quit Unexpectedly

    Just updated my MacMini OSX to 10.9.2 and after the update I can't launch AppStore and Notes. I had rebooted my MacMini several times but the problem still persists! Appreciate help from this community. Here are the crash report. Process:         App