Adding Screen Elements Dynamically

Hi!
<b>Is it possible to add screen elements at run time?</b>
I have tried doing
APPEND g_wa_screen TO screen
but it is not allowed.
Im trying to add new colums to my table control. I've already added columns in the cols sub-structure of my table control but nothing gets displayed. My hunch is that those fields arent defined in the screen structure.

Hello Emir,
You might struggle to do this with dialog screens.
A better alternative would be to use ALV Grid control. Using this, you could dynamically add columns etc. You can even include a grid control on a dialog screen using a custom control in the screen painter. Look at transaction SE83 for examples of ALV grid control and the documentation on class CL_GUI_ALV_GRID.
Cheers,
Martin

Similar Messages

  • Get screen elements dynamically

    Hi
    Can we get the screen elements like input box or check box
    dynamically in dialog programming?
    Thanks & Regards
    GVRao

    HI,
    ya this is possible in dialog programing.. what you can do is that define the screen elements and set there property as invisible.
    Then at runtime according to the requirement you can modify SCREEN structure to make that element visible again..
    Hope this will be usefull.. Reward Points!!!!!!!!!!

  • How to deal with dynamic selection screen elements when macros are used?

    Hello experts,
    This is regarding the dynamic selection screen elements. Actually the requirement is to modify the existing standard report program RFUMSV00 by copying it into a Z report, adding a few selection screen elements and new fields in the output. I actually did everything required except for the one thing that is going out of my reach.
    There are a certain fields which are coming when they are not supposed to get displayed. I don't understand the code because of its obsoleteness. Neither can I debug it because it is just data declaration.
    This is the code where there is a fault. If I copy the entire code into a new Z report, I'm getting new fields like Entry Date, Document Type, Reference Transaction,  Reference key, Logical system.
      DEFINE selection_screen_line.
      selection-screen: begin of line.
      parameters &3 like &4 default 'X' modif id mc4.
      selection-screen: comment (30) &1 for field &3 modif id mc4.
      selection-screen: comment pos_low(10) text-019
                        for field &2 modif id mc4.  "neu
      parameters &2 like rfums_alv-variante modif id mc4.
      selection-screen:
          position pos_high.
      selection-screen: pushbutton (15) text-028
                        user-command &5 modif id mc4.
      selection-screen end of line.
    END-OF-DEFINITION.
    Kindly, suggest me the right solution.

    In the program attributes ( SE38 > RFUMSV00 > GOTO > Properties ), you will find a logical database BRF declared. The include DBBRFSEL is part of the selection screen of this logical database.
    The selection screen is actually the selection screen of this logical database.
    Under the Logical Database field, there is a Selection screen field where you can input which selection screen of the logical database to be used.
    But, this is just to change the selection screen that is displayed. To completely suppress it you need to remove logical database declaration from the properties of the program and call it inside your program through function module.
    You cannot just remove it from the declaration because many of its variables are used in the program.
    So call it using function module as the first step in INITIALIZATION section of the program.
    The syntax and function module to call it in your program can be found in the following thread :
    How to hide the selection screen of a Logical datebase?
    Regards,
    Ashish

  • I recently added photoshop elements 12 to my computer but can't get past the initial log in screen. It goes gray and spins.  any thoughts?

    I recently added photoshop elements 12 to my computer but can't get past the initial log in screen. It goes gray and spins.  I have a current serial number and log in ID/password but still not working.  Any thoughts?

    Hello,
    I recommend you contact AT&T's dedicated BB Support staff (call their front line, request escalation to BB Support) and have them check to be sure that your account with them is correctly configured for this device. Sometimes when switching devices things don't fully automatically move behind the scenes, and only they (ATT) can validate that.
    Good luck and let us know!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • WD_BADI_DOMODIFYVIEW - dynamically set screen element as mandatory field

    Hi,
    I would like to use WD_BADI_DOMODIFYVIEW to dynamically set a standard screen element on my Webdynpro as a mandatory field. Does anyone know which method in which class that I can use to set the status from 'Normal field' to 'required' ?
    This is a for standard SRM webdynpro screen. Unfortunately I could not get the configuration to set the standard metadata field as a mandatory field.
    Also this standard field does not have an existing binding to a context element to manipulate the status of the field. Hence I need to find a method that can directly change the attribute of this standard screen element to mandatory. I do not want to modify the webdynpro to change the status of the field to 'required'.
    <promise removed by moderator>
    Thanks
    Liam
    Edited by: c958209 on Apr 28, 2011 1:32 PM
    Edited by: Thomas Zloch on Apr 28, 2011 4:58 PM

    Hi Kiran,
    I think I understand what you are suggesting now. The trouble is IF_V_SC_DOFC_I_LIMITEM (the view I'm trying to enhance) does not exist in the BAdI.
    When I go to the attributes of the View of the Webdynpro component that I'm trying to enhance I do see WD_THIS refto IF_V_SC_DOFC_I_LIMITEM.
    It's just that in the BAdI WD_BADI_DOMODIFYVIEW this WD_THIS is not available and trying to define it like below does not work.
        Make Product Category field mandatory
          lo_node = wd_context->get_child_node( co_item_data ).
          lo_value = lo_node->get_element( ).
        Get value of context element SH_CATEGORY_ID
          lo_value->get_attribute( EXPORTING name  = co_sh_category_id
                                   IMPORTING value = lv_sh_category_id ).
          IF lv_sh_category_id IS INITIAL.
            DATA: lo_message_manager TYPE REF TO if_wd_message_manager.
            DATA lo_api_controller     TYPE REF TO if_wd_controller.
            DATA wd_this TYPE REF TO  if_v_sc_dofc_i_limitem.           <================ This gives a syntax error "The type          IF_V_SC_DOFC_I_LIMITEM is unknown
            lo_api_controller ?= wd_this->wd_get_api( ).
            CALL METHOD lo_api_controller->get_message_manager
              RECEIVING
                message_manager = lo_message_manager.
          Report message
            CALL METHOD lo_message_manager->report_attribute_error_message
              EXPORTING
                message_text   = 'Please fill the Document Date'
                element        = lo_value
                attribute_name = 'SH_CATEGORY_ID'.
          ENDIF.

  • Adding a screen element in Module pool

    Hi Experts,
             How to add a screen element in module pool programming?
    Thanks,
    Sudha...........

    Hi sudha ,
    To add screen elements in you module pool programming ,
    i > Go the layout of the screen for which you want to have elements .
    ii> Drag and drop the available elements from the left hand side .
    iii> Be sure to have a name a name of the data elements that you have inserted .
    iv>Check any dataelement is't showing red in color as red color signifies error .
    v> Make sure to save and activate the layout.
    Hope this would be clear .
    Thanks
    Lokesh

  • How to add screen elements at run time on button click in Web Dynpro abap?

    Hello All,
    I have a requirement wherein the user wants to add the textbox dynamically at runtime on button click action. My questions is, Is it feasible to dynamically add screen elements at runtime? If yes, how?
    Please help.
    Thanks

    Hi Ajinkya,
    This is absolutely possible! Adding view elements at runtime is called "dynamic programming". There are a lot of good resources and tutorials on SCN if you do a search. To start you off, here is an excellent series by Thomas Szücs:
    Dynamic Programming in Web Dynpro ABAP - Introduction and Part I: Understanding UI Elements
    Dynamic Programming in Web Dynpro ABAP - Part II: Handling ViewElements
    Dynamic Programming in Web Dynpro ABAP - Part III: Aggregations and DDIC-Binding of ViewElements
    Another option that avoids dynamic programming is to create the view element at design time but bind its visible property to a context attribute of type WDUI_VISIBILITY. You could initially set its visibility to "none" until the user clicks the button, then you could change its visibility to "visible".
    Cheers,
    Amy

  • Issue with selection screen element on At slection scree

    Hi All,
    I am facing an issue with a checkbox which is present within the subscreen of a standard selection screen.
    The issue is that the value of the combobox get toggled by itselfon the event mentioned below. I am unable to find out how this combo box value gets changed by itself on the screen events.I tried clear statemetns etc nothing is helping. I debugged with a watch point on this screen element and found this to happen.It just changes the value of the element to a previously held state.I m trying to clear the combobox but this event puts back the tick mark.How can I stop this.
    AT SELECTION-SCREEN ON COL_FROM.  "COL_FROM is another screen element diffrent from the combobox
    Thanks

    Hi Vighneswaran CE,
    This event corresponds to the PAI module of the COL_FROM field. So, it gets executed each time you press any valid function code on the screen (unless there was an error in a previous field). Nothing abnormal here.
    That's difficult to help you on that topic, you'd better tell us exactly what report it is, where you have added your code (and what code) to change the checkbox, ...
    Best regards,
    Sandra

  • How to get selection screen elements and its table reference of a report ?

    halo experts
    How can I get selection screen elements and its table reference of a report ? . I tried rs_refresh_from_select_options. But I am unable to get the table and field it is referring to
    For eg if my selection screen 1000 is
    parameters: p_carrid type spfli-carrid,
    select-options :s-_connid type sflight-connid.
    is there any Fm or method which gives me what are the screen elements( p_carrid and s_connid ) and what table( splfi and sflight ) and field ( carrid and conid )it is referring to ?

    The following code is an example of how you might dynamically determine all your PARAMETERS and SELECT-OPTIONS variables at run time.  The PARAMETERS and SELECT-OPTIONS only point to a dictionary element--not a specific table.  Even though you may say "spfli-carrid" or "sflight-connid", the data type really references the dictionary type and not a specific table/structure.
    REPORT  ZTEST_PROG.
    TABLES sflight.
    DATA:
           screen_tab TYPE STANDARD TABLE OF screen,
           wa_screen TYPE screen,
           scrn_nm TYPE string,
           scrn_leftover TYPE string,
           l_type TYPE REF TO cl_abap_typedescr,
           typ_nm TYPE string,
           typ_pre TYPE string.
    FIELD-SYMBOLS <fs_data> TYPE ANY.
    PARAMETERS p_carrid TYPE spfli-carrid.
    SELECT-OPTIONS s_connid FOR sflight-connid.
    INITIALIZATION.
      LOOP AT SCREEN.
        IF screen-group3 = 'PAR'
          OR screen-group3 = 'LOW'.
            APPEND screen TO screen_tab.
        ENDIF.
      ENDLOOP.
    START-OF-SELECTION.
      LOOP AT screen_tab INTO wa_screen.
        ASSIGN (wa_screen-name) TO <fs_data>.
        l_type = cl_abap_typedescr=>describe_by_data( <fs_data> ).
        IF wa_screen-group3 = 'LOW'.
          SPLIT wa_screen-name AT '-' INTO scrn_nm scrn_leftover.
          TRANSLATE scrn_nm TO UPPER CASE.
        ELSE.
          scrn_nm = wa_screen-name.
        ENDIF.
        SPLIT l_type->absolute_name AT '=' INTO typ_pre typ_nm.
        WRITE:
                 / 'Screen Name:  ', scrn_nm,
                 / 'DDIC Type:    ', typ_nm.
      ENDLOOP.
    When you get into defining internal tables you can determine those at run time with cl_abap_structdescr.  The following is an example of how you might do that.  You can loop through the "components_table" and evaluate each field of the structure in this way.
    DATA: structure_reference TYPE REF TO cl_abap_structdescr,
          components_table TYPE abap_compdescr_tab,
          components_structure LIKE LINE OF components_table.
    structure_reference ?= cl_abap_structdescr=>describe_by_data( any_structure ).
    components_table = structure_reference->components.
    I don't know if this answers any of your questions but I hope that some of it is useful.

  • Module pool screen element not shown

    Hi,
    I have a module pool with table control.
    I have added a new field to the internal table and included it in layout-checked properties and it is active/shown in output and input enabled
    Also, when I checked in PBO debugging, loop at screen, when the screen element is this field, active/input/output = 1
    I have activated the program/generated it/logged off from system and logged in again (to take care of refreshing the screen)
    The internal table has values for this field.
    When I execute the screen directly instead of module pool program, field is shown in table control
    But when I execute the module pool program, this field and heading are not shown in table control but empty space allocated for this field is shown.
    May I know how can I resolve this.
    Thanks!

    Hi Vasu,
    Go through this [Sample|http://help.sap.com/saphelp_nw04/helpdata/EN/9f/dbac5e35c111d1829f0000e829fbfe/content.htm].
    Regards,
    Maruthi

  • ECATT - Cannot Find Screen Element RMMG1-MBRSH in Replay Mode

    I have an eCATT script that works fine on one PC but on another PC i get the following error messages. Cannot Find Screen Element RMMG1-MBRSH in Replay Mode. I have the following options: Reset Gui = X and i have added the rescon command after every 2 ref commands.
    Any Help will be appreciated

    Hi,
    >Reset Gui = X and i have added the rescon command after every 2 ref commands.
    Be aware that these 2 methods of reseting sapgui sessions will only help when handled with care.
    Reset Gui = X means "Restart transaction like a user does using /ntcode".
    RESCON does close the RFC session and automated SAP GUI sessions.
    Both executed in the middle of some sequential processing will brake your sequence by shutting your automated session.
    On the other hand, disappearance of screen fields can have multiple reasons:
    - screen field is disabled by customizing / for certain users / authority based
    - screen field is disabled for a particular business object key due to some special state of the business object
    - screen size/resolution differs between your 2 users/pcs
    You can execute the relevant script with some special start options on the pc where it fails:
    - "Error behavior  = X (Stop at error)"
    - "Close SAPGUI session = E (Do not close in case of errors)"
    Then the target system gui will stay for your further examination, e.g. whether there is some field RMMG1-MBRSH or in which state the whole transaction it is left.
    Best regards
    Jens

  • Change Screen Lables dynamically

    HI
      I want to change screen labels dynamically based on my sales area/Plant ... how can I achieve this task, what are steps I have to take to change the screen labels dynamically?
    Please give your input/suggestion.
    Thanks

    I wonder if you could use some of the SD user exits in Sales Order processing.
    MV45AOZZ is for custom PBO routines.
    MV45AIZZ is for custom PAI routines.
    They are meant for the screen user exits (Additional Data tabs at the header and item level).  They might get called for each screen.  Because they are the "older style" of user exits, you still need a access key.  However, SAP considers changes to these programs as enhancements, not modifications.
    Same applies for USEREXIT_FIELD_MODIFICATION in MV45AFZZ.  This is called for every screen in SD order processing.  With a CASE statement against SCREEN-NAME and a check for the dynpro number, you might be able to manipulate the label values.  If I had access to a system, I would check... but I don't right now.
    Many of the labels reference the labels for the data elements in the data dictionary, so these userexits may not be able to over ride the values.

  • How to change the screen element of a single field in a table control

    Hi Gurus,
    I want to change the screen element of a single field (or the whole row) in a table control according to a condition.
    I have 2 columns in the table control. One is an input column and one output only. When user enters values into the input column, they need to be compared against the values in the other column, and if there is a discrepancy, the row where the discrepancy is needs to be highlighted.
    I have tried the following code which highlights the whole column ...
    CONTROLS: TC_ZVOYG_BINS TYPE TABLEVIEW USING SCREEN 0500.
    DATA: wa_tc_zvoyg_col LIKE LINE OF TC_ZVOYG_BINS-cols.
      LOOP AT G_TC_ZVOYG_BINS_ITAB
               INTO G_TC_ZVOYG_BINS_WA.
        if G_TC_ZVOYG_BINS_WA-zdelivery_bin ne G_TC_ZVOYG_BINS_WA-zactual_bin.
          loop at screen.
            IF screen-name = 'ZVOYG_BINS-ZACTUAL_BIN'.
              wa_tc_zvoyg_col-screen-intensified = 1.
              MODIFY tc_zvoyg_bins-cols FROM wa_tc_zvoyg_col TRANSPORTING
              screen-intensified WHERE screen-name = screen-name.
            endif.
          endloop.
        endif.
      endloop.
    And also the following code which makes no change ...
      LOOP AT G_TC_ZVOYG_BINS_ITAB
               INTO G_TC_ZVOYG_BINS_WA.
        if G_TC_ZVOYG_BINS_WA-zdelivery_bin ne G_TC_ZVOYG_BINS_WA-zactual_bin.
          loop at screen.
            IF screen-name = 'ZVOYG_BINS-ZACTUAL_BIN'.
              screen-intensified = '1'.
              modify screen.
            endif.
          endloop.
        endif.
      endloop.
    Thanks in advance.

    Hi,
    The modification of a screen element attribute (LOOP AT SCREEN...MODIFY SCREEN) must always be done in the PBO (for a dynpro, it will be in a PBO module, i.e. declared by MODULE ... OUTPUT)
    About the loop at the internal table, it is done automatically by the system, also during the PBO, you'll find something like LOOP [AT itab] ... WITH CONTROL ...  in the PBO part of the screen flow logic (note: you may have to complete with a supplementary READ TABLE if you don't use AT itab). So you don't need an additional loop.
    Best regards
    Sandra

  • Hiding an UI element dynamically in webdynpro ABAP

    Hi Gurus,
      I want to hide a Interactive form UI element dynamically at run time. Please let us know how to proceed with this and provide the code for this, which will be helpful.
    Thanks
    Rahul

    hi ,
    bind the VISIBLE property of the UI element with  a context attribute created in the CONTEXT tab. This context attribute should be of type WDUI_VISIBILITY
    u can refer this code
    wd_context->set_attribute( name = '<attribute name>' value = if_wdl_core=>visibility_visible )." to make it visible.
    wd_context->set_attribute( name = '<attribute name>' value = if_wdl_core=>visibility_none ). "to make it invisible
    regards,
    Amit

  • Adding cost element to a particular hierarchy in RSH1 leads to shortdump.

    Hi,
    I'm facing some issue in production for TCode-RSH1.
    Adding cost element to a particular hierarchy in RSH1 leads to shortdump. (Assign_Type_Illegal_Cast). This problem is causing for some hierarchies only. 
    Steps followed by us for adding cost element:-
    1) RSH1-select hierarchy name.
    2) In change mode, select a paticular node, click on cost element.
    3) Select any of the cost element & click the green button (tick)
    When we are following the above steps, it is leading to short dump and giving the following error message:-
    Assign_Type_Illegal_Cast.
    This issue is causing for some hierarchies & not for all.
    Request to suggest the solution..
    Regards,
    SDN User.

    Hi Venkat,
    That particular hierarchy is not having multiple nodes. Only one node named Rate & efficiency. and the user needs to add cost element to that node. Now how come your ans match here in this case.
    Now is that you are telling that one cost element which is selected is there for that node in some other hierarchy?But it is a different hierarchy , so if it is then it would be a problem?
    Or else I have one more doubt....
    Is that the user might be having some authorization problem for that particular hierarchy or the info object or cube where the hierarchy is? Because he is saying that he is having this problem for some few only not all hierarchies. So its understandable that RSH1 authorization to edit and create he has.

Maybe you are looking for

  • Screen colours inverted, also flickers back to normal

    Model: HP15-N096EA When the laptop is turned on the screen colurs are inverted i.e. blue becomes orange, white becomes black etc. at times it flickers back to normal colours i.e blue shows as blue etc. I have checked magnifers invert colours isn't tu

  • Patches on Oracle 10.2 for 10.2.0.4

    Hi I have to upgrade oracle from 9.2.0.7 to 10.2.0.4. I have downloaded 5 CD for Oracle 10.2 with name Ex: 51031678_*. I have also downloaded client with which is:OCL10232 I also need to apply patches to put oracle to 10.2.0.4. I had put the forum fo

  • Copying to the clipboard is disabled. How can I fix this?

    WHen I am inside any application in Firefox (oe Google Apps, etc.) ANY application, I receive the following message when trying to use Edit, Copy Your browser does not allow access to your computer's clipboard. Instead, please use Ctrl-C for Copy, Ct

  • Cannot display chinese texts in info package

    How to solve that replaced chinese texts as ###### in infopackage appreciate for help

  • Scripting problems

    okay so i'm very new to coding, and i know i have debauched the coding, because i failed to figure out how to list diffrent properties, of a the div. all i wanted was for it to have demensions of height1000/ width583, centered with a 4px boarder with