Getting pixel values for an image

Hi,
I am trying to compare images to detect where the differences between them occur. I am encountering a few problems
1) when i print out the pixel values for the image,all values are the same - clearly wrong, code i use:
ImageIcon icon = new ImageIcon("x.jpg");
Image image = icon.getImage();
int width = image.getWidth(null);
int height = image.getHeight(null);
BufferedImage buffImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
int[] rgbs = new int[width*height];
buffImage.getRGB(0, 0, width, height, rgbs, 0, width);
for(int i = 0; i<width;i++){
for(int j = 0; j<height; j++){
int rgb = buffImage.getRGB(i, j);
System.out.println("pixel @(" + i + "," + j + ") " + rgb );
and 2)when i compare 2 completely different images my code tells me they are the same...
for(int i = 0; i<width;i++){
for(int j = 0; j<height; j++){
int rgb1 = buffImage.getRGB(i, j);
int rgb2 = buffImage2.getRGB(i, j);
if(rgb1 == rgb2)
matches++;
weHaveAMatch = ((int)((float)matches/(float)pixelCount*100) >= tolerance);
Can any1 please tell me what I am doing wrong or show me how to detect differences between images correctly. Any help is much appreciated

so my for loops were just in the wrong order?No, I don't think you were looping over the image you loaded. It appears that you load one image, but loop over another newly created (hence, blank) image.
I'm having trouble using BufferedImage im = ImageIO.read.. the compiler is telling
me that the method read is not recognised even though i have imported
import javax.imageio.*;you must learn to read the APIs and pay attention to the compiler error messages. ImageIO.read takes either a
-File
-InputStream
-URL
-ImageInputStream
In my example, I pass in a File, so it works. You must still be passing a String.
When i create a bufferedImage the way i originally did,the values printed out are still all -16777216.Yes, because you created a new, blank image, so the value reflects this.
Sorry i'm a complete beginner, can u give me some guidence!Thats ok, everyone is at some time. Guidance : read and understand.

Similar Messages

  • Adobe Standard 9.5.2 after update I get "Insufficient data for an image" error

    After updating to Acrobat Standard and Readre 9.5.2, some (but not all) of my pdf files are now opening with the error "Insufficient data for an image." The files open, but they are fuzzy, pixelated and are missing the bates stamp I applied earlier (using a utility from LexisNexis Casemap). I can open the files fine on another computer with Acrobat Standard 9.5.1.
    How can I uninstall the 9.5.2, or get it to work again?

    Windows 7 64-bit with Samsung SSD on an i5 Lenovo laptop. Yes, I have both Acrobat Standard and Reader 9.5.2 on the machine. Both give the same error when opening the attached file.
    -Dan-
    [email protected]
    Date: Thu, 16 Aug 2012 23:06:52 -0600
    From: [email protected]
    To: [email protected]
    Subject: Adobe Standard 9.5.2 after update I get "Insufficient data for an image" error
        Re: Adobe Standard 9.5.2 after update I get "Insufficient data for an image" error
        created by vamalik in Acrobat Installation & Update Issues - View the full discussion
    Hi osieko,Can you share across any such sample pdf file? Also, what OS are you working upon?You have both Acrobat Standard 9.5.2 and Reader 9.5.2 installed on your machine. Right? One option that you can try is to repair your Acrobat/Reader from Programs in Control Panel and see if that resolves the issue.Otherwise kindly attach a screenshot of the error you are receiving along with any sample pdf file.
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4627764#4627764
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4627764#4627764. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Acrobat Installation & Update Issues by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • To retain color space value for Monochrome images during flattening.

    In our project, we are extracting image content from PDF file and doing some raster operation by using LeadTool and then flattening the processed image in PDF file.
    Input PDf file: One page which has monochrome image
    For extracting image content from PDF file, we are using below Acro Plugin API:
    AVConversionConvertFromPDFWithHandler
    After this, we will perform some raster operations by using LeadTool and then flattening will happen.
    While doing flatten we are performing below operations in sequence:
    1. Set bitspercomponent  =1.
    2. Create a new color table using DeviceRGB.
    3. Create image by using below Acro Plugin API:
    pdeimage = PDEImageCreate(&attrs, sizeof(attrs), &matrix, 0, cols1, NULL, &fil, asstm, NULL, 0);
    4. Add image in PDF content.
    Now flattening is successful, but monochrome(Original Image format) is changed to RGB. We want to retain the color space(DeviceGrey).
    We have tried the below solution to retain the color space:
    1. Using the old image's color space value for new image creation. But this gives inverted color(Black to White and vice versa)
    Please help us to retain the color space while flattening.

    We are using JPG file format.
    Please find below the code portions which we used to add image in PDF file,
    //Read Image Data
    ========================================================================================== ==================
    ASBool ret = TRUE;
    // analyze img
    ASInt32 index = 0, quadSize = 0;
    BITMAPFILEHEADER* bmfh = NULL;
    // BITMAPFILEHEADER
    if(  !bQuadSize )
      bmfh = (BITMAPFILEHEADER*)img;
      index += sizeof(BITMAPFILEHEADER);
    // BITMAPINFOHEADER
    BITMAPINFOHEADER* bmih = (BITMAPINFOHEADER*)(img+index);
    index += sizeof(BITMAPINFOHEADER);
    // RGBQUAD
    if( !bQuadSize )
      quadSize = bmfh->bfOffBits - sizeof(BITMAPFILEHEADER) - sizeof(BITMAPINFOHEADER);
    else
      quadSize = size -  bmih->biSize -  bmih->biSizeImage;
    ASInt32 rgbquadNum = 0;
    char* quad = NULL;
    if (quadSize > 0)
      rgbquadNum = quadSize/sizeof(RGBQUAD);
      quad = (char*)(img+index);
      index += quadSize;
    // Image
    //ULONG imgSize = size - bmfh->bfOffBits;
    char* image = (img+index);
    DURING
       if(!pd)
        E_RETURN(FALSE);
       PDPage pp = PDDocAcquirePage(pd, page-1); // Get Page(PDPage) of specified page number
       PDEContent pdeContent = PDPageAcquirePDEContent(pp, gExtensionID); // Get PageContent(PDEContent)
       ASInt32 numElems = PDEContentGetNumElems(pdeContent);  // Get PageContent num
       // Check BitMap width, height, biXPelsPerMeter, biYPelsPerMeter changed
       ASFixedRect mb;
       PDPageGetMediaBox(pp, &mb);
       ASFixedRect chgMediaBox;
       memset(&chgMediaBox, 0 , sizeof(ASFixedRect));
       if (paperSizeChangeType == PAPERSIZE_SIZESPECIFICATION)
        chgMediaBox.right = width;
        chgMediaBox.top = height;
       // Get PDEImage's Attributes & Filters & ColorSpace from Old Image in PDF file
    ========================================================================================== ===================================
       PDEElement pdeElement;
       ASInt32 importIndex;
       ASInt32 type;
       PDEImageAttrs attrs1;
       PDEColorSpace cols1;
       //ASAtom colname;
       PDEFilterArray fil1[20];
       ASInt32 filNum1;
       ASFixedMatrix matrix1;
       bool isTransformedPage = false; //EV2.8.02000_19651_Retain color space_20141016
       for (int i = 0; i < numElems; i++)
        pdeElement = PDEContentGetElem(pdeContent, i);
        PDEObject obj=_objHelper.TraversePDPageContentsImage((PDEObject)pdeElement);
         if(obj == NULL)
          continue;
         pdeElement= (PDEElement)obj;
        type = PDEObjectGetType((PDEObject)pdeElement);
        if (type == kPDEImage)
         // Get Attr
         PDEImageGetAttrs((PDEImage)pdeElement, &attrs1, sizeof(PDEImageAttrs));
         // Get ColorSpace
         cols1 = PDEImageGetColorSpace((PDEImage)pdeElement);
         // Get Filter Array
         filNum1 = PDEImageGetFilterArray((PDEImage)pdeElement, fil1);
         // Get ASFixedMatrix
         PDEElementGetMatrix(pdeElement, &matrix1);
         //EV2.8.02000_19651_Retain color space_20141016 - Start
         if (matrix1.a < 0 || matrix1.b < 0 ||
                        matrix1.c < 0 || matrix1.d < 0 ||
                        matrix1.h < 0 || matrix1.v < 0)
          isTransformedPage = true;
         //EV2.8.02000_19651_Retain color space_20141016 - End
         // Set Import and Delete Index
         importIndex = i;
         break;
       // Create image data (for PDEImage)
    ========================================================================================== =================================
       ASInt32 bitPerComponent = bmih->biBitCount;
       ASInt32 bitWidth = 0;
       ASInt32 width1 = bmih->biWidth;
       ASInt32 height1 = bmih->biHeight;
       // Create image size
       if (bitPerComponent == 1)
        if (width1%8)
         bitWidth = (width1/8) + 1;
        else
         bitWidth = width1/8;
       else if (bitPerComponent == 4)
        if (width1%2)
         bitWidth = (width1/2)+1;
        else
         bitWidth = width1/2;
       else if (bitPerComponent == 8)
        bitWidth = width1;
       else if (bitPerComponent == 32)
        bitWidth = width1*4;
       else // if (bitPerComponent == 24)
        bitWidth = width1*3;
       ASInt32 imgSize4Acrobat = height1 * bitWidth;
       char* image4Acrobat = (char*)ASmalloc(imgSize4Acrobat);
       if( image4Acrobat == NULL )
        E_RETURN(FALSE);
       memset(image4Acrobat, 0, imgSize4Acrobat);
       // Create image
       ASInt32 nokori = (bitWidth)%4;
       ASInt32 bitWidth4hokan = 0;
       if (nokori)
        bitWidth4hokan = bitWidth + (4-nokori);
       else
        bitWidth4hokan = bitWidth;
       ASInt32 hbw = 0;
       ASInt32 hbw4hokan = 0;
       if (bitPerComponent == 1)
        for (int k = height1-1, l = 0; k >= 0; k--, l++)
         hbw = l*bitWidth;
         hbw4hokan = k*bitWidth4hokan;
         memcpy((image4Acrobat+hbw), (image+hbw4hokan), bitWidth);
       else if (bitPerComponent == 4)
        for (int k = height1-1, l = 0; k >= 0; k--, l++)
         hbw = l*bitWidth;
         hbw4hokan = k*bitWidth4hokan;
         memcpy((image4Acrobat+hbw), (image+hbw4hokan), bitWidth);
       else if (bitPerComponent == 8)
        for (int k = height1-1, l = 0; k >= 0; k--, l++)
         hbw = l*bitWidth;
         hbw4hokan = k*bitWidth4hokan;
         memcpy((image4Acrobat+hbw), (image+hbw4hokan), bitWidth);
       else if (bitPerComponent == 32)
        for (int k = height1-1, l = 0; k >= 0; k--, l++)
         hbw = l*bitWidth;
         hbw4hokan = k*bitWidth4hokan;
         for (int kk = 0; kk < bitWidth; kk += 4)
          *(image4Acrobat+hbw+kk) = *(image+hbw4hokan+(kk+3));
          *(image4Acrobat+hbw+kk+1) = *(image+hbw4hokan+(kk+2));
          *(image4Acrobat+hbw+kk+2) = *(image+hbw4hokan+(kk+1));
          *(image4Acrobat+hbw+kk+3) = *(image+hbw4hokan+(kk));
       else
        for (int k = height1-1, l = 0; k >= 0; k--, l++)
         hbw = l*bitWidth;
         hbw4hokan = k*bitWidth4hokan;
         for (int kk = 0; kk < bitWidth; kk += 3)
          *(image4Acrobat+hbw+kk) = *(image+hbw4hokan+(kk+2));
          *(image4Acrobat+hbw+kk+1) = *(image+hbw4hokan+(kk+1));
          *(image4Acrobat+hbw+kk+2) = *(image+hbw4hokan+(kk));
       //Invert Image Data
    ========================================================================================== ================================
       for(int it = 0; it < imgSize4Acrobat; it++)
          image4Acrobat[it] = 255 -image4Acrobat[it];
       // Open Image Data
    ========================================================================================== ================================
       ASStm asstm = ASMemStmRdOpen(image4Acrobat, imgSize4Acrobat);  
       // Create PDEImage Attribute etc.
    ========================================================================================== ================================
       PDEImageAttrs attrs;
       memset(&attrs, 0, sizeof(PDEImageAttrs)); // necessary
       attrs.width = width1;
       attrs.height = height1;
       if (bitPerComponent == 1) {
        attrs.bitsPerComponent = 1;
        if (rgbquadNum) {
         attrs.flags = kPDEImageIsIndexed | kPDEImageExternal; // Indicates image uses an indexed color space.
        } else {
         attrs.flags = kPDEImageExternal; // Indicates image is an XObject.
         // B&W
       } else if (bitPerComponent == 4) {
        attrs.bitsPerComponent = 4;
        if (rgbquadNum) {
         attrs.flags = kPDEImageIsIndexed | kPDEImageExternal; // Indicates image uses an indexed color space.
        } else {
         attrs.flags = kPDEImageExternal; // Indicates image is an XObject.
       } else if (bitPerComponent == 8) {
        attrs.bitsPerComponent = 8;
        if (rgbquadNum) {
         attrs.flags = kPDEImageIsIndexed | kPDEImageExternal; // Indicates image uses an indexed color space.
        } else {
         attrs.flags = kPDEImageExternal; // Indicates image is an XObject.
       } else if (bitPerComponent == 32) {
        // not support (acrobat)
       } else { // (bitPerComponent == 24)
        attrs.flags = kPDEImageExternal;  // Indicates image is an XObject.
        attrs.bitsPerComponent = 8;
       // matrix
       ASFixedMatrix matrix;
       memcpy(&matrix, &matrix1, sizeof(matrix1));
       if (paperSizeChangeType == PAPERSIZE_SIZESPECIFICATION)
        matrix.a = chgMediaBox.right;
        matrix.b = 0;
        matrix.c = 0;
        matrix.d = chgMediaBox.top;
        matrix.h = 0;
        matrix.v = 0;
       // Filter
       PDEFilterArray fil;
       memset (&fil, 0, sizeof (PDEFilterArray));
       PDEFilterSpec spec;
       memset (&spec, 0, sizeof (PDEFilterSpec));
       memcpy(&fil, &fil1, sizeof(PDEFilterArray));
       CosDoc cosDoc;
       CosObj cosDict;
       // Build the CosObj for the filter specification
       cosDoc = PDDocGetCosDoc(pd);
       cosDict = CosNewDict(cosDoc, false, 2);
       CosDictPut(cosDict, ASAtomFromString("K"), CosNewInteger (cosDoc, false, -1));
       CosDictPut(cosDict, ASAtomFromString("Columns"), CosNewInteger (cosDoc, false, width1));
       //memset the filterspec so there are no garbage values if we leave members empty
       spec.encodeParms = cosDict;
       spec.decodeParms = cosDict;
       spec.name = ASAtomFromString("CCITTFaxDecode"); 
       fil.spec[0] = spec;
       // Create PDEImage
    ========================================================================================== =================================
       PDEImage pdeimage;
       pdeimage = PDEImageCreate(&attrs, sizeof(attrs), &matrix, 0, cols1, NULL, &fil, asstm, NULL, 0);
       // Delete PDEImage at importIndex(==j) of page -> Delete old image in PDF file
    ========================================================================================== ====================
       PDEContentRemoveElem(pdeContent, importIndex);
       // Add PDEImage
    ========================================================================================== ==========================
       PDEContentAddElem(pdeContent, importIndex, (PDEElement)pdeimage);
       PDPageSetPDEContent (pp, gExtensionID);
       PDPageReleasePDEContent(pp, gExtensionID);
       // Release object
       PDERelease((PDEObject)pdeimage);
       PDPageNotifyContentsDidChangeEx(pp, TRUE);
       PDPageRelease(pp);
       ASStmClose(asstm);
       if (image4Acrobat)
        ASfree(image4Acrobat);
       if (lookupTable)
        ASfree(lookupTable);
      HANDLER
       ret = FALSE;
      END_HANDLER
    return ret;

  • How get transparent index for indexed image?

    Hello,
    In my fileformat plugin on writing I can't get transparent
    color for indexed image. For RGB
    image I got transparent data from alfa channel in data of FormatRecord.
    The FormatRecord structure has value
    transparentIndex (for GIF), but it always =0
    (even, if in the image transparent index=12, for example).
    How can I get transparent index? Or, if it possible, how get transparent
    data for indexed image in alfa channel?

    Hello,
    In my fileformat plugin on writing I can't get transparent
    color for indexed image. For RGB
    image I got transparent data from alfa channel in data of FormatRecord.
    The FormatRecord structure has value
    transparentIndex (for GIF), but it always =0
    (even, if in the image transparent index=12, for example).
    How can I get transparent index? Or, if it possible, how get transparent
    data for indexed image in alfa channel?

  • How To get Characteristic values for an Equipment in a particular Class ?

    Hi All,
    How i will get  Characteristic values for an Equipment in a particular Class ?
    Any table or FM ?
    Thanks in advance
    Srikanta Gope

    Hi,
    You can use the FM BAPI_OBJCL_GETDETAIL to fetch the characteristic values for an equipment from the table parameters ALLOCVALUESNUM; ALLOCVALUESCHAR; ALLOCVALUESCURR.
    Or u can use the tables EQUI, KLAH, KSSK, AUSP, CABN
    Regards,
    Aditya

  • How can I get null values for the later weeks

    Hi All,
    When I execute this code I get the records till current week.
    How can I display the output so that I get null values for the later weeks. (with the help of v_numOfWeeks variable in the code)
    Thanks,
    Vikram
    DECLARE
       v_query VARCHAR2(4000);
       TYPE ref_cursor IS REF CURSOR;
       v_refcur ref_cursor;
       v_sum NUMBER;
       v_id NUMBER;
       v_name VARCHAR2(1000);
       v_weeknum NUMBER;
       v_pernum NUMBER;
       v_numOfWeeks NUMBER := 5;
    BEGIN
    v_query := ' SELECT SUM(product_bkg), postn_id, postn_tbl.postn_name, b.week_num, b.period_num
                              FROM ops_cv_extract b, (SELECT row_id, desc_text postn_name
                          FROM s_postn) postn_tbl
                          WHERE lvl_6_id = 5767
                          AND fiscal_year = 2008
                          AND b.week_num < 4
                          AND b.period_num = 3
                          AND b.postn_id = TO_NUMBER(postn_tbl.row_id)
                          GROUP BY postn_id, postn_tbl.postn_name, b.week_num, b.period_num
                          ORDER BY  postn_tbl.postn_name, b.week_num';
    OPEN v_refcur FOR v_query;
    LOOP
       FETCH v_refcur INTO v_sum, v_id, v_name, v_weeknum, v_pernum;
       EXIT WHEN v_refcur%notfound;
       dbms_output.put_line('P'|| v_pernum||'W'|| v_weeknum||' '||v_name||' '||v_sum);
    END LOOP;
    END;
    This is the output when I execute this code.
    P3W1 COMM CNTRL ISAM 213 26961.61
    P3W2 COMM CNTRL ISAM 213 12870.4
    P3W3 COMM CNTRL ISAM 213 245.88
    P3W1 COMM CNTRL ISAM 273 72831.2
    P3W2 COMM CNTRL ISAM 273 8739.38
    P3W3 COMM CNTRL ISAM 273 3764.92
    P3W1 COMM CNTRL TAM 213 49844
    P3W2 COMM CNTRL TAM 213 20515.17
    P3W3 COMM CNTRL TAM 213 16167.46
    P3W2 COMM CNTRL TAM 216 12561.4
    P3W3 COMM CNTRL TAM 216 2027.1
    P3W1 COMM CNTRL TAM 273 -3336.71
    P3W2 COMM CNTRL TAM 273 -1376.68
    P3W3 COMM CNTRL TAM 273 19707.42
    P3W1 Damon Walters -609.07
    P3W2 Damon Walters 30030.24
    P3W3 Damon Walters 37475.1
    This is the output I'd like to get
    P3W1 COMM CNTRL ISAM 213 26961.61
    P3W2 COMM CNTRL ISAM 213 12870.4
    P3W3 COMM CNTRL ISAM 213 245.88
    P3W4 COMM CNTRL ISAM 213
    P3W5 COMM CNTRL ISAM 213
    P3W1 COMM CNTRL ISAM 273 72831.2
    P3W2 COMM CNTRL ISAM 273 8739.38
    P3W3 COMM CNTRL ISAM 273 3764.92
    P3W4 COMM CNTRL ISAM 273
    P3W5 COMM CNTRL ISAM 273
    P3W1 COMM CNTRL TAM 213 49844
    P3W2 COMM CNTRL TAM 213 20515.17
    P3W3 COMM CNTRL TAM 213 16167.46
    P3W4 COMM CNTRL TAM 213
    P3W5 COMM CNTRL TAM 213
    P3W1 COMM CNTRL TAM 273 -3336.71
    P3W2 COMM CNTRL TAM 273 -1376.68
    P3W3 COMM CNTRL TAM 273 19707.42
    P3W4 COMM CNTRL TAM 273
    P3W5 COMM CNTRL TAM 273
    P3W1 Damon Walters -609.07
    P3W2 Damon Walters 30030.24
    P3W3 Damon Walters 37475.1
    P3W4 Damon Walters
    P3W5 Damon Walters Edited by: polasa on Oct 28, 2008 6:42 PM

    Sure, in a Single SQL ->
    satyaki>
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    Elapsed: 00:00:00.01
    satyaki>
    satyaki>
    satyaki>-- Start Of Test Data --
    satyaki>with week_tab
      2  as
      3    (
      4      select 1 period_num, 1 week_num, 10 bkg1 from dual
      5      union all
      6      select 1, 2, 40 from dual
      7      union all
      8      select 1, 3, 30 from dual
      9      union all
    10      select 1, 2, 20 from dual
    11      union all
    12      select 1, 1, 10 from dual
    13      union all
    14      select 1, 1, 20 from dual
    15      union all
    16      select 1, 3, 10 from dual
    17      union all
    18      select 2, 1, 15 from dual
    19      union all
    20      select 2, 2, 20 from dual
    21      union all
    22      select 2, 3, 10 from dual
    23      union all
    24      select 2, 1, 15 from dual
    25      union all
    26      select 2, 2, 30 from dual
    27      union all
    28      select 2, 3, 20 from dual
    29    )
    30  -- End Of Test Data --
    31  select period_num,
    32         week_num,
    33         (
    34            select sum(week_tab.bkg1)
    35            from week_tab
    36            where period_num = m.period_num
    37            and   week_num   = m.week_num
    38            group by week_num, period_num
    39         ) sum_bkg1
    40  from (
    41        select dum.week_num,
    42              wk.period_num
    43        from (
    44                select 1 week_num from dual
    45                union all
    46                select 2 from dual
    47                union all
    48                select 3 from dual
    49                union all
    50                select 4 from dual
    51                union all
    52                select 5 from dual
    53              ) dum ,
    54              (
    55                select distinct period_num
    56                from week_tab
    57          ) wk
    58      ) m;
    PERIOD_NUM   WEEK_NUM   SUM_BKG1
             1          1         40
             1          2         60
             1          3         40
             1          4
             1          5
             2          1         30
             2          2         50
             2          3         30
             2          4
             2          5
    10 rows selected.
    Elapsed: 00:00:00.48
    satyaki>Regards.
    Satyaki De.

  • Get unique value for a range of values from a table

    Please help to identify the sql to get unique value for following scenario
    Table A has 3 columns
    column1 column2 column3

    user7666373 wrote:
    Please help to identify the sql to get unique value for following scenarioUnique combinations of three columns? If so:
    select DISTINCT column1,column2,column3 from A;SY.

  • How to get the values for checked and unchecked chekboxes

    Hai i have using the checkbox in for loop.
    I need the urgent help from anyone,
    for example in the loop there is having 5 checkbox if i checked 3 of the ckeckboxes and 2 of the checkboxes are unchecked. I need to get the values for checked checkboxes and unchecked checkboxes. Because if i checked the checkboxes, those values need to be inserted into the database. Those for unchecked checkboxes values need to be deleted from the database. Can anyone help me for this
    i am using the following jsp code for this. If anyone can know about this please post me the sample code.
    <form name="confirmcontainer" id="confirmcontainer" method="post" action="submit.jsp">
    <% for(int i=0;i<value.length;i++) {%>
    <tr>
    <td><input name="assigncontainer_chkbox" d="assigncontainer _chkbox" type="checkbox" value="<%=value[0]%>"></td>
    <td class="bottomborder"><div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><%=value[1]%> </font></div></td>
    <td bgcolor="#FFFFFF" class="bottomborder"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><%=value[2]%></font></td>
    </tr>
    <% } %>
    <tr><td><input type="submit" name="submit" value="submit"> </td></tr>
    </form>
    Thanks & Regards,
    Tamilvanan

    Hey thanks Alex and Catastrophe for the quick response...
    I'll be sitting with the functional team and reviewing the roles created.
    Thanks for all the help once more
    Regards,
    Akash.

  • How to get the values for the Authorization Object Fields....

    Hi Everyone,
    I'm pretty new to the SAP Security and have been working on the Basis sides...I created a new role in PFCG and added a few transactions (ME13) and clicked on the Authorizations tab. In there, the authorization tree is in yellow and red. After providing the Org Values, only the yellow lights remain (apart from the green one ofcourse). Now how do we get the values for the different auth obj fields that are in yellow... say for example
    Conditions                                                   COND
    Maintain Condition: Auth. for Use/Appl./Cond.Type/Table      V_KOND_VEA
    Activity                       03                                                                        ACTVT
    Application                                                                                KAPPL
    Condition table                                                                                KOTABNR
    Condition Type                                                                                KSCHL
    Usage of the condition table                                                                 KVEWE
    Here the values for V_KOND_VEA fields e.g. KAPPL, KOTABNR etc are missing.
    My question is how do we get these values in regard to the requirement provided by the client...is it the functional guys who provide these values or else how is a security person supposed to know it...
    All the help in this regard is sincerely appreciated along with the awarding of points...

    Hey thanks Alex and Catastrophe for the quick response...
    I'll be sitting with the functional team and reviewing the roles created.
    Thanks for all the help once more
    Regards,
    Akash.

  • A^b = n ,How to get the value for a ?

    a^b = n ===> n = Math.pow(a,b)
    How to get the value for a ?
    dose Java have API to get the value for a ?
    Thanks for help~~~

    a^b = n
    =>
    a = n^(1/b)
    So,
    a = Math.pow(n,1.0/b)

  • How to get the value for the LIT_Withheld field in the city tax form?

    I am trying to get the value for the LIT_Withheld field on the city tax form , PAYUSEET.. This is not a database column but is generated based on some conditions.. Appreciate the help. Thanks, Suguna

    Hi Abhmanyu,
    Thanks for your response.
    Search Help Name : ZZ_MG_MARITAL_VH
    Selection Method  : T502T
    Search help parameters are SPRSL, FAMST, FTEXT,
    Can u provide me a sample code to fetch the value of corresponding text.
    Thanks,
    Hari

  • How do I get the value for p_reference_path for the API wwpro_api_parameters.get_valu

    I have one report that lists a set of rows and has a link to
    drill down to another report. On the second report, I am trying
    to create a link to a form and pass the value received from the
    first report. I am trying to use the API
    wwpro_api_parameters.get_value but I cannot figure out how to
    get the value for the second parameter - p_reference_path.
    Here is my code which is found in the "Additional PL/SQL Code"
    section, "After displaying the Header".
    declare v_id varchar2(10);
    begin
    v_id := wwpro_api_parameters.get_value
    ('id', 'a');
    htp.anchor ('http://rrlehman-
    lap.us.oracle.com/pls/portal30/PORTAL30.wwa_app_module.link?
    p_arg_names=_moduleid&p_arg_values=1516531942&p_arg_names=_show_h
    eader&p_arg_values=YES&p_arg_names=FRM_ID&p_arg_values=' ||
    v_id, 'Create A Topic', NULL, NULL);
    end;
    No matter what I put in for the second variable,
    p_preference_path, I do not get a value for v_id. I have
    performed a search in the discussion forums and read all related
    threads but I still cannot get it to work.

    Please, note that the second parameter of the get_value function is the identifier of the portlet instance, called in the PDK as reference path.
    Here you find further information on the topic:
    [list]
    [*]Documentation of the wwpro_api_provider.get_value function
    [*]Guidelines for Parameter Passing in Portlets
    [list]

  • Problem to get Correct Value for Message Id in XI (Inbound channel)

    Hi Experts
    I have XI scenario  i.e. SOAP to RFC.
    I am calling RFC and getting Response which contais Messageid Field(Raw Data).
    But while getting Response in Inbound Channel ,I ma getting Junk Value For Message Id.
    In RFC Data element for Message id is SXMSMGUID.(data tpe Raw No Of character 16 and Output Length 32)
    I am accessing some RFC functions from XI which return parameters in the RAW format.[RAW: Uninterpreted byte string.]
    For example: If I execute a RFC from the abap system (using transaction se37), one of the results is "5ECD6F4D6C6E3242921025FE74AC5153"
    When  I call the RFC from XI, response for same  parameters is "Xs1vTWxuMkKSECX+dKxRUw==".
    Is there any way to get RAW data in correct Format?
    when i import RFc in XI it's data type becomes xsd:base64Binary.
    I created one customized data element having data type RAW (32 length) and even Character(32-50 length)
    In this case RFC gives correct value but when Sceanaro runs in XI,it get Wrong data in XI Inbound channel.
    Also disturbed value and place of other Fields.
    Thanks in advance .

    Hi
    Check this forum post.. same prob as yours
    Re: Problem in RFC Lookup UDF in getting MessageID
    fixed by changing the datatype other than RAW in FM
    also,
    Data type RAW imported to ABAP from Java
    Regards
    Vishnu

  • TSQL Get Previous values for each group by

    Dear Friends,
    I have a problem with my TSQL statment. 
    I need to get previous value for each day and specific unit. Everything goes fine if I have always 2 unit in each day. But if same day has just one unit or less, I cannot have the previous value in the current record.
    The Output is this one:
    SK_DAY SK_UNIT
    VALUE VALUE_PREVIUS_DAY
    20131112 2
    30.00 NULL
    20131112 3
    34.00 NULL
    20131113 2
    40.00 30.00
    20131113 3
    45.00 34.00
    20131114 2
    50.00 40.00
    I dont have the second record for 2013-11-14, because in this date I just have value for unit 2.
    The final output should include the record:
    20131114 3
    0 45.00
    The Statment I have is:
    SELECT MAIN.SK_DAY, MAIN.SK_UNIT, SUM(MAIN.VALUE) AS VALUE
     SELECT SUM(VND1.VALUE) AS VALUE
     FROM FCT_TEST VND1
     WHERE CONVERT(DATE,CONVERT(VARCHAR(10),VND1.SK_DAY))>=DATEADD(dd,-1,CONVERT(DATE,CONVERT(VARCHAR(10),MAIN.SK_DAY)))
    AND CONVERT(DATE,CONVERT(VARCHAR(10),VND1.SK_DAY))<CONVERT(DATE,CONVERT(VARCHAR(10),MAIN.SK_DAY))
    AND VND1.SK_UNIT=MAIN.SK_UNIT
    ) AS VALUE_PREVIUS_DAY
    FROM FCT_TEST MAIN
    GROUP BY SK_DAY, MAIN.SK_UNIT
    SQL CREATE SCRIPT:
    CREATE TABLE [dbo].[FCT_TEST](
    [SK_DAY] [int] NOT NULL,
    [SK_UNIT] [int] NOT NULL,
    [VALUE] [decimal](18, 2) NULL,
     CONSTRAINT [PK_FCT_TEST] PRIMARY KEY CLUSTERED 
    [SK_DAY] ASC,
    [SK_UNIT] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    Thank you!!!
    PPSQL

    Thank you Kalman,
    But my problem is not with date! Fortunately I have dates for all days.
    The problem is for dimension tables like UNITS that I dont have values for all days, and when I try to get the previous value for previous day and each unit I dont have records. 
    20131112
    2
     30.00
    NULL
    20131112
    3
     34.00
    NULL
    20131113
    2
     40.00
    30.00
    20131113
    3
     45.00
    34.00
    20131114
    2
     50.00
    40.00
    20131114
    3
     0
    45.00 [I NEED THIS RECORD AS IS]
    Could you help me??
    Thank you!!

  • Getting incorrect values for linkQueryResult (ILinkManager) while debugging our plugin in Adobe InDesign CC debug

    Hi,
    We have added some functionalities in PanelTreeView sample source. In that, we are getting incorrect values for linkQueryResult (ILinkManager) while using InDesign CC debug. But in release version we are getting the correct values for linkQueryResult (ILinkManager). So when debugging our plugin InDesign CC debugger has stopped working. Please find the below source,
    IDocument* document = Utils<ILayoutUIUtils>()->GetFrontDocument();
      if(document == nil)
      //CAlert::InformationAlert("Doc Interface Not Created");
      break;
      IDataBase *db = ::GetDataBase(document);
      InterfacePtr<ILinkManager> linkmanager(document, UseDefaultIID());
      if(linkmanager == nil)
      //CAlert::InformationAlert("linkmanager Interface Not Created");
      break;
      LinkQuery Query;
      ILinkManager::QueryResult linkQueryResult;
      linkmanager -> QueryLinks(Query, linkQueryResult);
      for (ILinkManager::QueryResult::const_iterator iter(linkQueryResult.begin()), end(linkQueryResult.end()); iter != end; ++iter)
      InterfacePtr<ILink> iLink(db, *iter, UseDefaultIID());
      if ( iLink )
      InterfacePtr<ILinkResource> resource(linkmanager->QueryResourceByUID(iLink -> GetResource()));
      ILinkResource::ResourceState rs = resource->GetState();
      PMString fileName = resource -> GetLongName(kTrue); //gets full path
      CharCounter lc=fileName.LastIndexOfCharacter('.');
      PMString *exten = fileName.Substring(lc+1,3);
      if((*exten).Compare(kFalse,"xml")==0)
      xmlDataLinkName = fileName;
    Kindly help us if anyone has idea regarding this issue.
    Thanks,
    VIMALA L

    Hi Vimala L,
    try to replace
    ILinkManager::QueryResult linkQueryResult;
    by
    UIDList linkQueryResult(db);
    Markus

Maybe you are looking for