Dynamic selection in a submit

Hi guys,
I have a questions about dynamic selection.
I would like to submit a report but one of the parameters change . It parameter depend on the screen selection p_new.
The line   "WITH SO_CMOVI IN R_RANGE1 " or "     WITH SO_CMOVI IN R_RANGE2" is the difference.
if p_new = 'X'.
SUBMIT Z_BW_CIECONT WITH SO_SOC IN PSO_SOC
                        WITH SO_OPER IN PSO_OPERBW
                        WITH P_INI EQ <FS1>
                        WITH P_FIN EQ <FS1>
                        WITH SO_TIPO EQ P_MOVI
*                        WITH SO_CMOVI IN R_RANGE1
                        WITH P_TEST EQ PP_TEST.
ELSE
SUBMIT Z_BW_CIECONT WITH SO_SOC IN PSO_SOC
                        WITH SO_OPER IN PSO_OPERBW
                        WITH P_INI EQ <FS1>
                        WITH P_FIN EQ <FS1>
                        WITH SO_TIPO EQ P_MOVI
*                        WITH SO_CMOVI IN R_RANGE2
                        WITH P_TEST EQ PP_TEST.
ENDIF.
I would like something like this :
range : R_RANGE2 for VTBFHA-SGSART.
data: G_PRODUCTO(13) type c value 'R_RANGE1'.
if p_new = '00'.
      G_PRODUCTO =' R_RANGE2'.
endif.
FIELD-SYMBOLS: <FS2> TYPE ANY.
ASSIGN (G_PRODUCTO) TO <FS2>
if sy-subrc eq 0.
SUBMIT Z_BW_CIECONT WITH SO_SOC IN PSO_SOC
                        WITH SO_OPER IN PSO_OPERBW
                        WITH P_INI EQ <FS1>
                        WITH P_FIN EQ <FS1>
                        WITH SO_TIPO EQ P_MOVI
*                        WITH SO_CMOVI IN <FS2>
                        WITH P_TEST EQ PP_TEST.
endif.
This code is wrong because <FS2> is not an internal table.
Thanks in advance.
Best Regards.
Ana

Your code is ok, you only have two problems
<fs2> should be declared as type table
At the assing you should place 'R_RANGE2[]' instead of 'R_RANGE2'. The first one is a table, the second is a structure.
Another reason to stop using the range instruction and just declare the variable as TYPE RANGE OF

Similar Messages

  • Problems creating dynamic selection screen

    Hi all,
    i'm trying to dynamically generate a selection screen and show it as subscreen using the two function modules FREE_SELECTIONS_INIT and FREE_SELECTIONS_DIALOG. I call the function modules in the PBO of the therefor defined subscreen. The FREE_SELECTIONS_DIALOG fm has the two import parameter "as_subscreen" and "as_window". If i use the "as_window" parameter the selection screen comes up as popup. If i use the "as_subscreen" parameter, i can't see anything in my defined subscreen.
    Any suggestions ?
    Thanks in Advance
    Dirk

    Hi,
    The above requirement is not possible without using logical database.
    The reason is that the compiler identifies the below syntax only inside a LDB program .
    SELECTION-SCREEN DYNAMIC SELECTIONS
                     FOR {NODE|TABLE} node [ID id].
    The above syntax creates a subscreen container on the standard selection screen of the program during generation
    and we are able to view the dynamic selections icon on the selection screen.
    Hence it is not possible to use the FM 'FREE_SELECTIONS_DIALOG' as a subscreen without using a
    logical database of the relevant table.
    However if you dont want to create a new LDB for each table, there is a trick which needs to be performed
    once in your SAP system and all custom programs can use this FM to create a dynamic selection screen
    as a subscreen of the standard selection screen.
    The prerequisite steps are as follows:
    1: Create a dummy  / test database table in SE11 with a single field i.e. for example mandt , matnr
    2: Create a new logical database program for this table in SE36. Save and activate.
    This will create dynamic selections for the fields of the table created in step 1.
    Steps to be followed in the required custom ABAP program to create the dynamic selection screen as a subscreen.
    A: Include the LDB program created in step 2, in the attributes of the custom ABAP program.
    Now when you execute the program, you can see the dynamic selection icon for the dummy table created in step 1.
    B: In your custom program we need to suppress the icon for 'Dynamic Selections' from the standard selection screen.
       We need to perform this action, because the 'Dynamic Selections' icon always triggers a call to the
       dynamic selection screen of the included LDB progam. ( In our case a dummy table created in step 1 ).
       Whereas we want to trigger a call of the dynamic selection screen of our desired table.
       Logic is as follows:
       In 'AT SELECTION-SCREEN OUTPUT' event call the FM RS_SET_SELSCREEN_STATUS to exclude the fcode 'DYNS'.
    C: Add a pushbutton / checkbox on your selection screen to trigger a call to the FM 'FREE_SELECTIONS_INIT' &
       'FREE_SELECTIONS_DIALOG' in the 'AT SELECTION-SCREEN' event.
    D: When the user clicks the pushbutton / checkbox for dynamic selections call the above 2 FM for the desired table
        with the AS_SUBSCREEN flag of FREE_SELECTIONS_DIALOG = 'X'
    Result: Your dynamic selections screen will be created as a subscreen of the standard selection screen and not as a pop-up.
    Advantage: With the creation of the single custom table & LDB, you are now able to create dynamic selections as subscreen
    in any program in the system. All we need to do is follow the steps A, B & C in each program.
    Note: Your other restrictions with dynamic selection screen ie. submit in background , save as variant still remain and
    you need to handle them accordingly.
    let me know if you need sample code.
    Regards,
    Bhawit Kumar

  • Submit report with dynamic selections

    Hi All,
    I am trying to Submit a report with dynamic selections. I am using the option SUBMIT REPORT WITH FREE SELECTIONS.
    But the dynamic selections are not getting passed.
    Request you to kindly provide some inputs
    My code is
    DATA: trange TYPE rsds_trange,
          trange_line LIKE LINE OF trange,
          trange_frange_t_line LIKE LINE OF trange_line-frange_t,
          trange_frange_t_selopt_t_line LIKE LINE OF trange_frange_t_line-selopt_t,
          texpr TYPE rsds_texpr.
    trange_line-tablename = 'PA0002'.
    *trange_frange_t_line-tablename = 'PA0002'.
    trange_frange_t_line-fieldname = 'GBJHR'.
    trange_frange_t_selopt_t_line-sign   = 'I'.
    trange_frange_t_selopt_t_line-option = 'EQ'.
    trange_frange_t_selopt_t_line-low    = '1987'.
    trange_frange_t_selopt_t_line-high   = '1987'.
    APPEND trange_frange_t_selopt_t_line TO   trange_frange_t_line-selopt_t.
    APPEND trange_frange_t_line TO trange_line-frange_t.
    APPEND trange_line TO trange.
    CALL FUNCTION 'FREE_SELECTIONS_RANGE_2_EX'
      EXPORTING
        field_ranges = trange
      IMPORTING
        expressions  = texpr.
    submit RPCADVQ0
    VIA SELECTION-SCREEN
                    WITH SELECTION-TABLE rspar_tab
                    WITH FREE SELECTIONS it_texpr
                    and returN.
    Kindly provide your inputs
    Regards
    Reshma

    Hi Reshma,
    Use the FM - RS_REFRESH_FROM_DYNAMICAL_SEL before FREE_SELECTIONS_RANGE_2_EX.
      data: trange  type rsds_trange,
              g_repid type sy-repid.
    g_repid = 'RPCADVQ0'.
      call function 'RS_REFRESH_FROM_DYNAMICAL_SEL'
        exporting
          curr_report        = g_repid
          mode_write_or_move = 'M'
        importing
          p_trange           = trange
        exceptions
          not_found          = 1
          wrong_type         = 2
          others             = 3.
      if sy-subrc eq 0.
    " Do the changes to the trange
    CALL FUNCTION 'FREE_SELECTIONS_RANGE_2_EX'
    EXPORTING
    field_ranges = trange
    IMPORTING
    expressions = texpr.
    submit RPCADVQ0
    VIA SELECTION-SCREEN
    WITH SELECTION-TABLE rspar_tab
    WITH FREE SELECTIONS it_texpr
    and returN.
    endif.
    Cheers,
    Kothand

  • FAGLL03 : Submit syntax for dynamic selections

    Hi Experts,
    My z report contains following fields in selction screen.
    1 . G/ L account
    2. Comapny code
    3. posting date
    4. document type
    5. layout
    In my z report i used following syntax for passing selection screen values to standard program and getting data.
    SUBMIT FAGL_ACCOUNT_ITEMS_GL
                      WITH SD_SAKNR   IN S_SAKNR
                      WITH SD_BUKRS   IN S_BUKRS
                      WITH X_OPSEL    EQ ' '
                      WITH X_CLSEL    EQ ' '
                      WITH X_AISEL    EQ 'X'
                      WITH SO_BUDAT   IN S_BUDAT
                      WITH PA_VARI    EQ P_VAR
                      EXPORTING LIST TO MEMORY
                     AND RETURN. 
    The above syntax is not working for dynamic selection field ( document type ), entire document types data is fetching from standard program. I want to fetch document type data based on my z report selection values for document type field.
    Expect for document type field , submit syntax is working.
    kindly provide submit syntax for my above requirement .
    Any suggestions from experts....
    thanks & regards,
    Hari priya
    Edited by: Hari  Priya on Aug 24, 2009 4:33 PM

    Hi,
    Try like this.
    call function 'RS_REFRESH_FROM_SELECTOPTIONS'
      exporting
        curr_report = 'FAGL_ACCOUNT_ITEMS_GL'
      tables
        selection_table = i_sel[].
    Fill your profit center values in i_sel
    Submit FAGL_ACCOUNT_ITEMS_GL with selection-table i_sel and return
    WITH FREE SELECTIONS TEXPR AND RETURN
    Regards,
    Shamma

  • Submit syntax for dynamic selections for T-code FAGLL03

    Hi Experts,
    My z report contains following fields in selction screen.
    1 . G/ L account
    2. Comapny code
    3. posting date
    4. Profit Center
    5. layout
    In my z report i used following syntax for passing selection screen values to standard program and getting data.
    This is for T-code FAGLL03
    SUBMIT FAGL_ACCOUNT_ITEMS_GL
    WITH SD_SAKNR IN S_SAKNR
    WITH SD_BUKRS IN S_BUKRS
    WITH %%DYN001-LOW (Profit Center)
    EXPORTING LIST TO MEMORY
    AND RETURN.
    The above syntax is not working for dynamic selection field ( Profit Center), entire Profit center data is fetching from standard program. I want to fetch profit center data based on my z report selection values .
    Expect for profit center field , submit syntax is working.
    kindly provide submit syntax for my above requirement .
    Any suggestions from experts....
    Edited by: PLP REDDY on Nov 25, 2009 8:59 AM

    Indeed it won't work. Instead of passing parameters one by one use
    [SUIBMIT... WITH SELECTION-TABLE rspar|http://help.sap.com/abapdocu_70/en/ABAPSUBMIT_SELSCREEN_PARAMETERS.htm#!ABAP_ADDITION_3@3@]
    Here you add one line per parameter (field KIND = 'P' ) and multiple lines per select options (field KIND = 'S' ). For the latter you need also provide SIGN and OPTIONS, i.e SIGN = 'I' , OPTIONS = 'EQ'
    The lin I gave you will explain it more.
    Regards
    Marcin

  • Dynamic list... select list with submit

    Hi,
    I am trying to create a dynamic list and based on the selection I want to pass the parameters… Here is what I’ve done so far
    Step 1… created a list of values (through shared components) using a query
    Step 2… created an item… used option to select list with submit…
    Here is the challenge: How to update my P1_Value based on the value from Select list…
    Thanks in advance

    I've created a page process by following these steps
    Create Page Process:
    Category of the process: Session State
    Session State process type: Set Preference to value of Item (PreferenceName:ITEM)
    Point: On Submit after computation and validation
    Preference Item: P1_Value
    Getting an error message:
    Invalid PL/SQL expression condition: ORA-06550: line 1, column 29: PLS-00306: wrong number or types of arguments in call to 'NVL' ORA-06550: line 1, column 7: PL/SQL: Statement ignored

  • Select list with submit using on a dynamic report

    Hi! I'd like to know how can I create a Select list with Submit using the HTMLDB_ITEM API.
    I know there's an API named HTMLDB_ITEM.SELECT_LIST_FROM_LOV(), but I'd like to know how can I reproduce in there the submit everytime the user changes a value.
    Thanks!

    Hi! I've discovered there's a parameter on this function that allows me to include a javascript like the example below:
    select HTMLDB_ITEM.SELECT_LIST_FROM_LOV(3, ctr_id,'LOV_COUNTRIES','onChange=javascript:doSubmit()','NO)
    from XXXX;
    The thing is I don't know how exactly this javascript:doSubmit() works, because it works different than creating a select list with submit item.
    If I create on a page a simple "select list with submit" item, and if I run the page, after changing the value of the select list it refreshes the page but it doesn't erase the values inserted on the other items. But if I have this HTMLDB_ITEM.SELECT_LIST_FROM_LOV function, after changing the value of the select list it refreshes the page but it erase the values inserted on the other items and recovers the old values..
    I really need your help on this.
    Thanks in advance :-)

  • Passing values to a dynamic selection screen via a report

    Hi,
    I have the following problem and need to seek your expertise urgently.
    In my program, I need to call another report by passing in parameters to the selection screen of other report. However, I could not pass values into a dynamic selection screen. I tried to use submit (report) with free selection but do not know how it works.
    Currently, I tried calling the function RS_REFRESH_FROM_DYNAMICAL_SEL and FREE_SELECTIONS_RANGE_2_EX. Using the object the first function has returned to me, I tried to append values such as fieldname etc to it. However, I realised the field names of a dynamic selection screen keeps changing. So I would not know how to pass a particular value to a selection field.
    Appreciate any help given.
    Thanks,
    CK

    Hello CK,
    Are you using logical database in your selection screen program attributes? If it is, look at include file DBxxxSEL for parameter named xxxDYNSE where xxx = logical database. Debug the program that has that dynamic selection, and look at field xxxDYNSE. This should give you a hint on how to populate the parameter when you submit the program.

  • Setting the Default Value for a dynamic select menu

    Hi I have a php page with 2 forms on it, one feeds the other to achieve a drill down (manufacturer > model). In the second select menu I have a default static value "Select Aircraft Model", I want to set a value for the first dynamic select menu to read "Select Aircraft Manufacturer". When I add a static value to my list it tells me I alreay have a dynamic behavior on this menu and to choose a different one. I have included the code for both menus. Thank you in advance, I know this must be a stupid question, but it's got me stumped.
    Tom
    //This is the menu I want to add the default static value to//
    <td width="667"><select name="airMake" style="width: 200px;"onchange="this.form.submit();" id="airMake">
            <?php
    do {
    ?>
            <option value="<?php echo $row_rsAirManufacturer['aircraft_manufacturer']?>"<?php if (!(strcmp($row_rsAirManufacturer['aircraft_manufacturer'], ((isset($_POST["airMake"]))?$_POST["airMake"]:"")))) {echo "selected=\"selected\"";} ?>><?php echo $row_rsAirManufacturer['aircraft_manufacturer']?></option>
            <?php
    } while ($row_rsAirManufacturer = mysql_fetch_assoc($rsAirManufacturer));
      $rows = mysql_num_rows($rsAirManufacturer);
      if($rows > 0) {
          mysql_data_seek($rsAirManufacturer, 0);
          $row_rsAirManufacturer = mysql_fetch_assoc($rsAirManufacturer);
    ?>
          </select>
          </td>
      </tr>
    </table></form>
        <form action="quoteResult.php" method="post" name="quoteForm">
          <table width="100%" border="0" cellpadding="5px">
            <tr>
              <td width="260"style="color: #000; text-align: right;">Aircraft Model:</td>
              <td colspan="2"><span id="spryselect2">
    //This is the menu that works correctly//
                <select name="airModel" style="width: 200px;" id="airModel">
                  <option value="" <?php if (!(strcmp("", ((isset($_POST["airMakeField"]))?$_POST["airMakeField"]:"")))) {echo "selected=\"selected\"";} ?>></option>
                  <?php
    do { 
    ?>
                  <option value="<?php echo $row_rsAirModel['aircraft_model']?>"<?php if (!(strcmp($row_rsAirModel['aircraft_model'], ((isset($_POST["airMakeField"]))?$_POST["airMakeField"]:"")))) {echo "selected=\"selected\"";} ?>><?php echo $row_rsAirModel['aircraft_model']?>Select Aircraft Model</option>
                  <?php
    } while ($row_rsAirModel = mysql_fetch_assoc($rsAirModel));
      $rows = mysql_num_rows($rsAirModel);
      if($rows > 0) {
          mysql_data_seek($rsAirModel, 0);
          $row_rsAirModel = mysql_fetch_assoc($rsAirModel);
    ?>
                  </select>

    Change this -
    <select name="airMake" style="width: 200px;"onchange="this.form.submit();" id="airMake">
    to this -
    <select name="airMake" style="width: 200px;"onchange="this.form.submit();" id="airMake">
    <option value="-1">Select Aircraft Manufacturer</option>
    Then if the value of 'airMake' is -1 you know that no choice was made.

  • Problem in calling FBL3N and passing Dynamic Selection Screen Parameters

    Hi Experts,
    I am calling the standard report FBL3N in one of my reports using Submit.
    I am passing the GLcode, Company code and Open at key Date in the selection screen.
    Now my requirement is that I need to pass the Posting Key as '40' in my report.
    40 signifies a Debit Entry.
    Now the Posting key comes as a Dynamic Selection parameter in the FBL3n program.
    I am unable to determine the name of the field to which I should pass the value 40.
    Please advice.
    Regards

    Hi,
    Each GL Account belongs to Field status group--> table SKB1.
    Each Field Status group will have specific field combinations --> We can get this using the tables TMODO and TMODP.
    Pls design ur BDC depending on the values from these table.
    (Note: I have done same like this for populating values to dynamic fields ).
    Let me know if u need any information.
    Thanks,
    Senthil

  • Can we have the 'select list with submit' type within a tabular form?

    An item can be the "Select list with submit' type so a form has no problem with it. However, when I built a tabular form manually, I couldn't find this type. There are only three types avaiable: "named", "static", and "dynamic".
    Is it possible to have the "submit" type so columns of the tabular form can be dynamically rendered based on the user inputs?
    Another question I have is how to dynamically build the tabular form with decode func. For example, if the value of col_1 is 'val_1', then build a select list in col_2; otherwise null in col_2.
    I tried to use
    select col1,
    decode (col1, 'val_1', select htmldb_item.select_list_from_lov(2, first, 'lov1') from dual, null)
    from....
    where....
    But it didn't work.
    I'd like to know whether it's feasible to have something like that.
    TIA.
    Message was edited by:
    Luc

    You could use a region of type PL/SQL function
    returning SQL query to dynamically build this kind of
    tabular form. However if you want to use the built-in
    multi-row insert, update and delete processes, all
    items in a column must have the same display type. Marc, thanks for the quick reply. I appreciate it.
    I got your idea. However, I need to have the javascript 'ToggleAll' as the heading so the form works as same as the built-in one. If I put the query definition into a pl/sql procedure, where I can put this html tab attribute? It can not be inside the checkbox function, otherwise the checkbox of any row would act as same as the header.
    I hope I've made this clear.
    To Vikas: It's our clients who want this, not us. :(

  • Issue with MB25 BDC for Dynamic Selection Screen

    Hi Experts,
    I recorded one BDC for MB25 Tcode regarding to determine Open Reservation(s) in E Mode (Display Mode). I am passing 3 parameters.
    1. Plant,
    2. Requirement Date
    3. Multiple Reservation Numbers i.e. RSNUM from Dynamic Selection i.e. 2nd Button -> Header Data for Reservation -> Reservation -> Multiple Selection Icon.
    But while executing that BDC, I need to manually click every time on 'Header Data for Reservation' Tree and then Multiple Selection for Reservation Icon.
    I want below steps automatically while executing:
    - Open 'Header Data for Reservation' Tree
    - Click Reservation
    - Open Popup for 'Multiple Selection'.
    So no need to click every time on Dynamic Selection Screen i.e. Header Data for Reservation -> Reservation -> Multiple Selection Icon.
    Please find attached screen shot for your reference.
    Please guide.
    Thanks and Regards,
    Emon Master

    Hello Jainam,
    submit (sy-repid) with selection-table v_sp
                             with free selections EXPRESSIONS
                             via selection-screen.
    Without going through the details, dont you think this will cause an inifinite loop as the calling & the called programs are the same.
    Please enlighten me !!
    BR,
    Suhas

  • Chart based on Select list with submit Lov problem

    Hi,
    I have one page with interactive report showing username with links, date and
    database actions.
    Another page contains one region having flash chart based on select list with submit Lov.
    The lov is created by dynamic query.
    Every time when i click the 1st page report link, the 2nd page lov is populating the value automatically. But the problem is chart displays NO DATA FOUND message though the LOV has many values.
    I don't want to display any null values so set to NO for LOV
    I tried to write Before header computation (PL/SQL Function Body) to set the lov value, but the query is displayed as such.
    I don't want to assign any static default value also as the values are dynamic for every link.
    The following is my Before header computation of Select list with submit (Item name is p11_schema). (PLSQL Function Body)
    begin
    if :p11_schema is null then
    return 'select distinct owner schema1, owner schema2 from auditing
    where access_date=' || :p11_access_date
    || ' and username=' || :p11_username
    || ' order by owner';
    end if;
    end;
    This is my chart query.
    select null link, obj_name label, sum(sel_count) "Select", sum(ins_count) "Insert", sum(upd_count) "Update", sum(del_count) "Delete" from auditing
    where username=:p11_username
    and access_date=:p11_access_date
    and owner=NVL(:p11_schema, OWNER)
    group by owner, obj_name
    Example: If there more than one records in the lov, the graph should display the 1st record. When i select another record, the chart accordingly display the selected values. But inially it should not display "NO DATA FOUND" message.
    I tried using all the combinations of computation type for the lov, SQL query ( I could not use if conditon then), PLSQL expression, PLSQL function body. But it does not work out.
    Can anyone please help me out.
    Thanks.

    Hi Scott,
    Thanks for your reply.
    I found out the solution for this problem as below.
    But i did it in different way to tackle the dynamic query wich returns more than one record using rownum always the 1st record when it is empty instead of assigning constant (static) value like '1'. And i am returning LOV itself for both null or not null condition as below.
    Declare
    q varchar2(4000);
    begin
    if :p11_schema is null then
    q:='select distinct owner schema from auditing';
    q:=q || ' where username=:p11_username ';
    q:=q || ' and access_date=:p11_access_date ';
    q:=q || ' and rownum<2 order by owner';
    Execute immediate q into :p11_schema USING :p11_username, :p11_access_date;
    end if;
    return :P11_SCHEMA;
    end;
    Thanks.

  • Passing dynamic selection parameters for fagll03 transaction

    hi experts,
    im trying to call  a transaction ( fagll03) in my report with the input parameters via selection screen (using SUBMIT ) , but iwant to pass the profit center  values to the transaction fagll03 , but the profit center is in dynamic selection , i just tried with some code , but it is not working, can any one just tell me briefly how to pass the profit center variable to the dynamic selection screen in fagll03. if u have any code please update me , it will be more useful.
    Regards,
    Venkat.

    Look at FM FREE_SELECTIONS_RANGE_2_EX which will build the correct parameter to use in the WITH FREE SELECTION option.
    First read Abap documentation at SAP online help [WITH FREE SELECTIONS texpr |http://help.sap.com/abapdocu/en/ABAPSUBMIT_SELSCREEN_PARAMETERS.htm#!ABAP_ADDITION_5@5@] in [SUBMIT - selscreen_parameters|http://help.sap.com/abapdocu/en/ABAPSUBMIT_SELSCREEN_PARAMETERS.htm] of [SUBMIT|http://help.sap.com/abapdocu/en/ABAPSUBMIT.htm] (or press F1 on SUBMIT)
    Also look if those notes are relevant for your system
    - [Note 965988 - FAGLL03: 'Dynamic selections' are ignored|https://service.sap.com/sap/support/notes/965988]
    - [Note 1105201 - FAGLL03: 'Custom selections' are ignored|https://service.sap.com/sap/support/notes/1105201]
    Regards,
    Raymond

  • How to generate a dynamic selection-screen

    Hi folks,
    I have a itab with all fields and descriptions of a database-table. Now i want to generate a selection screen dynamically. I want to create a select-option for every field of the table.
    First I read all fields of a database table into my intern table:
    CALL FUNCTION 'DDIF_FIELDINFO_GET'
      EXPORTING
        tabname              = 'database_tabname'
      TABLES
        dfies_tab            = it_tabname_fields.
    Then I tried to generate a dynamic selection-screen with a select-options statement per field of the itab, but it doesn't work:
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001 NO INTERVALS.
    LOOP AT it_tabname_fields INTO s_tabname_fields. "should be 14 loops and 14 lines
      SELECTION-SCREEN BEGIN OF LINE.
      SELECTION-SCREEN COMMENT (25) s_tabname_fields-SCRTEXT_S FOR FIELD var1. "the name of the field should be set dynamically from the itab
      SELECT-OPTIONS var1 FOR tabname-s_tabname_fields-fieldname. "s_tabname_fields-fieldname should be set dynamically for each line
      SELECTION-SCREEN END OF LINE.
    ENDLOOP.
    SELECTION-SCREEN END OF BLOCK b2.
    I know that this doesn't work but it should help you to understand what i want to do. It doesn't create more than one select-option (it should be 14 because there are 14 lines in the table) and it doesn't get the values from the table.
    I hope you can help me...
    Regards,
    Sebastian

    hi
    Firstly, have a look at the following code to see how this can be implemented -
    REPORT ZTEST.
    perform test.
    class test definition.
      public section.
        methods: create_screen.
    endclass.
    class test implementation.
      method create_screen.
        data:  report_line(72),
               report_source like table of report_line.
        data: err_message(240),
              err_line type i,
              err_word(100).
        report_line = 'REPORT TEST.'.
        append report_line to report_source.
        report_line = 'PARAMETERS: P_TEST TYPE I.'.
        append report_line to report_source.
        report_line = 'START-OF-SELECTION.'.
        append report_line to report_source.
        report_line = 'WRITE : P_TEST.'.
        append report_line to report_source.
        syntax-check for report_source message err_message
                                       line    err_line
                                       word    err_word.
        if err_message is initial.
          INSERT REPORT 'ZZZTESTZZZ' FROM REPORT_SOURCE.
          SUBMIT ZZZTESTZZZ VIA SELECTION-SCREEN AND RETURN.
        endif.
      endmethod.
    endclass.
    form test.
      data test type ref to test.
      CREATE OBJECT TEST.
      call method test->create_screen.
    endform.
    As you can see, the report is being written dynamically. Once the INSERT REPORT statement is executed, the program is available. you can you external subroutine calls to pass the data between the programs now.
    Regards,
    ravish
    <b>plz dont forget to reward points if helpful</b>

Maybe you are looking for

  • Reply from the notifiaction mail (from outlook) to sap Inbox

    HI I have a requirement where in I am sending a notification mail to user saying Document verification is OPEN(pending) in your name.1s he finshes that task he will reply to the same mail saying ClLOSED. Now can we get this mail reply to SAP Inbox of

  • Automatic Re-calculation of pricing on re-entering item category

    Hi experts, I have a requirement where during sale order creation (VA01), if I enter the necessary details on the screen and do not enter an item category, and I press enter, the pricing gets calculated. Now if I add an item category and press enter

  • HELP using print function in Finder

    When you right click a selection of Word documents or photos in the finder, I see an option for Print. I thought that if I used this option, the selection would automatically print. Instead, it just opens the application and documents (for example, M

  • Creating Custom BI Reports from Oracle Agile PLM

    Hi All, Firstly apologies if this post is in the wrong forum, I struggling to find any real Oracle Agile Support. I have been tasked with developing 3 custom BI reports for Oracle Agile. I have used BI Publisher in the past but only within Oracle E-B

  • How to change colour of the Cell in a table

    Hi, Could you please let me know how to change the coluor of the cell at table. here i m having a column called "STATUS". i m getting data from backend and filling this column with two values(success/failed). when i get success, the cell should be in