Defining AUTHID CURRENT_USER dynamically

HI,
I would like to set up all my Oracle 10G procedures and functions to be defined as AUTHID CURRENT_USER dynamically, such as
ALTER PROCEDURE MYPROC1 AUTHID CURRENT_USER.
Is there a way to do this dynamically or do I have to owerwrite every sources to do this ?
Thx in advance.

Hi,
I need to do this in a specific migration case where I do have several schemas having the same tables.
I'm really surprised I can't do this dynamically, perharps by changing the sys table named procedure$

Similar Messages

  • AUTHID CURRENT_USER

    Hi,
    What is the difference between two..
    CREATE OR REPLACE FUNCTION func_temp
    RETURN NUMBER
    AUTHID CURRENT_USER
    AS
    BEGIN
    RETURN 1;
    END;
    and
    CREATE OR REPLACE FUNCTION func_temp
    RETURN NUMBER
    AS
    BEGIN
    RETURN 1;
    END;
    Please tell me what its the use of AUTHID CURRENT_USER here.
    Thanks,
    Vinod

    By default, stored procedures and SQL methods execute with the privileges of their owner, not their current user. Such definer's rights subprograms are bound to the schema in which they reside, allowing you to refer to objects in the same schema without qualifying their names. For example, if schemas HR and OE both have a table called departments, a procedure owned by HR can refer to departments rather than HR.departments. If user OE calls HR's procedure, the procedure still accesses the departments table owned by HR.
    If you compile the same procedure in both schemas, you can define the schema name as a variable in SQL*Plus and refer to the table like &schema..departments. The code is portable, but if you change it, you must recompile it in each schema.
    A more maintainable way is to use the AUTHID clause, which makes stored procedures and SQL methods execute with the privileges and schema context of the calling user. You can create one instance of the procedure, and many users can call it to access their own data.

  • Using AUTHID = CURRENT_USER and Apex

    I'm new to Apex and am just assessing if we can make use of it, mainly for reporting functionality in our existing web based application.
    We have a schema that holds all of our procedures, packages, functions etc and they all have AUTHID = CURRENT_USER so each user can have their own set of tables in their own schema.
    I want to be able to create reports in Apex that will then report on the users table in their own schema but I can't quite work out how Apex actually works. Can I tell something in Apex to use AUTHID = CURRENT_USER?
    We used Webdb many years ago and that created the runtime package for all the forms and reports but I can't see anything that Apex creates so I assume it stores all the code in a table somewhere?
    Thanks
    Robert

    Hi Scott,
    does that mean, there is no way to make these packages work? Not even with additional direct grants to apex_public_user? I am aware of the implications but we have a significant amount of code using packages with authid current user.
    Our situation:
    We have four oracle schemas involved in a multi tenant application.
    GLB : Global objects
    BEE: tenant 1
    SIX: tenant 2
    IAM: tenant 3
    Then we have the user APEX_SCM. There we store the tables and objects for the APEX application. This is the parsing schema for the application.
    During page rendering we try change the CURRENT_SCHEMA to one of the tenants:
    declare
      l_sql varchar2(2000);
    begin
      if :P42_BRAND is null then
        :P42_BRAND := 'SIX';
      end if;
      l_sql := 'alter session set current_schema=' ||:P42_BRAND;
      apex_application.debug(l_sql);
      execute immediate l_sql;
    end;Then we call a stored function returning the report result:
    select *
    from table(six.inv_val_report_pack.fn_rpt_ar_nlf(to_number(:P42_BL_INV_CHECK_ID))) t,
      apex_scm.st_sor_v s, six.ls, ar
    where s.st_sor_id(+) = t.st_sor_id
    and ls.ls_id(+) = t.ls_id
    and ar.ar_id(+) = t.ar_idThe function is in a package with invoker rights:
    create or replace package inv_val_report_pack
    authid current_user
    is
    ...Now my questions:
    1) Is there a way to make this work (using invoker rights packages)?
    2) We cannot get the name resolution to work. Does execute immediate 'alter session set current schema=SIX' work at all? It seems to be ignored.
    I ran a test in the sql workshop as the parsing schema APEX_SCM.
    declare
    l number;
    begin
      execute immediate 'alter session set current_schema=SIX';
      select null into l from ls
      where rownum=1 ;
    end;
    /It only worked after I created a local synoynm for ls in the schema APEX_SCM. Weird, it seems like 'alter session set current schema=SIX' is just plain ignored.
    Any help would be greatly appreciated, by anyone ;).
    Thanks,
    ~Dietmar.

  • Equivalent for AUTHID CURRENT_USER in view

    Hi, I'm facing a problem with a view which belongs to user a and I would like to select tables from user b.
    Exemple :
    user a - table MYTAB
    user b - table MYTAB
    done by user a : "create or replace view MYVIEW as select * from MYTAB"
    grants and synonyms done for both users
    if I execute from user b : "select * from MYVIEW", I get the data from a.MYTAB, not b.MYTAB
    What can I do to force MYVIEW to select from current user's table ? (juste like the AUTHID CURRENT_USER for procs)
    Do I have to create the view in all schemas ?
    Thx in advance

    I wanted exactly the same thing. It's not ideal, but here is what I did. I did it like this so that I can hide away any complexity from other users, and just give them a view that they need not worry about the internal nuts and bolts of.
    It's a bit fiddly, but it goes like this.
    1. In schema A, create an AUTHID CURRENT_USER package. Let's call it pkg_A.
    2. Add a PIPELINED table function to pkg_A, let's call it pipe_rows. For this thread/example, into this function you put the query in question.
    3. Or, you might put the query in a global, public pkg cursor. That way, you can declare a TABLE of that %ROWTYPE. A pipelined function can then return this table-type.
    4. In schema B, create a view, let's call it pkg_A_pipe_rows_vw_in_B. Yes, this means creating a view in Schema-B, which we were hoping to avoid, but this is really simple, and now all the 'nuts and bolts' are common, generic, and hidden away in Schema-A. This view is as simple as:-
    CREATE OR REPLACE VIEW pkg_A_pipe_rows_vw_in_B AS
    SELECT * FROM TABLE(pkg_A.pipe_rows);Note, this view MUST be in Schema-B, as previously pointed out, a view <b>always</b> resolves to objects in the schema into which the view is compiled. This is very confusing, given that the package being called is AUTHID CURRENT_USER.
    This code demo's points 1-3.
    CREATE OR REPLACE PACKAGE pkg_A
    AUTHID CURRENT_USER AS
        CURSOR G_PIPE_CSR IS SELECT * FROM DUAL; -- not good eg, need tab in BOTH schemas with diff data
        TYPE G_PIPE_TABLE IS TABLE OF G_PIPE_CSR %ROWTYPE;
        FUNCTION pipe_rows
        ( param1 IN VARCHAR2 := 'DEFAULT' ) -- can pass params but not from the view in (4) so must default
        RETURN G_PIPE_TABLE
        PIPELINED;
    END;
    CREATE OR REPLACE PACKAGE BODY pkg_A AS
        FUNCTION pipe_rows
        ( param1 IN VARCHAR2 := 'DEFAULT' ) -- can pass params but not from the view in (4) so must default
        RETURN G_PIPE_TABLE
        PIPELINED IS
            l_pipe_row G_PIPE_CSR %ROWTYPE;
        BEGIN
            OPEN G_PIPE_CSR;
            LOOP
                FETCH G_PIPE_CSR INTO l_pipe_row;
                EXIT WHEN G_PIPE_CSR %NOTFOUND;
                PIPE ROW(l_pipe_row);
            END LOOP;
            RETURN;
        END;
    END;
    /As you can't pass params from the view in schema-B, what you can do is provide further 'set' procedures in the package which assign values to global vars, then use the global vars (or public 'get' functions that return the same), when you issue the query. This, again, isn't brilliant. You could set local vars based on the user-id, time of day, etc, etc, and use these in the query.
    Btw, I disagree with William's point:->
    For this reason invoker's rights procedures are usually best for utilities that don't do DML.>
    Providing these utilities are well advertised as resolving against the CURRENT_USER's schema, this is how you can provide generic access mechanisms for like-data in disparate schemas. For example, we are client driven, client A's data is separate from client B's data, but we provide the same service to both parties. (Although, William did say "usually"!)
    Regards,
    Cloink.

  • Creation/Defining a new dynamic Timecard Template

    OTL Gurus,
    My requirement is to create/define a new dynamic timecard template like 'Projects Assignments' which populates the timecard project number,expenditure type fields etc...Is there a way?
    Thanks & REgards,
    Sameer. T

    Hi Brajesh,
    Thanks for your answer. The same thing I tried earliar as well. I  defined an additional role as CBIH30 for "Customer" with same BP category as of "External Person- CBIH10" .
    Above is not solving my purpose, as I am not getting the option of selecting "Customer" in the F4 values of "Person group" on the "Involved" tab of any Incident accident log; t-code CBIH82.
    There should be some way to integrate the created BP roles to the Incident / Accident Log in particular, with some definable person group say "D" here to associate with.
    To ask my question in another way, how and where person groups(A,B,&C) have been defined and integrated with the relevant BP roles ?
    Also, If I am selecting any person with say group "External Person" , would the person records be fetched from SAP HR standard tables, or there would be different table for external group of persons i,e not an employee. Clients may wish to differentiate and hence separately maintain data for employees and any external person. How exactly this can be taken care of?
    Thanks & regards
    Pavan

  • Define Field Symbols Dynamically

    Hi,
    Is it possible to define field symbols dynamically based on some naming convention? If yes, please let me know how to do that.
    Thanks & Best Regards,
    Kumar.

    I have this code in a loop that does this
        CONCATENATE 'TYPE' zlmltyp-ztext_key '_' zlmstyp-scrnseq
          INTO wk_fldname.
        CONCATENATE wk_fldname '-DATE' INTO fldname.
        ASSIGN (fldname) TO <text_fld>.
        <text_fld> = wa_zlmstat-erdat.
        CONCATENATE wk_fldname '-CURR_STATUS' INTO fldname.
        ASSIGN (fldname) TO <text_fld>.
        IF  wa_zlmstat-ltype  = zlmlead-ltype
        AND wa_zlmstat-status = zlmlead-status.
          <text_fld> = 'X'.
        ELSE.
          CLEAR <text_fld>.
        ENDIF.
    the fields are defined like this
    DATA:
      BEGIN OF scrn_stat_rec,
        ltype            TYPE zlmltype,
        status           TYPE zlmstatus,
        descrip          TYPE zstypex,
        date             LIKE sy-datum,
        curr_status      TYPE c,
        specstatdate     TYPE z_scrn_date,
        auth             TYPE zlmauth,
      END OF scrn_stat_rec,
      type100_01         LIKE scrn_stat_rec,
      type100_02         LIKE scrn_stat_rec,
      type100_03         LIKE scrn_stat_rec,
      type100_04         LIKE scrn_stat_rec,
      type100_05         LIKE scrn_stat_rec,
      type100_06         LIKE scrn_stat_rec,
      type100_07         LIKE scrn_stat_rec,
      type100_08         LIKE scrn_stat_rec,
      type100_09         LIKE scrn_stat_rec,
      type100_10         LIKE scrn_stat_rec,
      type200_01         LIKE scrn_stat_rec,
    ***  all the way to
      type600_09         LIKE scrn_stat_rec,
      type600_10         LIKE scrn_stat_rec,
      type700_01         LIKE scrn_stat_rec,
      type700_02         LIKE scrn_stat_rec,
      type700_03         LIKE scrn_stat_rec,
      type700_04         LIKE scrn_stat_rec,
      type700_05         LIKE scrn_stat_rec,
      type700_06         LIKE scrn_stat_rec,
      type700_07         LIKE scrn_stat_rec,
      type700_08         LIKE scrn_stat_rec,
      type700_09         LIKE scrn_stat_rec,
      type700_10         LIKE scrn_stat_rec.

  • Authid current_user using

    Hello,
    I have question regarding authid current_user.
    What is the disadvantages of using AUTHID CURRENT_USER for developer?
    What is the advantages of using AUTHID CURRENT_USER for dba?
    Thanks a lot,

    Hi Scott,
    does that mean, there is no way to make these packages work? Not even with additional direct grants to apex_public_user? I am aware of the implications but we have a significant amount of code using packages with authid current user.
    Our situation:
    We have four oracle schemas involved in a multi tenant application.
    GLB : Global objects
    BEE: tenant 1
    SIX: tenant 2
    IAM: tenant 3
    Then we have the user APEX_SCM. There we store the tables and objects for the APEX application. This is the parsing schema for the application.
    During page rendering we try change the CURRENT_SCHEMA to one of the tenants:
    declare
      l_sql varchar2(2000);
    begin
      if :P42_BRAND is null then
        :P42_BRAND := 'SIX';
      end if;
      l_sql := 'alter session set current_schema=' ||:P42_BRAND;
      apex_application.debug(l_sql);
      execute immediate l_sql;
    end;Then we call a stored function returning the report result:
    select *
    from table(six.inv_val_report_pack.fn_rpt_ar_nlf(to_number(:P42_BL_INV_CHECK_ID))) t,
      apex_scm.st_sor_v s, six.ls, ar
    where s.st_sor_id(+) = t.st_sor_id
    and ls.ls_id(+) = t.ls_id
    and ar.ar_id(+) = t.ar_idThe function is in a package with invoker rights:
    create or replace package inv_val_report_pack
    authid current_user
    is
    ...Now my questions:
    1) Is there a way to make this work (using invoker rights packages)?
    2) We cannot get the name resolution to work. Does execute immediate 'alter session set current schema=SIX' work at all? It seems to be ignored.
    I ran a test in the sql workshop as the parsing schema APEX_SCM.
    declare
    l number;
    begin
      execute immediate 'alter session set current_schema=SIX';
      select null into l from ls
      where rownum=1 ;
    end;
    /It only worked after I created a local synoynm for ls in the schema APEX_SCM. Weird, it seems like 'alter session set current schema=SIX' is just plain ignored.
    Any help would be greatly appreciated, by anyone ;).
    Thanks,
    ~Dietmar.

  • How to change the text of a user defined field in dynamic selections?

    Logical Database PSJ is used by t code CJI3 - we added a couple of user fields into the dynamic selections of CJI3.
    Now - how to change the text of this user filed (USR01 of structure PRSP_R in logical database PSJ)?
    Found an OSS note - 86980 - that tells that this is not possible.
    But when we read the documentation on the user field (CJI3 - dynamic selections  - double click on user field - F1), it shows the following text:
    User-defined field in which you can enter general information with a length of up to 20 characters.
    Dependencies
    The names (key words) for  user-defined fields depend on the field key.
    Now the question is where to change the field key..
    Thanks,
    Ven

    Madhu - you did not get the question I think.
    Anyways - I found an OSS note 1266643 - this code change should take care of the issue - it will then reflect the details maintained in custoizng at transaction code OPS1..
    Thanks,

  • Error in User defined function for dynamic file naming

    Hi,
    While creating User Defined function with this following code for dynamic fieldname
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String ourSourceFileName = conf.get(key);
    return ourSourceFileName;
    which options should i select for cache Value, Context, Queue
    for Augument , what name shd i mention.
    Regards,
    Varun

    Hi Varun,
    I guess I have answered a similar question just a few minutes before on very similar post from you. Just pasting the same here .................
    Are you trying to access the ASMA values from the SOAP header of the XI message for the source file name?
    First of all you need to Set the Sender File Adapter for Set ASMA and then file name. So it will work fine when you actually run the scenario end to end.
    But in the mapping tool when you test the mapping - there is not message header updated with the actual source filename - and whenever you try to read the FileName attribute in the message header from the UDF - it cannot find the object and returns a NullPointerException.
    I would suuggest for your mapping tool testing to be successful, have a check in the java code for null values,
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String ourSourceFileName = conf.get(key);
    If (ourSourceFileName != null)
       Return ourSourceFileName;
    Return "NoFileName.txt";
    Let us know if this works.
    Regards,
    Suddha

  • Defining index in Dynamic parallel processing of workflow

    Hi all,
    I am using dynamic parallel processing feature in workflow for a particular multi-line element. But I am not able to define the index in that particular task.
    Consider that i have a multi-line element "Material". For this element, I need to loop that task for that n number of records. so i am using dynamic parallel processing. Now for each workitem generated, i need to show that particular material in the workitem. I remember that we need to use index, but i couldn't recollect how it is defined.
    Could anyone help me in this regard?
    Thanks in advance

    Nikhil,
    When you use dynamic parallel processing the index is available in <b>_Wf_ParForEach_Index</b>. A reference for the line of the multi line element is automatically generated for each work item created. You can see this in the Binding Editor for the step. In your case this will be "Material()". When you drag this element to the WF to Step binding window, it will be resolved as "&Material[&_Wf_ParForEach_Index&]&. Therefore you can get the material for each WI by defining "Material" in your task container (not as multiline) and doing the appropriate binding. If you in fact need the Index in your method, you can define a container element your task with reference to Type SWC_INDEX and bind to ]_Wf_ParForEach_Index.
    Cheers,
    Ramki Maley.
    Please reward points if the answer is helpful.
    For info on awarding points click on this link: https://www.sdn.sap.com/sdn/index.sdn?page=crp_help.htm

  • Defining Variant with Dynamic values

    I want to schedule a report say Me2N so that every day it will give me purchase orders created today. I am defining variant for it. How to define Document date in variant so that every day it takes currrent system date.

    Hi,
    In the ME2N transaction code when you are saving the variant, you can set up the status of field. Here if you will scroll right you can see last three columnu2026SELECTION VARIABLE, OPTION AND NAME OF VARIABLE(input only using F4)
    Now in the third last column (SELECTION VARIABLE) press F4 and select the D(Dynamic date calculation) and after this click on last column from right side NAME OF VARIABLE and select the CURRENT DATE and save the varient.
    Now this variant will take the document date every day as a todayu2019s date.
    I hope it will help.
    Regards,
    Manish

  • Define mail attributes, dynamic action

    I am attempting to set up a dynamic action that is triggered when the STATE field in IT0000-0001 is changed. I am using the Send Mail step indicator M using feature M0001.
    My question is how shall I test it, where shall I put My mailid. Does it works for external mail as well
    Pls guide.
    rgds
    AJ

    Hi AJ,
    Yes. This can be made to work for external emails as well. Hope you have created an entry in the view V_T588Z for calling the feature M0001 on change in the required field.
    Now you need to create a distribution list which contains the email id of your IT support. You can create a distribution list (DL) in transaction SO04. Even if you have just one email id as the recipient never mind just create a DL for this single email id and name it as say “DL_FOR_IT_MAIL”.
    Now you need to create the text content for you mail. For this you need to proceed to transaction SO10. Enter the required text name for example “MAIL_TO_IT_SUPPORT” and choose the text id as PAMA. Now click on create. Enter all the content that you need to send out as email.
    Once the above steps are done you need to configure the feature M0001. For this go to PE03 and enter M0001 and choose decision tree. Click on "Change". Under the decision tree you will find some configurations already existing for infotypes 0001, 0006 and 0002. Now keep your cursor on "INFTY" and click on create. You will be presented with a list of infotypes. Select infotype 0000.
    Now an entry for 0000 will be added to the decision tree. Keep the cursor on the string "0000" and click on create. A pop up window for choosing node types is opened. Select the option "Return Table" and click ok. You will get a window with a series of blank rows. Here you will have to enter the following entries in the rows,
    IDTXT  MAIL_TO_IT_SUPPORT
    OUTBX  X
    DISTR  DL_FOR_IT_MAIL
    After doing this configuration your system would send the email to the distribution list with content defined in MAIL_TO_IT_SUPPORT.
    Note: Your SMTP settings have to be configured properly by your basis team. Even if it is not ready you can create an entry of 0000 infotype and check the transaction SOST. If the dynamic action was successful in sending the email you will find an entry here.
    Follow these steps and let me know if you have any problems.
    Thanks,
    Prasath N
    <b>P.S:</b>
    The return table content should be read as
    <b>IDTXT</b><single space><b>MAIL_TO_IT_SUPPORT</b>
    <b>OUTBX</b><single space><b>X</b>
    <b>DISTR</b><single space><b>DL_FOR_IT_MAIL</b>
    Message was edited by:
            Prasath Natesan

  • IP - Rows defined individually, Columns dynamic for

    Hi,
    If I want to create a ready to input Query for my First Version of the year, I don´t have Actual Data, so I don´t have combination of characteristics. I need a blank template, I want to open 12 months of the year and  I know the GL Accounts that the user needs to planning, the user only has to select the Cost Center and the Version. How I do that at IP? In BPS when I created the planning layout I selected the option "Key figure in data columns, rows defined individually" and " Columns dynamic for 0calmonth".
    Thanks for your help.

    Hi.
    In Bex query restrict the parameters CostCenter and Version by variables (user will be able to choose any values).
    Then restrict 0CALMONTH for 12 required monthes.
    Next, restrict GL account and put it in rows area.
    Next, put KF in rows, ensure that it is enabled for planning ("planning" tab - input ready relevant for lock).
    Then drug and drop 0CALMONTH (or whatever) above the KF.
    Ensure that for 0CALMONTH is set as "Master Data" in 'Advanced" tab.
    Regards.

  • How to define data types dynamically

    Need to define a data type at the runtime without referencing it to any structure or ddid objects whatsoever.
    i.e. say I select a list of fields based on some condition and create an internal able whose structure is same as the list of fields that
    I have selected.
    I did go through documentation on field symbols but I could not find anything on field symbols that achieved this without referencing a predefined structure.
    Say I get the following fields from some Z table based on a specific query,I need to construct a internal table based on this structure.
       mandt
       carrid
       connid

    Well, I think you will need to have the table name as well as the field name when getting the DDIC information.  Just having the field name is not enough here.  So if you have an internal table with the field names, you may want to add the table name as well or add another field to your internal table, which contains the table name.  In the below example, I am adding fields dynamically to the GT_COMPONENTS tab, you will want to do this, instead you will loop at your internal table, and pass the names of the fields and the table/field name to the DESCRIBE_BY_NAME method.
    TYPE-POOLS:
      abap.
    DATA:
      gr_structdescr    TYPE REF TO cl_abap_structdescr,
      gr_tabledescr     TYPE REF TO cl_abap_tabledescr,
      gr_datadescr      TYPE REF TO cl_abap_datadescr,
      gt_components     TYPE abap_component_tab,
      gw_component      TYPE LINE OF abap_component_tab,
      gr_wa             TYPE REF TO data,
      gr_tab            TYPE REF TO data.
    FIELD-SYMBOLS: <fs_wa> TYPE ANY.
    FIELD-SYMBOLS: <fs_tab> TYPE table.
    START-OF-SELECTION.
    * determine components of structure -> GT_COMPONENTS
      MOVE 'MANDT' TO gw_component-name.
      gw_component-type ?= cl_abap_elemdescr=>DESCRIBE_BY_NAME( 'SPFLI-MANDT' ).
      INSERT gw_component INTO TABLE gt_components.
      MOVE 'CARRID' TO gw_component-name.
      gw_component-type ?= cl_abap_elemdescr=>DESCRIBE_BY_NAME( 'SPFLI-CARRID' ).
      INSERT gw_component INTO TABLE gt_components.
      MOVE 'CONNID' TO gw_component-name.
      gw_component-type ?= cl_abap_elemdescr=>DESCRIBE_BY_NAME( 'SPFLI-CONNID' ).
      INSERT gw_component INTO TABLE gt_components.
    * get structure descriptor -> GR_STRUCTDESCR
      gr_structdescr ?= cl_abap_structdescr=>create( gt_components ).
    * create work area of structure GR_STRUCTDESCR -> GR_WA
      CREATE DATA gr_wa TYPE HANDLE gr_structdescr.
      ASSIGN gr_wa->* TO <fs_wa>.
      gr_datadescr ?= gr_structdescr.
      gr_tabledescr ?= cl_abap_tabledescr=>create( gr_datadescr ).
    * Create dynmaic internal table
      CREATE DATA gr_tab TYPE HANDLE gr_tabledescr.
      ASSIGN gr_tab->* TO <fs_tab>.
    REgards,
    Rich Heilman

  • Problems with User Defines Mapping Objects - Dynamic Configuration

    We have a mapping object that takes data passed in from R3 and does an HTTP Post to another system using a URL and file name that is passed from the header record. We had a consultant set this up for us last year and in creating the new one we just pretty much copied what he did. The problem is, it is not working for us. We have the url and file name, we pass it to the user defined code that is supposed to pass it to the url and file name in the configuration. The java code looks like this:
    public String getPcurlOut(String pcurl,Container container){
    String ourSourceFileName = "START";
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    if (conf != null) {
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","Directory");
    conf.put(key, pcurl + ".xml");
    ourSourceFileName = conf.get(key);
    } else {
    ourSourceFileName = "conf == null";
    Basically we want to pass a url and file name to our communication channel based on values that come from our file in R3
    It is almost exactly like the one that works. Can anyone help with this?
    Thanks
    Mike
    Message was edited by:
            Michael Curtis

    Hi Michael
    <i>Basically we want to pass a url and file name to our communication channel based on values that come <b>from our file in R3</b></i>
    --> This means you have file as a sender adapter.
    Check adapter specific message properties in sender adapter.
    Please refer this blog , it is really worth.
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    Also
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","Directory")
    Try writing this as
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","<b>FileName</b>")
    Regards

Maybe you are looking for

  • Regarding RESETLOG and NORESETLOG option while creating a control file

    Hi, I dont understand the need for resetlogs option while creating a controlfile for a db in NOARCHIVELOGMODE. I assume that reset logs clears all the redo log contents. While taking a cold backup what I did was: 1. Shutdown instance 2. Copy all the

  • Display broken? Thunderbolt adapter?

    My display on my 2011 MacBook Pro is broken. For this reason, I'm curious as to whether or not I can buy a Thunderbolt to HDMI adapter for the time being, until I have the money to replace the laptop? When I plug in the adapter will it automatically

  • Get description of tables and columns

    Good afternoon. Is there any option in SAP B1 to get a description of table and column dynamically? That is, without the "Tools -> Queries -> Query Generator"? I am developing an add-on, which lists all the tables and columns of the sap, and I have t

  • Query Manager SQL DateDiff and Parameter Problem

    I’m having trouble with a date calculation in the Query Manager.   I’m wondering if anyone has run into something similar. I am trying to write a query that returns records that are X days old, where X is a parameter input by the user. Here’s an exam

  • TC as HD but not wireless?

    How do you hook up the Ethernet to a iMac and use the TC as a backup (but not as wireless)?