Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Docking Container - Custom Container

Former Member
0 Kudos

Hi Friends,

I have the following doubts.

1. What all are the advantages of Docking and Custom Container.

2. Under what scenario's we use Docking over Custom Container.

3. I want to have 2 ALV GRID's in one screen one below another. Shall I use Docking Container?

internal table I_MARA with 10 records and I_MARC with 20 records.

Explain how to achieve this using Docking Container with code.

Regards,

Viji.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

This message was moderated.

7 REPLIES 7

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

This message was moderated.

0 Kudos

The question along with all copy-paste answers have been reported to SCN Moderators.

pk

former_member183990
Active Contributor
0 Kudos

hi vijayalakshmi

you can use 2 custom containers in that screen for two ALV grid

&----


*& Report ZLISTBOX1 *

*& *

&----


*& *

*& *

&----


REPORT zlistbox1 .

*parameters: date like sy-datum.

TABLES: lfa1,ekko.

TYPE-POOLS: slis,sdydo.

*select-options: vendor for lfa1-lifnr.

DATA: itab TYPE TABLE OF ekko,

identity TYPE REF TO cl_gui_custom_container,

l_list TYPE slis_t_listheader,

l_logo TYPE sdydo_value,

l_identity TYPE REF TO cl_gui_custom_container,

l_tree TYPE REF TO cl_gui_alv_tree_simple,

tree TYPE REF TO cl_gui_alv_tree_simple,

fcat TYPE lvc_t_fcat,

sort_b TYPE lvc_t_sort,

sort_w TYPE lvc_s_sort.

CALL SCREEN 100.

&----


*& Module USER_COMMAND_0100 INPUT

&----


  • text

----


MODULE user_command_0100 INPUT.

CASE sy-ucomm.

WHEN 'DISPLAY'.

PERFORM col_head.

PERFORM output.

PERFORM sort.

IF l_identity IS INITIAL.

CREATE OBJECT l_identity

EXPORTING

container_name = 'LOGO'.

CREATE OBJECT l_tree

EXPORTING

i_parent = l_identity.

PERFORM logo USING l_logo.

CALL METHOD l_tree->create_report_header

EXPORTING

it_list_commentary = l_list

i_logo = l_logo.

ENDIF.

IF identity IS INITIAL.

CREATE OBJECT identity

EXPORTING

container_name = 'JANAGAR'.

CREATE OBJECT tree

EXPORTING

i_parent = identity.

CALL METHOD tree->set_table_for_first_display

CHANGING

it_outtab = itab

it_fieldcatalog = fcat

it_sort = sort_b.

ENDIF.

*refresh itab.

CALL METHOD tree->refresh_table_display.

WHEN 'EXIT'.

LEAVE PROGRAM.

ENDCASE.

ENDMODULE. " USER_COMMAND_0100 INPUT

&----


*& Form logo

&----


  • text

----


  • -->P_LOGO text

----


FORM logo USING p_logo.

p_logo = 'ENJOYSAP_LOGO'.

ENDFORM. "logo

&----


*& Form col_head

&----


  • text

----


FORM col_head.

CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'

EXPORTING

  • I_BUFFER_ACTIVE =

i_structure_name = 'EKKO'

  • I_CLIENT_NEVER_DISPLAY = 'X'

  • I_BYPASSING_BUFFER =

  • I_INTERNAL_TABNAME = ITAB

CHANGING

ct_fieldcat = fcat.

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

ENDIF.

ENDFORM. "col_head

&----


*& Form output

&----


  • text

----


FORM output.

SELECT * FROM ekko INTO TABLE itab WHERE lifnr = lfa1-lifnr.

ENDFORM. "output

&----


*& Form sort

&----


  • text

----


FORM sort.

sort_w-spos = 1.

sort_w-fieldname = 'EBELN'.

APPEND sort_w TO sort_b.

sort_w-spos = 2.

sort_w-fieldname = 'AEDAT'.

APPEND sort_w TO sort_b.

sort_w-spos = 3.

sort_w-fieldname = 'BUKRS'.

APPEND sort_w TO sort_b.

ENDFORM. "sort

cheers

s.janagar

matt
Active Contributor
0 Kudos

I suggest that first of all you research what is meant by a docking container and customer container, and repost when you've understood the basics. As it stands, your question doesn't really make sense.

The copy paste answers from SAP help and other sources have been removed.

Topic locked.