Changing Custom Control / ALV size in program

Hello,
Everytime I need a screen with more than 1 ALV, I do as follows:
1 - I define one custom container for each ALV;
2 - In my program, I create one object of class CL_GUI_CUSTOM_CONTAINER for each ALV;
3 - For each ALV, I create one object of class CL_GUI_ALV_GRID. For each of these objects, I assign one of the parents created in 2;
So far so good - with this technique I can easily have multiple ALV screens, make ALV's dependent on each other, etc.
My problem is as follows:
- I need to change the screen appearence in my program (typically size and position of the ALV's);
- I tried to use the methods of class CL_GUI_CUSTOM_CONTAINER that seem to be appropriate (SET_HEIGHT, SET_LEFT, etc), but nothing seems to happen:
Example:
CALL METHOD gr_ccontainer1->set_height EXPORTING height = 200.
I would appreciate any help,
Regards,
Joao

Hi Sandra,
Thank you for the tip about the poins, I'll try to correct that, if it is still possible. About the question, I confess that I didn't test the solution with the splitter. Nevertheless, I decided to close the question - I believe that following the tips I'll get somewhere:-)
In fact, trying to resize the ALVs was just a first step towards the final result that I want: to resize the objects in a (ABAP) screen according to the screen resolution. Because time is short I decided not to continue for now, and I used my normal approach:
- Defining a screen for the worst resolution in the project;
- Designing custom containers (that now I know cannot change in size in runtime);
- Attacching my ALVs to these custom containers;
Regards,
Joã

Similar Messages

  • IN CUSTOMER CONTROL- ALV GRID ,

    IN CUSTOMER CONTROL -ALV GRID,
    It is possible to have both the hotspot and f4 help.I WANT TO USE BOTH OF THEM AT A TIME. PLZ GIVE ME SOLUTION.
    THANKS,
    RANI.

    hey rani,
    ya it is possible just define f4 help and hotspot independently in program itself, in program define search help for which field you want to make searh help and also provide hotspot condition with that field itself ok, if it is helpfull reward.

  • Custom control alv

    Dear friends ,
    I want to make 'HYPERLINK' action in custom control alv , in my alv one icon is there , when ever I click into that icon ,action will generate in PAI , m nt able to generate this action . please help me out .
    Thanks ,
    Joy .

    Hi,
    Go trough the [LINK|http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=55249] which has sample example for hyperlink in ALV custom contianer.
    Regards,
    Shanmugavel Chandrasekaran

  • How to save Custom control records module pool program ?

    Hi guru ,
    1. How to save Custom control records module pool program ?
    I wrote multiple lines of record in custom control
    Who to save that records ?
    thanking you.
    Regards,
    Subash.

    Hi Subasha,
    Please check the format below since it is based on a working code
    **************data declarations
    TYPES: BEGIN OF TY_EDITOR,
    EDIT(254) TYPE C,
    END OF TY_EDITOR.
    data: int_line type table of tline with header line.
    data: gw_thead like thead.
    data: int_table type standard table of ty_editor.
    You should create a text for uniquely identifying the text you are saving each time so that it doesn't get overwritten
    For this a key combination must be decidedd to uniquely identify the test..here it is loc_nam
    ****************fill header..from SO10( t-code )
    GW_THEAD-TDNAME = loc_nam. " unique key for the text
    GW_THEAD-TDID = 'ST'. " Text ID
    GW_THEAD-TDSPRAS = SY-LANGU.
    GW_THEAD-TDOBJECT = 'ZXXX'. "name of the text object created
    *Read Container and get data to int_table
    CALL METHOD EDITOR ->GET_TEXT_AS_R3TABLE
    IMPORTING
    TABLE = int_table
    EXCEPTIONS
    ERROR_DP = 1
    ERROR_CNTL_CALL_METHOD = 2
    ERROR_DP_CREATE = 3
    POTENTIAL_DATA_LOSS = 4
    others = 5.
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    loop data from int_table and save to int_line-tdline appending it.
    *save the text
    CALL FUNCTION 'SAVE_TEXT'
    EXPORTING
    HEADER = GW_THEAD
    TABLES
    LINES = InT_LINE
    EXCEPTIONS
    ID = 1
    LANGUAGE = 2
    NAME = 3
    OBJECT = 4
    OTHERS = 5.
    IF SY-SUBRC 0.
    ENDIF.
    The code shown above is ok and working fine for save also,hope that the above sample with helps you solve the problem
    Please check and revert,
    Reward if helpful
    Regards
    Byju

  • HOW CAN WE USE ALV-CUSTOM CONTROL

    Dear Friends,
    How can we use the custom control ALV.please provide the sample PPT or material to learn the container ALV.
    Thanks &Regards,
    Rajkumar.A

    SAP released document on ALV custom control. Pretty cool stuff..
    http://www.saphelpbykevin.com/saphelpbykevin/modules.php?name=Downloads&d_op=getit&lid=10#dl
    Edited by: Kevin Nguyen-Tu on May 14, 2008 7:44 PM

  • BDC on transaction CV02N handling the Custom Control

    Hi Guru's,
           I am developing a BDC program for the transaction CV02N. This transaction is for Changing the document link. Here I need to delete the existing Document links and create the new ones.
         I am facing the issue for Deleting the document links. The custom control has the links for each document. I need to select each document link in the custom control then delete it. But  the BDC recording is not showing this selection of document links in the custom control, If I write the program using the recording, it is stopping me at the time of pressing the delete button, and giving the message make the selection.
    I dont know how to handle this custom control's in BDC program. Please help me.
    Thanks
    Ravi.

    Use the [search tool for CV02NBDC|http://www.sdn.sap.com/irj/scn/advancedsearch?query=cv02nBDC] and then [for CV02NBAPI|http://www.sdn.sap.com/irj/scn/advancedsearch?query=cv02nBAPI] (look for BAPI_DOCUMENT*)
    Basically, transaction ending with "N" are Enjoy, and not fully suitable for BDC, so look for BAPI, or sometimes for older version of the transaction, without the trailing "N" (til they become obsolete)
    Regards,
    Raymond

  • Changing default control values in LV application?

    Can anyone help me?
    Is it possible to change default control values in LV program
    programmatically?
    Sergey Yakovlev, Berlin,
    [email protected]

    Its quite complex (in my opinion) to do so programically , but using a set of invoke nodes, you can get it done ('Make this value default'). Look at the attached for info (its a large link name, so you may have to copy and paste in your browser).
    http://zone.ni.com/devzone/devzoneweb.nsf/opendoc?openagent&2C14132F826F839F8625683A000B0B99&cat=DB5863CD70417B07862567930070A058
    I've been simply using config.txt files of read and write to set values.

  • How to save Custom control records ?

    Hi guru ,
    1. How to save Custom control records module pool program ?
    I wrote multiple lines of record in custom control
    Who to save that records ?
    thanking you.
    Regards,
    Subash.

    REPORT  ZCUSTOMC.
    CLASS event_handler DEFINITION.
      PUBLIC SECTION.
        METHODS: handle_f1 FOR EVENT f1 OF cl_gui_textedit
                 IMPORTING sender,
                 handle_f4 FOR EVENT f4 OF cl_gui_textedit
                 IMPORTING sender.
    ENDCLASS.
    DATA: ok_code LIKE sy-ucomm,
          save_ok LIKE sy-ucomm.
    DATA: init,
          container TYPE REF TO cl_gui_custom_container,
          editor    TYPE REF TO cl_gui_textedit.
    DATA: event_tab TYPE cntl_simple_events,
          event     TYPE cntl_simple_event.
    DATA: line(256) TYPE c,
          text_tab LIKE STANDARD TABLE OF line,
          field LIKE line.
    DATA handle TYPE REF TO event_handler.
    START-OF-SELECTION.
      line = 'First line in TextEditControl'.
      APPEND line TO text_tab.
      line = '----
      APPEND line TO text_tab.
      line = '...'.
      APPEND line TO text_tab.
      CALL SCREEN 100.
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
      IF init is initial.
        init = 'X'.
        CREATE OBJECT: container EXPORTING container_name = 'TEXTEDIT',
                       editor    EXPORTING parent = container,
                       handle.
        event-eventid = cl_gui_textedit=>event_f1.
        event-appl_event = ' '.                     "system event
        APPEND event TO event_tab.
        event-eventid = cl_gui_textedit=>event_f4.
        event-appl_event = 'X'.                     "application event
        APPEND event TO event_tab.
        CALL METHOD: editor->set_registered_events
                     EXPORTING events = event_tab.
        SET HANDLER handle->handle_f1
                    handle->handle_f4 FOR editor.
      ENDIF.
      CALL METHOD editor->set_text_as_stream EXPORTING text = text_tab.
    ENDMODULE.
    MODULE cancel INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE user_command_0100 INPUT.
      save_ok = ok_code.
      CLEAR ok_code.
      CASE save_ok.
        WHEN 'INSERT'.
          CALL METHOD editor->get_text_as_stream IMPORTING text = text_tab.
        WHEN 'F1'.
          MESSAGE i888(sabapdocu) WITH text-001.
        WHEN OTHERS.
          MESSAGE i888(sabapdocu) WITH text-002.
          CALL METHOD cl_gui_cfw=>dispatch.      "for application events
          MESSAGE i888(sabapdocu) WITH text-003.
      ENDCASE.
      SET SCREEN 100.
    ENDMODULE.
    CLASS event_handler IMPLEMENTATION.
      METHOD handle_f1.
        DATA row TYPE i.
        MESSAGE i888(sabapdocu) WITH text-004.
        CALL METHOD sender->get_selection_pos
             IMPORTING from_line = row.
        CALL METHOD sender->get_line_text
             EXPORTING line_number = row
             IMPORTING text = field.
        CALL METHOD cl_gui_cfw=>set_new_ok_code   "raise PAI for
             EXPORTING new_code = 'F1'.           "system events
        CALL METHOD cl_gui_cfw=>flush.
      ENDMETHOD.
      METHOD handle_f4.
        DATA row TYPE i.
        MESSAGE i888(sabapdocu) WITH text-005.
        CALL METHOD sender->get_selection_pos
             IMPORTING from_line = row.
        CALL METHOD sender->get_line_text
             EXPORTING line_number = row
             IMPORTING text = field.
        CALL METHOD cl_gui_cfw=>flush.
      ENDMETHOD.
    ENDCLASS.
    aniruddh

  • 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.

  • Custom Controls and ALV

    Hi,
    I have created on one Dynpro 3 Custom Controls, which are
    responsible for Three ALV Grid Reports.
    I have named CC1 for ALV1 CC2 for ALV2 and CC3 for ALV3.
    I can put the Data for each ALVs.
    So far so good, but if I save the Layout global for one ALV and start the Program again, disappears me some Elements on other ALVs like Columns , Buttons etc...
    I have used Method set_for_first_display.
    Thanks for your Replies.
    Best Regards
    Beserithan Malabakan

    Wha tis happening is the VARIANT parameter values that you are passing are the same for all the three grids. So, once you alter the layout of one its changing all the grids. What you need to do is to specify a unique name in the field HANDLE of the parameter VARIANT for each grid, say the grid name.
    Then this problem will not occur and you will have variants specific to the grid.
    It has nothing to do with the global / user defined layouts.
    Regards,
    Ravi
    Note: Please mark the helpful answers

  • OOP ALV report custom control performance problem

    HI
    how to write OOP ALV report without custom control.. Actually with custom control which taking long time... and time out happens for huge selection of data..
    Regards
    Roops.

    timeout is not an alv problem. If you try to display a "huge" amount of data, any display technology will fail. Even sap programs fail, their wise solution is to ask user to restrict data to be displayed. Or reduce database selection time, or display amount. Or propose the user to download data as a spool, or output to a file on server.
    Otherwise, read some advices about how to handle timeout in [Note 25528 - Parameter rdisp/max_wprun_time|http://service.sap.com/sap/support/notes/25528].
    About your question, if you still want to try, look at [example code with alv class cl_salv_table for simple display|http://help.sap.com/saphelp_nw2004s/helpdata/en/f9/1ab54099de3726e10000000a1550b0/frameset.htm]

  • Change Message Control for Customer Master data

    Hi Friends,
    I have to choose/populate a message when the user is about to create an already existing customer.
    In SPRO --> Financial Accounting --> Accounts Receivable and Accounts Payable --> Customer Accounts --> Master Data --> Preparations for creating customer master data --> "change message control for customer master data" ...
    OK...
    When u click this it goes into Change View "message control by User" Overview screen wherein u can insert new messages and texts and the type of message ....
    Now .....
    I want to display the 145th message (F4 help of the Message column) ..... it picks up the text "Customer found with same address;check"..... with Online mesasage type 'I' and batch type 'I' and with standard type '-' ..
    I want to have the same message with message types 'E','E', and 'I' respectively.......
    How is this possible (or) what should i do to meet my requirement :-|
    Expecting ur answers
    Thanks in advance ........
    Cheers,
    R.Kripa.

    Hey yes it is not possible (as of now
    I ve met the requirement by just using message statement in the program itself ............
    My requirement is met but still if anyone knows about this do answer / reply
    Thanks
    Cheers,
    R.Kripa.

  • How to change the attributes of GUI CONTROLS in my own program.

    hi all,
    i just want to change the attributes of GUI CONTROLS in my own program.
    for example `
    How to set an ICON on my GUI BUTTON in the program?
    so what's the mapping between CONTROL in the SCREEN PAINTER and variable in the program?

    Hi Chao Liu,
    Ya , u first find out the PF-STATUS of the screen and goto that status and now u can modify the ICON u want .
    Finding the GUI status of the screen
    Goto that  TRANSACTION CODE or SCREEN
    On the Standard Menu bar Goto ( Menu path) System --> Status
    Now u get a pop-up System :status in that in SAP Data block u can find GUI Status. Now Double Click on that Status. It takes u to the Status of that screen.
    Now click on the Display --> Change Button on the application tool bar.
    If it is a standard GUI-status then it asks for the ACCESS KEY.
    if it is a custom defined GUI Status  then u can change the status .
    reward if helpful
    raam

  • ALV Display on the Custom Control

    Hi Friends,
    Iam developing a Module Pool program where I call a ALV grid on a custom control.
    I have only one screen in which i have a input field and a custom control.
    when I enter a material number in the input field and press ENTER the custom control should be populated with some of the material details. I have written all the logic. But the problem is when i press enter the custom control is not filled but after I press the REFRESH button present by default on the grid, the details are displayed.
    What is the problem??
    Regards,
    Raju...

    HI,
    Use the method <b>REFRESH_TABLE_DISPLAY</b> after filling the new values into <b>it_outtab</b> table. in the PBO flow logic of your Module pool program.
    <b>CALL METHOD grid1->refresh_table_display.</b>
    Regards,

  • Hide the custom control while changing the tab

    Hello Experts,
    I am using many screens & subscreens in my application. In a tabstrip control, I am calling one subscreen which has Custom Control to display the text editor.
    When I change the tab say for ex from TAB1 to TAB2, the custom control with text editor remains at the same place. In TAB2 I dont want custom control of TAB1.
    Thank you to go through my query.
    Regards,
    Bhavina
    Edited by: Rob Burbank on Aug 23, 2010 5:12 PM

    Hello Alej,
    I have created one subscreen which i need in a tabstrip control. Now this subscreen has one Editor Control (CL_GUI_TEXTEDIT->TEXT_EDITOR)  which I put on Custom Control. Custom Control is placed in the subscreen with SE51.
    to put the editor control  of CL_GUI_TEXTEDIT, I need Custom Control on screen. And I didnt find any property using which we can hide custom control.
    Is there any way using classes or methods, can we put Editor Control without using the custom control of screen.
    I think in your prob, you had ALV, that we can put on another subscreen, but in my prob how can we remove custom control Please Explain.
    Thanks & Regards,
    Bhavina

Maybe you are looking for

  • XFX 5770 causing problems at start-up (I think)

    In order to purchase and use Final Cut Pro X, I purchased from MacMall the XFX 5770 HD video card and installed it in my machine. I trusted that, because it was coming from MacMall and because I'd read that the graphics update brought greater compati

  • Connected Query issue

    Hello - I've been working on creating a payroll report with tax balance and earnings data. I have a query for each set of data. Each set has an emplid and a balance_year as key fields. Since I can get all of the tax balance data in one record I am us

  • Videos behaving wierd!

    Hi everyone, I have an flash application, which is essentially a videos/photos gallery...its done, now I am testing it, and i got a weird bug. I have put my application(swf file) file on a web server, the videos(flv files) and jpg pics are also locat

  • How to display tow images in a JPanel

    hello I want to display tow images at the same time in a class which extends a JPanel,and the super image is expected to move at will.But the super image is always overlaying the lower one.I have tried to call the setGlassPane() in a JFrame and it wo

  • Using iMac, Aperture 3, and & Epson Stylus Photo R1800 printer: How come my prints look like trash?

    I have calibrated my iMac Intel Core i3 and printing through Aperture 3 with an Epson Stylus Photo R1800 is not producing great results. Cyan is dominating along with blue lines through the grass in the picture. I figure the lines are a result of clo