2007 Mar 28 10:27 AM
hi can anyone tel me wats the error in this coding this is not working
its showing no error but im not getting alv grid display
DATA: grid1 TYPE REF TO cl_gui_alv_grid,
ok_code LIKE sy-ucomm,
mycontainer TYPE scrfname VALUE 'CUST',
container TYPE REF TO cl_gui_custom_container.
DATA : t_mara TYPE TABLE OF zmara.
DATA : v_save,
v_repid LIKE sy-repid,
v_variant TYPE disvariant.
INCLUDE zsta.
INCLUDE zpbo.
START-OF-SELECTION.
PERFORM set_data.
END-OF-SELECTION.
CLEAR v_variant.
v_repid = sy-repid .
v_variant-report = v_repid.
v_save = 'A'.
CALL SCREEN 786.
----
FORM CREATE_CON *
----
........ *
----
FORM create_con.
IF container IS INITIAL.
CREATE OBJECT container EXPORTING
container_name = mycontainer
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5.
IF sy-subrc NE 0.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = sy-repid
txt2 = sy-subrc
txt1 = 'The control could not be created'(510).
TXT3 = ' '
TXT4 = ' '
ENDIF.
CREATE OBJECT grid1 EXPORTING
i_parent = container.
CALL METHOD grid1->set_table_for_first_display
EXPORTING i_structure_name = 'ZMARA'
is_variant = v_variant
i_save = v_save
i_default = 'X'
CHANGING it_outtab = t_mara.
ENDIF.
ENDFORM. "
----
FORM SET_DATA *
----
........ *
----
FORM set_data.
SELECT matnr
ersda
ernam
laeda
aenam
vpsta
pstat
lvorm
matfi
cmrel
FROM mara INTO TABLE t_mara UP TO 5 ROWS.
ENDFORM. " GET_DATA
2007 Mar 28 1:01 PM
hi zubair
click the screen number screen layout wil open otherwise goto se51 and give ur program name and screen number,
then from left side they wil be tool box from there u drag and drop the custom control and double click it and name it as CUST
and run ur program
hi can anyone tel me wats the error in this coding this is not working
its showing no error but im not getting alv grid display
DATA: grid1 TYPE REF TO cl_gui_alv_grid,
ok_code LIKE sy-ucomm,
mycontainer TYPE scrfname VALUE 'CUST',
container TYPE REF TO cl_gui_custom_container.
DATA : t_mara TYPE TABLE OF zmara.
DATA : v_save,
v_repid LIKE sy-repid,
v_variant TYPE disvariant.
INCLUDE zsta.
INCLUDE zpbo.
START-OF-SELECTION.
PERFORM set_data.
END-OF-SELECTION.
CLEAR v_variant.
v_repid = sy-repid .
v_variant-report = v_repid.
v_save = 'A'.
CALL SCREEN 786.
----
FORM CREATE_CON *
----
........ *
----
FORM create_con.
IF container IS INITIAL.
CREATE OBJECT container EXPORTING
container_name = mycontainer
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5.
IF sy-subrc NE 0.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = sy-repid
txt2 = sy-subrc
txt1 = 'The control could not be created'(510).
TXT3 = ' '
TXT4 = ' '
ENDIF.
CREATE OBJECT grid1 EXPORTING
i_parent = container.
CALL METHOD grid1->set_table_for_first_display
EXPORTING i_structure_name = 'ZMARA'
is_variant = v_variant
i_save = v_save
i_default = 'X'
CHANGING it_outtab = t_mara.
ENDIF.
ENDFORM. "
----
FORM SET_DATA *
----
........ *
----
FORM set_data.
SELECT matnr
ersda
ernam
laeda
aenam
vpsta
pstat
lvorm
matfi
cmrel
FROM mara INTO TABLE t_mara UP TO 5 ROWS.
ENDFORM. " GET_DATA
2007 Mar 28 10:30 AM
Hi,
Have you created the Screen 786 and a container with name CUST in it?
2007 Mar 28 11:12 AM
hi,
yeah i have created the screen 786 but not container cust pls tel me how to create that
2007 Mar 28 11:15 AM
when you go to the layout of your screen painter , on the left hand side there will be one custom control button , drag and drop that on to your screen painter and give the name of that as CUST
2007 Mar 28 11:28 AM
hi
there is nothing in the left side once the screen painter is opened nothin is there in left side then how to drag and drop a custom control button.
it only showing screen no 0786 active and they is menu bar application bar and remaining screen is blank
2007 Mar 28 11:32 AM
I am talking about the layout of that screen , click on the layout button on application toolber which will take you to the layout of that screen, there you can find button on left hand side, for more help chk the program BCALV_EDIT_05
2007 Mar 28 11:50 AM
yeah i clicked the layout button and i opened the screen painter and there is no button on screen
2007 Mar 28 10:31 AM
Hi Zubair,
Pls check the contianer name is 'CUST' or not in your screen painter.
Thanks & Regards,
Siri.
2007 Mar 28 11:09 AM
hi srilatha
cust is not in my screen painter how to create that?
2007 Mar 28 10:32 AM
Hi Zubir,
In FORM CREATE_CON,
Change the container name as shown......
CREATE OBJECT container EXPORTING
container_name = container
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5.
Thanks and Regards,
Kunjal Patel
2007 Mar 28 10:33 AM
Check
whether u have created the screen container in ur layout and check for the data in the internal table..
also check the fieldcat internal table whether it is showing the data in debug mode...
2007 Mar 28 11:10 AM
hi sumi vasu
i have not created cust pls tel me how to create cust container in my screen painter
2007 Mar 28 11:32 AM
Hi,
Go to screen painter, create a container from the tools then name the container. That name shd be used in your program.
In se 38, give BCALV* and Press F4. There are lot of sample progs using container. Have a glance on that. Still if u have any doubt then write once again.
Regards,
U. Uma
2007 Mar 28 1:01 PM
hi zubair
click the screen number screen layout wil open otherwise goto se51 and give ur program name and screen number,
then from left side they wil be tool box from there u drag and drop the custom control and double click it and name it as CUST
and run ur program
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |