Passing multiple dynamic params to JS function

Hi,
I have a problem that I have been grappling with for some time now.
My JSP shows the user a list of textboxes dynamically, depending on a value from the DB. So, if the field value is 10, the user will see 10 textbixes and they will sequentially be assigned names as - text1, text2.....
The problem arises when I try to pass the values of these textboxes to a JS function. Now, my function does not know how many params to expect, so I am trying to send it as a single string separated by : (colon).
My method call looks like this -
<input type="button" value="Click Here" style="width:140px;"
               onClick="myJSFunction(
<c:forEach var="item" items='${sessionScope.textFields}' varStatus="status">
          document.form.text<c:out value='${status.count}'/>.value+':'
                    </c:forEach>
                    );">          
Pls. note that I am putting the colon at the end of every call in the forEach loop.
I get a syntax error if I run this code for more than 1 textbox. The compiler expects a closing bracket ) at the end of the last line, which I have already provided.
Is there any other way to do this or is there anything obviously wrong with my code?
Thanks in advance.

There are several ways around it.
javascript can have any number of parameters passed to a function.
You don't even have to declare them.
You can reference them as arguments[0], arguments[1], arguments[2]...
Another suggestion: pass up the "basename" and a count of how many fields there are and use the "eval" function
var base = "document.myform.text";
for (var i = 0; i<numFields; i++){
  var value = eval(base + i + ".value");
}or something like that (sorry don't have time to check it right now)

Similar Messages

  • How to pass multiple filter values in SAPBEXsetFilterValue function

    I am using SAPBEXsetFilterValue for filtering the query. I want to have multiple filters for same key value for ex. for plant I want the query to be filtered for two plants at the same time using this function please any one could help me out

    Hi,
    Afraid, that is not possible:
    Re: Setting Multiple Filter Values or Filter Range Using SAPBEX API?
    Re: Passing a range to SAPBEX.XLA!SAPBEXSetFilterValue
    Re: SAPBEXsetFilterValue
    Best regards,
    Eugene

  • Passing multiple events as parameters to functions

    I want to pass MouseEvent and a custom ComboSelectedEvent to
    a function. I really would like to do this:
    public function getPublications(event:MouseEvent,
    event:ComboSelectedEvent)
    But it doesn't work in Flex. To make it work, I ended up
    using the Event class, which includes all events:
    public function getPublications(event:Event)
    Is this the correct Flex way or is there a better way? Thanks
    for your help.

    You should be able to pass the two event objects into the
    function, but as Richard indicated, the two cannot have the same
    name within the method, and they don't need to either. Perhaps
    offer more details on your situation.

  • Subreports and passing multiple value param

    I have a main report that has 3 subreports.  It used to take a parameter, which was in each subreport and main report sql command to bring back records pertinent to that param.
    Now report needs to be able to take a multi-value param.  I took it out of sql commands and have record selection handle it in CR directly.  Problem is data is displayed like this
    Params : p1, p2
    for p1 //main (grouping on param here)
      rec1 rec2 // Sub a - displays all records for both param
      rec1 rec2 // Sub b - same
    for p2 // main
      rec1 rec2 // Sub a - same
      rec1 rec2 // Sub b - same
    what I need is
    for p1 //main
      rec1 // Sub a
      rec1 // Sub b
    for p2 // main
      rec2 // Sub a
      rec2 // Sub b
    I am linking main report to subreports on that param field, but subs display the whole nine yards, ie for all given params instead of "current" param.  What to do?

    Please note that this forum is dedicated to all other development-related questions which are not directly addressed by other forums. This includes Business Objects SDKs, products, or technologies which do not fall under BusinessObjects Enterprise, BusinessObjects Edge, Crystal Reports Server, or Crystal Reports (for example Desktop Intelligence SDK, Universe Designer SDK, Portal Integration Kits, Java User Function Libraries, and other third party technologies or development languages).
    Your query appears to be related to development of reports in the Crystal Reports Designer. Please post the query to the Crystal Reports Design forum at this link:
    SAP Crystal Reports
    Thank you for your understanding,
    Ludek

  • How to pass dynamic params to Transaction iView from webdynpro java app

    Hi Experts,
    I am trying to call a transaction iview in PCD from my Dynpro application with a dynamic param.
    Can somebody help me generating the URL for transaction iView and passing the dynamic params???
    Thanks in advance
    biroj...

    Hi,
    Generating the URL:
    StringBuffer strBuff = new StringBuffer("/webdynpro/dispatcher/xyz.com/xx~xxxx~xxxxx/xxxxxApp");
              strBuff.append("?");
              strBuff.append("TCODE=");
    strBuff.append("" + WDProtocolAdapter.getProtocolAdapter().getRequestObject().getParameter("TCODE"));
    IWDWindow window = wdComponentAPI.getWindowManager().createNonModalExternalWindow(strBuff.toString(), "TCODEWindow");
    window.show();
    Please try the above code snippet helps you to create a TCode iView in a new window.
    or
    We can include URL parameters in a portal URL that calls a Web Dynpro page and these parameters can be forwarded to the otehr iVIews on the page.
    Example:
    http://xxxxxxxxx.com/irj/servlet/prt/portal/prtroot/com.sap.portal.appintegrator.sap.WebDynpro?System=SAP_XXXXXXXX&WebDynproNamespace=xxxxx.com&WebDynproApplication=xx~xxxx~xxxx/xxxxApp&DynamicParameter=u201DTCODE=VA02u201D
    For more information Please go through this:
    http://help.sap.com/saphelp_nw04s/helpdata/en/c3/235a428a1e9041e10000000a1550b0/frameset.htm
    Thanks
    Krishna

  • Pass multiple values as single input parameter into pipelined function

    Hi all,
    My need is to pass multiple values as single input parameter into pipelined function.
    For example - "2" and "3" are values of input parameter "t":
    with data as (
    select 1 as t from dual union all
    select 2 as t from dual union all
    select 3 as t from dual union all
    select 4 as t from dual union all
    select 5 as t from dual
    select * from data where t in (2,3)Is it possible at all?

    Not exactly sure, but usually 'multiple values'+'pipelined function' = some IN-LIST related approach?
    See:
    SQL> create table data as
      2  select 1 as t from dual union all
      3  select 2 as t from dual union all
      4  select 3 as t from dual union all
      5  select 4 as t from dual union all
      6  select 5 as t from dual;
    Table created.
    SQL> --
    SQL> CREATE OR REPLACE FUNCTION in_list (p_in_list  IN  VARCHAR2)
      2  RETURN sys.odcivarchar2list PIPELINED
      3  AS
      4    l_text  VARCHAR2(32767) := p_in_list || ',';
      5    l_idx   NUMBER;
      6  BEGIN
      7    LOOP
      8      l_idx := INSTR(l_text, ',');
      9      EXIT WHEN NVL(l_idx, 0) = 0;
    10      PIPE ROW (TRIM(SUBSTR(l_text, 1, l_idx - 1)));
    11      l_text := SUBSTR(l_text, l_idx + 1);
    12    END LOOP;
    13 
    14    RETURN;
    15  END;
    16  /
    Function created.
    SQL> --
    SQL> select *
      2  from   data
      3  where  t in ( select *
      4                from   table(in_list('1,2'))
      5              );
             T
             1
             2
    2 rows selected.http://www.oracle-base.com/articles/misc/dynamic-in-lists.php
    or
    http://tkyte.blogspot.nl/2006/06/varying-in-lists.html

  • Passing Multiple Values from a worksheet to PL/SQL function.

    Hi All,
    Is there any way to pass multiple values selected in a worksheet to a PL/SQL function ?
    I will try to explain the scenario:
    We have a crosstab report that showing all the customer details, deposit sum of a customer in each date in a date range selected. With the customer details we are showing the Rank of a customer based on the deposit in the latest date selected. Filtering is based on the rank, ie Top50 or Top60 etc.( As I said rank is calculating based on the deposit in the latest date).This is working fine.
    Now the new requirement is to : For example, in Top50 report, list all the customers, who were in the Top50 list, in any of the dates selected. We are able to display the daywise rank, but when giving a condition like daywiserank <= 50, the result becomes uncertain. Some blank lines, wrong amounts etc..
    As a work around we tried to find out the rank in a PL/SQL function. But the issue there is : we have some multiple value parameters used in the worksheet.
    Is there any way to pass multiple values selected in a worksheet to a PL/SQL function ?
    Or any other work arounds for the scenario explained?
    Reagrds,
    Jeneesh

    Hi Russ,
    Thanks for the response.
    Russ Proudman wrote:
    1. I thought there was an analytical function similar to rank - or maybe an option of rank - that if there are duplicate records to have them all considered the same rank. So if you had 3 records all the same as rank=2 then a condition saying where rank=2 would return the 3 records. You could check into this.
    We are already using DENSE_RANK. But the issue is the output contains incorrect null values nd repeated rows.
    We got it solved as I explained in the previous post. But will that AGGREGATION MODE setting ( Which discoverer says - not recommended) have any issue? I mean side effects?
    Russ Proudman wrote:
    2. Another thought is that you can create a PL/SQL routine - that's called from a SQL function registered in Discoverer - where a table is created that does the first part of your query. Then a worksheet is created to use the data from that table. So, in essence, the table would have your top50 ranked customers. Then you can write any kind of worksheet against that table. However, DBAs are loath to allow tables - that they didn't create! - many times in a PROD environment.
    Here also the same problem will occur: as the top 50 will depend upon the parameters. I cannot pass those parameters to PL/SQL Function.And storing the top50 ( itmay be top100 or to 150 also) for all combinations of the parameters is impossible
    Russ Proudman wrote:
    3. Finally, are you sure you're rank function is correct in that if you're getting blank lines, maybe the 'over' part is not considering all columns needed to determine the rank?
    Yes the query we are using is correct. The output QUERY of discoverer gives correct results in Sqlplus.
    Regards,
    Jeneesh

  • How to pass multiple values from workbook to planning function ?

    Hi,
    I have created Planning function in Modeler and it has one parameter(Variable represents = Multiple single values).
    When executing the planning function by create planning seq. in the web template : I see value of variable store data like ...
        A.) input one value -> V1
        B.) input three values -> V1;V2;V3
    This function execute completely in web.
    However, I want to use the planning function in workbook(Excel).
    The value of variable can't input V1;V2;V3... I don't know how to pass multiple values from workbook to parameter(Multiple single values type) in planning function ?
    thank you.

    Hi,
    Please see the attached how to document (page no 16).
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0881371-78a1-2910-f0b8-af3e184929be">how to</a>
    Hope this was helpful
    thanks

  • Passing multiple select value from BI publisher to PL/SQL functions

    Hi - I have designed a report which pass parameters (Multi select) into a function to get the output result. When a single parameter value is passed to the function, report is being displayed. When multi select value is passed to the function it is returning the error `wrong number or types of arguments in call to 'F_PROCESS_WAVE_DATA'. When i checked the parameters passed to the function, i can see each multi select value is treated as different value and is assigned to different parameter in the function.
    Any help on passing the multi select parameter into function will be helpful.
    Regards,
    Vikram.

    All - Issue was resolved. I followed the following steps to resolve the issue
    1. Create a PL/SQL table type variable as VARCHAR2 in the database - Say as Larray
    2. Create PL/SQL type record and table for the record in database. Lrec, Ltable
    3. In BI report pass multiple select LOV variable as Larray(variable).
    4. In DB function, Parameter should be defined as LARRAY.
    5. Return PL/SQL table type Ltable from the function.
    Regards,
    Vikram.

  • Pass multiple params to a popup window iChart

    I have an irpt that has toggle buttons at the bottom of the page.  When a person clicks a toggle button a new window opens, passes the param to an iChart and displays the chart.  Currently, I am only passing one param.  My queries (current page and ichart) have 4 param and I would like to know the correct syntax in passing multiple params.
    Example:
    var SelOption = ProductID
    var strUrl = "Histogram_QA_Moistures.irpt?ID="+ ProductID;
    window.open(strUrl, "Histogram");
    My first parm is "Histogram_QA_Moistures.irpt?ID="+ ProductID
    I need to add...
    "Histogram_QA_Moistures.irpt?Line="+ Line
    "Histogram_QA_Moistures.irpt?Operator="+ Operator
    "Histogram_QA_Moistures.irpt?Lot="+ Lot
    Please show me the correct syntax to line all four of these param for strUrl.
    Thanks!!

    It doesn't seem to be working.  I am able to pass the first param with your code, but I noticed something that wasn't consistant in your code.
    There wasn't an "=" after "&Operator" and "&Lot".  Should there be??  I modified the code, but I still didn't get the results I was looking for.  I should be able to pick only Line and run the chart and get only line data, but I get blank charts for everything but ProductID.
    var strUrl = "Histogram_QA_Moistures.irpt?ID="+ ProductID+"&Line="+Line+"&Operator="+Operator+"&Lot="+Lot;

  • Passing arrays through multiple PL/SQL procedures and functions

    I am maintaining a large PL/SQL application. There is a main procedure that is initially called which subsequently passes information to other PL/SQL functions and procedures. In the end an error code and string is passed to PUT_LINE so it can be displayed. What I would like to be able to do is have an array that stores an error code and string for each error that it comes upon during going through each of the procedures and functions. This would involve passing these codes and strings from function to function within the pl/sql application. What would be the best way to implement this and is it possible to pass arrrays or records to other PL/SQL functions? Thanks.

    Here is one simulation ->
    satyaki>
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    Elapsed: 00:00:00.20
    satyaki>
    satyaki>
    satyaki>create or replace type n_array is table of number;
      2  /
    Type created.
    Elapsed: 00:00:07.10
    satyaki>
    satyaki>CREATE OR REPLACE PROCEDURE Get_Array(array_in IN n_array,
      2                                        array_out OUT n_array)  
      3  IS
      4  BEGIN 
      5    array_out := n_array(); 
      6    FOR i IN 1..array_in.count 
      7    LOOP 
      8      array_out.extend; 
      9      array_out(i) := array_in(i) * 2; 
    10    END LOOP;
    11  END Get_Array;
    12  /
    Procedure created.
    Elapsed: 00:00:00.89
    satyaki>
    satyaki>
    satyaki>Create or Replace Procedure Set_Array(myArray IN n_array)
      2  is  
      3    i   number(10);  
      4    rec emp%rowtype;  
      5    w n_array:=n_array(1200,3200);
      6    bucket n_array := n_array();
      7  Begin
      8    Get_Array(w,bucket);  
      9   
    10    for i in 1..myArray.count  
    11    loop 
    12      select *  
    13      into rec 
    14      from emp 
    15      where empno = myArray(i); 
    16      dbms_output.put_line('Employee No:'||rec.empno||' Name:'||rec.ename);
    17      for j in 1..bucket.count
    18      loop
    19        dbms_output.put_line('Commission Sub Type: '||bucket(j));
    20      end loop;
    21    end loop; 
    22  End Set_Array;
    23  /
    Procedure created.
    Elapsed: 00:00:01.33
    satyaki>
    satyaki>
    satyaki>select * from emp;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          9999 SATYAKI    SLS             7698 02-NOV-08      55000       3455         10
          7777 SOURAV     SLS                  14-SEP-08      45000       3400         10
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-81       4450                    10
          7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
          7839 KING       PRESIDENT            17-NOV-81       7000                    10
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
          7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
    13 rows selected.
    Elapsed: 00:00:00.28
    satyaki>
    satyaki>declare
      2    v n_array:=n_array(9999,7777);  
      3  begin  
      4    Set_Array(v);  
      5  end;
      6  /
    Employee No:9999 Name:SATYAKI
    Commission Sub Type: 2400
    Commission Sub Type: 6400
    Employee No:7777 Name:SOURAV
    Commission Sub Type: 2400
    Commission Sub Type: 6400
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.15
    satyaki>
    satyaki>Regards.
    Satyaki De.

  • Passing multiple values to a parmeters in Discoverer 4i

    Hi Friends,
    I have a requirement of passing multiple values (Operating Unit Names) to the parameter(P_Opr_Unit) in Discoverer.
    I am using PL/SQL function to get the data in Discoverer.Function is working fine for multiple values from Database(SQL Developer).
    When i am trying to pass multiple values from discoverer ...it is accepting only the first parameter value of Operating Unit.
    Need your Expertise on this issue.
    Thanks In Advance.
    Thanks & Regards
    Ramya Nomula

    Hi,
    You can only pass one parameter value into a function. When you have a multi-valued parameter it enables you to create the condition: item IN (:param) which Discoverer expands to the condition: item IN ('val1', 'val2', 'val3') where these are the values the user has picked from the list of values.
    Now if you have a calculation containing a function and a parameter: my_func(:param) then Discoverer has to map the parameter in the function an item in the worksheet. So if the param is from a multi-valued list it can only pass one value and so expands the calculation to my_func('val1') where val1 is the first item picked from the list.
    Rod West

  • XMLTable - passing in dynamic variables

    Hi,
    I am using XMLTable to shred XML data stored in external files into a virtual table so it can be imported into Oracle 10g. I am having problems trying to pass a dynamic file path parameter into the XMLTable function. E.g.
    DECLARE
    xml_file_name varchar2(50):= '/public/user.xml'; --currently hardcoded in example - will be dynamically built
    cursor c2 is
    select * from XMLTable('for $i in doc($XMLPATH) return $i/ROWSET/ROW'
    passing xml_file_name as "XMLPATH"
    columns     ID INTEGER PATH 'ID',
    USERNAME                VARCHAR2(255)     PATH 'USERNAME');
    BEGIN
    --do the import here
    END;
    The error I get is:
    PL/SQL: ORA-00932: inconsistent datatypes: expected - got CHAR
    Is this correct use of the "passing" parameter? If not, is there any other way to pass in a dynamically xml file path?
    Thanks.

    Thanks for your speedy response - I understand now that I need to pass the params as XMLTypes, but am still struggling with the syntax...
    I've created a directory object and have verified it exists by running:
    select xmltype(dbms_xslprocessor.read2clob('XMLREPORT_DIR', 'user.xml')) from dual;
    When I put this into the import routine I get a:
    ORA-03113: end-of-file on communication channel
    DECLARE
    cursor c2 is
    select * from XMLTable('for $i in doc($XMLFILE) return $i/ROWSET/ROW'
    passing xmltype(dbms_xslprocessor.read2clob('XMLREPORT_DIR', 'user.xml')) as XMLFILE
    columns     ID INTEGER,
    USERNAME                VARCHAR2(255));
    BEGIN
    --do the import
    END;
    Presumably I'm not referencing the file object correctly within the XQuery - any suggestions on what I need to do to fix things?
    Thanks again!

  • How to show multiple dynamic tables on a single screen?

    right now im displaying alv for singlr attribute of dimension.
    eg for dimension PRODUCT attribute PROFITCENTER im displaying in alv when user executes it.
    but the requirement is that multiple attributes can be there so multiple tables is to be displayed on a single screen.
    User basically wants to see data of all attributes. if there are 10 attributes hee wants to see 10 tables as every attribute has a different table.
    what i have achieved is below in snapshots. only one attribute table PRODUCT im able to display. since i believe multiple headers cant be displyed in alv so even if i display multiple dynamically populated tables on a single screen then it will be fine.
    i have also ADDED my code below: ZMDREPORT
    this report is for SAP BPC.
    *& Report  ZMDREPORT
    REPORT  zmdreport.
    TABLES /1cpmb/bfrdp3rp.
    DATA: gw_datatbl TYPE tabname,
          gw_datatbl1 TYPE tabname,
          gw_descrptbl TYPE tabname,
          gw_attribute TYPE tabname.
    DATA:
    BEGIN OF gw_attr,
      appset_id      TYPE uja_dim_attr-appset_id,
      dimension      TYPE uja_dim_attr-dimension,
      tech_name      TYPE uja_dim_attr-tech_name,
      attribute_name TYPE uja_dim_attr-attribute_name,
      caption        TYPE uja_dim_attr-caption,
    END OF gw_attr,
    gt_attr          LIKE TABLE OF gw_attr.
    DATA: gt_slis_fcat1 TYPE slis_t_fieldcat_alv,
          gw_slis_fcat1 LIKE LINE OF gt_slis_fcat1.
    DATA : gt_except TYPE TABLE OF zbpcbt007,
           gw_except LIKE LINE OF gt_except,
              gt_except_t TYPE TABLE OF zbpcbt007,
              gt_attrib TYPE TABLE OF tabname,
              gw_attrib LIKE LINE OF gt_attrib.
    DATA: gr_r_ref   TYPE  REF TO data.
    DATA:BEGIN OF gw_mdr,
         appset_id     TYPE  uj_appset_id,
         dimension     TYPE uj_dim_name,
         reasoncd      TYPE zmdreason,
         refdimension  TYPE uj_dim_name,
         attrib        TYPE uj_attr_name,
         END OF gw_mdr,
         gt_mdr1 LIKE TABLE OF gw_mdr,
         gt_mdr2 LIKE TABLE OF gw_mdr,
         gt_mdtable1 TYPE zbpctt_attr,
         gt_mdtable2 TYPE zbpctt_attr,
         gw_mdtable2 LIKE LINE OF gt_mdtable2,
         gt_mdtable3 TYPE zbpctt_attr,
         gt_mdtable4 TYPE zbpctt_attr,
         gw_mdtable4 LIKE LINE OF gt_mdtable4,
          BEGIN OF gw_finalattr,
           dim(32)      TYPE c,
           END OF gw_finalattr,
           gt_finalattr LIKE TABLE OF gw_finalattr,
           gt_tab1 LIKE TABLE OF gw_finalattr,
           gw_tab1 LIKE LINE OF gt_tab1,
           gt_tab2 LIKE TABLE OF gw_finalattr,
           gw_tab2 LIKE LINE OF gt_tab2.
    FIELD-SYMBOLS: <gfs_tab1>  TYPE STANDARD TABLE.
    FIELD-SYMBOLS: <gfs_tab2>  TYPE STANDARD TABLE,
                   <gfs_tab3>  TYPE STANDARD TABLE,
                   <gfs_tab4>  TYPE STANDARD TABLE.
    FIELD-SYMBOLS:<gfs_attr> TYPE any,
                              <gfs_field3> TYPE any,
                              <gfs_field4> TYPE any.
    DATA: gw_sortcond TYPE string.
    FIELD-SYMBOLS: <gfs_t_final>  TYPE STANDARD TABLE.
    FIELD-SYMBOLS: <gfs_final>  TYPE any.
    FIELD-SYMBOLS: <gfs_data> TYPE any .
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: p_env TYPE uja_dimension-appset_id OBLIGATORY.
    PARAMETERS: p_dim TYPE uja_dimension-dimension OBLIGATORY.
    SELECT-OPTIONS: s_member FOR /1cpmb/bfrdp3rp-mbr_name .
    PARAMETERS: p_hir TYPE /1cpmb/bfrdp3rp-/cpmb/hir.
    PARAMETERS:p_attr TYPE uj_attr_name MODIF ID m1.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    PARAMETERS: p_radio1 RADIOBUTTON GROUP g1 USER-COMMAND abc DEFAULT 'X',
                p_radio2 RADIOBUTTON GROUP g1.
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
    PARAMETERS: p_reason  TYPE zbpcbt007-reasoncd MODIF ID m1.
    SELECTION-SCREEN END OF BLOCK b3.
    *********************************************************************alv
    DATA  :gt_fcat    TYPE lvc_t_fcat.
    DATA: gw_ok_code TYPE sy-ucomm,
          gw_okcode  TYPE sy-ucomm.
    DATA: go_custom_container TYPE REF TO cl_gui_custom_container,
          gw_g_container  TYPE scrfname VALUE 'CC1',
          go_grid1        TYPE REF TO cl_gui_alv_grid.
    DATA:BEGIN OF gw_table,
          dimension TYPE uja_dimension-dimension,
         END OF gw_table,
         gt_tab LIKE TABLE OF gw_table ,
         BEGIN OF gw_member,
         mbr_name TYPE uj_dim_member,
           END OF gw_member ,
           gt_member LIKE TABLE OF gw_member,
           BEGIN OF gw_hir ,
           hir TYPE /1cpmb/bfrdp3rp-/cpmb/hir,
           END OF gw_hir,
           gt_hir LIKE TABLE OF gw_hir.
    DATA:gt_slis_fcat2 TYPE slis_t_fieldcat_alv,
              gw_slis_fcat2 LIKE LINE OF gt_slis_fcat2 .
    DATA:  lr_data    TYPE REF TO data.
    DATA  :gt_fcat1   TYPE lvc_t_fcat,
           gt_fcat2   TYPE lvc_t_fcat,
           gt_fcat3   TYPE lvc_t_fcat,
           gt_fcat2_t TYPE lvc_t_fcat,
           gw_fcat    LIKE LINE OF gt_fcat2,
           gw_fcat3    LIKE LINE OF gt_fcat3.
    DATA:  gt_fcat3_t LIKE gt_fcat3.
    DATA:  gw_desc TYPE uj_desc.
    DATA : gw_string  TYPE string,
           gw_str     TYPE string.
    DATA:  gw_len TYPE string,
          BEGIN OF gw_refdim,
            dimension TYPE uja_dimension-dimension,
          END OF gw_refdim,
          gt_refdim LIKE TABLE OF gw_refdim,
          gt_refdim_t LIKE TABLE OF gw_refdim,
          BEGIN OF gw_refdata,
            data_table TYPE tabname,
             desc_table TYPE tabname,
          END OF gw_refdata,
          gt_refdata LIKE TABLE OF gw_refdata,
          BEGIN OF gw_techattr,
            tech_name TYPE uja_dim_attr-tech_name,
            END OF gw_techattr,
            gt_techattr LIKE TABLE OF gw_techattr,
            gw_cond TYPE string.
    DATA:gw_hircond TYPE string.
    DATA: gt_dynpread TYPE TABLE OF dynpread,
          gw_dynpread LIKE LINE OF gt_dynpread,
          gw_dynpread2 LIKE LINE OF gt_dynpread,
          gw_dim TYPE string,
          gw_env TYPE string.
    FIELD-SYMBOLS: <gfs_w_tab1>      TYPE any,
                   <gfs_w_tab2>      TYPE any,
                   <gfs_w_tab3>      TYPE any,
                   <gfs_field>       TYPE any,
                   <gfs_field2>       TYPE any,
                   <gfs_field_final> TYPE any,
                   <gfs_s_fcat>      TYPE lvc_s_fcat,
                   <gfs_s_fcat2>     TYPE lvc_s_fcat,
                   <gfs_s_fcat3>     TYPE lvc_s_fcat
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_dim.
      REFRESH gt_dynpread.
      gw_dynpread-fieldname = 'P_ENV'.
      APPEND gw_dynpread TO gt_dynpread.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname                         = sy-repid
          dynumb                         = sy-dynnr
    *     TRANSLATE_TO_UPPER             = ' '
    *     REQUEST                        = ' '
    *     PERFORM_CONVERSION_EXITS       = ' '
    *     PERFORM_INPUT_CONVERSION       = ' '
    *     DETERMINE_LOOP_INDEX           = ' '
    *     START_SEARCH_IN_CURRENT_SCREEN = 'X'
    *     start_search_in_main_screen    = ' '
    *     START_SEARCH_IN_STACKED_SCREEN = ' '
    *     START_SEARCH_ON_SCR_STACKPOS   = ' '
    *     SEARCH_OWN_SUBSCREENS_FIRST    = ' '
    *     SEARCHPATH_OF_SUBSCREEN_AREAS  = ' '
        TABLES
          dynpfields                     = gt_dynpread
        EXCEPTIONS
          invalid_abapworkarea           = 1
          invalid_dynprofield            = 2
          invalid_dynproname             = 3
          invalid_dynpronummer           = 4
          invalid_request                = 5
          no_fielddescription            = 6
          invalid_parameter              = 7
          undefind_error                 = 8
          double_conversion              = 9
          stepl_not_found                = 10
          OTHERS                         = 11.
      IF sy-subrc EQ 0.
        READ TABLE gt_dynpread INTO gw_dynpread INDEX 1.
        IF sy-subrc EQ 0.
          TRY .
              REFRESH gt_tab.
              SELECT dimension
              FROM uja_dimension CLIENT SPECIFIED
              INTO TABLE gt_tab
              WHERE mandt EQ sy-mandt
              AND   appset_id EQ gw_dynpread-fieldvalue.
              IF sy-subrc EQ 0.
                SORT gt_tab BY dimension.
                DELETE ADJACENT DUPLICATES FROM gt_tab COMPARING dimension.
                IF gt_tab IS NOT INITIAL.
                  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' "#EC CI_SUBRC
                     EXPORTING
    *           DDIC_STRUCTURE         = ''
                    retfield               = 'DIMENSION'
    *           PVALKEY                = ' '
                    dynpprog               = sy-repid
                    dynpnr                 = sy-dynnr
                    dynprofield            = 'P_DIM'(004)
    *           STEPL                  = 0
    *           WINDOW_TITLE           =
    *           VALUE                  = ' '
                    value_org              = 'S'
    *           MULTIPLE_CHOICE        = ' '
    *           display                = ''
    *           CALLBACK_PROGRAM       = ' '
    *           CALLBACK_FORM          = ' '
    *           CALLBACK_METHOD        =
    *           MARK_TAB               =
    *           IMPORTING
    *           USER_RESET             =
                    TABLES
                    value_tab              = gt_tab
    *           FIELD_TAB              =
    *           RETURN_TAB             =
    *           DYNPFLD_MAPPING        =
                    EXCEPTIONS
                    parameter_error        = 1
                    no_values_found        = 2
                     OTHERS                 = 3
                  IF sy-subrc NE 0.
                  ENDIF.
                ENDIF.
              ENDIF.
            CATCH cx_root.
          ENDTRY.
        ENDIF.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_member-low.
      REFRESH gt_dynpread.
      gw_dynpread-fieldname = 'P_ENV'.
      APPEND gw_dynpread TO gt_dynpread.
      gw_dynpread-fieldname = 'P_DIM'.
      APPEND gw_dynpread TO gt_dynpread.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname                         = sy-repid
          dynumb                         = sy-dynnr
    *     TRANSLATE_TO_UPPER             = ' '
    *     REQUEST                        = ' '
    *     PERFORM_CONVERSION_EXITS       = ' '
    *     PERFORM_INPUT_CONVERSION       = ' '
    *     DETERMINE_LOOP_INDEX           = ' '
    *     START_SEARCH_IN_CURRENT_SCREEN = 'X'
    *     start_search_in_main_screen    = ' '
    *     START_SEARCH_IN_STACKED_SCREEN = ' '
    *     START_SEARCH_ON_SCR_STACKPOS   = ' '
    *     SEARCH_OWN_SUBSCREENS_FIRST    = ' '
    *     SEARCHPATH_OF_SUBSCREEN_AREAS  = ' '
        TABLES
          dynpfields                     = gt_dynpread
        EXCEPTIONS
          invalid_abapworkarea           = 1
          invalid_dynprofield            = 2
          invalid_dynproname             = 3
          invalid_dynpronummer           = 4
          invalid_request                = 5
          no_fielddescription            = 6
          invalid_parameter              = 7
          undefind_error                 = 8
          double_conversion              = 9
          stepl_not_found                = 10
          OTHERS                         = 11.
      IF sy-subrc EQ 0.
        SORT gt_dynpread BY fieldname.
        DELETE ADJACENT DUPLICATES FROM gt_dynpread COMPARING fieldname.
        IF gt_dynpread IS NOT INITIAL.
          LOOP AT gt_dynpread INTO gw_dynpread.
            IF gw_dynpread-fieldname EQ 'P_ENV'.
              gw_env = gw_dynpread-fieldvalue.
            ELSEIF gw_dynpread-fieldname EQ 'P_DIM'.
              gw_dim = gw_dynpread-fieldvalue.
            ENDIF.
          ENDLOOP.
          IF sy-subrc EQ 0.
            CLEAR: gw_datatbl1, gt_member.
            SELECT SINGLE data_table
            INTO (gw_datatbl1)
            FROM uja_dimension CLIENT SPECIFIED
            WHERE mandt EQ sy-mandt
            AND   appset_id EQ gw_env
            AND   dimension EQ gw_dim.
            IF sy-subrc EQ 0.
              TRY .
                  REFRESH gt_member.
                  SELECT mbr_name
                  INTO TABLE gt_member
                  FROM (gw_datatbl1) CLIENT SPECIFIED
                  WHERE mandt EQ sy-mandt .
                  IF sy-subrc EQ 0.
                    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
                      EXPORTING
    *           DDIC_STRUCTURE         = ' '
              retfield               = 'MBR_NAME'
    *        PVALKEY                = ' '
              dynpprog               = sy-repid
              dynpnr                 = sy-dynnr
              dynprofield            = 'S_MEMBER'
    *        STEPL                  = 0
    *        WINDOW_TITLE           =
    *        VALUE                  = ' '
              value_org              = 'S'
    *        MULTIPLE_CHOICE        = ' '
    *        DISPLAY                = ' '
              callback_program       = sy-repid
              callback_form          = 'F4CALLBACK'
    *        CALLBACK_METHOD        =
    *        MARK_TAB               =
    *        IMPORTING
    *        USER_RESET             =
              TABLES
              value_tab              = gt_member
    *        FIELD_TAB              =
    *        RETURN_TAB             =
    *        DYNPFLD_MAPPING        =
              EXCEPTIONS
              parameter_error        = 1
                 no_values_found        = 2
                 OTHERS                 = 3
                    IF sy-subrc <> 0.
    * Implement suitable error handling here
                    ENDIF.
                  ENDIF.
                CATCH cx_root.
              ENDTRY.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_member-high.
      REFRESH gt_dynpread.
      gw_dynpread-fieldname = 'P_ENV'.
      APPEND gw_dynpread TO gt_dynpread.
      gw_dynpread-fieldname = 'P_DIM'.
      APPEND gw_dynpread TO gt_dynpread.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname                         = sy-repid
          dynumb                         = sy-dynnr
    *     TRANSLATE_TO_UPPER             = ' '
    *     REQUEST                        = ' '
    *     PERFORM_CONVERSION_EXITS       = ' '
    *     PERFORM_INPUT_CONVERSION       = ' '
    *     DETERMINE_LOOP_INDEX           = ' '
    *     START_SEARCH_IN_CURRENT_SCREEN = 'X'
    *     start_search_in_main_screen    = ' '
    *     START_SEARCH_IN_STACKED_SCREEN = ' '
    *     START_SEARCH_ON_SCR_STACKPOS   = ' '
    *     SEARCH_OWN_SUBSCREENS_FIRST    = ' '
    *     SEARCHPATH_OF_SUBSCREEN_AREAS  = ' '
        TABLES
          dynpfields                     = gt_dynpread
        EXCEPTIONS
          invalid_abapworkarea           = 1
          invalid_dynprofield            = 2
          invalid_dynproname             = 3
          invalid_dynpronummer           = 4
          invalid_request                = 5
          no_fielddescription            = 6
          invalid_parameter              = 7
          undefind_error                 = 8
          double_conversion              = 9
          stepl_not_found                = 10
          OTHERS                         = 11.
      IF sy-subrc EQ 0.
        SORT gt_dynpread BY fieldname.
        DELETE ADJACENT DUPLICATES FROM gt_dynpread COMPARING fieldname.
        IF gt_dynpread IS NOT INITIAL.
          LOOP AT gt_dynpread INTO gw_dynpread.
            IF gw_dynpread-fieldname EQ 'P_ENV'.
              gw_env = gw_dynpread-fieldvalue.
            ELSEIF gw_dynpread-fieldname EQ 'P_DIM'.
              gw_dim = gw_dynpread-fieldvalue.
            ENDIF.
          ENDLOOP.
          IF sy-subrc EQ 0.
            CLEAR: gw_datatbl1.
            SELECT SINGLE data_table
            INTO (gw_datatbl1)
            FROM uja_dimension CLIENT SPECIFIED
            WHERE mandt EQ sy-mandt
            AND   appset_id EQ gw_env
            AND   dimension EQ gw_dim.
            IF sy-subrc EQ 0.
              TRY .
                  REFRESH gt_member.
                  SELECT mbr_name
                  INTO TABLE gt_member
                  FROM (gw_datatbl1) CLIENT SPECIFIED
                  WHERE mandt EQ sy-mandt.
                  IF sy-subrc EQ 0.
                    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
                      EXPORTING
    *          DDIC_STRUCTURE         = ' '
                retfield               = 'MBR_NAME'
    *          PVALKEY                = ' '
                dynpprog               = sy-repid
                dynpnr                 = sy-dynnr
                dynprofield            = 'S_MEMBER'
    *          STEPL                  = 0
    *          WINDOW_TITLE           =
    *          VALUE                  = ' '
                value_org              = 'S'
    *          MULTIPLE_CHOICE        = ' '
    *          DISPLAY                = ' '
                callback_program       = sy-repid
                callback_form          = 'F4CALLBACK'
    *          CALLBACK_METHOD        =
    *          MARK_TAB               =
    *          IMPORTING
    *          USER_RESET             =
                TABLES
                value_tab              = gt_member
    *          FIELD_TAB              =
    *          RETURN_TAB             =
    *          DYNPFLD_MAPPING        =
                EXCEPTIONS
                parameter_error        = 1
                no_values_found        = 2
                OTHERS                 = 3
                    IF sy-subrc <> 0.
    * Implement suitable error handling here
                    ENDIF.
                  ENDIF.
                CATCH cx_root.
              ENDTRY.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDIF.
    *&      Form  F4CALLBACK
    *       text
    *      -->RECORD_TAB   text
    *      -->SHLP         text
    *      -->CALLCONTROL  text
    FORM f4callback TABLES record_tab STRUCTURE seahlpres
                    CHANGING shlp TYPE shlp_descr
                             callcontrol TYPE ddshf4ctrl.
      callcontrol-no_maxdisp = ''.
    ENDFORM.                    "F4CALLBACK
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_hir.
      REFRESH gt_dynpread.
      CLEAR gw_dynpread.
      gw_dynpread-fieldname = 'P_ENV'.
      APPEND gw_dynpread TO gt_dynpread.
      gw_dynpread-fieldname = 'P_DIM'.
      APPEND gw_dynpread TO gt_dynpread.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname                         = sy-repid
          dynumb                         = sy-dynnr
    *     TRANSLATE_TO_UPPER             = ' '
    *     REQUEST                        = ' '
    *     PERFORM_CONVERSION_EXITS       = ' '
    *     PERFORM_INPUT_CONVERSION       = ' '
    *     DETERMINE_LOOP_INDEX           = ' '
    *     START_SEARCH_IN_CURRENT_SCREEN = 'X'
    *     start_search_in_main_screen    = ' '
    *     START_SEARCH_IN_STACKED_SCREEN = ' '
    *     START_SEARCH_ON_SCR_STACKPOS   = ' '
    *     SEARCH_OWN_SUBSCREENS_FIRST    = ' '
    *     SEARCHPATH_OF_SUBSCREEN_AREAS  = ' '
        TABLES
          dynpfields                     = gt_dynpread
        EXCEPTIONS
          invalid_abapworkarea           = 1
          invalid_dynprofield            = 2
          invalid_dynproname             = 3
          invalid_dynpronummer           = 4
          invalid_request                = 5
          no_fielddescription            = 6
          invalid_parameter              = 7
          undefind_error                 = 8
          double_conversion              = 9
          stepl_not_found                = 10
          OTHERS                         = 11.
      IF sy-subrc EQ 0.
        SORT gt_dynpread BY fieldname.
        DELETE ADJACENT DUPLICATES FROM gt_dynpread COMPARING fieldname.
        LOOP AT gt_dynpread INTO gw_dynpread.
          IF gw_dynpread-fieldname EQ 'P_ENV'.
            gw_env = gw_dynpread-fieldvalue.
          ELSEIF gw_dynpread-fieldname EQ 'P_DIM'.
            gw_dim = gw_dynpread-fieldvalue.
          ENDIF.
        ENDLOOP.
        IF sy-subrc EQ 0.
          CLEAR: gw_datatbl1.
          SELECT SINGLE data_table
          INTO (gw_datatbl1)
          FROM uja_dimension CLIENT SPECIFIED
          WHERE mandt EQ sy-mandt
          AND   appset_id EQ gw_env
          AND   dimension EQ gw_dim.
          IF sy-subrc EQ 0.
            REFRESH gt_member.
            TRY .
                SELECT /cpmb/hir
                INTO TABLE gt_hir
                FROM (gw_datatbl1) CLIENT SPECIFIED
                WHERE mandt EQ sy-mandt.
                IF sy-subrc EQ 0.
                  SORT gt_hir BY hir.
                  DELETE ADJACENT DUPLICATES FROM gt_hir COMPARING hir.
                  IF gt_hir IS NOT INITIAL.
                    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
                                   EXPORTING
    *                   DDIC_STRUCTURE         = ' '
                                     retfield               = '/CPMB/HIR'
    *                   PVALKEY                = ' '
                                    dynpprog               = sy-repid
                                    dynpnr                 = sy-dynnr
                                    dynprofield            = 'P_HIR'
    *                   STEPL                  = 0
    *                   WINDOW_TITLE           =
    *                   VALUE                  = ' '
                                    value_org              = 'S'
    *                   MULTIPLE_CHOICE        = ' '
    *                   DISPLAY                = ' '
    *                   CALLBACK_PROGRAM       = ' '
    *                   CALLBACK_FORM          = ' '
    *                   CALLBACK_METHOD        =
    *                   MARK_TAB               =
    *                 IMPORTING
    *                   USER_RESET             =
                                   TABLES
                                     value_tab              = gt_hir
    *                   FIELD_TAB              =
    *                   RETURN_TAB             =
    *                   DYNPFLD_MAPPING        =
                                  EXCEPTIONS
                                    parameter_error        = 1
                                    no_values_found        = 2
                                    OTHERS                 = 3
                    IF sy-subrc <> 0.
    * Implement suitable error handling here
                    ENDIF.
                  ENDIF.
                ENDIF.
              CATCH cx_root.
            ENDTRY.
          ENDIF.
        ENDIF.
      ENDIF.
    *       CLASS lcl_main DEFINITION
    CLASS lcl_main DEFINITION.
      PUBLIC SECTION.
        CLASS-METHODS:
                 create_alv1,
                 create_alv2,
                 create_alv3,
                 create_fieldcatalog,
                 create_dynamicalv,
                 merge_tables,
                 show_alv1
    ENDCLASS.                    "lcl_main DEFINITION
    *       CLASS lcl_main IMPLEMENTATION
    CLASS lcl_main IMPLEMENTATION.
      METHOD create_fieldcatalog.
        CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'                "#EC CI_SUBRC
                     EXPORTING
                       i_structure_name       = gw_datatbl
                     CHANGING
                       ct_fieldcat            = gt_fcat1
                     EXCEPTIONS
                       inconsistent_interface = 1
                       program_error          = 2
                       OTHERS                 = 3.
        IF sy-subrc <> 0.
    * Implement suitable error handling here
        ENDIF.
        CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'                "#EC CI_SUBRC
          EXPORTING
            i_structure_name       = gw_descrptbl
          CHANGING
            ct_fieldcat            = gt_fcat2
          EXCEPTIONS
            inconsistent_interface = 1
            program_error          = 2
            OTHERS                 = 3.
        IF sy-subrc <> 0.
    * Implement suitable error handling here
        ENDIF.
      ENDMETHOD.                    "create_fieldcatalog
      METHOD create_dynamicalv.
    *    DATA: lr_data    TYPE REF TO data.
        CLEAR lr_data.
        CALL METHOD cl_alv_table_create=>create_dynamic_table
                                                              "#EC CI_SUBRC
                     EXPORTING
    *               i_style_table             =
                       it_fieldcatalog           = gt_fcat2
    *               i_length_in_byte          =
                     IMPORTING
                       ep_table                  = lr_data
    *               e_style_fname             =
                     EXCEPTIONS
                       generate_subpool_dir_full = 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.
      ENDMETHOD.                    "create_dynamicalv
      METHOD merge_tables.
        SORT gt_fcat2 BY col_pos.
        ASSIGN lr_data->* TO <gfs_t_final>.
        LOOP AT <gfs_tab1> ASSIGNING <gfs_w_tab1>.
          APPEND INITIAL LINE TO <gfs_t_final> ASSIGNING <gfs_final>.
          LOOP AT gt_fcat2 ASSIGNING <gfs_s_fcat>.           "#EC CI_NESTED
            ASSIGN COMPONENT <gfs_s_fcat>-fieldname OF STRUCTURE
            <gfs_w_tab1> TO <gfs_field>.
            IF sy-subrc EQ 0 AND <gfs_field> IS ASSIGNED.
              ASSIGN COMPONENT <gfs_s_fcat>-fieldname OF STRUCTURE
              <gfs_final> TO <gfs_field_final>.
              IF sy-subrc EQ 0 AND <gfs_field_final> IS ASSIGNED.
                <gfs_field_final> = <gfs_field>.
              ENDIF.
    *** Creating dynamic where clause for the key fields
              IF <gfs_s_fcat>-key = 'X'.
                READ TABLE gt_fcat2_t ASSIGNING <gfs_s_fcat2>
                WITH KEY
                key       = abap_true
                fieldname = <gfs_s_fcat>-fieldname.
                IF sy-subrc EQ 0.
                  IF gw_string IS INITIAL.
    *Putting value into quotes
                    CONCATENATE `'` <gfs_field> `'` INTO gw_str.
    *Concatenating first field into string
                    CONCATENATE <gfs_s_fcat>-fieldname '=' gw_str
                    INTO gw_string SEPARATED BY space.
                    CLEAR gw_str.
                  ELSE.
    *Concatenating rest all key fields
                    CONCATENATE `'` <gfs_field> `'` INTO gw_str.
                    CONCATENATE gw_string 'AND' <gfs_s_fcat>-fieldname
                    '=' gw_str INTO gw_string SEPARATED BY space.
                    CLEAR gw_str.
                  ENDIF.
                ENDIF.
    *** End of Creation
              ENDIF.
            ENDIF.
          ENDLOOP.
          IF NOT gw_string IS INITIAL.
    *Concatenating sy-langu (-> always present)
            CONCATENATE gw_string 'AND LANGU = SY-LANGU'
            INTO gw_string SEPARATED BY space.
          ENDIF.
    *** Filling Description field based on dynamically created where clause
          LOOP AT <gfs_tab2> ASSIGNING <gfs_w_tab2> WHERE (gw_string).
                                                             "#EC CI_NESTED
            ASSIGN COMPONENT 'TXTLG' OF STRUCTURE <gfs_w_tab2>
            TO <gfs_field>.
            IF sy-subrc EQ 0 AND <gfs_field> IS ASSIGNED.
              ASSIGN COMPONENT 'TXTLG' OF STRUCTURE <gfs_final>
              TO <gfs_field_final>.
              IF sy-subrc EQ 0 AND <gfs_field_final> IS ASSIGNED.
                <gfs_field_final> = <gfs_field>.
              ENDIF.
            ENDIF.
          ENDLOOP.
          CLEAR gw_string.
        ENDLOOP.
      ENDMETHOD.                    "merge_tables
      METHOD create_alv3.
        CREATE DATA gr_r_ref TYPE TABLE OF (gw_datatbl).
        ASSIGN gr_r_ref->* TO <gfs_tab1>.
        SELECT *
        INTO TABLE <gfs_tab1>
        FROM (gw_datatbl) CLIENT SPECIFIED
        WHERE mandt EQ sy-mandt
        AND   mbr_name IN s_member
        AND   /cpmb/calc EQ 'N'.
        IF sy-subrc EQ 0.
          IF p_hir IS NOT INITIAL.
            CLEAR gw_hircond.
            CONCATENATE '/CPMB/HIR' 'NE' 'P_HIR' INTO gw_hircond
            SEPARATED BY space.
            DELETE <gfs_tab1> WHERE (gw_hircond).
          ENDIF.
          CLEAR: gr_r_ref.
          CREATE DATA gr_r_ref TYPE TABLE OF (gw_descrptbl).
          ASSIGN gr_r_ref->* TO <gfs_tab2>.
          SELECT *
          FROM (gw_descrptbl) CLIENT SPECIFIED
          INTO TABLE <gfs_tab2>
          WHERE mandt EQ sy-mandt
          AND langu EQ sy-langu.
          IF sy-subrc EQ 0.
            READ TABLE gt_refdata INTO gw_refdata INDEX 1.
            IF sy-subrc EQ 0.
              CLEAR gr_r_ref.
              CREATE DATA gr_r_ref TYPE TABLE OF (gw_refdata-data_table).
              ASSIGN gr_r_ref->* TO <gfs_tab3>.
              SELECT *
              INTO TABLE <gfs_tab3>
              FROM (gw_refdata-data_table) CLIENT SPECIFIED
              WHERE mandt EQ sy-mandt
              AND /cpmb/calc EQ 'N'.
              IF sy-subrc EQ 0.
                CLEAR gr_r_ref.
                CREATE DATA gr_r_ref TYPE TABLE OF (gw_refdata-desc_table).
                ASSIGN gr_r_ref->* TO <gfs_tab4>.
                SELECT *
                INTO TABLE <gfs_tab4>
                FROM (gw_refdata-desc_table) CLIENT SPECIFIED
                WHERE mandt EQ sy-mandt
                AND   langu EQ sy-langu.
                lcl_main=>create_fieldcatalog( ).
                gt_fcat2_t[] = gt_fcat2[].
                DELETE gt_fcat2 WHERE fieldname NE 'TXTLG'.
                APPEND LINES OF gt_fcat1 TO gt_fcat2.
                gw_len = lines( gt_fcat2 ).
                gw_len = gw_len + 1.
                gw_fcat-fieldname = 'TXTLG1'.
                gw_fcat-reptext   = 'Attribute Description'.
                gw_fcat-col_pos   = gw_len.
                gw_fcat-outputlen = 60.
                APPEND gw_fcat TO gt_fcat2.
                SORT gt_fcat2 BY fieldname.
                READ TABLE gt_techattr INTO gw_techattr INDEX 1.
                LOOP AT gt_fcat2 INTO gw_fcat.
                  READ TABLE gt_attr INTO gw_attr
                  WITH KEY tech_name = gw_fcat-fieldname.
                  IF sy-subrc EQ 0.
                    gw_fcat-reptext = gw_attr-caption.
                  ENDIF.
                  IF gw_fcat-fieldname = 'TXTLG'.
                    gw_fcat-outputlen = 60.
                  ENDIF.
                  MODIFY gt_fcat2 FROM gw_fcat TRANSPORTING
                  outputlen reptext .
                  IF gw_fcat-fieldname NE 'MBR_NAME'
                  AND gw_fcat-fieldname NE 'TXTLG'
                    AND gw_fcat-fieldname NE 'TXTLG1'
                  AND gw_fcat-fieldname NE gw_techattr-tech_name."gw_attrib.
                    gw_fcat-no_out = 'X'.
                    MODIFY gt_fcat2 FROM gw_fcat TRANSPORTING no_out.
                  ENDIF.
                ENDLOOP.
                lcl_main=>create_dynamicalv( ).
                lcl_main=>merge_tables( ).
                CLEAR gw_cond.
                READ TABLE gt_techattr INTO gw_techattr INDEX 1.
    *        CONCATENATE 'MBR_NAME =' '<Gfs_field>' INTO Gw_cond
    *        SEPARATED BY space.
                TRANSLATE gw_techattr-tech_name TO UPPER CASE.
                CONCATENATE `'` gw_techattr-tech_name `'`
                '=' '<Gfs_field>' INTO gw_cond
                SEPARATED BY space.
                CHECK NOT <gfs_t_final> IS INITIAL.
                SORT <gfs_t_final> BY (gw_techattr-tech_name).
                LOOP AT <gfs_tab3> ASSIGNING <gfs_w_tab3>.
                  ASSIGN COMPONENT 'MBR_NAME' OF STRUCTURE <gfs_w_tab3>
                  TO <gfs_field>.
                  IF sy-subrc EQ 0 AND <gfs_field> IS ASSIGNED.
                    DELETE <gfs_t_final> WHERE (gw_cond).
                  ENDIF.
                  IF <gfs_t_final> IS INITIAL.
                    EXIT.
                  ENDIF.
                ENDLOOP.
    *adding attribute description
                DATA gw_cond1 TYPE string.
                DATA gw_cond2 TYPE string.
                CLEAR gw_cond1.
               CONCATENATE `'` gw_techattr-tech_name `'` 'eq' '<gfs_field>'
               INTO gw_cond1 SEPARATED BY space.
                CLEAR gw_cond2.
                CONCATENATE 'TXTLG1' 'eq' 'SPACE'
                INTO gw_cond2 SEPARATED BY space.
                CLEAR gw_cond.
                CONCATENATE 'TXTLG' 'NE' 'SPACE' INTO gw_cond SEPARATED BY
                space.
                gw_sortcond = 'TXTLG'.
                SORT <gfs_tab4> BY (gw_sortcond).
                LOOP AT <gfs_t_final> ASSIGNING <gfs_final> WHERE
                  (gw_cond2).
                  ASSIGN COMPONENT gw_techattr-tech_name OF STRUCTURE
                  <gfs_final> TO <gfs_field>.
                  IF sy-subrc EQ 0 AND <gfs_field> IS ASSIGNED.
                    ASSIGN COMPONENT 'TXTLG1' OF STRUCTURE
                    <gfs_final> TO <gfs_field4>.
                    IF sy-subrc EQ 0 AND <gfs_field4> IS ASSIGNED.
                      LOOP AT <gfs_tab4> ASSIGNING <gfs_attr>
                        WHERE (gw_cond).
                        ASSIGN COMPONENT 2 OF STRUCTURE <gfs_attr> TO
                        <gfs_field2>.
                        IF sy-subrc EQ 0 AND <gfs_field2> IS ASSIGNED.
                          ASSIGN COMPONENT 5 OF STRUCTURE <gfs_attr>
                          TO <gfs_field3>.
                          IF sy-subrc EQ 0 AND <gfs_field3> IS ASSIGNED.
                            IF <gfs_field> EQ <gfs_field2>.
                              <gfs_field4> = <gfs_field3>.
                              MODIFY <gfs_t_final> FROM <gfs_final>
                              TRANSPORTING ('TXTLG1') WHERE (gw_cond1).
                              EXIT.
                            ENDIF.
                          ENDIF.
                        ENDIF.
                      ENDLOOP.
                    ENDIF.
                  ENDIF.
                ENDLOOP.
    *            LOOP AT <gfs_tab4> ASSIGNING <gfs_attr> WHERE (gw_cond) .
    *              ASSIGN COMPONENT 2 OF STRUCTURE <gfs_attr> TO
    *              <gfs_field2>.
    *              IF sy-subrc EQ 0 AND <gfs_field2> IS ASSIGNED.
    *                ASSIGN COMPONENT 5 OF STRUCTURE <gfs_attr> TO
    *                              <gfs_field3>.
    *                IF sy-subrc EQ 0 AND <gfs_field3> IS ASSIGNED.
    *                  LOOP AT <gfs_t_final> ASSIGNING <gfs_final>
    *                    WHERE (gw_cond2).
    *                    ASSIGN COMPONENT gw_techattr-tech_name OF STRUCTURE
    *                    <gfs_final> TO <gfs_field>.
    *                    IF sy-subrc EQ 0 AND <gfs_field> IS ASSIGNED.
    *                     ASSIGN COMPONENT 'TXTLG1' OF STRUCTURE <gfs_final>
    *                     TO <gfs_field4>.
    *                      IF sy-subrc EQ 0 AND <gfs_field4> IS ASSIGNED.
    *                        IF <gfs_field> EQ <gfs_field2>.
    *                          <gfs_field4> = <gfs_field3>.
    *                          MODIFY <gfs_t_final> FROM <gfs_final>
    *                          TRANSPORTING ('TXTLG1') WHERE (gw_cond1).
    *                          EXIT.
    *                        ENDIF.
    *                      ENDIF.
    *                    ENDIF.
    *                  ENDLOOP.
    *                ENDIF.
    *              ENDIF.
    *            ENDLOOP.
                IF <gfs_t_final> IS NOT INITIAL.
                  CALL SCREEN 9000.
                ENDIF.
              ENDIF.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDMETHOD.                    "create_alv3
      METHOD create_alv2.
        READ TABLE gt_techattr INTO gw_techattr INDEX 1.
        CONCATENATE gw_techattr-tech_name 'EQ' 'space' INTO gw_cond
        SEPARATED
       BY
        space.
        CREATE DATA gr_r_ref TYPE TABLE OF (gw_datatbl).
        ASSIGN gr_r_ref->* TO <gfs_tab1>.
        SELECT *
        INTO TABLE <gfs_tab1>
        FROM (gw_datatbl) CLIENT SPECIFIED
        WHERE mandt EQ sy-mandt
        AND mbr_name IN s_member
        AND   /cpmb/calc EQ 'N'
        AND (gw_cond).
        IF sy-subrc EQ 0.
          IF p_hir IS NOT INITIAL.
            CLEAR gw_hircond.
            CONCATENATE '/CPMB/HIR' 'NE' 'P_HIR' INTO gw_hircond
                  SEPARATED BY space.
            DELETE <gfs_tab1> WHERE (gw_hircond).
          ENDIF.
          CLEAR: gr_r_ref.
          CREATE DATA gr_r_ref TYPE TABLE OF (gw_descrptbl).
          ASSIGN gr_r_ref->* TO <gfs_tab2>.
          SELECT *
           FROM (gw_descrptbl) CLIENT SPECIFIED
           INTO TABLE <gfs_tab2>
           WHERE mandt EQ sy-mandt
           AND langu EQ sy-langu.
          IF sy-subrc EQ 0.
            lcl_main=>create_fieldcatalog( ).
            gt_fcat2_t[] = gt_fcat2[].
            DELETE gt_fcat2 WHERE fieldname NE 'TXTLG'.
            APPEND LINES OF gt_fcat1 TO gt_fcat2.
            SORT gt_fcat2 BY fieldname.
            LOOP AT gt_fcat2 INTO gw_fcat.
              READ TABLE gt_attr INTO gw_attr WITH KEY
                  tech_name = gw_fcat-fieldname.
              IF sy-subrc EQ 0.
                gw_fcat-reptext = gw_attr-caption.
              ENDIF.
              IF gw_fcat-fieldname = 'TXTLG'.
                gw_fcat-outputlen = 60.
              ENDIF.
              MODIFY gt_fcat2 FROM gw_fcat TRANSPORTING outputlen reptext.
    *      READ TABLE gt_attrib INTO gw_attrib INDEX 1.
    *      IF sy-subrc EQ 0.
              IF gw_fcat-fieldname NE 'MBR_NAME'
              AND gw_fcat-fieldname NE 'TXTLG'
              AND gw_fcat-fieldname NE gw_techattr-tech_name."gw_attrib.
                gw_fcat-no_out = 'X'.
                MODIFY gt_fcat2 FROM gw_fcat TRANSPORTING no_out.
              ENDIF.
    *      ENDIF.
            ENDLOOP.
            lcl_main=>create_dynamicalv( ).
            lcl_main=>merge_tables( ).
            CHECK NOT <gfs_t_final> IS INITIAL.
            SORT <gfs_t_final> BY ('MBR_NAME').
            CALL SCREEN 9000.
          ENDIF.
        ENDIF.
      ENDMETHOD.                    "create_alv2
      METHOD create_alv1.
        CREATE DATA gr_r_ref TYPE TABLE OF (gw_datatbl).
        ASSIGN gr_r_ref->* TO <gfs_tab1>.
        SELECT *
        FROM (gw_datatbl) CLIENT SPECIFIED
        INTO TABLE <gfs_tab1>
        WHERE mandt EQ sy-mandt
        AND   mbr_name IN s_member.
        IF sy-subrc EQ 0.
          IF p_hir IS NOT INITIAL.
            CLEAR gw_hircond.
            CONCATENATE '/CPMB/HIR' 'NE' 'P_HIR'
             INTO gw_hircond SEPARATED BY
               space.
            DELETE <gfs_tab1> WHERE (gw_hircond).
          ENDIF.
          CLEAR: gr_r_ref.
          CREATE DATA gr_r_ref TYPE TABLE OF (gw_descrptbl).
          ASSIGN gr_r_ref->* TO <gfs_tab2>.
          SELECT *
           FROM (gw_descrptbl) CLIENT SPECIFIED
           INTO TABLE <gfs_tab2>
           WHERE mandt EQ sy-mandt
           AND langu EQ sy-langu.
          IF sy-subrc EQ 0.
            lcl_main=>create_fieldcatalog( ).
            SORT gt_fcat2 BY col_pos fieldname.
            gt_fcat2_t[] = gt_fcat2[].
            DELETE gt_fcat2 WHERE fieldname NE 'TXTLG'.
            APPEND LINES OF gt_fcat1 TO gt_fcat2.
            SORT gt_fcat2 BY fieldname.
            SORT gt_attr BY tech_name.
            LOOP AT gt_fcat2 INTO gw_fcat .
              IF gw_fcat-reptext IS INITIAL.
                READ TABLE gt_attr INTO gw_attr
               WITH KEY tech_name = gw_fcat-fieldname BINARY SEARCH.
                IF sy-subrc EQ 0.
                  gw_fcat-reptext = gw_attr-caption.
                ELSE.
                  gw_fcat-reptext = gw_fcat-fieldname.
                ENDIF.
              ENDIF.
              IF gw_fcat-fieldname EQ 'OBJVERS'.
                gw_fcat-no_out = 'X'.
              ELSEIF gw_fcat-fieldname EQ 'ROWFLAG'.
                gw_fcat-no_out = 'X'.
              ELSEIF gw_fcat-fieldname EQ 'MBR_NAME'.
                gw_fcat-no_out = 'X'.
              ELSEIF gw_fcat-fieldname EQ '/CPMB/CALC'.
                gw_fcat-no_out = 'X'.
              ELSEIF gw_fcat-fieldname EQ 'TXTLG'.
                gw_fcat-outputlen = 70.
              ELSEIF gw_fcat-fieldname EQ '/CPMB/HIR'.
                gw_fcat-outputlen = 20.
              ENDIF.
              MODIFY gt_fcat2 FROM gw_fcat
              TRANSPORTING reptext no_out outputlen.
            ENDLOOP.
            lcl_main=>create_dynamicalv( ).
            lcl_main=>merge_tables( ).
            CHECK NOT <gfs_t_final> IS INITIAL.
    *        SORT <gfs_t_final> BY ('TXTLG').
            CALL SCREEN 9000.
          ENDIF.
        ENDIF.
      ENDMETHOD.                    "show_alv1
      METHOD show_alv1.
        IF go_custom_container IS INITIAL.
          CREATE OBJECT go_custom_container
            EXPORTING
    *          parent                      =
              container_name              = gw_g_container
    *          style                       =
    *          lifetime                    = lifetime_default
    *          repid                       =
    *          dynnr                       =
    *          no_autodef_progid_dynnr     =
            EXCEPTIONS
              cntl_error                  = 1
              cntl_system_error           = 2
              create_error                = 3
              lifetime_error              = 4
              lifetime_dynpro_dynpro_link = 5
              OTHERS                      = 6
          IF sy-subrc <> 0.
    *       MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
          CREATE OBJECT go_grid1
           EXPORTING
    *          i_shellstyle      = 0
    *          i_lifetime        =
             i_parent          = go_custom_container
    *         i_appl_events     = 'X'
    *          i_parentdbg       =
    *          i_applogparent    =
    *          i_graphicsparent  =
    *          i_name            =
    *          i_fcat_complete   = SPACE
           EXCEPTIONS
             error_cntl_create = 1
             error_cntl_init   = 2
             error_cntl_link   = 3
             error_dp_create   = 4
             OTHERS            = 5
          IF sy-subrc <> 0.
    *       MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
          CALL METHOD go_grid1->set_table_for_first_display   "#EC CI_SUBRC
    *       EXPORTING
    *         i_buffer_active               =
    *         i_bypassing_buffer            =
    *         i_consistency_check           =
    *         i_structure_name              =
    *          is_variant                    =
    *          i_save                        = 'X'
    **         i_default                     = 'X'
    *          is_layout                     =
    **         is_print                      =
    **         it_special_groups             =
    *          it_toolbar_excluding          =
    *         it_hyperlink                  =
    *         it_alv_graphics               =
    *         it_except_qinfo               =
    *         ir_salv_adapter               =
           CHANGING
             it_outtab                     = <gfs_t_final>
             it_fieldcatalog               = gt_fcat2
    *         it_sort                       =
    *         it_filter                     =
           EXCEPTIONS
             invalid_parameter_combination = 1
             program_error                 = 2
             too_many_lines                = 3
             OTHERS                        = 4.
          IF sy-subrc <> 0.
    *     Implement suitable error handling here
          ENDIF.
        ENDIF.
      ENDMETHOD.                    "SHOW_alv1
    ENDCLASS.                    "lcl_main IMPLEMENTATION
    AT SELECTION-SCREEN OUTPUT.
      IF p_radio1 EQ 'X'.
        LOOP AT SCREEN.
          IF screen-group1 = 'M1'.
            screen-active = 0.
            MODIFY SCREEN.
          ENDIF.
    *      IF screen-group1 = 'M'.
    *        screen-active    = 0.
    *        MODIFY SCREEN.
    *      ENDIF.
        ENDLOOP.
      ENDIF.
    *  IF p_radio2 EQ 'X'.
    *    LOOP AT SCREEN.
    *      IF p_reason EQ 30.
    *        IF screen-group1 = 'M2'.
    *          screen-active    = 0.
    *          MODIFY SCREEN.
    *        ENDIF.
    *      ENDIF.
    *    ENDLOOP.
    *  ENDIF.
    START-OF-SELECTION.
      IF p_radio1 EQ 'X'.
        SELECT SINGLE data_table desc_table
        INTO (gw_datatbl , gw_descrptbl)
        FROM uja_dimension CLIENT SPECIFIED
        WHERE mandt EQ sy-mandt
        AND   appset_id EQ p_env
        AND   dimension EQ p_dim.
        IF sy-subrc EQ 0.
          SELECT appset_id dimension tech_name attribute_name caption
          INTO TABLE gt_attr
          FROM uja_dim_attr CLIENT SPECIFIED
          WHERE mandt EQ sy-mandt
          AND   appset_id EQ p_env
          AND   dimension EQ p_dim.
          IF sy-subrc EQ 0.
            lcl_main=>create_alv1( ).
          ENDIF.
        ENDIF.
      ELSE.
        IF p_reason NE 30.
          SELECT *
          INTO TABLE gt_except
          FROM zbpcbt007 CLIENT SPECIFIED
          WHERE mandt EQ sy-mandt
          AND   appset_id EQ p_env
          AND   dimension EQ p_dim
          AND   reasoncd  EQ p_reason.
          IF sy-subrc EQ 0.
            SELECT SINGLE data_table desc_table
                 INTO (gw_datatbl,gw_descrptbl)
                 FROM uja_dimension CLIENT SPECIFIED
                 WHERE mandt EQ sy-mandt
                 AND   appset_id EQ p_env
                 AND   dimension EQ p_dim.
            IF sy-subrc EQ 0.
              SELECT appset_id dimension tech_name attribute_name caption
              INTO TABLE gt_attr
              FROM uja_dim_attr CLIENT SPECIFIED
              WHERE mandt EQ sy-mandt
              AND   appset_id EQ p_env
              AND   dimension EQ p_dim.
              IF sy-subrc EQ 0.
                gt_except_t[] = gt_except[].
                SORT gt_except_t.
                DELETE ADJACENT DUPLICATES FROM gt_except_t.
                IF gt_except_t IS NOT INITIAL.
                  SELECT tech_name
                  INTO TABLE gt_techattr
                  FROM uja_dim_attr CLIENT SPECIFIED
                  FOR ALL ENTRIES IN gt_except_t
                  WHERE mandt EQ sy-mandt
                  AND   appset_id EQ p_env
                  AND   dimension EQ p_dim
                  AND   attribute_name EQ gt_except_t-attrib.
                  IF sy-subrc EQ 0.
                    lcl_main=>create_alv2( ).
                  ENDIF.
                ENDIF.
              ENDIF.
            ENDIF.
          ENDIF.
        ELSEIF p_reason EQ 30.
          SELECT SINGLE data_table desc_table
          INTO (gw_datatbl,gw_descrptbl)
          FROM uja_dimension CLIENT SPECIFIED
          WHERE mandt EQ sy-mandt
          AND   appset_id EQ p_env
          AND   dimension EQ p_dim.
          IF sy-subrc EQ 0.
    *        gt_except_t[] = gt_except[].
    *        SORT gt_except_t BY attrib.
    *        DELETE ADJACENT DUPLICATES FROM gt_except_t COMPARING attrib.
    *        IF gt_except_t IS NOT INITIAL.
            SELECT refdimension
            INTO TABLE gt_refdim
            FROM zbpcbt009 CLIENT SPECIFIED
    *          FOR ALL ENTRIES IN gt_except_t
            WHERE mandt EQ sy-mandt
            AND   appset_id EQ p_env
            AND   dimension EQ p_dim
            AND   attrib EQ p_attr."gt_except_t-attrib.
            IF sy-subrc EQ 0.
              gt_refdim_t[] = gt_refdim[].
              SORT gt_refdim_t BY dimension.
              DELETE ADJACENT DUPLICATES FROM gt_refdim_t COMPARING
              dimension.
              IF gt_refdim_t IS NOT INITIAL.
                SELECT data_table desc_table
                             INTO TABLE gt_refdata
                             FROM uja_dimension CLIENT SPECIFIED
                             FOR ALL ENTRIES IN gt_refdim_t
                             WHERE mandt EQ sy-mandt
                             AND   appset_id EQ p_env
                             AND   dimension EQ gt_refdim_t-dimension.
                IF sy-subrc EQ 0.
                  SELECT appset_id dimension tech_name attribute_name
                  caption
                  INTO TABLE gt_attr
                  FROM uja_dim_attr CLIENT SPECIFIED
                  WHERE mandt EQ sy-mandt
                  AND   appset_id EQ p_env
                  AND   dimension EQ p_dim.
                  IF sy-subrc EQ 0.
                    SELECT  tech_name
                    INTO TABLE gt_techattr
                    FROM uja_dim_attr CLIENT SPECIFIED
    *                  FOR ALL ENTRIES IN gt_except_t
                    WHERE mandt EQ sy-mandt
                    AND   appset_id EQ p_env
                    AND   dimension EQ p_dim
                      AND   attribute_name EQ p_attr."gt_except_t-attrib.
                    IF sy-subrc EQ 0.
                      REFRESH: gt_refdim_t.",gt_except_t.
                      lcl_main=>create_alv3( ).
                    ENDIF.
                  ENDIF.
                ENDIF.
              ENDIF.
            ENDIF.
          ENDIF.
    *      ENDIF.
    *      ENDIF.
        ENDIF.
      ENDIF.
    *&      Module  SHOW_ALV1  OUTPUT
    *&-------

    Yes you can, although you need to do it slightly differently, depending on what your 'original' form is doing.
    You end up having to do two things:
    1. In your second tabular form, you need to explicitly identify the relevant form fields using calls to the relevant APEX_ITEM functions - as well as this, you need to 'manually' specify the array number in the arguments for the function call, ensuring it doesn't overlap with your original form. Normally, this aspect is done for you.
    2. Create your own custom CRUD processes, referencing the above elements. There are a few threads floating around the forum relating to how to deal with this. Do a search for "APEX_APPLICATION.G_F" or "HTMLDB_APPLICATION.G_F" for pointers.
    Happy hunting!

  • Any way to pass Multiple Values for a single Label in the Parameter?

    I have a Report that Contains 2 Parameters, @Customer & @Area. When trying to set up the Available Values for @Area, I'm having issues using multiple values for one Label, i.e. = "4006" Or "4610"
    One of the Filters in the Report is an Operation number, which is the [OPERATION] field, which is setup as a filter on the Tablix referencing the @Area parameter. 
    PROBLEM: I cannot retrieve any data when trying to use the ‘Or’ Operator here. If I simply put “4006” or “4610” I retrieve data, but when trying to combine it returns no data.
    Example, I need to allow a user to select ‘Chassis Incoming’, which would include data from Operations 4006 & 4610.
    QUESTION:
    Any way to pass Multiple Values for a single Label in the Parameter?
    I realize the typical solution may be to use ‘Multi-Value’ selection, but in this case we want the User to select the Area and the multiple values for Filtering will be automatically determined for them. Otherwise, they are subject to not getting
    it correct.
    I have tried several different ways, such as =”4006” Or “4610”, =(“4006”, “4610”), = In(“4006”, “4610”), etc….
    Note: We are using Report Builder 3.0

    Based on my experience, there's no way to 'intercept' the query that gets passed back to SQL Server, so a Split wouldn't work.
    Try creating either a function or stored procedure using the code below (compliments to
    http://www.dotnetspider.com/resources/4680-Parse-comma-separated-string-SQL.aspx) to parse the string: 
    CREATE FUNCTION dbo.Parse(@Array VARCHAR(1000), @Separator VARCHAR(10))
    RETURNS @ResultTable TABLE (ParseValue VARCHAR(100))AS
    BEGIN
    DECLARE @SeparatorPosition INT
    DECLARE @ArrayValue VARCHAR(1000)
    SET @Array = @Array + @Separator
    WHILE PATINDEX('%' + @Separator + '%' , @Array) <> 0
    BEGIN
    SELECT @SeparatorPosition = PATINDEX('%' + @Separator + '%', @Array)
    SELECT @ArrayValue = LEFT(@Array, @SeparatorPosition - 1)
    INSERT @ResultTable VALUES (CAST(@ArrayValue AS VARCHAR))
    SELECT @Array = STUFF(@Array, 1, @SeparatorPosition, '')
    END
    RETURN
    END
    Once created you can do things like this:
    SELECT * FROM Parse('John,Bill,David,Thomas', ',')
    SELECT * FROM (SELECT 'John' AS TestName union select 'David' AS TestName) AS Main
    WHERE TestName IN (SELECT ParseValue FROM dbo.Parse('John,Bill,David,Thomas', ','))
    This is what your SQL query would probably look like:
    SELECT OperationID, OperationName FROM dbo.Operations
    WHERE AreaID IN (SELECT ParseValue FROM dbo.Parse(@Area, ','))
    You may need to fiddle around with the Separator depending on whether SQL Server inserts a space between the comma and next value.

Maybe you are looking for

  • How do I transfer files from my hard drive to the MacBook?

    I am a new Mac user and I transferred all of my files that were on my PC to an external hard drive in order to transfer them to the macbook.  However once I plugged in the hard drive to my mac, I don't understand how to transfer my files over.  There

  • Call Of Duty mac version?

    Hi All & thanks for taking the time in reading this! I was wondering if anyone could tell me if you use Call Of Duty mac version are you able to play online with people that play Call Of Duty on there PC's? - As i have friends that play the game on P

  • ASSET  DEPRETIATION

    Dear SAP Gurus, My client wants to sell an asset (date of sale 10th May 2007) He is yet to take the depreciation run for May-07. How/where should he put this date (10th May) so that at the time of depn run system calculates depreciation for 10 days o

  • Workspaces not saving

    Help, I have the same problem in Illustrator CS4, inDesign CS4 and Photoshop CS4. Despite setting up my worspce and saving it, when I quit/relaunch, the workspace has reverted to default and my saved workspace is nowhere to be found! The folder in li

  • SOA BPEL Composite Deployment failed with ORABPEL-05250

    hi i got following error while deploying composite having bpel with multiple operations..compilation was succesful with no errors.... following are the environment... jdeveloper 11.1.1.3 soa 11.1.1.5 ============================== [05:57:28 PM] Error