How can we place a push button in ALV report
hi
could anybody inform me
how can we place a push button in ALV report
thanx
regards
kals.
Hi kals.
please have a look at demoprogram
SALV_DEMO_TABLE_FUNCTIONS
BCALV_GRID_05
Regards
Bernd
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 to give push button in alv report output
hi,
my requirement is that , i have to give push button in alv report output(item level) not in application toolbar, i am using reuse_alv_grid_display FM, can any body provide me sample code
regards,
siva kumarhave a look at this thread, also has a sample report at the end from Uwe Schieferstein.
[button on alv list|How to add and program a pushbutton on ALV grid line;
seems not to work try this:
How to add and program a pushbutton on ALV grid line
Edited by: Micky Oestreich on May 15, 2008 10:20 PM -
Dear Experts,
How to add pushbutton in alv report.....
*& Report ZTT_TEST_ALV
REPORT ZTT_TEST_ALV.
*data declarations
type-pools : SLIS.
* data : BEGIN OF wa_kna1,
* kunnr type kunnr,
* name1 type name1,
* end of wa_kna1,
* it_kna1 like tABLE OF wa_kna1.
data : begin of wa_mara,
matnr type matnr,
end of wa_mara,
it_mara like table of wa_mara.
data : it_fcat type slis_t_fieldcat_alv,
wa_fcat like line of it_fcat.
*selection screen
SELECTION-SCREEN begin of block k with frame title text-001.
* select-OPTIONS : s_kunnr for wa_kna1-kunnr.
select-OPTIONS : s_matnr for wa_mara-matnr.
SELECTION-SCREEN end of block k.
*select auery
*SELECT kunnr name1 INTO table it_kna1 from kna1 where kunnr in s_kunnr.
select matnr into table it_mara from mara where matnr in s_matnr.
*for displaying fieldcatalog
PERFORM fcat using '1' 'MATNR' 'material Number' 'C410' '20'.
* PERFORM fcat using '2' 'NAME1' 'Customer Name' 'C410' '36'.
*for displaying output
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER = ' '
* I_BUFFER_ACTIVE = ' '
* I_CALLBACK_PROGRAM = ' '
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
* I_CALLBACK_USER_COMMAND = ' '
* 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 = 'Report for Customer Details'
* I_GRID_SETTINGS =
* IS_LAYOUT =
IT_FIELDCAT = it_fcat[]
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
* IT_SORT =
* IT_FILTER =
* IS_SEL_HIDE =
* I_DEFAULT = 'X'
* I_SAVE = ' '
* IS_VARIANT =
* IT_EVENTS =
* IT_EVENT_EXIT =
* IS_PRINT =
* IS_REPREP_ID =
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* I_HTML_HEIGHT_TOP = 0
* I_HTML_HEIGHT_END = 0
* IT_ALV_GRAPHICS =
* IT_HYPERLINK =
* IT_ADD_FIELDCAT =
* IT_EXCEPT_QINFO =
* IR_SALV_FULLSCREEN_ADAPTER =
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = it_mara.
* 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.
*CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
* EXPORTING
**** I_INTERFACE_CHECK = ' '
**** I_CALLBACK_PROGRAM =
**** I_CALLBACK_PF_STATUS_SET = ' '
**** I_CALLBACK_USER_COMMAND = ' '
**** IS_LAYOUT =
* IT_FIELDCAT = it_fcat
**** IT_EXCLUDING =
**** IT_SPECIAL_GROUPS =
**** IT_SORT =
**** IT_FILTER =
**** IS_SEL_HIDE =
**** I_SCREEN_START_COLUMN = 0
**** I_SCREEN_START_LINE = 0
**** I_SCREEN_END_COLUMN = 0
**** I_SCREEN_END_LINE = 0
**** I_DEFAULT = 'X'
**** I_SAVE = ' '
**** IS_VARIANT =
**** IT_EVENTS =
**** IT_EVENT_EXIT =
*** i_tabname_header =
*** i_tabname_item =
**** I_STRUCTURE_NAME_HEADER =
**** I_STRUCTURE_NAME_ITEM =
*** is_keyinfo =
**** IS_PRINT =
**** IS_REPREP_ID =
**** I_BYPASSING_BUFFER =
**** I_BUFFER_ACTIVE =
**** IR_SALV_HIERSEQ_ADAPTER =
**** IT_EXCEPT_QINFO =
**** I_SUPPRESS_EMPTY_DATA = ABAP_FALSE
**** IMPORTING
**** E_EXIT_CAUSED_BY_CALLER =
**** ES_EXIT_CAUSED_BY_USER =
* tables
** t_outtab_header = it_
* t_outtab_item = it_kna1.
**** 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.
*& Form FCAT
* text
* -->P_0052 text
* -->P_0053 text
* -->P_0054 text
form FCAT using fp_col_pos
fp_fieldname
fp_seltext_m
fp_emphasize
fp_outputlen..
wa_fcat-col_pos = fp_col_pos.
wa_fcat-fieldname = fp_fieldname.
wa_fcat-seltext_m = fp_seltext_m.
wa_fcat-emphasize = fp_emphasize.
wa_fcat-outputlen = fp_outputlen.
append wa_fcat to it_fcat.
clear : wa_fcat.
endform. " FCAT
FORM SET_PF_STATUS .
SET PF-STATUS 'ZNEWSTATUS' .
"Copy of 'STANDARD' pf_status from fgroup SALV
endform.
i need one push button in alv output display.
Thanks and Regards,
Thirukumaran. RHI THIRU TRY FOLLOWING CODES:
*& Report ZSAMPLE
REPORT ZSAMPLE.
TABLES:MARA.
TYPE-POOLS: SLIS.
TYPES:BEGIN OF TY_ITAB,
MATNR LIKE MARA-MATNR,
ERSDA LIKE MARA-ERSDA,
END OF TY_ITAB.
DATA:ITAB TYPE STANDARD TABLE OF TY_ITAB WITH HEADER LINE.
DATA:FCAT TYPE SLIS_T_FIELDCAT_ALV,
WA_FCAT TYPE SLIS_FIELDCAT_ALV,
LAYOUT TYPE SLIS_LAYOUT_ALV,
WA_LAYOUT TYPE SLIS_LAYOUT_ALV.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS:P_MATNR TYPE MARA-MATNR.
SELECTION-SCREEN END OF BLOCK B1.
START-OF-SELECTION.
PERFORM FIELDCAT.
LAYOUT-ZEBRA = 'X'.
PERFORM OUTPUT.
*& Form PF_STATUS
text
-->RT_EXTAB text
FORM PF_STATUS USING RT_EXTAB TYPE SLIS_T_EXTAB.
SET PF-STATUS 'BUTT'.
ENDFORM. "PF_STATUS
*& Form PUSH_BUTT1
text
-->R_UCOMM text
-->RS_SELFIELD text
FORM GET USING R_UCOMM LIKE SY-UCOMM RS_SELFIELD TYPE SLIS_SELFIELD.
CASE R_UCOMM.
WHEN 'GET'.
IF SY-SUBRC EQ 0.
CALL TRANSACTION 'SE11'.
ELSE.
ENDIF.
WHEN 'EXIT' OR 'CANCEL' .
LEAVE PROGRAM.
ENDCASE.
ENDFORM. "PUSH_BUTT1
*& Form FIELDCAT
text
--> p1 text
<-- p2 text
FORM FIELDCAT .
WA_FCAT-SELTEXT_L = 'Select'.
WA_FCAT-COL_POS = '1'.
WA_FCAT-FIELDNAME = 'CHECK'.
WA_FCAT-CHECKBOX = 'X'.
WA_FCAT-TABNAME = 'ITAB'.
WA_FCAT-OUTPUTLEN = '4'.
WA_FCAT-INPUT(1) = 'X'.
WA_FCAT-EDIT_MASK(1) = 'X'.
WA_FCAT-EDIT(1) = 'X'.
APPEND WA_FCAT TO FCAT.
CLEAR WA_FCAT.
WA_FCAT-SELTEXT_L = 'Material Number'.
WA_FCAT-COL_POS = '2'.
WA_FCAT-FIELDNAME = 'MATNR'.
WA_FCAT-TABNAME = 'ITAB'.
WA_FCAT-OUTPUTLEN = '18'.
APPEND WA_FCAT TO FCAT.
CLEAR WA_FCAT.
WA_FCAT-SELTEXT_L = 'Date'.
WA_FCAT-COL_POS = '3'.
WA_FCAT-FIELDNAME = 'ERSDA'.
WA_FCAT-TABNAME = 'ITAB'.
WA_FCAT-OUTPUTLEN = '8'.
APPEND WA_FCAT TO FCAT.
CLEAR WA_FCAT.
ENDFORM. " FIELDCAT
*& Form OUTPUT
text
--> p1 text
<-- p2 text
FORM OUTPUT .
SELECT MATNR ERSDA FROM MARA
INTO TABLE ITAB
WHERE MATNR EQ P_MATNR.
IF SY-SUBRC EQ 0.
PERFORM GRID.
ELSE.
MESSAGE 'No Records Found' TYPE 'I'.
ENDIF.
ENDFORM. " OUTPUT
*& Form GRID
text
--> p1 text
<-- p2 text
FORM GRID .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = 'PF_STATUS'
I_CALLBACK_USER_COMMAND = 'GET'
IS_LAYOUT = LAYOUT
IT_FIELDCAT = FCAT
I_DEFAULT = 'X'
TABLES
T_OUTTAB = ITAB.
ENDFORM. " GRID
REGARDS,
SAKTHIVEL.VT -
How can I resolve the push button dot issue in oracle forms 10g..?
Hi All,
We have migrated to forms6i to forms10g, in 6i all the push button labels are displaying properly, but in 10g forms its giving dots like this … after displaying some characters. I guess its width problem but how come its changing in 10g alone.
Kindly give me any workaround to resolve this issue
Thanks in Advance
Thangaraj.Hi All,
We have migrated the forms 6i to forms 10g R2.We are facing push button issue like,the lable is displayed in the button is reduced.Assume the button's label name is Cancel.Actully it is displaying like Can.....Due to Java used in forming the buttons.We have forms count nearly 300.We have diffent size buttons.
We have solution like
1.Manually
2.PC Creation
3.Java Class and Jar Files
4.JDAPI
5.basejini.htm
The method five,we have tried.But there is no changes after this changes also.
Can you guys please let us know the correct menthod(with steps 1 by 1) to do this in quickly.
2.There are look and feel 2 types oracle and generic,rather than this do we have any other type.We are looking for any cusrtomized settings in config files.
Thanks in Advance.
Regards,
GR -
How Can I hide search help button in alv ?
Hi Sdn .
I want to hide search help button in my alv ..
My gs_fcat-f4availabl = 'X'. is not active .. but there is search help button .
How Can I hide button .
Regards .
Serkanndonnot pass any values in field catalog for reference field and reference table.
or dont use any standard data element -
How can we split the grid display in alv reports.
hi everyone.i am trying to get the display of two reports in a single one using split screens.i had written a report for vendor balance.one for open and one for cleared items.how can i combine these two reports.
the field catalog was same for these two.
can anyone suggest me suitable way to perform.HI,
You can also try ALV Blocked display.
Pls Check following program
BCALV_TEST_BLOCK_LIST.
FM used are
call function 'REUSE_ALV_BLOCK_LIST_INIT'
exporting
i_callback_program = sy-repid.
call function 'REUSE_ALV_BLOCK_LIST_APPEND'
exporting
is_layout = it_layout
it_fieldcat = fc
i_tabname = 'IT_VBRK1'
it_events = it_event
tables
t_outtab = it_vbrk1.
call function 'REUSE_ALV_BLOCK_LIST_APPEND'
exporting
is_layout = it_layout
it_fieldcat = fc1
i_tabname = 'IT_VBRK2'
it_events = it_event
tables
t_outtab = it_vbrk2.
call function 'REUSE_ALV_BLOCK_LIST_DISPLAY'.
form top_of_page1.
format color col_positive.
write: / 'FIRST BLOCK'.
endform. -
How can give the user defined parameter in alv report
Hi experts
I have created one alv report for Sale Order statement.In this alv report have different input parameters
My problem is in this alv i have two input field Sales Orgaization and Plant.When I set this parameter value in user details it snot affected in my alv report.But it is affected in the standard alv report.How can
i rectify this
Regards
Manojhi
i think don't use set parameter value, use there SUBMIT & RETURN statement and write in USER_COMMAND function.
FORM USER_COMMAND USING P_UCOMM LIKE SY-UCOMM
P_SELFIELD TYPE SLIS_SELFIELD.
SUBMIT program name AND RETURN
WITH <selection-screen field> IN <selection-screen field>
WITH WERKS IN WERKS .
ENDFORM .
Regards,
Abhi -
How can i choose row to edit in alv report
hello ,
i done alv report with one coloumne that can be edit ,
in this coloumne i want to choose which rows can be edit
and which will be close according to event .
i saw example program "BCALV_EDIT_02" that show this case
but stile , i don't understand what is the action that
do it .
this is the part
IF p_mode EQ 'RW'.
*§2a.Use attribute CL_GUI_ALV_GRID=>MC_STYLE_ENABLED to set a cell
to status "editable".
l_mode = cl_gui_alv_grid=>mc_style_enabled.
ELSE. "p_mode eq 'RO'
*§2b.Use attribute CL_GUI_ALV_GRID=>MC_STYLE_DISABLED to set a cell
to status "non-editable".
l_mode = cl_gui_alv_grid=>mc_style_disabled.
ENDIF.
so what is the part that will close the row for edit ?
when i add this part in my report all the row is deleted.
thanks.Dakota,
You can change the settings at runtime.
What you need to do is to have another column as part of the internal table, that has the data. This column, say, STYLE will refer to LVC_T_STYL. So, this becomes a nested internal table.
Set the editable flga switched off at Fieldcat and layout level.
Now, while filling the data in the table, or looping it separately, fill the Styles table for each row accordingly depending on the conditions. So, if you want the entire row to be enabled for editing, there will so many rows as the no. of columns in the inner internal table which is a column of that row.
col1 col2 Col3 Style
1 1 2 Col1 -- Style_Disabled
___________________Col2 -- Style_Disabled
___________________Col3 -- Style_Disabled
This should solve your problem.
Regards,
Ravi
note : Please reward the posts that help you.
Message was edited by: Ravikumar Allampallam -
How can I place a "List box" on a report?
XI31 SP3
Similar to input controls, however, I want to be able to show a webi report as a dashboard within infoview (dashboard tab), but I need a "list/combo" box for user interaction.
Is there a way to do this?Hi Michael,
Left panel input controls cannot yet be inserted into WebI report, but WebI allow to use report elements as input controls.
You can therefore insert a table in your report, and use it as a selection list : you just need to insert and design a vertical or horizontal table from a single dimension, and use it as an input control : select the table and start report element input control wizard from the contextual menu command called Define as input control....
BTW, You can also use this feature on charts.
Hope that helps,
David. -
How can i exceed the sap screen in ALV report.
hi sap Gurus,
i need solution from you regarding to increase the SAP screen in ALV customised report.
now what we are getting the problem is:
we developed the report, in that lot of fields are there.
because of that the fields are going in second line.
but actually the max length is showing in SAP is :X_65_255.
Please give me the solution to increase the screen.
Regards,
SOMU.Hi,
The standard screen which is displayed once u execute it not possible to change, but can follow one guide line.. by reducing the feild discrption( columns) on the report .
Eg : sold to part can be changed to SP or someother conversion which user understands. ( Before this user confirmation should be taken for this change)
Kindly Reward points if usefull
Regards
vK -
How can we create a push-button in ALV-GRID.
How will u handle a push-button in ALV.Hello,
To add a push button and handle it,you have to define a local class and use the methods <b>handle_toolbar</b> and <b>handle_user_command</b>.Here is a sample code:
CLASS lcl_eh DEFINITION
CLASS lcl_eh DEFINITION.
PUBLIC SECTION.
DATA:
<b>ls_toolbar TYPE stb_button</b>.
METHODS:
<b>handle_toolbar</b>
FOR EVENT toolbar OF cl_gui_alv_grid
IMPORTING e_object e_interactive,
<b>handle_user_command</b>
FOR EVENT user_command OF cl_gui_alv_grid
IMPORTING e_ucomm.
ENDCLASS. "lcl_eh DEFINITION
*Type referencing an object of the class
<b>DATA: lo_obj TYPE REF TO lcl_eh.</b>
CLASS lcl_eh IMPLEMENTATION
CLASS lcl_eh IMPLEMENTATION.
*METHOD: HANDLE_TOOLBAR
*DESCRIPTION: This method provides the necessary detail required to
create an extra button in the toolbar.
METHOD <b>handle_toolbar.</b>
CLEAR ls_toolbar.
MOVE 'CREATE' TO ls_toolbar-function.
MOVE 0 TO ls_toolbar-butn_type.
MOVE 'CREATE' TO ls_toolbar-text.
MOVE 'ICON_DETAIL' TO ls_toolbar-icon.
MOVE 'CREATE' TO ls_toolbar-quickinfo.
<b>APPEND ls_toolbar TO e_object->mt_toolbar.</b>
ENDMETHOD. "handle_toolbar
*METHOD: HANDLE_USER_COMMAND
*DESCRIPTION: This method is used to handle the push button
<b>METHOD handle_user_command.</b>
<b> CASE e_ucomm.</b>
<b> WHEN 'CREATE'.</b>
**logic
ENDCASE.
ENDMETHOD.
ENDCLASS.
Regards,
Beejal
**reward if this helps -
How to automatically off the push button
how can i set the push button to be off automatically after meet certain condition.
i attached simple example just to represent this problem
Solved!
Go to Solution.
Attachments:
ex.vi 7 KBsmercurio_fc wrote:
I think the user is actually asking how to stop the outer loop if the Stop button is pressed or the iteration count reaches 10.
To poster: You need an OR condition on the outer loop's conditional terminal. One OR input comes from the Stop button. The other comes from the case structure. In the False case you wire out a False Boolean constant. In the True part you wire out a True. You could also wire the OR input to the Boolean control directly since this amounts to the same thing.
Code comments:
Do not create greedy loops. Use a small delay so you don't starve the CPU.
I think you want the inner loop's condition terminal to be "Continue if True".
You can use the Increment function rather than using an Add function and a constant of 1.
You don't actually need the inner loop at all. You can use a Feedback Node.
Adding to these comments it is important to note that if you read the value of a button to control stopping a loop you should always ensure that you read it AFTER you execute all of your code in the loop. If you don't you can easily end up with an "off-by-one" execution since the button will get read very early in the loop iteration and it will use that value when deciding if the loop should exit or not. It won't use the value of the button at that instance in time (end of teh loop iteration).
Mark Yedinak
"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot -
How can I place active buttons in keynote?
hellooo,
how can I place active buttons in keynote?
thx in advanceanswered in
/message/4078825#4078825 [original link is broken]
kindly avoid duplicate posts for the same issue.
Raja -
How can I place calendars in multiple calendar groups?
I would like to use a group for each of my family members but reference some of the same calendars from multiple calendar groups. Here is an example:
Lets say I have a calendar for school, sport1, sport2, activity, family, and work
I would like the groups to look like this:
Me: family and work
Wife: activity and family
Son_1: school, sport1 and family
Son_2: school, sport2 and family
When a group is visible, that person can see the activities in which they participate. When several groups are visible, though, only single copies of shared events would appear and shared events would only have to be entered once.
Is there a way to do this or do I need to place this on the feedback page?Bernd Alheit wrote:
How can I place Windows Media Player in my PDF?
Why want you the media player in a pdf file?
e.g. pushing Mozart - button to listen to Mozart's music. But it must be a script not embedded player. Is it possible?
Maybe you are looking for
-
Really strange: System.in.read()
Hello, this code: System.out.print( "command?" ); while(true) { try { int input = System.in.read(); if( input == 50 ) System.out.println( "Input: " + input ); catch(IOException) { System.out.println( "Who c
-
Panasonic PV-GS400, good for macs?
Interested in the Panasonic PV-GS400 mini DV camera. Is this compatiable with Final Cut Express/Pro for macs???
-
We are getting error message "Wily BC patch /usr/sap/<SID>/JC06 is not a directory while doing managed systems setup. System verification is successful. The Java directory should be /usr/sap/<SID>/J06 in our case, which is showing correctly in LMDB.
-
SWAPPED MY OLD NUMBER to Bt 1 week ago several issues when i signed up I only had my old email address so bt send me messages on that can i change it to my new bt address so bt send me emails to my old address which i cannot read on bt mail 2nd point
-
Swing : login with error checking
Hi all, I am trying to write a login with error checking on the password. If password validation fail. It will remain there. If it passes it will go to the application. any samples and sites please. thanks andrew