GUI status in OOPS in ALV
Hi Gurus,
Am developing the ALV report in OOPS. In that report am displaying 2 grids one after the other. My problem here is am getting the tool bar separately for the 2 grids. So i disabled the tool bar for two grids in layout. And i copied the standard gui status SLVC_FULLSCREEN into that report. Now am getting the tool bar. But i did nt get the button events. The buttons are clickable but the functionality is not doing. How to get the functionalites for the ZSLVC_FULLSCREEN. Please guide me some suggestions how to copy the functionalites for those.
Points will be awarded
Thanks
Ravi
check the all function codes of the buttons in ZSLVC_FULLSCREEN GUi status
and write u r functionality in your progrm in at user-command subroutine.
case sy-ucomm.
when 'xxx'
do something.
when 'yyy'
do something.
endcase.
Similar Messages
-
How to get GUI Status(Push Buttons) in ALV Report
Hi Friends
I have a requirement in a way that:
Once selection-screen was processed,an ALV report has to come and above the ALV List,I need a custom GUI Status(4 Push Button) with Push Buttons Logic.
Once I had clicks on thesse push button,I need to display one more ALV List and above this List,again I need a custom GUI Status(2 Push Buttons) with Push Buttons Logic.
Can anyone throw some light how we can achieve this.
Thanks for your cooperation!
Regards,
Madisettydata: rt_extab type slis_t_extab,
g_ucomm like sy-ucomm ,
g_selfield type slis_selfield.
form alv_display .
call function 'REUSE_ALV_LIST_DISPLAY'
exporting
i_callback_program = g_repid
i_callback_pf_status_set = 'PF_STATUS'
i_callback_user_command = 'USER_COMM'
it_fieldcat = it_fldcat
tables
t_outtab = it_final1
perform pf_status using rt_extab.
perform user_comm using g_ucomm g_selfield .
endform.
form pf_status using p_rt_extab.
set pf-status 'PF_STATUS' excluding p_rt_extab.
endform.
form user_comm using p_ucomm like sy-ucomm
p_selfield type slis_selfield.
data: l_row type i.
case p_ucomm.
when 'DISPLAY_PO'.
loop at it_final1 into wa_final1.
if wa_final1-sel eq 'X' .
l_row = l_row + 1.
endif.
if l_row gt 1.
message e004.
endif.
clear wa_final1.
endloop.
p_selfield-fieldname = 'SEL'.
read table it_final1 into wa_final1 index p_selfield-tabindex .
set parameter id 'BES' field wa_final1-ebeln.
call transaction 'ME23N'.
endcase.
endform.
*create user interface for gui status by double clicking on 'PF_STATUS'.
*Check the above sample code . -
How can we set GUI STATUS in a alv program using oops...Is there any method we need to use for this ????
Hi,
Just call screen from your program as below .
call screen 9001.
In the PBO of the screen,write the following code
MODULE status_9001 OUTPUT.
SET PF-STATUS 'ZSTATUS'.
SET TITLEBAR 'ZTITLE'.
ENDMODULE. " STATUS_9001 OUTPUT -
Can anyone tell me how to use GUI status in ALV report.
Can anyone tell me how to use GUI status in ALV report. I want to use buttons in ALV report.
Juheb,
see the link
http://help.sap.com/saphelp_nw2004s/helpdata/en/5e/88d440e14f8431e10000000a1550b0/frameset.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVALV/BCSRVALV.pdf
Adding a button on the ALV grid using OOPs
check these sites.
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/webDynproABAP-ALVControllingStandard+Buttons&
chk this.
alv-pfstatus:
http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_pfstatus.htm
then how to capture that button click.
http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_ucomm.htm
REPORT ZTESTALV.
TYPE-POOLS: SLIS.
*- Fieldcatalog
DATA: IT_FIELDCAT TYPE LVC_T_FCAT,
IT_FIELDCAT1 TYPE SLIS_T_FIELDCAT_ALV..
*- For Events
DATA:IT_EVENTS TYPE SLIS_T_EVENT.
DATA: X_FIELDCAT TYPE LVC_S_FCAT,
X_FIELDCAT1 TYPE SLIS_FIELDCAT_ALV.
DATA:X_LAYOUT TYPE LVC_S_LAYO.
"{ FOR DISABLE
DATA: LS_EDIT TYPE LVC_S_STYL,
LT_EDIT TYPE LVC_T_STYL.
"} FOR DISABLE
DATA: BEGIN OF IT_VBAP OCCURS 0,
VBELN LIKE VBAP-VBELN,
POSNR LIKE VBAP-POSNR,
HANDLE_STYLE TYPE LVC_T_STYL, "FOR DISABLE
<b> BUTTON(10),</b>
END OF IT_VBAP.
DATA: LS_OUTTAB LIKE LINE OF IT_VBAP.
SELECT VBELN
POSNR
UP TO 10 ROWS
INTO CORRESPONDING FIELDS OF TABLE IT_VBAP
FROM VBAP.
DATA:L_POS TYPE I VALUE 1.
CLEAR: L_POS.
L_POS = L_POS + 1.
<b>X_FIELDCAT-SELTEXT = 'Button'.
x_fieldcat-fieldname = 'BUTTON'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = L_POS.
X_FIELDCAT-OUTPUTLEN = '10'.
X_FIELDCAT-style = X_FIELDCAT-style bit-xor
cl_gui_alv_grid=>MC_STYLE_BUTTON bit-xor
cl_gui_alv_grid=>MC_STYLE_ENABLEd.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.</b>
L_POS = L_POS + 1.
X_FIELDCAT-SELTEXT = 'VBELN'.
X_FIELDCAT-FIELDNAME = 'VBELN'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = L_POS.
X_FIELDCAT-EDIT = 'X'.
X_FIELDCAT-OUTPUTLEN = '10'.
x_fieldcat-ref_field = 'VBELN'.
x_fieldcat-ref_table = 'VBAK'.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
L_POS = L_POS + 1.
X_FIELDCAT-SELTEXT = 'POSNR'.
X_FIELDCAT-FIELDNAME = 'POSNR'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = L_POS.
X_FIELDCAT-EDIT = 'X'.
X_FIELDCAT-OUTPUTLEN = '5'.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
L_POS = L_POS + 1.
"{FOR DISABLE HERE 6ROW IS DISABLED
SY-TABIX = 6.
LS_EDIT-FIELDNAME = 'VBELN'.
LS_EDIT-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_DISABLED.
LS_EDIT-STYLE2 = SPACE.
LS_EDIT-STYLE3 = SPACE.
LS_EDIT-STYLE4 = SPACE.
LS_EDIT-MAXLEN = 10.
INSERT LS_EDIT INTO TABLE LT_EDIT.
*LS_EDIT-FIELDNAME = 'POSNR'.
*LS_EDIT-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_DISABLED.
*LS_EDIT-STYLE2 = SPACE.
*LS_EDIT-STYLE3 = SPACE.
*LS_EDIT-STYLE4 = SPACE.
*LS_EDIT-MAXLEN = 6.
*INSERT LS_EDIT INTO TABLE LT_EDIT.
INSERT LINES OF LT_EDIT INTO TABLE LS_OUTTAB-HANDLE_STYLE.
MODIFY IT_VBAP INDEX SY-TABIX FROM LS_OUTTAB TRANSPORTING
HANDLE_STYLE .
X_LAYOUT-STYLEFNAME = 'HANDLE_STYLE'.
"} UP TO HERE
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IS_LAYOUT_LVC = X_LAYOUT
IT_FIELDCAT_LVC = IT_FIELDCAT
TABLES
T_OUTTAB = IT_VBAP[]
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Don't forget to reward if useful.... -
Hai i copied standard gui status in my alv report.
i hav req. to do..when i click on exit(%EX) and cancel(RW)it should appear pop-up window..with two buttons "do u want to exit". if yes..should exit the report and if no..continue with current screen.
i have 6 secondary lists..should i write the code in all the 6 ucomm(s) or only once is needed.?
plz give me code for this.??hai check my code...i added like this. its not working
FORM usecomm USING ucomm LIKE sy-ucomm fields TYPE slis_selfield.
case sy-ucomm.
when '%EX' OR 'RW'.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = 'EXIT'
DIAGNOSE_OBJECT = ' '
text_question = 'Do u want to exit?'
TEXT_BUTTON_1 = 'Ja'(001)
ICON_BUTTON_1 = ' '
TEXT_BUTTON_2 = 'Nein'(002)
ICON_BUTTON_2 = ' '
DEFAULT_BUTTON = '1'
DISPLAY_CANCEL_BUTTON = 'X'
USERDEFINED_F1_HELP = ' '
START_COLUMN = 25
START_ROW = 6
POPUP_TYPE =
IMPORTING
ANSWER =
TABLES
PARAMETER =
EXCEPTIONS
TEXT_NOT_FOUND = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endcase.
CASE ucomm.
WHEN '&IC1'.
IF fields-fieldname = 'SALES_OFF'.
READ TABLE tbl_basic_list INDEX fields-tabindex.
SELECT vkgrp FROM s707
INTO TABLE tbl_first_list
FOR ALL ENTRIES IN tbl_basic_list
WHERE vkbur EQ tbl_basic_list-vkbur
AND vkbur EQ fields-value.
SELECT bezei FROM tvgrt INTO CORRESPONDING FIELDS OF TABLE
tbl_first_list WHERE vkgrp = tbl_first_list-vkgrp AND
spras = sy-langu.
SELECT avkgrp bbezei INTO CORRESPONDING FIELDS OF TABLE
tbl_first_list FROM s707 AS a INNER JOIN tvgrt AS b
ON avkgrp = bvkgrp
WHERE b~spras = sy-langu
AND a~vkbur = fields-value.
DELETE ADJACENT DUPLICATES FROM tbl_first_list.
APPEND tbl_first_list.
IF NOT tbl_first_list IS INITIAL.
LOOP AT tbl_first_list.
CONCATENATE tbl_first_list-vkgrp '-'
tbl_first_list-bezei INTO
tbl_first_list-sgroup
SEPARATED BY space.
concatenate tbl_first_list-vkgrp+0(1)
tbl_first_list-vkgrp+2(1) into
tbl_first_list-sort.
MODIFY tbl_first_list INDEX sy-tabix.
ENDLOOP.
ENDIF.
ELSE.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = repid
txt1 = sy-subrc
txt2 = 'No data found!'
TXT3 = ' '
TXT4 = ' '
ENDIF.
PERFORM fcat_first_list.
PERFORM fieldcat_sort USING gs_sort[].
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
i_callback_program = sy-cprog
i_callback_pf_status_set = 'PF_STATUS'
i_callback_user_command = 'USECOMM1'
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
is_layout = layout
it_fieldcat = fcat1[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
it_sort = gs_sort[]
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
it_events = events1[]
IT_EVENT_EXIT =
IS_PRINT = gs_print
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IT_ALV_GRAPHICS =
IT_ADD_FIELDCAT =
IT_HYPERLINK =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IT_EXCEPT_QINFO =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = tbl_first_list
EXCEPTIONS
program_error = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CASE sy-subrc.
WHEN '1'.
MESSAGE s000.
WHEN OTHERS.
MESSAGE s001.
ENDCASE.
ENDIF.
ENDCASE.
ENDFORM.
Make corrections...it's not working here -
ALV grid to list processing and GUI status
Hi,
In a customized program the report output is in ALV grid which is interactive. On selecting a record and pressing SAVE button a BAPI runs in background. In order to display BAPI error message the leave to list-processing has been used. But GUI status is not working in list display and can not exit or go back from here to main selection screen.
when try to see program name & screen no it displays
Program - SAPLKKBL
Menu - STANDARD_FULLSCREEN
pls advise how to go back from list to main screen or ALV output.
thanks
anyaHi Anya,
As per my understanding, this is your prog flow:
*Main ALV Display.
*Select record.
*Click on Button SAVE.
*Handle Event.
*Call BAPI for processing based on selection.
Now at this point why dont you colect the error messages from the BAPI, and display it in a POP-UP ALV display?
You need not e very much worried about the PF status and all. Also this POP-UP will be placed on the MAIN ALV. So when you close the POP-UP it will come back to the main ALV.
By this when you press the BACK button of the main ALV, it will take you back to the selection scree.
Please let me know if i am missing something.
ags -
Problem in GUI status of ALV Grid
Hello All Experts,
I have a following issue.
Am displaying a report using REUSE_ALV_GRID_DISPLAY. I have copied the GUI status from standard GUI STANDARD_FULLSCREEN. Now when i dispaly the report i get select all ICON just before my first column(Marked in red below). i do not need this icon, i have checked in my GUI status also this icon does not exist. can you please help me how to remove this icon.
This is how i have declared the field catalog for my first column.
fieldcatalog-fieldname = text-013.
fieldcatalog-seltext_m = text-014.
fieldcatalog-col_pos = 0.
fieldcatalog-outputlen = 3.
fieldcatalog-emphasize = gc_x.
fieldcatalog-key = gc_x.
fieldcatalog-checkbox = gc_x.
fieldcatalog-edit = gc_x.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
Am really thankful to your resposes.
Regards,
Satishi tested with
REUSE_ALV_GRID_DISPLAY and it works fine as you want
report ztestalv.
type-pools:
slis.
data:
i_usr02 type table of usr02,
afield type slis_fieldcat_alv,
sp_group type slis_sp_group_alv,
t_listheader type slis_t_listheader with header line,
t_layout type slis_layout_alv,
t_fieldcat type slis_t_fieldcat_alv,
t_spec_groups type slis_t_sp_group_alv,
event type slis_alv_event,
t_events type slis_t_event,
g_variant like disvariant,
gx_variant like disvariant,
g_exit(1) type c,
g_save(1) type c,
g_repid like sy-repid,
msgtyp like sy-msgty,
lt_dynpread like dynpread occurs 1 with header line.
start-of-selection.
select * from usr02 into table i_usr02
up to 200 rows.
end-of-selection.
t_layout-detail_initial_lines = 'X'.
t_layout-detail_popup = 'X'.
t_layout-f2code = 'PIC1'.
t_layout-get_selinfos = 'X'.
t_layout-group_change_edit = 'X'.
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
exporting
i_structure_name = 'USR02'
changing
ct_fieldcat = t_fieldcat
exceptions
others = 4.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = 'ZTESTALV'
i_callback_pf_status_set = 'SET_PF_STATUS'
i_callback_user_command = 'USR_CMD'
i_structure_name = 'USR02'
is_layout = t_layout
it_fieldcat = t_fieldcat
it_special_groups = t_spec_groups
i_default = 'X'
i_save = g_save
is_variant = g_variant
it_events = t_events
tables
t_outtab = i_usr02
exceptions
program_error = 1
others = 2.
make sure your field ls_layout-box_fieldname is blank, as you using the checkbox -
Hi All,
Could anyone send me simple OOPs ALV report.
Mail ID : [email protected]
Regards,
Parvez.Hi,
Here is an example.You need to create GUI status as required.
data : itab type standard table of mara,"Output Internal table
i_fieldcat type standard table of lvc_s_fcat,"Field catalog
wa type mara,
w_variant type disvariant,
o_docking type ref to cl_gui_docking_container,"Docking Container
o_grid type ref to cl_gui_alv_grid."Grid
select * from mara into table itab up to 100 rows.
call screen 9000.
*& Module STATUS_9000 OUTPUT
text
module STATUS_9000 output.
SET PF-STATUS 'ZSTATUS'. "GUI Status
SET TITLEBAR 'ZTITLE'. "Title
Creating Docking Container
CREATE OBJECT o_docking
EXPORTING
RATIO = '95'.
IF sy-subrc eq 0.
Creating Grid
CREATE OBJECT o_grid
EXPORTING
i_parent = o_docking.
ENDIF.
Filling the fieldcatalog table
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
I_STRUCTURE_NAME = 'MARA'
CHANGING
ct_fieldcat = i_fieldcat
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.
w_variant-report = sy-repid.
Displaying the output
CALL METHOD o_grid->set_table_for_first_display
EXPORTING
IS_VARIANT = w_variant
I_SAVE = 'A'
CHANGING
it_outtab = itab
IT_FIELDCATALOG = i_fieldcat
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.
endmodule. " STATUS_9000 OUTPUT
*& Module USER_COMMAND_9000 INPUT
PAI
module USER_COMMAND_9000 input.
data lv_ucomm type sy-ucomm.
lv_ucomm = sy-ucomm.
CASE lv_ucomm.
WHEN 'CANCEl' OR 'EXIT'.
perform free_objects.
LEAVE PROGRAM.
when 'BACK'.
perform free_objects.
set screen '0'.
leave screen.
ENDCASE.
endmodule. " USER_COMMAND_9000 INPUT
*& Form free_objects
Free Objects
form free_objects .
CALL METHOD o_grid->free
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_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.
CALL METHOD o_docking->free
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_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. " free_objects
Check this link also for understanding the procedure
<a href="https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/abap-7StepstocreateOOPSALV(forbeginners)&">https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/abap-7StepstocreateOOPSALV(forbeginners)&</a>
Message was edited by:
Jayanthi Jayaraman -
OSS Note 1401249 - Issue in GUI status
Hi ,
As per 1401249 Note instructions, i need to add a new push button 'Display Income Levy Data', in the standard report HIECILC0 .
In SE41 , I am giving the program name HIECILC0 and Status 'ALV', when I click on Change button, I see 'Modify Status ALV in program HIECILC0' , where as in the Note instructions screen shot it is given as 'Maintain Status ALV in program HIECILC0'.
Have anyone faced this issue before, why is it 'Modify Status ALV in program HIECILC0' instead of 'Maintain Status ALV in program HIECILC0'.
I am not able follow the same steps given in the Note instruction because of this issue.
Please let me know how to proceed with this.Hi ,
The below thread resolved the issue.
Can't modify a gui Status
In SE41 Menu path: Edit -> Modification Operations -> Swich off assistant
Thanks -
PF Status Modification in Blacl ALV
Hi All,
In one of our requirements we need all the Standard Menus and Functions of the Output Status of an ALV.
But we want the Download to Local File to behave differently. Instead of an Usual Download we would like the EXcel with the Prepopulated data (Same as in Output Display of ALV) to OPEN up and then the User can SAVE it to any desired location.
I have copied the Status using the SE41 and the set the PF status in my Program.I have used the Parameter I_CALLBACK_PF_STATUS_SET in the FM - REUSE_ALV_BLOCK_LIST_INIT. The Routine sets the PF Status.
And the PF status is correct.But in the Menu I have Changed the FUnction Code of LOcal Downloa d'%PC' to '%PA' to point to my New USER_COMMAND (Subroutine).
But on execution of the Function Code in output the USER_COMMAND Form Routine is not getting Called.But the Other Codes (which were copied from the Standard PF Status) is working Fine.
How Do I make my NEW FUNCTION CODE WORK ?What are the steps I need to do?
Thanks in Advance.
ArunavaHi,
First of all try removing '%' in your function code and see whether it works..normally function codes starting with '%' are system function codes..
If that does not work then check whether your callback program is properly filled while calling REUSE_ALV_BLOCK_LIST_INIT and make sure the GUI Status you see is really the one you created. Put a break-point in your callback_pf_status_set routine and check.
If it is fine till this point then check whether the events table that you are filling and passing to REUSE_ALV_BLOCK_LIST_APPEND fm calls is properly filled.
Like,
t_events-name = slis_ev_user_command.
t_events-form = 'USER_COMMAND'.
APPEND t_events.
Hope this helps..
Sri -
Setting GUI Status on CL_SALV_TABLE
Hi All,
I'm calling CL_SALV_TABLE in a method in the popup mode:
* Set popup display
lo_alv->set_screen_popup( start_column = 10
end_column = 200
start_line = 5
end_line = 30 ).
My problem is that I can't link a GUI status to this as the status can only be linked to a program, function module etc.
I have added a new GUI status to a FM in the same package but I'm getting an object not found exception.
lo_alv->set_screen_status( pfstatus = 'CTRL_POPUP'
report = sy-repid
set_functions = lo_alv->c_functions_all ).
Anybody know a workaround for this besides moving the ALV into a program and calling that from the object. I'd prefer to keep all my code in this one object if I can help it.
Cheers,
GregorYou can refer to any GUI status for which is created in any other program.
For, example:
lo_alv->set_screen_status( pfstatus = 'SALV_STANDARD'
report = 'SALV_DEMO_TABLE_FUNCTIONS'
set_functions = lo_alv->c_functions_all ).
So, you can use any dummy program which can hold the GUI status for you.
Regards,
Naimesh Patel -
Pf status & user-command in alv grid
Hi Friends,
I have one query for ALV grid.
Actually my requirement is like that
Whenever the user double click on grid the control moves to transaction 'VA01' tcode.
I also wanted to set the gui status in ALV grid.
How to do it??
Plz tell me in detail.Very simple....
copy paste this code.... remember I have created a GUI Status called ZALV_STATUS.
So u will have to create this status to run ur program.
U can come back if u have any doubts...
*& Report Z_ALV_TRAINING_LIST_HOTSPOT
REPORT Z_ALV_TRAINING_LIST_HOTSPOT.
Type Pools Used **********
TYPE-POOLS : SLIS.
Internal Tables Declare ************
DATA : it_document type standard table of bkpf initial size 0 with header line,
IT_FIELD_CAT TYPE SLIS_T_FIELDCAT_ALV,
it_alv_event type SLIS_T_EVENT,
fl_layout type slis_layout_alv.
Select Data ***********
start-of-selection.
select * from bkpf into table it_document.
Make Field Catalog ******
PERFORM MAKE_FIELD_CATALOG.
Make Layout *********
perform sub_fill_layout.
Make Events Table *******
perform sub_Fill_alv_event.
Display ALV *********
PERFORM DISPLAY_ALV_LIST.
*& Form make_field_catalog
text
--> p1 text
<-- p2 text
FORM MAKE_FIELD_CATALOG .
data : wa type slis_fieldcat_alv.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME =
I_INTERNAL_TABNAME =
I_STRUCTURE_NAME = 'bkpf'
I_CLIENT_NEVER_DISPLAY = 'X'
I_INCLNAME =
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE =
CHANGING
CT_FIELDCAT = it_field_cat
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.
read table it_field_cat into wa index 3.
wa-hotspot = 'X'.
modify it_field_cat index 3 from wa.
ENDFORM. " make_field_catalog
*& Form display_alv_list
text
--> p1 text
<-- p2 text
FORM DISPLAY_ALV_LIST .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = sy-repid
I_CALLBACK_PF_STATUS_SET = 'SET_MY_PF_STATUS'
I_CALLBACK_USER_COMMAND = ' '
IS_LAYOUT = fl_layout
IT_FIELDCAT = it_field_cat[]
IT_SORT =
I_DEFAULT = 'X'
I_SAVE = 'X'
IS_VARIANT = '/TEST_VV'
IT_EVENTS = it_alv_event
TABLES
T_OUTTAB = it_document.
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. " display_alv_list
*& Form sub_my_pf_event
text
--> p1 text
<-- p2 text
FORM sub_my_pf_event using p_comm type sy-ucomm p_sEL_FIELD TYPE SLIS_SELFIELD.
read table it_document index p_sel_field-tabindex.
set parameter id 'BLN' field it_document-belnr.
set parameter id 'BUK' field it_document-bukrs.
set parameter id 'GJR' field it_document-gjahr.
case p_comm.
when 'PICK'.
call transaction 'FB03' and skip first screen.
endcase.
ENDFORM. " sub_my_pf_event
*& Form sub_Fill_alv_event
text
--> p1 text
<-- p2 text
FORM sub_Fill_alv_event .
data : wa type slis_alv_event.
wa-name = 'USER_COMMAND'.
wa-form = 'SUB_MY_PF_EVENT'.
append wa to it_alv_event.
ENDFORM. " sub_Fill_alv_event
*& Form sub_fill_layout
text
--> p1 text
<-- p2 text
FORM sub_fill_layout .
fl_layout-f2code = 'PICK'.
fl_layout-box_fieldname = 'BELNR'.
ENDFORM. " sub_fill_layout
*& Form SET_MY_PF_STATUS
text
--> p1 text
<-- p2 text
FORM SET_MY_PF_STATUS USING p_rt_extab TYPE slis_t_extab.
SET PF-STATUS 'ZALV_STATUS'.
ENDFORM. " SET_MY_PF_STATUS
Plz award points if it was helpful....
Message was edited by:
Varun Verma -
Hi Experts,
I have created a report using ALV object model in EN language.
For this report i have copied standard GUI status to ZGUI status in language EN.
Now when i execute this report in German login. All the texts in ZGUI are displayed in ENGLISH. Where as if i check standard GUI status, it is displayed in login language.
Please tell why standard texts in ZGUI status are not displayed in logon language or is there any special way to copy GUI status so that they are copied as language dependent.
RegardsJust for the record, as i have been digging about this same thing, without finding a clear answer anywhere.
As translation texts are not copied copying only the status, as hinted somewhere else, you can copy the whole function group into a Z (without the methods).
Then in the new Zfunction group you can create copies of the standard status adding your customer needs (new menus/buttons), and translating just the new items (for use in external programs).
Then when creating your alv reports instead of using status from its own program, use the status from this Zfunction group.
(Using "CL_SALV_MODEL_BASE->SET_SCREEN_STATUS" you can use status from other programs).
Cheers -
how to setpage down and page up in ALV report.
i assign p- p++ fcode in gui status.
scroll line to last page is not workingHI
GOOD
GO THROUGH THESE LINKS
http://help.sap.com/download/documentation/additional/getstart/470/Getting_Started_470_EN.pdf
http://searchsap.techtarget.com/searchSAP/downloads/Teach_yourself_SAP_C20.pdf
THANKS
MRUTYUN -
Hello,
I have a seleccion screen and after the user inputs the values i make a select and with that i make a list using the function Display_Basic_List. What i want to know is how i can change the gui status when the list shows up.
Thanks,
RicardoThis may give you some idea.
data: fieldtab like dfies occurs 0 with header line.
* Field Catalog
data: begin of imarafc occurs 0,
fieldtext(50) type c,
end of imarafc.
* Data
data: begin of imaradt occurs 0.
include structure mara.
data: check(1) type c.
data: end of imaradt.
* Selected Records
data: begin of iseltab occurs 0.
include structure mara.
data: end of iseltab.
data: iconbutton(20) type c.
select-options: s_matnr for mara-matnr.
start-of-selection.
* Get Data
select * into corresponding fields of table imaradt
from mara
where matnr in s_matnr.
* Get the field table for table
call function 'GET_FIELDTAB'
exporting
langu = sy-langu
tabname = 'MARA'
withtext = 'X'
tables
fieldtab = fieldtab
exceptions
others = 1.
* Build field labels into field catalog
loop at fieldtab.
clear imarafc.
imarafc-fieldtext = fieldtab-fieldtext.
append imarafc.
endloop.
<b>* Build button 2
write icon_display as icon to iconbutton.
concatenate iconbutton 'Display' into iconbutton
separated by space.</b>
* Throw ALV
call function 'DISPLAY_BASIC_LIST'
exporting
basic_list_title = 'This is the title'
file_name = 'TEST'
head_line1 = 'This is heading 1'
head_line2 = 'This is heading 2'
* HEAD_LINE3 = ' '
* HEAD_LINE4 = ' '
foot_note1 = 'This is foot 1'
foot_note2 = 'This is foot 2'
* FOOT_NOTE3 = ' '
* LAY_OUT = 0
<b> dyn_pushbutton_text1 = 'Hey' " Buttons
dyn_pushbutton_text2 = iconbutton</b>
* DYN_PUSHBUTTON_TEXT3 =
* DYN_PUSHBUTTON_TEXT4 =
* DYN_PUSHBUTTON_TEXT5 =
* DYN_PUSHBUTTON_TEXT6 =
* DATA_STRUCTURE = ' '
current_report = 'ZRICH_0001' " Save Display Variant
* LIST_LEVEL = ' '
* ADDITIONAL_OPTIONS = ' '
* WORD_DOCUMENT =
* APPLICATION =
* OLDVALUES = ' '
* NO_ALV_GRID = 'X'
alv_marker = 'CHECK' " Selection field
* IMPORTING
* RETURN_CODE =
tables
data_tab = imaradt " Data
fieldname_tab = imarafc " Column Headings
select_tab = iseltab " Selected Rows
* ERROR_TAB =
* RECEIVERS =
* EXCEPTIONS
* DOWNLOAD_PROBLEM = 1
* NO_DATA_TAB_ENTRIES = 2
* TABLE_MISMATCH = 3
* PRINT_PROBLEMS = 4
* OTHERS = 5
<b> case sy-ucomm.
when 'BUT1'.
write:/ 'Button 1 was pressed'.
when 'BUT2'.
write:/ 'Button 2 was pressed'.
endcase.</b>
Regards,
RIch Heilman
Maybe you are looking for
-
My webpage created with php prints code instead of the created webpage
My webpage is created using dynamic field therefore it had to be save as .php. The problem now is when i want to print the page it prints code instead of the actual page. Is the a solution for this problem? Here is the site http://www.pianoandkeyboar
-
My MBP with RD's Facetime camera freezes when changing portrait to landscape during facetime calls on the display of the person who i'm calling to, but it shows alright on my side, what's going on? Another thing is that on Skype, whenever i clicked t
-
Hi All, I have a query here related to screens. The problem here is i want to skip two screens of a called transaction is it possible to do so. If it is so please help me out. Thanks, krishnakumar
-
Cannot edit the document I have downloaded what did I do wrong
-
Migration From Developer 2.1 to Forms 6i/9i
Hello, My client wants to migrate from Developer 2.1 to Forms 6i or to Forms 9i with C/S architecture (Sun Solaris 2.6). They are told (from Oracle Support) that they need to add a patch set before migrating. Has anybody migrated in this environment