Dynamically pass the date to all the programs in a chain

Hi,
I have a requirement to pass the date to all the programs in the chain. The first step when the chain starts should be to calculate the next batch date from a oracle table, and then pass that date as an argument to all the programs.
For example,
This should be the sequence of steps once the chain has started.
1. Start Chain
2. Step1 - Calculate the next batch date from the oracle table.
3. Step2 - After the successful completion of Step1, run the program with the input parameter as date which is calculated from Step1.
4. End Chain
Please help.

Hi,
The recommended way of doing this is to store tha data to be passed (in this case the date) in a table and have the other steps access it.
If you have many chains, or the same chain used several times, you can use the job name and owner as the primary key for the table. You can then pass the job name and owner into every program as metadata arguments (see define_metadata_argument) so every step knows what job is a part of and can select the data from the table.
Hope this helps,
Ravi.

Similar Messages

  • Dynamically Pass the Column Name cursor. || Dynamic Column Name

    Hi,
    I need to dynamically pass the column name based on a Mapping table in a loop ( Right now i have hardcoded stuff )just like using Execute immediate.... Inside the procedure, I have commented as where i hit the problem.
    Thanks for all of your time...
    Thanks
    Muthu
    CREATE OR REPLACE PROCEDURE xml_testing_clob AS
    doc xmldom.DOMDocument;
    main_node xmldom.DOMNode;
    root_node xmldom.DOMNode;
    user_node xmldom.DOMNode; item_node xmldom.DOMNode;
    root_elmt xmldom.DOMElement;
    item_elmt xmldom.DOMElement;
    item_text xmldom.DOMText;
    item_test xmldom.DOMText;
    nodelist xmldom.DOMNodeList;
    sub_variable varchar2(4000);
    x varchar2(200);
    y varchar2(200);
    sub_var varchar2(4000);
    CURSOR get_users IS
    SELECT FIRST_NAME,LAST_NAME,ROWNUM FROM USER_INFO_TBL WHERE WEIN_NUMBER = '1234' ;
    CURSOR get_cdisc_name IS
    select CTS_COL_NAME,CDISC_NAME from CTS2CDISC_DICTIONARY where CTS_TABLE_NAME = 'USER_INFO_TBL';
    BEGIN
    -- get document
    doc := xmldom.newDOMDocument;
    doc := xmldom.NewDomDocument;
    xmldom.setVersion(doc, '1.0');
    xmldom.setStandalone(doc, 'no');
    xmldom.setCharSet(doc, 'ISO-8859-1');
    -- create root element main_node := xmldom.makeNode(doc);
    root_elmt := xmldom.createElement(doc,'AdminData');
    root_node := xmldom.appendChild(main_node,xmldom.makeNode(root_elmt));
    FOR get_users_rec IN get_users LOOP
    item_elmt := xmldom.createElement(doc,'User');
    xmldom.setAttribute(item_elmt,'OID' , get_users_rec.rownum);
    user_node := xmldom.appendChild(root_node,xmldom.makeNode(item_elmt));
    FOR cv_get_cdisc_name IN get_cdisc_name LOOP
    EXIT WHEN get_cdisc_name%NOTFOUND;
    sub_var := cv_get_cdisc_name.cts_col_name;
    sub_variable := 'get_users_rec.';
    sub_variable := 'get_users_rec.'||cv_get_cdisc_name.cts_col_name;
    x := sub_variable;
    dbms_output.put_line(x); -------------- Here i just see the literal string
    y := get_users_rec.FIRST_NAME;
    dbms_output.put_line(y); -------------- Here i just see actual value ( data )
    item_elmt := xmldom.createElement(doc,cv_get_cdisc_name.cdisc_name);
    item_node := xmldom.appendChild(user_node,xmldom.makeNode(item_elmt));
    item_text := xmldom.createTextNode(doc,x ); ---- This is the place i am hitting with an error .
    If i use variable X then i am able to see only the literal
    string in the output. BUT if i put cursor name.coulmname,
    then the resumt (XML) is fine.I wanted acheive this
    dynamically just like execute Immediate
    item_node := xmldom.appendChild( item_node , xmldom.makeNode(item_text));
    END LOOP;
    END LOOP;
    -- write document to file using default character set from database
    xmldom.WRITETOCLOB(doc,);
    xmldom.writeToFile(doc, 'c:\ash\testing_out.xml');
    -- free resources
    xmldom.freeDocument(doc);
    END;
    +++++++++++++++++++++++++++++++++++ XML OUTPUT +++++++++++++++++++++++++++++++++++++++++
    <?xml version="1.0" ?>
    - <AdminData>
    - <User OID="1">
    <FirstName>get_users_rec.FIRST_NAME</FirstName>
    <LastName>get_users_rec.LAST_NAME</LastName> </User>
    - <User OID="2">
    <FirstName>get_users_rec.FIRST_NAME</FirstName>
    <LastName>get_users_rec.LAST_NAME</LastName>
    </User>
    - <User OID="3">
    <FirstName>get_users_rec.FIRST_NAME</FirstName>
    <LastName>get_users_rec.LAST_NAME</LastName>
    </User>
    - <User OID="4">
    <FirstName>get_users_rec.FIRST_NAME</FirstName>
    <LastName>get_users_rec.LAST_NAME</LastName>
    </User>
    - <User OID="5">
    <FirstName>get_users_rec.FIRST_NAME</FirstName>
    <LastName>get_users_rec.LAST_NAME</LastName>
    </User>
    ++++++++++++++++++++++++++++++++++++++++++++++++++++ MAPPING TABLE DETAILS +++++++++++++++++
    CTS_COL_NAME     CDISC_NAME     CTS_TABLE_NAME     XML_TAG     -----------> Column Name
    FIRST_NAME     FirstName     USER_INFO_TBL     Element     -----------> Records
    LAST_NAME     LastName     USER_INFO_TBL     Element     -----------> Records

    My scenario is little different, let me explain:
    My columns will remain same but values changes (based on column formula) according to the selected prompt value
    If I select 'Oct' from prompt then
    Curr will contain data for 'Oct' only
    Next1 will contain data for 'Nov' only
    Next2 will contain data for 'Dec' only
    Next3 will contain data for 'Jan' of next year only.
    Later if I select 'Jul' from prompt then
    Curr will contain data for 'Jul' only
    Next1 will contain data for 'Aug' only
    Next2 will contain data for 'Sep' only
    Next3 will contain data for 'Oct' only.
    I don't have different columns for each months but the columns are capable to reflect data for any month.
    So, how can I reflect the column name as month name for which that contains data.
    Regards,
    S Anand

  • How to make Field "Period/Fiscal Year" dynamic in the program variant

    HI All,
    We have program called "RCRM_FM_ACL_ACCRUAL_RUN" which is used to calcukate accruals in CRM. This program has got a field "Period/Fiscal Year".
    We want this program to run every day at specific time. So we have created a variant in order to schedule a job with program so that it runs every day and calculates the accrual.
    when we create variant we need to maintain some values in the variant like fund plan id in fund plan id field and period/year in  "Period/Fiscal Year". Normally for date field we have an option to make a field dynamic by selecting value "D" (Dynamic) in selection variable, so it takes date every time as current date automatically and we do not have to change it every day.
    But in program *"RCRM_FM_ACL_ACCRUAL_RUN",* I could not find the option "D" for the field "Period/Fiscal Year". Because of this we have to change the "Period/Fiscal Year" manually every time when ever period/year gets changed. we want this to be done automatically.
    Can any onet tell me why we are not able to find the optin "D" (Dynamic) in the program "RCRM_FM_ACL_ACCRUAL_RUN". Do we need to do any settings for that.
    or
    Is there any other way to full fill my requirement i.e period/year get updated automatically with current period/year every time when period/year gets changed.
    Thanks in advance,
    JM.

    Hi,
    Using function-modules "RS_VARIANT_CONTENTS" and RS_CHANGE_CREATED_VARIANT and table tvarvc, you can make your variant dynamic. You just need to write a small piece of code using these FMs.

  • How to translate the text dynamically in the program?

    Hi All,
    I have a requirement where I need to translate the text dynamically in the program based on the Language Key retrieved.
    Let's say that the Login language is 'EN' and in the logic has retrieved the language 'IT'(based on some conditions). I have to transate the text(which is maintained using the text elements) to ITALIAN(IT) Language and send the same as an email.
    Could you please tell me if any Function Module is available in SAP which translates the text Dynamically in the program. or is there any other way to translate the text dynamically in the program.
    Could you please share your valuable inputs? Thank you in advance.
    Thanks & regards,
    Paddu.

    you could use SET LOCALE LANGUAGE myLanguage - so you can switch to the desired language and all texts will selected from that language.

  • Dynamically passing the fields to the data base through bdc

    hi,
         I need to pass the fields dynamically to the database uploading. Can anyone tell me, how we can get the 'datatype and length' of all fields in hr module. Is there any table for it.
        Please give me the answer if anyone know this.
    thanks & regards,
    sekhar.

    hi,
        This is the fm to get the datatype and length of the field. Where as i want to pass my irregular format of my presentation file to the database by sorting the fields as per the structure of database fields.
    bye.

  • Dynamically passing the URL

    Hi
    In the receiver SOAP Adapter I got to send the Target URL ( Connection Parameters.....> Target URL) dynamically on the basis of URL that I get from payload. Is it possible to do this by using UDF ?? If so could you plz explain how we can do this ?? Plz point me it there are any materials/blogs/threads available on  this topic ??
    Regards
    kumar

    Hi palnati
    you can use Adapter Specific Identifiers and set the SOAP URL and SOAP Action dynamically.
    Here is the link for doc which can help u out :
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d23cbe11-0d01-0010-5287-873a22024f79
    look this thread also
    Setting interface name dynamically from client for SOAP Adapter...
    Regds
    Abhishek

  • Dynamically passing the Columns values

    HI all,
    I am trying a pl/sql block which which take a string and execute it dynamically. Suppose below is string
    M_COL := Q'[(P_CODE=> ':DEPTNO',P_CODE_TYPE => 'STATE')]';
    Now trying to execute it. using below
    M_STR := 'SELECT CHK_DEPT' || M_COL || ' FROM EMP WHERE EMPNO=''7499''';
      EXECUTE IMMEDIATE M_STR
        INTO M_DATE;
    Now what i want is M_STR vairable to executed as
    SELECT CHK_DEPT(P_CODE=> DEPTNO,P_CODE_TYPE => 'STATE') FROM EMP WHERE EMPNO='7499'
    instead of
    SELECT CHK_DEPT(P_CODE=> 'DEPTNO',P_CODE_TYPE => 'STATE') FROM EMP WHERE EMPNO='7499'
    other in other way in parameter P_CODE Column value of DEPTNO should be passed.Also note that DEPTNO column in string M_COL is Dynamic.i.e
    M_COL := Q'[(P_CODE=> ':DEPTID',P_CODE_TYPE => 'STATE')]'; OR
    M_COL := Q'[(P_CODE=> ':EMP_ID',P_CODE_TYPE => 'STATE')]';
    Any suggestions, Please share with me.

    ibney 
    Actually you can use it by using the EMP and DEPT Table. If you Require EMP and DEPT tables structure and data, then let me know.
    Function which i created is below.
    CREATE OR REPLACE FUNCTION CHK_DEPT(P_CODE NUMBER,P_CODE_TYPE VARCHAR2) RETURN VARCHAR2 IS
      M_NAME DEPT.DNAME%TYPE;
    BEGIN
      FOR I IN (SELECT DNAME FROM DEPT WHERE DEPTNO = P_CODE) LOOP
        M_NAME := I.DNAME;
      END LOOP;
      RETURN M_NAME;
    END;

  • Dynamically passing the values to search help

    hi
    can I pass some values dynamically to search help input field.
    If I select a profit centre value from a drop down in separate field it should reflect the corresponding values in
    search help which is cost centre input field ( i/p fields is in a column of a UI element table).
    If I add one more row also the corresponding column should bears the search help...
    thanx in advance.......

    Data dictionary based search helps can have multiple importing parameters within Web Dynpro.  There are few rules that are documented in the online help however:
    Be aware that import and export parameters for the search help are determined only within the same context node (see also Transport of Values for the Input Help), and even then only if a Dictionary structure is assigned to the node.
    http://help.sap.com/saphelp_nw70/helpdata/EN/35/bdb6e2c48411d1950800a0c929b3c3/frameset.htm

  • Dynamically pass the username and password to report server to invoke reports

    Hi
    The scenario is as follows:-
    9iAS is installed under - Windows 2000 (web server and report Server 6i) and everything works fine.
    We have developed a page using pl/sql cartrige (oracle 8i), from that a report is invoked with some parameters. However, the userid and password is stored under keymap file (cgicmd.dat).
    Is there anyway to pass dynamically the username and password to report server in order to invoke the report.?
    Can any one advise?
    null

    Check out
    http://serverfault.com/questions/371907/can-you-pass-user-pass-for-http-basic-authentication-in-url-parameters
    Kind regards,
    Margriet Bruggeman
    Lois & Clark IT Services
    web site: http://www.loisandclark.eu
    blog: http://www.sharepointdragons.com

  • Dynamically passing the source table name to OWB mapping

    I am building a mapping wherein one of the source tables is a view. The view name varies with the time parameter I pass in. I am looking at ways to pass in the time parameter to the mapping procedure such that it first gets the view name from a table and uses that view as the source table to fetch data. Any directions?
    In normal PL/SQL coding, I can first get the view name and use this view name to buld a dynamic query, which can be then executed.

    This is a common question. The best way to do this is to use a synonym.
    Create the synonym in the database and import into OWB. Use the synonym in your mapping. Have your mapping accept a mapping input for the table you want the synonym to point to. Setup a premapping process to re-create the synonym with the table you want to use.
    Here is the procedure that I use. It defaults to a private synonym. Remember, the synonym will be created in the same schema that the mapping is deployed to.
    CREATE OR REPLACE PROCEDURE "CAWDATA"."CREATE_SYNONYM_PRC" ("P_SYNONYM_NAME" IN VARCHAR2,  "P_OBJECT_NAME" IN VARCHAR2,
    "P_IS_PUBLIC_SYNONYM" IN BOOLEAN DEFAULT false)    IS
    BEGIN
    if p_is_public_synonym = true then
    execute immediate 'create or replace public synonym '|| p_synonym_name || ' for '|| p_object_name;
    else
    execute immediate 'create or replace synonym '|| p_synonym_name || ' for '|| p_object_name;
    end if;
    exception
    when others
    then
          raise_application_error(sqlcode,sqlerrm) ;
    END;

  • Dynamically passing the values to IN query in JDBC

    Hi,
    I have a list which contains a single or multiple values which does have CustomerVO as a generic.Here i need to iterate the list pass these values to "IN" query.
    These should happen dynamically, as we dont know whether the list will hold a single or multiple value. If the list.size ==1 , then it contains a single value in it. Hence there is no need for a comma(,) in the IN query else we need to have it, like .... IN (Aaron,Bob). Please help me in this?
    Thanks.

    797836 wrote:
    I have a list which contains a single or multiple values which does have CustomerVO as a generic.Here i need to iterate the list pass these values to "IN" query.
    These should happen dynamically, as we dont know whether the list will hold a single or multiple value. If the list.size ==1 , then it contains a single value in it. Hence there is no need for a comma(,) in the IN query else we need to have it, like .... IN (Aaron,Bob).So basically you need to output the List (capital 'L') as a comma-delimited list (small 'l').
    The procedure for that is usually something like:
    1. Output the first element.
    2. For any further elements:
    2a. Output ","
    2b. Output the element.
    Winston

  • How to pass the Dynamically table name and RELID in IMPORT  x TO y FROM DATABASE dbtab(ar) ID Key

    Hello Expert,
    I wanted to know is there any way through which we can dynamically pass the table name in IMPORT condition.
    For e.g.
    DATA : PCLT TYPE DD03L-TABNAME.
    DATA: SET_RELID TYPE T52RELID-RELID.
    DATA: key TYPE PCLKEY.
    DATA: text_version TYPE PVRSN.
    DATA: BEGIN OF ptext OCCURS 132.
    DATA: line(132).
    DATA: END OF ptext.
    SET_RELID = 'TX'.
    PCLT = 'PCL1'.
    KEY = '00001000004005     9999123119960101000'.
    TEXT_VERSION = '01'.
    IMPORT TEXT_VERSION PTEXT FROM DATABASE <PCLT>(<SET_RELID>) ID KEY.
    If i use this then it gives me error message "The Dictionary structure or table "<PCLT>" is either not active or does not exist."
    Kindly help me in this matter.
    Thanks
    Srikanth

    Hi Srikanth
    I dont know if there is another solution, but this is what i did using a dynamic subroutine, please check it
    just add this lines to your code
    DATA: prog  TYPE c LENGTH 8,
           mess TYPE string,
           sid  TYPE string,
           wrd  TYPE string,
           dir  TYPE trdir,
           OFF(3).
    DATA: lt_code TYPE TABLE OF rssource-line.
    DATA: ls_code TYPE rssource-line.
    perform call_import using pclt set_relid key.
    form call_import USING p_pclt p_set_relid p_key.
       ls_code = 'PROGRAM SUBPOOL.'.
       append ls_code to lt_code.
       ls_code = 'form get_text tables ptext using p_key changing text_version.'.
       append ls_code to lt_code.
       ls_code = 'IMPORT text_version ptext from database'.
       append ls_code to lt_code.
       concatenate p_pclt '(' p_set_relid ')' into ls_code.
       append ls_code to lt_code.
       ls_code = 'id p_key.'.
       append ls_code to lt_code.
       ls_code = 'endform.'.
       append ls_code to lt_code.
       generate subroutine pool lt_code
                           name prog
                           message mess
                           SHORTDUMP-ID sid
                           WORD WRD
                           OFFSET OFF.
       IF SY-SUBRC EQ 0.
         perform GET_TEXT IN PROGRAM (prog) tables ptext
                                              USING p_key
                                              CHANGING text_version .
       ENDIF.
    endform.
    Hope this help
    Regards
    MC

  • Dynamic Passing of the Parameters In Inforview URL

    Hi,
    I have a requirement wherein I need to dynamically pass the prompt values through the infoview url. I am able to successfully pass the parameter value in the url and the report renders data based on the prompt value passed.
    When the report is opened when clicked on the link....there is  Refresh option to the user. My requirement is such that I do not want the user to be able to run the prompt again upon clicking the refresh button. Is there a way to restrict the user to be able not to see the prompt  ( for which the value is passed in the url)....The user needs to refresh the report to be able to enter values for other prompts that are declared ( date prompts )....but not the ones where its ids are passed...
    The url link which works is here  :
    http://development/businessobjects/enterprise115/InfoView/scripts/opendocument.aspxsType=wid&sRefresh=Y&sDocName=Prompt_Test&sWindow=New&lsSEnter%20Lines:=Leather&sPath=[A],[EFashionSamples]
    Please advice...
    Thanks,

    Hi,
    I have a requirement wherein I need to dynamically pass the prompt values through the infoview url. I am able to successfully pass the parameter value in the url and the report renders data based on the prompt value passed.
    When the report is opened when clicked on the link....there is  Refresh option to the user. My requirement is such that I do not want the user to be able to run the prompt again upon clicking the refresh button. Is there a way to restrict the user to be able not to see the prompt  ( for which the value is passed in the url)....The user needs to refresh the report to be able to enter values for other prompts that are declared ( date prompts )....but not the ones where its ids are passed...
    The url link which works is here  :
    http://development/businessobjects/enterprise115/InfoView/scripts/opendocument.aspxsType=wid&sRefresh=Y&sDocName=Prompt_Test&sWindow=New&lsSEnter%20Lines:=Leather&sPath=[A],[EFashionSamples]
    Please advice...
    Thanks,

  • Dynamically setting the values for the Adapter Configuration in BPEL

    We are configuring the JMS adapter to put into an MQ topic. For this we are giving all the values for the configuration parameters like
    Factory Properties.
    JMS connection Factory
    Transacted
    Destination Type
    Username
    Password
    Destination Name, etc...
    and we are able to produce message on the MQ.
    Our requirement is to dynamically pass the values for the above parameters from some configuraion files(other than oc4j-ra.xml), which will have value for each obove parameters.
    Any help on this is highly appreciated.
    Regards,
    Suman

    Re: JMS Properties setup
    this thread will explain how to do it.

  • Dynamically setting the values for the Adapter Configuration

    We are configuring the JMS adapter to put into an MQ topic. For this we are giving all the values for the configuration parameters like
    Factory Properties.
    JMS connection Factory
    Transacted
    Destination Type
    Username
    Password
    Destination Name, etc...
    and we are able to produce message on the MQ.
    Our requirement to dynamically pass the values for the above parameters from some configuraion files(other that oc4j-ra.xml), which will have value for each obove parameters
    Any help on this is highly appreciated.

    Re: JMS Properties setup
    this thread will explain how to do it.

Maybe you are looking for