Search on a non-based item

Hi everyone,
I am modifying a form and have a concern,
is it possible for the user to do a search if he is in a non-based item?
I don't want to base this item but if needed, i would base it as user need to do a search from this item.
Thanks and any help would be appreciated.

you can use a based table item then forms use it in the query if the user populate this item
but you can use this item as non-based table and the user populate and you can use to create the query, in the pre-query or changed the where clause conditin property in the block
the usual is the field based on table is very easy, but if you need depending the value populate for the user do other things and not use the value exactly, you can use non based item

Similar Messages

  • Make queriable a non based item

    hello all.
    what's the best way to make queriable (f7/f8 functionality) a non based item?
    i've tried dynamic sql but it's not admited in forms, and I don't think exec_sql it's the best way.
    any ideas?
    thanks in advance.

    im doing this:
    PROCEDURE SET_WHERE_FOR_DUENO(dueno in varchar2) IS
    sql_stmt varchar2(1000);
    connection_id EXEC_SQL.CONNTYPE;
    cursorID EXEC_SQL.CURSTYPE;
    nIgn PLS_INTEGER;
    cod_dueno number;
    BEGIN
         sql_stmt:='select codigo_dueno_contenido from sia_duenos_contenido where descripcion';
    if instr(dueno,'%')>0 then
         sql_stmt:=sql_stmt||' like :dueno';
         connection_id := EXEC_SQL.OPEN_CONNECTION('inter','cordoba','interd');
         --Connection_id := EXEC_SQL.OPEN_CONNECTION('inter/cordoba@interd');
         cursorID := EXEC_SQL.OPEN_CURSOR(connection_id);
         EXEC_SQL.PARSE(connection_id, cursorID, sql_stmt, exec_sql.V7);
         EXEC_SQL.BIND_VARIABLE(connection_id, cursorID, ':dueno', dueno);
         EXEC_SQL.DEFINE_COLUMN(connection_id, cursorID, 1, cod_dueno, 30);
         nIgn := EXEC_SQL.EXECUTE(connection_id, cursorID);
         WHILE (EXEC_SQL.FETCH_ROWS(connection_id, cursorID) > 0 ) LOOP
              EXEC_SQL.COLUMN_VALUE(connection_id, cursorID, 1, cod_dueno );
         message(cod_dueno);pause;
         END LOOP;
         exec_SQL.CLOSE_CURSOR (cursorID);
    else
         sql_stmt:=sql_stmt||' = '||dueno;
    end if;
    EXCEPTION
         WHEN OTHERS THEN
         MESSAGE(SQLERRM||' '||ERROR_TEXT);PAUSE;
    END;
    and it's giving me the 306500 at the parse command.
    i've tried both the connection_id options.

  • FRM-40209 Field must be of form . - for a non-based text item

    Hello,
    When I try querying using a VARCHAR2 non-based text item in a table-based block, setting dynamically in PRE-QUERY trigger the DEFAULT_WHERE property for its block, in case I use characters > or < (for bringing values greater or smaller than the one in the field, as in a standard Oracle query) error message is raised: 'FRM-40209 Field must be of form .' The issue has nothing to do with the error itself (usually related to erronated format mask of the field), and it is known as an Oracle Forms bug: I found it as bug 851153 - which appears on execute query if you enter in a non-base-table-item and the block has a pre-query trigger. The bug has been solved later in Oracle Developer Forms Builder 6i, or so I've been reading, problem is the application I'm working to requires Forms Builder 6.0.5.
    I am trying to find an workaround for this situation and these are the info I managed to discover myself on the topic:
    - if I fill the field with '>value instead of >value, query works fine, bringing only values greater than the specified value. (So far, this and inactivating the FRM-40209 error in ON-ERROR trigger seems like the best I can do)
    - if I only use > (without '), I cannot use an auxiliar variable/global in which to store the actual value written in the field, I also cannot print the value in a message, because trying to use the exact string, it is shown as null (even though when the error is raised, value is still shown on the screen in the text item).
    Maybe someone could help with an idea for an workaround in order to copy the content of the text field before it actually becomes null…
    Thank you in advance.

    I have already tried that... but for some reasons the field already appears as null, when I try to use it.

  • 'Strange' naming restrictions none databound items in search

    I have a none databound item, which I want to use for an advanced search
    I want this to map to a variable in the ViewObject. I provided the query bind parameters for this in the JHS group under bindparameters.
    The attribute on the ViewObject is called ‘weekNummer’.
    Now what I did was create a group in JHS which is called ‘Weekoverzicht’
    I added a new item on the JHS group (WeekNr), since the attribute is not databound I don’t fill the attribute name. The attribute is a choice populated by a domain.
    Now when I first tried this page it failed, claiming the attrribute ‘WeekoverzichtWeekNr’ Does not exist.
    Which is true ofcourse, I was looking for a way to point the none databound item to the attribute weekNummer. I could not find this option, so I decided to run it and see what happend.
    What I did next is rename the attribute on the ViewObject to ‘WeekoverzichtWeekNr’ and reflect this in the query and bind parameters.
    Now it works fine but the naming convention is a bit weird, It has to be named <groupname><itemname> which is a form of tight coupling I’m not really happy with.
    Basically an option to ‘bind’ none databound items to an attribute directly would be very nice.
    Was this intended or do I just fail at using JHS?
    Anton

    The generated jspx is the following:
    Note that I added the binding post gen for supplying a dynamic default search value which I mentioned in another thread on this forum.
    <af:selectOneChoice id="SearchWeekoverzichtNummer" value="#{searchWeekoverzicht.criteria.WeekoverzichtNummer}" binding="#{WeekoverzichtBacking.currentWeekYear}">
    <af:forEach var="row2"  items="#{bindings.WeekData.rangeSet}" >
      <af:selectItem id="SiAsWeekoverzichtNummer" label="#{row2.Weekstring}" value="#{row2.Weeknummer}"/>
    </af:forEach>
    </af:selectOneChoice>  The corresponding generated bean code is the following.
    <managed-bean>
      <managed-bean-name>searchWeekoverzicht</managed-bean-name>
      <managed-bean-class>oracle.jheadstart.controller.jsf.bean.JhsSearchBean</managed-bean-class>
      <managed-bean-scope>session</managed-bean-scope>
      <managed-property>
        <property-name>bindings</property-name>
        <value>#{data.WeekoverzichtPageDef}</value>
      </managed-property>
      <managed-property>
        <property-name>searchBinding</property-name>
        <value>#{data.WeekoverzichtPageDef.advancedSearchWeekoverzicht}</value>
      </managed-property>
      <managed-property>
        <property-name>searchItem</property-name>
        <value>WeekoverzichtNummer</value>
      </managed-property>
      <managed-property>
        <property-name>dataCollection</property-name>
        <value>CasWeekOverzicht</value>
      </managed-property>
      <managed-property>
        <property-name>autoquery</property-name>
        <value>false</value>
      </managed-property>
        <managed-property>
        <property-name>findModeIters</property-name>
          <list-entries>
            <value>#{data.WeekoverzichtPageDef.WeekoverzichtIterator}</value>
                </list-entries>
      </managed-property>
          <managed-property>
        <property-name>operators</property-name>
          <map-entries>
         </map-entries>
        </managed-property>
    </managed-bean>Where the searchItem tag holds the value which I need to name my bind variable on the view object.
    I think I called it attribute on the ViewObject earlier which is wrong ofcourse, its bind variable.
    I know where to find them, but I always forget the names...
    I can live with it, although its not 'pretty'

  • Searching in non-database items

    Hi,
    I have a block of which the source is a table.
    There are some non-database item in the block.
    Actually these fields are from another table.
    In the post-query, I populate the non-database items with the table.
    My question is : normally I can use 'Enter Query' to seach the records in
    the database column. How can I perform seaching with non-database items ?
    Thanks
    Ivan

    In a pre-query trigger alter the where clause of the main block to query the main table based on non-database values...
    Use the set_block_property procedure and the 'DEFAULT_WHERE' clause or the 'ONETIME_WHERE' property...
    example...
    set_block_property('MYBLOCK', ONETIME_WHERE,
    'where main_table.id in (
    select id from my_non_db_block_table where mycol = :my_non_db_field)');
    To accept wild cards you will probably have to change the = to a "like" above..
    You will have to build your where clause by adding a "and" condition for each non-db field.
    Message was edited by:
    Mark Reichman

  • Need - Search page with LOV based flexfield item as search criteria

    Our requirement is to make a flexfield item as search criteria.
    Flexfield is having 2 segments Applicaiton and Responsibility, where 2nd segment *(Responsibility) is dependent on 1st (Application).*
    Accordingly, an LOV must get displayed for each flex segment in the search panel.
    We tried to create a page having this flex (DFF) item as a search criteria, but cannot proceed to get results in results region - we tried to use both properties in the query region - resultsbasedSearch and autocustomizationCriteria:
    Any ideas how to make a search functionality having LOV based flexfield items in the search criteria?
    Any other suggestions regarding the solution are welcome.
    Thank you very much.
    Regards,
    May B.

    Hi,
    try a SQL query that uses bind variables as follows
    ... where column1 like '%:col1param%' and '%:column2%' like :col2param
    Then in the implementation (session facade) check for null values and add '%' in case a value is null.
    The query in EJB is defined in the entity
    Frank

  • Formatted Search - Calculate GP Base Price for Non Inventory Items

    Hi Experts,
    On one of our customer's 8.8 PL 15 installation, requirement was to calculate GP for Non Inventory Items (on SO screen). Since SAP does not automatically calculates it we proposed and implemented following solution.
    1. Have all Non Inventory Items to be costed at Standard cost so that you can manually enter the cost in the Item Master.
    2. Write following formatted search on GP Base Price field so as to calculate the GP Base Price for the Non Inventory Items only. The formatted search must not make any changes to Inventory Items as we want system to calculate the GP automatically (just in case cost changes from SO to Delivery or Invoice).
    DECLARE @II AS nVarchar(1)
    DECLARE @COST AS Numeric(19,2)
    SET @II = (SELECT OITM.InvntItem FROM OITM WHERE OITM.ItemCode = $[RDR1.ItemCode])
    SET @COST = (SELECT     (OITW.AVGPrice * $[RDR1.NumPerMsr]) FROM     OITW WHERE     OITW.ItemCode = $[RDR1.ItemCode] AND
         OITW.WhsCode = $[RDR1.WhsCode])
    IF (@II = 'N')
    BEGIN
    SELECT @COST
    END
    3. Formatted search achieves what was originally required however if a user overwrites the Item Code (Inventory Item) in the SO then above formatted search clears the GP Base Price field and sets the GP basis for the item as "Manual". By obverwrite means user first selected item A0001 on line 1 and then entered A0002 on same line i.e. Line 1.
    My question here is what is wrong in the formatted search that is resulting in this behaviour.
    Any questions please let me know.
    Thanks in advance.
    Regards
    Devinder

    Hi Gordon,
    Thanks for taking out time to help me however Key requirement here is
    Write formatted search on GP Base Price field so as to calculate the GP Base Price for the Non Inventory Items only.
    Your query sets the base price for GP Base Price for Inventory Item to ZERO and Base Price By to Manual.
    Note that my Formatted search has a problem only when an Inventory Item line is overwritten. I am not sure if this is a problem with SAP itself rather than my query.
    Any other ideas please?
    Regards
    Devinder

  • Problem with parameters and non table based items

    Hi,
    I have a situation where I have some not table based items on a page (shuttles and select lists). It is parameters that the end user inputs. I have another page with the same items just here they are Display Only and also not table based. When the user press a button I branch from page 1 to page 2 and set the items on page 2. My problem is that the input the user keys in are not copied to the items on page 2. I can see the data in the session state.
    I assume that this is a silly question and I have just set Source Used or Source Type wrong one one of the items but I can not get it working. Can anybody help?
    It works fine if I use a Application Item and creates a process on page 1 where I copy the item value from the session state but that should be needed right?
    Regards Pete

    Thanks Scott,
    I think I got it working. If I remove all the colons from the data it works. I select several entries in a Shuttle and the result is a colon delimited string of values. If I remove these in a process it works fine. Is there a way of escaping the output from a Shuttle?
    Regards Pete

  • Need negative quantity non-inventory items on Credit Memo

    Version: (2007A)
    Description of requirements: (Please provide a detailed description)
    Our customer issues many invoices with a negative quantity line item for a miscellaneous non-inventory item. These non-inventory items are used to reduce the amount of the invoice regarding miscellaneous credits to their customers.  These are not discounts.
    When the customer wants to credit these invoices, they canu2019t create a Credit Memo based on the invoice because SAP wonu2019t allow this if there are line items with negative amounts.
    When they create a credit memo not based on an invoice, they arenu2019t allowed to enter a negative quantity for a line item as they are for an Invoice. They are forced to create a credit memo not based on an invoice the inventory item line items and an invoice or Journal Entry for the negative quantity line item to debit back the miscellaneous line amount.
    As an example:
    Invoice line item one for inventory item: qty one, price 100,line total $100.00
    Invoice line item two non-inventory item misc credit: quanity -1, price 10, total -$10.00
    Invoice Total $90.00
    In Order to provide the correct credit amount, they have to create a Credit Memo not based on an invoice for line item one, qty one, price 100 u2013 value -100 and an invoice for the non-inventory item for qty one, price 10 -  value 10.00.
    This creates a net credit for the customer of 90.00
    This looks ridiculous to their customers when they see these transactions on their statements, creates extra work for the users and there is no link between the three documents.
    By using inventory items for these miscellaneous credits, they can assign a sales revenue of their choice. They have multiple sales accounts and the GL posting is determined by the item group for the item. By assigning the desired item group to these non-inventory items, they can control which sales account is updated on their marketing documents when using these non-inventory items.
    If they were to use the Freight items, they would need a separate freight setup entry for combination of item group and miscellaneous credit. Because they have so many Item Groups and types of credits, they would need a great many separate Freight Charges to choose from.
    All of the above pertains to all of our customers. This customer has a custom add-on and their marketing documents are all created from custom objects.  They hit a button on the custom sales contract screen and an invoice is created.  When they hit another button on the screen, the selected invoice is credited. They have legally binding contracts for fixed quantities to be shipped, so we decrease the quantity shipped when creating an invoice and decrease the quantity shipped when a credit memo is created. The contract is fulfilled when the exact quantity contracted for has been shipped. Because the credit memo fails, we canu2019t update the custom objectu2019s remaining to be shipped, rendering it inaccurate from that time forward. (reducing the quantity shipped is part of the Credit Memo creation process).Creating Credit Memos and Invoices from the interface fixes the inventory count, customer balance, etc., but we have no way of fixing the sales contractu2019s quantity shipped & remaining to be shipped or linking the contracts to the documents created from the interface.
    Business needs: (Please describe the impact on your business, if the functionality is not realized)
    Examples: (Please describe a typical example, how the functionality should work.)
    Credit Memos should allow negative quantities and line total amounts for non-inventory items, the same way that A/R Invoices do, so that credit memos can be based on invoices that have negative quantity non-inventory line items.
    Current Workaround: (Please describe the workarounds you are using at the moment)
    Please see above
    Proposed solution: (Please suggest how the new functionality should work)
    Credit Memos should allow negative quantities and line total amounts for non-inventory items, the same way that A/R Invoices do.

    Hi Sean......
    System is behaving properly as per its logic. Infact it does same in all the previous or upcoming versions.
    If you have Item Type GRPO for Non Inventory Item it does not create any accounting but you can see the same during AP invoice.
    GRPO for such type is only optional. For further clarification you can discuss this with your CA what he suggests. But i suggest you to raise AP invoice also for getting Account effect. Just see doing this in test DB you get your answer......
    Regards,
    Rahul

  • Non-stockable items - Error of G/L Account - ( Error No - ME45 )

    Hi MM Experts,
    While creating PO for Non-stockable items I am getting one error which says that - " You can not enter G/L account directly for the controllling area/ Co. Code".
    Can u pls. help on this issue..
    Thanks & Regards,
    Mahesh

    Dear Karthik,
    There was an logic in the idoc processing for the text segment of the idoc.
    If some text/number avaialble in this segment (text) then system will check for the first 4 characters as chart of accounts and next 3 characters as transaction and look for the GL account in the T030 table of the OBYC.
    In my case there was a space (more than 4+3=7) and system was taking 4 spaces as COA and 3 spaces as transaction key and looking for the GL account in T030 table. And unfortunately there was an blank entry in T030 table and due to this system unable to find the GL account for this combination (Spaces).
    To resolve this issue go to SE16 and give table name EDID4 and give the segment name (segment of text field) and idoc number and search. You will get all the text related segments and try to find the segment having Space before the text/numeric filled in that segment.
    There after edit the IDOC and remove the space from the text field of the segment and try to re-process the IDOC from BD87 transaction code.
    Regards,
    Syed Abdul Mazid

  • How to include non database item in the query

    Hi
    I have a Master-Detail form. where in the detail block one of the field is text item 'X' attached the list of values(Y). Master block includes non database items which is based in the decoding result of the database items for example:
    Gender(Male, Female)>> non database item
    Gender_id(M,F)>>database item
    the form is created based on the template.fmb form for apps. When I run the form in the query mode, i can query about any database item while including query about others non database item does not affect.
    how to can i modify it so this could be handled??
    I know that one way to avoid this issue is to create a view with all my desired field.
    but there should be away to override the build in query used by oracle apps...
    any one has a link, source, document... etc that help on this??
    any idea how to do it without creating a view??
    thnx alot

    Hi HST,
    You can code the handling in POST-Query of the corresponding block to retrive the corresponding data depending on the Queried data.
    Regards,
    Kiran

  • How to link Sales Order and WIP job for non-ATO items

    Hello All,
    My client's requirement is to link an Sales Order with a WIP Job as soon as it is booked.
    It is for FG and for a non-ATO item.
    The process should be to have SO booked and then it should raise a WIP job based on it if there ar no inventory stocks.
    Thanks in advance.

    You will have to write an extensive customization that will work similar to planning engine.
    It will have to look at order quantity and then look at onhand, reserved onhand, min-max quantities, safety stocks, move orders etc etc and then create a job if necessary.
    Are you sure you want to do it this way?
    Hope this helps
    Sandeep Gandhi
    Omkar Technologies Inc.
    Independent Techno-functional Consultant
    513-325-9026

  • Problem in  BOM or component allocation for the Non- codified Item in a PO.

    Hi All,
    Please advise how to explode a BOM or Assign component in a Purchase order with Item category (L) for a Operation oriented material for which no material code is created from a production order .
    Actually in my scenario, no raw material component will send to the Sub -Contract Vendor. Only Assembled operation material lets say operation 20 from a routing ( which is not having material code ) from an In - house production from a shopfloor has to be sent to the vendor to create a operation 30 material , which is also not having a material code." How to explode a BOM or component allocation for the Non- codified Item in a PO".
    Kindly give me the IMG settings for the above scenario.
    regards,
    YK

    Hi Prasobh,
    Tnx for your suggestion. But, the client external processing routing is not constant activity . Based on the Operation bottlenecks client is sending the operation as external Processing. For Eg., If on first order operation 20 be external , Then in second order operation 20 need not be external. operation 30 may go out for external processing. Client does not want a material code for each operation.
    Give your valuable suggestion.
    regards,
    YK

  • Clearing Non Open Item Managed documents

    Hello,
    we have an existing G/L account where it was previously set to non open item managed. after some time, they have switched it to OI managed. since the balance of this account is 0, they were able to switch it successfully.
    problem is, during FBL3n, these documents (that were posted when the account is still non open item managed) is listed in the open items. can this items be "cleared"?
    thanks
    Moderator: Search SDN and certainly don't post threads, which were locked before, under different names. This is violation of SDN rules

    HI,
    When u have created the GL and if you have not activate or deactivate the OPEN ITEM mmanagement.
    You have to use the follow  SAP std progrom. ther are four std program SAP has provide for this these
    RFSEPA01
    RFSEPA02
    RFSEPA03
    RFSEPA04
    you have to check the documentation of the program to know which one u have to used here for your case .
    hope this is clear assign the points.
    with regards
    krishna

  • Converting a GL account from Open Item Mgnt to Non-Open Item Mgnt

    Hi All,
    I have a GL account which needs to be switched from being an open item managed account to a non-open item managed account.  The account has already been posted to.  I have therefore posted a document to bring the balance of the account in local currency to zero and have also cleared the account so there are no open items showing (via transaction FBL3N).
    However, when I try to untick the 'open item management' box in the master record (via transaction FS00), I get an error message saying that the balance is zero but open items still exist.  I'm abit confused as the balance of the account is zero and there are no open items that I can see, even though the system is telling me there are!
    Am I missing any steps?  Could someone take me through exactly what I need to do to be able to untick the box and set the GL account correctly.
    I've already searched on the forum and found advice about changing the settings via OBA5, but when i look at that transaction there are no messages with class FH in there.
    Any help would be appreciated.
    Many thanks
    James

    Hello,
    In your case, though balance is ZERO, they are not cleared against each other. It is the reason you are still facing the problem.
    If ther is no open item management check box, then copy program RFSEPA02 to ZRFSEPA02 and append the initialization control.
    If there is already open item management but you want to remove then copy RFSEPA03 to ZRFSEPA03 and append the initialization control.
    Do the following steps:
    1. Block the account for postings (all check boxes) in FS00
    2. Run the customized Z program (Give the company code and account number)
    3. Unblock the account for postings (remove all check boxes) in FS00
    Take help from your ABAPer to stopping the initilization error check.
    Hope this solves your issue.
    Regards,
    Ravi

Maybe you are looking for