Pieces with variable lengths and Packing

We have a scenario where a fabric is received from production in rolls and after quality it is cut and stored in multiple pieces with multiple lengths. We need to identify each piece individually.
After storing, these pieces are then packed in different handling units i.e. pallets, rolls, bales, etc. depending on the customer order instructions. These are then stored for delivery. The requirement is to identify each handling unit along with the individual pieces packed so that it any given time it is viewed how much fabric is available in pallets and pieces for delivery.
Please let me know how this can be handled in MM.

Thanks For your reply guys,the above mentioned Scenario has been catered and it in the following way:
I did it with the help of multiple level packaging.
I actually considered the Piece length as a Packing material .
Then In Hu02 select the material to be packed and the mention the partial quantity as a length and pack it in considered packing material.
And then in Pack HUs tab select all the piece lengths to be packed and click on (NEW HU Per*H) and enter their the final packing unit and pack it.The system allocate the handling unit and that is the pallet number.
Finally that can be attached to the delivery order.

Similar Messages

  • How to deal with variable length data struct in C/JNI

    I have another JNI related question. How do you handle variable length
    data structures in Java and pointer to a pointer?
    Basically, I have a backend in C which has records but we don't know
    how many. The API looks like
    typedef struct rec_list_s {
    int rec_list_cnt;
    rec_list_data_t rec_list_data[1];
    } rec_list_t;
    int rec_list_show(void handle, rec_list_t *list_ptr);
    /* Code snippet for rec_list_show */
    int rec_list_show(void handle, rec_list_t *list_ptr)
    rec_list_t *ptr;
    sz = sizeof (rec_list_t) +
    ((record_count - 1) * sizeof (rec_list_data_t));
    ptr = malloc(sz);
    /* fill the data */
    *list_ptr = ptr;
    return (0);
    So I need to wrap rec_list_show() in JNI call so I can have Java call
    it. How do i pass a pointer to a pointer from Java? I tried in the
    native C code for JNI to return the pointer to pointer as a result
    and store in a member in the Java class rec_list_t and then I pass
    that to JNI call for rec_list_show. The C backend code was fine
    since it got the pointer to pointer but Java become unhappy when
    the object it was referencing changed memory location (I suspect
    the garbage collection becomes unhappy).
    So what would be a good way to deal with this kind of code?
    Thanks,
    Sunay
    Edited by: st9 on Aug 30, 2010 5:47 PM

    I did not imply that you don't know C but you are implying that I don't understand C. Perhaps
    google Sunay Tripathi and click I am feeling lucky so that we don't get into teaching C
    discussions :) On the other hand, I am definitely looking for someone to teach me Java
    otherwise I wouldn't be asking.
    Anyway, let me explain again. The sample function rec_list_show() runs on the backend. It
    is a different process with a different VM space. It of course knows the size of the array
    and what to fill in. As a caller to that API (which is a separate process), I don't know
    what that size is but I need to get the size and corresponding data in one shot because
    the backend locks the table when its providing me the info to make sure its synchronous.
    Now I (the Java process) needs to get that count and data in one shot. Since the C library
    underneath me (wrapped around my JNI interface) has private IPC mechanism to copy
    the contiguous memory from the backend into my memory space, all I need is to provide
    a pointer to a pointer which gets filled in by backend and is available to my process. So
    my equivalent C frontend just passes a pointer to a pointer and casts the return value in
    rec_list_t. The rec_list_cnt tells it how many members it got. The first member is part of
    the struct itself but then following members are right after.
    Another way to help you understand this is with this code snippet from front end C program
    rec_list_t     *ptr, *save_ptr;
    rec_list_data_t *data_ptr;
    int          cnt;
    save_ptr = ptr = malloc(sizeof(rec_list_t));
    rec_list_show(handle, &ptr);
    assert(save_ptr != ptr);
    cnt = ptr->rec_list_cnt;
    for (i = 0; i < cnt; i++) {
         data_ptr = &ptr->rec_list_data;
    Notice the assert(). Also notice the for loop. How do I expect to walk more that one
    member when rec_list_data is a fixed size array of one member?typedef struct rec_list_s {
         int               rec_list_cnt;
         rec_list_data_t          rec_list_data[1];
    } rec_list_t;
    Anyway, I do understand that Java will not allow me to get a reference to a long and
    how Java memory management works. But the JNI native implementation is C
    and I was wondering if people have managed to do some tricks there between C
    and Java.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to use datamerge with variable lengths of text?

    Hello,
    I'm looking for a way to automaticly format brochures from a database . I allready found out that datamerge lets you do this quite easily. But I encounter a problem when I use large amounts of text.
    How I see it, the only solution is to reserve enough space for the larges text in order to make all of the text appear in the document. But this leaves large open spaces and even blank pages in my document when I deal with less text.
    Is there a way to make the document adapt to the amount of text? So that Indesign creates more space for large amounts of text and erases blank pages when there is less text?
    Maybe Datamerge isn't the right solution for my problem, I'm open to suggestions.
    Thanks in advance!
    Iris

    I'm just finishing up a directory that I build with data merge and I have the problem of variable length business descriptions, as well as some have extra mailing addresses or websites. My solution is to do it in several steps with multiple files. I do a normal merge first (and I use a single record per page for this, but only bcause that allows me to create some alphabetical lists of business names and owners's names that I can key to a listing number), then I stitch together the individual stories into a single text thread that I copy/paste into place in the final document. If you have a lot of frames, Rorohiko.com has a nifty text stitch script that will help.
    One tip that helps with this method is to be sure you have a paragraph break at the end of each story so stiching the frames together maintains your paragraphs.

  • How to browse MQ queue with variable length messages?

    I am trying to browse messages on an Websphere MQ queue using PL/SQL and Oracle Gateway for Websphere MQ (both 11g2)
    However, the (XML) messages are of variable length: they can be less than 1k or over 100k.
    I found that the pgm.mqget procedure is overloaded, so if the message is longer than 32k, you need to use the PGM.MQGET_BUFFER, and else you use the RAW variable.
    However, in order to know the length, you’ll need to browse the message first, to get the message length.
    If I try to get a message using the buffer variable, and the messsage is 32k or shorter, the program aborts with
    ORA-28511: lost RPC connection to heterogeneous remote agent using SID= +<db_link_name>+
    ORA-06512: at "SYS.PGM", line 390
    ORA-06512: at "SYS.PGM", line 849
    If I try to browse a message longer than 32k using the RAW variable, the ‘mqget’ statement just hangs. I tried with and without setting the MQGMO option ‘mqgmo_acccept_truncated_message’.
    Any advise on how to solve this issue?
    Arnold

    I am trying to browse messages on an Websphere MQ queue using PL/SQL and Oracle Gateway for Websphere MQ (both 11g2)
    However, the (XML) messages are of variable length: they can be less than 1k or over 100k.
    I found that the pgm.mqget procedure is overloaded, so if the message is longer than 32k, you need to use the PGM.MQGET_BUFFER, and else you use the RAW variable.
    However, in order to know the length, you’ll need to browse the message first, to get the message length.
    If I try to get a message using the buffer variable, and the messsage is 32k or shorter, the program aborts with
    ORA-28511: lost RPC connection to heterogeneous remote agent using SID= +<db_link_name>+
    ORA-06512: at "SYS.PGM", line 390
    ORA-06512: at "SYS.PGM", line 849
    If I try to browse a message longer than 32k using the RAW variable, the ‘mqget’ statement just hangs. I tried with and without setting the MQGMO option ‘mqgmo_acccept_truncated_message’.
    Any advise on how to solve this issue?
    Arnold

  • Is it possible to display a waveform with fixed length and fixed starting point?

    Hi,
    I am using DAQ assitant to acquire voltage and current measurment of my device. The voltage is a pure sine wave and current is a periodic waveform with phase difference and distortion. I use waveform chart to display the waveform of voltage and current waveform in seperate charts and they work fine.But the waveforms look like moving to the right all the time, in another way ,the phase is always shifting. Now i want to display the waveforms of both with fixed length (say 2 cycle) and also in a same chart. Apart from that, i also want to display the voltage waveform starting form 0 degree (a fixed point )rather than moving all the time. In this case, i can observe the angle difference between voltage and current. Is there any method to achieve this purpose?
    Many Thanks,
    Hao

    Hao,
    first of all, you are using a chart which has three options for updates if the chart is "full":
    Strip chart (default)
    Scope chart
    Sweep chart
    These are called "update mode". Test the modes yourself.
    Also you have to know that you will not likely have an integer number of periods of your signal in the display of the chart. Therefore, a continuous signal will "move" the graph from update to update.
    You can implement some algorithm to discard data to maintain a static "trigger" level for display, but as stated, it will leave gaps in the signal. These gaps are not a concern unless you use the displayed signal for analysis (e.g. FFT).
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Bookmark with Variable screen and UserExit

    Hi
    We're using the bookmarks in portal of N2004s.
    If someone starts a bookmark it's possible to bring the user first to the variable screen. But I recognized that the userexit is not activated for some variables after changing them.
    concret:
    I called a report with time-selection week = 10.2007 - the report has keyfigures which are restricted by a userexit variable which is previous year (calculated by time selection - 1year) - so the report shows me the keyfigures with previous year 10.2006 and 10.2007 - I save this as a bookmark.
    calling the bookmark with this link: &bookmark=46LQ49TMUQ8BRH3O91VEH0XMK&variable_screen=X
    the bookmark shows me first the variable screen. The user can change then the time-selection. But when i change now the time-selection in the variable screen from 10.2007 to 20.2007 I get in the report stll 10.2006 and 20.2007.
    So it seems to me the bookmark doesn't run through the user exit to fill the variable "previous year".
    How can this be activated?
    Thank you for your reply.
    Roger

    Hi
    I debugged now the user exit and it seems as following:
    - calling a bookmark with selection_screen=x but without the parameter clear_variables=x does run through the user exits step 1 to 3 before showing the variable screen. After changing a variable the user exit is only enabled for step 3 and not anymore for step 2 - that's why the previous year is not updated.
    - calling the bookmark with selection_screen=x and clear_variables=x runs user exit with step 1 before selection screen and then after entering variables step 2 and 3 - and the previous year is filled correctly. But this is not useable, because the user want's to have selection variables prefilled.
    Has someone an idea how to bring the bookmark without clear_variables=x to the point to run the step 2 in user exit after changing variables in selection screen?
    Thx
    Roger

  • Product type for securities with Variable interest and unit quoted

    Hello,
    Somebody knows, Wich product  type can I use to manage securites,  where I could calculate variable interest at the end of the month and calculate purchases and sales by units?
    I try to use 04H with this product I can calculate the variable interest at the end of the month but I can't used to purchase or sale with units.
    Thanks for your help,
    Adriana

    Hi Ravi,
    I followed your instructions.
    In SPRO->Treasury and transaction management->Transaction management->Securities->Master Data->Product types->Condition types. I created the followed condition types:
    999 Variable interest             TZST
    998 Int. rate adjustment 999  ZA
    Then in Created a new condition grup (99) and assing the Conditions types: 999 & 998 to the group 99
    I Created a new product type Z43 and assigned the condition group 99
    Then in,
    In SPRO->Treasury and transaction management->Transaction management->Securities->Position Management->Securities Account Management->Update Types->Assign Update Types to Condition Types
    In Active Pos:
    999 Variable interest  TZST Incoming payment with positive position 5009 (incoming)
    Thanks,
    Best regards,
    Adriana

  • Form with variable length pages

    Hi,
    I have a form which has categories of data - some categories require many fields and some require only a handful of fields. I want to put each category on a single page. My Master Page has a graphic which serves as a background for all of the pages.
    Is there a way through Designer ES or JavaScript to vary the length of each page? Or, could I somehow assign the background graphic image to a variable so that if I have a different Master Page assigned to each category's page, the image can be stored once and somehow referenced by each page. (I want to avoid creating multiple copies of the image that are of varying lengths - this will take the file length unwieldly.)
    Thanks,
    Jeff

    I think the table would handle the layout and repetition of rows. But if some of the input fields are text input and some are checkboxes or another type, how would I get the right type of input on each row? Do you have an example where the backing bean dynamically builds components, that I could look at? Thanks.

  • MaskFormatter with variable length

    I'm trying to create a MaskFormatter with the following mask:
    "AAAA AAAA AAAA AAAA"
    The user should be able to enter whatever he likes as long as it is automatically formatted with a space between each group.
    Valid combinations are:
    1234 45
    12
    FF12 5454 546
    etc...
    Further on, small letters should be converted to Uppercase when typing. How do I do this?
    I have already tried to write a custom VariableMaskFormatter as described in (http://forum.java.sun.com/thread.jspa?forumID=57&threadID=461577&start=3)
    but I doesn't work as expected.
    It only works if the placeholdercharacter which is used is also an allowed charachter when typing. But I don't want to make the space character an allowed character.
    How can this be solved?
    Thanks
    Fabian

    Thank you. I have been able to create a custom MaskFormatter which will dynamically adapt the mask based on what was entered.
    But I still have two open issues:
    1. How can I do so that all smaller letters are converted to captital letters when typing? Normally you would use the letter "U" in the mask, but, users should be able to enter a alphanumeric character, so I use "A" instead.
    2. Cursor problem:
    - How can I make delete and backspace button act as if it was in a notepad? If I press delete, charachters at the right from the cursor should be deleted and the cursor should not move forward.
    Please find below some code samples.
    package test.component;
    import java.text.ParseException;
    import javax.swing.text.MaskFormatter;
    public class VariableLengthMaskFormatter extends MaskFormatter {
        public VariableLengthMaskFormatter() {
            super();
        public VariableLengthMaskFormatter(String mask) throws ParseException {
            super( mask );
         * Override the setMask method
        public void setMask(String mask) throws ParseException {
            super.setMask(mask);
         * Update our blank representation whenever the mask is updated.
        public void setPlaceholderCharacter(char placeholder) {
          super.setPlaceholderCharacter(placeholder);
        /* (non-Javadoc)
         * @see javax.swing.text.MaskFormatter#stringToValue(java.lang.String)
        public Object stringToValue( String value ) throws ParseException {
            Object rv;
            // Get the mask
            String mask = getMask();
            if ( mask != null ) {
                // Change the mask based upon the string passed in
                setMask( getMaskForString( mask, value ) );
                // Using the substring of the given string up to the mask length,
                // convert it to an object
                rv = super.stringToValue( value.substring( 0, getMask().length() ) );
                // Change mask back to original mask
                setMask( mask );
            } else
                rv = super.stringToValue( value );
            // Return converted value
            return rv;
         * Answer what the mask should be for the given string based on the
         * given mask. This mask is just the subset of the given mask up to
         * the length of the given string or where the first placeholder
         * character occurs in the given string. The underlying assumption
         * here is that the given string is simply the text from the
         * formatted field upon which we are installed.
         * @param value The string for which to determine the mask
         * @return A mask appropriate for the given string
        protected String getMaskForString( String mask, String value ) {
            StringBuffer sb = new StringBuffer();
            int maskLength = mask.length();
            char placeHolder = getPlaceholderCharacter();
            for (int k = 0, size = value.length(); k < size && k < maskLength ; k++) {
                if ( placeHolder == value.charAt( k ) ) {
                    //break;
                    sb.append(' ');               
                } else {
                    sb.append( mask.charAt( k ) );
            return sb.toString();
             MaskFormatter theRekFormat = null;
             try {
                 theRekFormat = new VariableLengthMaskFormatter( "AAAA AAAA AAAA AAAA" );
                 theRekFormat.setPlaceholderCharacter(' ');
                 theRekFormat.setValueContainsLiteralCharacters( false);
             } catch (Exception ex) {
                 System.out.println(ex.toString());
             JFormattedTextField myMaskAccount = new JFormattedTextField(theRekFormat);
              myMaskAccount.addKeyListener(new KeyAdapter(){
                            public void keyReleased(KeyEvent ke){
                              if(ke.getKeyCode() == KeyEvent.VK_DELETE) {
                                  myMaskAccount.setCaretPosition(myMaskAccount.getCaretPosition()-1);
                              } else {
                                  System.out.println("listening to key: " + ke.getKeyCode());
                              }}});

  • How to tokenize a column with variable length string

    I have a question regarding tokenizing string in a column I have table like
    id list
    1 i love dogs
    2 i like cats and dogs
    and so on
    it should be converted to
    id list
    1 i
    1 love
    1 dogs
    2 i
    2 like
    2 cates
    2 and
    2 dogs
    How do I tokenize this? I tried using this code inside cursor and procedure
    SELECT id, regexp_substr(str, '[^ ]+', 1, level) TOKEN from test CONNECT by level <= length(regexp_replace (str, '[^ ]+')) + 1;
    but this is very slow when called from java. Is there any other alternative?
    Thanks

    69edfef1-01fd-49c3-b83d-ece76195d26c wrote:
    I have a question regarding tokenizing string in a column I have table like
    id list
    1 i love dogs
    2 i like cats and dogs
    and so on
    it should be converted to
    id list
    1 i
    1 love
    1 dogs
    2 i
    2 like
    2 cates
    2 and
    2 dogs
    How do I tokenize this? I tried using this code inside cursor and procedure
    SELECT id, regexp_substr(str, '[^ ]+', 1, level) TOKEN from test CONNECT by level <= length(regexp_replace (str, '[^ ]+')) + 1;
    but this is very slow when called from java. Is there any other alternative?
    Thanks
    The reason yours is slow is because you don't have sufficient connect by conditions to restrict the iterations properly...
    e.g. What you are doing...
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select 1 as id, 'i love dogs' list from dual union all
      2             select 2, 'i like cats and dogs' from dual union all
      3             select 3,'precipitevolissimevolmente' from dual)
      4  --
      5  --
      6  --
      7  SELECT id
      8        ,regexp_substr(list, '[^ ]+', 1, level) TOKEN
      9  from t
    10* CONNECT by level <= length(regexp_replace (list, '[^ ]+')) + 1
    SQL> /
            ID TOKEN
             1 i
             1 love
             1 dogs
             2 and
             2 dogs
             2 cats
             2 and
             2 dogs
             2 like
             1 dogs
             2 and
             2 dogs
             2 cats
             2 and
             2 dogs
             2 i
             1 love
             1 dogs
             2 and
             2 dogs
             2 cats
             2 and
             2 dogs
             2 like
             1 dogs
             2 and
             2 dogs
             2 cats
             2 and
             2 dogs
             3 precipitevolissimevolmente
             1 love
             1 dogs
             2 and
             2 dogs
             2 cats
             2 and
             2 dogs
             2 like
             1 dogs
             2 and
             2 dogs
             2 cats
             2 and
             2 dogs
    45 rows selected.
    And with additional connect by criteria...
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select 1 as id, 'i love dogs' list from dual union all
      2             select 2, 'i like cats and dogs' from dual union all
      3             select 3,'precipitevolissimevolmente' from dual)
      4  --
      5  --
      6  --
      7  SELECT id
      8        ,regexp_substr(list, '[^ ]+', 1, level) TOKEN
      9  from t
    10  CONNECT by level <= length(regexp_replace (list, '[^ ]+')) + 1
    11         and id = prior id
    12*        and prior sys_guid() is not null
    SQL> /
            ID TOKEN
             1 i
             1 love
             1 dogs
             2 i
             2 like
             2 cats
             2 and
             2 dogs
             3 precipitevolissimevolmente
    9 rows selected.

  • SQL Extract Variable String in Variable Position with Variable length from ntext field

    i want to extract a variable string from an ntext field. 
    Sample Data in Background_text (ntext)
    function changeFocus()  {         document.getElementById('skipContent').style.visibility = 'visible';         document.getElementById('flashContent').blur();        
    document.getElementById('skip').focus();  }  </script>    </head>  <body onload='hideDiv()'>    <div id="flashContent" align="center">     <object
    classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="700" height="440" id="Animation" align="middle">      <param name="movie"
    value="/assets/abc/images/abcdef.swf" />      <param name="quality" value="high" />
    I want to extract this data:      "/assets/abc/images/abcdef.swf"
    The string will always be preceded by value="     AND end in
    .swf"
    As a first attempt, I tried
    SELECT SUBSTRING([Background_text], CHARINDEX('value="/assets/', [background_text]) + 15, LEN(convert(varchar(max), background_text) -
    CHARINDEX('value="/assets/', [Background_text]) + 15) - 1)
    but I received this error
    Msg 245, Level 16, State 1, Line 1
    Conversion failed when converting the varchar value .......  to data type int
    This query won't completely accomplish what I want. Do you have a suggestion?
    Thanks.

    I'd add an extra bit of logic into the expression to only look for 'swf' AFTER the start of the string - it might be that you can guarantee that no occurrence of 'swf' will ever appear in the ntext, but who knows what might change in the future, and it's
    good practice to code defensively.
    SELECT
    SUBSTRING(
    Background_text,
    CHARINDEX('value="/assets/', background_text) + 6,
    CHARINDEX('.swf', SUBSTRING(
    Background_text,
    CHARINDEX('value="/assets/', background_text) + 6,
    LEN(cast(background_text as varchar(max)))
    ) + 4

  • Generate signal with variable pulsewidth and period

    Hallo,
    I want to generate a square signal where I can modify the pulswidth, period, amplitude, frequenzy, duty cycle...at the Front Panel.
    I also want to be able to generate just a a single puls/period on the one hand and a puls-train on the other.
    I´am working with a AT-MIO-16E-1(DAQ-Card), a SCB-68 and LabView 7.
    I`d be very grateful, if anyone is able to help me...
    Thanx a lot...
    Greets Daniel

    Daniel,
    It sounds like you are trying to generate digital pulses using your DAQ board.  The counter output is designed to be a digital signal.  That is, the amplitude of the signal is either 0 V or +5V.  Therefore, the amplitude cannot be controlled.
    However, there are some great examples in the LabVIEW Example Finder that will help you implement your two options.
    Access the Example Finder by navigating to Help >> Find Examples...  Then go to Hardware Input and Output >> DAQmx >> Generating Digital Pulses. There are several examples there which you can check out to get you started.  The most interesting to you are likely Gen Dig Pulse Train-Continuous.vi and Gen Dig Pulse.vi.
    I hope this gets you started in the right direction.
    Stephen Meserve
    Applications Engineering
    National Instruments
    Stephen Meserve
    National Instruments

  • Query SQL with variables Parameters and user defined tables

    Hi  everyone
    I got a problem about Query SQL
    [dbo].[@CSOURCE]  is a user defined table
    select * from [dbo].[@CSOURCE]
    you can get the result in following
    code    name
    T01      newspaper
    T02      TV
    T03      radio
    T04      friends
    when I execute the following SQL   Statements ,I get an error
    SELECT T0.CardCode , 0.CardName ,T1.Name ,T2.SONumber
    FROM OCRD T0    LEFT JOIN [dbo].[@CSOURCE]  T1 ON T0.U_CSOURCE = T1.Code
                                 LEFT JOIN (SELECT  T0.CardCode ,COUNT(T0.DocNum)SONumber
                                 FROM ODLN T0  INNER JOIN OCRD T1 ON T0.CardCode = T1.CardCode
                                WHERE T1.GroupCode =111
                                AND   (T0.DocDate >=[%0] or [%0]='')
                                AND   (T0.DocDate <=[%1] or [%1]='')   
                                GROUP BY T0.CardCode) T2 ON T0.CardCode=T2.CardCode
    WHERE T0.GroupCode =111
    and  T0.CardType ='C
    Is there anyone can correct it for me
    thank you very much
    Edited by: Li Mishan on Jul 17, 2008 9:36 AM
    Edited by: Li Mishan on Jul 17, 2008 9:40 AM

    I am sorry .It is just a mistake of my typewriting.
    The following is the whole SQL
    dbo.@CSOURCE is a user table.It's content is
    code  name
    T01    newspaper
    T02    TV
    T03    radio
    T04    friends
    declare @m int
    declare @FromDate DateTime
    declare @ToDate DateTime
    set @m=(SELECT count(*)  FROM ORDR T0 WHERE T0.DocDate >=[%0] and  T0.DocDate <=[%1])
    set  @FromDate=[%0]
    set  @ToDate=[%1]
    /*****************If I do not connect user tavble dbo.@CSOURCE ,I will succed *****************************************************/
    SELECT T0.CardCode ,T0.CardName ,T2.SONumber,T1.Name
    FROM OCRD T0  LEFT JOIN [dbo].[@CSOURCE] T1 ON T0.U_CSOURCE = T1.Code
                               LEFT JOIN (
                                                SELECT T0.CardCode ,COUNT(T0.DocNum)SONumber                                            FROM ODLN T0 INNER JOIN OCRD T1 ON T0.CardCode = T1.CardCode
                                                WHERE T1.GroupCode =111
                                                AND (T0.DocDate >=@FromDate or @FromDate='')
                                                AND (T0.DocDate <=@ToDate  or  @ToDate ='')                                                                               
    GROUP BY T0.CardCode
                                            ) T2 ON T0.CardCode=T2.CardCode
    WHERE T0.GroupCode =111
    and T0.CardType ='C'
    when I excute the SQL, It return a error , whith says the column name '%0'  is invalid.
    If I delete "set @m=(SELECT count(*)  FROM ORDR T0 WHERE T0.DocDate >=[%0] and  T0.DocDate <=[%1])"
    and rewrite "set  @FromDate='2008.05.01' set  @ToDate='2008.07.01' "
    It Shows the following results
       CardCode     CardName     SONumber     name
    1      000070        Deng. Jiahua   1                newspaper
    2      000293        LU .Weijuan    1                radio
    3      000313         Xie .Jifang       3               TV
    Edited by: Li Mishan on Jul 18, 2008 4:42 AM
    Edited by: Li Mishan on Jul 18, 2008 4:43 AM
    Edited by: Li Mishan on Jul 18, 2008 5:43 AM

  • BufferedReader with both text and binary data

    I'm reading ascii data from a socket using the read(char[] cbuf, int off, int len) method for a BufferedReader. This data contains a mixture of text to be parsed and data for an image. The messege is of variable length and the text fields are delimited by markers such as "FOO" or "BAR". I have initialized the BufferedReader in two seperate ways. First is: new BufferedReader(new InputStreamReader(iplCommSocket.getInputStream()));
    The second is : new BufferedReader(new InputStreamReader(iplCommSocket.getInputStream(),"8859_1"));
    If I use the first, I don't think I am getting the data correctly, if I use the second, the string ( creating a new String(char[]) )I get back from the read operation has the text after the binary data clobbered. I've tried converting the char[] to a byte[] and then creating a new String with the byte array using the "8859_1" character encoding to no avail. Any help is greatly appreciated

    Is there a reason that you are using BufferedReader? 'cause, if I were you I wouldn't. It's geared toward text data, not binary data. I would look into some flavor of InputStream or possibly a FileChannel with some clever way to use the ByteBuffer.
    Good Luck
    Lee

  • Problems with iPhone 4 and 3G

    Hi,
    since iOS 5 I am faced with severe software problems, software freezes and system crashes. Lately I am facing problems to call without openining a specific setting before calling. Ditto the iPhone has problems to connect to the internet, but it can not be the SIM card as the card is working without problems in other devices. I have reset the device and installed a backup - no changes. Maybe a pure rest will do, but I am not really happy about starting to set up everything from scratch.
    Does anyone have similar problems and/or a solution?
    Thanks.

    One of the issues that we have had since the latest upgrade (4.2.1) is with the radio function in general (both wifi and bluetooth). We have identified that the wifi security protocol stack has serious issues with key length and this can stop connections to the wifi systems such as TC and APE, but it also affects anyone using security string longer than 8 characters.
    With bluetooth we noticed that the older pairing sequence was no longer working. The only way that we could clear this down was by deleting all pairing done earlier in both devices, resetting the network settings and then restarting the 'phone. Place the vehicle/headset/device into pairing mode AFTER the iPhone has completely restarted. Go into the GENERAL-BLUETOOTH settings and pair the device again, this should be all you need to do.
    One thing to note is that some of the older bluetooth devices only support v1 of the bluetooth protocol stack and this causes trouble with the new update (don't know why yet but it looks like a handshake problem).
    Finally - for BMW owners, the bluetooth stack in 4.2.1 can cause intermittent drop-outs if the car software has not been updated recently (prior to Jan 2010). If you need to pair your iPhone 4 or upgraded 3GS, you may need to take your car to a dealer to update the comms package to he latest version. The snap-in for the iPhone 4 is due from Jan 2011.
    Hope this helps.

Maybe you are looking for

  • F4 help is not available for cost center in Confirmation

    Hi We are working on SRM 4.0 During the Confirmation of services through WEB portal   ( F4 ) option is not available for Cost Center Through GUI ( Backend) we are able to see the Values in Drop down , but when we select them un able to copy them to C

  • WRT54G2 v1 fv1.0.04 stuck in wifi protected setup? /unable to switch to manual

    I just upgraded the firmware on a WRT54G2 v1 from firmware v1.0.00 to v1.0.04.  More or less everything was working fine before the upgrade.  I was surprised that it held most of the old settings, including the wireless settings.  The execpton is the

  • Uninstall SAP Addon

    Hi Basis Experts, Can any one tell me How to uninstall a SAP addon/component? Appreciate your time and help Thanks CG

  • Multiple Page Number

    Dear All i have Month wise tabular and summary information in one report (using report 6i) , report start from January report first show tabular information having many pages and then its summary, show on single page then next month say February tabu

  • Watch ESPN not working correctly

    I have had Apple TV for about 9 months and it has beeen great.  I have just recently run into an issue with Watch ESPN.  It works well for a short period of time but then will start jumping around to parts of the broadcast I have already viewed.  Has