Possible Sequential Read Access for a Sorted Table

Hi All,
I have the following warnings in Code inspector check.
'Possible Sequential Read Access for a Sorted Table'
Kindly provide me the solution to overcome this warning message.
This is my code in BAdi : CRM_ORDER_FIELDCHECK , Method : FIELDCHECK
I am getting the above warning at
  READ TABLE lt_status INTO ls_status WITH KEY status = 'E0001'
                                               user_stat_proc = 'ZITRHDQT'
                                               object_type = 'BUS2000114'.
and at
    MODIFY ct_input_field_names FROM ls_input_field_names
                                TRANSPORTING changeable
                                WHERE fieldname NE lv_field.
Please see the below code .
  DATA : lt_header_guid TYPE crmt_object_guid_tab,
         lt_item_guid TYPE crmt_object_guid_tab,
         lt_order_i     TYPE crmt_orderadm_i_wrkt,
         ls_order_i     LIKE LINE OF lt_order_i,
         lt_status      TYPE crmt_status_wrkt,
         ls_status      LIKE LINE OF lt_status,
         ls_input_field_names  TYPE crmt_input_field_names.
  DATA : lv_header_guid TYPE crmt_fieldcheck_com-guid,
         lv_chng_no   TYPE c VALUE 'A',
         lv_field(10)  TYPE c VALUE 'ACT_STATUS'.
  DATA: lv_status_completed     TYPE crmt_boolean.
To Get GUID
  IF is_fieldcheck_com-guid IS NOT INITIAL.
    lv_header_guid = is_fieldcheck_com-guid.
  ELSE.
    lv_header_guid = is_fieldcheck_com-ref_guid.
  ENDIF.
  IF is_fieldcheck_com-ref_kind EQ 'A'.
    INSERT lv_header_guid INTO TABLE lt_header_guid.
    ELSE.
      SELECT SINGLE header FROM crmd_orderadm_i INTO lv_header_guid
                            WHERE guid = is_fieldcheck_com-ref_guid.
      INSERT lv_header_guid INTO TABLE lt_header_guid.
  ENDIF.
*To Get the required details
  CALL FUNCTION 'CRM_ORDER_READ'
    EXPORTING
      it_header_guid       = lt_header_guid
    IMPORTING
      et_status            = lt_status
    EXCEPTIONS
      document_not_found   = 1
      error_occurred       = 2
      document_locked      = 3
      no_change_authority  = 4
      no_display_authority = 5
      no_change_allowed    = 6
      OTHERS               = 7.
  IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  READ TABLE lt_status INTO ls_status WITH KEY status = 'E0001'
                                               user_stat_proc = 'ZITRHDQT'
                                               object_type = 'BUS2000114'.
  IF sy-subrc = 0.
    ls_input_field_names-changeable = lv_chng_no.
    MODIFY ct_input_field_names FROM ls_input_field_names
                                TRANSPORTING changeable
                                WHERE fieldname NE lv_field.
  ENDIF.
ENDMETHOD.
Regards
Venkat

Hello Blake,
Try this:
READ TABLE lt_action_fld WITH KEY STATUS = '0' BINARY SEARCH.
wf_index = sy-tabix.
loop at lt_action_fld from wf_index.
if lt_action_fld-status ne '0'.
exit.
endif.
delete lt_action_fld index wf_index.
endloop.
Let us know, if this helps.
Rgds,
Raghu.

Similar Messages

  • Please solve the code inpsector error: Sequential read access possible

    Hi,
      i am getting code inspector warning message . could u please try to provide the solution for that warning message.
    code inspector warning message is :   Sequential read access possible for a hashed table
    My statment :  read table <lt_product_mbr> with table key (ujr0_c_member_id) = <l_product> assigning <ls_product_mbr>.
    i declared  <LT_PRODUCT_MBR>  TYPE ANY TABLE.
    Eventough i delared  it as a type hashed or sorted . it is giving same warning message.
    Regards
    Koti

    Hi Koti,
    you specified the key field dynamically (variable in brackets). That means
    it can not be checked statically whether the table key of the hashed table
    is used or not since this is only clear at run time.
    If you use the dynamic key specification
    read table <lt_product_mbr> with table key (ujr0_c_member_id) = <l_product> assigning <ls_product_mbr>.
    and not the direct key:
    read table <lt_product_mbr> with table key field = <l_product> assigning <ls_product_mbr>.
    the CI will  warn you that you may end up with a sequential red (if not the table key of the hashed table
    is used in the variable at run time.
    Kind regards,
    Hermann

  • Is it possible to give a user read access to an SAP table but to restrict it to a subset of columns?

    Hi,
    is it possible to give a user read access to an SAP table but to restrict it to a subset of columns?
    Thanks,
    Digesh

    Hi Digesh,
    If your requirement is to restrict the excess to specific rows it is possible to use S_TABU_LIN, but it works only for table which contains org units, like plant, company code, etc.
    Please search for S_TABU_LIN if this is your requirement.
    Otherwise please follow Alex's suggestion.
    BR,
    Mangesh

  • Can't we use Binary SEARCH  for TYPE SORTED TABLE?(Performance Improvement)

    Hi Expert!
                       I have declare a sorted type table with NON -UNIQUE, and want to use Binary search in read statement. But while  using bunary search in read statement I'm facing an error. The ERROR is
    "Table LI_MARC is a SORTED TABLE or INDEX TABLE. The BINARY SEARCH
    addition is only allowed for these tables if the key specified is an
    initial part of the table key."
    Please find detail
    TYES: tt_marc  TYPE SORTED TABLE OF marc   WITH NON-UNIQUE KEY matnr,werks.
    DATA: li_marc type tt_marc.
    READ TABLE li_marc INTO marc WITH KEY matnr = i_mbew-matnr     
                                                                          werks = i_mbew-bwkey BINARY SEARCH . 
    To my understanding , there is no need to mention Bianry Search  for sorted table TYPE. Please  let me know can  i use ?

    Hello,
    there is no need to mention Bianry Search for sorted table TYPE.
    Yes, this is because for SORTED TABLEs binary search algorithm is used by default for READ TABLE. Although you can use BINARY SEARCH addition but it's use is redundant.
    As for your case you've defined the KEY fields incorrectly There shouldn't be any "comma(s)" between the fields.
    TYPES: tt_marc TYPE SORTED TABLE OF marc WITH NON-UNIQUE KEY matnr werks.
    When you define it with commas
    TYPES: tt_marc TYPE SORTED TABLE OF marc WITH NON-UNIQUE KEY matnr, werks.
    the result is something like this:
    TYPES: tt_marc TYPE SORTED TABLE OF marc WITH NON-UNIQUE KEY matnr.
    TYPES: werks.
    Hence you were getting the syntax error!
    BR,
    Suhas
    PS: As for MARC you can use UNIQUE KEY addition because MATNR & WERKS are the key fields in the table.

  • Create user with read access for all tables SAP SID .*

    Hello all,
    could you please help me ? I would like to grant select privilege on all tables SAP<SID>.* for newly created user.
    I have created standard database user (not exclusive).
    I`m able to grant select for individual tables, but I would like to grant select for this user on all SAP<SID>
    schema in simplier way
    But as far as I know, the schema`s owner name must be different then schema name.
    Any idea please ?
    Thank you.
    Pavol

    create user <user_name> identified by <password> <options>;
    grant read on all tables:-
    CREATE OR REPLACE PROCEDURE GRANT_SELECT AS
    CURSOR ut_cur IS
    SELECT table_name
    FROM user_tables;
    RetVal NUMBER;
    sCursor INT;
    sqlstr VARCHAR2(250);
    BEGIN
    FOR ut_rec IN user_tabs_cur;
    LOOP
    sqlstr := 'GRANT SELECT ON '|| ut_rec.table_name
    || ' TO <user_name>';
    sCursor := dbms_sql.open_cursor;
    dbms_sql.parse(sCursor,sqlstr, dbms_sql.native);
    RetVal := dbms_sql.execute(sCursor);
    dbms_sql.close_cursor(sCursor);
    END LOOP;
    END grant_select;
    Edited by: varun4dba on Jan 18, 2011 4:13 PM

  • Only Essbase read access for a Planning App

    A user needs access only to read data values from essbase for a planning application. Similar to "View User" in Planning roles except doesn't need access to Planning. How can this be achieved?
    Thanks

    I would have thought as it is a planning application then you would need to provision a planning role for the user, the application will be seen as a planning application in shared services and not be under essbase.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Sequential read in sm66 - Database size 550GB - system slow for users

    Hello,
    Currently when we use any standard transactions  or custom program, it is going to sequential read in sm66.
    We are getting slowness in system due to this issue for users.
    Sm66 log:
    sapXX01_XXX_00  0  DIA     12873 Running            Yes                  6 XIRFC    ZCL_WM_S Sequential Read MARD
    sapXX01_XXX_00 20  BTC     16155 Running            Yes                 15 Zuser1  ZCL_SD_D Sequential Read LTAP
    sapXX01_XXX_00 29  SPO     12018 Running            Yes                 12 Zuser1   print 35
    sapXX01_XXX_00 30  SPO     12037 Running            Yes                 12 Zuser1   print 35
    sapXX01_XXX_00 31  SPO     12041 Running            Yes                 12 SAPSYS   querying
    sapXX02_XXX_02  3  DIA     15098 Running            Yes                714 Zuser2  ZCL_IM_B
    sapXX02_XXX_02  4  DIA      8158 Running            Yes                 38 Zuser2  RWRPLPRO Sequential Read WRPL
    sapXX02_XXX_02  6  DIA      8160 Running            Yes                555 Zuser3  ZCL_IM_B
    sapXX03_XXX_03  0  DIA      1969 Running            Yes               2390 Zuser5 SAPLFAGL Sequential Read BSIS
    sapXX03_XXX_04  0  BTC     10811 Running            Yes                209 Zuser6   ZCL_SD_D Sequential Read LTA
    Database: Maxdb
    OS: Linux
    I understand that if you create Index on these table ( whichever it shows as sequential read ), it will improve the report performance.
    Most of the time, system process shows that sequential read on VBAP, VKPA (sales tables), purchase tables, Finance tables and etc.
    If sm66 shows as sequential read for few table, that means that corresponding user will get slowness on getting report/transaction output. I agree on that.
    Is there any reason other user will get slowness ie if i run Va03 transaction, WE02 transaction which is not relevant to sm66 process over view.
    I appreciate, if you give some recommendations reg. this performance improvement and to avoid this kind of sequential read.
    I posted the Same question in DB forum also.
    I want to get some more idea from this forum also. That is reason, i posted here again.
    Thanks
    Praba

    Hi Volker,
    Thanks for your reply.
    We have three application server instance ie 00, 02, 03,   -
    04 (enque server)
    1) This parameter value on 00 instance ie : rdisp/wp_no_spo -  Number of spool work processes
    Dflt value - 0
    ProfileVa - 1
    Current value - 1
    Minimum - Nothing
    Maximum - 100
    2) his parameter value on 02 instance ie : rdisp/wp_no_spo -  Number of spool work processes
    Dflt value - 0
    ProfileVa - 1
    Current value - 1
    Minimum - Nothing
    Maximum - 100
    3) his parameter value on 03 instance ie : rdisp/wp_no_spo -  Number of spool work processes
    Dflt value - 0
    ProfileVa - 1
    Current value - 1
    Minimum - Nothing
    Maximum - 100

  • How to read the data from a sorted table

    Hi all,
    How to read data from the sorted tables. Please provide some examples.
    Thanks and regards,
    Lisa

    You can read like this :
    DATA: BEGIN OF LINE,
    COL1 TYPE I,
    COL2 TYPE I,
    END OF LINE.
    DATA ITAB LIKE SORTED TABLE OF LINE WITH UNIQUE KEY COL1.
    DO 4 TIMES.
      LINE-COL1 = SY-INDEX.
      LINE-COL2 = SY-INDEX ** 2.
    INSERT LINE INTO TABLE ITAB.
    ENDDO.
    CLEAR LINE.
    READ TABLE ITAB WITH TABLE KEY COL1 = 3
                    INTO LINE TRANSPORTING COL2.
    WRITE:   'SY-SUBRC =', SY-SUBRC,
           / 'SY-TABIX =', SY-TABIX.
    SKIP.
    WRITE: / LINE-COL1, LINE-COL2.

  • Social comment control in custom page layout stucks at "Working" for read access users

    Hi,
    I created a custom page layout which is attched to my custom content type.
    i have a custom field control which is derived from RichImageField.
    i have also added a social comment control to the page layout using
    <SharePointPortalControls:SocialCommentControl ID="SocialCommentControl1" runat="server"  />.
    Now the problem is, an user who have read access for a pages library should post comments. but its not working and when the user clicks post button it stucks at working. but when the user is given contribute access then it works and the comments are posted.
    And one more thing is if i remove my custom field control from the page layout, then user with read access can post the comment without any issues.
    i am sure the issue is caused by my custom field control but dont know how to solve it. i dont want to give contribute access to the users as they can edit the content of the page also. Any help would be appreciated.
    This is the custom field control code.
    public class mycompanyRichImageField : RichImageField
    public static string webimage = null;
    #region Private variables
    /// <summary>
    /// File upload control used to upload image.
    /// </summary>
    private FileUpload fileUpload;
    /// <summary>
    /// Upload button.
    /// </summary>
    private Button btnSave;
    /// <summary>
    /// Delete button.
    /// </summary>
    private Button btnClear;
    /// <summary>
    /// Article image.
    /// </summary>
    private Image imgPicture;
    /// <summary>
    /// Image width.
    /// </summary>
    private DropDownList ddlWidth;
    /// <summary>
    /// Temporary store image url.
    /// </summary>
    private Label lblFileName;
    /// <summary>
    /// Image text.
    /// </summary>
    private TextBox txtImage;
    /// <summary>
    /// Value of image field.
    /// </summary>
    private ImageFieldValue pageImage;
    /// <summary>
    /// List item - current article.
    /// </summary>
    private SPListItem ArticlePage = SPContext.Current.ListItem;
    /// <summary>
    /// The first image width dropdown list options, default value 240 px.
    /// </summary>
    // private int imageWidthWide = 400;
    //private int height = 225;
    /// <summary>
    /// The second image width dropdown list options, default value 120 px.
    /// </summary>
    private int imageWidthNarrow = 126;
    /// <summary>
    /// Picture library to store the image files.
    /// </summary>
    private string imageLibrary = "Images";
    /// <summary>
    /// List field to store Article image.
    /// </summary>
    private string imageField = "Page Image";
    /// <summary>
    /// List field to store image text.
    /// </summary>
    private string imageTextField = "Image Text";
    private string preview = "Preview";
    /// <summary>
    /// List field to store rollup image.
    /// </summary>
    private string rollupImageField = "Rollup Image";
    /// <summary>
    /// Whether to update the rollup image using the current image.
    /// </summary>
    private bool updateRollupImage = false;
    /// <summary>
    /// Whether to display image text.
    /// </summary>
    private bool enableImageText = true;
    #endregion
    #region Properties
    /// <summary>
    /// Gets or sets the first choice of image width.
    /// </summary>
    //public int ImageWidthWide
    // get
    // return this.imageWidthWide;
    // set
    // this.imageWidthWide = value;
    //public int ImageHeight
    // get
    // return this.height;
    // set
    // this.height = value;
    /// <summary>
    /// Gets or sets the second choice of image width.
    /// </summary>
    public int ImageWidthNarrow
    get
    return this.imageWidthNarrow;
    set
    this.imageWidthNarrow = value;
    /// <summary>
    /// Gets or sets the name of the picture library that is used to store image files.
    /// </summary>
    public string ImageLibrary
    get
    return this.imageLibrary;
    set
    this.imageLibrary = value;
    /// <summary>
    /// Gets or sets the field name of image.
    /// </summary>
    public string ImageField
    get
    return this.imageField;
    set
    this.imageField = value;
    /// <summary>
    /// Gets or sets the field name of image text.
    /// </summary>
    public string ImageTextField
    get
    return this.imageTextField;
    set
    this.imageTextField = value;
    /// <summary>
    /// Gets or sets the field name of rollup image.
    /// </summary>
    public string RollupImageField
    get
    return this.rollupImageField;
    set
    this.rollupImageField = value;
    public string Preview
    get
    return this.preview;
    set
    this.preview = value;
    /// <summary>
    /// Gets or sets a value indicating whether to update rollup image using current image.
    /// </summary>
    public bool UpdateRollupImage
    get
    return this.updateRollupImage;
    set
    this.updateRollupImage = value;
    /// <summary>
    /// Gets or sets a value indicating whether the image text should be displayed.
    /// </summary>
    public bool EnableImageText
    get
    return this.enableImageText;
    set
    this.enableImageText = value;
    #endregion
    #region Override methods
    /// <summary>
    /// Using get method instead of set method to set the value.
    /// set method cannot be used here.
    /// </summary>
    public override object Value
    get
    ImageFieldValue value = new ImageFieldValue();
    value.ImageUrl = string.IsNullOrEmpty(this.lblFileName.Text) ? this.imgPicture.ImageUrl : this.lblFileName.Text;
    // value.Width = string.IsNullOrEmpty(this.ddlWidth.Text) ? this.ImageWidthWide : Convert.ToInt32(this.ddlWidth.Text);
    // value.Height = this.ImageHeight;
    ////update the page rollup image.
    if (this.UpdateRollupImage)
    this.ArticlePage[this.RollupImageField] = value;
    if (this.EnableImageText)
    this.ArticlePage[this.ImageTextField] = this.txtImage.Text;
    this.ArticlePage.SystemUpdate(false);
    return value;
    set
    base.Value = value;
    /// <summary>
    /// Intialize all controls.
    /// </summary>
    protected override void CreateChildControls()
    this.pageImage = (ImageFieldValue)this.ArticlePage[this.imageField];
    this.ddlWidth = new DropDownList();
    this.ddlWidth.Width = 99;
    // this.ddlWidth.Items.Add(this.ImageWidthWide.ToString());
    this.ddlWidth.Items.Add(this.ImageWidthNarrow.ToString());
    if (this.pageImage != null && !string.IsNullOrEmpty(this.pageImage.ImageUrl))
    // if (this.pageImage.Width >= this.ImageWidthWide)
    // // this.ddlWidth.SelectedIndex = 0;
    //else
    // // this.ddlWidth.SelectedIndex = 1;
    // this.Controls.Add(this.ddlWidth);
    this.imgPicture = new Image();
    if (this.pageImage != null && !string.IsNullOrEmpty(this.pageImage.ImageUrl))
    this.imgPicture.ImageUrl = SPContext.Current.Site.Url + this.pageImage.ImageUrl;
    this.Controls.Add(this.imgPicture);
    this.fileUpload = new FileUpload();
    this.fileUpload.Width = 180;
    this.Controls.Add(this.fileUpload);
    this.btnSave = new Button();
    this.btnSave.Text = "Upload";
    this.btnSave.CausesValidation = false;
    this.btnSave.Visible = string.IsNullOrEmpty(this.imgPicture.ImageUrl) ? true : false;
    this.Controls.Add(this.btnSave);
    this.btnSave.Click += new EventHandler(this.BtnSave_Click);
    this.btnClear = new Button();
    this.btnClear.Text = "Delete";
    this.btnClear.CausesValidation = false;
    this.btnClear.Visible = !this.btnSave.Visible;
    this.Controls.Add(this.btnClear);
    this.btnClear.Click += new EventHandler(this.BtnClear_Click);
    this.lblFileName = new Label();
    this.Controls.Add(this.lblFileName);
    if (this.EnableImageText)
    this.txtImage = new TextBox();
    this.txtImage.TextMode = TextBoxMode.MultiLine;
    this.txtImage.Rows = 4;
    this.txtImage.Text = this.ArticlePage[this.ImageTextField] == null ? string.Empty : this.ArticlePage[this.ImageTextField].ToString();
    this.Controls.Add(this.txtImage);
    /// <summary>
    /// Render the field in page edit mode.
    /// </summary>
    /// <param name="output">Output stream.</param>
    protected override void RenderFieldForInput(System.Web.UI.HtmlTextWriter output)
    output.Write("<div style='padding-bottom:12px'>");
    if (!string.IsNullOrEmpty(this.imgPicture.ImageUrl))
    output.Write("<br />");
    // this.imgPicture.Width = ((ImageFieldValue)this.Value).Width;
    // this.imgPicture.Height = ((ImageFieldValue)this.Value).Height;
    this.imgPicture.RenderControl(output);
    if (this.EnableImageText)
    this.txtImage.Width = this.imgPicture.Width;
    if (this.EnableImageText)
    output.Write("<br />");
    this.txtImage.RenderControl(output);
    output.Write("<br /><br />");
    this.fileUpload.RenderControl(output);
    this.btnSave.RenderControl(output);
    this.btnClear.RenderControl(output);
    output.Write("<br /><br />");
    //output.Write("Width:");
    //this.ddlWidth.RenderControl(output);
    output.Write("</div>");
    /// <summary>
    /// Render the field in page display mode.
    /// </summary>
    /// <param name="output">Output stream.</param>
    protected override void RenderFieldForDisplay(System.Web.UI.HtmlTextWriter output)
    if (this.ListItemFieldValue != null)
    output.Write("<div style='padding-bottom:12px'>");
    base.RenderFieldForDisplay(output);
    if (this.EnableImageText && this.ArticlePage[this.ImageField] != null
    && this.ArticlePage[this.ImageTextField] != null)
    //string strImgWidth = string.IsNullOrEmpty(this.ddlWidth.Text) ? this.ImageWidthWide.ToString() : this.ddlWidth.Text;
    //string strImgHgt = this.ImageHeight.ToString();
    output.Write("<div style='width:");
    // output.Write(strImgWidth);
    // output.Write(this.imgPicture.ImageUrl);
    // output.Write("<div style='height:");
    // output.Write(strImgHgt);
    output.Write(";margin-right:4px;' align='left'>");
    output.Write(this.ArticlePage[this.ImageTextField].ToString());
    output.Write("</div>");
    output.Write("</div>");
    #endregion
    #region Button events
    /// <summary>
    /// Delete image file from the library and empty the image field.
    /// </summary>
    /// <param name="sender">Delete button.</param>
    /// <param name="e">No arguments.</param>
    protected void BtnClear_Click(object sender, EventArgs e)
    ////remove the image file from the Images library
    using (SPSite site = new SPSite(
    SPContext.Current.Web.Url,
    SpSecurityHelper.GetSystemToken(SPContext.Current.Site)))
    using (SPWeb currentWeb = site.OpenWeb())
    SPDocumentLibrary imageList = (SPDocumentLibrary)currentWeb.Lists[this.ImageLibrary];
    SPFolder rootFolder = imageList.RootFolder;
    try
    currentWeb.AllowUnsafeUpdates = true;
    rootFolder.Files.Delete(this.imgPicture.ImageUrl);
    rootFolder.Update();
    catch
    ////cannot delete specified file, this means file doesn't exist, the file must be deleted
    ////directly in the Images library by someone
    ////don't do anything here
    finally
    currentWeb.AllowUnsafeUpdates = false;
    if (this.pageImage != null)
    this.pageImage.ImageUrl = string.Empty;
    this.imgPicture.ImageUrl = string.Empty;
    this.lblFileName.Text = string.Empty;
    this.btnClear.Visible = false;
    this.btnSave.Visible = true;
    /// <summary>
    /// Upload image file to library and fullfilled the image field.
    /// </summary>
    /// <param name="sender">Upload button.</param>
    /// <param name="e">No argument.</param>
    protected void BtnSave_Click(object sender, EventArgs e)
    this.ArticlePage[this.ImageTextField] = this.txtImage.Text;
    this.ArticlePage.SystemUpdate(false);
    string fileName = this.fileUpload.FileName;
    ////validate file name
    if (fileName == string.Empty || !this.fileUpload.HasFile)
    this.lblFileName.Text = string.Empty;
    if (this.pageImage == null)
    this.Page.ClientScript.RegisterStartupScript(typeof(string), "NoImage", "<script>alert('No image found, please select an image.')</script>", false);
    else
    using (SPSite site = new SPSite(
    SPContext.Current.Web.Url,
    SpSecurityHelper.GetSystemToken(SPContext.Current.Site)))
    using (SPWeb currentWeb = site.OpenWeb())
    SPDocumentLibrary imageList = (SPDocumentLibrary)currentWeb.Lists[this.ImageLibrary]; ////Images
    SPFolder rootFolder = imageList.RootFolder;
    ////the image file name must be unique except for the file name extension
    string imageName = this.ArticlePage.UniqueId.ToString("N") + this.FieldName + Path.GetExtension(fileName);
    ////first delete the image file from the Images library.
    ////if a file with different file name extension is uploaded, the old file won't be overwritten,
    ////and will never be deleted from this page, so it must be deleted before adding a new one.
    if (this.pageImage != null && !string.IsNullOrEmpty(this.pageImage.ImageUrl))
    try
    currentWeb.AllowUnsafeUpdates = true;
    rootFolder.Files.Delete(this.pageImage.ImageUrl);
    rootFolder.Update();
    catch
    ////cannot delete specified file, this means file doesn't exist, the file must be deleted
    ////directly in the Images library by someone
    finally
    currentWeb.AllowUnsafeUpdates = false;
    try
    currentWeb.AllowUnsafeUpdates = true;
    SPFile imageFile = rootFolder.Files.Add(imageName, this.fileUpload.FileBytes, true);
    finally
    currentWeb.AllowUnsafeUpdates = false;
    // this.lblFileName.Text = currentWeb.Site.Url + imageList.RootFolder.ServerRelativeUrl + "/" + imageName;
    this.lblFileName.Text = currentWeb.Site.Url + imageList.RootFolder.ServerRelativeUrl + "/_w/" + imageName.Substring(0, imageName.LastIndexOf(".")) + "_" + imageName.Substring(imageName.IndexOf(".") + 1) + "." + imageName.Substring(imageName.IndexOf(".") + 1);
    // webimage = currentWeb.Site.Url + imageList.RootFolder.ServerRelativeUrl + "/_w/" + imageName.Substring(0,imageName.LastIndexOf("."))+"_"+imageName.Substring(imageName.IndexOf(".")+1) +"." + imageName.Substring(imageName.IndexOf(".")+1);
    this.imgPicture.ImageUrl = this.lblFileName.Text;
    this.btnClear.Visible = true;
    this.btnSave.Visible = false;
    #endregion
    This is how i used it in my page layout
     <Article:mycompnayRichImageField runat="server" ID="RichImageField1" InputFieldLabel="Keep image text short and precise" FieldName="PublishingPageImage" UpdateRollupImage="true"/>
    Aruna

    Hi,
    For this issue, I'm trying to involve someone familiar with this topic to further look at it.
    Thanks,
    Jason Guo
    TechNet Community Support

  • Sorted tables

    eg. is this way of doing correct for building sorted table?
    will this lose the binary properties for quick access?
    sort standard_itab by a b c.
    sorteditab[] = standard_itab[]
    or should it be this way? using insert?
    loop at standard_itab into wa.
      insert wa into sorteditab.
    endloop.

    Hi Charles,
    sorteditab[] = standard_itab[]
    is correct but will cause a dump if you have duplicate keys in the standard_itab.
    loop at standard_itab into wa.
      insert wa into sorteditab.
    endloop.
    is comparably very slow because for all loops the table line is copied to the work area. And it is syntacticalkly not correct because you must use into table ... when inserting into sorted itabs.
    Do it using field-symbols, optional remember duplicates:
    field-symbols:
      <itab> like standard_itab.
    data:
      lt_itab_dup like sorteditab.
    loop at standard_itab assigning <itab>.
      insert <itab> into table sorteditab. "Note: must use TABLE otherwise syntax error
      check sy-subrc <> 0. "Record akready exists
      insert <itab> into table lt_itab_dup.
    endloop.
    Now it won't fail under any circumstances. And you have the duplicate key records in table lt_itab_dup for evaulation purposes.
    Regards,
    Clemens

  • How to limit file access for different users in 10.7.4 Server

    We had everything working perfectly with an earlier version of Lion Server. The update to 10.7.3, or 4, seems to have opened access to all files for all users. Much to our surprise, this wide-open access started without warning.
    - We have an external drive that contains all of the company's archives
    - We had set access for one employee to get to the files he needs, and different access for another employee. Neither saw sharepoints outside of their access settings.
    After an update, each employee can see and log in to all sharepoints. There doesn't seem to be a way to limit access for each employee now. I can set 'read' access for one employee, but it doesn't stop the other employee from accessing that sharepoint/folder.
    Is there some new way to go about this? Or is something simply broken with the current release?

    That is good to know. If the file share is seeing the drive and ignoring its permissions, that is why everyone can see everything. I have found, in Lion Server, that it is best to get the permissions set before turning on File Sharing. I don't know if you have the luxury of turning the file share off for a little while, but I would unshare the drive and see if the issue persists if you plug the external drive into another machine. The settings for permissions are set on the file or folder itself, so the issue should follow you to the other machine.
    Again, if you can, I would unshare the drive and reshare it with the permissions that you want and turn file sharing back on. However, if you can get the drive to respect permissions rather than ignoring them, I think it will save you a lot of work.

  • Create dump file with datapump, with read right for everybody

    Hello,
    I have a problem under Linux : I am creating dump files with datapump.
    Those dump files are owned by a dba group, with no read access for users not in the dba group.
    Is there a way that the datapump utility creates dump files with a read access given to any user ?
    Franck

    Unlike "exp", when using "expdp", the dumpfile is created by the server process. The server process is forked from the database instance. It inherits the umask settings that are present when the database instance is started.
    (Therefore, the only way to change the permissions would be to change the umask for the oracle database server id and restart the database instance --- which is NOT what I would recommend).
    umask is set so that all database files created (e.g. with CREATE TABLESPACE or ALTER TABLESPACE ADD DATAFILE) are created with "secure" permissions preventing others from overwriting them -- of course, this is relevant if your database files are on FileSystem.
    Hemant K Chitale

  • Query navigation - no sequential read but too long time in SAPLRRK0

    Hello guys, I need your help, please!
    I've created a Query an appropriate aggregates. A test in RSRT with navigation shows a runtime of 300 ses. which I find OK, if I take into consideration the number ao records.
    When I start the query in Analyser and have a look in SM50, I see the sequential read processes for some short time and then htere is a process SAPLRRK0 which takes about 18 minutes (!!!). Only after tis process terminates I receive the results in Analyser.
    I cannot understand why the query runs so quick in RSRT and so slow in Analyser (OK, Excel takes time to formate the cells) - but why does the process SAPLRRK0 take so much runtime?
    Thanks!

    Dear friend
    How to solve this problem with the report SAPLRRK0.
    Thanks
    Cristopher

  • To remove slin error(No Read Access)

    Hi All,
    When I do the extended programing check for my program its giving slin warning as No read  access for that variable .How can i remove that error.
    Thanks
    Shruti

    Hi Shruthi,
    Use "#EC NEEDED at end of that statement, if you need it.
    if you are not using that variable just remove from your code.
    Reward if it helps,
    Satish

  • Proxy error with subversion read access test

    Hi,
    I specified the following repository URL: [http://l0762.domain.local/svn/io_se/trunk] and added username/password for this subversion server.
    I get the following error stack when doing 'Test Read Access':
    Testing read access for repository [http://l0762.domain.local/svn/io_se/trunk..].
    svn: PROPFIND of '/svn/io_se/trunk': 502 Proxy Error ( The ISA Server denied the specified Uniform Resource Locator (URL). ) ([http://l0762.domain.local|http://l0762.domain.local/])
    svn: PROPFIND of '/svn/io_se/trunk': 502 Proxy Error ( The ISA Server denied the specified Uniform Resource Locator (URL). ) ([http://l0762.domain.local|http://l0762.domain.local/])
    Access refused.
    In the generic preferences settings for Web Browser and Proxy, I have specified the proxy server, port number and even username/password for this proxy. The "Test Proxy" works fine. The exception list contains the l0762.domain.local. I also tested with *.domain.local.
    Any ideas?
    Thanks,
    Marcel
    Edited by: mmeijn on Nov 20, 2008 2:48 PM

    The problem is resolved by removing the proxy preference.

Maybe you are looking for