Custom Item in Syndicator: count of record exported

Hi all,
I'm new in MDM and I have many doubt.
One is about the possibility of add a custom item in syndicator contaning the number of the record exported.
It's possible?
Any suggestion?
thanks in advantage.
Enzo

Hi Enzo,
Custom Item in MDM Syndicator are used for the follwing reasons:
1.To include Source fields from the current table.
2. To include Source attributes from the connected repository.
3.To include Remote keys from the current table and its subtables.
4. To include Raw text entered directly into the custom item.
5.To include Repository name from which the syndicated data originated.
6.To include Date and time of the syndication.
For more information u can visit the link:
<b>http://help.sap.com/saphelp_mdm550/helpdata/en/ff/37e4c6857449388ddb6c77f160ac4f/frameset.htm</b>
What i understood from ur question is that u want to add a custom field containing the number of records to be syndicated?
U can control the number for record u want to syndicate by applying the appropriate search criteria.
If u have any more queries feel free to revert back.
Hope i've tried to answer ur question.
Regards,
Seema Rane.
PS: Pls give points to helpful answer.

Similar Messages

  • Customer Item Open Interface Validation

    Hi Folks,
    I have to write package for customer item open interface ,
    can anyone let me know what are the validation required or if any one have package written ,please share it with me .[email protected]
    Waiting for your kind response.
    Thanks in advance....
    Regards
    RP

    Hi
    Please find the code below for Customer Item Interface
    HTH
    Dinesh
    declare
         ex_not_ok     exception          ;
         Cursor      cur_cust_item  is
         select     b.*,rowid from btl_cust_item b      ;
         rec_cur_cust_item     cur_cust_item%rowtype;
         vc_rowid          varchar2(50);     
         vc_error_desc          varchar2(2000);
         vc_org_code          varchar2(20)     :='F02';
         vc_org_id          varchar2(20)     ;
         vc_inv_item          number          ;
         vc_cust_id          varchar2(50)     ;
         vc_create_by          number;
         vc_last_updated_by     number;
         vc_user_name          varchar2(100);
         vc_login_name          varchar2(30)     := '&1';
         vc_master               number;
    begin
         vc_org_id := &2 ;
      vc_master := &3;
         begin
              select      user_id          ,last_updated_by      ,user_name 
              into     vc_create_by     ,vc_last_updated_by     , vc_user_name     
              from      fnd_user
              where      user_name = vc_login_name;
         end;
         open     cur_cust_item;          -- open cursor
         loop
              begin 
              fetch     cur_cust_item
              INTO     rec_cur_cust_item;
              vc_rowid     := rec_cur_cust_item.rowid;
              exit when cur_cust_item%NOTFOUND;
              -- perform the mandatory validations
              -- 1. Check the validity of the customer
              begin
                   select      count(*)
                   into     vc_cust_id
                   from      ra_customers
                   where     upper(customer_number) = upper(rec_cur_cust_item.customer_number);
                   if      vc_cust_id > 0 then
                        null;
                   else
                        vc_error_desc := rec_cur_cust_item.customer_number||' '|| rec_cur_cust_item.customer_name ||' - Customer Number  Does not Exist in Ra_customers';
                        raise     ex_not_ok;
                   end if;                
                   exception
                        when no_data_found then
                        update      btl_cust_item
                        set     process_flag = 'E',
                             error_message = 'XREF-  Customer Does not exist '||vc_error_desc
                        where     rowid     = vc_rowid;
              end ;
              -- 2. Check that the Customer Item Is not Null
              begin
                   if     rec_cur_cust_item.customer_item_number is not null then
                        null;
                   else
                        vc_error_desc := rec_cur_cust_item.Customer_Number ||' - '|| rec_cur_cust_item.customer_item_number || ' - Customer Item has no value    ';
                        raise ex_not_ok;
                   end if;
              end;
              -- 3. Validate the Inventory Item
              begin
                   select      count(*)
                   into     vc_inv_item
                   from      mtl_system_items  a, org_organization_definitions b
                   where     a.organization_id            = b.organization_id
                   and     rec_cur_cust_item.inventory_item = segment1
                   and     a.organization_id             = vc_org_id;
                   if     vc_inv_item != 0 then
                        null;
                   else
                        vc_error_desc := 'Inventory Item '|| rec_cur_cust_item.inventory_item ||'  is not valid/exist in mtl_system_item ';
                        raise ex_not_ok;
                   end if;
              end;
        rec_cur_cust_item.commodity_code := 'MISC';
              insert into mtl_ci_interface (               
                        PROCESS_FLAG          ,
                        PROCESS_MODE          ,
                        TRANSACTION_TYPE     ,
                        CUSTOMER_NUMBER          ,
                        CUSTOMER_NAME          ,
                        CUSTOMER_ITEM_NUMBER     ,
                        ITEM_DEFINITION_LEVEL     ,
                        COMMODITY_CODE          ,
                        INACTIVE_FLAG          ,
                        LOCK_FLAG          ,
                        LAST_UPDATE_DATE     ,
                        LAST_UPDATED_BY          ,
                        CREATION_DATE          ,
                        CREATED_BY          ,
                        --LAST_UPDATE_LOGIN     ,
                        ERROR_CODE          ,
                        ERROR_EXPLANATION               
              values
                        '1'                                ,     --PROCESS_FLAG
                        '1'                                ,     --PROCESS_MODE
                        'CREATE'                     , -- TRNASACTION_TYPE
                        rec_cur_cust_item.customer_number     ,     --CUSTOMER_NUMBER          
                        rec_cur_cust_item.customer_name           , --CUSTOMER_NAME          
                        rec_cur_cust_item.customer_item_number, --CUSTOMER_ITEM_NUMBER     
                        '1'                          , --ITEM_DEFINATION_LEVEL
                        rec_cur_cust_item.commodity_code      , --COMMODITY_CODE
                        '2'                          , --INACTIVE_FLAG
                        'N'                          ,     --LOCK_FLAG
                        sysdate                      , --LAST_UPDATE_DATE
                        vc_last_updated_by                    , --LAST_UPDATED_BY
                        sysdate                          , --CREATION_DATE
                        vc_create_by                     , --CREATED_BY
                        --'10'                          , --LAST_UPDATE_LOGIN
                        'N'                          , --ERROR_CODE
                        ' '                             --ERROR_EXPLANATION
              Insert into mtl_ci_xrefs_interface (
                        PROCESS_FLAG          ,
                        PROCESS_MODE          ,
                        TRANSACTION_TYPE     ,
                        CUSTOMER_NUMBER          ,
                        CUSTOMER_NAME          ,
                        CUSTOMER_ITEM_NUMBER     ,
                        ITEM_DEFINITION_LEVEL     ,
                        INVENTORY_ITEM          ,
                        MASTER_ORGANIzATION_ID     ,
                        PREFERENCE_NUMBER     ,
                        INACTIVE_FLAG          ,
                        LOCK_FLAG          ,
                        LAST_UPDATE_DATE     ,
                        LAST_UPDATED_BY          ,
                        CREATION_DATE          ,
                        CREATED_BY          ,
                        --LAST_UPDATE_LOGIN     ,
                        ERROR_CODE          ,          
                        ERROR_EXPLANATION
              Values
                        '1'                    ,      --PROCESS_FLAG          
                        '1'                    ,      --PROCESS_MODE          
                        'CREATE'               ,      --TRNSACTION_TYPE          
                        rec_cur_cust_item.customer_number,     --CUSTOMER_NUMBER          
                        rec_cur_cust_item.customer_name     ,      --CUSTOMER_NAME          
                        rec_cur_cust_item.customer_item_number, --CUSTOMER_ITEM_NUMBER     
                        '1'                    ,     --ITEM_DEFINATION_LEVEL     
                        rec_cur_cust_item.inventory_item,     --INVENTORY_ITEM
                        vc_master               ,      --MASTER_ORGANISATION_ID
                        '1'                    ,     --PREFERENCE_NUMBER
                        '2'                    ,     --INACTIVE_FLAG     
                        'N'                    ,     --LOCK_FLAG     
                        sysdate                    ,     --LAST_UPDATE_DATE     
                        vc_last_updated_by          ,     --LAST_UPDATED_BY          
                        sysdate                    ,     --CREATION_DATE          
                        vc_create_by               ,     --CREATED_BY          
                        --'10'                    ,     --LAST_UPDATE_LOGIN     
                        'N'                    ,     --ERROR_CODE                    
                        ' '                         --ERROR_EXPLANATION     
    --dbms_output.put_line( ' Inserting into reference table - done');
              exception
                   when ex_not_ok then
                        update      btl_cust_item
                        set     process_flag = 'E',
                             error_message = 'XREF-'||vc_error_desc
                        where     rowid     = vc_rowid;                    
              end ;
         end loop;
         commit;
         begin
               dbms_application_info.set_client_info(' ');     
         end;
         dbms_output.put_line ( ' End time ' || to_char( sysdate, 'DD-MON-YYYY HH24:MI:SS'));
         exception
              when others then
                   dbms_output.put_line( Sqlcode || ' ' || Sqlerrm );
    end ;
    /

  • How to find count of records based on batch wise.

    Hi All,
    We are working on OWB10gr2. I would like share one requirement. Any one can suggest me how to do it and which is the best way to get accurate information.
    We have 2 schemas’ like nia_src and nia_tgt. currently we are moving data from nia_src to nia_tgt for that reason we implemented some mappings based on requirement. In my source schema (nia_src) having 100 tables with data and similar structure replicated in target schema (nia_tgt).
    In source schema every table having one date field for which record is inserted and based on that field we can find how may records are inserted on particular table ,particular time.
    Same like target also maintaining date fields for tracking purposes.
    We have done some mappings and scheduled also. Every day we are into the target with incremental data. All are working fine not any issues.
    I wanted to know how many records inserted, updated, merged for particular batch
    How can we find?
    Can we find exact information in OWB_REP_OWNER schema on WB_RT_AUDIT?.
    For tracking purposes I need to find those values how many records are available in
    Source table and how many records are populated to the target schema?
    How to find schedule batch count of records table wise for batch wise?
    Please suggest me any one on this.
    thanks and regards,
    venkat.

    RE: based on pre operator can we find count of records. if yes how to do it.
    No, you cannot tell from the pre- operator how many records will be inserted or updated into a mapping. How could you? The mapping hasn't run yet!
    At best (if you have simple mappings with single targets) you could come up with a strategy to have the pre-mapping procedure aware of it's package name, then select from user_source for that package body until you find that first cursor used for the row-based processing, copy the cursor into a local variable, and then execute immediate select count(*) from that cursor definition. But still, all that would get you is the number of rows selected - not inserted / updated / errored etc.
    A post-mapping procedure that is aware of the package name will, however, run prior to package exit so that the package spec is still in memory so you can access the public variables in the package spec. We do that in our standard post-mapping procedure
    CREATE OR REPLACE procedure erscntrl_finalize_prc(
                           p_process_id     in  number,
                           p_process_name   in  varchar2)
    as
          l_numread      number         := 0;
          l_numInserted  number         := 0;
          l_numUpdated   number         := 0;
          l_numMerged    number         := 0;
          l_owb_audit_id number         := 0;
          l_owb_status   number         := 0;
          sqlStmt        varchar2(2000) :=
                               'begin '||
                               '  :1 := '||p_process_name||'.get_selected; '||
                               '  :2 := '||p_process_name||'.get_inserted; '||
                               '  :3 := '||p_process_name||'.get_updated; '||
                               '  :4 := '||p_process_name||'.get_merged; '||
                               '  :5 := '||p_process_name||'.get_audit_id; '||
                               '  :6 := '||p_process_name||'.get_status; '||
                               ' end;';
    begin
          -- we use dynamic SQL to return required audit field values.
          --  This allows us to alter which values we need at a later date
          --  without impacting the deployed mappings.
        execute immediate sqlStmt
        using   out l_numread,   out l_numInserted,  out l_numUpdated,
                out l_numMerged, out l_owb_audit_id, out l_owb_status;
      -- then execute our own logging package.
       owb_mapping_log_pkg.finalize(
                           p_process_id,
                           p_process_name,
                           l_numread,
                           l_numInserted,
                           l_numUpdated,
                           l_numMerged,
                           l_owb_audit_id,
                           l_owb_status
    end;
    /However, even in this case bear in mind that if you run the mapping in set-base mode, all Oracle returns is the number merged which does not give values for the inserted and updated counts. If you really need those values you need to either a) run in row-based mode or row-based-target-only, or come up with some custom queries. For example, in your pre-mapping do a select count(*) from your_target_table, then run the mapping, then get the number merged, then do another select count(*) from your_target_table. With these values and basic math you could tell the number inserted by the growth in the table, and the rest of the number merged must have been updates.
    That being said, if you are playing with dimensions as large as most of the ones I am - there is no bloody way that you want to do two select count(*) statements on each run without a really, really good reason.....
    Cheers,
    Mike

  • How can I get a count of records in a DB?

    If I want to get a count of the number of records in a table how do I do it?

    Generally, it's good practice to close the connection once you're done with it unless you have a reason to keep going back to it, in which case it probably becomes a performance issue. If you need to keep accessing the same connection repeatedly while your form is running (in Acrobat), I think you would be best to leave it open after initialization.<br /><br />You might consider placing the code which counts the records into a function inside a Script Object. This way, you can just call the Script Object method and retrieve the record count whenever you need it.<br /><br />Make sure you define the <b>oDB</b> variable outside the function but inside the Script Object:<br /><pre>var oDB = null;<br /><br />function GetRecordCount()<br />{<br />  if (oDB == null)<br />  {<br />    var sDataConnectionName = "<value>"; // example - var sDataConnectionName = "MyDataConnection"; <br /><br />    // Search for sourceSet node which matchs the DataConnection name <br />    var nIndex = 0; <br />    while(xfa.sourceSet.nodes.item(nIndex).name != sDataConnectionName) <br />    { <br />      nIndex++; <br />    } <br /><br />    var oDB = xfa.sourceSet.nodes.item(nIndex); <br />    oDB.open();<br />  }<br /><br />  oDB.first(); <br /><br />  // Search node with the class name "command" <br />  var nDBIndex = 0; <br />  while(oDB.nodes.item(nDBIndex).className != "command") <br />  { <br />    nDBIndex++; <br />  } <br /><br />  // Backup the original settings before assigning BOF and EOF to stay <br />  var sBOFBackup = oDB.nodes.item(nDBIndex).query.recordSet.getAttribute("bofAction"); <br />  var sEOFBackup = oDB.nodes.item(nDBIndex).query.recordSet.getAttribute("eofAction"); <br /><br />  oDB.nodes.item(nDBIndex).query.recordSet.setAttribute("stayBOF", "bofAction"); <br />  oDB.nodes.item(nDBIndex).query.recordSet.setAttribute("stayEOF", "eofAction"); <br /><br />  var itemCount = 0; <br /><br />  while(!oDB.isEOF()) <br />  { <br />    itemCount++; <br />    oDB.next(); <br />  } <br /><br />  // Restore the original settings <br />  oDB.nodes.item(nDBIndex).query.recordSet.setAttribute(sBOFBackup, "bofAction"); <br />  oDB.nodes.item(nDBIndex).query.recordSet.setAttribute(sEOFBackup, "eofAction"); <br /><br />  return itemCount;<br />}</pre><br />You can create a script object by right-clicking on the top-level form node ("form1" by default). Say you name your script object "Utils", you can then call the function inside of it from any event script like this:<br /><pre>this.rawValue = Utils.GetRecordCount();</pre><br />Stefan<br />Adobe Systems

  • Merge Items in Syndicator

    Hi All,
    I have name ,category and country fields in the MDM repository and trying to merge city and location from external file as Name is matching field .But when i check in destination preview the 1st record from the file is merging and other records are not merging .
    External File Format:
    Name     Category     Country     City     location
    p-1000     config     India     Jacksonville     Baymedows
    t-1000     Halb     Germany     Chicag     Deerpark          
    h-1000     Halb     USA     Losangles     centuryCity     
    q-1000     Halb     usa     Houston     Wunderlich
    Destination Preview
    Name     Category     Country     City     Location
    h-1000     Halb     china          -
    ?Not merged
    p-1000     Config     india     Jacksonville     Baymedows
    q-1000     Halb     india          -
    ?Not merged
    t-1000     Halb     germany          -
    ?Not merged
    What might be the problem?
    Please let me know .

    Hi Priya,
    PLease check the foll options:
    1. I hope the External source file is in the Tab Delimited Format as this one pre-requisite for using Merge ITems functionality of MDM.
    2. The configs under the Merge Item Tab must be :
    Name - Name of the Merge item
    Table - Name of the Current table
    Source File- As mentioned Before, Must be is a Tab-Delimited Text file Fomat.
    Matching Field - In your Case, name
    Source Fields to Merge- City ;Location
    3. Try syndicating out the Records, it might be that be the records are not showing properly in the Destination preview.
    4. Change the order of the records in the Source file and then upload it and then check whether still the earlier record is getting merged, or this time again only the First record is getting merged.
    4. Also try to take simple data in the Name Field such as 1000, 1001 etc. or A, B, C. in other words try not to keep them as alpha numeric. And then try Merging
    One of these might be the cause of error. Kindly check.
    Hope it helps.
    Thanks and regards
    Nitin jain

  • Showing Dimension counts for record results.

    Hi experts,
    In my application, I want to show dimension counts for record results. Support results contains 50 records, Out of 50 records, with Color=Red has 15 records. Therefore I want to display the Red Color results as -
    Color:
    Red (15)
    Silver(5)
    Like wise for other dimensions as well. As per the Endeca documentations, I guess "Drs" parameter is there to achieve it. If this is true then can you guys explain how the required functionality can be achieved using endea_jspref application . Or using presentation api, what kind of code should be written.
    Any input/ideas will be highly appreciated.
    Regards,
    Hoque

    Hi,
    in my code level i used like below to display num of records
    if you use RefinementMenu cartridge(in jsp RefinementMenu.jsp) you will get refinements in that content.
    <c:forEach items="${content.refinements}" var="refinement">
    <li>
    <dsp:include page="/renderNavLink.jsp">
    <dsp:param name="navAction" value="${refinement}"/>
    <dsp:param name="text" value="${refinement.label} (${refinement.count}) "/>
    </dsp:include>
    </li>
    </c:forEach>
    in above ${refinement.label} :: means the lable name(color:red,silver) and
    (${refinement.count}) :: means the no of records it has( red(10), silver(12))
    in renderlink.jsp i used to render content or navigation based on your click(red or silver)
    i think so it may help you from endeca Stuff.
    Regards
    Y.V.L

  • Report FBL1N with flag Customer items

    Hello,
    When I set the flag "Customer Items" in the selection screen of the report FBL1N I can display the vendor items and also the related custome items.
    The problem is that I can display the list of all the vendors and below the list of the customers with the total balance.
    I'd like to display the vendor items with the balance  of the vendor invoices then the related customer items with the balance of the customer invoices and then the balance of the vendor and customer invoices.
    Is it possible?
    Please let me know.
    Thanks a lot in advance
    Kind Regards,
    Emanuela

    Hello,
    Thanks for your answer.
    My problem is another one.
    I have two vendors:
    - Vendor A
    - Vendor B
    This to Vendors are linked to the following Customers:
    - Customer A
    - Customer B
    If I execute the FBL1N with the falg customeer items, I can display:
    1) List of Vendor A invoices and total amount
    2) List of Vendor B invoices and total amount
    3) List of Customer A invoices and total amount
    4) List of Customer B invoice sand total amount
    5) Balance of Vendor (A + B) and Customer (A+B) invoices
    I'd like to find a way to modify the sequence because I need to have:
    1) List of Vendor A invoices and total amount
    2) List of Customer A invoices and total amount
    3) Balance of Vendor A and Customer A invoices
    4) List of Vendor B invoices and total amount
    4) List of Customer B invoices and total amount
    5) Balance of Vendor B and Customer B invoices
    Only in this way I can display properly the result of compensation for each couple of Vendor/Customer.
    In the standard display the result has no meaning.
    Thanks a lot for your help
    Cheers,
    Emanuela

  • Fbl5n: The printer provides me only one customer items for each page...

    Hi all,
    launching t.code FBL5N, and printing the repost list, the printer provides me only one customer items for each page...
    I'd like obtaining more customer items for each page...
    What to do?
    Thanks

    Hi Umberto..
    Thats how the standard report works..
    To meet your requirement, you would probably need to look at another standard report.
    In case you need further clarification, please feel free to write to me..
    Good Luck!
    Lucid-Mind...

  • How to find total count of records in a cursor

    Aassume below is the cursor i defined
    cursor c1 is select * from emp;
    now, i want to find the total count of records in this cursor using an existing function etc., using one line statement.
    FYI: c1%rowcount is always giving 0, so i cant rely on this.
    Any thoughts, please share.
    Thanks in advance.

    I am just showing this to show how to get the rowcount along with the cursor, if the program has so much gap of between verifying the count(*) and opening the cursor.
    Justin actually covered this, he said, oracle has to spend some resources to build this functionality. As it is not most often required, it does not makes much sence to see it as a built-in feature. However, if we must see the rowcount when we open the cursor, here is a way, but it is little bit expensive.
    SQL> create table emp_crap as select * from emp where 1 = 2;
    Table created.
    SQL> declare
      2   v_cnt     number := 0;
      3   zero_rows         exception;
      4  begin
      5    for rec in (select * from (select rownum rn, e.ename from emp_crap e) order by 1 desc)
      6     loop
      7        if v_cnt = 0 then
      8           v_cnt := rec.rn;
      9        end if;
    10     end loop;
    11     if v_cnt = 0 then
    12        raise zero_rows;
    13     end if;
    14   exception
    15    when zero_rows then
    16      dbms_output.put_line('No rows');
    17   end;
    18  /
    No rows
    PL/SQL procedure successfully completed.
    -- Now, let us use the table, which has the data
    SQL> declare
      2   v_cnt     number := 0;
      3   zero_rows         exception;
      4  begin
      5    for rec in (select * from
      6          (select rownum rn, e.ename from emp e)
      7          order by 1 desc)
      8     loop
      9        if v_cnt = 0 then
    10           v_cnt := rec.rn;
    11           dbms_output.put_line(v_cnt);
    12        end if;
    13     end loop;
    14     if v_cnt = 0 then
    15        raise zero_rows;
    16     end if;
    17   exception
    18    when zero_rows then
    19      dbms_output.put_line('No rows');
    20   end;
    21  /
    14
    PL/SQL procedure successfully completed.Thx,
    Sri

  • Customer Item Open Interface

    Does anyone know what the Lock_flag is for the customer item open interface and what it should be set to when creating customer items? It is a required field but it is not explained in the 11.5.9 documentation.

    Hi
    I didn't find this flag in TRM of 11.5.10. In what table did you find it?
    Regards,
    Ricardo Cabral

  • Data provider problem in custom item renderer

    I have a complex, custom item renderer for a list. I add
    items that I extracted from an xml to the data provider using the
    IList interface. But when displaying the list, the items are all
    screwed up. Each rendered item has some parts which are initialized
    as different components depending on the values from the xml. This
    initialization is called in the item renderer for the
    creationComplete event.
    The weird thing is that when I output the dataProvider to
    check its values, some of the items have internal uids sometimes
    and sometimes they don't. If I output the dataProvider right after
    I add the items to it, none of them get internal uids. But from the
    initialize method, some of them do and some don't.
    To make things weirder, sometimes, as I scroll up and down
    the list, the dynamic components get all switched up. I'm either
    having a problem with internal uids or with the creation policies
    for lists. Or it's probably some simpler mistake I have yet to see.
    Anyone have any idea where the problem could lie? Any help is
    greatly appreciated.

    Any successful render must:
    1) override the set data property of the component
    Further, best practice is to store any data you need in the
    override set data(), and call invalidateProperties(). Then do the
    actual work in an override commitProperties() function.
    The framework is smart about when to call commitProperties
    efficiently. set data() gets called much more often.
    Tracy

  • Display filename in url for custom items

    Hi - I'm rying to find out how to open a word doc in a browser and display the FILENAME (xyz.doc) instead of the NAME (123.doc) - which comes from the wwdoc_document$ tbl .
    The word document was added to a portal page via a file attribute within custom text item. It seems that the document is not referenced within the actual page group when using the custom item compared to using standard file item format.
    I can open the doc in browser using the NAME format - eg, .../portal/pls/portal/docs/1/1234.doc but I need to open via the PAGEGRP/FILENAME format eg, .../portal/page/portal/PAGEGRP/xyz.doc
    BTW - We're using portal 10.1.4
    Any ideas appreciated
    Cheers,
    Justin

    Hi guys,
    I finally discover the solution. Just try this:
    First, create a Procedure like this:
    PROCEDURE ShowSaveDoc (pFile wwdoc_document$.name%TYPE) IS
    v_BlobContent wwdoc_document$.blob_content%TYPE;
    v_MimeType wwdoc_document$.mime_type%TYPE;
    v_Filename wwdoc_document$.filename%TYPE;
    BEGIN
    SELECT blob_content, mime_type, filename
    INTO v_BlobContent, v_MimeType, v_Filename
    FROM wwdoc_document$
    WHERE name = pFile;
    owa_util.mime_header(v_MimeType, FALSE);
    htp.p('Content-Length: ' || DBMS_LOB.getlength(v_BlobContent));
    htp.p('Content-Disposition: attachment; filename="' || v_Filename || '"');
    owa_util.http_header_close;
    wpg_docload.download_file( v_BlobContent );
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    htp.p('Error - No Data Was Found');
    WHEN OTHERS THEN
    htp.p('Error - ' || || SQLERRM);
    END;
    On the HTML code where you have the link try this:
    htp.p('< a id="someid" title="download" alt="download"
    h_ref="/portal/pls/portal/portal.galeria_pkg.showsavedoc?pFile=' ||rec.id_doc || '"> Download '||rec.docDescription||'</a>');
    where the rec.id_doc is the wwdoc_document$.name of your document.
    Try it and tell me if it worked.
    Its Working for me.
    Thanks.

  • How to force Portal not to display item content for a custom item

    Hi,
    I've read in several places questions about rendering an Item in a custom way, without letting portal
    display the item content, if you read along I've discovered a SIMPLE WAY to force portal not to
    display the content item.
    As per bugs and requests on metalink it seemed that in many versions of Oracle Portal (mine is 9.0.4.1)
    this is impossible, since even if we remove the "Item Content" from the list of displayed attributes in the
    region, Portal does display it anyway, just after every other Attribute.
    - Re: using an item type procedure
    - Metalink BUG # 3998251 "ENH: SHOULD BE ABLE TO HIDE "ITEM CONTENT" FOR TEXT ITEMS OR NEED A NEW ITEM TYP" and is being looked into internally whether it is feasible to include this in future releases.
    - Metalink Doc ID:      Note:290534.1          Subject:      Unable to Hide the "Item Content" Attribute for a Text Item     
    Mine scenario was the usual one:
    -oracle portal 9.4.0.1
    -a custom item based on custom text (so as to have the RTE to edit HTML).
    -A few attributes that help me define the class of an enclosing DIV tag that I wanted to put (a class and an ID)
    -A plsql call associated to the custom item, with the flag "display inline" checked
    -The dirty HTML generated by the built-in Oracle RTE (with BODY and HTML tags enclosing the actual HTML)
    -The region that will contain the item is set so that just the "Function Call" is (or should be) displayed
    I wanted to control entirely the display of the item text, while enclosing it in a custom DIV tag.
    After a few tries, one of which involved forcing an HTML comment around the item content that Portal stubbornly
    displayed, I've discovered this simple way. I don't know hom much this way is portable, but is done entirely with the APIs.
    In the stored procedure that displays the item, that I encolose, i just do:
    1) retrieved the ITEM querying WWSBR_ALL_ITEMS;
    2) updated the ITEM via WWSBR_API.MODIFY_ITEM, passing as display_otpion the value WWSBR_API.FULL_SCREEN!!
    Here I try a little explanation:
    An item just created has FULLSCREEN=1 and INPLACE=0. This way the stored procedure is executed
    AND the item content is displayed.
    WIth the modify_item, the item gets FULLSCREEN=1 and INPLACE=2 !! This seems strange since the docs
    tells that inplace can be 0 or 1. But this works.
    I've played with the WWV_THINGS table directlry, and setting INPLACE to 0, 2 or 3 works as well, while
    if it is set to 1, it behave the usual way.
    The trick is to have FULLSCREEN to 1 while INPLACE is not set to 1.. and this was the easiest solution.
    I'd like to receive a feedback from Oracle regarding this behaviour.
    Bye
    Walter
    --- This is the procedure ---
    CREATE OR REPLACE PROCEDURE show_item_mod(itemid in varchar2, styleid in varchar2,
         styleclass in varchar2) IS
    html CLOB;
    idx1 number;
    idx2 number := 0;
    item portal.wwsbr_all_items%rowtype;
    BEGIN
         --retrieve item content
         select * into item from portal.wwsbr_all_items where id=itemid;
         html := item.text;
         --check if text body contains "dirty" tags as put by Oracle RTE editor
         --and strips text from <BODY> to </BODY>
         idx1 := instr(html,'<BODY>');
         if(idx1 > 0) then
                   --strip text of broken tags
                   idx2 := instr(html,'</BODY>');
                   html := substr(html,idx1+6,idx2-idx1-6);
         end if;
         --check if this is first time we enter this procedure
         --or if text has changed
         if(item.description is null or idx2 != 0) then
                   --update filename so next time we won't enter the IF branch
                   --update DIPLSAY OPTION to FUllSCREEN
                   --update text, if this was changed
                   idx1 := portal.wwsbr_api.modify_item(
                        p_master_item_id => item.masterid,
    p_item_id => itemid,
    p_caid => item.caid,
    p_folder_id => item.folder_id,
    p_display_name => item.display_name,
    p_region_id => item.folder_region_id,
    p_display_option => portal.WWSBR_API.FULL_SCREEN,
    p_category_id => item.category_id,
    p_category_caid => item.category_caid,
    p_author => item.author,
    --p_description => item.description  ,
    p_keywords => item.keywords ,
    p_text => html ,
    p_folderlink_id => item.folder_link_id ,
    p_folderlink_caid => item.folder_link_caid ,
    p_publish_date => item.publish_date ,
    p_expire_mode => item.expiremode,
    --p_file_filename => 'Changed!',
                        p_description=> 'changed!',
    p_addnewversion => FALSE,
    p_access_level => portal.wwsbr_api.FOLDER_ACCESS
                   -- process cache invalidation messages
              portal.wwpro_api_invalidation.execute_cache_invalidation;
              end if;
         htp.prn('<div ');
         if(styleclass is not null) then
                   htp.prn(' class="' || styleclass || '" ');
         end if;
         if(styleid is not null) then
                   htp.prn(' id="' || styleid || '" ');
         end if;
         htp.prn('>');
         htp.p(html);
         htp.p('</div>');
    END show_item_mod;
    /

    Hi,
    I've read in several places questions about rendering an Item in a custom way, without letting portal
    display the item content, if you read along I've discovered a SIMPLE WAY to force portal not to
    display the content item.
    As per bugs and requests on metalink it seemed that in many versions of Oracle Portal (mine is 9.0.4.1)
    this is impossible, since even if we remove the "Item Content" from the list of displayed attributes in the
    region, Portal does display it anyway, just after every other Attribute.
    - Re: using an item type procedure
    - Metalink BUG # 3998251 "ENH: SHOULD BE ABLE TO HIDE "ITEM CONTENT" FOR TEXT ITEMS OR NEED A NEW ITEM TYP" and is being looked into internally whether it is feasible to include this in future releases.
    - Metalink Doc ID:      Note:290534.1          Subject:      Unable to Hide the "Item Content" Attribute for a Text Item     
    Mine scenario was the usual one:
    -oracle portal 9.4.0.1
    -a custom item based on custom text (so as to have the RTE to edit HTML).
    -A few attributes that help me define the class of an enclosing DIV tag that I wanted to put (a class and an ID)
    -A plsql call associated to the custom item, with the flag "display inline" checked
    -The dirty HTML generated by the built-in Oracle RTE (with BODY and HTML tags enclosing the actual HTML)
    -The region that will contain the item is set so that just the "Function Call" is (or should be) displayed
    I wanted to control entirely the display of the item text, while enclosing it in a custom DIV tag.
    After a few tries, one of which involved forcing an HTML comment around the item content that Portal stubbornly
    displayed, I've discovered this simple way. I don't know hom much this way is portable, but is done entirely with the APIs.
    In the stored procedure that displays the item, that I encolose, i just do:
    1) retrieved the ITEM querying WWSBR_ALL_ITEMS;
    2) updated the ITEM via WWSBR_API.MODIFY_ITEM, passing as display_otpion the value WWSBR_API.FULL_SCREEN!!
    Here I try a little explanation:
    An item just created has FULLSCREEN=1 and INPLACE=0. This way the stored procedure is executed
    AND the item content is displayed.
    WIth the modify_item, the item gets FULLSCREEN=1 and INPLACE=2 !! This seems strange since the docs
    tells that inplace can be 0 or 1. But this works.
    I've played with the WWV_THINGS table directlry, and setting INPLACE to 0, 2 or 3 works as well, while
    if it is set to 1, it behave the usual way.
    The trick is to have FULLSCREEN to 1 while INPLACE is not set to 1.. and this was the easiest solution.
    I'd like to receive a feedback from Oracle regarding this behaviour.
    Bye
    Walter
    --- This is the procedure ---
    CREATE OR REPLACE PROCEDURE show_item_mod(itemid in varchar2, styleid in varchar2,
         styleclass in varchar2) IS
    html CLOB;
    idx1 number;
    idx2 number := 0;
    item portal.wwsbr_all_items%rowtype;
    BEGIN
         --retrieve item content
         select * into item from portal.wwsbr_all_items where id=itemid;
         html := item.text;
         --check if text body contains "dirty" tags as put by Oracle RTE editor
         --and strips text from <BODY> to </BODY>
         idx1 := instr(html,'<BODY>');
         if(idx1 > 0) then
                   --strip text of broken tags
                   idx2 := instr(html,'</BODY>');
                   html := substr(html,idx1+6,idx2-idx1-6);
         end if;
         --check if this is first time we enter this procedure
         --or if text has changed
         if(item.description is null or idx2 != 0) then
                   --update filename so next time we won't enter the IF branch
                   --update DIPLSAY OPTION to FUllSCREEN
                   --update text, if this was changed
                   idx1 := portal.wwsbr_api.modify_item(
                        p_master_item_id => item.masterid,
    p_item_id => itemid,
    p_caid => item.caid,
    p_folder_id => item.folder_id,
    p_display_name => item.display_name,
    p_region_id => item.folder_region_id,
    p_display_option => portal.WWSBR_API.FULL_SCREEN,
    p_category_id => item.category_id,
    p_category_caid => item.category_caid,
    p_author => item.author,
    --p_description => item.description  ,
    p_keywords => item.keywords ,
    p_text => html ,
    p_folderlink_id => item.folder_link_id ,
    p_folderlink_caid => item.folder_link_caid ,
    p_publish_date => item.publish_date ,
    p_expire_mode => item.expiremode,
    --p_file_filename => 'Changed!',
                        p_description=> 'changed!',
    p_addnewversion => FALSE,
    p_access_level => portal.wwsbr_api.FOLDER_ACCESS
                   -- process cache invalidation messages
              portal.wwpro_api_invalidation.execute_cache_invalidation;
              end if;
         htp.prn('<div ');
         if(styleclass is not null) then
                   htp.prn(' class="' || styleclass || '" ');
         end if;
         if(styleid is not null) then
                   htp.prn(' id="' || styleid || '" ');
         end if;
         htp.prn('>');
         htp.p(html);
         htp.p('</div>');
    END show_item_mod;
    /

  • FRM-40735 WHEN-CUSTOM-ITEM-EVENT trigger raised unhandled exception ORA-065

    Please help....This error is comming when opening the form. The form is running on oracle 11g 64bits web logic.
    "FRM-40735 WHEN-CUSTOM-ITEM-EVENT trigger raised unhandled exception ORA-065"

    Welcome to OTN
    Before posting on this forum please read
    FRM-40735: WHEN-CUSTOM-ITEM-EVENT trigger raised unhandled exception ORA-06502.
    you'll get some hint here
    Oracle/PLSQL: ORA-06502 Error

  • Vendor Line Item Display-Default value for customer items

    Is it possible in selection screen of transaction FBL1N (Vendor line item display) the default value of field "customer items" to be checked?
    Thanks in advance.

    hi Tsiami
    it's not possible. if u want check customer line items go throw this TC:FBL5N
    plz assign points
    regards
    sivareddy.

Maybe you are looking for

  • How to manipulate data in multiple rows without using cursor??

    Hi all, I have a form in which there is a push button & 4 text fields. Push button : Process Text fields: Year, Month, Financial_To_Year, Financial_From_Date. In database , there are tables like, CUSTOMER_MASTER, FD_ACCOUNT_MASTER, FD_ACCOUNT_DTL, CU

  • I have the mac OS 92.2 Classic...Should I update to the mac os X 10.4 Tiger

    I have a couple of questions, Could anyone show me...the modifications and perfections of the new mac os X 10.4 Tiger???? And Where Could I find one cheaper than $129.00 Could anyone show me, any secure and safe place to buy the new mac os X 10.4 Tig

  • Multi-Dimensional Arrays

    Greetings everyone, Currently I am working on a project for school, this is my first term in Java and a project we have been assigned to do is pretty much create a application (using the SDK for use on the computer only) and create a application wher

  • Irregular Printing - Xerox Phaser 8560

    I've had this Xerox Phaser 8560 for years and have been using it with Snow Leopard without issue. Upon recent update to 10.6.3 (from 10.6.2) I am now having issues where one print will be fine, but then another separate print will just come out as da

  • Why won't firefox open another tab. I click it and nothing happens.

    If I click a link, it will open a new tab fine on it's own, but if I click the new tab, nothing happens.