Data getting deleted when doing the validation

Hi all,
I have a web dynpro application to park an accounting document and I want the following functionality to it.
When a user enters fund starting with 'P' then the cost center field should be greyed out and if WBS element field is not entered then I should see the error on the screen that it's a mandatory field.. For this I have written the following code:
LOOP AT lt_el_tbseg INTO lo_el_tbseg.
    lo_el_tbseg->get_static_attributes(
                           IMPORTING static_attributes = lv_bseg ).
    CLEAR lv_bseg-lifnr.
    CHECK NOT lv_bseg IS INITIAL.
    TRANSLATE lv_bseg-geber TO UPPER CASE.
    IF lv_bseg-geber(1) = 'P'
                       *       navigate from <CONTEXT> to <EDIT_PROPERTY> via lead selection
      lo_nd_edit_property = wd_context->path_get_node( path = `Z_POSTING.CHANGING.T_BSEG.EDIT_PROPERTY` ).
*       get element via lead selection
      lo_el_edit_property = lo_nd_edit_property->get_element( ).
      lo_el_edit_property->set_attribute(
        name =  `EDIT_WBS`
        value = 'ABAP_TRUE' ).
      DATA lv_projk TYPE wd_this->element_t_bseg-projk.
      IF lv_bseg-projk IS INITIAL.
        lv_error = 'E'.
        CALL METHOD lo_api_controller->get_message_manager
          RECEIVING
            message_manager = lo_message_manager.
        lv_message_string = 'WBS Element is a mandatory field'.
*     report message
        CALL METHOD lo_message_manager->report_error_message
          EXPORTING
            message_text = lv_message_string.
        EXIT.
      ENDIF.
    ENDIF.
    wa_bseg = lv_bseg.
    w_amt_line = wa_bseg-dmbtr + w_amt_line.
    wa_bseg-lifnr = lv_lifnr.
    APPEND wa_bseg TO lt_bseg.
    CLEAR wa_bseg,lv_bseg.
endloop.
but right now two things are happening in correctly:
1. It's doing the correct validation and throwing the correct error message but it's clearing out the content of the item table that user entered on the screen.
2. it's not making cost center as an non editable field.
can you please suggest me what I am doing wrong here.
Thanks,
Rajat
Edited by: rajatg on Jul 7, 2011 4:04 PM

    report message
        CALL METHOD lo_message_manager->report_error_message
          EXPORTING
            message_text = lv_message_string.
        EXIT.
your EXIT statement will get you out of the loop. rest of the records in internal table will nto be read

Similar Messages

  • After downloading the IOS5 my phone gets stuck when doing the back up. What should I do?, After downloading the IOS5 my phone gets stuck when doing the back up. What should I do?

    My iphone gets stuck when doing the back up of the IOS 5. What should I do? Any ideas?

    I'm having the same issue on the 3Gs.  I get a message "an error occurred while backing up this phone (-43)."  It tells me if I continue the contents of the phone while be deleted.  Is it safe to continue and restore from my current backup?  I can do a manual backup without any issues. 

  • Suffix data gets deleted when SunOne server is restarted

    I manually created a new suffix for a program I'm installing. The program, during configuration, creates directory entries in this new suffix. Everything works great, but whenever you restart the SunOne server, the data entries underneath this suffix get deleted. the suffix is still there, but when you click on the Directory tab in the console, the directory entries have all disappeared for the suffix I created. Very bizarre. Any help would be appreciated!

    I checked both the access and the error logs, nothing of significance shows up. The suffix was originally created from the console manually. This problem occured on a Solaris 9 server, but I have been able to re-create it very easily on a Windows 2000 Advanced server.
    Using VMWare, I can easily keep going back and forth from the image with the data and the image with the data missing. I've also noticed that if I try to do an export of the data for this suffix, I get an error that says
    "LDAP server is unwilling to perform". I'm wondering if these two errors are related. When I try to do an export with a different suffix on this server, it works great. Right before you do the export, it tells you that if the server does not have the proper access rights on this file, the export will not succeed. I'm not sure how to check that. I did create the suffix manually from the console logged in as cn=Directory Manager". Should I be using a different id? Thanks for your help!

  • Data gets deleted when another infopackage runs

    Hi SAP Gurus,
    A very peculiar situation.
    I have a DSO which is having 4 datasources. To load the data I am running them one by one. Now whats happening is when I load data from first infopackage I can see in datatarget thru display data.....but as soon as I load the data from second Datasource and display data...the first data disappaears. Can anyone please tell me what mistake I am making?
    Regards
    Shalini

    Resolved.

  • If you restore your ipad, does all your data get deleted?

    If you restore your ipad, does all your data get deleted?

    This could solve the "other" problem that you are experiencing right now. You really have nothing to lose by trying.
    Backup the iPad, restore to factory settings and then restore from the backup after you restore to factory settings to recover everything. You will also have to sync with iTunes in order to get your apps, music, etc back onto the device after restoring from the backup.
    That may totally solve the problem. But, on the other hand, as you mentioned, if the backup itself is the culprit - meaning that the backup is corrupt - when you restore from that backup, you could be right back where you started.
    Sometimes, when the "other" cannot be fixed any other way, you do have to restore to factory settings and NOT restore from the backup. Obviously you will lose all data when you do this, but you can still sync your iTunes content back to the iPad and you will not lose any music, apps, books and so on, as long as they are in iTunes on your computer.
    Most purchased content can be downloaded again at no charge as long as you use the same Apple ID and as long as the content is still available in the store in which you bought it (Music in iTunes, apps in the App Store ...)
    If that does not answer your question, just post again and I will do what I can to help you further.

  • How and When Does the attribute VI_ATTR_VXI_TRIG_STATUS get initialized

    How and When  Does the attribute VI_ATTR_VXI_TRIG_STATUS get initialized. Do the actual trigger lines get measured or does the attribute get initialized to a default value when the vxi resource manager is executed?

    Hey whl6868,
    According to page 157 (or 3-135) of the manual (http://www.ni.com/pdf/manuals/370132c.pdf), there is no default value for VI_ATTR_VXI_TRIG_STATUS.  If Resman is returning valid values for it, then it must be actually reading the lines.  Else, I would only expect it to return valid values when you actually call the function yourself.
    Regards,
    David R
    Applications Engineer
    National Instruments

  • Data gets deleted for the table RSTRFIELDSH

    If data gets deleted for the table RSTRFIELDSH at BW end
    ...what should i do?to get it back

    Wim,
    We lost the data from production. We ran Archive program to archive the data and archiving file is still exist.
    There is no possibliity to run the OUTBOUND process again to create the IDOCs.
    But only my concern is When we run the Transaction SARA we will be getting the data for other period as well.
    But I need to reload the data for three months only because that archiving file also has other period data as well.
    Can you send me details of how to use SARA Transaciton for particular period.
    Thanks,
    Kalikonda.

  • Will the app specific files get deleted when i remove/uninstall an app from iPad

    I mean those files added to an app using iTunes. For example, pdf files added to a reader.
    Do these files get deleted when i delete an app from iPad?

    I've learnt that this data do get deleted along with the app during deletion/uninstallation. Please correct me if I'm wrong.

  • With updating infinity blade 2 version 1.0.1 to 1.2 does your save data get deleted?

    please help me
    with updating infinity blade 2 version 1.0.1 to 1.2 does your save data get deleted?
    tnx every one

    No, it shouldn't. But sync your phone first, this will create a current iPhone backup. App data is included in the iPhone backup.

  • HT1657 If I download a movie today, but will not be watching it for a few weeks (i.e. when overseas) - when does the 'activation' period start?  Do I have 48 hours from the download date or when I first watch the movie?

    If I download a movie today, but will not be watching it for a few weeks (i.e. when overseas) - when does the 'activation' period start?  Do I have 48 hours from the download date or when I first watch the movie?

    You have 30 days from when you download it, but when you then start watching it you have 48 hours (24 if your account is US based) to finish watching it before it expires.

  • When does the horizontalScrollBar get created on a List?

    When does the horizontalScrollBar get created on a List?
    The scroller is created, but the scrollbar isn't created yet and I get an error:
    I have a spark List:
    <s:List id="list" creationComplete="creationCompleteHandler(event)">
            <s:layout>
                <s:HorizontalLayout  />
            </s:layout>
    </s:List>
    private function creationCompleteHandler(event:FlexEvent):void {
         (event.currentTarget as List).scroller.addEventListener( FlexEvent.UPDATE_COMPLETE, onScrollerComplete );
    // these don't trigger anything!
    //    (event.currentTarget as List).scroller.addEventListener(FlexEvent.CREATION_COMPLETE , onScrollerComplete );
    //    (event.currentTarget as List).scroller.addEventListener(Event.ADDED_TO_STAGE , onScrollerComplete );
    private function onScrollerComplete(event:Event):void {
         // horizontalScrollBar still null at this point - how can I use it?   
         // I want to set the style, but it's not created yet!
         // event.currentTarget.scroller.horizontalScrollBar.setStyle("repeatInterval", 600);

    I just realized that
    this.setIconImage(new ImageIcon("image.jpg").getImage())
    did not create the icon for my saved files.
    So what did create it? I did not program it!
    However, I happen to have an icon file Ananya.ico where I have my java project. I use if for my installation file. Did Java use this icon?
    Please help! Thanks!

  • I just upgraded my data plan from 6GB to 10GB for the same rate of $80 is this a promotion? If yes, when does the promotion end? Thank you.

    I just upgraded my data plan from 6GB to 10GB for the same rate of $80 per month. Is this a promotion? If yes, when does the promotion end?

    In most cases you keep the same plan and promotions even when you upgrade the phone.  There are exceptions for very old plans and unlimited data, but essentially mrhelper is correct. You have option to "keep current plan" when upgrading.  so in most cases, your statement that you will go back to $100 for 10 GB when upgrading is incorrect.  What was your particular circumstance?

  • When does the JSP get regenerated!!

    Hi,
    Can anyone please tell me When does the JSP get regenerated!!
    Thanks in advance
    SP
    [att1.html]

    Answered on interest.jsp
    (please don't cross post)
    mbg
    =============================================================
    "SP" <[email protected]> wrote in message
    news:[email protected]..
    Hi,
    Can anyone please tell me When does the JSP get regenerated!!
    Thanks in advance
    SP

  • I purchase songs from Itunes and as soon as I sync my phone, the song gets deleted. Does anyone else have this problem or know how to fix it?

    I purchase songs from Itunes and as soon as I sync my phone, the song gets deleted. Does anyone else have this problem or know how to fix it?

    I have random songs that a have paid for but they just disappear, or cannot be downloaded and so on. Sometimes they are indexed wrongly, and can't be found because of that, no work around because also the search function of itunes has gotten totally unusable. Not much fun to be an apple user anymore. I once used to be a very loyal user. My first apple was a Macintosh SE and an image writer II.

  • Upper-level Essbase data gets deleted on running CALC ALL

    Hi,
    We have a need to aggregate missing values (#Missing) to the parent level and so this is what we did. Go to EAS->Expand Essbase Servers->Expand the concerned application->Right-click on database->Edit->Properties and check the option to "Aggregate missing values". After doing this, we are having a peculiar issue when we execute "CALC ALL". We see that some of our upper-level data (non-level 0 data) gets deleted, and so we have to re-run all our business rules to calculate upper-level data. To be specific, we are having this issue of data going missing in accounting statements/reports such as Balance Sheet/Income Statement. In this reports, the rows are members of Account dimension (Dense) and the columns are members of Company dimension (Sparse). All other dimension are made POV. We did NOT have this problem when the 'Aggregate missing values' option was UNCHECKED. Does CALC ALL work differently when AGGMISS option is ON?
    We are using Hyperion Planning, Essbase and Financial Reporting (version 11.1.1.3).
    Thanks for any advice.
    Regards,
    ABG

    Hi John,
    Now that you mentioned your point about upper-level data, I double-checked the Account dimension members (for which the data was being deleted) and you are right that I am seeing a different behavior than I posted originally. Sorry about that. So this is what I am observing:
    The Account dimension has 'Balance Sheet' as one of the children. This member, 'Balance Sheet', has children: Cash, Receivables, Payables so on, and all children of 'Balance Sheet' are level 0 members. Now, we run calculation scripts to calculate the values of these members. These members form the rows of Balance Sheet report. After all the relevant calc script have been executed, I am running a script that has just CALC ALL in it. I am observing that the values of Cash, Receivables, Payables etc (level 0 children of Balance Sheet) are getting deleted when we have the option "Aggregate Missing Values" as checked in EAS.
    Then, I inserted SET AGGMISS OFF before CALC ALL in the script and now the values are intact! I am trying to understand why CALC ALL would delete those values when AGGMISS is ON?
    You said that most people do not use CALC ALL. What is the better alternative to aggregate the database then? Is it CALC DIM?
    Thanks and regards,
    ABG

Maybe you are looking for

  • Invalid File Path Names in Mac OS X

    Hello, I am trying to create a Javascript in Mac OS X 10.4.11, however I am having some trouble with what characters are valid in file path names in Mac OS X. Does anybody know where I can get a list of invalid characters that cannot be used in a fil

  • Help with Patch 20485724 - Oracle Grid Infrastructure Patch Set Update 12.1.0.2.3 (Apr2015)

    Two issues. First, the readme for 20485724 states need OPatch 12.1.0.1.6 or greater.  After installing OPatch 12.1.0.1.7, there is no opatchauto in the OPatch directory that was unzipped.  Cannot apply patch without opatchauto. Second, attempted to a

  • After uninstalling "No Squint" Firefox zoom is not saved

    I uninstalled "No Squint" when I found it did not work as I wanted. Now Firefox (v.21) no longer remembers zoom levels of pages I visit after FF is closed and re-opened. The "No Squint" uninstall asked if I wanted to restore FF zoom functionality - t

  • App is open but will not show photos

    App is open but will not show photos.

  • When will I get my serial number?

    I went to www.adobe.com/go/edu-validate and got a validation for my product, but I never got an email. It said that I needed to provide validation in the istructions, but never asked me for that info when registering. What is the next step?