Restrict selection from LDB 'DDF' based on FI Doc number(BELNR)?

Hi all,
I am trying to restrict selection from LDB 'DDF' based on FI Doc number(BELNR).
Even if i pass only one document number in selection-screen, the program is still printing lot of documents?
Where I am going wrong?
*& Report  ZSUB_READ_LDB
REPORT  ZSUB_READ_LDB.
DATA wa_BSEG TYPE BSEG.
SELECT-OPTIONS s_BELNR FOR wa_BSEG-BELNR.
DATA: callback TYPE TABLE OF ldbcb,
callback_wa LIKE LINE OF callback.
DATA: seltab TYPE TABLE OF rsparams,
seltab_wa LIKE LINE OF seltab.
callback_wa-ldbnode = 'BSEG'.
callback_wa-get = 'X'.
callback_wa-get_late = 'X'.
callback_wa-cb_prog = sy-repid.
callback_wa-cb_form = 'CALLBACK_BSEG'.
APPEND callback_wa TO callback.
CLEAR callback_wa.
seltab_wa-kind = 'S'.
seltab_wa-selname = 'BELNR'.
LOOP AT s_BELNR.
  MOVE-CORRESPONDING s_BELNR TO seltab_wa.
  APPEND seltab_wa TO seltab.
ENDLOOP.
CALL FUNCTION 'LDB_PROCESS'
  EXPORTING
    ldbname                     = 'DDF'
    variant                     = ' '
  TABLES
    callback                    = callback
    selections                  = seltab
  EXCEPTIONS
    ldb_not_reentrant           = 1
    ldb_incorrect               = 2
    ldb_already_running         = 3
    ldb_error                   = 4
    ldb_selections_error        = 5
    ldb_selections_not_accepted = 6
    variant_not_existent        = 7
    variant_obsolete            = 8
    variant_error               = 9
    free_selections_error       = 10
    callback_no_event           = 11
    callback_node_duplicate     = 12
    OTHERS                      = 13.
IF sy-subrc ne 0.
  WRITE: 'Exception with SY-SUBRC', sy-subrc.
ENDIF.
*&      Form  CALLBACK_BSEG
      text
     -->NAME       text
     -->WA         text
     -->EVT        text
     -->CHECK      text
FORM CALLBACK_BSEG USING name TYPE ldbn-ldbnode
wa TYPE BSEG
evt TYPE c
check TYPE c.
  CASE evt.
    WHEN 'G'.
      WRITE: / wa-BELNR.
      ULINE.
    WHEN 'L'.
      ULINE.
  ENDCASE.
ENDFORM.                    "CALLBACK_BSEG

Hi Andreas,
I have included bukrs and gjahr too...but if I input only one invoice number the report is printing a lot of invoices.
Not sure from where the data is being picked up?
Sorry of poor formatting of code.
Thanks ,
Subba
*& Report  ZSUB_READ_LDB
REPORT  ZSUB_READ_LDB.
TYPE-POOLS: RSDS, RSFS.
DATA wa_BSEG TYPE BSEG.
SELECT-OPTIONS s_BELNR FOR wa_BSEG-BELNR.
SELECT-OPTIONS s_BUKRS FOR wa_BSEG-BELNR.
SELECT-OPTIONS s_GJAHR FOR wa_BSEG-BELNR.
DATA: callback TYPE TABLE OF ldbcb,
callback_wa LIKE LINE OF callback.
DATA: seltab TYPE TABLE OF rsparams,
seltab_wa LIKE LINE OF seltab.
DATA: TEXPR TYPE RSDS_TEXPR,
FSEL TYPE RSFS_FIELDS.
start-of-selection.
  callback_wa-ldbnode = 'BSEG'.
  callback_wa-get = 'X'.
callback_wa-get_late = 'X'.
  callback_wa-cb_prog = sy-repid.
  callback_wa-cb_form = 'CALLBACK_BSEG'.
  APPEND callback_wa TO callback.
  CLEAR callback_wa.
  seltab_wa-kind = 'S'.
  seltab_wa-selname = 'BELNR'.
*seltab_wa-LOW =
  LOOP AT s_BELNR.
    MOVE-CORRESPONDING s_BELNR TO seltab_wa.
    APPEND seltab_wa TO seltab.
  ENDLOOP.
  seltab_wa-kind = 'S'.
  seltab_wa-selname = 'BUKRS'.
*seltab_wa-LOW =
  LOOP AT s_BELNR.
    MOVE-CORRESPONDING s_BUKRS TO seltab_wa.
    APPEND seltab_wa TO seltab.
  ENDLOOP.
  seltab_wa-kind = 'S'.
  seltab_wa-selname = 'GJAHR'.
*seltab_wa-LOW =
  LOOP AT s_BELNR.
    MOVE-CORRESPONDING s_GJAHR TO seltab_wa.
    APPEND seltab_wa TO seltab.
  ENDLOOP.
  CALL FUNCTION 'LDB_PROCESS'
    EXPORTING
      ldbname                     = 'DDF'
      variant                     = ' '
      EXPRESSIONS                 = TEXPR
      FIELD_SELECTION             = FSEL
    TABLES
      callback                    = callback
      selections                  = seltab
    EXCEPTIONS
      ldb_not_reentrant           = 1
      ldb_incorrect               = 2
      ldb_already_running         = 3
      ldb_error                   = 4
      ldb_selections_error        = 5
      ldb_selections_not_accepted = 6
      variant_not_existent        = 7
      variant_obsolete            = 8
      variant_error               = 9
      free_selections_error       = 10
      callback_no_event           = 11
      callback_node_duplicate     = 12
      OTHERS                      = 13.
  IF sy-subrc ne 0.
    WRITE: 'Exception with SY-SUBRC', sy-subrc.
  ENDIF.
*&      Form  CALLBACK_BSEG
      text
     -->NAME       text
     -->WA         text
     -->EVT        text
     -->CHECK      text
FORM CALLBACK_BSEG USING name TYPE ldbn-ldbnode
wa TYPE BSEG
evt TYPE c
check TYPE c.
  CASE evt.
    WHEN 'G'.
      WRITE: / wa-BELNR.
      ULINE.
    WHEN 'L'.
      ULINE.
  ENDCASE.
ENDFORM.                    "CALLBACK_BSEG

Similar Messages

  • Based on single Doc number Multiple line items update to in single Z database table

    Dear Frds,
    Based on single Doc number Multiple line items update to database table
    Example : Doc Num: Janu
    If users are using different doc number again the line items are modifying and replacing to new document Number . Pls Help me Screen attached as
    Like CS01 Transaction

    Dear Frds,
    Based on single Doc number Multiple line items update to database table
    Example : Doc Num: Janu
    If users are using different doc number again the line items are modifying and replacing to new document Number . Pls Help me Screen attached as
    Like CS01 Transaction

  • Values of dynamic selections for LDB DDF

    Hi
    I have to customize a SAP standard program which is using LDB-DDF. As per client requirement, we have to add a few select statement and there we have to add the selection criteria of dynamic selections.
    The problem I am facing is that I dont know how and where i can track the values given in the dynamic selection screen.
    I did some research and I found out that values entered in the dynamic selections is stored in complex data object (deep structure) but I am not able to find it where and how we can use it.
    The name of the SAP standard program is RFDZIS00.
    Thanks in advance
    Bhav

    Hi,
    In SE36-> DDF-> select the Selections radio button.
    Menubar Extras->Selection Views-> Here you can change the "origin of view" which is created by SAP or we can create our own views under "origin of view" CUS.
    Best Regards,
    Mohan,

  • Best way to select from 2 tables, based on sum from detail table

    I have a "customer order line detail" table from which I want to report
    Order Number
    Customer Number
    Part Number
    Line Value { which is Unit Qty * (Unit price - discount%) }
    But only for orders which are above £1500.
    And lines which are not "Cancelled"
    I have access to an API which returns the total order value for the order.
    I am currently using this in my criteria, eg:
    select order_no, customer_no, part_no, round(unit_qty *(unit_price - unit_price *(discount/100)),2) Line_value
    from customer_detail
    where
    status != 'Cancelled'
    and
    Customer_Order_API.Get_Total_Sale_Price__(order_no)>=1500
    The API contains the following:
    SELECT SUM(ROUND((qty * price_conv_factor * unit_price), rounding_) -
    ROUND((qty * price_conv_factor * unit_price) -
    ((qty * price_conv_factor * unit_price) * ((1 - discount / 100) * (1 - order_discount / 100))), 2))
    FROM customer_detail
    WHERE order_no = order_no_
    AND state != 'Cancelled'
    AND line_item_no <= 0
    (that uses a price conversion factor that I don't use, since it's always 1)
    My query runs so slowly, because it is getting the order value for every line of the order, is it possible to improve?
    Thanks

    Thanks for the suggestion, it was close to what I needed.
    I ended up with this:
    select order_no,  name, ref_id, c_salesman_sub_division, line_value, catalog_desc
    from
    (SELECT coj.customer_no, coj.order_no, ifsapp.customer_info_api.GET_NAME(customer_no) name, coj.ref_id,
           coj.c_salesman_sub_division, ROUND((coj.buy_qty_due * coj.
           price_conv_factor) * coj.sale_unit_price, 2) - ROUND((coj.buy_qty_due *
           coj.price_conv_factor) * coj.sale_unit_price - ((coj.buy_qty_due * coj.
           price_conv_factor) * coj.sale_unit_price) * ((1 - coj.discount / 100) *
           (1 - coj.order_discount / 100)), 2) line_value, coj.catalog_desc,
    SUM( ROUND((coj.buy_qty_due * coj.
           price_conv_factor) * coj.sale_unit_price, 2) - ROUND((coj.buy_qty_due *
           coj.price_conv_factor) * coj.sale_unit_price - ((coj.buy_qty_due * coj.
           price_conv_factor) * coj.sale_unit_price) * ((1 - coj.discount / 100) *
           (1 - coj.order_discount / 100)), 2)) OVER (PARTITION BY Coj.ORDER_NO) AS SUM_ORDER
        FROM ifsapp.customer_order_join coj
        WHERE coj.order_no = coj.order_no
          AND TRUNC(coj.date_entered) = NVL(TO_DATE('25/01/2007', 'DD/MM/YYYY'),
              TRUNC(SYSDATE))
          AND coj.authorize_code = 'UKMEDM'
          AND coj.line_item_no >= 0
          AND coj.ref_id <> 'SAMP'
          AND coj.state <> 'Cancelled'
    where sum_order >=1500
        ORDER BY ref_id, c_salesman_sub_division, customer_no, order_no
    /[pre]
    But I have realised the problem with this.  Not sure if I made it clear, to myself even, but I need to include
    order lines added on a particular day (that are not cancelled)
    for orders which total >= £1500.
    If one line of an order is added for £900 but the rest of the order is £2000 then that line should be shown.
    My SQL only shows lines added for the day >= 1500.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • To select from database table based on date range

    hi
    i have a selection screen in which date range is being given
    say eg 23/06/07  to 23/12/08
    based on this date i want to select data from a ztable
    eg i want to select a field amount from table
    and three is a field date range on the table
    for this particular field i want to select all records for amount field  and factual field falling wiithing this date range and sum it
    eg
    based on date range as in selcetion screen
    select amount( field1)  factual ( field2) from ztable into it_ztable where date = ?....
    please give me code for it  and how to sum all values as i will get from the ztable into internal table the two values as fetched from the ztable
    please suggest asap
    regards
    arora

    hi
    i am using
    sELECT field1 field2 FROM Ztable  INto it_matu
                       where DATE GE sl_dat-low    
                        AND  DATE LE sl_dat-high.   
    i am getting data in internal table but
    say i have twelve records now i want to sum it the both the columns into and use that sum final amount to display
    let me know how to use sume in the intrranal tabl do i need to use control statement
    how to use the sum for two columns and take into a serperate variable to display
    regards
    aRora

  • Select from different tables based on value

    Hi Forum,
    I'm stuggling with a problem:
    In a table, I have two columns, pref_type and pref_value. Column pref_type stores a number value that is linked to a preference type, whereas column pref_value stores the value of that preference.
    Unfortunately, the data model is such that per preference type a different tables needs to be used, so for example, if
    pref_type = 1, table to query is A, whereas if
    pref_type = 2, table to query is B.
    I now want to write a query that resolves the preferences, ie it should branch to the respective table based on pref_type and search for pref_value and deliver back a different column of that respective table.
    My first approach was like that:
    select decode (pref_value, 1, (select result from A where pref_value = ???),
    2, (select result from B where pref_value = ???)
    where the three ??? depict the problem I'm having, as Oracle doesn't allow me to have a harmonized subquery here.
    How do I achieve this?
    Thanks for any help,
    J. Sieben

    I believe this is what you are trying to get at:
    SELECT DECODE(m.pref_type, 1, (SELECT result FROM a
                                   WHERE a.pref_value = m.pref_value),
                               2, (SELECT result FROM b
                                   WHERE b.pref_value = m.pref_value)
    FROM my_table mAlthough, if the tables are large, that might be pretty slow. Better than an outer join, but one of those correlated queries is going to be run for each row in my_table. You could lso try something like:
    SELECT m.pref_type, r.result
    FROM my_table m,
         (SELECT 'A' tbl, pref_value, result
          FROM a
          UNION ALL
          SELECT 'B', pref_value, result
          FROM b) r
    WHERE DECODE(m.pref_type, 1, 'A', 'B') = r.tbl and
          m.pref_value = r.pref_valueHTH
    John

  • Selecting from a column based on the id

    Hello All,
    Is there a way to update a table based on the column id?
    Example: I have a table where column 2 is an accumulated dollar amount. Each row of the column is a lease.
    I need to update column 3 with $$ that i get from my cursor say x. Then column 4 is needs to be updated with
    amount in column 2+ amount in column3.
    Again column 5 needs to be update with the next $$amount that i get from my cursor x. Now column 6 needs to
    be updated with amount in value in column 4 and column5...so on and so forth.
    I can get the column names from the dba_tab_columns. However I don't know if those column names can be used in the
    update/insert statements to populate the table.
    Thanks,
    Chiru

    Hi,
    I'm not sure I understand the problem.
    You can use column names in a INSERT and UPDATE statements. for example:
    UPDATE  my_table
    SET     column_3 = x
    ,       column_4 = column_2 + column_3;When you use a column name to the right of the "=" sign, it always refers to the old value.
    In the 3rd line of the example above, column_4 is set to the old value of column_2 plus the old value of column_3, not the new value (x) that was given to column_3 in the 2nd line.
    If you have a problem, post
    (1) a little sample data (three ros, maybe) before UPDATE, and
    (2) what those same rows should be after the UPDATE,
    (3) explanation, (such as "I want to add the parameter :amt to column_5 and subtract :amt from column_6.")

  • Look-up name value from XML file based on user entered number value

    My form has an "Employee Number" numeric field and an "Employee Name" textfield. I want the user to enter their employee number and have JavaScript that will "look-up" that employee number in the XML data file and return the corresponding Employee Name into the employee name textfield. I need an example XML data file and form with the appropriate script.
    Can anyone help me with this?

    Hi ,
    Re-read your post, find that the col2 in List1 is people and group type column, SharePoint Lookup type column showing additional fileds option does not support people and group type column, so there should be no OOB method to achieve your
    goal.
    http://techtrainingnotes.blogspot.com/2012/01/sharepoint-not-all-column-types-can-be.html
    I think you can try using InfoPath form to manipulate the correspond col2 value when lookup col1 from List1 then show in list view, or may use custom visual web part to achieve you goal.
    http://sharepointsolutions.com/sharepoint-help/blog/2011/11/get-infopath-to-display-lookup-column-value-not-id/
    Thanks
    Daniel Yang
    TechNet Community Support

  • How to fetch data from CDHDR Table based on Order Number

    Hi,
    I need to fetch the data from CDHDR just based on the Order number .I found there is a field called 'OBJECTID' in table 'CDHDR'. But the  last part of OBJECTID contains order number.suppose my order number is 90506210 the objectid field contains '51030000090506210'.510 is login client,don't know what 30 is and last part is order number i.e 000090506210.i have to concatenate all and fetch data .i can do it for one order number but here order number is declared as select-options.how do i ?
    HERE IS THE CODE FOR ONE ORDER NUMBER.HOW CAN DO FOR RANGE OF ORDER NUMBERS.
    PARAMETER : S_OBJECT FOR  /BEV1/RBVBAK-AUFNR  OBLIGATORY.
    DATA : IT_CDHDR TYPE STANDARD TABLE OF CDHDR WITH HEADER LINE,
                 WA_CDHDR LIKE LINE OF IT_CDHDR,
                 S_OBJECT1 LIKE CDHDR-OBJECTID.
    CONCATENATE  sy-mandt  '30'  S_OBJECT INTO S_OBJECT1.
    SELECT * FROM CDHDR INTO TABLE IT_CDHDR WHERE OBJECTID = S_OBJECT1.

    P838355 wrote:>
    > Hi,
    >  I need to fetch the data from CDHDR just based on the Order number .I found there is a field called 'OBJECTID' in table 'CDHDR'. But the  last part of OBJECTID contains order number.suppose my order number is 90506210 the objectid field contains '51030000090506210'.510 is login client,don't know what 30 is and last part is order number i.e 000090506210.i have to concatenate all and fetch data .i can do it for one order number but here order number is declared as select-options.how do i ?
    >
    > HERE IS THE CODE FOR ONE ORDER NUMBER.HOW CAN DO FOR RANGE OF ORDER NUMBERS.
    >
    >
    > PARAMETER : S_OBJECT FOR  /BEV1/RBVBAK-AUFNR  OBLIGATORY.
    >
    > DATA : IT_CDHDR TYPE STANDARD TABLE OF CDHDR WITH HEADER LINE,
    >              WA_CDHDR LIKE LINE OF IT_CDHDR,
    >              S_OBJECT1 LIKE CDHDR-OBJECTID.
    >
    > CONCATENATE  sy-mandt  '30'  S_OBJECT INTO S_OBJECT1.
    >
    > SELECT * FROM CDHDR INTO TABLE IT_CDHDR WHERE OBJECTID = S_OBJECT1.
    You need to loop through the select option and concatenate with required data then select using 'in' instead of equal or select one by one.
    or
    select sales order numbers from VBAK for the selection into internal table then loop through the internal table and concatenate then select from CDHDR.
    for better performance use objectclass in where clause. the value for sales order for objectclass is VERKBELEG.
    in my system the object id is just an order number there is no other additions to it but in CDPOS the tabkey contains the order number with client and other information also.
    the 30 may be your item number... check it
    go ahead and change sales order and see what you can find in CDHDR
    Good luck
    Edited by: Sampath Kumar on Oct 21, 2009 9:02 AM

  • Select from nested table in a nested table security problem

    please help
    running Oracle 9.2.0.3.0 on RH AS 2.1
    I can select the inner most nested table as the creator, but can't use the same select statement as USER2.
    ORA-00942: table or view does not exist
    -- begin make of objects and tables
    create or replace type mydata_t as object ( x float, y float);
    create or replace type mydata_tab_t as table of mydata_t;
    create or replace type mid_t as object (
         graphname varchar2(12),
         datapoints mydata_tab_t );
    create or replace type mid_tab_t as table of mid_t;
    create or replace type top_t as object (
         someinfo int,
         more_mid     mid_tab_t );
    create table xyz (
         xyzPK int,
         mainstuff     top_t )
         nested table mainstuff.more_mid store as mid_nt_tab
              (nested table datapoints store as mydata_nt_tab)
    -- grants
    grant all on mydata_t to user2;
    grant all on mydata_tab_t to user2;
    grant all on mid_t to user2;
    grant all on mid_tab_t to user2;
    grant all on top_t to user2;
    grant all on xyz to user2;
    -- insert
    insert into xyz values (1, top_t(22,mid_tab_t(mid_t('line1',mydata_tab_t(
    mydata_t(0,0),
    mydata_t(15,15),
    mydata_t(30,30))))));
    commit;
    -- select fails as user2
    select * from table(select Y.datapoints as DP_TAB
         from table(select X.mainstuff.more_mid as MORE_TAB
              from scott.xyz X
              where X.xyzPK=1) Y
         where Y.graphname='line1') Z;
    -- select works as user2, but i need individual lines
    select Y.datapoints as DP_TAB
         from table(select X.mainstuff.more_mid as MORE_TAB
              from scott.xyz X
              where X.xyzPK=1) Y
         where Y.graphname='line1';

    Thank you for your reply.
    I have tried
    select value(t) from table t;
    but it is still not working. I got almost the same answer as before.
    Anyway thank you very much again.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by MARCELO OCHOA ([email protected]):
    Originally posted by meimei wu ([email protected]):
    [b]I created a nested object-relational table using REF type in oracle8i. when I tried to select * from the table, I got lots of number as the ref type values, but actually, the value in ref type should be of type varchar2 and number. The number I got looked like following code:
    JARTICLE_REF_TYPE(000022020876108427C2FE0D00E0340800208FD71F76103B99B12009C0E0340800208FD71F,
    Does anyone know how I can get the actual value that I inserted into the nested table?
    your help is appreciated.<HR></BLOCKQUOTE>
    Try this:
    select value(t) from table t;
    Best regards, Marcelo.
    null

  • How to default the Document Type in Dynamic selections linked with DDF LDB?

    Hello all,
    A report is associated with Logical database DDF. In the selection screen we have Dynamic selections screen in which Document type is one of the fields. As per the requirement, this field document type(BLART) needs to be filled by default on certain actions done by the user. To be more precise when user clicks on a particluar check box, then document type values from a customized table should appear in that parameter in dynamic selections.
    Query here is I am not able to track the selection screen name for those dynamic fields. Can you please guide me in knowing the selection screen name for document type so that I can append values into it upon certain actions. I tried to check in the LDB 'DDF'  but I could not get any apt information there.
    Thanks in advance.
    Chandra.

    Hi,
    In the report event at selection-screen output, based on the user action you can do that try like below:
    at selection-screen output.
    if p_checkbox = 'X'.  "Checkbox checked
        s_blart-low = 'F'.
       s_blart-option = 'EQ'.
      s_blart-sign = 'I'.
      append s_blart.
    endif.
    Regards,
    Himanshu

  • Restriction for items from Purchase Order based on Sale Order

    Hi !
           We create PO directly from Sale Order ( by ticking Option under Logistic tab, 'Purchase Order') for customer C01 (for eg).
    From the PO created, we post GRPO.
    Now our need is,
    Assume if 10 Qty is been ordered in such a way and been received (GRPO posted). it 'll add on to the stock account i.e will increase stock qty at our whse.
    is it possible to restrict these 10 qty of item from being sold to any other Customer other than whom hav ordered i.e if we create sale order for C02 the SBO should not take the items received from PO created based on Sales Order created for C01?
    Meera.

    Meera,
    Which version of SBO are you using 2005 or 2007?
    I don't think Serial numbers can help in this scenario.  There is no hard allocation or blocking possible using Serial numbers.
    This is the Work around I am thinking about.
    Set the items to be Batch Managed - On Every Transaction
    When performing Goods Receipt, enter the Sales Order Number as the Batch Number
    When creating the delivery, using SBO_SP_TransactionNotification we can easily check the Batch of the Item being selected and verify it with the BaseRef of Delivery lines to match with Sales Order number.
    If the numbers don't match we can warn user with message, "The items batch reserved for Sales Order xyz"
    Even if you make a mistake when entering the batch number same as Sales Order number when doing a goods receipt. It can still be traced and blocked during delivery.
    Hint: The Batch table records the Goods Receipt transaction along with the BaseDocument number, Base Ref, etc
    If you decide to go this route, I could help you further.
    Let me know
    Suda

  • Trying to get a fourth field to populate based on the selection from three other dropdown menus.

    I would like the Treatment Classification field to populate with a combination of text and numbers based on my selection from three other drop down menus.
    For example:
    If I select "0-No Hurt" in the AHL field, "0-No Hurt in the PHL field, and "Near Miss in the Treatment Choice field, then the Treatment Classification field would populate to "L00NM".
    If I select "2-Moderate Hurt: in the AHL, "4-Fatality" in the PHL field, and "Restricted Work Incident" in the Treatment Choice field, then the Treatment Classifiaction field would populate to "L24RWI".
    If I select "1-Minor Hurt" in the AHL field, "4-Fatality" in the PHL field, and "Medical Treatment Incident" in the Treqatment Choice field, then the Treatment Classifiaction field would populate to "L14MTI".
    Etc, etc, etc.
    I could then fill in the resyt of the script with the required text.
    Not sure how to load my PDF file.
    Thanks,
    Rick

    Do your dropdown list items currently have export values set up? It seems like the value you want to construct is simply concatenating the values of the three dropdowns, and this would be easy if you set the export values of the list items appropriately. For example, the export value for the "0-No Hurt" item would be 0 and for "Near Miss" it would be "NM", etc., so the script could look something like:
    // Get the values of the drop downs, as strings
    var v1 = getField("AHL").valueAsString;
    var v2 = getField("PHL").valueAsString;
    var v3 = getField("Treatment Choices").valueAsString;
    // Set this field's value
    event.value = "L" + v1 + v2 + v3 + "other text goes here."

  • How to populate a table based on a row selection from another table.

    Hi, i just started to use ADF BC and Faces. Could some one help me or point me a solution on the following scenario .
    By using a search component , a table is being displayed as a search result. If i select any row in the resulted table , i need to populate an another table at the bottom of the same page from another view. These two tables are related by primary key . May i know how to populate a table based on a row selection from another table. Thanks
    ganesh

    I understand your requirement and the tutorial doesn't talk about Association between the views so that you can create a Master-Detail or in DB parlance, a Parent-Child relationship.
    I will assume that we are dealing with two entities here: Department and Employees where a particular Department has many Employees and hence a Parent-Child relationship.
    Firstly, you need to create an Association between the two Entities - Department and Employees. You can do that by right clicking on the model's entity and then associating the two entities with the appropriate key say, DepartmentId.
    Once you have done that, you need to link the two entities in the View section with this Association that you created. Then go to AppModule and make sure that in the Available View Objects: 'EmployeesView' appears under 'DepartmentView' as "EmployeesView via <link you created>". Shuttle the 'DepartmentView' to the right, Data Model and then shuttle
    "EmployeesView via <link you created>" to the right, Data Model under 'DepartmentView'.
    This will then be reflected in your Data Controls. After that, you simply would have to drag this View into your page as a Master-Detail form...and then when you run this page, any row selected in the Master table, would display the data in the Detail table.
    Also, refer to this link: [Master-Detail|http://baigsorcl.blogspot.com/2010/03/creating-master-detail-form-in-adf.html]
    Hope this helps.

  • How to go to a certain page based on user's selection from a select list

    On the very first page of my application, I have one item - a select list. Based on what they select from the list, how do I go to the corresponding page? For instance, if the user selects 'Metal', how do I go to the Metal page?

    Hello,
    Assuming the answer to Sergio is "yes" …
    First, you should make sure that the returned value from your select list is the corresponding page number or page alias for the user selection. Using your terms – "Metal" should return the page number/alias of the page where you want to implement "Metal".
    Then, on your first page, you can define a "Branch to Page Identify by Item". The parameter should be your select item name.
    Regards,
    Arie.

Maybe you are looking for