GG Filter Records based on User Tokens

In the replicat param file, I would love to map only those data where a given USER token is not null. I tried to use @STRLEN, and this leads to error "incorrect filter" in ggserror.log
MAP source.table1, TARGET target.table1,
INSERTALLRECORDS,
COLMAP (USEDEFAULTS,
ID = 1
FILTER ( @STRLEN (@TOKEN ("MYTOKEN") > 0 AND @RANGE (1,2) );
Repaced FILTER with WHERE clause. But same error.
WHERE ( @TOKEN ("MYTOKEN") = @PRESENT AND @TOKEN ("MYTOKEN") <> @NULL);
Can someone tell me, if they have used user token as a filtering parameter in Map for Replicat statement? If yes, how ? I simply want to check - if my token is present and not null - then insert this record.

you wrote: FILTER ( @STRLEN (@TOKEN ("MYTOKEN") > 0 AND @RANGE (1,2) )
should be: FILTER ( @STRLEN (@TOKEN ("MYTOKEN")) > 0 AND @RANGE (1,2) )
You didn't close the bracket of @STRLEN function.

Similar Messages

  • Insert Records Based on User requirement

    Hi,
    I want to Create a set of records based on the user input defined on run time.
    According to my present query i am able to create records which is predefined in 'NoOfRows' variable . Hence when i click on this button, by default 2 rows are inserted in my page.
    My requirement is to get the 'NoOfRows' from user, hence i added an input text in my Jsf page which gets the value from user and based on that the rows will be inserted. But i coudn't pass my Rich input text value to this variable. i.e 'NoOfRows'. How is this possible to pass my input text value which is defined in my bean to the java class defined in Application Moldule?
    This is my code written in AppModuleImpl.java
    public void insertDefaultRows(){
    ViewObjectImpl Lines = this.getEmpView1();
    Lines.executeEmptyRowSet();
    int NoOfRows=2;
    oracle.jbo.server.ViewRowImpl emptyRow;
    for (int i=0; i < noOfRows;i++){
    emptyRow = (oracle.jbo.server.ViewRowImpl)Lines.createRow();
    emptyRow.setNewRowState(oracle.jbo.Row.STATUS_INITIALIZED);
    Lines.insertRow(emptyRow);
    This is my backing bean defined for the input text
    public void setIt11(RichInputText it11) {
    this.it11 = it11;
    public RichInputText getIt11() {
    return it11;
    Hope I'm clear. Any help?

    First of all you have to change the signature of the method in the AM to
    public void insertDefaultRows(int num){
      if (num <= 0)
        return;
      ViewObjectImpl Lines = this.getEmpView1();
      Lines.executeEmptyRowSet();
      int NoOfRows=num;
      oracle.jbo.server.ViewRowImpl emptyRow;
      for (int i=0; i < noOfRows;i++){
        emptyRow = (oracle.jbo.server.ViewRowImpl)Lines.createRow();
        emptyRow.setNewRowState(oracle.jbo.Row.STATUS_INITIALIZED);
       Lines.insertRow(emptyRow);
    }then you expose this method to the client interface of the AM. This makes it available in the data control.
    Next you should add a variable in the executable section of the bindings of the page.
    1) open the bindings of the page
    2) right click on the variables in the executables section and choose 'Insert Inside Variables'->'variable'
    3) in the dialog set a name e.g. noOfRows with type java.lang.Integer
    4) click the green '+' sign in the Bindings section, select AattributeValues, cklick OK
    5) select 'variables' as datasource and 'noOfRows' as attribute
    This will create a variable of type integer in the bindings of the page. This can be used to store the value of the inputText component. For this select the inputText in your page and in the property inspector add
    #{bindings.noOfRows1.inputValue}to the value property. This will transfer the input from the inputText to the variable you created.
    Now open the DataControll and drag the method onto the page and drop it as a button. You then get a dialog where you see the 'num' parameter of the method. In the value field you write the binding you used to store the value from the inputText (#{bindings.noOfRows1.inputValue}).
    Last thing to do is to set the autoSubmit property of the inputText to true.
    This will pass the value from the inputtext to the method.
    Timo
    Edited by: Timo Hahn on 20.03.2013 13:48
    Oh, and you can remove the binding of the inputText to the bean as this is not needed!

  • Selecting records based on user formula

    Post Author: Josh@RTA
    CA Forum: Formula
    I'm writing reports for a company that stores all of their dates as 8 digit numerical fields rather than a date or datetime datatype. I want to convert this field to a date type, then compare it to a parameter that stores user input as a date type.
    However, due to the way that Crystal does it's passes over the data, I can't use a selection formula based off of another formula. So I'm wondering , has anyone ever used a selection formula that references another formula and how have you been able to do it? Maybe use group selection instead of record selection? Just not sure.
    I'm including the formula I'm using to convert the date, as well as the selection formula so you get an Idea of what I'm doing.
    //This converts the numeric 'date' field to a dateshared stringvar DateString := totext({wotrans.ROP_TRAN_DATE}, 0, '');shared datevar ConvertedDate :=If {wotrans.ROP_TRAN_DATE} < 19590101 then Date (1959, 01, 01) else Date ( Val (DateString &#91;1 to 4&#93;),            Val (DateString &#91;5 to 6&#93;),            Val (DateString &#91;7 to 8&#93;) );
    //This is the select statement I'm using to compare the above formula to my parameter using record selection{@ConvertedTransDate} = {?TransDateRange}

    Post Author: SKodidine
    CA Forum: Formula
    Replace your formula with this and then equate it to your parameter value in your selection criteria and see if it will work.
    If {wotrans.ROP_TRAN_DATE} <= 19590101 then Date (1959, 01, 01)
    else
    date(
    tonumber(totext({wotrans.ROP_TRAN_DATE},0,'','')&#91;1 to 4&#93;),
    tonumber(totext({wotrans.ROP_TRAN_DATE},0,'','')&#91;5 to 6&#93;),
    tonumber(totext({wotrans.ROP_TRAN_DATE},0,'','')&#91;7 to 8&#93;));
    The process might be faster if you convert or change the data type of your parameter to numeric and then compare to the numeric date.

  • VBA or Non-VBA Solution to Filter records based on Master Selection.

    Hi Folks,
    I have a rather complex requirement(for me). I have a Master sheet named "Master". In this there are names of employees. Now there are several other sheets named with Month & Year <January2014,Februrary2014...etc>.
    In these sheets, lies the details of those employees.
    My requirement is that If I filter in master sheet the names I want to see, automatically all the other sheets should also show only those employees' details which are selected in master sheet after filter.
    Is this possible. (I know this is but don't know how.)
    Please let me know of any workaround if this is an extremely complex requirement.
    Chaos isn’t a pit. Chaos is a ladder. Many who try to climb it fail and never get to try again. The fall breaks them. And some are given a chance to climb, but they refuse. They cling to the realm, or the gods, or love. Illusions. Only the ladder is real.
    The climb is all there is.

    Excel 2010 PivotTable
    Sync multiple PivotTables to one master PivotTable.
    Two ways: With Slicer or Macro.
    One database used, but multiple databases possible.
    http://www.mediafire.com/view/05jpft89s9ndjr2/10_20_11.xlsm
    http://www.mediafire.com/view/lsa5umrsc56l9zh/10_20_11.pdf

  • How to display the records based on user input

    Hi all,
    On the front end, there are two date fileds, for example, start and end. Whenever user enters start date and end date, i want to display those dates starting from start date to
    end date whatever the user enters.
    For example, user enters Start date : 01/15/2012  and End date : 01/19/2012
    I want to display like this *01/15/2012 01/16/2012 01/17/2012 01/18/2012 01/19/2012*
    Thanks in advance.
    Thanks,
    Pal

    Hello
    You can generate a range of dates between two supplied variables with something like
    var start_date varchar2(20)
    var end_date varchar2(20)
    exec :start_date:='01/15/2012';
    exec :end_date:='01/19/2012';
    SELECT
        TO_DATE(:start_date,'mm/dd/yyyy') + (rownum-1)
    FROM
        dual
    CONNECT BY
        LEVEL <= (TO_DATE(:end_date,'mm/dd/yyyy') - TO_DATE(:start_date,'mm/dd/yyyy') ) + 1
    TO_DATE(:START_DATE,
    15-JAN-2012 00:00:00
    16-JAN-2012 00:00:00
    17-JAN-2012 00:00:00
    18-JAN-2012 00:00:00
    19-JAN-2012 00:00:00If you want to have them in columns you'd need to set an upper limit for the number of dates and use a pivot
    SELECT
        MAX(CASE WHEN date_idx = 1 THEN dt END) date1,
        MAX(CASE WHEN date_idx = 2 THEN dt END) date2,
        MAX(CASE WHEN date_idx = 3 THEN dt END) date3,
        MAX(CASE WHEN date_idx = 4 THEN dt END) date4,
        MAX(CASE WHEN date_idx = 5 THEN dt END) date5,
        MAX(CASE WHEN date_idx = 6 THEN dt END) date6,
        MAX(CASE WHEN date_idx = 7 THEN dt END) date7,
        MAX(CASE WHEN date_idx = 8 THEN dt END) date8,
        MAX(CASE WHEN date_idx = 9 THEN dt END) date9,
        MAX(CASE WHEN date_idx = 10 THEN dt END) date10
    FROM
        (   SELECT
                rownum date_idx,
                TO_DATE(:start_date,'mm/dd/yyyy') + (rownum-1) dt
            FROM
                dual
            CONNECT BY
                LEVEL <= (TO_DATE(:end_date,'mm/dd/yyyy') - TO_DATE(:start_date,'mm/dd/yyyy') ) + 1
        ) Or failing that, you could use string aggregation like so...
    WITH dates AS
    (   SELECT
            TO_DATE(:start_date,'mm/dd/yyyy') + (rownum-1) dt
        FROM
            dual
        CONNECT BY
            LEVEL <= (TO_DATE(:end_date,'mm/dd/yyyy') - TO_DATE(:start_date,'mm/dd/yyyy') ) + 1
    SELECT LTRIM(MAX(SYS_CONNECT_BY_PATH(TO_CHAR(dt,'mm/dd/yyyy'),' '))
           KEEP (DENSE_RANK LAST ORDER BY curr),',') AS dates
    FROM   (SELECT dt,
                   ROW_NUMBER() OVER (ORDER BY dt) AS curr,
                   ROW_NUMBER() OVER (ORDER BY dt) -1 AS prev
            FROM   dates)
    CONNECT BY prev = PRIOR curr
    START WITH curr = 1
    DATES
    01/15/2012 01/16/2012 01/17/2012 01/18/2012 01/19/2012HTH
    David

  • Filter record during navigation

    Hi,
    Is there a way to filter record when navigating using the databrowser menus?
    I hope to filter record based on the current login user. Different user will have access to different records, which are stored in the same table.
    I am using VB6 and 2004B. Your help is needed.

    Hi,
    I think Data Ownership might solve your problem. Look at Administration > Authorizations > Data Ownership / Data Ownership Exceptions. The help file has quite a bit of detail on it.
    Hope it helps,
    Adele

  • How to display filtered data based on user login

    We have a SSRS report (.rdlc) which gives the report about Online count of machines. Report is incoperayed in Asp.net.
    We have many filters in This report. Now we have to retrict the report based on user login to the application .
    For ex: report has a drop down for Regional Admin. Now if one person login to the application he has to view only his region online count.
    How can we do this in SSRS?. We have our application hosted in Microsoft Azure . Please suggest

    Hi csmbrnoc,
    In Reporting Services, if we want to filter data based on user login, then there must be some relationship between the UserID and the Region in the dataset. For example, there is a field named UserID in the dataset, and each ID map some region and the corresponding
    “Online count of machines”. In this scenario, just as Visakh suggested, we can use built-in field User!UserID to obtain UserID of the current user, then directly add a filter to the dataset as below:
    Expression: [UserID]
    Operator: =
    Value: [&UserID]
    If there are any other questions, please feel free to let me know.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Read Portal User ID in BW report to filter records

    Hi,
    I need to filter my records in BW report based on the
    business partner who logs into Portal.
    (BW report is getting called thur IView in Portal)
    Is there any way i can fetch the Portal User id
    during the execution of BW report? so then i can filter
    records by writing code in user exit.
    I tried using variable sy-uname, but it populates
    the BW user id and not portal user id.
    Please reply if anybody knows solution to this query.
    Thnx in advance.

    Abhijit ,
    My understanding:
    You need to filter the query by the Business Partner ID and not by User name and Business Partner number and BW User ID are both different.
    If you want to filter by User name:
    Why don't you try using SSO through EP and that way you would get the ID of the person logged in.
    If you are using user mapping:
    Or what you could do is maintain the mapping in an info object/table in BW and query against the same.
    If you are using Business Partner:
    Populate the business partner master which will have the user name attached and that way you would be able to get the Business partner ID.
    Arun

  • Filter standard reports based on user login

    Hi All,
    Is there any way to filter standard form reports (not PLD), based on the user currently logged in. for example, if user 'sales1' has logged in,  he should be able to see the sales report(say sales analysis) for the documents made by him only. there does not seem to have any access on the query being passed to this report. so even customization does not seem to be the solution. kindly help if any one knows a better way or a way at all.
    thnks and regards,
    Binita Joshi

    Hi Petr,
    thanks for replying.
    Before posting, I had already searched in SAP B1 forum and there , for a similar problem, it was advised to use SDK so I posted here.
    I knew, SDK seems to be the way. but, again, As I wrote, I wanted to know, whether there exists a way to filter the standard reports based on the user login. I don't want authorization or setting rights, sort of things.
    but, suppose If user A wants to see the sales documents reports then, he should be able to see the reports of the documents made by him only. so we will have to filter the records based on the Usersign field in marketing documents' tables but, I am clueless on, where should I give this filter.  and I am afraid there is no way to do that. make your own reports and block the access of system reports.Pls right back if U have more to say.
    regards,
    Binita Joshi

  • Filter records on two different parameters

    I have to filter records in a report based on parameter.Values for parameter are :
    Open
    Closed
    Applicable
    Not Applicable
    if user chooses Applicable,all records should be selected except Not Applicable.I tried various oprions,but none is giving me required results.Any ideas?

    This..?
    QL> select * from status;
    C1                                                                             
    Open                                                                           
    Closed                                                                         
    Applicable                                                                     
    Not Applicable                                                                 
    SQL> select *
      2  from status
      3  where c1 ='&st'
      4  or ('&st' = 'Applicable' and c1 != 'Not Applicable');
    Enter value for st: Applicable
    old   3: where c1 ='&st'
    new   3: where c1 ='Applicable'
    Enter value for st: Applicable
    old   4: or ('&st' = 'Applicable' and c1 != 'Not Applicable')
    new   4: or ('Applicable' = 'Applicable' and c1 != 'Not Applicable')
    C1                                                                             
    Open                                                                           
    Closed                                                                         
    Applicable                                                                     
    SQL> /
    Enter value for st: Closed
    old   3: where c1 ='&st'
    new   3: where c1 ='Closed'
    Enter value for st: Closed
    old   4: or ('&st' = 'Applicable' and c1 != 'Not Applicable')
    new   4: or ('Closed' = 'Applicable' and c1 != 'Not Applicable')
    C1                                                                             
    Closed                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to filter records in EIS drill through using template SQL

    Hi,
    I'm looking for an option to filter records in EIS drill through using Template SQL.
    For eg: If we user runs drill through on 2011, it should restrict display of Jan & Feb and should display records for other months.
    I tried using NOT IN clause, but got an error.
    Can any one help me in understanding how this needs to be defined in template SQL
    Thanks in advance

    Hi Glenn,
    I'm able to filter the records for specific periods.
    However, I'm facing another problem now.
    When I try to run drill through I get 'OLAP_error (1192025): Unknown Error: Not a valid Entry' error.
    This is happening when I include condition as ((($$ab.ACCOUNT_CODE-COLUMN $$) IN ($$Account-VALUE$$)))
    Here, ACCOUNT_CODE is field from Account dimension table and 'Account' is the name of the dimension.
    If I remove this statement and run drill through, it runs but shows data for all accounts (irrespective of the Account selected)resulting in incorrect data.
    Our RDBMS is Oracle. Can you please help me with this
    Thanks

  • Standard Table to be updated based on User action

    Hi Friends ,
    i have a requirement , its a report and in that based on the user action ( if the user checks a check box that is available in the output screen of the report and saves it)  the value should be updated in a standard table as 'X'. I have appended the field in the standard table and now i need to write a logic at user command to populate the zfield that i have added in the table based on the user's input. Can someone suggest me how to proceed further on this ? Kindly let me know if you have any sample piece of code related to this scenario...
    thanks in advance.

    HI,
    Usually we can udpate the tables using UPDATE statement.
    But SAP will not suggest to use these statements which will hit the table directly. We need to use the standard transactions to create or update the standard tables.
    For eg: you are using a ztable.
    then once your report is ready, then use the user_command form ( for ALV) .
    fetch the records where the user have selected the records ( check box = 'X").
    *&      Form  USER_COMMAND
    FORM user_command USING g_ucomm     TYPE sy-ucomm
    gs_selfield TYPE slis_selfield                                          .
      CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
        IMPORTING
          e_grid = ls_ref1.
      CALL METHOD ls_ref1->check_changed_data .
    this will update the check box values in your internal table.
    now you can use
    loop at itab into wa where check eq 'X'.
    fill your final internal table where you need to update the table.
    endloop.
    loop at newtable.
    update ztable set value = 'X'
    where keyfield = w_keyfield.
    if sy-subrc eq 0.
    message s000.
    endif.
    endloop.
    endform.
    regards,
    Venkatesh

  • To filter records using XSLT mapping

    Hi all,
    I am using XSLT mapping in my scenario.
    I have below structure.
    <Node>
        <emp_id>123<emp_id>
        <begin_date>dd/mm/yyyy<begin_date/>
        <end_date>dd/mm/yyyy<end_date/>
        <check_date>dd/mm/yyyy<check_date/>
    <Node/>
    I want to filter out the records based on check_date. If checkdate is less than enddate, i want to filter out that particular records.
    If anyone knows, Please suggest me in this issue.

    hi,
                   <xsl:variable name="checkdate">
         <xsl:for-each select="Node/check_date">
         <xsl:value-of select="substring(concat(substring(Node/checkdate,1,2),substring
                            (Node/checkdate,4,2),substring(Node/checkdate,7,4)),1,8)"/>
         </xsl:for-each>
                    </xsl:variable>
         Like wise create a variable for end date....
       <xsl:for-each select="Node">
              <xsl:if test="$checkdate > ''$enddate">
                       <emp_id>
                              <xsl:value-of select="Node/emp_id"/>
                       </emp_id>
                like wise create map for other filed...
                  </xsl:if>
        </xsl:for-each>
      I think this will solve your requirement......
    Regards,
    Prakasu

  • Fetch the records based on number

    Hi experts,
        I have a req like if user give input as 5..it should fetch 5 records from database.
    for example database values are
    SERNR                MATNR
    101                                              A
    102                                              A
    103                                              A
    104                                              A
    105                                              A
    106                                              A
    107                                              A
    If user gives the input as 5 it should fetch 5 records like 101 to 105....Can any body plz help me how to write select query for this..
    Thanks in advance,
    Veena.
    Edited by: s veena on Jan 18, 2011 5:52 AM

    Hi Veena,
    You can use UPTO in your select query. For example
    SELECT MATNR FROM MARA INTO TABLE IT_MATNR UPTO P_NUMBER ROWS.
    "Here P_NUMBER is the Selection Screen Parameter
    It will fetch records based on the number in the parameter.
    Thanks & Regards,
    Faheem.

  • Filtering entries in BP search based upon user

    Hi
    We are trying to filter out results shown in BP search, based upon users. For that we are trying to follow steps mentioned in IMG
    SPRO->IMG-> Customer Relationship Management -> CRM Cross-Application
    Components -> Generic Interaction Layer/Object Layer ->
    Component-Specific Settings -> Extend Object Model for Business Partner
    The field(region) we are using is already present in structure CRMST_HEADER_SEARCH_BUIL and as per my understanding we will be using method Adjust_Result_Table.
    But still I am not able to resolve it. Please help me in this regard.
    Thanx & Regards
    Hits

    Hi,
    The object that we work with at 2007:
    BuilHeaderSearchNew
    and not BuilHeader like at the last version
    so, we have to implement CL_BUPA_IL_HEADER_SEARCH and not CL_BUIL_HEADER
    1. Create :
    ZCL_BUPA_IL_HEADER_SEARCH
    with superclass:
    CL_BUPA_IL_HEADER_SEARCH
    2. At customizing:
    SPRO->CRM->Cross Application components->Generic Interaction Layer/Object Layer->component specific setting ->Extend Object Model for Business Partner
    add:
    External Object Name - BuilHeaderSearchNew
    Implementation Class - ZCL_BUPA_IL_HEADER_SEARCH
    Nou you can use this method for changing the result:
    ZCL_BUPA_IL_HEADER_SEARCH ->GET_RESULT_TABLE
    good luck
    ayelet

Maybe you are looking for

  • Problem while downloading data from Application server.

    Hi I have create a file on the application server. When i tried to download the file from application server into Excel file , all the fields in the file appear in the same column. How can place the fields separately in different columns in the Excel

  • How to fetch the latest change number from CDPOS Table..?

    Hi All, im trying to fetch teh change number from CDPOS with the below select, but my requirement is always i wants to fetch the latest change number.           SELECT SINGLE objectid changenr FROM cdpos                  INTO wa_cdpos                

  • Publish an iWeb site using Lion Server

    Does any one know how to publish an iWeb site using Lion Server. I've been getting failures every time I try to publish using ftp server choise. HELP!!!

  • Query problem- where to focus

    Dear all, 10.2.0.4 on solaris 10.We have the below qwery running from a report which is slow. Now below is the complete explain plan for the query . Wwhere do I have to focus now ? SELECT MAX (AR_INVDATE) FROM INV_RECDR , IVM_DETD   WHERE R.AR_REF = 

  • Table breaking a page

    A strange thing that has happened a few times, and I have found no remedy: When I paste text including a table in the middle of the page into another document, the table moves to the start of a new page. This happens even though there is about three