Using / returning double

Hey peeps
after some guidance
ok, so my lecturer for programming is quite well known in the java world, although thats probs going to get shot down now :D he wrote bluej and the text book objects first. This week he set me an assignment and i have done all the base tasks and all the challenge tasks, but we get marked for comment considteny and layout of brackets etc to.
so one of the challenge tasks was to return an avergae playing time using double, is the correct way, the 100% correct way of doing this
    public double averageTrackLength()
        return (double) totalPlayingTime / tracksPlayed;
    }or does it need editing
thanks very much

ok, i think i worded it wrong, what i mean is, have i used the double function correctly, as in, to return a double value to you only need
public double averageTrackLength()
        return (double) totalPlayingTime / tracksPlayed;
    }becuase some people online from what i have read suggest this is how to do ti
public double divide(){
   return (double)x / (double)y;
}which is "correct"? :D
also, finally, sorry to get on all of your tits, i have a concern with my commenting, have i just over killed commenting :D
* This class is used to interact with the interface in order
* to let the user play the appropriate songs. Checks are in
* order to ensure that valid entry of selection means no
* programme crashes, and all relevant fields have been initialised.
* The track is selected by the user, then they can push play
* on the interface, once this is done, if a new track is selected
* the current track will stop, be reset to the beginning, and on
* the users selection of play, the new track shall begin. The stop
* button allwos the user to stop the track, at which point it rewinds
* it to the beginning again.
* @author Ricki Lambert
* @version 0.1 (19/10/2008)
public class Player
    private PlayList playList; //Holds an object of PlayList class
    private Track track; //Holds an object of Track class
    private int tracksPlayed; //Used to store the int sum of tracks played
    private int totalPlayingTime; //Used to store the integer value of the toal playing time
     * This is the constructor for the Player class. It sets the
     * tracksPlayed field to 0 and the same for totalPlayingTime. Also
     * it creates a new playList from the Playlist class. Every object
     * of Player will now be initialised with these fields values.
    public Player()
        playList = new PlayList("audio");
        tracksPlayed = 0;
        totalPlayingTime = 0;
     * Return the track collection currently loaded in this player.
    public PlayList getPlayList()
        return playList;
     * This method is used to play music in the G.U.I
     * The method is called, and every time this happens, the counter adds
     *one to the tracksPlayed variable. Then we check if the variable (that holds an object of Track)
     *is null. If it is we return (exit the method) to avoid crashing the programme. If not, call the stop method
     *using an internal method call, then call the play method of the track object we created. At the end, we add
     *the total length of the track to the totalPlayingTime variable.
    public void play()
        tracksPlayed = tracksPlayed + 1;
        if (track == null){
            return;
        stop();
        track.play();
        totalPlayingTime = totalPlayingTime + track.getDuration();
     * Checks to see if the track object is null, if so exit the method
     * using return, if not, call the stop method of the track object and
     * then call the rewind method to put that track to the beginning.
    public void stop()
        if (track == null){
            return;
        track.stop();
        track.rewind();
     * To set the track we check if the track object is not null.
     * Then if it is call the stop method by
     * using an internal method call. Then we just assign the
     * track object to the playlists getTrack method (this uses
     * the parameter to pass the number required to the method)
    public void setTrack(int trackNumber)
        if (track != null){
            stop();
        track = playList.getTrack(trackNumber);
     * Get the track name and return it. If the track is null
     * then return an empty string, else return the tracks name
     * by calling the objects method
    public String getTrackName()
        if (track == null){
            return "";
        else{
        return track.getName();
     * Return information about the currently selected track. The information
     * contains the track name and playing time, in the format
     *    track-name (playing time)
     * Return an empty string if no track is selected.
    public String getTrackInfo()
        if (track == null){
            return "";
        else{
        return "The track is called " + track.getName() + " The Track lasts for " +
                track.getDuration() + " seconds" ;
     * Return the integer value of the tracksPlayed variable
    public int getNumberOfTracksPlayed()
        return tracksPlayed;
     * Return the integer value of the totalPlayingTime variable
    public int getTotalPlayedTrackLength()
        return totalPlayingTime;
     * Return the result of totalPlayingTime divided by tracksPlayed
     * This is returned as a double data type value.
    public double averageTrackLength()
        return (double) totalPlayingTime / tracksPlayed;
}Edited by: compSciUndergrad on Oct 19, 2008 12:58 PM
Edited by: compSciUndergrad on Oct 19, 2008 12:58 PM

Similar Messages

  • SSRS Report Returning Double Quote string from a Single Quote String

    Hi, I'm getting weird thing in resultset from SSRS report when executed. When I pass parameter to a report, which passes String that has single quote value to a split function , it returns rows with double quote. 
    For example  following string:
    'N gage, Wash 'n Curl,Murray's, Don't-B-Bald
    Returns: 
    ''N gage, Wash ''n Curl,Murray''s, Don''t-B-Bald
    through SSRS report.
    Here is the split function Im using in a report.
    CREATE Function [dbo].[fnSplit] (
    @List varchar(8000), 
    @Delimiter char(1)
    Returns @Temp1 Table (
    ItemId int Identity(1, 1) NOT NULL PRIMARY KEY , 
    Item varchar(8000) NULL 
    As 
    Begin 
    Declare @item varchar(4000), 
    @iPos int 
    Set @Delimiter = ISNULL(@Delimiter, ';' ) 
    Set @List = RTrim(LTrim(@List)) 
    -- check for final delimiter 
    If Right( @List, 1 ) <> @Delimiter -- append final delimiter 
    Select @List = @List + @Delimiter -- get position of first element 
    Select @iPos = Charindex( @Delimiter, @List, 1 ) 
    While @iPos > 0 
    Begin 
    -- get item 
    Select @item = LTrim( RTrim( Substring( @List, 1, @iPos -1 ) ) ) 
    If @@ERROR <> 0 Break -- remove item form list 
    Select @List = Substring( @List, @iPos + 1, Len(@List) - @iPos + 1 ) 
    If @@ERROR <> 0 Break -- insert item 
    Insert @Temp1 Values( @item ) If @@ERROR <> 0 Break 
    -- get position pf next item 
    Select @iPos = Charindex( @Delimiter, @List, 1 ) 
    If @@ERROR <> 0 Break 
    End 
    Return 
    End
    FYI: I'm getting @List value from a table and passing it as a string to split function. 
    Any help would be appreciated!
    ZK

    Another user from TSQL forum posted this code which is returning the same resultset but when I execute both codes in SQL server it works and return single quote as expected.
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/8d5c96f5-c498-4f43-b2fb-284b0e83b205/passing-string-which-has-single-quote-rowvalue-to-a-function-returns-double-quoate?forum=transactsql
    CREATE FUNCTION dbo.splitter(@string VARCHAR(MAX), @delim CHAR(1))
    RETURNS @result TABLE (id INT IDENTITY, value VARCHAR(MAX))
    AS
    BEGIN
    WHILE CHARINDEX(@delim,@string) > 0
    BEGIN
    INSERT INTO @result (value) VALUES (LEFT(@string,CHARINDEX(@delim,@string)-1))
    SET @string = RIGHT(@string,LEN(@string)-CHARINDEX(@delim,@string))
    END
    INSERT INTO @result (value) VALUES (@string)
    RETURN
    END
    GO
    ZK

  • Using "long double" with gcc

    I want to use long doubles (quad, 128-bit floating point variables) in C. I thought the following program would do it:
    #include <stdio.h>
    int main()
    long double a, b, c;
    b = 1./7.;
    c = 7.;
    a = 1./c;
    printf("%.30e \n", a);
    printf("%.30e \n", b);
    printf("%.30e \n", c);
    return 0;
    But the program returns garbage when compiled and run with:
    %gcc top2.c -o test
    %./test
    -1.391130315222827826529386765980e-220
    -1.391130315222712834096824073018e-220
    -2.681561585988519419914804999641e+154
    (XCode 3.1, gcc 4.0.1 or 4.2.1, Intel Xeon, 10.5.4)
    The program works for double, however.
    So what am I doing wrong?
    Matthias

    I can't really help you much there. Maybe you should think about what you are doing and what you really need. I doubt you really need 128 bits. In Apple's Documentation it says:
    -m96bit-long-double
    -m128bit-long-double
    These switches control the size of long double type. The i386 application binary interface specifies the size to be 96 bits, so -m96bit-long-double is the default in 32 bit mode. Modern architectures (Pentium and newer) would prefer long double to be aligned to an 8 or 16 byte boundary. In arrays or structures conforming to the ABI, this would not be possible. So specifying a -m128bit-long-double will align long double to a 16 byte boundary by padding the long double with an additional 32 bit zero.
    In the x86-64 compiler, -m128bit-long-double is the default choice as its ABI specifies that long double is to be aligned on 16 byte boundary.
    Notice that neither of these options enable any extra precision over the x87 standard of 80 bits for a long double.
    Warning: if you override the default value for your target ABI, the structures and arrays containing long double variables will change their size as well as function calling convention for function taking long double will be modified. Hence they will not be binary compatible with arrays or structures in code compiled without that switch.
    Message was edited by: etresoft - gave up trying to format it fancy

  • IChat will not let me use Return/Enter key to send IM.  Just makes sound?

    OS 10.5.2. iChar launches fine. I double click name I want to send IM to. Type a message, then hit Return to send the message. It will not send. I here system sound when I use Return or Enter key on 2nd or 3rd attempts. 1st attempt, no sound. So, I can't send messages.
    I repaired permissions and trashed the 4 iChat preference files in my preference folder.
    Not sure what I have done but Return key is fine. Works in Skype and all other apps. iChat just does not like it so no way to send messages.
    HELP.....
    Thanks
    tj

    Quit iChat.
    Open Terminal (Applictaions/Utilities)
    Copy and Paste Bold text
    /Applications/iChat.app/Contents/MacOS/iChat -errorLogLevel 7
    Hit Enter.
    This will cause iChat to be started up and create a Log in Terminal which may tell us more.
    Do what you normally do to send text messages.
    Do what you do to Quit iChat.
    Grab All of the Log.
    Quit Terminal.
    Post log here. It will be long. If you want to split it do so around the bit that says if it found UPnP and your router's name.
    Make sure the bits cross over when you post.
    8:25 PM Saturday; March 8, 2008

  • Returning double[] from Java to C++

    I have a Java method which returns double[]. I cannot figure out how to call it from C++ in a way that works. I would have thought it would be through the CallObjectMethod(...) method which returns a jobject. I then casted the jobject to jdoubleArray and tried to use it that way.
    However this does not work. (The JVM crashes spectacularly.)
    I am sure this must be something people do all the time but I couldn't find examples either in books or online so would appreciate some pointers (excuse the pun.)
    Thanks,
         Niall

    Your general approach is correct, so you must have some other mistakes on your code. You may want to post the relevant bits here. You are using the JNI Array* methods to access your jdoubleArray, right?
    God bless,
    -Toby Reyelts
    Check out the free, open-source, JNI toolkit, Jace - http://jace.reyelts.com/jace

  • Can we use return statement in procedure?

    Can we use return statement in procedure or we can use more than one return statement in procedure?

    HamidHelal wrote:
    NOReally? Did you at least test it? You can use RETURN in procedure or in anonymous PL/SQL block. The only restriction is you can't specify return value:
    SQL> begin
      2      dbms_output.put_line('Before return');
      3      return;
      4      dbms_output.put_line('After return');
      5  end;
      6  /
    Before return
    PL/SQL procedure successfully completed.
    SQL> create or replace
      2    procedure p1
      3      is
      4      begin
      5          dbms_output.put_line('Before return');
      6          return;
      7          dbms_output.put_line('After return');
      8  end;
      9  /
    Procedure created.
    SQL> exec p1;
    Before return
    PL/SQL procedure successfully completed.
    SQL> begin
      2      dbms_output.put_line('Before return');
      3      return 99;
      4          dbms_output.put_line('After return');
      5  end;
      6  /
        return 99;
    ERROR at line 3:
    ORA-06550: line 3, column 5:
    PLS-00372: In a procedure, RETURN statement cannot contain an expression
    ORA-06550: line 3, column 5:
    PL/SQL: Statement ignored
    SQL> create or replace
      2    procedure p1
      3      is
      4      begin
      5          dbms_output.put_line('Before return');
      6          return 99;
      7          dbms_output.put_line('After return');
      8  end;
      9  /
    Warning: Procedure created with compilation errors.
    SQL> show err
    Errors for PROCEDURE P1:
    LINE/COL ERROR
    5/9      PL/SQL: Statement ignored
    5/9      PLS-00372: In a procedure, RETURN statement cannot contain an
             expression
    SQL> SY.

  • How do I use the "double-layer" function with my iMac?

    Hi,
    Just wondering who can help me. I want to burn a dvd using the double-layer feature. The thing is I don't know if my iMac comes with that application preinstalled. I don't even know if I need an application and which one. The only thing I have for the moment is the "LightScribe DVD+R".
    Thank you

    "Double-layer" is a property of the media (the disk itself). There are no options in software necessary to support writing to it, it just uses the second layer if the data won't fit on a single-layer and the disk in the drive has a second-layer.
    As far as software is concerned, there's no notion of "layers" on the disk. The software simply sees the disk as 4.5G (a regular DVD+R) or 9G (DVD+R DL). Handling of writing multiple layers is handled by the drive itself.
    You'll note that you can't treat single-layer discs as double-layered ones. The drive can tell what sort of disk was inserted.

  • How do I use the double sided printing with my HP Officejet 6500A plus

    I need help with learning to use the double sided printing with my HP Officejet 6500A Plus

    Click on the Show Details button just above:
    You can configure various options from the dropdown menu just below Orientation.
    Printing two-sided requires a two-sided adaptor for the printer. Otherwise, you have to print out odd numbered pages first, turn them over and reinsert into the paper feeder, then print even numbered pages. If you do it right you get a nice two-sided document. If you do it wrong all the even numbered pages will be upside down.

  • Using return statement in jsp

    Hi all,
    I am using return statement in JSP page after a redirect to stop executing that page. If the data bean is not present then it must go to previous page. When this return statement is executed the previous page is displayed but url in browser remains same. Why it is so ?. Is there any other way to tell a JSP page to stop executing and redirect to another page.
    rgds
    Antony Paul

    Hi Antony,
    do you use the "forward()" method or the "redirect()" method???
    rgds
    Howy

  • Unreachable statement error occured while using return statement.

    Consider this code
    class q25{
         public static void main(String args[]){
              amethod(args);
         public static void amethod(String args[]){
              String str;
              try{
                   str = "Hello "+args[0];
                   System.out.println(str);
                   System.out.println("Returning to caller");
                   System.exit(0);
              catch(Exception e){
                   System.out.println("Exception ocured");
                   System.exit(0);          
              finally{
                   System.out.println("In finally");
              System.out.println("At the end of method");     
    }Above code compiles and runs successfully without any errors.
    Now consider below code which is same as above one except "System.exit(0)" statements were replace by "return" statements. Below code when compiled gives error as
    "q25.java:22: unreachable statement
    System.out.println("At the end of method");
    ^
    1 error"
    One thing i didn't understood in this context that, the above code when compiled should get same error as stated above. But not. It is obvious that presence of System.exit(0) must generate unreachable statement same as when it is replaced by "return" statement. What is the difference in getting the error for above but not for below code. Pls anyone help.
    class q25{
         public static void main(String args[]){
              amethod(args);
         public static void amethod(String args[]){
              String str;
              try{
                   str = "Hello "+args[0];
                   System.out.println(str);
                   System.out.println("Returning to caller");
                   return;
              catch(Exception e){
                   System.out.println("Exception ocured");
                   return;     
              finally{
                   System.out.println("In finally");
              System.out.println("At the end of method");     
    }

    warnerja wrote:
    masijade. wrote:
    Since you have a "return" in both the try and the catch portions of the try/catch block *(the second of which you should never do)* , anything thing that comes after the try/catch/finally blocks will be unreachable.That is not true. There are plenty of reasons to return from a catch block. If you handle the exception instead of rethrowing it or another exception, then you'll need a return somehow, either there or after the catch block. What you should never do is "return" in a finally block, because that will mask any exception in flight about to be thrown to the caller.Perhaps masijade's use of never is too strong, but I too prefer/tend to avoid using return anywhere in try/catch/finally to avoid potential gotchas. Consider:
    public class TryCatchFinally
      public Data process(String s)
        Data returnData = new Data();
        try
          returnData.value = Integer.parseInt(s);
          returnData.message = "Success";
          return returnData;
        catch (Exception ex)
          returnData.value = -1;
          returnData.message = "Fail";
          return returnData;
        finally
          returnData.value = 42;
          returnData.message = "?";
      public static void main(String[] args)
        TryCatchFinally demo = new TryCatchFinally();
        Data d = demo.process("2");
        System.out.println(d.message + ": " + d.value);
        d = demo.process("2.1");
        System.out.println(d.message + ": " + d.value);
      class Data
        int value = 0;
        String message = "";
    }

  • I am making a book in iPhoto using a double page spread and blank layout. I can't find a way to minimize the picture. it is too big in all the themes. I seems like there must be a way to shrink it not just zoom to make it fit?

    I am making a book in iPhoto using a double page spread and blank layout. I can't find a way to minimize the picture. it is too big in all the themes. I seems like there must be a way to shrink it not just zoom to make it fit?

    Command (right) - click on the photo and select Fit to Frame in the contextual menu:
    Not all frames in a theme offer that feature but most do.  The spread layout doesn't.
    OT

  • Using RETURNING clause with Execute Immediate

    I wrote a query to update a table and return the column in to a nested table type variable using returning clause but its not working I am getting error like
    ORA-06550: line 66, column 22:
    PLS-00306: wrong number or types of arguments in call to '||'
    ORA-06550: line 66, column 4:
    PL/SQL: Statement ignored
    I am getting error in following part of my query
    || 'RETURNING if_row_status bulk collect INTO '
    || v_if_row_status;
    v_if_row_status is defined as -
    TYPE v_count IS TABLE OF varchar2(50) INDEX BY BINARY_INTEGER;
    v_if_row_status v_count;

    I am trying to update a table for diffrent column if they are null and want no of column updated for each column.
    I wrote following query but I am not getting the correct output.
    UPDATE
    Temp_Bulk_Col_POC
    SET if_row_status = 'VALIDATED',
    if_row_processed_date = sysdate,
    if_row_error_msg =
    CASE
    WHEN record_type IS NULL
    THEN 'RECORD_TYPE is a required column and cannot be NULL'
    WHEN source_system IS NULL
    THEN 'SOURCE_SYSTEM is a required column and cannot be NULL'
    WHEN record_company IS NULL
    THEN 'RECORD_COMPANY is a required column and cannot be NULL'
    WHEN record_system IS NULL
    THEN 'RECORD_SYSTEM is a required column and cannot be NULL'
    WHEN txn_flag IS NULL
    THEN 'TXN_FLAG is a required column and cannot be NULL'
    WHEN create_date IS NULL
    THEN 'CREATE_DATE is a required column and cannot be NULL'
    WHEN UPDATE_date IS NULL
    THEN 'UPDATE_DATE is a required column and cannot be NULL'
    WHEN source_customer_id IS NULL
    THEN 'SOURCE_CUSTOMER_ID is a required column and cannot be NULL'
    WHEN source_product_id IS NULL
    THEN 'SOURCE_PRODUCT_ID is a required column and cannot be NULL'
    WHEN az_product_id IS NULL
    THEN 'AZ_PRODUCT_ID is a required column and cannot be NULL'
    WHEN decile IS NULL
    THEN 'DECILE is a required column and cannot be NULL'
    END
    WHERE if_row_status IS NULL
    AND (record_type IS NULL
    OR source_system IS NULL
    OR record_company IS NULL
    OR record_system IS NULL
    OR txn_flag IS NULL
    OR create_date IS NULL
    OR UPDATE_date IS NULL
    OR source_customer_id IS NULL
    OR source_product_id IS NULL
    OR az_product_id IS NULL
    OR decile IS NULL)
    RETURNING if_row_status,record_type,source_system,record_company,record_system,
    txn_flag,create_date,UPDATE_date,source_customer_id,source_product_id,az_product_id,
    decile
    BULK COLLECT INTO
    v_if_row_status,v_record_type,v_source_system,
    v_record_company,v_record_system,v_txn_flag,v_create_date,v_UPDATE_date,
    v_source_customer_id,v_source_product_id,v_az_product_id,v_decile;
    its showing same number for all the column.
    how I can collect based on the coulmn updated

  • How to retrieve multiple columns using "returning" in the Insert query.

    hi,
    wanted to know how to retrieve multiple columns using "returning" in the Insert Query.
    For retrieving one column we write the query as follows:
    Insert into TABLE values(1,2,3,4) returning COLUMN1 into PARAMETER
    But can we retrive multiple columns in the same query?
    am using oracle 10g and coding in .NET

    Hi,
    You can definetely get multiple values from a single query using the 'returning' clause.
    Eg : insert into emp (empno, ename, job, deptno) values (7324,'ADAM','MARKETING',30) returning ename, deptno into var1, var2; PN : var1 & var2 to be declared as varchar2 & number respectively.
    More insight into the 'RETURNING' clause in this link.
    http://www.samoratech.com/PLSQL/swArtPLSQLReturn.htm
    Regards,
    Bhanu.

  • Can I use return table in non-cumulative cubes upd rules?

    hi,
    Is it possible to use return table in non-cumulative cubes upd rules?
    What I mean is:
    In non-cumulative cubes I need to use Automatic Time Conversion for time chars and when I use return table I have to map fields from comm structure to return table.
    I am designing stock cube (with granularity on storage bin and quant level) where material movement data is took from Transfer Order docs. Data for source and target storage bin are in one document item, so I have to split each record.
    Regadrs,
    Andrzej
    ps. Maybe somebody has some technical documentation on Automatic Time Conversion?

    Hello Andrez,
      May be this code will be useful for you.
    *data decleration
    data: num type i,
          num1(2) type c,
    *variable for fiscper
          lv_fiscper type RSFISCPER,
    *variable for the calendar month
          lv_calmonth type RSCALMONTH,
    *variable for the period
          lv_period type T009B-POPER,
    *variable for the fiscal year
          lv_year type T009B-BDATJ,
    *variable to find out the calendar quarter
          lv_month TYPE RSCALMONTH,
          lv_calquarter type RSFO_CALQUARTER.
    *ICUBE_VALUES contain data for cube.Put these value into RESULT_TABLE
    RESULT_TABLE = ICUBE_VALUES.
    *add 12 times entry into result_table for 12 months
    do 12 times.
    append RESULT_TABLE.
    enddo.
    *processing for the split the value into 12 periods
    loop at RESULT_TABLE.
    num = num + 1.
    num1 = num.
    *divide the value by 12 for each month
      RESULT_TABLE-/BIC/ISMPLNRV = COMM_STRUCTURE-/BIC/ISMPLNRV / 12.
      RESULT_TABLE-CRM_CURREN = COMM_STRUCTURE-CRM_CURREN.
    case strlen( num1 ).
    WHEN 1.
    concatenate  RESULT_TABLE-fiscyear '00' num1 into lv_fiscper.
    RESULT_TABLE-fiscper = lv_fiscper.
    WHEN 2.
    concatenate  RESULT_TABLE-fiscyear '0' num1 into lv_fiscper.
    RESULT_TABLE-fiscper = lv_fiscper.
    endcase.
    lv_period = lv_fiscper+4(3).
    lv_year = lv_fiscper(4).
    *find out the calendar month from the period and year
    CALL METHOD CL_RSAR_FUNCTION=>FISCPER_CALMONTH
      EXPORTING
        I_FISCPER  = lv_PERIOD
        I_FISCVRNT = 'Z9'
        I_YEAR     = LV_YEAR
       I_CASE     = 0
      IMPORTING
        E_CALMONTH = lv_calmonth
    RESULT_TABLE-CALMONTH = lv_calmonth.
    *find out the calendar quarter from the fiscper
    concatenate lv_fiscper0(4) lv_fiscper5(2) into lv_month.
    *find out the calendar quarter
      if not lv_month is initial.
        CALL METHOD CL_RSAR_FUNCTION=>MONTH_QUARTER
          EXPORTING
            I_MONTH   = lv_month
          IMPORTING
            E_QUARTER = lv_calquarter.
        if sy-subrc <> 0.
          lv_calquarter = '00000'.
        endif.
      else.
        lv_calquarter = '00000'.
      endif.
      RESULT_TABLE-CALQUARTER = lv_calquarter.
      modify RESULT_TABLE.
    endloop.
    Regards
    Gopal

  • What is the purpose of using  return process sales  doc type?

    what is the purpose of using  return process sales  doc type?

    hi,
    There is the standard process
    1)Order type( RE) VA01
    2)Delivery( LR)Vl01n with reference to return order
    i)if the movement is 651then system will not generate accounting document upon doing Post goods Receipt ,the stock will be in the return location
    then you use movement type 453 to get the stock in UN restricted
    ii)if the movement type 653 the system generates accounting document and stock posts in unrestricted use
    3)With reference to Delivery raise Credit memo (RE) with transaction VF01
    CHAN

Maybe you are looking for