Formula field, Detail records not getting updated

Hello seniors,
i need help on 2 issues;
first, Issue No. 1
i have master-detail form with the following tables;
POH                                  master record table
PH_NO                              pk
PH_PARTY
PH_FXRATE                       exchange rate
PH_PD_LOCAL_TOT           total of PD_LOCAL_AMT  from details records
PH_PD_FOREIGN_TOT       total of PD_FOREIGN_AMT  from details records
POD                      Detail records table
PD_PHNO              fk
PD_ITEM
PD_QTY
PD_PRICE
PD_LOCAL_AMT        
PD_FOREIGN_AMT
M_PD_FOREIGN_AMT       Formula (PD_QTY * PD_PRICE)
M_PD_LOCAL_AMT           Formula (M_PD_FOREIGN_AMT/PH_FXRATE)
CTRL                 Control block
M_PH_PD_LOCAL_TOT           Summary-Sum-Table=POD, Field=M_PD_LOCAL_AMT
M_PH_PD_FOREIGN_TOT       Summary-Sum-Table=POD, Field=M_PD_FOREIGN_AMT
Triggers
POH Table
Pre-Insert   and   Pre-Update
:PH_PD_LOCAL_TOT := :M_PH_PD_LOCAL_TOT
:PH_PD_FOREIGN_TOT  := :M_PH_PD_FOREIGN_TOT
POD Table
Pre-Insert   and   Pre-Update
:PD_LOCAL_AMT := :M_PD_FOREIGN_AMT
:PD_FOREIGN_AMT :=  :M_PD_LOCAL_AMTThe problem that i am facing is while i UPDATE a record.
whats happening is when the form is in Query mode and if i change a record, lets say
change the value of the field PH_FXRATE, then what happens is, on screen i get all Detail
record's M_PD_LOCAL_AMT Calculated & Updated, but the actual db field PD_LOCAL_AMT remains unchanged
in the database after i press F10 or Save button.
The update takes place for the POH table and form displays 1 Record updated.
whereas if i have for example 4 detail records, then form should update those as well and display finally
5 records updated is'nt it..?
In query mode,if i insert new or modify an existing record in the detail block, then at this point, form marks just
that particular record as CHANGED. Thus making changes at db level only for this particular record.
what i want is once i make changes to the field PH_FXRATE, then form should mark all detail records
as CHANGED and on saving, the PRE-UPDATE tigger of POD table should come in to force and the changes
in the values of M_PD_LOCAL_AMT in turn to the db field PD_LOCAL_AMT should get affected at db level.
i have also tried to put these assignments
:PD_LOCAL_AMT := :M_PD_FOREIGN_AMT
:PD_FOREIGN_AMT := :M_PD_LOCAL_AMT
at PRE-UPDATE of POH table, thinking that form might consider
all detail records, at this point. i noticed that it does it, but only picks
1 record (i guess just the first record always) and change a db level.
No. 2 Issue:
i have put a POST-FORM-COMMIT at form level for auditing the Total fields of POH table against the details records.
Declare
     M_LC_AMOUNT NUMBER(13,3);
              M_FC_AMOUNT NUMBER(13,3);
Begin
     SELECT SUM(PD_LOCAL_AMT) INTO M_LC_AMOUNT
     FROM POD
     WHERE  PD_PHNO = :PD_PHNO;
     IF  :PH_PD_LOCAL_TOT != M_LC_AMOUNT  THEN
          :PH_PD_LOCAL_TOT := M_LC_AMOUNT;
     END IF;
     SELECT SUM(PD_LOCAL_AMT) INTO M_FC_AMOUNT
     FROM    POD
     WHERE  PD_PHNO = :PD_PHNO;
     IF  :PH_PD_FOREIGN_TOT != M_FC_AMOUNT  THEN
          :PH_PD_FOREIGN_TOT := M_FC_AMOUNT;
     END IF;
End;i was testing and notice that in a query mode when all records are displayed.
if i go on changing values on records and save or save later keeping the form open,
form allows, but if 1 come back to a record which i may have changed and saved earlier, then it flashes Error;
"Records has been changed by another user, requery to ..."
i want to do an Audit before final db-Commit and keep the user free from this Error..
Please tell me first of all, is my approach for both of my issues,correct.?
if not, then please suggest what should be changed.
i'll highly appreciate for all your help. TYVM. Regards.

I did exactly as you suggested. It works well for new record insertion
but when i press F7 to query it, its flashes messages before displaying detail records
Field must be entered.
Mr. Andreas,
i have problem only when i change value of PH_FXRATE. It re-calculates on screen values for M_PD_LOCAL_AMT
(Formula M_PD_FOREIGN_AMT/PH_FXRATE)
i want the changed value of M_PD_LOCAL_AMT to be saved in the actual db-field PD_LOCAL_AMT.
for this i have PRE-UPDATE on POD Table
:PD_LOCAL_AMT := :M_PD_LOCAL_AMT
:PD_FOREIGN_AMT := :M_PD_FOREIGN_AMT
Which is doing that.It is not marking the detial record as CHANGED.
I tried giving the above assignments in the PRE-UPDATE on POH table.
It saves the changed value in the db-field, but not all detail records, if more than 1.
what you have suggested, will get me acheived what i am looking for..?

Similar Messages

  • Field TSABR is not getting updated in MHIS table.

    Hi All,
    The field TSABR (Scheduling Status: New Start Called) is not getting updated in MHIS table.
    Please do tell me how it will get updated.
    What is a logic behind it.
    Many Thanks in advance.
    Regards,
    Sanjay Tiwari

    Hi,
    I checked it my system and that field was getting updated ..
    For calls with status "New start called " will get updated in MHIS and for these call you will  only have the field scheduling status :planned date called " as marked . pls check
    regrds
    pushpa

  • Price for I/C (Cost) field in VF03 not getting updated for an Invoice

    hi,
    the amount field (KBETR) for condition type ZR04 in VR03, for a specific invoice generated, is coming out to be 0.00 USD.
    as a result, the condition value is also coming out to be 0.00 and hence, not getting updated.
    can anyone help me out with this?

    Hi Pratima,
    unfortunately i can only write that I am facing the same challenge at the moment. I will update the discussion as soon as I have a solution.
    Best regards
    Bjoern

  • Cred.lim.used  field in FD32 not getting updated

    hi All,
    I have a scenario where my Cred.lim.used field which is a %age value is not getting updated in fd32
    when I go to fd33 for a customer my Credit limit is 1,000,000.00
    and Credit exposure is 1,138.28- but the %age is 0.00 %.
    any suggestions
    thanks,

    Hi
    Think logically how it will show the   credit limit used in percentage just calculate
    credit limit used*100/ total credit limit
    1,138.28*100
    1,000,000.00
    will come to 0.11 % so system wont show it will consider only if it is more than 1%
    regards

  • CCS Details are not getting updated to COPA in Sales Order Settlement(VA88)

    Dear Experts,
    Our scenario is MTO with valuated material.
    1. Production order is tagged to Sales Order.
    2. Production order is settled to Material and variance is getting posted to COPA.
    3. At the time of Delivery, COGS Debit (Cost Object- Sales Order), Credit - Inventory.
    4. At the time of Billing, Accounting Document is getting generated, COPA document is not getting generated.
    5. We  are not executing WIP. (as per Business process)
    6. Settlement is done thru transaction code VA88. COPA Document is getting generated.
    I am facing the following issues in the above MTO process.
    1. At time of sales order settlement thru VA88, In COPA, only COGS is getting as updated with one value field i.e. Material Cost.  Cost Component data (Material Depreciation, Labor etc..) is not getting updated to COPA.
    2. When I settle the Sales Order thru VA88, Billing Quantity is not getting updated to COPA though Quantity field mapping is done properly.
    Please help me how to resolve the above issues.
    Note: Same Cost Component Structure, we are using for Make to Stock scenario. Cost Component Data is getting updated Properly to COPA  (at the time of Billing)
    Regards,
    vgl
    Edited by: vglokam on Aug 31, 2010 10:52 AM
    Edited by: vglokam on Aug 31, 2010 10:54 AM

    Hi
    1. CCS (Cost Comp Split) wont be updated to COPA if you settle via sale order.. In sale order, COGS cost element is posted.. the same will get settled to COPA as one single value...
    In MTS, the CCS gets updated to COPA upon billing because of the "valuation" strategy customization... Billing posts to COPA in that case, COPA gets Sales Qty and it is valuated with CCS to give you the break up.. But, in your case, Billing is not posting to COPA, but to sales order.. hence, there is no qty flow into COPA upon billing.. thats why you dont get CCS for MTO
    2. The sales qty should be updated to COPA upon VA88.. For this, make the following settings in your PA transfer structure which is used during VA88
    1. Go to KEI1, Select your PA transfer structure...
    2. Add an assignment line in it... Check on "Qty Billed/Delivered" in the assignment line
    3. In the Tab "Value Field" below "source", assign Qty Field
    Now when you settle, it should update qty as well
    regards
    Ajay M

  • Field KZWI4 is not getting updated in table EKPO

    I have a case where for two scheduling agreements the pricing procedure getting determined is the same, but the field KZWI4 (subtotal 4) in table EKPO is getting updated for one SA and not for the other. The only difference in the two SAs are the tax codes. Do tax codes have any bearing on the field KZWI4 getting updated in table EKPO?
    Regards,
    Pratima.

    Hi Pratima,
    unfortunately i can only write that I am facing the same challenge at the moment. I will update the discussion as soon as I have a solution.
    Best regards
    Bjoern

  • KINAK field in Table KONV not getting updated with value W

    Hi,
    I have a PO where I am deleting a line item.
    After I delet line item the field KINAK in table KONV gets updated with value W.
    But I am getting instance where in some cases the field KINAK is not getting updated.
    The result is deleted line item is getting populated in PO output also.
    Regards
    Nandiini

    KINAK is updated only when a Condition is inactive ! So when a item is deleted the condition becomes inactive and gets updated with 'W' which means statistical(not to be counted)
    A     Condition exclusion item
    K     Inactive due to calculation basis/shipping material type
    L     Condition exclusion header or inactive at header level
    M     Inactive due to manual entry
    T     Inactive at header level
    W     The document item is statistical
    X     Inactive via formulae of incorrect
    X     Inactive via formulae of incorrect
    Y     Inactive because of subsequent price

  • TDS amount not getting updated in the table under the field QBSHB

    Dear Friends,
    The TDS amount entered while booking the vendor invoices through MIRO T-cde, is not getting updated in the table BSEG under the field QBSHB. 
    Kindly let me know the reason for the same and guide me to correct it
    TIA.
    Regards,
    Vincent

    HI Vincent,
    Bseg-QBSHB field is relavent for classic WT.
    I hope you are using the EWT.
    Hence if you post a document through MIRO it will not update
    (but if you post document FB60 it will update but wrongly).
    Reason is Miro document is posted through interface.
    Hence SAP is suggested to not refer the Bseg-QBSHB and etc., fields.
    refer only with_item table.
    Please refer the below replay from SAP
       Please refer the below note .363309
    Please review attached note 363309 for detailed explanation
    BSEG-QBSHB is designed to fill for the classic withholding tax. And
    extended withholding tax information is stored exclusive in table
    WITH_ITEM.
    You can check in table BSEG for the fields and will find that system
    do NOT update field BSEG-QBSHB.
    In your line layout,you define a field BSEG-QBSHB. But actully the field
    of vendor/customer line item is filled with zero from FI. Thus,it shows
    zero in line item display.
    And as note 363309 says,
    "Remove the field which contains the withholding tax information
    from your display variant.
    If you want to display the withholding tax information, double-click on
    the document number and subsequently choose 'Withholding tax' button."
    (BSEG-QSSKZ, BSEG-QSSHB, BSEG-QBSHB) field is not relavent for
    Extended withholding tax and not suppose to use in report FBL1N.
    It basically does not make any sense to use the withholding tax fields
    of the document line items (BSEG-QSSKZ, BSEG-QSSHB, BSEG-QBSHB) with the
    activated extended withholding tax.
    regards
    Madhu M
    Edited by: M Madhu on Jan 31, 2011 1:19 PM

  • Field not getting updated in BDC while running in background

    Hi Friends,
    I'm executing a BDC transaction to update the Alternate Tax Classification (VBAK_TAXK1) field in Sales Order. I'm passing value 1 to the field and then saving it directly. While running the BDC in background, the field is not getting updated. On the other hand i checked it running in foreground, the field got updated without any error message.
    Can anybody help me advicing why the field is not getting updated in background?
    Thanks,
    Bestin

    Hi ,
    Check the the log if you are using a session method and if call transaction then capture the messages for the same,
    Because in the foreground the BDC will update the records even if there is a warning message nut in background it will not update. So check the data which you are inserting and try avoid the warning messages also so that it can run smoothly in backfround.
    Thanks & Regards
    Jyo

  • PO details not getting updated in PO

    Dear all,
    In one of my PR i have found that PO details in PR status tab is not getting updated. In PO  line item in PR reference field it contains the PR no & i am able to navigate to PR document from their, but i have noticed that in PO in delivery schedule tab the PR no is missing. Please give your valuable inputs.
    Thanks
    Rashid

    Hi,
    Check the item Changes to the item in the Po for which the Po Number is not being displayed in Status tab of the PR. It is possible that if the PR Number is removed  or the line is deleted in the Delivery Schedule Tab of the PO , this will not be reflected in the Status tab of the PR . E ven if the PR Number will be available in line with the Item Number in the PO.
    Dhruba

  • Custom field in BP_PDBGP table not getting updated

    Hi,
    i am working in Contract management in SRM 7.0 Pack 6. I have aadded a custom field in partner table which appears in the partner table of contract header. It is a checkbox. when i check it the value gets saved in BBPPDBGP table for the first time after that if i try to uncheck it the value is not getting updated. I checked in the BBP_DOC_CHANGE_BADI, the value which is getting passed is correct but it doesn't update the databse accordingly.
    Any suggestions? is this a standard bug?
    Neha

    Hi Virendra,
    Thanks a lot for your suggestion.
    Where should i check? If the data passing to BBP_DOC_CHANGE_BADI is correct then that means at the webdynpro side there should not be any problem and as per the standard after doc_change also it should save properly. i also checked the badi there is not dependent coding done over there. DOC_SAVE badi is also inactive for contract business object. Hence, i am not getting any clue where could be the problem.
    Let me know if you want more details inorder to analyse this problem.
    Thanks &Regards,
    Neha

  • Delta Records is not getting updated in delta queus when changes done

    Hi All,
    In Quality system , when a user makes a change to an order's ship-to address, the changes are "triggering" a delta record into the delta tables for BI to extract. This can be seen via tcode rsa3's delta tester.
    In Productionn System, when the user makes the exact same change, nothing is added to the delta table and the changes never come over to BI unless a full extract is request for the order.
    Why changes not getting updated, please give your inputs.
    Thanks & Regards,
    Venkat Vanarasi.

    Do you have your V3 update job active and running? THis job wites changes to the delta queue. Of course your datasource has to been initialized and a delta queue should be setup. You can check it in RSA7.
    Regards,
    Juergen

  • Product ID is not getting updated in SC Goods /Service field

    Hi Gurus,
    While creating shopping carts in EBP, we are able to find the Product ID from the Good/Service find option, but when we select the Product ID in the search, it's not getting updated in the SC Goods/Service field.Also when we try to find the Cost center / WBS using find button it's not going to the search area after software upgrade.
    Could you please suggest us why system is behaving like this.
    Thanks
    Sada

    Hi Gurus,
    Any Idea on this.
    Also few of the Product ID's are getting updated from the search help to Goods /Service field of the SC and some are not getting updated. while debug the SC , we are geeting the error message as BBP_SC006, Its relavant to catlog. But we are not transfering the Product from catlog to SC item.
    The error mesage as: Good/Service & does not exist.
    Thanks & regards
    Sada

  • Custom fields not getting updated in Mass Maintenance-MM17

    Hi,
    I have created a custom field in MARC table and the data is getting updated to the MARC table through MM01/MM02 but it is not getting updated by MM17.  I have checked the notes 44410, 576160, 414020 and 116311.  I have done the following changes as per the sap notes.
    1. Created a custom segment ZE1MARCM by copying the standard segment E1MARCM and added the custom field in that  
        segment.
    2. I have extended the IDOC 'MATMAS03' and added the custom segment ZE1MARCM to E1MARAM.
    3. Created a new entry in we82 and provided the extension type 'ZMATMAS03' and release '701'.
    4. Adjusted the partner profile in we20 for matmas with port and providing the extension idoc type.
    5. Added the custom field in the table MASSFLDLST.
    6. Implemented the code in BADI 'MG_MASS_NEWSEG' and exits 'EXIT_SAPLMV01_002' , 'EXIT_SAPLMV02_002' as per the 
        sap notes.
    The custom field is not getting updated through mass maintenance.  Please let me know if i have missed anything?
    Thanks,
    Geeta

    I had this same question several years ago. Please check my answer at Initialize MARC Custom Fields Using MM17 Does Not Work

  • Quantity field not getting update in PCA document for Goods Receipt

    We have the Purchase Account activated for our company code.
    For movement type 101 (Goods Receipt), I am getting the quantity field updated for GR/IR account and Stock Account (B/S item).
    But the quantity field is not getting updated for the "Purchase Account" and the "other offsetting PL A/C).
    Please advice whether I am missing something.
    Regards
    B.Mohanty

    Hi Aravind,
    Check SAP notes  1063198 and 1117587.
    FAGLL03 display quantity which is updated in FAGLFLEXA, BSEG is not
    relevant in this case. This is clearly explained in the note 1063198.
    The quantity posts through to FI on the 'goods receipt' items, but not on the
    'invoice receipt' items.
    In the FI normally the Quantity is not a 'real' important field, as it
    is more related to the MM area.
    But in the old 'Profit Center Accounting' and the old' Special Ledger'
    the field has been important.
    As the same logic of these areas to 'store' the Quantity is also used
    in the NewG/L the field get only filled in the line, where it make
    'sense' from our point of view, because only in the 'goods receipt'
    lines a 'real' Quantity is posted to the system.
    So as before in the PCA and SL, now also in the NewG/L the Quantity is
    filled in the correct and important lines and postings.
    In the BSEG ('old document segment table') the field is filled 'just'
    as it is send to the FI, but this is not completely correct from the
    business point of view.
    This can also lead to issues with the reporting and summation to this
    field. So with creating the new logic in the NewG/L the 'correct'
    standard of the 'writing' for the Quantity has also been taken over.
    So in the end, the update and display is correct according  SAP standard behavior.
    Actually,Quantities within G/L are never reliable,
    because the purpose of FI is a view on the data according to amount
    but not according to quantity.
    In the FI normally the Quantity is not a 'real' important field, as it
    is more related to the MM area.
    I hope I could be of assistance.
    Regards,
    Fernando

Maybe you are looking for