Retrieving the value using formatted search

Hi everyone. I have a question regarding on how I can get the value of the user-defined field in the title of a marketing document. I would like to get the value using formatted search and sql query.
Here's the format I am currently using.
$[$ <Item>.<Pane>.<Variable>]
Is my format correct? Thanks.
Regards,
Omann

Hi Omann,
You can refer to fields in an entry screen using the syntax
$[Table name.Field name]
The table name is the name of the table belonging to the entry screen, for example, OINV for the A/R invoice entry screen.
You can also use the fieldu2019s item number and fieldu2019s column number to refer to a field on the entry screen. By doing this, the query applies to all document entry screens. The syntax is then
$[$Fieldu2019s item number.Fieldu2019s column number.NUMBER/CURRENCY/DATE/0]
The system is able to uniquely identify each field of a document using the fieldu2019s index number and fieldu2019s column number. If you have activated the debug information under View  Debug Information, the system displays the fieldu2019s item number and the fieldu2019s column number in the status bar.
You use the NUMBER parameter if the field concerned contains an amount and a currency key, and you want to extract the amount only. 
You use the CURRENCY parameter if the field concerned contains an amount and a currency key, and you want to extract only the currency key.
You use the DATE parameter if the field concerned is a date field and you want to use it for calculations.
Regards, Yatsea

Similar Messages

  • Display column total on the header using Formatted Search

    Hello,
    I'm trying to create a FS on a Sales Order header (UDF) that will summarize a
    column from the row level.
    For example, I'd like to display the sum of the quantity in the header.
    I've tried the following syntax: Select sum($[$-38.11.NUMBER]) but I get
    only the first line as query result and not sum of all lines.
    Is it possible to get the column total using FS? If so, what should be
    the syntax?
    Thank you in advance,
    Maya

    Columns totals are not possible to get through formatted search as the data of the first row is only referenced by the system automatically.
    If you are needing the Sum of LineTotal for a Approval procedure, then you could use the Total Before Disc col which is actually the sum (line total)
    Access by
    SELECT $[$22.0.Number]

  • How to Define and Use Formatted Search in Sap Business One 2007

    Hi
        Any Document on How to Define and Use
    Formatted Search in Sap Business One 2007.
    Thanks

    Hi Manish,
    It is Very simple Procedure of defining FMS(Formatted Search)
    in SAP 2007B Same as SAP 2005B & SAP8.8 Version
    Do this,
    ->> Open the require Document.
    for ex. IF you add the UDF in Marketing Document(Sales/Purchase)
    1. Goto the UDF (or) any Default(Original) Field and Click ShiftAltF2.
    2. Select the SEARCH BY SAVED QUERY.
    3. Assign the FMS Query.
    4. Select the AUTO REFRESH WHEN FIELD CHENGES.
    5. Select the require Auto refresh field
    6. Check the Refresh Regularly (or) Display Saved Values.
    Regards,
    Madhan.

  • Getting Error Message using Formatted Search

    Hi,
    I am using formatted search for validating a particular field, and that happens fine.  Kindly let me know if I can also display error messages using the same formatted search.
    If yes, what am I to include in the formatted search, and if No, please let me know the alternative.
    Thanks in advance.
    Satish.

    Hi Satish,
    if you validate the value of a field and intend to rise an error message on detection of invalid values in a separate window or in the status line there is no way to do it with Formatted Searches (as far as I know)!
    You could use the following methods as simple workarounds if you don't want to program a solution with the SDK:
    1. Solution
    You can display the text of an error message in the field you validate; of course, the invalid data then is overwritten with your error message, but you could construct the message from fixed text parts concatenated with the data found in the field.
    Be sure to save the original data of the field in your query before you do anything else. This way you sustain the field data in case the data is valid!
    Example:
    DECLARE @save AS ....
    SET @save = $[xxxxx]
    IF $[xxxxx] test on invalid data
      SELECT 'Error: Invalid data: ' + $[xxxxx] -- in case of error
    ELSE
      SELECT $[xxxxx] -- no error - sustain valid data
    END
    2. Solution:
    You define a sepate User Defined Field (UDF) for potential error messages - that's the way I often programmed it for our own applications. Suppose that the Formatted Search is connected to this UDF and the field to validate is field 'xxxxx'. The Formatted Search is triggered (auto-refresh) on change of field 'xxxxx':
    IF $[xxxxx] test on invalid data
      SELECT 'Error: Invalid data: ' + $[xxxxx] -- in case of error
    END
    May be that there are minor syntactical errors or missing type conversions in the code above - but I hope it gives you an idea on how to solve your problem without SDK programming!
    Good luck!
    Frank Romeni

  • How to retrieve the values from a table if they differ in Unit of Measure

    How to retrieve the values from a table if they differ in Unit of Measure?

    If no data is read
    - Insure that you use internal code in SELECT statement, check via SE16 desactivating conversion exit on table T006A. ([ref|http://help.sap.com/saphelp_nw70/helpdata/en/2a/fa0122493111d182b70000e829fbfe/frameset.htm])
    If no quanity in result internal table
    - There is no adqntp field in the internal table, so no quantity is copied in itab ([ref|http://help.sap.com /abapdocu_70/en/ABAPINTO_CLAUSE.htm#&ABAP_ALTERNATIVE_1@1@]).
    - - Remove the CORRESPONDING, so quantity will fill the first field adqntp1.  ([ref|http://help.sap.com/abapdocu_70/en/ABENOPEN_SQL_WA.htm])
    - - Then loop at the internal table and move the quantity when necessary to the 2 other fields.
    * Fill the internal table
    SELECT msehi adqntp
      INTO TABLE internal table
      FROM lipso2
      WHERE vbeln = wrk_doc1
        AND msehi IN ('KL','K15','MT').
    * If required move the read quantity in the appropriate column.
    LOOP AT internal_table ASSIGNING <fs>.
      CASE <fs>-msehi.
        WHEN 'K15'.
          <fs>-adqnt2 = <fs>-adqnt1.
          CLEAR <fs>-adqnt1.
        WHEN 'MT'.
          <fs>-adqnt3 = <fs>-adqnt1.
          CLEAR <fs>-adqnt1.
      ENDCASE.
    ENDLOOP.
    - You could also create another table with only fields msehi and adqntp and then collect ([ref|http://help.sap.com/abapdocu_70/en/ABAPCOLLECT.htm]) the data to another table.
    Regards,
    Raymond

  • How to retrieve the values from PL/SQL table types.

    Hi Every one,
    I have the following procedure:
    DECLARE
    TYPE t1 IS TABLE OF emp%ROWTYPE
    INDEX BY BINARY_INTEGER;
    t t1;
    BEGIN
    SELECT *
    BULK COLLECT INTO t
    FROM emp;
    END;
    This procedure works perfectly fine to store the rows of employee in a table type. I am not able to retrieve the values from Pl/SQL table and display it using dbms_output.put_line command.
    Can anybody help me please!!!!!
    Thanks
    Ahmed.

    You mean, you can't add this
    for i in t.first..t.last loop
    dbms_output.put_line(t(i).empno||' '||t(i).ename||' '||t(i).job);
    end loop;or you can't add this
    set serveroutput onor maybe, you are working in third party application where dbms_output is not applicable at all?
    You see, not able like very similar it is not working - both are too vague...
    Best regards
    Maxim

  • Problem when create auto numbering in BP master using Formatted Search

    Hi all,
    I have a problem in creating auto numbering in BP for Customer type using Formatted search
    My query is like this
    declare @tempNo as char(20)
    set @tempNo=(select  Isnull(max(REPLACE(OCRD.CardCode , LEFT(OCRD.CardCode,10),'')),0)  + 1
    from OCRD where (CardType ='C') and LEFT(OCRD.CardCode,3) = 'CU.' )
    set @tempNo='CU.'left(convert(varchar,GETDATE(),112),6)'.'+@tempNo
    select cast(@tempNo as char(20))
    It should be creating the new number for example
    CU.201101.1
    CU.201102.2
    CU.201103.3
    CU.201103.4
    The format will be like this CU.YYYYMM.autonumbering
    So if the current year is still the same it will always increase the number and it will reset the number become 1 if the current year is change.
    But when i execute the number , the number doesn't increase, still generate the last number CU.201103.4
    I have use this query in generate item number, it runs well but different format.
    Is there some thing wrong with my query?
    Thanks in advance
    Regards
    Jia shun

    Hi Jia shun,
    You have posted an identical threads. There is no such need. Please close this one and response to the one with answer already.
    Thanks,
    Gordon

  • Scripting: How to retrieve the value for next year

    Hi Experts,
    Need help on HFM rules for retrieving the next year value
    Specificationt: Financial year values start from Apr to Mar
    I am bale to retrieve the values from Apr to dec, when trying to retrieve for Jan and mar getting the wrong values
    using : A# xxx.C1#xxx.y#cur
    please suggest your comments
    Thanks,
    SSr

    Hi,
    Still getting the wrong values
    FYear start from April to Mar
    For ex:
    2012                                                                                    2013
              apr     may     jun     jul     aug     sep     oct     nov     dec   jan     feb     mar
              1        1            1     1       1        1         1        1        1       1       1        1
    YTD
    OT     1          2          3      4       5        6        7        8        9     10     11     12
    Thanks,
    Ssr

  • How to retrieve the value of last identity has been updated in a database?

    how to retrieve the value of last identity has been updated in a database

    Hi,
    Oracle 10g, FGA - Fine grained auditing, supports DML statements (9i only select).
    Set up FGA using the DBMS_FGA.ADD_POLICY procudure:
    sql> BEGIN
    DBMS_FGA.ADD_POLICY (
    policy_name => 'AUD_EMPLOYEE_SAL',
    object_schema => 'HR',
    object_name => 'EMPLOYEE',
    audit_column => SALARY',
    audit_condition => '',
    statement_type => 'UPDATE');
    END;
    NEXT:
    sql> SELECT dbuid, lsqltesxt FROM sys.fga_logs$;
    The database inserts the audit record into the FGA_LOG$ table using an autonomous transaction; even if you roll back the update statement, the update action will still be logged in this table. The fga_log$ tracks the session, machine id, timestamp, schema, scn, etc:
    SQL> desc fga_log$
    Name Null? Type
    SESSIONID NOT NULL NUMBER
    TIMESTAMP# DATE
    DBUID VARCHAR2(30)
    OSUID VARCHAR2(255)
    OSHST VARCHAR2(128)
    CLIENTID VARCHAR2(64)
    EXTID VARCHAR2(4000)
    OBJ$SCHEMA VARCHAR2(30)
    OBJ$NAME VARCHAR2(128)
    POLICYNAME VARCHAR2(30)
    SCN NUMBER
    SQLTEXT VARCHAR2(4000)
    LSQLTEXT CLOB
    SQLBIND VARCHAR2(4000)
    COMMENT$TEXT VARCHAR2(4000)
    PLHOL LONG
    STMT_TYPE NUMBER
    NTIMESTAMP# TIMESTAMP(6)
    PROXY$SID NUMBER
    USER$GUID VARCHAR2(32)
    INSTANCE# NUMBER
    PROCESS# VARCHAR2(16)
    XID RAW(8)
    AUDITID VARCHAR2(64)
    STATEMENT NUMBER
    ENTRYID NUMBER
    DBID NUMBER
    LSQLBIND CLOB
    SQL> spool off

  • How to retrieve the values from a LinkedList

    Hello,
    I have just put this question in java programming forums by mistake...I think that it should be here ...
    I have created a LinkedList to store the results of a query to a database.
    These reasults are decimal numbers and then I want to sum all these numbers to be able to make the average.
    But when I try to retrieve the values of the Linked List I always receive an incopatible types error..
    Here is an extract of my code in a jsp page.
    LinkedList Average = new LinkedList();
    String Media = rst.getString(10);
    Average.add(Media);
    int Size = Average.size();
    double Sum = 0.0;
    for (int i=0; i<=Size; i++)
                    double Result = Average.get(i)     
                  Sum = Sum + Result;
    }If I try to retrieve the value of only one node from the list , I can just putting <%=Average.get(i)%>...but..how can I retrieve all the values (they are decimal numbers) to be able to add them?

    If you want to sum all the values, is there any reason you just don't retrieve the sum from the database rather than the list of values?
    anyway
    List average = new LinkedList();
    while (rst.next()){
      // retrieve the number:
      String mediaString = rst.getString(10);
      Double media = Double.valueOf(mediaString);
      // or maybe like this if it is a number in the database
      Double media = new Double(rst.getDouble(10));
      average.add(media);
    doubleSum = 0.0;
    for (Iterator it = average.iterator(); it.hasNext(); ){
      Double result= (Double) it.next();
      doubleSum += result.doubleValue();
    }

  • How to retrieve the system used in an iview?

    hello,
    i'm currently having trouble retrieving the proper attribute of an iview to retrieve the system used by it.
    it seem like the strings identifying the system in the iview differ in some iviews.
    using either:
    myIView.getAttribute(IAttriView.PORTAL_SYSTEM)
    or
    myContext.getAttributes("").get("System").get().toString()
    produce errors.
    while get("System") sometimes provides the correct system alias the attribute is none existant for other iviews where the string would be "Systemalias".
    IAttriView.PORTAL_SYSTEM doesn't seem to work at all.
    i did implement fail safe code if the attribute isn't present, however i don't know how to retrieve the system attribute without doing a case switch or something similar for all the different strings, which i would prefer not to do.
    also, is there an easy way to retrieve all iviews which use a specific system without parsing the whole pcd and checking the attributes?

    Prerequisite : Create the System Alias for the systems used in the application.
    Use the below code to retrieve the system details:
            HashMap mapattr = new HashMap();
            HashMap map = new HashMap();
            IUser user = WDClientUser.getCurrentUser().getSAPUser();
            IPrincipal principal = (IPrincipal)user;
            ArrayList list = UMFactory.getSystemLandscapeWrappers();
            ISystemLandscapeWrapper systemLandscape = (ISystemLandscapeWrapper)list.get(0);
            //Portal System ALias name
            ISystemLandscapeObject landScapeObject = systemLandscape.getSystemByAlias("<system alias name>");
            IUserMappingData userMapping = (IUserMappingData) UMFactory.getUserMapping().getUserMappingData(landScapeObject,principal);
            userMapping.enrich(map);
            mappedUserId = map.get("user").toString(); // String "UserId"
            mappedPassword = map.get("mappedpassword").toString(); //String "Password" 
         catch(Exception e)
              e.printStackTrace();
              wdComponentAPI.getMessageManager().reportException("Exception during retrieving the User Details - " + e.getMessage(),true);
    Thanks & Regards,
    Amar Bhagat Challa

  • How can I change the value used in a Criteria Rule in a Subscription agent

    Dear mobile heroes.... How can I change the value used in a Criteria Rule in a Subscription agent in a quality environment? (CRM 70 SP04).
    I have built a subscription agent in dev, which uses a static where clause to filter activity_object on VKORG. I need to filter on a different VKORG value in the quality environment, but when I change the value of the sales org, the change is not saved. I have tried this even non 'activated'  subscription agents, but it still does not appear possible to change and save the changes.
    This poses a big problem because the VKORG value I want to use does not even exist in the dev environment, so I could not even rebuild in dev and transport the new agent to quality. Can anyone help me?

    Too old to care now.

  • Layout not retrieving the values correctly

    Hi,
    As per the requirement I need to get the AOP values from the cube for a particular fiscal year to be populated into one of the columns of the Layout,but the planning layout which I had designed retrives the AOP values only for the first period.I should be getting the total AOP for the Fiscal year in my layout.
    Say I have the cube values as
    Product   Fiscal year/Period   Value
    P-01         2006001                  100
    P-01         2006008                   500
    P-02         2006001                   200
    P-03         2006005                    300 
    My layout retrieves the values as follows
    P-01         2006001                  100
    P-02         2006001                   200
    but I need the Layout values as
    P-01                     600
    P-02                     200
    P-03                     300.
    Could anyone tell me what modifications I need to do in my layout inorder to achieve the above functionality.
    Points will be assigned.
    Thanks,
    Subha

    Hi Mayank,
    I have not restricted to 2006001,but in the layout I have posting period as an variable which contains 1 to 13 periods as the variable definition.I need this becoz I need to generate period1 to period 13 columns dynamically in the same layout.
    As you said If I remove the Posting period then how will I be able to genearte the columns dynamically.
    Thanks,
    Subha
    Edited by: subhashini reddy on Apr 10, 2008 9:33 PM

  • Regarding the restricting the value using the keyboard

    Hi,
    In our organisation, I've implemented the Barcode system. I've a case, where user wants that the value in a field has to be taken from the scanner. The other requirement is I've to restrict the user from entering the valu using keaboard in that field.
    Can any one help me in this regard.
    Thanks in advance.
    Regards,

    did you have the docs of the barcode scanner? Look, which kind of remote interaction you can do. Via OLE2, C, RFC, ...

  • Addition of two rows values in table  using formatted search

    hi all,
            i have created one UDF field in market document rows, now in AR invoice i need to add the values in the UDF fields of two rows, want to show it in anather outside UDF in title. kindly suggest me some query to track that.
    Ex:- i had entered two items in rows and
    for first UDF row i have given 20
    for second UDF row i have given 30.
    now i need to show sum of the two UDF in two rows in title UDF.
    kindly give me some query used for formatted search to do this task.
    regards
    sandip

    Sandip,
    To the best of myknowledge When you try to take the row value to the header the results of the Formatted Search are not consistent.
    but for your interest, I am giving below the logic to work this out.
    You need two Header level user fields.  One to copy the row user fields value and the other to store the sum.
    You can create a simple SQL "SELECT $[$38.U_UserFieldName] (substitute with row level user field name) and attach it to the first header level user field and make it Auto refresh on doc total.
    Then Attached SQL  "SELECT $[ORDR.U_HeaderUserField1] + $[ORDR.U_HeaderUserField2]"
    The results could be flaky because the header user field takes the value of the active row and sometime it only considers the first row active though you might be entering the second row of data.
    My recommendation would be to Use The Transaction Notification Stored Procedure for this by which you can be absolutely sure that the Header User field will have the sum.
    Let me know if you need directions for this.
    Regards
    Suda

Maybe you are looking for