Changing images' alpha value

hi !
let's say I got those two images
Image img1,img2;I assign a different .gif file to both of them, and I paint them
goes like...
g.drawImage(img1,10,10,this);
g.drawimage(img2,10,10,this);easy enough ?
now what I'd like to do is to draw both image, but have img2
semi-transparent, so that we could see img1 (drawn right under it)
is there some kind of way to change an image's alpha value (I assume it's the way I should do it) using java programmation ?

You can use a BufferedImage and read it using ImageIO. Create the image in TYPE_INT_ARGB format. Then you can actually access each pixel of the image and change its value. See the Java2D Tutorial (there's a Tutorials link on the left sidebar of this page).

Similar Messages

  • Is there a way of changing the alpha value of a symbol in its own timeline without ActionScript

    I'm trying to make an animated banner ad where radio waves emanate from a device as they fade in and fade out.
    I got it working, then realized I'd like the radio wave animation to loop repeatedly while the text in the ad comes in and out, so I thought maybe it should be a symbol and have the animation take place in its own timeline.
    Problem is, when I make the symbol and double click to enter its timeline, the color effect menu disappears.
    I don't feel comfortable in ActionScript yet. Is there no other way to do what I want?
    Can I create the radio waves as a separate animation file, then import it into the main animation?

    You should be able to make seperate keyframes and then modify the alpha of any MovieClip or Graphic objects within that keyframe. After that right click somewhere between the keyframes on the timeline and select "Create Classic Tween".
    NOTE: You have to have the keyframe selected on the timeline to be able to modify properties. So if you have a keyframe on frame 1, frame 10 and frame 20 set the alpha on frame 1 at 100%, frame 10 at 0% and frame 20 at 100% and it will fill in the blanks.
    EDIT:
    If the objects in your inner symbol are not a MovieClip or Graphic select all and then Right Click and select "Convert to Symbol" to make them one.

  • How to change alpha value in pixel

    I am trying to alter the alpha values in a pixel array. I can change the RGB values, but changing the alpha seems to have no effect. Hope you can help. Thanks.
    import java.awt.*;
    import java.awt.image.*;
    import java.io.*;
    import com.sun.image.codec.jpeg.*;
    import java.util.Random;
    import java.awt.Toolkit;
    public class alterImage extends Component {
    public FileOutputStream fos = null;
    public File fc = null;
    private static Frame window;
    public void paint (Graphics g){
      Toolkit theKit = window.getToolkit();
      Image img = theKit.getImage("originalImage.jpeg");
      img = img.getScaledInstance(100,100,1);
      MediaTracker mtracker =  new MediaTracker(this);
      mtracker.addImage(img, 0);
      try {
      mtracker.waitForID(0);
      } catch (Exception e) {}
      int w = img.getWidth(this);
      int h = img.getHeight(this);
      int[] pixels = new int[w * h];
      PixelGrabber pixs = new PixelGrabber(img, 0, 0, w, h, pixels, 0, w);
         try {
         pixs.grabPixels();
         if (pixs.getColorModel().hasAlpha())
         System.out.println("hasAlpha");
              } catch (InterruptedException e) {
                System.err.println("interrupted waiting for pixels!");
                return;
    // alter pixel values
    for(int i = 0; i < pixels.length; i++){
         int alpha = (pixels[i] >> 24) & 0xff;
         //System.out.println("alpha " + alpha);
         int red   = (pixels[i] >> 16) & 0xff;
         //System.out.println("red" + red);
         int green = (pixels[i] >>  8) & 0xff;
         //System.out.println("green" + green);
         int blue  = (pixels[i]      ) & 0xff;
         //System.out.println("blue" + blue);
         green /= 2;   // green is effected
         alpha /= 2;   // alpha is not effected
         pixels[i] = (alpha << 24) | (red << 16) | (green << 8) | blue;
    // create new image with altered pixel data
    BufferedImage image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
    image.setRGB(0, 0, w, h, pixels, 0, w);
    // write new image to file
    try {
    fc = new File("newImage.jpeg");
    fc.createNewFile();
    fos = new FileOutputStream(fc);
    JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(fos);
    encoder.encode(image);
    fos.flush();
    fos.close();
    // show image in window
    Image img2 = theKit.getImage("newImage.jpeg");
    g.drawImage(img2, 0, 0, 100, 100, this);
    } catch(IOException e) {}
    // end paint
    public static void main (String arg[]){
         window = new Frame ("Alter Image");
         window.add(new alterImage());
         window.pack();
         window.setSize(100,100);
         window.show();
    // end class
    }

    It only makes sense to apply transparency in respect of another image that this one is to appear 'on top of'; this is done by performing a comparison on the pixel value for each of the two images, altering in favour of the 'on top' image if transparency for that pixel is low, or for the 'underneath' image if transparency for that pixel is high.
    Although tricky (for me at least, perhaps not for you!), using the WritableRaster from BufferedImage's GetWritableRaster() method lets you accomplish this. Look here for more:
    http://java.sun.com/j2se/1.4.2/docs/api/java/awt/image/WritableRaster.html
    Once you have created a composite image of the two source images, that can then be saved as a separate JPG, GIF or whatever. Look here too:
    http://java.sun.com/docs/books/tutorial/2d/display/compositing.html
    Good luck!
    Chris.

  • Color Matrix Alpha values and drawing images.

    Hi All,
    I am experimenting with using a color matrix to change images and have brightness, R, G, B changing but the alpha does not seem to do anything. I have a scrollbar for the alpha value in the matrix in the example. It seems it should change the image in some
    way but it does not.
    In this example I put 1 for red in the matrix thinking as I moved the scroll bar the alpha transparency would change the image in some way but it does not? It does not matter what colors or image I use nothing seems to happen with alpha? Is it
    only for drawing lines and such or does it do something to images? If so what?
    Imports System.Drawing.Imaging
    Public Class Form3
    Private rustybmp As New Bitmap("c:\bitmaps\rusty.jpg")
    Private Sub Form3_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    Me.DoubleBuffered = True
    VScrollBar1.Maximum = 100
    VScrollBar1.Minimum = 0
    VScrollBar1.Value = 50
    End Sub
    Private Sub Form3_Paint(sender As Object, e As PaintEventArgs) Handles Me.Paint
    Dim cm As ColorMatrix = New ColorMatrix(New Single()() _
    {New Single() {1, 0.0, 0.0, 0.0, 0.0}, _
    New Single() {0.0, 1, 0.0, 0.0, 0.0}, _
    New Single() {0.0, 0.0, 1, 0.0, 0.0}, _
    New Single() {0.0, 0.0, 0.0, 1.0, 0.0}, _
    New Single() {1, 0, 0, VScrollBar1.Value / 100, 1}})
    Dim image_attr As New ImageAttributes
    image_attr.SetColorMatrix(cm)
    e.Graphics.DrawImage(rustybmp, Me.ClientRectangle, 0, 0, rustybmp.Width, rustybmp.Height, GraphicsUnit.Pixel, image_attr)
    End Sub
    Private Sub VScrollBar1_Scroll(sender As Object, e As ScrollEventArgs) Handles VScrollBar1.Scroll
    Me.Refresh()
    End Sub
    End Class

    I didn't try this.
    How to: Use a Color Matrix to Set Alpha Values in Images
    La vida loca
    Oh, ok, in your link example the alpha is the 4 row 4 col.
    I was using the 5th row 4th col because I thought that was R, G, B A across the 5th row. Maybe that is for a solid brush or something.
    This works as I expected that way. Still looking....
    Dim cm As ColorMatrix = New ColorMatrix(New Single()() _
    {New Single() {1, 0.0, 0.0, 0.0, 0.0}, _
    New Single() {0.0, 1, 0.0, 0.0, 0.0}, _
    New Single() {0.0, 0.0, 1, 0.0, 0.0}, _
    New Single() {0.0, 0.0, 0.0, VScrollBar1.Value / 100, 0.0}, _
    New Single() {0, 0, 0, 0, 1}})
    Cool!
    Now if you could just get that working with HoloLens..... :)
    La vida loca

  • Placing images in Illustrator changes their color values-Why?

    I've been placing photoshop tiff files into Illustrator, and doing this seems to change the color values, when I sample them with the eyedropper tool. The images I made use a custom mix of CMYK rich black, with the K set to 100. In Illustrator, they appear to revert to the default 'Photoshop black", approx C75 M68 Y67 K90. This is not my intent of C70 M60 Y58 K100. The Illustrator document is CMYK mode, and I don't know why this is happening. The non-image items (vectors) in my illustrator file DO retain the color values I intended, however.
    Is this some kind of setting I can change in Illustrator? Will this discrepancy show up when this file goes to print? Please help! Thanks.

    WHen the image is not embedded, Illustrator samples the representation values. Those are handled by color management.

  • Can Alpha value change between two Keyframes ?

    Hi
    Flash CS5.
    I have a MovieClip Spatter set to Alpha 21% in one keyframe and a few secs later along its layer on the timeline another KF with it set to 1%
    I run movie and it stays at 21% until it gets to the second KF when it suddenly becomes 1%
    I right click between the two KFs and choose Classic Tween, still no difference.
    Undo that and try for a Motion Tween, ok the con to symbols prompt. still no joy.
    Try for Classic Tween again with...
    I see a Blending option so alter that to Alpha for both MCs at the KFs,. no better,
    How do I get the alpha value to change continually and progressivly from 21% to 1% across lets say 3 secs, so that after 1 sec its 14% then after two secs its 7% etc.
    The MC itself is a 5 frame duration, each frame is a KF with whiteSpatter on a transparent base as a .png the size of which gets larger with each KF. So a growing spatter effect.
    I need to fade this over a period of say 3 secs in my scene1 movie. I am successful in moving it at a steady single alpha value 21% across my scene, but I need the alpha to change during the move to become 1%.
    Envirographics

    Hi,
    I have just tried some experiments.
    1) Create a white box for 1st KF, make it an MC, create a second KF  3 secs later, make this one alpha 1% then make 1st KF's MC alpha 100%. Create a classic tween by right clicking between the two, scrub the timeline slider and hey presto fade of alpha :-)
    2) Ditto but this time use one of the white spatter png's instead of the white box, scrub and bingo png fades.
    Now lets look at my MC that I am wishing to fade from 21% to 1%.
    Double click it in the Lib and we see it is 5 frames long, each is a KF and each KF has a different png file allocated to it (drag drop from lib to MC stage). Each png is white pixels in a spatter pattern sitting on a transparent base. Each png is a larger spatter than the last, thats 5 separate png files with unique names created in photoshop. So the spatter gets larger as the MovieClip plays, it plays spatter1.png then  next frame spatter2.png then spatter3.png etc, very quickly in fact and it loops (no stop command), I could have gone 1 2 3 4 5 4 3 2 so the growth developed then shrank but it looks ok for my purposes with 1 2 3 4 5 as its so fast.
    It is one of those png's that was used in experiment 2. It worked there, so alpha applied to png works.
    When we have five of them in the MC that we are fading, or trying to, we have failure.
    ...update...sussed it !
    I had placed the MC in 1st KF, copy pasted it in place and moved it upwards to get two of them sitting parallel, then created the next KF 3 secs later, made the first two in 1st KF 21%, made the last two 1%, classic tweened and got failure.
    Now trying only 1 per Classic Tween and using two layers, one for the lower, the other for the upper, it works.
    Lesson learnt, you cannot have two MC's on one layer if tweening in this way. Its got to be one MC tween per layer.
    Envirographics

  • Alpha value for image

    the alpha value of all pixels of many images(jpg,gif) is coming out to be same(ie 255).why is it so? does alpha value really represents intensity?

    What colour model are you thinking of? Perhaps you'd find the Color.RGBtoHSB method helpful?

  • Change the volume image flags values

    Hi
    I am using Windows 8.1 Update and Windows ADK.
    Without using the ImageX command, how do I change the volume image flags values displayed with the Dism /Get-ImageInfo /ImageFile:"<WIM_File_Path>\<WIM_Name.wim" /Index:<Image_Index> command?
    Where are these values ​​stored?
    Thanks
    Bye
    Balubeto

    Hello,
    If you want change the value, you can use the command line (imagex) or one tools (Gimagex)
    https://www.autoitscript.com/site/autoit-tools/gimagex/

  • Change image color behind JButton

    Hi!
    I have a JPanel with an image on it. Over this I have added transparent JButtons to get image map functionality. When the mouse is moved over the button, the border is changed and they are clickable. But I want more functionality, I want to mark buttons that have been selected by changing the background color but I still want the image to show through the button. I.e. I want to change the white color on the image behind the button to another color. Is there a way to do this?
    /Malin

    Thank you!
    I had managed to miss the possibility to set the alpha value when setting the color.
    /Malin

  • How to change Image source file name

    Hi,
    I have a logo image on my report that I want to change based on value of my query item. Can someone help me .....how can I change the source of my image item dynamically.
    Thanks
    Aali

    Hello,
    You can use a Formula Column and the property "Read From File" :
    http://www.oracle.com/webapps/online-help/reports/10.1.2/topics/htmlhelp_rwbuild_hs/rwcontxt/props/pi_col_read_from_file.htm
    Regards

  • Changing images in bsp application.

    hello freinds,
    i am new to bsp as well as SAP. now i have a task that..
    i have some images in MIME. But these images r always keep on changing in its size. Now i have to display them in a client.could anyone tell me that where should i store the images to make dynamic display (other than MIME).

    Hello,
    Another solution to this problem is: save the images in a cluster table.
    Here is the procedure:
    1) create the image database cluster
    name = zimg_rep, for example
    >>---structure
    field   type
    MANDT     MANDT         (primary key,initial)
    RELID     INDX_RELID    (primary key,initial)
    SRTFD     INDX_SRTFD    (primary key,initial)
    SRTF2     INDX_SRTF2    (primary key,initial)
    TYPE     TEXT30
    LENGTH     NUM08
    CLUSTR     INDX_CLSTR
    CLUSTD     INDX_CLUST
    2) capture the image input:
    >>---Put this code in "OnInputProcessing" event handler of the bsp capturing the images:
    DATA: value type string .
    DATA: BEGIN OF key ,
      id TYPE numc8 ,
    END OF key.
    DATA: entity         TYPE REF TO if_http_entity,
             file           TYPE xstring,
             content_type   TYPE string,
             content_length TYPE string,
             num_multiparts TYPE i,
             i              TYPE i VALUE 1,
             doecho         TYPE string.
    num_multiparts = request->num_multiparts( ).
    WHILE i <= num_multiparts.
    entity = request->get_multipart( i ).
    value = entity->get_header_field( '~content_filename' ).
    IF NOT value IS INITIAL.
    navigation->set_parameter( name = 'content_filename'
    value = value ).
    content_type = entity->get_header_field( 'Content-Type' ).
    navigation->set_parameter( name = 'content_type'
    value = content_type ).
    file = entity->get_data( ).
    content_length = xstrlen( file ).
    ENDIF.
    i = i + 1.
    ENDWHILE.
    IF NOT ( file IS INITIAL ) AND
    NOT ( content_type IS INITIAL ) AND
    NOT ( content_length IS INITIAL ) .
    key-id = '???' . "put key here
    EXPORT
    type = content_type
    length = content_length
    clustd = file
    TO DATABASE zimg_rep(aa)
    ID key .
    ENDIF.
    >>----in "Layout", the tag "form" will look like:
    >>---- inputfield to capture de image
    image filename:
    >>----in BSP Properties
    myImage type char1 (automatic)
    the above two steps will help us to save images in a cluster table .
    Later, When you wants to retrieve them:
    1) make a bsp page, "show_image", for example:
    in "OnInitialization":
    DATA: entity TYPE REF TO if_http_entity,
    content_type TYPE string,
    content_length TYPE string.
    DATA:
    BEGIN OF key ,
    id TYPE numc8 ,
    END OF key.
    DATA xfile TYPE xstring.
    key-aplno = '???'. "put key here
    IMPORT
    type = content_type
    length = content_length
    clustd = xfile
    FROM DATABASE zimg_rep(aa)
    ID key .
    IF sy-subrc = 0.
    navigation->set_parameter( name = 'content_type'
    value = content_type ).
    navigation->set_parameter( name = 'content_length'
    value = content_length ).
    runtime->server->response->set_data( xfile ).
    runtime->server->response->set_header_field(
    name = 'Content-Type'
    value = content_type ).
    runtime->server->response->set_header_field(
    name = 'Content-Length'
    value = content_length ).
    runtime->server->response->delete_header_field(
    name = 'Cache-Control' ).
    runtime->server->response->delete_header_field(
    name = 'Expires' ).
    navigation->response_complete( ).
    ENDIF.
    >>-- put the key in attribute type automatic, "key" 
    that's all
    when you want to display a image, you may use in another bsp page the corresponding tag "img", like this:
    i hope this hint be useful to you.
    francisco carreñ

  • Change image contrast

    Hi,
    I need to change image contrast, that code working for .bmp image only.
    public static BufferedImage rescale(BufferedImage indexed,
                   float scaleFactor, float offset) {
              System.out.println(indexed.getHeight());
              IndexColorModel icm = (IndexColorModel) indexed.getColorModel();
              return new BufferedImage(rescale(icm, scaleFactor, offset), indexed
                        .getRaster(), false, null);
    public static IndexColorModel rescale(IndexColorModel icm,
                   float scaleFactor, float offset) {
              int size = icm.getMapSize();
              byte[] reds = new byte[size], greens = new byte[size], blues = new byte[size], alphas = new byte[size];
              icm.getReds(reds);
              icm.getGreens(greens);
              icm.getBlues(blues);
              icm.getAlphas(alphas);
              rescale(reds, scaleFactor, offset);
              rescale(greens, scaleFactor, offset);
              rescale(blues, scaleFactor, offset);
              return new IndexColorModel(8, size, reds, greens, blues, alphas);
         public static void rescale(byte[] comps, float scaleFactor, float offset) {
              for (int i = 0; i < comps.length; ++i) {
                   int comp = 0xff & comps;
                   int newComp = Math.round(comp * scaleFactor + offset);
                   if (newComp < 0)
                        newComp = 0;
                   else if (newComp > 255)
                        newComp = 255;
                   comps[i] = (byte) newComp;
         }If i am use .jpeg or .jpg image then following error will appearjava.lang.ClassCastException: java.awt.image.ComponentColorModel
         at com.maan.image.DAO.ImageBean.rescale(ImageBean.java:141)
         at com.maan.image.DAO.ImageBean.loadImage(ImageBean.java:39)
         at org.apache.jsp.imgManipulation.alterImage_jsp._jspService(org.apache.jsp.imgManipulation.alterImage_jsp:59)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:738)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:595)any one help me, what i am going to do,
    Thanks in advance.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    My guess is that it's this line:
    IndexColorModel icm = (IndexColorModel) indexed.getColorModel(); The BufferedImage that you are sending to rescale probably uses a ComponentColorModel when you load from a .jpg and an IndexColorModel when you load from a .bmp file. You can't cast between the two. You may be able to do what you're trying to do by using the getRBG method from BufferedImage and forget about the ColorModel.

  • Print or export runtime created vector graphics with alpha values intact

    I want to be able to save the dynamically generated state of a swf as a vector image. I know I can right click on the swf and print to a pdf via the Adobe pdf print driver. This works well but all alpha values are lost. Does anyone know how to print to a pdf or any other vector format and retain the alpha values? The pdf format clearly supports it as I can save objects with alpha values from Illustrator as a pdf no problem.
    Any alternative solution that achives this result would be welcome e.g. save runtime swf via actionscript to swf or Illustrator format etc.
    thanks

    Hi All,
    Flash Pro CC 2014 (v14.0.0.110) is now available for download via the Creative Cloud App and Adobe website.
    We have added SVG Export feature to Flash Pro with this new release. You will now be able to export out vector content from the selected frame as an SVG image that can be opened directly in a Browser and even imported in Adobe Illustrator.
    SVG Export option can be accessed via the Publish Settings as well as via File Menu > Export > Export Image option.
    Along with this, we have added several new features with this release. Complete list is available at these links:
    Overview:         https://www.adobe.com/in/products/flash.html
    Whats new:      https://helpx.adobe.com/flash/using/whats-new.html
    Release Notes: https://helpx.adobe.com/flash/release-note/flash-professional-cc-2014.html
    Thanks,
    Nipun

  • Photoshop CS3 Changes Image Resolution

    Hello!
    Recently, Photoshop CS3 (installed on PC with Windows XP) has been changing the resolution of my images.  I'll create an image and save it (as anything... jpg or png). When I close and reopen the image, its values have changes.  For example:  a 10 x 5" images at a resoltion of 300 will somehow change to 100 x 50 at a low resolution of something like 6.  I'd like to know what causes this.

    Chris, if what you claim were true, then I wouldn't have an issue.  In fact, what I described in my initial post happens.
    I create a new image (we all follow the same process [Fle > New... select width, height, inches or pixels, resolution]) at a resolution of 300 for a 10x5” image.  Regardless of what I save the image as (jpg, png, etc.), if I close and reopen the image, the values have changed  The width always goes to 100" (I work in inches) and the resolution drops to 6, at the lowest that I’ve seen, up to 49.  Could a virus cause this? 

  • BAPI_CUSTOMERQUOTATION_CHANGE - error while changing a condition value

    Hallo Gurus,
    I am trying to use tshi BAPI BAPI_CUSTOMERQUOTATION_CHANGE to change a condition value of a condition record of a quotation.
    Every time I execute the BAPI, instead of the condition tyoe being changed, a new record is added to the list of conditions!
    Can someone please help!
    Thsi is my piece of code::
    itab_BAPISDH1X-UPDATEFLAG = 'U'.
    append itab_BAPISDH1X.
    itab_BAPICOND-ITM_NUMBER = '10'.
    itab_BAPICOND-COND_ST_NO = '31'.
    itab_BAPICOND-COND_COUNT = '00'.
    itab_BAPICOND-COND_TYPE = 'ZST3'.
    itab_BAPICOND-COND_VALUE = '15.00'.
    itab_BAPICOND-COND_UPDAT = 'X'.
    append itab_BAPICOND.
    itab_BAPICONDX-ITM_NUMBER = '10'.
    itab_BAPICOND-COND_ST_NO = '31'.
    itab_BAPICOND-COND_COUNT = '00'.
    itab_BAPICONDX-COND_TYPE = 'ZST3'.
    itab_BAPICONDX-UPDATEFLAG = 'X'.
    itab_BAPICONDX-COND_VALUE = 'X'.
    append itab_BAPICONDX.
    CALL FUNCTION 'BAPI_CUSTOMERQUOTATION_CHANGE'
      EXPORTING
        salesdocument                = p_vbeln
      QUOTATION_HEADER_IN          =
        quotation_header_inx         = itab_BAPISDH1X
      tables
        return                       = itab_BAPIRET2
       CONDITIONS_IN                =  itab_BAPICOND
       CONDITIONS_INX               =  itab_BAPICONDX
    Thanks!
    Mukta

    Hmm...
    Change the following....and check..
    itab_BAPICONDX-ITM_NUMBER = '10'.
    itab_BAPICOND-COND_ST_NO = '31'.
    itab_BAPICOND-COND_COUNT = '00'.
    itab_BAPICONDX-COND_TYPE = 'ZST3'.
    itab_BAPICONDX-UPDATEFLAG = 'X'.
    itab_BAPICONDX-COND_VALUE = 'X'.
    append itab_BAPICONDX.
    "change the above to.....
    ab_BAPICONDX-COND_TYPE = 'X'.
    append itab_BAPICONDX.
    The BAPICONDX.. should contain only X.. in the fields which you want to update.. try this change..and let us know if it works.
    Also have a look at the FUNCTION MODULE DOCUMENTATION for this bapi in SM37.
    Cheers...

Maybe you are looking for