Dynamic screen and custom control

Hi,
I have to create a screen and custom control dynamically within a method and display alv grid. Is this possible?
regards,
Madhu

hi,
this is a smple program just try in this way.plz do reward points if it is of some use
data:obj type ref to zcl_test_alv.
parameter:p_mblnr type zbshd-mblnr.
start-of-selection.
set screen 100.
*&      Module  STATUS_0100  OUTPUT
      text
module STATUS_0100 output.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
if obj is initial.
create object obj
exporting p_con = 'MATERIAL_DOC'.
endif.
CALL METHOD obj->get_data
    exporting p_mat = p_mblnr.
endmodule.                 " STATUS_0100  OUTPUT
The above is an executable program.
zcl_test_alv is a class which u need to create in se24 according to ur requirement
u need to define methods and attributes.
for example there are 3 methods
constructor
get_data
put_data
method GET_DATA.
SELECT mblnr
         mblpo
         matnr
         maktx
         meins
         menge
         waers
         dmbtr
         INTO corresponding fields of TABLE it_mm
         FROM  zbsit
         WHERE mblnr = p_mat.
if sy-subrc = 0.
call method put_data.
endif.
endmethod.
method PUT_DATA.
DATA : it_fldcat TYPE lvc_t_fcat.
  DATA : wa_fldcat LIKE LINE OF it_fldcat.
  DATA : it_sort TYPE lvc_t_sort,
         wa_sort LIKE LINE OF it_sort.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
  I_BUFFER_ACTIVE              =
   I_STRUCTURE_NAME             = 'ZBMDC'
  I_CLIENT_NEVER_DISPLAY       = 'X'
  I_BYPASSING_BUFFER           =
  I_INTERNAL_TABNAME           = 'ZBSIT'
  CHANGING
    ct_fieldcat                  = it_fldcat[]
EXCEPTIONS
  INCONSISTENT_INTERFACE       = 1
  PROGRAM_ERROR                = 2
  OTHERS                       = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  EXIT.
  ELSE.
    LOOP AT it_fldcat INTO wa_fldcat.
      CASE wa_fldcat-fieldname.
        WHEN 'MBLNR'.
          wa_fldcat-reptext   = 'Material Doc no'.
        WHEN 'MBLPO'.
          wa_fldcat-reptext   = 'Item Material Doc'.
          wa_fldcat-ref_table = 'X'.
        WHEN 'MATNR'.
          wa_fldcat-reptext   = 'Material No'.
          wa_fldcat-ref_table = 'X'.
        WHEN 'MAKTX'.
          wa_fldcat-reptext   = 'Description'.
          wa_fldcat-do_sum    = 'X'.
        WHEN 'MEINS'.
          wa_fldcat-reptext   = 'UOM'.
          wa_fldcat-do_sum    = 'X'.
        WHEN 'MENGE'.
          wa_fldcat-reptext   = 'QUAN'.
          wa_fldcat-do_sum    = 'X'.
        WHEN 'WAERS'.
          wa_fldcat-reptext   = 'CurrKey'.
          wa_fldcat-do_sum    = 'X'.
        WHEN 'DMBTR'.
          wa_fldcat-reptext   = 'curr'.
          wa_fldcat-do_sum    = 'X'.
      ENDCASE.
      MODIFY it_fldcat FROM wa_fldcat INDEX sy-tabix.
    ENDLOOP.
    wa_sort-fieldname = 'MBLNR'.
    wa_sort-up        = 'X'.
    wa_sort-subtot    = 'X'.
    APPEND wa_sort TO it_sort.
ENDIF.
CALL METHOD o_grid->set_table_for_first_display
EXPORTING
   i_buffer_active               =
   i_bypassing_buffer            =
   i_consistency_check           =
   i_structure_name              =
   is_variant                    =
   i_save                        =
   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                     = it_mm[]
    it_fieldcatalog               = it_fldcat[]
    it_sort                       = it_sort
   it_filter                     =
EXCEPTIONS
   invalid_parameter_combination = 1
   program_error                 = 2
   too_many_lines                = 3
   others                        = 4
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.
method CONSTRUCTOR.
CREATE OBJECT o_con
    EXPORTING
       container_name      = p_con .
  IF sy-subrc = 0.
    CREATE OBJECT o_grid
      EXPORTING
         i_parent          = o_con .
  ENDIF.
endmethod.
Attributes are
o_con type ref to CL_GUI_CUSTOM_CONTAINER
o_grid type ref to CL_GUI_ALV_GRID
it_mm type zmdoc
to get alv grid ,in layout editor u need to create custom control
for constructor method u should have a parameter p_con with default value as 'MATERIAL_DOC'
Im just explaining the above program use this as reference and try.

Similar Messages

  • LabVIEW and custom controls

    Hi all,
    I'm an italian PhD student working with Polytechnic of Bari.
    I'd like to submit to this forum a question about LabVIEW and custom controls in form of ActiveX components.
    Some introductory word about my problem will be helpful: in the past few months here at Polytechnic of Bari my colleagues and I developed some useful ActiveX controls with custom functionalities to use in LabVIEW.
    For example we developed a "contraves", an
    "endless knob" and a useful counter with a scale very similar to that of standard gazometers or energy counters.
    However we are experimenting some difficulties with the integration of these controls in LabVIEW; the controls are correctly imported in our VIs with using the ActiveX Container but...
    in the block diagram they appear as ActiveX references and we must use property nodes to access even their most useful property (value).
    Please, do someone of you know if (and eventually how) is it possible to integrate more deeply the controls in the LabVIEW environment?
    Do someone of you know if it exist an hypothetical "Custom Controls SDK" for LabVIEW more advanced of that integrated in LabVIEW 6.0?
    Any hint would be appreciated.

    > Please can you specify in more detail how I can obtain the ActiveX
    > refnum input automatically wired to a constant (I have observed this
    > behaviour with the 3D-Graph control as you suggested). I haven't found
    > any reference in the LabVIEW on-line help about the topic "merge-VI".
    >
    The first step is to build a VI that contains the panel and diagram
    elements that you want to drop all at once. In your case, drop the
    ActiveX control at a good size, and on the diagram, you can wire it to
    helper VIs, property nodes, etc. The VI's icon and name are important
    as that is what will show up in the palette menu representing your
    control. The connector pane isn't used.
    With the VI constructed, you want to add it to the palette menu. In the
    Tools menu, Advanced, there is an item about half way down for
    Customizing the Palette menu. You will need to build a New Palette Set
    using the ring and name it whatever you like. You can now add your VI
    wherever you like. Most likely you will want to right click to add a
    new subMenu in the Controls palette and place it in a new .mnu file. In
    the subMenu, right click to add Control. The file dialog will open
    allowing you to select a control file to add to the palette. By
    changing the filter from .ctl to all, you can insert VIs into the
    controls palette.
    All VIs inserted into the Control palette will act as merge VIs, meaning
    that when dragged to a panel, the panel elements will be merged into the
    destination panel, and the diagram elements will be merged into the
    destination diagram.
    For others that want to have these on the Functions palette rather than
    the Controls, you add the VI to the Functions palette, then popup on the
    palette item and check the menu item to make it a Merge VI.
    When it comes time to distribute, you will want to give out your .mnu
    file and the VI of course. Easiest is to place both of them in
    user.lib. If you want the items to go at the top level of the palettes,
    then you can add them to add-ons inside of vi.lib, but this causes more
    upgrade challenges.
    Hope that helps.
    Greg McKaskle

  • Dynamic tabstrips and table control in custom infotype

    Dear Experts,
    I have a requirement to create a custom infotype using tabstrips and table control. The tabstripes should also be dynamically populated. For example we have infty 8(Basic pay) used table control and 24(Qualifications) for tabstripes.
    Could you please tell me how to do this. Please do the needful ASAP.
    Thanks,
    Chaitanya.
    Moderator message - Please don't just post your requirements and ask the forum to do your work for you...especially ASAP - Thread locked
    Edited by: Rob Burbank on Oct 7, 2009 4:16 PM

    Hi Partha,
    Pls check the threads:
    Best way to store a table control into an infotype
    Re: Custom Infotype with table control - Overview/List  Screen
    Dilek

  • Calling dialog program screen in custom control and using drag n drop

    Hi Experts,
    SCENARIO:
    I have a custom container control. I want to insert a dialog program screen in custom container control in one half and tree nodes in the other half.
    Now my dialog screen has a table control. I want that the user can drag n drop the nodes in the cells of my table control.
    Please help.

    I don't think drag n drop works in table control. You may need to change table control to ALV grid control.

  • Dynamic Screen in Table Control

    Hello Guys,
    I have a problem on screen dynpro. In the screen, i have a table control and i set all the field can be input.
    But i have 2 t-code where 1 of the t-code can edited the data and another one only display.
    So in screen status, i insert this code.
      IF sy-tcode = 'ZDLKWPP3'.
        LOOP AT SCREEN.
          IF screen-group1 = 'ZKP'.
            screen-input = 0.
            screen-output = 1.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
    ENDIF.
    but when i execute, the screen still can be input. can anyone help me please...!!!!

    That coding i put it in "MODULE STATUS 0300." Those are the coding for the screen and the module status.
    *************--code for the screen----******************
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0300.
    *&spwizard: pbo flow logic for tablecontrol 'TBL_KWPP'
      module TBL_KWPP_init.
    *&spwizard: module TBL_KWPP_change_tc_attr.
    *&spwizard: module TBL_KWPP_change_col_attr.
    module TBL_KWPP_change_tc_attr.
      loop at   g_TBL_KWPP_itab
           into g_TBL_KWPP_wa
           with control TBL_KWPP
           cursor TBL_KWPP-current_line.
    *&spwizard:   module TBL_KWPP_change_field_attr
        module TBL_KWPP_move.
        module TBL_KWPP_get_lines.
      endloop.
    module cal_sum2.
    PROCESS AFTER INPUT.
    MODULE returnexit AT EXIT-COMMAND.
    *&spwizard: pai flow logic for tablecontrol 'TBL_KWPP'
      loop at g_TBL_KWPP_itab.
        chain.
          field ZLMDL015A-ZRUMJEN.
          field ZLMDL015A-ZRUMFAED.
          field ZLMDL015A-ZRUMULA.
          field ZLMDL015A-ZRUMAKH.
          field ZLMDL015A-ZRUMAMB.
          field ZLMDL015A-ZRUMTERIMA.
          field ZLMDL015A-ZRUMBAYARAN.
          field ZLMDL015A-ZRUMAMNOM.
          field G_TBL_KWPP_WA-FLAG
               MODULE tab_vot_mark1 ON REQUEST.
          MODULE TBL_KWPP_modify ON CHAIN-REQUEST.
        endchain.
      endloop.
      module TBL_KWPP_user_command.
    *&spwizard: module TBL_KWPP_change_tc_attr.
    *&spwizard: module TBL_KWPP_change_col_attr.
    MODULE USER_COMMAND_0300.
    *******---code for the module status---**********
    MODULE STATUS_0300 OUTPUT.
      SET PF-STATUS '0300'.
    *  SET TITLEBAR 'TITLE3' WITH 'Wujud/Kemaskini'.
    *  zlmfl030-zlmtkhlaras = w_ztksej.
      perform set_tarikh.
    *  perform find_data.
      IF sy-tcode = 'ZDLKWPP1'.
        SET TITLEBAR 'TITLE' WITH 'Wujud/Kemaskini'.
        SET PF-STATUS '0300'.
      ELSE.
        SET TITLEBAR 'TITLE' WITH 'Papar'.
        SET PF-STATUS '0300' EXCLUDING 'SAVE'.
    endif.
      IF sy-tcode = 'ZDLKWPP3'.
        LOOP AT SCREEN.
          IF screen-group1 CS 'ZKP'.
            screen-input = 0.
            screen-output = 1.
            MODIFY SCREEN.
            CLEAR SCREEN.
          ENDIF.
        ENDLOOP.
    ENDIF.
    ENDMODULE.                 " STATUS_0300  OUTPUT
    and as you can see i try ashavind code, it still not working.

  • PCI-6542 card for dynamic genration and static control

    Hello
    I am using only one PCI -6542 card. I want to use few channels for dynamic signal. These are control signals for the ADC. While the conversion is in progress I want to use remaining signals for switching relays for measurement.
    Application requirements are as follows.
    Channel 0-14 are for dynamic genration for giving control signal to ADC.
    Channel 15-31 are for static control bits for relays.
    Requirement is pattern should be running continiously and parallely I shoud able to switch the ralay. It can be in any order and any seqence as per the demand.
    Thanks and Reards
    Amol

    Hello
    I can able to solve this problem. For your referance I have attached here the code. Which works for this.
    Thanks and Regards
    Amol
    Attachments:
    application.vi ‏65 KB

  • JSF dynamic include and custom tag

    Anybody has experience to enclude custom tags between <f:verbatim> </f:verbatim> ? The custom code embeded this tags won't work, my code as below:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <%-- jsf:pagecode language="java" location="/JavaSource/pagecode/jsp/Server_request.java" --%><%-- /jsf:pagecode --%>
    <%@taglib uri="http://www.ibm.com/jsf/html_extended" prefix="hx"%>
    <%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    <%@taglib uri="/WEB-INF/mytaglib.tld" prefix="first" %>
    <HTML>
    <HEAD>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
         pageEncoding="ISO-8859-1"%>
    <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <META name="GENERATOR" content="IBM Software Development Platform">
    <META http-equiv="Content-Style-Type" content="text/css">
    <LINK href="../theme/Master.css" rel="stylesheet"
         type="text/css">
    <TITLE>server_request.jsp</TITLE>
    <LINK rel="stylesheet" type="text/css" href="../theme/stylesheet.css"
         title="Style">
    </HEAD>
    <f:view>
         <BODY><hx:scriptCollector id="scriptCollector1">
         <P><hx:outputLinkEx styleClass="outputLinkEx" value="header"
                   id="linkEx1">
                   <h:outputText id="text1" styleClass="outputText" value="Header"></h:outputText>
              </hx:outputLinkEx><BR></P>
    <jsp:include page="server_req.jsp"/>
              <hx:outputLinkEx styleClass="outputLinkEx" value="Footer" id="linkEx2">
                   <h:outputText id="text2" styleClass="outputText" value="Footer"></h:outputText>
              </hx:outputLinkEx>
         </hx:scriptCollector></BODY>
    </f:view>
    </HTML>
    <%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@taglib uri="/WEB-INF/mytaglib.tld" prefix="first"%>
    <f:subview id="server_req">
    <f:verbatim>
    <first:hello/>
    </f:verbatim>
    </f:subview>

    I don't know if there is a solution to the problem you are having with JSP 1.1. If you look in the spec, it actually warns you that dynamic includes can not be done inside a body tag. The spec actually states that the included code shout write directly to the response and not to the BodyContent.
    I was excited to find out they had fixed this in JSP 1.2, but they seem to have foiled me again. If my tag calls PageContext.include(), the spec says that include must call the flush method, which causes BodyContent to throw an exception since flush is not a valid call.

  • Dynamic scales and custom gauges

    Hi,
    I have some simple code for a gauge I need that changes the Min & Max Scales based on the current input value.  For example, my Min/Max is 0 to 180, but when my input exceeds a value of 70, I want my Min/Max to be 60 to 180.  However, I want to use a custom gauge (pictures) so I need the picture of my gauge to flip from one showing 0/180 Min/Max to one showing 60/180 Min/Max.  I am not sure how to do that.  Any ideas?  Thanks in advance.
    Solved!
    Go to Solution.

    My initial suggestion would be to make the gauge housing transparent and put it on top of a picture ring control.  Use the picture ring to toggle the picture and use the gauge to give you the needle/scale/etc.
    If you need to reuse it and want to keep the block diagram clean then this might be a good time to wrap it up as an XControl.
    ~Simon

  • Mac Users: How can I watch YouTube again on Firefox, when for months all I get is a black screen and no controls?

    Beyond frustrated here. I can watch YouTube on Safari (I have a MacBook Pro laptop, OS 10.6.8), but I use Firefox, for everything else, so really need YouTube access on Firefox. I have googled the problem a zillion times and find solutions that do not work.
    Today in several places, including here at Firefox, the instruction is to uncheck the "Enable Hardware Acceleration" box which is found when you right-click (two-finger click on my trackpad) on the black YouTube screen. Then click on Settings, which brings up a display box. In the display box I'm supposed to be able to uncheck the hardware acceleration. And I see it there in front of me.
    But it's dead to my trackpad! The Enable Hardware Acceleration will not uncheck when I click on its tiny box. It's supposed to be active, but nothing I do in that display box works--even the close button. I've refreshed the page, tried clicking the icons on it, nothing works.
    Can you imagine no YouTube for months? It's driving me crazy. PLEASE help, I will be so grateful!
    Thanks~~

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    Try to disable the hardware acceleration in the Flash Player.
    See:
    * https://support.mozilla.com/kb/Cannot+view+full+screen+Flash+videos
    * http://www.youtube.com/swf_test.html (right-click the player: Settings)
    Flash "Display settings" window:
    * http://www.macromedia.com/support/documentation/en/flashplayer/help/help01.html

  • Customer Control in screen painter in Module pool - work like container?

    Customer Control option in screen painter in Module pool - work like container?
    is it true? How?
    Is like any work area or what?
    what is the excat use of that option?
    regards.

    Hello,
    In screen painter ,custom control is used to define the control area on the screen.Just click on that and make your own container area.When you create an ALV grid or TEXT EDITOR or any other control,it will get attached to the screen in that area through the custom container.
    Name the container area as say '<b>CONTAINER</b>'.(in capitals.)
    When you actually create the custom conatiner programatically,you should give the container area name.ie.
    Data : cont type ref to cl_gui_custom_container.
    Create object cont
    exporting
    parent = '<b>CONTAINER</b>'.
    Now,this container that you created-cont is attached to the screen in the area defined by CONTAINER.
    Regards,
    Beejal
    **Reward if this helps

  • CAT2- Customer Funtion button on inital screen and Detail entry

    Hi all,
    I have enhanced the project for CAT2 tcode by CATS0011 enhancement in Dev system and moved to Qualifty system.
    In this case I see Customer Function button 3, 4 and 5 on details entry Screen and Customer Function 6 and 7 on the initial screen (CAT2)
    Again I revert enhancement CATS0011 and now I cannto see the Customer Function 3 to 7 in Dev system, but can seein Quality syste.
    Already try with multiple transports from Dev to Quality, but doesn't work in Quality but works in Dev system.
    Please let me know how it can be done.
    Regards,
    Prasad

    Hello Prasad,
    Please check your transport is done correctly, Sometimes objects have not been transported correctly, So objects would be missing in the target system. Also you can check correct version is generated in the target system.
    Best Regards,
    Deepak..

  • How to use custom control.

    hi all,
        how to use custom controls in screen painter.
    can i add image to my screen  using custom control.
    is there any other way to display image on screen.
    give me some notes about custom control.
    and sample programs to display image and also the use of custom control.
    regards,
    bhaskar.

    hi vinod,
    u can use the class <b>cl_gui_picture</b> to work around with pictures on the screen
    just define a custom control on the screen
    create an object of custom container.
    create another object of cl_gui_picture giving container name as the parent name...
    u can check out the class using the transn se24....
    pls post if additional info is required...
    Regards,
    Vs

  • Creating Custom Control on screen dynamically

    Hi All,
    Is it possible to create custom controls dynamically through ABAP code.
    If not, can we change the size of custom control at run time through ABAP code.
    Thanks
    Satya Priya

    Hi,
    Please ellaborate your Query...
    if ur taking abt Custom Control in Reporting , Module Pool than it is possible using Events.
    Affable
    Arbind

  • Custom Control Screen not able to record

    Hi,
    I have a Custom Control Screen in PA30, I call this using FM : " RH_EDITOR_SET " to display text on it.
    My Question is during recording(SHDB) I am not able to get the customer Control screen, is any way to capture the customer Control.
    Prabhu Rajesh.

    Hi Prabhu
    I never tried customer container in infotypes. but in some of the other standard transactions i recorded customer container like text view.and it was working fine.
    which custome control u r using .
    Regards
    Naresh

  • Dynamic Logon Screen and Dashboards

    Is there a way to dynamically display a different style on the logon screen and dashboards based on a condition in the warehouse? For example, if our load is running long, can we change the logon screen to display a graphic and text that states the load is not complete. Apply the same wording to the dashboards.
    What is the best practice employed for notifying users that BI is ready or not ready for use?
    Thanks!
    Eric

    Ahhh... 11g ;) I would say a little bit hard the way I was mentioning.
    Since 11g uses .html page (FMW\Oracle_BI1\bifoundation\web\msgdb\pages\common\signin.html) unlike 10g. in 10g its .jsp/.asp page!
    If possible can try this during user login try to validate the table column W_ETL_RUN_S.STATUS with current date using init block, if the status is not quals to completed then try to set a custom group/role and and land him with a new dashboard based on assigned role with load status, if the status is completed then use wont fall under your custom group/role.

Maybe you are looking for

  • File transfers in Time Capsule!!!

    Hi, I'm looking at purchasing a TC 2TB as my old 250g Seagate is full.  Can I transfer movie, photo, music files etc that are on my Seagate to the TC and also can I use the TC or part of it to use as my Time Machine back up?  Also if the answer is ye

  • Change color for highlight words

    I'm using the highlight words column attribute for a report with a search parameter. I was wondering if there is a way to change the color of the text that is highlighted? The html that is generated wraps the highlighted word with <span style="font-w

  • Safari-alert keeps popping on iphone5s...how to remove this?

    hi everyone! i have an iphone 5s with upgraded ios to 8.1...i was using safari to  search for movies when this popup came and continuously block my screen and asked me to call a number....it was showing safari-alert suspiciou activity mighthave been

  • Problem With Site Access

    Hi guys, I've been trying to access the Market Place as well as my account at: www.renderosity.com, but when I click to the Market Place on the link I get the message below (included also is my correspondence with the site's admin). I can access the

  • Have an IMac. Have many Kodak pictures with the ,fpx extension. Not supported on my Mac. How do I get fpx drivers?

    Have many kodak pictures with .fpx extension. howdo I get a driver for these?