How to use attributes in variable substitution???:(

Hi all,
Could you please help me out in how to use attributes in variable substitution....
Regards,
Sundar

Hi,
Use Adapter Specific Identifiers , instead of Variable Name substitution.
Sender File adapter --> Adapter Specific Attributes --> Select File Name
Reciver File Adapter -->Adapter Specific Attributes --> Select File Name
In the mapping , use this code in an UDF to change the filename to what you want,
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String filename="YOURFILENAME";
String rSourceFileName = conf.put(key,filename);
Regards,
Bhavesh

Similar Messages

  • How to use the bind variable in custom.pll

    Hi,
    How to use the bind variable in custom.pll.Its through error.
    any one gem me.
    very urgent.
    M.Soundrapandian.

    Hello,
    Please, ask this kind of questions in the e-business forum.
    Francois

  • Script logic - how to use a selection variable within an allocation logic

    Hi,
    I want to implement a simple top-down distribution to distribute values from a yearly budget (Y20xx.TOTAL) to a quarter budget (Q20xx.Q1, ... Q20xx.Q4) using the actuals of the previous year as reference.
    If we hard code the members it works fine:
    *RUNALLOCATION
    *FACTOR=USING/TOTAL
    *DIM ACCOUNT WHAT=ACC_NOT_ASSIGNED; WHERE=BAS(FIN); USING=<<<; TOTAL=<<<
    *DIM TIME WHAT=Y2009.TOTAL; WHERE=BAS(Q2009.TOTAL); USING=BAS(Q2008.TOTAL); TOTAL=<<<
    *DIM CATEGORY WHAT=SBO; WHERE=<<<; USING=ACTUAL; TOTAL=<<<
    *ENDALLOCATION
    Of course, we want to make this dynamic, using the values inputted in the selection screen of the package: time, entity and category.
    So if we start with write the following logic, it does not work anymore:
    *RUNALLOCATION
    *FACTOR=USING/TOTAL
    *DIM ACCOUNT WHAT=ACC_NOT_ASSIGNED; WHERE=BAS(FIN); USING=<<<; TOTAL=<<<
    *DIM TIME WHAT=%TIME_DIM%; WHERE=BAS(Q2009.TOTAL); USING=BAS(Q2008.TOTAL); TOTAL=<<<
    *DIM CATEGORY WHAT=%CATEGORY_DIM%; WHERE=<<<; USING=ACTUAL; TOTAL=<<<
    *ENDALLOCATION
    So, how to use the selection variables in this allocation logic? %TIME%, %CATEGORY% also did not work ...
    regards
    Dries
    solved it ...
    Edited by: Dries Paesmans on Feb 22, 2009 8:31 PM

    Hi Dries,
    Looks like you solved this, but if I can just add a small point -- when you use syntax like this:
    *DIM ACCOUNT WHAT=ACC_NOT_ASSIGNED; WHERE=BAS(FIN);
    *DIM TIME WHAT=Y2009.TOTAL; WHERE=BAS(Q2009.TOTAL);
    each time the logic runs, it will scan through the dimension from the FIN and Q2009.TOTAL members, one level at a time, until it reaches the base members (where calc = 'n'). This may happen very quickly, if the dimension has very few levels, but could take a bit of extra time if it's a particularly deep dimension. (By which I mean many levels of hierarchy -- not some 1970's Pink Floyd musical reference.)
    You may speed things up by using a member property instead of the BAS(xyz). Flag all the base members using a specific property value, and that way the logic engine can pick up the complete list of members in the WHERE clause, in a single query.
    *DIM Account What=ACC_NOT_ASSIGNED; Where=[FloydProperty]="DarkSideOfTheMoon"; ...
    This adds some maitenance work in the dimension, which may be problematic if your admins are changing it regularly (and will cause problems if they forget to update this particular property).
    I can't predict how much time this will save you (maybe not much at all), but anyway I figure you'd want to know exactly what work you're asking the system to perform.
    Regards,
    Tim

  • How to use Replacement Path Variables to perform Date Calculations

    Hi Experts,
    Can anyone make me clear about:How to use Replacement Path Variables to perform Date Calculations???????
    Thankyou in advance..
    shankar

    In left panel select the time Dimension
    Then hit new variable in that
    give the Name and Description for the Variable
    In processing by hit Replacement Path
    In reference characterisitcs use Calendar Day...
    As ur intention is to use it for Date
    Then in adjacent tab use
    Replace variable with Query / Variable
    Then u can use Offset length and offset start for controoling the display of your variable.
    Use as single, multiple single, interval, selection option as uwish
    HIt okey
    and you are good to go

  • How to use a presentation variable in filter conditions

    Hi,
    I have set a presentation variable "day" on my dashboard prompt containing a date column. I now need to use this presentation variable in the filter clause to restrict the dates between "day" and sysdate.
    So i apply the following SQL filter:
    where day between '{@variables.day}' and current_date
    But I end up in getting the following error:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 17001] Oracle Error code: 1861, message: ORA-01861: literal does not match format string at OCI call OCIStmtExecute. [nQSError: 17011] SQL statement execution failed. (HY000)
    I even tried casting the presentation variable to date, but to no avail. Can someone let me know how to specify the date format for the presentation variable.

    If you're a member of ODTUG (or even if not, you can sign up for an associate membership for free) you can download Glenn's presentation from 2009 Kaliedoscope "Little Used Features of Essbase (Like Data Mining and Triggers)" -- there is a section in that presentation on substitution variables -- he does a really good job in showing how this works.
    Go to: www.odtug.com, then Tech Resources, then Essbase/Hyperion, and search for Schwartzberg. Currently it's the ninth presentation on the list -- I think this changes based on popularity of downloads.
    Regards,
    Cameron Lackpour

  • How to use an ODI variable in an IKM?

    Hi,
    I am trying use the value of ODI variable in IKM SQL Incremental Update. The variable contains the count of error records. My problem is how to use the variable in the IKM. I am trying to use the variable in an If condition like:
    <%if(%>#COuntReprocessRec<%>0){%>
    I have declared the variable as Numeric.
    Thanks.

    Hi,
    For the below requirement follow the below steps.
    I have to execute the 'Insert of flow into I$ table' step of IKM, only if Error records are present in my source table. The IKM i am using is IKM SQL Incremental Update.
    Create a new step before 'Insert of flow into I$ table' step, i say "Check Error Record".
    Command on source
    Technology : <your source technology>
    Schema: Whichever schema points to ur source error table
    Command:
    select count(*) as row_count from <table_name>
    Command on Target
    Technology : Jython
    Command:
    CountData=#row_count
    if CountData>0:
    ##raise ' \n\nThere are error records in source error table'
    Thats it.
    This will stop the flow in case of error records persist in ur source table, else it allow the flow to next Insert I$ step.
    P.S: Replace ## with TAB.
    Thanks,
    Guru

  • How to use attribute datatype date in LOV

    In LOV have attribute that datatype date when run it show message error
    "java.lang.ClassCastException"
    How to use datatype date in LOV ?
    Can set property of LovVO attribute, LOV Region to date?
    If answer from above question is "NO", Can you give me function and OAF syntax for convert string to date, and where to convert in VOImpl or AM or another.
    Thank you very much.

    After I get parameter date from LOV then click GO, it show below message error
    ## Detail 0 ##
    java.lang.ClassCastException
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.setWhereClauseFromCriteria(OAViewObjectImpl.java:1589)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(OAViewObjectImpl.java:4484)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:574)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:544)
         at oracle.jbo.server.ViewRowSetImpl.executeDetailQuery(ViewRowSetImpl.java:619)
         at oracle.jbo.server.ViewObjectImpl.executeDetailQuery(ViewObjectImpl.java:3311)
         at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3298)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQuery(OAViewObjectImpl.java:444)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.initQuery(OAViewObjectImpl.java:719)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.setCriteriaOnVO(OAWebBeanHelper.java:2268)
         at oracle.apps.fnd.framework.webui.OAQueryHelper.handleSubmitButton(OAQueryHelper.java:2689)
         at oracle.apps.fnd.framework.webui.OAQueryHelper.processFormRequestAfterController(OAQueryHelper.java:1248)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:820)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.OAQueryHelper.processFormRequest(OAQueryHelper.java:1036)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processFormRequest(OAStackLayoutBean.java:370)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1000)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:966)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:821)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processFormRequest(OAStackLayoutBean.java:370)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1000)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:966)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:821)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1157)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1000)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:966)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:821)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1000)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:966)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:821)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2632)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1658)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:501)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:422)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    java.lang.ClassCastException
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.setWhereClauseFromCriteria(OAViewObjectImpl.java:1589)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(OAViewObjectImpl.java:4484)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:574)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:544)
         at oracle.jbo.server.ViewRowSetImpl.executeDetailQuery(ViewRowSetImpl.java:619)
         at oracle.jbo.server.ViewObjectImpl.executeDetailQuery(ViewObjectImpl.java:3311)
         at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3298)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQuery(OAViewObjectImpl.java:444)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.initQuery(OAViewObjectImpl.java:719)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.setCriteriaOnVO(OAWebBeanHelper.java:2268)
         at oracle.apps.fnd.framework.webui.OAQueryHelper.handleSubmitButton(OAQueryHelper.java:2689)
         at oracle.apps.fnd.framework.webui.OAQueryHelper.processFormRequestAfterController(OAQueryHelper.java:1248)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:820)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.OAQueryHelper.processFormRequest(OAQueryHelper.java:1036)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processFormRequest(OAStackLayoutBean.java:370)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1000)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:966)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:821)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processFormRequest(OAStackLayoutBean.java:370)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1000)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:966)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:821)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1157)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1000)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:966)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:821)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1000)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:966)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:821)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2632)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1658)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:501)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:422)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)

  • How to use a global variable for reading a query resultset in JDBC lookup?

    Hi Friends,
    Using JDBC lookup, I am trying to read from a table Emp1 using a user defined function. In PI 7.0, this function returns values of a single column only even if you fire a " Select * " query. I am planning to use a global variable(array) that stores individual column values of the records returned by a "select *" query. Need pointers on as to how a global variable can be declared and used to acheive the above scenario. Kindly explain with an example. Any help would be appreciated.
    Thanks,
    Amit.

    Hi Amit,
    Sounds like a good idea but then you would need an external db and update the table in a thread safe way !.
    Regarding your question as to how to work with global variable please refer https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/1352. [original link is broken] [original link is broken] [original link is broken]
    Rgds
    joel

  • Use BAM in ALBPM  --- How to use "Business Indicator variable" ?

    In ALBPM60_Studio_ReferenceGuide.pdf, there is text like that:
    Using Variables in BAM
    When creating a Project variable, you can define it as a Business Indicator variable. This allows the variable to be stored in BAM the database.
    When you add Business Indicator variable to your process, a column is added to the following BAM database tables:Workload, Task Performance and Process Performance. The name of this column is the Business Indicator name preceded by the prefix "V_".
    If you define a business dimension, the workload table contains one row for each possible value of this business dimension present in the process. Each of this rows will show the quantity of instances that match that business dimension.
    When you define a measurement business variable the sum of this variable's value for all in flight is stored into workload table. If business dimensions were defined as well, then this sum will be divided into as many rows as business dimension values present in flight instances.
    Task performance table stores one row for each instance that completes an activity. Each of these rows contains the value of dimensions and measurements at the time the instance completed the activity.
    In a similar way, process performance table stores one row for each instance that gets to the end activity. Each of these rows contains the value of dimensions and measurements at the time the instance completed the whole process.
    QUESTION:
    1. What's meaning is that writed in bold italic? (Can anybody give me a samaple?)
    2. How to use Range of Business Indicator variable?(When I set range in my sample,this varible can't save into BAM_WORKLOAD, BAM_TASKPERFORMANCE, BAM_PROCESSPERFORMANCE)
    Edited by just9doit at 01/15/2008 10:18 PM

    Hi Saket,
    Check the Tcode - BUPA_DEL.

  • How to use windows environment variable "%appdata%" in TEXT_IO built-in

    Hello Sir/Madam,
    I'm currently using TEXT_IO built-in package to write data file user's "C" drive in Oracle Forms 6i on Windows XP OS. We are in the process of upgrading the OS to Windows7. This new version does not allow to write to "C" or "D" drive. I was wondering how I can use windows environment variable "%appdata%" in this built-in to write the data file to user's AppData folder?
    I would appreciate your help.
    Regards,
    Vani Sonti

    You are obviously not familiar with the architecture of webforms. See here http://www.oracle.com/technetwork/developer-tools/forms/275632-133265.pdf
    I guess you are running your forms locally, so the forms server and the client run on the very same machine. This won't be the case once you run in production, as you will have an application server and clients connecting to the server.
    text_io, tool_env and all the forms built ins will be executed on the machine the forms runtime runs on, and in a 3 tier architecture this is the application server, not the client as the real client will run just a java applet which actually just does what the forms runtime on the server tells it to do (or passes client side events like mouse clicks to the forms runtime on the server).
    A very simple explanation for the architecture would be that the whole GUI part has been ripped off the forms runtime and put into a java applet; the logic part (the old-fashioned forms runtime) where the whole Forms PL/SQL code is executed communicates with the GUI part (which is implemented as a java applet) via HTTP, so there is no need to have both running on the very same machine.
    So if you are writing a file with text_io on c:\dummy.txt this file will be generated on the application server machine as it is executed where the forms runtime runs. If you read environment variables with tool_env.getvar you will get the environment variable from the application server machine.
    If you need those variables from your application server then those built-in packages are what you need, but if you need the real client variables there is no way around java in webforms 6i. But the beans should be simple enough to have them written within no time ;)
    cheers

  • HOW TO USE ATTRIBUTE VALUE IN FOX FORMULA LOOP

    HI,
    IAM SUMMING UP AMOUNT BASED ON BELOW COMBINATION AND THROWING MESSAGE IF AMOUNT IS EXCEEDING OPENPO VALUE....AND IS WORKING FINE...NOW I HAVE A ENHANCE MENT THAT I HAVE TO USE ATTRIBUTE PROFIT CENTER VALUE IN THE LOOP. I HAVE DECLARED THIS --- PC = ATRV('0PROFIT_CTR',CC,CA). AND TRY TO USE PC IN LOOP..BUT SYSTEM PROPOSING PC SHOULD BE FIELD TO BE CHANGED..BUT IN MY CASE IT IS ATTRIBUTE WHICH WILL DISPLAY IN LAYOUT...AND FIRST LOOP SHOULD HAPPEN BASED ON PC ( FOREACH CCODE,FP,CR,CA,GL,PO,PC.)....PLEASE PROVIDE UR HELP.
    DATA SUM1 TYPE F.
    DATA SUM TYPE F.
    DATA PO TYPE EBELN1.
    DATA GL TYPE 0GL_ACCOUNT.
    DATA CC TYPE 0COSTCENTER.
    DATA VN TYPE 0VENDOR.
    DATA SN TYPE SCRNUM1.
    DATA SD TYPE SCRDATE.
    DATA VS TYPE KDATB.
    DATA VE TYPE KDATE.
    DATA CCODE TYPE 0COMP_CODE.
    DATA CA TYPE 0CO_AREA.
    DATA FP TYPE 0FISCPER.
    DATA CR TYPE XPRV_CIR.
    DATA PC TYPE 0PROFIT_CTR.
    CCODE = VARV('XCOMPCO').
    CA = VARV('XCOAREA').
    FP = VARV('XPERIOD').
    CR = VARV('XPRVCIRC').
    PC = ATRV('0PROFIT_CTR',CC,CA).
    FOREACH CCODE,FP,CR,CA,GL,PO,PC.
    SUM = 0.
    FOREACH CC,VN,SN,SD,VS,VE.
    IF {0AMOUNT,CCODE,CC,CA,FP,GL,PC,VN,PO,VS,VE,SD,SN,CR}
    {OPENPOVAL,CCODE,CC,CA,FP,GL,PC,VN,PO,VS,VE,SD,SN,CR}.MESSAGE E001(UPF)WITH
    'PROVISION AMOUNT SHOULD BE LESS THAN OPENPOVALUE'.
    ELSE.
    SUM = SUM +
    {0AMOUNT,CCODE,CC,CA,FP,GL,PC,VN,PO,VS,VE,SD,SN,CR}.
    ENDIF.
    ENDFOR.
    FOREACH CC,VN,SN,SD,VS,VE.
    IF {0AMOUNT,CCODE,CC,CA,FP,GL,PC,VN,PO,VS,VE,SD,SN,CR} = 0
    AND
    {OPENPOVAL,CCODE,CC,CA,FP,GL,PC,VN,PO,VS,VE,SD,SN,CR} = 0.
    SUM1 = 0.
    ELSE.
    SUM1 = SUM.
    ENDIF.
    IF SUM1 >
    {OPENPOVAL,CCODE,CC,CA,FP,GL,PC,VN,PO,VS,VE,SD,SN,CR}.
    MESSAGE E001(UPF)WITH
    'PROVISION AMOUNT(SUM) SHOULD BE LESS THAN OPENPOVALUE'.
    ENDIF.
    ENDFOR.
    ENDFOR.
    THANKS,
    RAJA

    Hi,
    If you want to read the value of profit center using keyword ATRV then you need to input values of parameters CC and CA.
    Now the first line that you have written, to derive PC based on CC and CA
    PC = ATRV('0PROFIT_CTR',CC,CA).
    [code}
    here CC value is not determined at runtime ; I mean what will be the value of CC when this line is executed. This line is not inside any foreach loop nor you are reading the value of CC using any variable.
    if you want to use PC in first FOREACH CCODE,FP,CR,CA,GL,PO,PC. loop then CC value have to be  present.
    Put ATRV code inside a loop where CC and CA values are read.
    Thanks
    Pratyush

  • How to use Material Group in substitution rule

    Hello,
    Anyone experience in how to use the entry of the material group of a PO, in a substitution rule for accounting documents.
    I have noticed the material number can be used within a substitution rule, and is also available in BSEG... so far have not find a solution to do this for a material group.
    Please note, this is applicable for PO with no materials (ONLY a material group to use for account determination).
    Many thanks,
    Daan

    forget about all varible in essbase CSC
    it's bad practics.^^^Is it?
    Essbase cube are self big array )^^^That's what makes ARRAY so cool -- you can set up an array that encompasses a dimension.
    Example straight from a HBR:
    ARRAY SomeArray["Entity"] ;
    Regards,
    Cameron Lackpour

  • How to use Counter and variable in xslt

    All,
    How to use Counter in XSLT, and How to do a increament for a count variable?
    How to use a Variable in xslt? and How to define variable inbetween XSLT
    If I am using
    Count=Count+1, its throwin an error ...
    Error: Text is not Supported Under a XSLT Element: $count=$count+1
    Regards
    Francis
    Edited by: Francis on Aug 23, 2012 9:33 AM
    Edited by: Francis on Aug 23, 2012 11:23 AM

    How to use a Variable in xslt? and How to define variable inbetween XSLT
    <xsl:variable name="VariableName">
    <xsl:value-of select='/ns0:SyncItemListEBM/ns0:DataArea/ns0:SyncItemList/corecomEBO:ItemSpecificationGroup/corecom:SpecificationGroup[corecom:Name = "GROUP_NAME"]/corecom:Specification[corecom:Name = "SPECIFICATION_NAME"]/corecom:ValueText'/>
    </xsl:variable>
    How to use Counter in XSLT, and How to do a increament for a count variable?
    You can make use of for-each tag, its simplified in XSLT where you dont need counter if at all needed then you can use of position() to identify the loop counter.
    Thanks,
    Vijay

  • How to use attributes from different context nodes in one view?

    I am VERY new to the concept of CRM and currently working on creating an alternate version of the BP_HEAD_SEARCH. With help from SAPPRESSs book 'SAP CRM Web Client' i was ble to create my own simple Z-component.
    However after going back and forth the book and the forum (including this [article|https://wiki.sdn.sap.com/wiki/display/CRM/Howtoaddanexistingfieldtoasearchpageofadifferent+component]) i was not able to find a solution to my problem. My current search uses BuilHeaderAdvancedSearch as context node for searching. But the search should also be able to use attributes from BuilActivity, which is directly related to BuilHeader. I can't seem to find a way to get attributes from BuilActivity into the search window of my component without having to change SAP-Standard.
    Is this really the only way? Please advise on possible code and insertion point.

    Any suggestions?

  • How to use a bind variable in an IN clause

    I am trying to use a bind variable in an IN clause where the column is a varchar2 type. Something like:
    select *
    from test
    where test_column in (:bindVariable)I have tried assigning the bind variable comma separated strings (eg. test,test,test) and comma separated strings with quotes (eg. 'test','test','test'). Neither of these work. Does anyone know the correct way to do this?
    Thanks in advance.

    http://tkyte.blogspot.com/2006/06/varying-in-lists.html
    Presents many options.

Maybe you are looking for