How to check validity of data reference

Hello everybody,
in my application I use a help class to buffer data objects.
This class contains one attribute which is an internal table ( columns: DATAID and DATAREF )
I use this databuffer to transport data between different classes.
Now I did the following mistake:
First I call the method 'METH_CHECK'. As import parameter I pass a reference to my databuffer class.
In method 'METH_CHECK' I call a function module 'FUNC_1' passing my reference to my databuffer class.
In 'FUNC_1'  I declare a local variable 'lv_value'.
Then I use the statement 'GET REFERENCE OF lv_value' and save this reference into my databuffer class.
After processing functions / methods I´m back at the point where 'METH_CHECK' was called.
When I check my databuffer class, I´ve got one entry in it.
The reference I saved while processing 'FUNC_1' . But the referenced data has already be freed ( remember, it was a local variable ).
In the debugger I see the column where I save the references to data objects.
The field value has changed from a valid reference to i.e. 'FREED ITAB: 5'...
OK, I know what is wrong... No problem in my application, but I want to clean
this entry... How can I check this...
I can not check like
  LOOP AT me->buffer INTO wa_buffer.
    IF wa_buffer-data IS INITIAL.
      DELETE...
    ENDIF.
  ENDLOOP.
or
  LOOP AT me->buffer INTO wa_buffer.
    IF wa_buffer-data CP 'FREED'.
      DELETE....
    ENDIF.
  ENDLOOP.
How can I notice an invalid reference at this point?
Thank you very much,
Oliver Seifer

Hello Oliver,
Another approach might be to avoid any dependency to the caller at all.
Regards
  Klaus
data:
    buffer_Reference  type ref to data.
field-symbols:
   <buffer_Data> type data.
create data buffer_Reference like i_Value.
assign buffer_Reference to <buffer_Data>.
<buffer_Data> = i_Value.

Similar Messages

  • How to check if Oracle Data Access Components  is installed?

    How to check if  Oracle Data Access Components is installed and version on my computer?
    Also How to check if Oracle Data Provider is installed and version?
    TIA
    Steve42

    Regedit HKLM->Software->Oracle.  See what's there...
    At the very least, that can give you paths and can check file versions from there.

  • How to change Valid to date in BOM

    Hi Sap experts
    I have two questions:
    1. How to change the valid to date in BOM for either header or component material.
    2. If the answer of the above question is NO, then from where the system takes the value for valid to date in BOM. If its default, then where that default date is actually set in?
    Thanks & Regards
    Akhtar Shaikh

    Dear Akhtar,
    If ECM is not activated then deflaut systems takes Valid to-date as  31-12-9999
    It is inbuilt in program designed by SAP
    Valid from date will be the date which you are creating BOM
    If ECM is activated then you can go with required dates ( with change numbers )
    Check this link in which you can find Mr. Mangalraj and experts Replies
    [ECM|Re: BOM valid to date]
    Regards
    Madhu

  • How to check  which column data differs from master table and archive table

    Hi All,
    i have two tables, table a (a1 number,a2 varchar2,a3 varchar2) and table b (b1 number,b2 varchar2,b3 varchar2).
    how to check the data in both the table are same( including all columns).
    data in a.a1 is same as b.b1 and a.a2 is same as b.b2 like that.
    if they not same , i need to know which field differs.
    Kindly Share ur ideas.

    887268 wrote:
    thanks Sven W. ,
    above reply clearly shows what my question is.
    one column must be primary key, based on that key i need to find out which are the fields having different data..
    im strugling with this, i tried the following already, but not able to get.
    select the columns from a MINUS select the columns from b.
    -- from this i can find whether the difference occurred or not.
    but i cant able to get which are the fields value changed.Good. Then you would match the rows using the PK column and need to compare the columns
    Instead of a MINUS + UNION ALL + MINUS we can now use a FULL OUTER JOIN
    It is a little task to write out all column names, but 40 columns can be handled.
    This statement would show you both tables with matching rows on the same line.
    select a.*, b.*
    from a
    FULL OUTER JOIN b on a.id = b.idNow filter/check for mismatches
    select case when a.col1 != b.col1 then 'COL1 value changed'
                    when a.col2 != b.col2 then 'COL2 value changed'
                    when a.col3 != b.col3 then 'COL3 value changed'
             end as compare_result
            ,a.*, b.*
    from a
    FULL OUTER JOIN b on a.id = b.id
    /* return only non matching columns */
    where (a.col1,a.col2,a.col3) != (b.col1,b.col2,b.col3) You might need to add nvls to take care of null values. Test this!
    Another way could be to group upon the primary key
    select *
    from (
      select id 
               ,count(distinct col1)-1 cnt_col1
               ,count(distinct col2)-1 cnt_col2
               ,count(distinct col3)-1 cnt_col3
       from
         select 'A' source, a.*
         from a
         UNION ALL
         select 'B' source, b.*
         from b)
       group by ID
    /* only records with differences */
    where 1 in (cnt_col1, cnt_col2, cnt_col3)
    ;The count columns will hold either 1 or 0. If it is 1 then this column has a difference.

  • How to check the expired date of a public key stored in my keyStore

    Hello,
    I would like to know if there is any possibility to check the expiration date of a public key which is present in my keystore.
    I did read the help of keytool but did not found any explanation about that.
    Thanks in advance for your answers.
    Alain.
    Message was edited by:
    Philipina

    Public key doesn't have an expiration date. Certificate has. Run keytool -list -v and you can read something looks like:
    Valid from: ... until: ...

  • After completing MSS PCR, how to check the updated data in R3

    Hi,
    After completing and submitting the MSS PCR, How do I check the updated data in R3?
    Thanks
    Reva

    I got the answer.

  • How to get valid from date in KONH Table

    Hi ,
          I am sending COND_A idoc for MRP. Now when I create a record using VK11,the valid from date is fine.
    But while changing the same using VK12 changed date does not reflect in KONH Table (when the new valid from date is greater the the previous one) .I understand the SAP Logic behind this from previous threads .
    But my issue is this :
    Suppose I have a Material X created with Valid from = 10.01.2011 & valid to = 31.12.9999
    Now I change this Valid from = 28.01.2011 & valid to = 31.01.2011.
    Now how can I send the data for 28.01.2011 in my I-doc , as KONH still has 10.01.2011 as valid from date.

    even if you send the data for 28.01.2011, it should pick up the condition record because the start date for condition record is in past? why do you think it is a problem? now if your concern is that if your input date is 27.01.2011 and it should not pick this condition (that is a different matter altogether)...

  • How to check the master data records in using SE16 transaction?

    Hi,
    Can you please help me to check the master data records using SE16 transaction?
    Loaded master data for Characteristic and want to check the records in the master data tables.
    Thank you for your help!
    Lakshmi

    Hi!
    Welcome to SDN.
    you have to check the master data tables.
    soo in Se16 you have to select the appropriate master data table and view the data.
    following thread explains about masterdata tables
    MasterData table?
    regards
    mohan
    Message was edited by:
            Mohan Krishna

  • How to check validation for a input field?

    For example, I need to check the validation of a field, if OK, then the field will be inputted, otherwise, there will rise a message, how can I implement that?
    Thanks and best regards,
    Anders

    Hi Andres,
    U can write a code in Request Processing--DO_VALIDATE_INPUT
    DATA: LR_BTADMINH       TYPE REF TO   CL_CRM_BOL_ENTITY.
      LR_BTADMINH  ?= ME->TYPED_CONTEXT->BTADMINH->COLLECTION_WRAPPER->GET_CURRENT( ).
        LV_ZZAFLD000057 = LR_ENTITY->GET_PROPERTY_AS_STRING( 'ZZAFLD000057' ).
    IF  LV_ZZAFLD000057 IS INITIAL.
    DATA: L7_MSG_SERVICE TYPE REF TO CL_BSP_WD_MESSAGE_SERVICE,
              LVSP_MSG_V1  TYPE STRING VALUE 'Spare in Progress'.
        L7_MSG_SERVICE = ME->VIEW_MANAGER->GET_MESSAGE_SERVICE( ).
        L7_MSG_SERVICE->ADD_MESSAGE(
            IV_MSG_TYPE       = 'E'
            IV_MSG_ID         = 'ZBSP'
            IV_MSG_NUMBER     = '008'
            IV_MSG_V1         = LVSP_MSG_V1 ).
    ENDIF.
    Regards,
    Lokesh.

  • How to check image GPS data and get image file from image field

    Hello,
    I have some trouble and want to fix this problem.
    1. I want to validate image file before its attached in image field about the image file have a GPS data or not. Have any way that can be check about image has contained a GPS data?
    2. After validate image and PDF form is upload to the server. I want to get image file that embed in image field, because I have to extract image from PDF form and store this image in project image folder. If this topic can be fix by code script please give me some example code.
    Thakyou for every comment and suggestion
    Best Regards,
    Mai

    Hi Naill,
    First I have to say thankyou for your answer.
    About my (1) question, My image fields have set to be a embedded data and I try to test many example script of image fields.I can get image content type, image size. But that not work when I used ImageField1.desc.embeddedHref.value. It's response as "Unknown Embedded URI". Therefore, image field is and embedded data. How can I access filename?
    (2) In that forum. As I see, his problem is about how to automate change image field with href image file. But I want to extract an exist embedded image in PDF form to normal image file with original metada (such as extract image filed to .JPEG with GPS data. Same as before attached in PDF form.). There has any concept or solution in this problem?
    Best Regards,
    Mai

  • How to check validity period

    Hi All,
    i have a requirement, while creating sales order i want to check creation date with some date range (this will come from some ztable). whether the creation date is in the range or not.
    Can you help on this..
    Regards.,
    Raj.,

    Hi,
    Use user exit 'MV45AFZB', form routine "USEREXIT_CHECK_VBAK".  If you want to validate the date at the time of saving
    the document use the exit "MV45AFZZ", form routine "USEREXIT_SAVE_DOCUMENT_PREPARE".  Do the validation based
    on the value of structure field VBAK-ERDAT.
    Regards
    Vinod

  • How to check the processed data for archieved messages in sap pi

    Dear all,
    1. which tables in sap pi stores the data processed in PI
    2. where will we find the archived messages (DATA but not LOGS)
    3. As table size increases rapidl, how to schedule a background job to delete the table entries which were older than 30 days
    Regards
    Sushant

    Dear Sushanth,
    Welcome to scn,
    For all your query, check "SARA" tcode for answer. In standard, We have pre defined archiving objects (Usually names starts inital 2 letters of module and main table or process like PR_Order).
    There are different tabs available (check screen below) in SARA, Explore each for more information.
    For tables/object identification - use "Database tables" Tab (tcode DB15).
    For Archived data, check "Spool" (green icon beside logs)
    There is option to schedule tasks in Preproc, Write and Delete tabs.
    Hope it helps.
    reg,
    Bhg

  • Looking at a months history, how to check actual day dates of activity

    I am trying to isolate several date periods within a month to assess usage in those periods, (Need to have valid info to pull kids into line!!) The history does not show dates and I can't figure out how to get the info. The web site addresses do not help as we all use many of the same sites. Cheers....Noel

    SQLite Manager extension to see the data.
    https://addons.mozilla.org/en-US/firefox/addon/5817/
    Then use the Epoch converter to translate the date / time.
    http://www.epochconverter.com/

  • How to check all subsites data through command prompt

    I am using MOSS 2007 ,we don't have powershell,  I have to check the size of all subsites size. I run the command in command prompt
    C:\programfiles\commanfiles\microsoftshared\webserverextensions\12\BIN>stsadm -o enumsubwebs -url
    http://abc.xyz.com
    I got all subsites urls, but i need all url's size also. How to do through command prompt?

    Hi Ravikiran,
    The codeplex solution is a custom solution built using SharePoint Server object model, you can download the code also from the following location.
    http://spusedspaceinfo.codeplex.com/releases/view/20413
    The following is the code from the above project.
    using System;
    using System.Collections;
    using System.Configuration;
    using System.Data;
    using System.IO;
    using Microsoft.SharePoint;
    using System.Diagnostics;
    using Microsoft.SharePoint.Administration;
    using System.Collections.Generic;
    namespace SPUsedSpaceInformation
    class Program
    static void Main(string[] args)
    SPFarm farm = SPFarm.Local;
    SPWebService service = farm.Services.GetValue<SPWebService>("");
    Console.WriteLine("Select a Web Application:");
    Console.WriteLine("-------------------------");
    int n = 1;
    List<Guid> webAppIds=new List<Guid>();
    foreach (SPWebApplication webApplication in service.WebApplications)
    Console.WriteLine(string.Format("{0}) {1}", n, webApplication.DisplayName));
    webAppIds.Add(webApplication.Id);
    n++;
    int quit=n;
    Console.WriteLine(string.Format("{0}) Quit",n));
    Console.WriteLine("? ");
    int choice1 = 0;
    while (true)
    string choice2 = Console.ReadLine();
    if (int.TryParse(choice2, out choice1))
    if (choice1 > 0 && choice1 < quit)
    SPWebApplication webApplication = service.WebApplications[webAppIds[choice1 - 1]];
    Console.WriteLine("Select a Site Collection:");
    Console.WriteLine("-------------------------");
    n = 1;
    foreach (SPSite site in webApplication.Sites)
    Console.WriteLine(string.Format("{0}) {1}", n, site.Url));
    n++;
    quit=n;
    Console.WriteLine(string.Format("{0}) Quit",n));
    Console.WriteLine("? ");
    choice1 = 0;
    while (true)
    choice2 = Console.ReadLine();
    if (int.TryParse(choice2, out choice1))
    if (choice1 > 0 && choice1 < quit)
    SPSite siteColl = webApplication.Sites[choice1 - 1];
    DataTable tableStorage = siteColl.StorageManagementInformation(SPSite.StorageManagementInformationType.Document, SPSite.StorageManagementSortOrder.Decreasing, SPSite.StorageManagementSortedOn.Size, 0xf4240);
    Hashtable ht = new Hashtable();
    foreach (DataRow dr in tableStorage.Rows)
    if (ht[dr["WebUrl"].ToString()] == null)
    ht[dr["WebUrl"].ToString()] = (double)dr["TotalSize"];
    else
    ht[dr["WebUrl"].ToString()] = ((double)ht[dr["WebUrl"].ToString()]) + ((double)dr["TotalSize"]);
    string folderPath = string.Concat(new object[] { Directory.GetCurrentDirectory(), Path.DirectorySeparatorChar, "Listings" });
    if (!Directory.Exists(folderPath))
    Directory.CreateDirectory(folderPath);
    using (StreamWriter writer = File.CreateText(string.Concat(new object[] { folderPath, Path.DirectorySeparatorChar, "SitesListingsUsage", DateTime.Now.ToString().Replace("/", "-").Replace(":", "-"), ".csv" })))
    foreach (string key in ht.Keys)
    writer.WriteLine(string.Format("{0};{1}", key, ht[key].ToString()));
    SPWeb currentWeb = siteColl.RootWeb;
    using (currentWeb)
    using (StreamWriter writer = File.CreateText(string.Concat(new object[] { folderPath, Path.DirectorySeparatorChar, "SitesListingsInfo", DateTime.Now.ToString().Replace("/", "-").Replace(":", "-"), ".csv" })))
    string separation = string.Empty;
    ListWebs(currentWeb, separation, writer);
    Console.WriteLine("Press a touch to quit...");
    Console.ReadLine();
    Process.Start(folderPath);
    return;
    else if (choice1 == quit)
    return;
    else
    Console.WriteLine("? ");
    else
    Console.WriteLine("? ");
    else if (choice1 == quit)
    return;
    else
    Console.WriteLine("? ");
    else
    Console.WriteLine("? ");
    private static void ListWebs(SPWeb Web, string Separation, StreamWriter Writer)
    string ownersMail = string.Empty;
    SPGroup ownerGroup = null;
    ownerGroup = Web.AssociatedOwnerGroup;
    if (ownerGroup == null)
    foreach (SPRoleAssignment roleAssignment in Web.RoleAssignments)
    if ((roleAssignment.Member is SPGroup) && roleAssignment.Member.Name.ToLower().Contains("owner"))
    SPGroup group = (SPGroup)roleAssignment.Member;
    foreach (SPUser user in group.Users)
    if (!string.IsNullOrEmpty(user.Email))
    if (string.IsNullOrEmpty(ownersMail))
    ownersMail = user.Email;
    else
    ownersMail = ownersMail + "," + user.Email;
    break;
    else
    foreach (SPUser user in ownerGroup.Users)
    if (!string.IsNullOrEmpty(user.Email))
    if (string.IsNullOrEmpty(ownersMail))
    ownersMail = user.Email;
    else
    ownersMail = ownersMail + "," + user.Email;
    string accessRequestMail = string.Empty;
    if (Web.RequestAccessEnabled)
    accessRequestMail = Web.RequestAccessEmail;
    string authorMail = string.Empty;
    try
    authorMail = Web.Author.Email;
    catch { }
    Writer.WriteLine(string.Format("{0};{1};{2};{3};{4};{5};{6}", new object[] { Web.Title, Web.Url, authorMail, Web.Created.ToString(), accessRequestMail, Web.LastItemModifiedDate.ToString(), ownersMail }));
    Console.WriteLine(string.Format("{0};{1};{2};{3};{4};{5};{6}", new object[] { Web.Title, Web.Url, authorMail, Web.Created.ToString(), accessRequestMail, Web.LastItemModifiedDate.ToString(), ownersMail }));
    foreach (SPWeb childWeb in Web.Webs)
    ListWebs(childWeb, Separation + "--", Writer);
    Please don't forget to mark it as answered, if your problem resolved or helpful.

  • How to Check Creation/Change data for PO Service Line item

    Hi, I was wondering what field(s) from what table(s) I would have to check if I wanted a report to look for the creation or chnaged date of a specific service item in a PO?
    Currently it is using the EKPO-AEDAT field to check if a PO line item has been changed, but I would like to narrow it down to just some service line items instead of capturing all the service lines in a recently changed PO line item.
    Thank you very much in advance for the advice!

    Hi Rashid, thanks for the advice, but it doesn't really solve my problem.
    What I want to know is if there is a field where the date of a service item was created in a PO line item is stored, so that an ABAP report can be written to retrieve newly created service items from POs.

Maybe you are looking for