[BC4J] Master currency change + dirty details = warning (how?)

Sorry for the lame subject, but it's the best I could do. :)
Anyway, I 'want' something, but I could use some advice on how to accomplish it. Here's what I've been trying to realise:
- A simple master-detail scenario
- One of the detail records has been altered
- The master currency changes
- A popup comes up to warns me to either commit or rollback pending changes
And
- One of the master records has been altered
- The master currency changes
- Nothing happens
I hope this explains what I need. :) So far I've created a new CustomViewObjectImpl class which I use as a base for all my ViewObjects. In this new class I override the executeQueryForCollection() method, because if I'm not mistaken, this is the location where the check for dirty details should be performed.
However, a simple call to getDBTransaction().isDirty() is too simplistic, too unspecific.
I think I somehow need to end up with a ViewRowSetIterator instance (which has the isDirty() method) which is contained or derived from one of the detailRowSets of "this". Any ideas of how I can retrieve it?
So far, I've got something like this:
protected void executeQueryForCollection(Object qc,
                                         Object[] params,
                                         int noUserParams)
RowSet[] details = getDetailRowSets();
ViewRowSetIteratorImpl vrsi;
for (int i = 0; i < details.length; i++)
  vrsi = ....; // how to retrieve it ?
  if (vrsi.isDirty())
    switch (JOptionPane.showConfirmDialog(null,
                                          "Save changes?",
                                          "Attention",
                                          JOptionPane.YES_NO_OPTION,
                                          JOptionPane.WARNING_MESSAGE))
      case JOptionPane.YES_OPTION:
        getDBTransaction().commit();
        break;
      default:
        getDBTransaction().rollback();
        break;
super.executeQueryForCollection(qc, params, noUserParams);
}

Hi,
I had a quite similar need, except the "Nothing happens" part on altered master.
I realize this makes quite a difference, but maybe my solution could help you somehow.
After trying several possibilities, I considered the following approach.
1. I extended ViewRowImpl in MyViewRowImpl and wrote the following:
     private boolean areDetailsModified()
          String[]          viewLinks = getViewObject().getViewLinkNames();
          for( int i = 0; i < viewLinks.length; i++ )
               ViewLink          viewLink = getApplicationModule().findViewLink( viewLinks[ i ] );
               ViewObject     detailView = viewLink.getDestination();
               Row          linkRow = null;
               if( detailView.isExecuted() )
                    linkRow = detailView.getCurrentRow();
               if( linkRow != null && viewLink.getSource() == getViewObject() &&
                   linkRow instanceof MyViewRowImpl &&
                   ( (MyViewRowImpl)linkRow ).getViewRowState() != Entity.STATUS_UNMODIFIED )
                    return true;
          return false;
      * Assume a view row creates/updates/removes its main entity.
      * If the row itself was not modified, checks for changes in details.
     public byte getViewRowState()
          Entity          entity = getEntity( 0 );
          switch( entity.getEntityState() )
               case Entity.STATUS_INITIALIZED:
               case Entity.STATUS_NEW:
                    return Entity.STATUS_NEW;
               case Entity.STATUS_MODIFIED:
                    return Entity.STATUS_MODIFIED;
               case Entity.STATUS_UNMODIFIED:
                    if( !entity.isValid() || areDetailsModified() )
                         return Entity.STATUS_MODIFIED;
                    break;
          return Entity.STATUS_UNMODIFIED;
     }2. In my JClient client (still to use for the UIX one), I installed a JUPanelValidationListener and implemented
     public void beforeCurrencyChange( JUPanelValidationEvent event )
          Row          row = event.getIteratorBinding().getCurrentRow();
          int          rowState = Entity.STATUS_MODIFIED;
          if( row instanceof MyViewRow )
               rowState = ( (MyViewRow)row ).getViewRowState();
     }3. And yes, not so fancy, I also made some changes to trace a "user-dirty" transaction (for some insert vs. LOV issues)...
Greetings,
Adrian

Similar Messages

  • Local currency change at year end - how to force LC to match GC

    Ok, so to change LC at year end is no problem (change master data in the new year, assign CT method to BCF task etc)
    But if your new LC is now equal to your GC, you may well have a diference between the two values.
    Is there any way to force that they are the same automatically (agreeing to GC preferably)
    I read it was maybe possible in EHP5 but we don't have that

    I have not tried this but it may be possible to create a translation method to make the values agree with GC and then assign this method to the balance carryforward task for the year of the change.

  • RU's functional currency change in FC

    Hello, dear colleagues!
    If anyone has an experience in performing RU's currency changes? I mean, how to change functional currency in one or more reporting units from, for example since January of New Year from one USD to EUR? Will be very grateful for any answers! I haven't find any documents or materials about it. Thanks!

    Hello, Graham!
    Thanks a lot for your answer, but can you please specify, how to find this document? I try to use search in Sap Marketplace within official SAP notes by number 1221228, but without any result. Also i've looked on all articles here on SDN in EPM section with the same result. thanks again!

  • I've just received an email from 'Apple' saying that my apple id was used      to sign into iCloud on an iphone 5s.  I have an iphone 4.  It's asking me to sign in to confirm my details and change my password.  How do I know if this email is genuine?

    I've just received an email from 'Apple' saying that my apple id was used to sign into iCloud on an iphone 5S.  I have an iphone 4.  It then asks that I 'click here' to confirm my details and change my password.  How do I tell if the email is genuine?

    Apple will not ask you to click a link in an email. They may tell you to log in to your account to reset your password. Go to https://appleid.apple.com and log in if you ever want to change any information in your profile (or your password). And do not click the link I just posted; instead enter it into a browser.
    You can verify the devices assigned to your account by going to https://icloud.com/find (again, don't click it), where you can see a list of devices registered to your Apple ID.
    As a general rule, you should never click a link in an email or forum post without verifying it first. You can see where it goes without clicking it in most email programs and browsers by hovering your mouse pointer over it. On an iPhone you can check where it goes by holding your finger on the link (rather than just tapping it).

  • OAF matester detail page : How to have a "Show All" feature on screen, so that all the master and details records are expanded .

    Hi ,
    I was trying to have a "SHOW ALL" feature on the master - detail page,
    the detail table is an advancec table.
    Please help me with inputs on how to have  "SHOW ALL" feature,
    Currently, we have to click on  ":Show" for each record at master level to view the child data.
    Trying to achive "Show All" Feature so that on click of this the master records on the page 'Expands"  showiing all master records with respective detail records.
    Regards
    bhuvanm

    Hi,
    You should not set DetailFlag = "Y" in whereclause because there is no such record.
    Also detail flag is transient attribute and not the query column, hence the error "Invalid indentifier".
    I asked you to use DetailFlag as query column with static value "Y".
    for example:
    SELECT "Y" detail_flag
    FROM <table_name>
    This will display all the table records in expanded format. if you want it conditionally then use decode on some bind parameters.
    For example:
    SELECT DECODE(:1, "SHOWALL", "Y", "N") detail_flag
    FROM <table_name>
    This bind parameter should be passed whenever you want to execute query for the table.
    Regards,
    Sandeep M.

  • Portal Master-detail form how to auto assign detail record sequence number

    Portal Master-detail form how to auto assign detail record sequence number.Please help me?

    You can just read the following section
    Can I specify a sequence number generator as the default value for a form column?
    Yes. Enter the following in the "default value" field for the column:
    #<schema name>.<sequence name>.nextval
    where <schema name> is the name of the schema containing the sequence, and <sequence name> is the name of the sequence. The entry is preceded by a "#".
    For example, if the schema name is "SCOTT", and the sequence name is "CUSTOMER_SEQ", the default value entry is:
    #SCOTT.CUSTOMER_SEQ.NEXTVAL
    same way you can do for master - detail form.
    for more information on forms please refer the following URL.
    http://otn.oracle.com/products/iportal/htdocs/portal_faq.htm#BuildingApplications
    hope it helps.

  • Master/Detail Forms - How to go directly to detail?

    The things you forget when you haven't used them in a while.
    I have two tables:
    MASTER with a MASTER_ID
    DETAIL with a DETAIL_ID and MASTER_ID (foreign key back to master based on MASTER_ID)
    When I generate the form using the wizard, how do I get the MASTER_ID on create so that I can immediately start adding the detail after creating the master (without having to go back to the report and select "Edit" (which works).
    Basically, what I am asking is: How do I get the MASTER_ID sequence value(key) generated at INSERT populated in a form variable so that I can move straight to adding detail lines?
    Thank you
    --Too Sleep Deprived to think this through.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Both Seattle City Light (SPU) and the Seattle Police (where I work) are now using APEX. I actually love it as a development language (except for some of the page formatting issues which I deal with from time to time). We are "killing" all of our ACCESS 97 applications and moving them to APEX. But ACCESS applications for us seem to be like the Hydra - once I kill one, two more seem to appear in their place ("Oh, you did such a good job fixing our blah-blah database. Did you know about these other THREE...") Keeps me busy though.

  • How to create one master table and two detail for it

    I have one table , imagine it like mastertable( empid,deptid );
    and two different tables like employeetable(empid ) , departmenttable ( deptid )....
    I dont have any relation on database side. I need to create view link and ı need to use only one master table for two detail tables.
    How can ı manage this scenerio ?
    thanks...

    yes Shay ı really want to use two detail table in one UI as you suggest in your blog. But in that scenerio probably tables have link in database side with foreign key. My detail tables dont have any connection in database side with my master table. How can ı link them under one mastertableVO ?
    I am really sorry about my bad explanation. I am a newbie and probably ı dont know the correct words to tell my problem.
    Thanks for your time...

  • Master-detail: check changes in detail when navigation in master

    Dear friends,
    forms 6i oracle 9i.
    I have a master and a detail block, changes in detail block can only be made in a non-database-field.
    For saving a procedure do_save is called where values from non-database-fields are calculated and then put into database field.
    For realizing that any changes where made I created another non-database-field in a control block which is set to 1 in when-validate-item-trigger of detail.non-database-field.
    When closing the form I simply check the status of my control.item und if necessary call the dó_save procedure.
    I now want to have same functionality when navigating through master-block, for example with key-down.
    I tried to use the master on_populate_detail trigger:
    --snip
    do_check_item_changed;
    IF ( (:EVM_A_ARTIKEL.H_MANDANT is not null) or (:EVM_A_ARTIKEL.ABTEILG_ID is not null) or (:EVM_A_ARTIKEL.ARTTYP_ID is not null) or (:EVM_A_ARTIKEL.ARTIKEL_ID is not null) ) THEN
    rel_id := Find_Relation('EVM_A_ARTIKEL.EVM_A_ARTIKEL_EVM_JN_A_L');
    Query_Master_Details(rel_id, 'EVM_JN_A_L');
    --snip
    but at this time the detail block seems to be empty.
    Has anybody an idea where's the right place to put my
    checking procedure?
    Thanks for help
    Silke

    Hallo,
    Do you mean this?
    relation type Join
    detail datablock evm_jn_a_l (this block
    itself is based
    on a join)
    join condition EVM_JN_A_L.H_MANDANT = EVM_A_ARTIKEL.H_MANDANT AND
    EVM_JN_A_L.ABTEILG_ID = EVM_A_ARTIKEL.ABTEILG_ID AND
    EVM_JN_A_L.ARTTYP_ID = EVM_A_ARTIKEL.ARTTYP_ID AND
    EVM_JN_A_L.ARTIKEL_ID = EVM_A_ARTIKEL.ARTIKEL_ID
    behavion when deleting not isolated
    hinder masteless actions no
    coordination no
    automatic query no
    Silke

  • How I can acess to master entity object from detail entity object

    If I have two Entities Object, master and detail. How I can to access to any value in the master entity from the detail entity?

    User,
    If you create an association between them, you can go to the association editor (double-click the association) and use the Association Properties section to click the "Expose Accessor" checkbox(es). If you expose the accessor in the detail entity, the java class for your entity implementation will have a getMaster() method (named after your master entity) created for you.
    Hope this helps,
    John

  • How to delete the master records when corresponding details records exist.

    What is the SQL statement to delete the records of master when the corresponding detail records are present.
    Note: No Cascade clause was used at the time of creation of referential integrity constraint.
    "M"- Master Table
    "D"- Detail Table
    I used, "Delete from M cascade". This statement is not working.
    Your favour in this will be deeply appreciated.
    Cheers
    PremChin

    Hi folk,
    i appreciate your suggestion,
    my crux of the situation is to know whether there is a way to make it without disabling,removing or modifying the referential integrity constraint.
    If so, modifying, please help me out how to modify the constraint in order to remove the master records keeping detail records in-tact.
    Cheers
    Premz

  • ADD or Change Bank Details in the Customer master

    Hello Gurus,
    I am looking for a BAPI or Function Module that will help me to update the Payment Transaction Tab of the customer master that contains the Bank details. I tried using BAPI_BUPA_BANKDETAIL_ADD and BAPI_BUPA_BANKDETAIL_CHANGE, but these are allowed to be used if only Business Partner is created for the payer/customer in SAP R/3.
    For every customer we donot have BP created in R/3, hence the above bapis donot help to meet my requirement.
    Has any of you had this requirement and used any bapi or any other method to add / change bank details.
    Expecting lots of options from you experts,
    Thanks & Regards in advance,
    Casimer

    hi, thnks for the update,
    i have followed as per your guidelines,  but i could not able to generate the report  , i have included the tables  knb1, kna1 and knvv.  and in the list field i have selected all the dialog box  , and in the selection list i am selecting according to the customer account group .
    but i cannot able to excuete the report it says  "no data has been selected"  and it says the following msg
    "When executing a query on the selection screen, no data was found for the criteria you entered. Therefore, no list could be generated."
    is there any problem in choosing the table  should i have to choose according to the  order level , like  General data, company code data, and sales area data   .  
    can u help me on this
    thanks

  • Someone has hacked my icloud account and has changed my details how can I recover it?

    Someone has hacked my icloud account and has changed my details how can I recover it?
    I can not remove my current icloud account to back up my phone some now this person has all my information
    Some one please help???

    Hi i have the same problem exactly someone changed my password and all the other details and now i unable to use my iphone all i need is just any one can reset my i cloud i already has created a new one but i cant delete my old one PLEASE HELP !!

  • HT5621 How do I change bank details on I pad?

    How do I change bank details on I Pad?

    Can you provide a little more context or detail? Its really not clear what you are trying to do.

  • How we can change Vendor details in ME21n/ME22n

    Hi Friends,
    How we can change Vendor details in ME21n.
    I need to change mail id of vendor based on some conditions.
    E.g Based on some Purchase grps.
    Can any body help.
    If any particular user exit ple let me know.
    I have all list of user exits of ME package.
    Thanks,
    Kumar.

    Hi,
    Changing Vendor on Purchase Order
    One PO can not have different vendors.  Its logical as one PO goes to one vendor with address.
    You cannot change the Vendor once you have saved the Purchase Order.   SAP treats the Purchase Order as a legal document. Therefore, once the Purchase Order is saved, it will not let you change the vendor.
    You have to delete all the line items and then create another Purchase Order.  However, if you are using Enjoy Purchase Order, you can "Hold" the Purchase Order rather than save it after you have create it, then you can change the vendor.
    Of course, this means that you don't have any output yet.  Therefore, you are not bounds by a legal document as you have not given it to a specific supplier yet.
    Logically, you cannot change an important field after creating a document.  It defeats the RDBMS principle, but you can change vendor while doing Invoice Verification.
    No, you cannot change vendor in released PO, because vendor registration carries some vital configuration information which decides pricing procedure for the items of the PO, logically due to this reasons system doen't allow to change vendor name once PO is released.
    Normal practise to come out for this routine problem in purchasing is solved by, simply delete this PO (By changing delivery as completed in PO) and make a new PO for these items.
    Eventually, you have only two options:
    1. You can do the entire transaction with that wrong vendor number and after MIRO you can transfer post the vendor liability to correct vendor through FI route. BUT THIS IS A WRONG PRACTICE.
    2. You need to cancel the PO which has wrong vendor number and create it again with correct vendor code.
    Thanks
    Balaji

Maybe you are looking for

  • Need new bios for r9 270x

    Hi, I would like to request a new bios for my 270x S/N 602-V303-070B1404003989

  • Authorization Error, iTunes 8

    Recently I needed to reinstall my OSX 10.4.11. In doing so, my install disk made a "Previous System" folder where all my old files were kept. Now, when I try to play the music I've downloaded, I get this error message: "This computer is not authorize

  • Customer LOV Account Description

    In release 12 there account description on the sales order form, but it's not available in 11i. Is there any way we can add without using the custom.pll? Srini C

  • Again: No scroll bar in Adobe readers

    The missing scroll bar in Adobe reader is a common topic. However, none of the descriptions I have found seem to resolve the problem. or they start so deep inside the settings so that a less experienced user can follow. Example, when I open a pdf ins

  • InvocationService.query() doesn't work for restarted cluster member.

    Hi, Thank you guys for that product, I'm very pleasured with Coherence cache. I will try to describe the following problem with Coherence. Our product integrated with Coherence cache and we have discovery/communication mechanism based on - MemberList