FCC - Problem with Occurence of values

Hi well i will have to transform data via FCC. The recieving data e.g. DT_Test has an element with occurence 0..1. because of '0' there is the possibilty that this element will be left blank, so nothing will be transferred.
in FCC on receiver side i have to give the parameter '.fieldFixedLengths' and i am not able to say XI: " Well if the field is blank, don't use the value given in fieldFixedLengths!
br Jens

Hi,
May be you can use "Exists" node function in the mapping program.
Hope this helps.
-Prasad Babu.

Similar Messages

  • FCC - Problem with occurence

    Hi well i will have to transform data via FCC. The recieving data e.g. DT_Test has an element with occurence 0..1. because of '0' there is the possibilty that this element will be left blank, so nothing will be transferred.
    in FCC on receiver side i have to give the parameter '.fieldFixedLengths' and i am not able to say XI: " Well if the field is blank, don't use the value given in fieldFixedLengths!
    br Jens

    Hi Jens,
    you can solve that as well with XSLT and an if-condition on string lenght of source field:
    <xsl:if test="//string-length(//myField) != 0"><fieldFixedLengths...
    Regards,
    Udo

  • .MSG files. Problem with getting requested values from crawled properites

    Hi
    I have a lot of msg files on my file server. I use SharePoint Enterprise Serach engine to crawl all these MSGs.
    I would like to get extra managed properties out of these files. I am most interested in getting Mail:5(text) / Mail:12(Date and Time) / Mail:53(Date and Time) from MAIL category in Managed Properties.
    This thread is very similar to one already posted by SpinnerUp:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/82d69df0-5cb2-4e51-a485-34209e111f4b/problem-with-crawling-msg-files-doesnt-seem-to-return-requested-values-from-crawled-property
    Please be aware that I do not use Public Folders. These MSGs are exproted from Outlook and are stored on File Server not Exchange.
    I tried to link Crawled Properties to new property however I cannot get any results back.
    Thank you for you help.
    Regards, Marcin (Please mark as helpful or answered if it helps)

    Thank you for your replay.
    However I am not keen to write custom connector at this stage.
    Is it possible to simply get "Subject", "Sent", "Received" info from msg file and then map it to managed properties.
    Does SharePoint create any crawled properties which contain information about let's say "Subject" which then can be used to create managed properties?
    I tried playing with "MAIL" properties however I cannot get them to work. I guess this is because the file is a msg file rather than mail which is stored in Exchange Public Folder.
    Regards, Marcin (Please mark as helpful or answered if it helps)

  • Problem with mouse-over value on a column chart (by Series)

    Hi.
    First of all thanks for any offered tip.
    I am having a problem with a column chart.
    When I move the mouse over a column it should show a small pop-up (or tip) with the column name (series name) and the value (series value). The problem is that it displays an extra '1' just like the following:
    SeriesName
    1
    X.XXX
    How can I remove the extra '1' and only show the name and the value ?
    The data is populated by series (manually added).
    Mihai.

    Hi,
    Thanks for the tip Shanthakumar KA.
    Yes. It looks like the '1' is coming from the X Axis labels. The chart that I have built does not require any labels on the X Axis, so this was not set (X-Axis labels: Empty). I tried setting this to an empty cell, but the '1' still appears in the mouse-over tip.
    It is very weird. If I leave the X-Axis labels empty, I still get the '1' displayed which is very annoing.
    Are there any solutions for this except the re-building the tip with a label a.k.a. '[customize the mouse over values|http://xcelsiusandme.blogspot.com/2009/07/xm-sample-7-customizing-mouse-over.html].'
    Regards,
    Mihai.

  • Problem with getting actual value in Row row=iter.getCurrentRow();

    hi,
    the use case is as follows:
    in master-details, on detail table there are 2 columns with checkbox and username.
    when user clicks checks, the username text item is populated with current user value in respective row.
    <af:column sortProperty="#{bindings.DcaRegisterLinesV1.hints.Selected.name}" filterable="true"
    sortable="true" headerText="#{bindings.DcaRegisterLinesV1.hints.Selected.label}" id="c1"
    width="30">
    <af:selectBooleanCheckbox value="#{row.bindings.Selected.inputValue}"
    label="#{row.bindings.Selected.label}" autoSubmit="true"
    valueChangeListener="#{registerBean.socSelectedChangeListener}"
    shortDesc="#{bindings.DcaRegisterLinesV1.hints.Selected.tooltip}" id="sbc1">
    <!--af:setPropertyListener from="#{securityContext.userName}"
    to="#{bindings.ProcessedUser.inputValue}"
    type="attributeChange"/-->
    </af:selectBooleanCheckbox>
    </af:column>
    <af:column headerText="#{bindings.DcaRegisterLinesV1.hints.ProcessedUser.label}" id="c17" width="80"
    sortProperty="#{bindings.DcaRegisterLinesV1.hints.ProcessedUser.name}" filterable="true"
    sortable="true">
    <af:outputText value="#{row.ProcessedUser}" id="ot17"/>
    </af:column>
    the bean's code is below:
    public void socSelectedChangeListener(ValueChangeEvent valueChangeEvent) {
    BindingContainer dcbindings = getBindings();
    AttributeBinding at;
    DCBindingContainer dc=(DCBindingContainer) dcbindings;
    DCIteratorBinding iter=dc.findIteratorBinding("DcaRegisterLinesV1Iterator");
    BindingContext bindingctx = BindingContext.getCurrent();
    BindingContainer bindings = (BindingContainer)bindingctx.getCurrentBindingsEntry();
    Row row=iter.getCurrentRow();
    String AgreementId=row.getAttribute("AgreementId").toString();
    System.out.println(" AgreementId="+AgreementId);
    it always prints the first row's values.
    even though i click on different rows on the table prior clicking checkbox.
    what's wrong? seems like the model is not refreshed because what? autosubmit=true ?..
    how can i get the actual row values?
    please help
    the

    Hi,
    lets clean up your code first:
    public void socSelectedChangeListener(ValueChangeEvent valueChangeEvent) {
    BindingContainer dcbindings = getBindings();
    //AttributeBinding at;
    DCBindingContainer dc=(DCBindingContainer) dcbindings;
    DCIteratorBinding iter=dc.findIteratorBinding("DcaRegisterLinesV1Iterator");
    //BindingContext bindingctx = BindingContext.getCurrent();
    //BindingContainer bindings = (BindingContainer)bindingctx.getCurrentBindingsEntry();
    Row row=iter.getCurrentRow();
    String AgreementId=row.getAttribute("AgreementId").toString();
    System.out.println(" AgreementId="+AgreementId);No to the possible problem. Check if the table SelectListener is set. It should have an EL string that ends with ".makeCurrent". This however makes only sense for single row select cases.
    Frank

  • Problem with field-symbol values not updating

    H i ,
          I have following piece of code :
    Assigning Dynamic Table to Field Symbol
        ASSIGN ist_dyn_table->* TO <gs_dyn_table>.
    *   Creating Structure for dynamic table
        CREATE DATA gs_dyn_line LIKE LINE OF <gs_dyn_table>.
    *   Creating line type for the Dynamic Values
        ASSIGN gs_dyn_line->* TO <gs_line>.
    *   Populating values in the dynamic table
        LOOP AT ist_pwcl_main INTO wa_pwcl_main.
          ASSIGN COMPONENT gc_fld_werks OF STRUCTURE <gs_line> TO <gs_field>.
       1   IF sy-subrc EQ 0.
       2        <gs_field> = wa_pwcl_main-werks.
       3      ENDIF.
       5  IF <gs_field> IS ASSIGNED.
       6     <gs_field> = wa_pwcl_main-vbeln.
          ENDIF.
      7 IF <gs_field> IS ASSIGNED.
      8  <gs_field> =  wa_pwcl_main-posnr.
          ENDIF.
       IF <gs_field> IS ASSIGNED.
            <gs_field> = wa_pwcl_main-quant.
          ENDIF.
    on debugging  at line 2 <gs_filed> contains the value of werks .
    but at line 6 <gs_field> contains value of vbeln as 0 and at 8 of posnr as 0 .
    What can be the problem ? Other values are getting assigned properly .
    Plz help ...
    Regards .

    Hi,
    Assigning Dynamic Table to Field Symbol
        ASSIGN ist_dyn_table->* TO <gs_dyn_table>.
      Creating Structure for dynamic table
        CREATE DATA gs_dyn_line LIKE LINE OF <gs_dyn_table>.
      Creating line type for the Dynamic Values
        ASSIGN gs_dyn_line->* TO <gs_line>.
      Populating values in the dynamic table
        LOOP AT ist_pwcl_main INTO wa_pwcl_main.
          ASSIGN COMPONENT gc_fld_werks OF STRUCTURE <gs_line> TO <gs_field>.
       1   IF sy-subrc EQ 0.
       2        <gs_field> = wa_pwcl_main-werks.
       3      ENDIF.
       5  IF <gs_field> IS ASSIGNED.
       6     <gs_field> = wa_pwcl_main-vbeln.
          ENDIF.
      7 IF <gs_field> IS ASSIGNED.
      8  <gs_field> =  wa_pwcl_main-posnr.
          ENDIF.
       IF <gs_field> IS ASSIGNED.
            <gs_field> = wa_pwcl_main-quant.
          ENDIF.
    Based on your coding above, <gs_field> has been assigned with data type 'WERKS' (i'd assume component gc_fld_werks found from structure <gs_line> is a plant typed), which is a CHAR(4) data type.
    Meaning, if <gs_field> is assigned with Plant type value, e.g. <gs_field> = '1000', field symbol <gs_field> will contain 4 character only.
    At line 6, if wa_pwcl_main-vbeln = '0000201000', <gs_field> is only capturing '0000' only. This is also happened to line 8.
    However, it looks like that <gs_field> is getting over-write if ASSIGNED statement returns SY-SUBRC = 0.
    Hope this helps.
    Regards,
    Patrick

  • Asset Transfer - problems with incorrect depreciation values/period

    Hi,
    I'm trying to do an asset transfer between two company codes with transaction ABT1N using the gross method.
    My problem is that when the asset is transferred the number of depreciation periods restart in the receiving company but with the net value from the sending company.
    Example:
    Company 1100:
    Asset 1:
    Aquired: january 2005
    Value: 10 000 $
    Depreciation time: 5 year x 12 months = 60 periods
    Transfer to company 1200 on july 2007...
    Depreciation in 1100 so far = 5 000 $
    Net value to be transferred to CoCode 1200: 5 000 $
    Here comes the problem, when I look at the depreciation time in company 1200 after the transfer, I see that the system now wants to depreciate the net value of 5 000 $ on another 60 periods period. This means that the asset will have a lifetime of 7,5 years in total instead of 5 years.
    What I want to do is that after the transfer the depreciation should only by the the number of periods that is left from the original depreciation start in company 1100. This means that after the transfer there should only be 30 depreciation periods left in company 1200 on the transferred asset.
    Thanks for response! I will add a lot of points to thoose that provides me with solution solving info.
    Best regards
    Carl-Johan

    Carl,
    This is where you can influence the fileds to be transfered in the transfer variant [1-Gross in your case].
    Asset Accounting>Transactions>Intercompany Asset Transfers>Automatic Intercompany Asset Transfers>Define Transfer Variants-->Specify Transfer of Fields (for New Asset in Target CoCd)
    Select the variant 1-Gross method and then click on the Depreciation area on the left bar. The system will display the all the Depreciation area for the Chart of Depr in question. Here for each depreciation area you can dictate what values from the old asset need to be trf to the new asset.
    In your case, the system is not transfering the remaining useful life. Precisely you need to transfer the field group 19-Expired useful life and 20-Expired life in periods.
    That should do the needful for you.
    Have a nice day.
    Vishal Thakur.

  • Problem with cheking a # value in IF statement

    Hi ,
            I have to check value of
    val_tab  = node->get_value( ).
         do .
    end do .
    if my val_tab contains '#' or '##' a DO statement below it shoul not get executed . i tried IF with string operations but
    its not working . it does not check it for '#' value .  Plz help how can i check it .

    I told you this is because this # mark only appreas to be so, if you write
    data: my_char type string value '#'.
    if my_char = value_tab(1).
    endif.
    and debug the code you would see that it my-char has different hex representation than your val_tab(1) .
    It is happening if SAP can't encode this char correctly (as this is one of special character) and presents you with the replacement, which is #. Nevetherless the real value behind it is not what we can see on the screen, it is determined by its hex(binary) representation.
    Use my above code replacing
    do 31 times.
      xstr = x = sy-index. "convert to hex value and then to xstring
      CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
        EXPORTING
         in_xstring          = xstr
       IMPORTING
         OUT_STRING          = out_str.  "here you have string representation of # with correct hex value behind it
    if out_str = val_tab(1) . "now only compare these two characters
       "....here # was found it means it is one of a special character
    endif.
    enddo.
    Regards
    Marcin

  • Problem with Selection screen values of an authorization variable

    hi Gurus,
    I have an authorization variable for Division in my queries....Now whenever a user tries to run the query...a list of divisions is available to him....All divisions for which he/she has proper roles assigned.
    Now the problem is that these values are not restricted to the ones relevant to that query (namely the multi provider)
    Eg. for a Flowers Query (divisions relevant to Flowers only) all the divisions (including the ones for Vegetables, Crops etc.) are also visible only because these roles are also assigned to the same user. This needs to be avoided.
    In a nutshell....
    Is their any way by which i can restrict the number of values popping up for an authorization variable in the selection screen, to only those values which are relevant to the info-provider on which the queries are based ???

    hi Deepu,
    I did go through that SAP note. I just have one concern regarding that. The check at the Info provider level is clear enough and i already have that in place. Now there are 2 more checks required a) at the info object level and b) at the BEX designer level.
    Are all three checks required???
    and also how do you  place the check at the BEX level??? i could not quite figure that one out...
    Any inputs would be welcome.
    Thanks,
    Nikhil

  • Problem with Context - calculated Value

    I have a problem with my WebDynPro-Project.
    The Errors which is shown by the NWDS:
    "Web Dynpro Generation: Metadata constraint of Component KeyMappingComponent is violated: CalculatedAttributeProvider "//WebDynpro/Controller:de.vwfsag.keymapping.ui.KeyMappingComponent/CalculatedAttributeProvider:BusinessAttributeDataSprache", Role "Attribute": A minimum of 1 object(s) is required"
    What I've done:
    - changed valueproperties calculated from "true" to "false" and back.
    The problem is that the set und get methods remained after resetting the calculateproperty to "false".
    I've tried several time to switch the property but now I got more remained set and get methods (..._1, ..._2, ...), which I can't delete in the NWDS.
    What I also tried was to change the .wdcontroller"-file of my controller-component, but this file is generated so after a rebuild the ".wdcontroller"-file is still corrupted.
    I think the conclusion should be something to delete these methods or change the calculatedproperty in some files you can't access directly from the NWDS.
    I hope anyone could help me out with this?
    Greetz Christian
    Edited by: christian.zuehlsdorf on Dec 14, 2009 6:24 PM

    Tushar Sinha wrote:Tushar Sinha wrote:Hey Sinha,
    thank you fr your answer!
    >
    > Just try deleting the attribute for which you tried setting the calculated property as true and then false, try repairing your project, reload and build again. Hopefully this should get you rid of the getters and setters.
    That was the first thing I already tried. I deleted the whole context und then rebuild and repair and rebuild... But none of that help.
    >
    > Do, not manually try deleting the getters/setters manually for any attribute as it is autogenerated for an attribute.
    These getters/setters only have part of the configuration with no context-attribute-bind, which in fact seems to be the problem for the build-process.

  • Sender FCC , problem with Repeating Field under a Sub-structure

    Hi,
    I have an Input File as
    D,TH_ ,10/31/2008,ABC,pieces
    PF, 10/31/2008,11/2/2008,11/3/2008,11/4/2008
    P,mat,CS,100,120,130,125,150,170,120
    P,mat,CS,100,120,100,110,140,120,110
    I need to Implement an FCC to convert this to
    a Structure like this
      Recorset
        Header           1....1
            Unique Id
            date Time
            CustomerCode
            Code
            Unit
        Dates         1
         date          1....n
        Products       1....n
          product      1
          unit         1
          quantity     1.....n
    This this is a Variable recordset type ( i.e each ROW has a Different Structure) the following keys D,PF,P  are defined, for the header, dates, and Product Information.
    The Following FCC parameters are applied
    Document Name :  MT_FILE_INPUt
    Document NameSpace = http://xyz.com
    Recordset Name = "Recordset"
    Recordset structure = Header,1,Dates,1,Products,*
    keyname              = Key
    Keytype               = String
    Header.FieldSeprator = ,
    Header.FieldName = Unique Id,date Time,CustomerCode,Code,unit
    Header.keyValue = 'H'
    Dates.FieldSeprator = ,
    Dates.Fieldname   = 'date'
    Date.keyValue    = 'PF'
    Products.FieldSeprator = ,
    Product.FieldName =  product,unit,quantity
    Product.KeyValue  = 'P'
    Now the Problem is as Follows:
    1) I have a Repeating Field Quantity under the Product and Date under the Dates Sub-structure,  This is not getting Repeated at all.
    Is there a Way to achieve the same
    2) Another Point is That, i do not want to take the key Value in the XML structure after converion, is there a way to avoid it
    Please let me know if any blogs are available
    Any help would be appreciated.
    Thanks,
    Best Regards
    Abhishek

    can u try.. i haven't tired this.
    quantity is occuring multiple times, but if that is fixed no# of occurance,, you can can try with this?
    P,mat,CS,100,120,130,125,150,170,120
    Product.FieldName = product,unit,quantity,quantity,quantity,quantity,quantity,quantity
    let me try ..
    As long as the quanitfy defined under Product.FieldName are more than the input msg quantity values (100,120..), you will be safe...
    Edited by: Anand on Oct 31, 2008 3:54 PM

  • FCC: Problems with content conversion

    Dear all,
    I have a receiver FTP adapter with content conversion. In RWB I'm facing following error message:
    Adapter Framework caught exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'java.lang.Exception: Consistency error: more fields found in XML structure than specified in conversion parameters! (Value 'FCOTUPI')', probably configuration error in file adapter (XML parser error)'
    The field with value FCOTUPI could be found in POS recordset. I double check the length of columns but couldn't find
    an error.
    CC configuration:
    Recordset structure: HEADER,POS,SUBPOS
    HEADER.fieldFixedLengths = 8,4,8
    POS.fieldFixedLengths = 8,20,15,3
    SUBPOS.fieldFixedLengths = 5,5
    HEADER.fixedLengthTooShortHandling = Cut
    POS.fixedLengthTooShortHandling = Cut
    SUBPOS.fixedLengthTooShortHandling = Cut
    As you can see by the names, I am using as XML to convert a structure with subnodes. In documentation it said
    that it is not allowed, but in some threads I found the information that structure could be processed.
    Any ideas how to solve this problem?
    Thanks
    Chris

    Dear Amit,
    thanks for your answer. I already checked this blog, but hoped for other solutions.
    My problem: I tried to map my hierarchical structure to a flat structure.
    Source
    Struc1 (0..unbounded)
    -Item1.1
    -Struc2 (0..unbounded)
    --Item 2.1
    --Struc3 (0..unbounded)
    ---Item3.1
    Target:
    Struc1 (0..unbounded)
    -Item1.1
    Struc2 (0..unbounded)
    -Item 2.1
    Struc3 (0..unbounded)
    -Item3.1
    But if e.g. the Struc2 appears two time it will be created two time in target structure before
    the Struc3 is created. But ths Struc3 belongs to Struc2 and should be created in flat file under
    Struc2 directly.
    How can we created a flat structure like this
    Struc1
    Struc2
    Struc3
    Struc3
    Struc2
    Struc3
    Thanks
    Chris

  • Mapping problem with Multiple destination values

    Hi,
    I recently started to work on SAP MDM as a beginner. I am posting this message to get some help to solve the problems that I encountered as I run the SAP.
    For example, we can sub-categorize a 'Product' as Food>ProcessedFood>Frozen Food>Pizzas'. However, notice that there exist the sameNode name under the 'Commodity' as following two categories show.
    Product>Food>Processed Food>Frozen Food>Pizzas
    Commodity>Food>Processed Food>Frozen Food>Pizzas
    The Node name, 'Pizzas', under two different categories has fewattributes such as A, B, C, and D. When I tried mapping these attributes at Map Field/Values Tab under the import manager, I ended up getting warning messages due to the overlapping.
    The message says "One or more of the source values were mapped to multiplz destination values. Some of the mapped destination values may need to be unmapped before performing the import."
    Does anyone have an idea to solve this overlapping problem?
    I will really appreciate your answer.
    Edited by: coolpsy on Jun 8, 2010 4:27 AM
    Edited by: coolpsy on Jun 8, 2010 7:55 AM

    Hi,
    As per my understanding, there are two categories as shown by you
    Product>Food>Processed Food>Frozen Food>Pizzas
    Commodity>Food>Processed Food>Frozen Food>Pizzas
    and you want to link Attributes with specific correct Category say Product not with Commodity. So in order to avoid overlapping, try using option Split Hierarchy. For more details Please refer below Article: refer page 11-15/20
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/308c62a2-5faa-2a10-fda6-fa4aa7169734?quicklink=index&overridelayout=true
    Also refer, http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/6090d0bd-1da7-2a10-468f-bdd17badb396?quicklink=index&overridelayout=true
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/8090941f-a5a7-2a10-3ba6-b4af5ec6d97b?quicklink=index&overridelayout=true
    Just check and revert with Result if it helps..
    Regards,
    Mandeep Saini

  • SQL dynamic query returning (problem with list of value)

    Hi, I'm having trouble with my query. I want to make where statement based on my selectlist, but the problem is that I couldnt write the correct string in my where condition.
    :P61_STATUS has this following display, return value
    Bewerber     Bewerber     
    PRA_Kandidat     PRA_Kandidat          
    abgelehnt     abgelehnt          
    angenommen     angenommen          
    Thema     Thema     
    angemeldet     angemeldet          
    abgegeben     abgegeben          
    abgeschlossen     abgeschlossen          
    bestätigt     bestätigt
    DECLARE
      q varchar2(4000);
      list_betreuer htmldb_application_global.vc_arr2;
      list_semester htmldb_application_global.vc_arr2;
      list_status htmldb_application_global.vc_arr2;
    BEGIN
    -- variable to store the list
    list_betreuer := HTMLDB_UTIL.STRING_TO_TABLE(:P61_BETREUER);
    list_semester := HTMLDB_UTIL.STRING_TO_TABLE(:P61_SEMESTER);
    list_status := HTMLDB_UTIL.STRING_TO_TABLE(:P61_STATUS);
    -- Query begins
    q:= 'select p1.name, p1.vorname , a1.tel, a2.tel, ';
    q:= q||'ab.thema, ab.status, ab.typ, s.bezeichnung, p2.name ';
    q:= q||'from person p1, person p2, adresse a1, adresse a2, ';
    q:= q||'zuordnungp_a zpa1,zuordnungp_a zpa2, ';
    q:= q||'abschlussarbeit ab, semester s ';
    q:= q||'WHERE ab.SEMESTER = s.OBJECTID (+) ';
    q:= q||'AND ab.STUDENT = p1.OBJECTID (+) ';
    q:= q||'AND ab.BETREUER = p2.OBJECTID (+) ';
    q:= q||'and p1.objectid = zpa1.person (+) ';
    q:= q||'and zpa1.adresse  = a1.objectid (+) ';
    q:= q||'and zpa1.art (+)= ''Privat'' ';
    q:= q||'and p1.objectid = zpa2.person (+) ';
    q:= q||'and zpa2.adresse  = a2.objectid (+) ';
    q:= q||'and zpa2.art (+)= ''Geschäft'' ';
    -- Loop for betreuer list
    FOR i in 1..list_betreuer.count
    LOOP
        IF i = 1 THEN
        q:= q||'AND (ab.betreuer = '||list_betreuer(i);
        ELSE
        q:= q||' OR ab.betreuer  = '||list_betreuer(i);
        END IF;
    END LOOP; if (list_betreuer.count>0)THEN q:= q||')'; END IF;
      -- Loop for semester list
    FOR i in 1..list_semester.count
    LOOP
        IF i = 1 THEN
        q:= q||'AND (ab.semester = '||list_semester(i);
        ELSE
        q:= q||'OR ab.semester = '||list_semester(i);
        END IF;
    END LOOP; if (list_semester.count>0)THEN q:= q||')'; END IF;
    -- Loop for status list
    FOR i in 1..list_status.count
    LOOP
        IF i = 1 THEN
        q:= q||'AND (ab.status = '||list_status(i)||'';
        ELSE
        q:= q||'OR ab.status = '||list_status(i)||'';
        END IF;
    END LOOP; if (list_status.count>0)THEN q:= q||')'; END IF;
      htp.p(q);
    return q;
    END;result
    select p1.name, p1.vorname , a1.tel, a2.tel, ab.thema, ab.status, ab.typ, s.bezeichnung, p2.name from person p1, person p2, adresse a1, adresse a2, zuordnungp_a zpa1,zuordnungp_a zpa2, abschlussarbeit ab, semester s WHERE ab.SEMESTER = s.OBJECTID (+) AND ab.STUDENT = p1.OBJECTID (+) AND ab.BETREUER = p2.OBJECTID (+) and p1.objectid = zpa1.person (+) and zpa1.adresse = a1.objectid (+) and zpa1.art (+)= 'Privat' and p1.objectid = zpa2.person (+) and zpa2.adresse = a2.objectid (+) and zpa2.art (+)= 'Geschäft' AND (ab.status = abgegeben) the problem is in this statement
    q:= q||'AND (ab.status = '||list_status(i)||'';that statement produce this following statement
    ab.status = abgegebenbut what I need is this statement
    ab.status = 'abgegeben';how can I achieve this statement?
    thank you very much

    raitodn wrote:
    ah ok , I was confused with this q:= q||'AND (ab.status = '''||list_status(i)||'''';I think I get it now
    basically stop the string and write double quotes before the variable
    'AND (ab.status = ' + ''||list_status(i)||'' + ''No, more like "wherever I want a single quote within a string, I put two single quotes instead and that tells oracle it's a quote and not the end of the string".
    q:= q||'AND (ab.status = '''||list_status(i)||'''';
           ^                 ^^^                  ^^^^
           |                 |/|                  ||/|
           |                 | |                  || \-- single quote indicates end of string
           |                 | |                  ||
           |                 | |                  |\-- two quotes indicate a single quote required
           |                 | |                  |
           |                 | |                  \-- single quote to open a new string
           |                 | |
           |                 | \-- single quote indicates end of string
           |                 |
           |                 \-- two quotes indicate single quote required
           \-- Open String

  • Problem with the return value from a tablemodel after filtering

    I have a form (consult that return a value) with a jtextfield and a jtable. when the user types in the textfield, the textfield call a method to filter the tablemodel.
    everything works fine, but after filtering the model, the references are lost and the return value does not match with the selected row.
    I read that convertColumnIndexToView, convertRowIndexToView, vertColumnIndexToModel and convertRowIndexToModel, solve the problem, but I used all and nothing.
    **** This is the code to fill the jtable
    DefaultTableModel modelo=(DefaultTableModel)this.jTable1.getModel();
    while(rs.next()){
    Object[] fila= new Object[2];
    fila[0]=rs.getObject("id_categoria");
    fila[1]=rs.getObject("nombre");
    modelo.addRow(fila);
    this.jTable1.getColumnModel().removeColumn(this.jTable1.getColumnModel().getColumn(0));
    // I delete the first column because is a ID, I dont want that the user see it. the value is only for me**** this is the method to filter from the jtextfield
    private void FiltrarJtable1() {
    TableRowSorter sorter = new TableRowSorter(this.jTable1.getModel());
    sorter.setRowFilter(RowFilter.regexFilter("^"+this.jTextField1.getText().toUpperCase(), 1));
    this.jTable1.setRowSorter(sorter);
    this.jTable1.convertRowIndexToModel(0);
    }*** this is the method that return the ID (id_categoria) from the tablemodel
    private void SeleccionarRegistro(){
    if(this.jTable1.getSelectedRow()>-1){
    String str_id =this.jTable1.getModel().getValueAt(this.jTable1.getSelectedRow(),0).toString();
    int_idtoreturn=Integer.parseInt(str_id);
    this.dispose();
    }else{
    JOptionPane.showMessageDialog(this,"there are no records selected","Warning!",1);
    }Who I can solve this problem?

    m_ilio wrote:
    I have a form (consult that return a value) with a jtextfield and a jtable. when the user types in the textfield, the textfield call a method to filter the tablemodel.
    everything works fine, but after filtering the model, the references are lost and the return value does not match with the selected row.
    I read that convertColumnIndexToView, convertRowIndexToView, vertColumnIndexToModel and convertRowIndexToModel, solve the problem, but I used all and nothing.
    You're right in that you have to use convertRowIndexToModel(), but you are using it wrong. That method takes as input the index of a row in the view, i.e. the table, and returns the corresponding row in the underlying TableModel. No data is changed by the call, so this:
    this.jTable1.convertRowIndexToModel(0);is meaningless by itself.
    What you need to do is the following:
    int selectedRow = this.jTable1.getSelectedRow(); // This is the selected row in the view
    if (selectedRow >= 0) {
        int modelRow = this.jTable1.convertRowIndexToModel(selectedRow); // This is the corresponding row in the model
        String str_id =this.jTable1.getModel().getValueAt(modelRow, 0).toString();
    }Hope this helps.

Maybe you are looking for