About dynamic selection

Hi Experts,
Here i am trying to create a selection screen with two fields .
one field to hold the table name.
anothere for field name.
now how to validate weather that field present in the table or not?
Thanks in advance

Hi Experts,
Here i am trying to create a selection screen with two fields .
one field to hold the table name.
another for field name.
NOW I WANT TO FETCH THIS FIELD VALUES FROM THE TABLE.
FOR THIS HOW TO CREATE AN INTERNAL TABLE?
Edited by: balajigaru on Jun 21, 2009 2:29 PM
Edited by: balajigaru on Jun 21, 2009 2:31 PM

Similar Messages

  • 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

  • Is it possible to display only dynamically selected fields in the out put?

    Is it possible to display only dynamically selected fields in the out put? i need to display set of columns in the selection criteria, but in the output i have display only input given fields. because i need to convert it into .csv file. So i have to display selected fields from internal table. In oracle they are using"execute immediate". is there any equivalent in SAP?
    thanks in advance.

    Hi Remya,
    Are you talking about dynamic programming in ABAP ?
    If yes, there are concepts like RTTS which facilitates it.
    Yes, the select query also supports dynamic selection of fields. ( Please care about ( ) in dynamic sql ).
    Do more research on Field Symbols and statements like ASSIGN COMPONENT OF.
    Regards,
    Philip.

  • Dynamic select using jsp?

    grrrrr............ok so I'm kinda new to this, and just a little frustrated. I'm gonna ramble here, so any time I sound like I don't know what I'm talking about it 's because I don't..correct me. I want to include a bean in a jsp which will buil d a dynamic select box on the fly. That is, connect to an LDAP db and place each value returned in the query in a select box. Now, I can compile and run the bean in my IDE and watch the output in the console. It's correct because I see "<select><option value = hall>hall....</select>". In the buildSelectBox() method I'm using System.out.println to display each line of my select box (is that right?). Now, when I copy the .class file over to the server I was initially getting an error because the bean wasn't found. I resolved that by properly compiling the bean in a package. Problem is that if I call the bean.buildSelect() method in the .jsp nothing comes back. The page is left blank. What in the world is that about? Can someone push me toward a tutorial that can push me in the right direction or sumthin? Why am I having so much trouble with this? Should I be building the select on the jsp?
    regards,
    mat

    Hi!
    If i understand you correctly :-) you are doing not very right things. I don't want it to seem like I'm going to teach you, but:
    The Bean that has buildSelect() method is not a bean at all. Usualy Beans contain getter/setters and accumulate data. If you want to build html code dynamicaly then you should use servlets(Which is not very flexible in your situation, I think), not JSPs. And if you are using JSPs then you have to make Tag which will do this everything.
    Other way is to use Struts framework which is very good and flexible for building web applications - it has it's own tags for many cases. You can make loops in JSPs, use beans and all that stuff.
    Guys will correct me if I missed something.
    Good luck

  • Dynamic select

    hi to all,
            i am working in the dynamic select scenario. i want to select the fieldnames  from the tables dynamically using report editor as per the requirement as new to abap can some one please help me out and also kindly mention the table name for example DD03L.
    Thanks,
    Devi

    Hi priya...
    I am sure about its may help you....please mention if you solve your questions..
    REPORT  ZNKS_TEST19.
    *TABLES : SFLIGHT.
    type-pools : slis.
    data : it_tab  type table of SFLIGHT,
          wa_tab  like line of it_tab.
    data: fieldcatalog type slis_t_fieldcat_alv with header line,
          gd_layout    type slis_layout_alv,
          gd_repid     like sy-repid,
          g_exit type c,
          ispfli type table of spfli.
    parameters :
                carrid  type SFLIGHT-CARRID,
                connid  type SFLIGHT-CONNID,
                date  type SFLIGHT-FLDATE,
                price  type SFLIGHT-PRICE.
    data l_where(100) occurs 0 with header line.
    start-of-selection.
      perform data_retrivel.
      perform build_fieldcatalog.
      perform display_alv_report.
    form build_fieldcatalog .
      fieldcatalog-fieldname   = 'CARRID'.
      fieldcatalog-seltext_m   = 'carrid'.
      fieldcatalog-col_pos     = 0.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'CONNID'.
      fieldcatalog-seltext_m   = 'connid'.
      fieldcatalog-col_pos     = 1.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'FLDATE'.
      fieldcatalog-seltext_m   = 'date'.
      fieldcatalog-col_pos     = 2.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'PRICE'.
      fieldcatalog-seltext_m   = 'price'.
      fieldcatalog-col_pos     = 3.
      fieldcatalog-outputlen   = 20.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
       fieldcatalog-fieldname   = 'CURRENCY'.
      fieldcatalog-seltext_m   = 'currency'.
      fieldcatalog-col_pos     = 4.
      fieldcatalog-outputlen   = 20.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
       fieldcatalog-fieldname   = 'PLANETYPE'.
      fieldcatalog-seltext_m   = 'planetype'.
      fieldcatalog-col_pos     = 5.
      fieldcatalog-outputlen   = 20.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    endform.                    " BUILD_FIELDCATALOG
    form display_alv_report .
      gd_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_callback_program      = gd_repid
          i_callback_top_of_page  = 'TOP-OF-PAGE'  "see FORM
          i_callback_user_command = 'USER_COMMAND'
          it_fieldcat             = fieldcatalog[]
          i_save                  = 'X'
    *      IS_VARIANT              = G_VARIANT
        tables
          t_outtab                = it_tab
        exceptions
          program_error           = 1
          others                  = 2.
      if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    endform.                    "DISPLAY_ALV_REPORT
    form data_retrivel .
      if carrid is not initial.
    append 'CARRID = carrid' to l_where.
    endif.
    if connid  is not initial.
      if l_where is initial.
        append ' and ' to l_where.
      endif.
      append 'CONNID = connid' to l_where.
    endif.
    if date  is not initial.
      if l_where is initial.
        append ' and ' to l_where.
      endif.
      append 'FLDATE = date' to l_where.
    endif.
    if price is not initial.
      if l_where is initial.
        append ' and ' to l_where.
      endif.
      append 'PRICE = price' to l_where.
    endif.
    select * from sflight into corresponding fields of table it_tab
    where (l_where).
    endform.                    " DATA_RETRIVEL
    form top-of-page.
    *ALV Header declarations
      data: t_header type slis_t_listheader,
            wa_header type slis_listheader,
            t_line like wa_header-info,
            ld_lines type i,
            ld_linesc(10) type c.
    * Title
      wa_header-typ  = 'H'.
      wa_header-info = 'Z  report'.
      append wa_header to t_header.
      clear wa_header.
    * Date
      wa_header-typ  = 'S'.
      wa_header-key = 'Date: '.
      concatenate  sy-datum+6(2) '.'
                   sy-datum+4(2) '.'
                   sy-datum(4) into wa_header-info.   "todays date
      append wa_header to t_header.
      clear: wa_header.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
        exporting
          it_list_commentary = t_header.
    endform.    
    // Dynamic Selection
    Thanks and Regards ,
    Niraj Sinha

  • Creating a dynamic Selection List based on a View Object

    Hello,
    I'm new to JDeveloper and I would like to create a JSP Page with dynamic Selection List based on a runtime query or based on a view object (BC4J). The selection made by an user should serve another dynamic query with the necessary parameters that I built using createViewObjectFromQueryStmt(). By now I tried this using the InputSelectLOV from the Component Palette in JDeveloper. But without success. By the way: the selection list is not very large (5 values), so it's not necessary to have a form finding the desired value.
    Maybe someone had experience about creating this already. Please give me a tip or a little example.
    Thanks.

    http://otn.oracle.com/products/jdev/howtos/jsp/renderers.html

  • About AT SELECTION SCREEN

    Hi guys,
    I need help about AT SELECTION SCREEN ON VALUE REQUEST FOR a.
    Actually, I need this to be ON VALUE REQUEST FOR a and b, because I need to update both parameter with this single search help. Can anybody show me how to do this?
    Thanks before.

    Hi...Samanta...
    This is the proper code that give u the Complete info on How to write the Logic:
    REPORT  zsel_f4help                             .
    *---Report with selection screen and to display the list of
    possible entries for field 'B' as per the value in field 'A'.
    PARAMETERS: p_vbeln TYPE vbak-vbeln,
    p_posnr TYPE vbap-posnr.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_posnr.
      DATA: BEGIN OF help_item OCCURS 0,
      posnr TYPE vbap-posnr,
      matnr TYPE vbap-matnr,
      arktx TYPE vbap-arktx,
      END OF help_item.
      DATA: dynfields TYPE TABLE OF dynpread WITH HEADER LINE.
      dynfields-fieldname = 'P_VBELN'.
      APPEND dynfields.
    **Read the Values of the SCREEN FIELDs
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname               = sy-cprog
          dynumb               = sy-dynnr
          translate_to_upper   = 'X'
        TABLES
          dynpfields           = dynfields
        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.
    **Find out the Value of P_VBELN
      READ TABLE dynfields WITH KEY fieldname = 'P_VBELN'.
      p_vbeln = dynfields-fieldvalue.
    **Convert the Value into internal format
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input  = p_vbeln
        IMPORTING
          output = p_vbeln.
    **Fetch the correponding itemnos from VBAP
      SELECT posnr matnr arktx INTO TABLE help_item
      FROM vbap
      WHERE vbeln = p_vbeln.
    **Generate the F4 help with internal table values
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield    = 'POSNR'
          dynprofield = 'P_POSNR'
          dynpprog    = sy-cprog
          dynpnr      = sy-dynnr
          value_org   = 'S'
        TABLES
          value_tab   = help_item.
    <b>Reward if Helpful</b>

  • To read a fields from a Dynamic selections.. In LDB PNP

    Dear All,
    I need a suggestion from you, Please inform how to go about this.
    We have created our own Dynamic Selection (Extended the PNP_DEFAULT with IT 0008 fields) and this button is comming next to variant and when we click we are able to see the fields from IT 0008 and we are entering the TRFGB as '06' and this is all working fine .
    Now, We would like to retrtieve the data entered in Dynamic selection into our own local variable as we need to read some other (own own tables) with TRFGB and this needs to be done before GET PERNR event.
    Please inform me how to read the data entered in the Dynamic selections to our own local variables in ABAP Program.
    Thanks and have a nice day ahead.
    Regards,
    Mangalagi S V

    Dear Suresh,
    Thanks for your Suggestion.
    Sorry, I am not able to award a Points for you , I am getting 'Error'.
    Regards,
    Mangalagi S V

  • Dynamic selections in LdB FMF

    Hello Guys,
    I hope some of you will be using the LdB FMF and the many SAP reports that use FMF. It is in Funds Management, specifically for Public sectors.
    There are some transactions for the program RFFMEPGAX. When any of these transactions or program is executed, the selection screen comes up with some PRE-DETERMINED NODES for dynamic selections. There are about 20+ nodes for FMF, but the dynamic selections are available only for 5 nodes.
    I am not able to figure out where and how these nodes are restricted. I need to make few other fields available for dynamic selections. I hope some of you will be able to help me out.
    Thank you all for your time.
    PS: I am not sure, but think FMF is available only in Enterprise.

    The nodes for dynamic selection that are displayed are the nodes that the program is using.  Try this simple program that uses LDB FMF:
    REPORT  zcdf_ldb_test.
    TABLES: fkrs, ffnd.
    WRITE: sy-datum.
    I get dynamic selections for only these 2 tables.  Keep adding tables and you get more nodes for dynamic selection.  So when you see 5 nodes, the selection screen is trying to tell you that only those 5 tables are used by the program.  Making more available that the program does not use would be misleading to the user.
    You can use transaction SE36, and do a where used on LDB FMF to find other programs that use this LDB and execute them to see how the number of dynamic nodes changes.
    In SE36, click on Selections to see all of the tables available for dynamic selection.
    Is this the information your were looking for?

  • Dynamic Selections in FBL5N

    Hi All,
    We are facing a problem while using the transaction FBL5N (Customer line item display) along with its dynamic selections. Along with the existing selections we would like to include the payment terms in the selection criteria which is available in the company code data of the dynamic selections.
    The problem is even if we use this there is no effect on the report i.e. the data is not filtered (Say I have chosen not to get payment terms with a value 'XYZ' but the report is displaying these..). But at the same time if we use the document date in the dynamic selection, the report is working fine, the extracted data meets the selection criteria.
    Can somebody help us out here, if we have to include some notes or any LDB's which might help us?
    Thank You.
    Rgds,
    Narendra

    Thanks Julius....
    Moving it to the top...would help if anyone can provide some info about this....
    Rgds,
    Narendra
    Edited by: Narendra Daka on Jan 1, 2009 4:19 PM

  • Dynamic Selections in LDB PSJ

    Hi,
    I am trying to use the LDB PSJ in one of my custom Reports,
    We are interested only in the "Dynamic Selections" part of the LDB.
    Right now the report works fine without any LDB assigned,but once the LDB is assigned,
    the report code does not get executed. Am assuming the LDB is doing some check and exiting
    without executing the report code.
    The selection screen is not modified, i.e it still displays my custom Selection screen
    and not one by the LDB.
    Is there some way of disabling this selection or this check.
    and also how do I go about programming to use the fields selected in the dynamic selection
    for my select statments.
    Am assuming will be able to get the fieldname once the user selects it ,and then will be able to us them
    Appreciate any input
    Thank u
    Lalitha

    Had u got the solution , i am facing the same problem
    Thanks

  • Add certain field at dynamic selection screen in FBL3N transaction

    Hello Expert,
    I would like to add entry date field (BKPF-CPUDT) at dynamic selection screen in FBL3N transaction.
    So, I went to SE36 transaction and changed something in selection view for SDF.
    However, it didn't work.
    Is there anyone who knows how to add a certain field at dynamic selection screen in FBL3N transaction?
    Thanks in advance.
    BR,
    Chris Kim

    Hi
    Refer to the following thread
    Additional field selections in FB03
    It talks about adding Header Text field
    You should be able to add entry date similarly
    Regards
    Sach!n

  • About dynamic  where clause

    hi
    on Jdev 11.1.2.3.0
    Imade dynamic search (where clause)
    It woks fine with me
    but I want to be sure from the best way to do that
    the ideia is to run search according to what is the user chose
    on (Hr) schema employees table
    the end user could search according to departmentID only
    or job id only or both of them or display all employees taable data if there are no seletion
    I used
    this.setWhereClause( );
    this.defineNamedWhereClauseParam();
    this.setNamedWhereClauseParam();
    methods in employeesImpl and I revale it to the client interface to display two text boxes and a button
    my full code is
    ================
    public void setwhereClause(String jobid ,String departmentId ) {
    if (jobid==null & departmentId ==null) {
    this.skipNamedWhereClauseParam ("P_DEPARTMENT_ID");
    this.skipNamedWhereClauseParam("P_jobid");
    this.setWhereClause("1=1");
    this.executeQuery();
    if (jobid==null & departmentId !=null) {
    this.setWhereClause("EmployeesEo.DEPARTMENT_ID =:P_DEPARTMENT_ID");
    this.defineNamedWhereClauseParam("P_DEPARTMENT_ID", null, null);
    this.setNamedWhereClauseParam("P_DEPARTMENT_ID",departmentId );
    this.skipNamedWhereClauseParam("P_jobid");
    this.executeQuery();
    if (jobid!=null & departmentId ==null) {
    this.setWhereClause("EmployeesEo.JOB_ID=:P_jobid ");
    this.defineNamedWhereClauseParam("P_jobid", null, null);
    this.setNamedWhereClauseParam("P_jobid",jobid );
    this.skipNamedWhereClauseParam ("P_DEPARTMENT_ID");
    this.executeQuery();
    if (jobid!=null & departmentId !=null)
    this.setWhereClause( "EmployeesEo.JOB_ID=:P_jobid and EmployeesEo.DEPARTMENT_ID =:P_DEPARTMENT_ID " );
    this.defineNamedWhereClauseParam("P_DEPARTMENT_ID", null, null);
    this.setNamedWhereClauseParam("P_DEPARTMENT_ID",departmentId );
    this.defineNamedWhereClauseParam("P_jobid", null, null);
    this.setNamedWhereClauseParam("P_jobid",jobid );
    this.executeQuery();
    ==========================================
    but Iwas geting error when I run the search For the First Time only without selecting any thing
    the error wase about ( attempt to define parameter which is not in the where clause)
    one time for both variable if there are no selection
    anothe for the P_DEPARTMENT_ID when I search for job
    and the oposet for P_jobid when I search for department
    so why this eror came despite of IF Statment existance
    and why when I run search for both parameter job and departemnt
    next time i search for all data or department only or job only
    the error dosnot come again
    Isuccesd to avoide this error by adding P_DEPARTMENT_ID and P_jobid
    as bind varable in the same names for the employeesVo
    note
    (Idont want to use view Criteria for a segnificant reason)
    and becasue Ineed to pass varaible to open a report_
    in the same way user search_
    and Ican't catch bindings for the view criteria_
    my qusetions
    1-Is what i Did is the correct way I mean adding the binde varable visicaly to SQL tab In the EmployeesVO
    2- why is the error of ( attempt to define paramter not iexist in the where clause mainwhile the If Statment condition dosnot succesd)
    3- how to add bindig variable programaticly without adding it phisicaly in the EmployeesVo SQL

    Duplicate to about dynamic  where clause
    User, please don't post the same question multiple times in this forum.
    Timo

  • Dynamic selection field display

    Hi
    Can we display field values for a field from Dynamic selection ?

    Hi,
    Yes, you can display field values in dynamic selection field.
    If I understood your question correctly, you are talking about the dynamic selection used in reports ( For eg. ME2N). The field which are appearing in dynamic selection shows the field values. ( you can press F4 and check the field values).
    Rajesh.

  • Creating Dynamic select boxes

    Can we create dynamic select boxes which will change when the user selection changes. How many levels we can go about.
    For example
    we have one combo box named states--> depending upon the states selected the corresponding districts should be shown in the other combo box, and when the user selects a district it should show the corresponding villages or towns and further..
    Can we do it without ajax concept. if yes how?
    If we have to use ajax one level is easy how to go about two or three levels.
    Thanks in advance.

    Hi !
    ya it is possible to change values of Combobox depending on the value changed in another combobox.
    it is possible when you implement Model and by reference of that
    model you can change values of that combobox such as.
    model1.removeAllItems();
    model1.addItemAt(location); etc
    inspite of this if you need code help i will provide it to you.

Maybe you are looking for

  • Using null to replace values

    I'm a newbie! Can you tell me how can replace existing values in a variable. My plot in the program is to have the price of products in my right hand then transfer that to the cart and then to cashier lady. I have to make sure and know that when I tr

  • Stock issue at delivery level

    I have a fert having stockable product, MM post 100 tons to storage location. i have 10 sales order and among them i have created 5 outbond delivery of total qty 40tons. at schedule line level i have remove the availability check so now its check the

  • MacPro will not connect to TV

    I am running the latest softwarre 10.8.5 and my computer will not even recognize the television. I plug in the adapter my computer screen goes through he blue screen phase but not my tv. Once i go into System Preferences and Displays i dont see the o

  • How do I close off discusions in forums

    I am new to forums so please bare with me. I have asked a question and gratefully received a two replies from "Nancy," another member. I now want to close off all my discussions so that they do not appear in the "content" window pages so that the dat

  • How to create a view(Component Tree)?

    After I look at the source codes of the RestoreViewPhase.java and ViewHandler,I find that "createView" only to get an instance of the UIViewRoot class,and not add any children at all.So I want to know how JSF can get the component Tree from the "crea