How to populate a column value dynamically based on org id value

Hi,
I have two columns in a table program_id and org_id,
I need to populate program_id = 1 for org_id = 100
I need to populate program_id = 2 for org_id = 101
for populating org_id i am using "fnd_profile.value('ORG_ID')". This is working fine. But when i decode doe program_id it is not working.
below is the samle control fille i am using.
into table ap_credit_card_trxns_all
when (1) = '1' and (431:432) <> 'CA' and (431:432) <> '04' and (431:432) <> '03' and (431:432) <> '01' and (431:432) <> 'NF'
trx_id                    "ap_credit_card_trxns_s1.nextval",
validate_code               constant 'N',
payment_flag               constant 'N',
card_program_id          "decode(:org_id,82,10000,83,10001,null)", --
org_id           "fnd_profile.value('ORG_ID')"
I tried all possible ways but still not working. Can any experts please help me on this.
Thanks,

Pl post details of OS, database and EBS versions.
AFAIK, you cannot use multiple WHEN clauses in your control file.
>
when (1) = '1' and (431:432) 'CA' and (431:432) '04' and (431:432) '03' and (431:432) '01' and (431:432) 'NF'
>
Srini

Similar Messages

  • How to find bpel instance in 11g based on the index values

    We have 10g BPEL process where we define 4 index values for all the instances. Whenever support request comes, we ask index values and based on that we search the process instance.
    We have migrated this 10g bpel process to 11g now. How to find bpel instance in 11g based on the index values ???

    I have multiple bpel in my composite. I checked in ci_indexes table and it shows the instance number of the bpel process. But the em console is showing only the composite instance number. when I opened composite instance, I could see all the bpel process with instance number in the audit trail. How can I find the the actual composite instance number that I should search for in the em console ???

  • How to populate who column values, when commiting the transaction?

    Hi,
    In Oracle forms we can populate who columns thru FND_STANDARD.SET_WHO;
    How is it in OAF?. Standard setter methods are sufficient or do I need to code something to get the values.
    Thanks

    Yes, all Setter methods are in EOImpl object. After I commit the trasnaction, who columns are showing as null.
    CreationDate
    CreatedBy
    LastUpdatedBy
    LastUpdateDate
    LastUpdateLogin
    * Gets the attribute value for CreationDate, using the alias name CreationDate
    public Date getCreationDate()
    return (Date)getAttributeInternal(CREATIONDATE);
    * Sets <code>value</code> as the attribute value for CreationDate
    public void setCreationDate(Date value)
    setAttributeInternal(CREATIONDATE, value);
    * Gets the attribute value for CreatedBy, using the alias name CreatedBy
    public Number getCreatedBy()
    return (Number)getAttributeInternal(CREATEDBY);
    * Sets <code>value</code> as the attribute value for CreatedBy
    public void setCreatedBy(Number value)
    setAttributeInternal(CREATEDBY, value);
    * Gets the attribute value for LastUpdatedBy, using the alias name LastUpdatedBy
    public Number getLastUpdatedBy()
    return (Number)getAttributeInternal(LASTUPDATEDBY);
    * Sets <code>value</code> as the attribute value for LastUpdatedBy
    public void setLastUpdatedBy(Number value)
    setAttributeInternal(LASTUPDATEDBY, value);
    * Gets the attribute value for LastUpdateDate, using the alias name LastUpdateDate
    public Date getLastUpdateDate()
    return (Date)getAttributeInternal(LASTUPDATEDATE);
    * Sets <code>value</code> as the attribute value for LastUpdateDate
    public void setLastUpdateDate(Date value)
    setAttributeInternal(LASTUPDATEDATE, value);
    public Number getLastUpdateLogin()
    return (Number)getAttributeInternal(LASTUPDATELOGIN);
    * Sets <code>value</code> as the attribute value for LastUpdateLogin
    public void setLastUpdateLogin(Number value)
    setAttributeInternal(LASTUPDATELOGIN, value);
    protected void updateRowWho()
    OADBTransaction oadbtransaction = getOADBTransaction();
    if(oadbtransaction.isLoggingEnabled(2))
    oadbtransaction.writeDiagnostics(this, "Entering updateRowWho", 2);
    oadbtransaction.writeDiagnostics(this, "Not updating WHO columns", 2);
    oadbtransaction.writeDiagnostics(this, "Leaving updateRowWho", 2);
    protected void createRowWho()
    OADBTransaction oadbtransaction = getOADBTransaction();
    if(oadbtransaction.isLoggingEnabled(2))
    oadbtransaction.writeDiagnostics(this, "Entering createRowWho", 2);
    oadbtransaction.writeDiagnostics(this, "Not updating WHO columns", 2);
    oadbtransaction.writeDiagnostics(this, "Leaving createRowWho", 2);
    Thanks

  • How to create a column graph with colors per set of values

    I need to create with Microsoft Excel, a column graph that based on different values, each column will contain different color.
    To be precise:
    E.g.:
    - Green: If it is 0
    - Orange: If it is between 0 and 10
    - Red: If it is more than 10
    I would appreciate to help me how to do this.

    Hi EriValidata,
    According to your description, I get the result as shown in the following figure.
    Is this a correct result? If yes, this is an excel chart with conditional formatting. Please try the following steps to create the chart.
    To accomplish this task, you will need to create three additional columns of data and plot those three columns of data-and not the original column of sales data – in a stacked column chart. As shown in the figure.
    And the formula in C2 is: =IF(AND(B2>0,B2<=10),B2,0). The formula shows the value in column C if it falls between the limits in rows 0 and 10; otherwise it shows 0. The formula is filled into the range C2:E4.
    Then we select the source data with A2:A4 and C1:E4, as shown in the figure to insert a column chart. The chart now shows 3 sets of colored bars, one for each data range of interest.
    And I upload a TEST2.xlsx file on OneDrive, you can download this file via this link:
    https://microsoft-my.sharepoint.com/personal/v-lzng_microsoft_com/Documents/Shared with Everyone
    Hope it’s helpful.
    Regards,

  • How to make a tabular form readonly based on an item value

    Hi everyone,
    I am getting there, but I need to make a tabular form read-only based on an item value.
    I've copied this from somewhere (thanks) and changed it for my needs and it works great to set the second column of my form
    to read only.
        var els = jQuery('#Entry_Form input[name="f02"]');
        /*var r = confirm("els is " + els);*/
        els = els.filter(function(index){
          return jQuery(this).val() != "";
        });Just need to set the jQuery selector to jQuery("td[headers='PRODUCT_NAME']"), cos that's my column name.
    also need to give a static id of Entry Form to the form.
    I'll try to understand what this code means exactly one of these days, but now I need to make
    the whole tabular form read only based on a text item, :P5_CONTROL.
    Grateful for any help on this, in the above format if possible. Greek to me but compact and it works.
    Regards.
    Leckraj

    Hi,
    actually, there is no code, just one dynamic action. You may have to change the event which triggers it.
    Event: Change
    Selection Type:     Items(s)
    Item(s): P1_ED     
    Condition: equal to     
    Value: D
    True Action 1
    Action: Disable
    Fire On Page Load: yes
    Selection Type: jQuery Selector
    jQuery Selector: input[id^="f"]
    True Action 2
    Action: Disable
    Fire On Page Load: yes
    Selection Type: jQuery Selector
    jQuery Selector: input[id="check-all-rows"]
    False Action 1
    Action: Enable
    Fire On Page Load: yes
    Selection Type: jQuery Selector
    jQuery Selector: input[id^="f"]
    False Action 2
    Action: Enable
    Fire On Page Load: yes
    Selection Type: jQuery Selector
    jQuery Selector: input[id="check-all-rows"]
    Regards, Garry

  • How to find bpel instance in 11g based on the index values using Java APIs

    Hi ,
    In SOA10G we had option to find the instances based on the index value using Java APIs like below.
    WhereCondition criteria= new WhereCondition(SQLDefs.CX_index_1 + " = ?");
    criteria.setString(1, "indexValue");
    Locator mLoc = getLocator();
    IInstanceHandle[] foundInstances = mLoc.listInstancesByIndex(criteria);
    Please tell me how to achieve the same functionality in SOA 11G using Java APIs
    Regards,
    Saba

    I have multiple bpel in my composite. I checked in ci_indexes table and it shows the instance number of the bpel process. But the em console is showing only the composite instance number. when I opened composite instance, I could see all the bpel process with instance number in the audit trail. How can I find the the actual composite instance number that I should search for in the em console ???

  • How to Create a Table Component Dynamically based on the Need

    Hello all,
    I have a problem i need to create dynamically tables based on the no of records in the database. How can i create the table object using java code.
    Please help.

    Winston's blog will probably be helpful:
    How to create a table component dynamically:
    http://blogs.sun.com/roller/page/winston?entry=creating_dynamic_table
    Adding components to a dynamically created table
    http://blogs.sun.com/roller/page/winston?entry=dynamic_button_table
    Lark
    Creator Team

  • How to populate read only input field or text view form value help only

    Hi experts,
    I have one requirement to populate a read-only field or text view from value help.
    User cant put any value there.value comes only from the value help.
    For example,
    when we read context using Code Wizard,we cant type any value there.value only comes from value help.
    How to implement that functionality?
    Please reply.
    Thanks in advance,
    Subhasis.

    Yes it is possible.
    1.Create a context Attribute and then bind this attribute to the Text view UI element.
    2. read context attribute and then set value to the context attribute like this way.
    DATA:
        elem_context1                        TYPE REF TO if_wd_context_element,
        stru_context1                        TYPE if_first=>element_context ,
        item_potxt                          LIKE stru_context-potxt.
    get element via lead selection
      elem_context1 = wd_context->get_element(  ).
    stru_context1-potxt = 'PO'.
    elem_context1->set_attribute(
        VALUE  = stru_context1
        name   = 'POTXT'
    thanks
    Suman
    Edited by: suman kumar chinnam on Sep 9, 2008 12:12 PM

  • How to populate the column "Network" in Transaction FAGLL03

    Hello Friends,
    I need to populate the column "Network" in Transaction FAGLL03. I have followed the SAP note 984305 - "Line item: Definition of special fields (T021S)" to display the column "Network". But the problem is field Network (BSEG-NPLNR) is empty for all line items and hence it is coming blank in Transaction FAGLL03. The value of Network is maintained in table AUFK.
    I have executed program BALVBUFDEL and RFPOSXEXTEND.
    But the column "Network" is still coming empty.
    Thank you
    Jeet

    Hi Jeetendar,
    I think at the time of posting you have not provided the network field or it might be suppressed. Due to this the line items are showing blank.
    Regards,
    Mukthar

  • How to find the column name and table name with a value

    Hi All
    How to find the column name and table name with "Value".
    For Example i have value named "Srikkanth" This value will be stored in one table and in one column i we dont know the table how to find the table name and column name
    Any help is highly appricatable
    Thanks & Regards
    Srikkanth.M

    2 solutions by Michaels (the latter is 11g upwards only)...
    michaels>  var val varchar2(5)
    michaels>  exec :val := 'as'
    PL/SQL procedure successfully completed.
    michaels>  select distinct substr (:val, 1, 11) "Searchword",
                    substr (table_name, 1, 14) "Table",
                    substr (t.column_value.getstringval (), 1, 50) "Column/Value"
               from cols,
                    table
                       (xmlsequence
                           (dbms_xmlgen.getxmltype ('select ' || column_name
                                                    || ' from ' || table_name
                                                    || ' where upper('
                                                    || column_name
                                                    || ') like upper(''%' || :val
                                                    || '%'')'
                                                   ).extract ('ROWSET/ROW/*')
                       ) t
    --        where table_name in ('EMPLOYEES', 'JOB_HISTORY', 'DEPARTMENTS')
           order by "Table"or
    SQL> select table_name,
           column_name,
           :search_string search_string,
           result
      from cols,
           xmltable(('ora:view("'||table_name||'")/ROW/'||column_name||'[ora:contains(text(),"%'|| :search_string || '%") > 0]')
           columns result varchar2(10) path '.'
    where table_name in ('EMP', 'DEPT')
    TABLE_NAME           COLUMN_NAME          SEARCH_STRING        RESULT   
    DEPT                 DNAME                ES                   RESEARCH 
    DEPT                 DNAME                ES                   SALES    
    EMP                  ENAME                ES                   JONES    
    EMP                  ENAME                ES                   JAMES    
    EMP                  JOB                  ES                   SALESMAN 
    EMP                  JOB                  ES                   SALESMAN 
    EMP                  JOB                  ES                   SALESMAN 
    EMP                  JOB                  ES                   PRESIDENT
    EMP                  JOB                  ES                   SALESMAN 
    9 rows selected.

  • How to populate LOV of one prompt based on other prompts w/o cascade

    Hello All,
    Scenario- There are three prompts in my report.
    Source_Prompt1, Source_Prompt2 and Target_Prompt.
    There is no direct reletion between Source_Prompt1 and Source_Prompt2.
    And user wants Target_Prompt data on selection of these source_prompts.
    Is there any way to populate target prompt on selection of source prompt.
    Note- This can be implemented by applying cascading between all three prompts fields.
    However user dosent want Cascading between source prompts.?
    is there any other method except cascading prompt to populate LOV of one prompt based on selection of other prompt values?
    Your insights are most welcome.
    Amit

    I believe the only way to populate LOVs is directly from a database. E.g.; you can not populate it "manually". In your case, you may have to create your own prompt forms and use those.
    - Ludek

  • How to configure the schema name dynamically based on user input.

    configure the schema name dynamically based on user input.
    For ex:
    We have two schemas:
    Schema1  - base schema having 15 tables.
    Schema2 -  tables which is specific to modules. Having only 10 tables which is also available in Schema1
    Login to application using Schema 1
    Access a particlular module and select the country. Here country selection is identified.
    Based on the country selection, we need to connect the schema respectively.
    If the user selects France --> It should connect Schema1
    If the user selects Germeny --> It should connect schema2.
    Used: Eclipselink

    You may want to have a different persistence unit for each country, then you just need to switch persistence units, and can put the schema in your orm.xml file.
    You may also want to investigate EclipseLink multi-tenant support,
    http://www.eclipse.org/eclipselink/documentation/2.5/jpa/extensions/a_multitenant.htm
    You can the schema in a persistence unit in code using a SessionCustomizer and the tableQualifier.

  • How to Populate G/L Account dynamically in txn IW31

    Hello,
    We have a scenario to Populate G/L Account dynamically from Automatic Account determination in txn IW31 ...Is there any user exit
    Thanks and Regards
    Venkat

    U can try bringing the OACT Name field directly via DB field. if not created new DB Field, hold the Key 'ALT' and choose OACT - G/L Accounts table and select the account name field. make a relate to connection with ur Account code field.
    shall i ask in which PLD r u now?
    Regards,
    Dhana.

  • How to make the  column red in field catalog if its value is negetive

    i am displaying 25 columns in a field catalog ,
    if the value of the cell is negative it should appear in red colour .
    for ex,
    mat.no      custno      value
    1                10             10
    <b>2                20             -10</b>
    3                 30             20
    note:
    only cell which is the intersection of second row and third column
    should appear red .
    not the whole row or column

    Hi Balaji,
    Run this code for coloring specific coloum in a row when the value of that column is negative
    REPORT zex34 .
    TYPE-POOLS: slis.
    INCLUDE <icon>.
    DATA: it_fieldcat  TYPE slis_t_fieldcat_alv,
          it_fieldcat1  TYPE slis_t_fieldcat_alv..
    DATA:  x_fieldcat  TYPE slis_fieldcat_alv,
            x_fieldcat1  TYPE slis_fieldcat_alv.
    DATA: it_events TYPE slis_t_event,
          x_events TYPE slis_alv_event,
          i_program LIKE sy-repid.
    x_events-name = 'END_OF_LIST'.
    x_events-form = 'LIST_MODIFY_OUPUT'.
    APPEND x_events TO it_events.
    data : count type i,
           calc1 type i value 1,
           calc2 type i value 1,
           TOTREC TYPE I.
    DATA: BEGIN OF it_mara OCCURS 0,
          matnr LIKE mara-matnr,
          kunnr LIKE mara-kunnr,
          value type i,
          flag(1),
         END OF it_mara.
    SELECT matnr
           kunnr
           UP TO 10 ROWS
          INTO corresponding fields of TABLE it_mara
          FROM mara.
    loop at it_mara.
         count = sy-tabix mod 2.
       if count eq 0.
         it_mara-value = calc1.
            calc1 = calc1 + 6.
         it_mara-flag = ' '.
       else.
           calc2 = calc2 - 5.
         it_mara-value = calc2.
         it_mara-flag = 'X'.
       endif.
       modify it_mara index sy-tabix.
       TOTREC = TOTREC + 1.
    ENDLOOP.
    i_program = sy-repid.
    DATA:l_pos TYPE i VALUE 1.
    CLEAR: l_pos.
    l_pos = l_pos + 1.
    x_fieldcat-seltext_m = 'MATNR'.
    x_fieldcat-fieldname = 'MATNR'.
    x_fieldcat-tabname = 'IT_MARA'.
    x_fieldcat-col_pos    = l_pos.
    x_fieldcat-outputlen = '18'.
    APPEND x_fieldcat TO it_fieldcat.
    CLEAR x_fieldcat.
    l_pos = l_pos + 1.
    x_fieldcat-seltext_m = 'KUNNR'.
    x_fieldcat-fieldname = 'KUNNR'.
    x_fieldcat-tabname = 'IT_MARA'.
    x_fieldcat-col_pos    = l_pos.
    x_fieldcat-outputlen = '10'.
    APPEND x_fieldcat TO it_fieldcat.
    CLEAR x_fieldcat.
    l_pos = l_pos + 1.
    x_fieldcat-seltext_m = 'VALUE'.
    x_fieldcat-fieldname = 'VALUE'.
    x_fieldcat-tabname = 'IT_MARA'.
    x_fieldcat-col_pos    = l_pos.
    x_fieldcat-outputlen = '10'.
    APPEND x_fieldcat TO it_fieldcat.
    CLEAR x_fieldcat.
    l_pos = l_pos + 1.
    x_fieldcat-seltext_m = 'FLAG'.
    x_fieldcat-fieldname = 'FLAG'.
    x_fieldcat-tabname = 'IT_MARA'.
    x_fieldcat-col_pos    = l_pos.
    x_fieldcat-outputlen = '1'.
    APPEND x_fieldcat TO it_fieldcat.
    CLEAR x_fieldcat.
    l_pos = l_pos + 1.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
         EXPORTING
              i_callback_program = i_program
              it_fieldcat        = it_fieldcat
              it_events          = it_events
         TABLES
              t_outtab           = it_mara
         EXCEPTIONS
              program_error      = 1
              OTHERS             = 2.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    *&      Form  LIST_MODIFY_OUPUT
          text
    FORM list_modify_ouput.
      DATA: l_matnr LIKE mara-matnr,
            l_kunnr LIKE mara-kunnr,
            l_value type i,
            l_index TYPE sy-index.
      CLEAR it_mara.
      DO 20 TIMES.
        CLEAR: l_matnr, l_kunnr , l_value.
        READ LINE sy-index INDEX sy-lsind
             FIELD VALUE it_mara-matnr INTO l_matnr
                         it_mara-kunnr INTO l_kunnr
                         it_mara-value into l_value.
    *3lines are reserved for alv headings , so i am reading it form 4th
    *line so 4th line is equal to 1st line of itab
        IF sy-subrc = 0 AND sy-index GE 4.
          l_index = sy-index - 3.
          READ TABLE it_mara INDEX l_index.
          IF sy-subrc = 0 AND it_mara-flag = 'X'.
    *-Modifying current list
            MODIFY LINE sy-index INDEX sy-lsind
                       FIELD FORMAT it_mara-VALUE COLOR 6 INVERSE.
          ENDIF.
        ENDIF.
      ENDDO.
    ENDFORM.

  • URGENT:Making a poplist value freezed based on another poplist value

    Hi,
    I have a requirement to make a poplist value freezed(should get disabled so that no further change can be done) based on another poplist value.
    for ex : poplist 1 : A,B.
    poplist2: yes,no
    if A is selected, yes,no should appear in the poplist2.
    if B is selected, only YEs should appear in the poplist2 and it should get greyed out(disabled for further changing).
    Please help.
    Thanks,
    Veena.
    Edited by: Veena. on Dec 31, 2012 4:00 AM

    Veena,
    there is nothing urgent on this forum!
    You know that you should provide your jdev version so that we can help you solve your problem.
    Next it would help if you provide the code (of the page) so that we see how you setup the 'poplist' (whatever that exactly is).
    If you mean a selectOnceChioce you can implement a valuechangeListener on poplist A and depending on the new value set the value of poplist B to yes and disable it.
    Timo

Maybe you are looking for

  • Only one user don't get mails with IMAP

    Strange Problem. I have stored 4 accounts on my iPhone and get mails only from 3 from the same PO. With my own account "rupert" I get a message:"Server mail.company.at does not respond" But i can send mails with my account very well. This error occur

  • About crystal report viewer

    Hello, I use VS2010 and it not support Crystal Report so I install "SAP Crystal Reports, version for Visual Studio 2010 - Standard" but after installed when I create project, the Toolbox still not appear crystal report viewer. What can I do to it app

  • Search and replace nested style in JS CS3

    I need to find and replace numbers at the beginning of paragraph which is styled as nestedStyle. What is the code? ST Dishon

  • Want a log file in LMS 3.1 for Link down

    I want to have an external logfile which should write "DEVICEName & respective Interface" at the event when this port goes down. Actually i want to monitor all uplink ports in this way.

  • WLC 2504 Code Issue

    Hey All: Ran into a strange issue today, two 2504 controller's, one upgraded (from 7.2 to 7.0 due to 1310 not working) to the new firmware fine, the other chucks back a signauture issue, i've seen alot of post's about the 5508 having this issue, but