Print Screen Data Containing ALV
Hi,
I Have a application where in a screen I have a Text Box below which is an ALV. Now I have a custom button named PRINT. When we press the print it should sent a print to the local printer containing the text box and ALV data in it. So it should like as it was in the screen. Knowing that menu bar and ALV has the standard print option, but the client requirement asks for this.
Please throw some input on this.
Regards,
Jagath.
Hi,
Try handling this using the events. for the UCOMM for the button print, code the same functionality as in the standard tool bar PRINT button.
Rgds,
HR
Similar Messages
-
wary about upgrading my wife's 3gs from ios4 to ios6. will the data associated with an app be lost or will it be restored from the backup after the upgrade completes. There is no way to export, email or even print the data contained in the app so I am concerned
If the backup and restore takes place properly, you shouldn't have any issue as millions of people have done an update from iOS 4.
-
How to print some data in alv which is not in table.
hi all,
Please can any one tell me how to print some text in the existing alv program to the second line of every record.
the header is there but it is empty.In the data,
there are two lines printing for a normal alv.the same text should be printed in every second line of each record.Please reply soon.its urgent.This is not possible in ALV.
When you say some text I assume the text is not in the same columnar format as the list is.
ALV supports only a columnar format (except for subtotals).
You can add the text to the ITAB by parsing the text to the record. It is not going to look good if you do that. -
Print screen message contained in the printed screen
Hi All,
I recently installed forms6 onto a vista machine and have forms working fine but I have a problem where if I choose the Print Screen option from the Action menu , the message 'Print Capture beginning. Dont move or occlude window until done' actually appears in the printout. The forms screen is maximised as well.
has anyone come across this before?
Thanks.Hi,
One of our customers has the same Problem on Windows Vista: the message 'Print Capture beginning. Dont move or occlude window until done' is included in the print.
Is there already a solution for it?
Thanks -
Displaying selection screen data on alv header in multiple rows and columns
Hi
Presently in my requirement , whatever the data entered in selection screen should display on alv header and item details on alv grid display.
for eg...
on alv header
customer no : 1000 to 2000 sales order no: 111
name : gff to ff sales org:
city: country:
item details below this
plz guide me how to solve this issue.
Thanks & Regards,
PradeepHi,
Check this code this may help you.
<code>
TYPE-POOLS : SLIS.
TABLES VBRK.
TYPES : BEGIN OF TY_VBRK,
VBELN TYPE VBRK-VBELN,
VKORG TYPE VBRK-VKORG,
VTWEG TYPE VBRK-VTWEG,
SPART TYPE VBRK-SPART,
FKDAT TYPE VBRK-FKDAT,
END OF TY_VBRK,
BEGIN OF TY_VBRP,
VBELN TYPE VBRP-VBELN,
POSNR TYPE VBRP-POSNR,
MATNR TYPE VBRP-MATNR,
ARKTX TYPE VBRP-ARKTX,
FKIMG TYPE VBRP-FKIMG,
NETWR TYPE VBRP-NETWR,
END OF TY_VBRP,
BEGIN OF TY_TARGET,
VBELN TYPE VBRK-VBELN,
VKORG TYPE VBRK-VKORG,
VTWEG TYPE VBRK-VTWEG,
SPART TYPE VBRK-SPART,
FKDAT TYPE VBRK-FKDAT,
POSNR TYPE VBRP-POSNR,
MATNR TYPE VBRP-MATNR,
ARKTX TYPE VBRP-ARKTX,
FKIMG TYPE VBRP-FKIMG,
NETWR TYPE VBRP-NETWR,
END OF TY_TARGET.
DATA : T_VBRK TYPE TABLE OF TY_VBRK,
W_VBRK TYPE TY_VBRK,
T_VBRP TYPE TABLE OF TY_VBRP,
W_VBRP TYPE TY_VBRP,
T_TARGET TYPE TABLE OF TY_TARGET,
W_TARGET TYPE TY_TARGET,
FIELD CATALOG ******************
T_FCAT TYPE SLIS_T_FIELDCAT_ALV,
W_FCAT TYPE SLIS_FIELDCAT_ALV,
*************************************SUB TOTALS AND SORTING***********
T_SORT TYPE SLIS_T_SORTINFO_ALV,
W_SORT TYPE SLIS_SORTINFO_ALV,
*************************************FOR LIST HEADER******************
T_LIST_HEAD TYPE SLIS_T_LISTHEADER,
W_LIST_HEAD TYPE SLIS_LISTHEADER,
T_LIST_HEAD1 TYPE SLIS_T_LISTHEADER,
W_LIST_HEAD1 TYPE SLIS_LISTHEADER,
*************************************FOR LIST HEADER******************
W_LAYOUT TYPE SLIS_LAYOUT_ALV,
************************************FOR EVENTS************************
T_EVENT TYPE SLIS_T_EVENT,
W_EVENT TYPE SLIS_ALV_EVENT.
*********************************SELECT OPTIONS***********************
SELECT-OPTIONS : S_VBELN FOR VBRK-VBELN DEFAULT 90005316 TO 90005330.
**RETRIVING DATA************************
PERFORM DATA_RETRIVE.
**BUILDING THE FIELD CATALOG************
PERFORM BUILD_FCAT.
**BUILDING THE TABLE FOR LIST HEADER****
PERFORM BUILD_LIST_HEAD.
*******************************CALLING THE FUNCTION MODULE************
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_TOP_OF_PAGE = 'LIST_TOP_OF_PAGE'
IT_FIELDCAT = T_FCAT
IT_SORT = T_SORT
TABLES
T_OUTTAB = T_TARGET.
*& Form DATA_RETRIVE
FORM DATA_RETRIVE .
SELECT VBELN VKORG VTWEG SPART FKDAT FROM VBRK INTO CORRESPONDING FIELDS
OF TABLE T_VBRK WHERE VBELN IN S_VBELN.
IF SY-SUBRC EQ 0.
SORT T_VBRK BY VBELN.
SELECT VBELN POSNR MATNR ARKTX FKIMG NETWR FROM VBRP INTO TABLE
T_VBRP FOR ALL ENTRIES IN T_VBRK WHERE VBELN = T_VBRK-VBELN.
ENDIF.
LOOP AT T_VBRP INTO W_VBRP.
LOOP AT T_VBRK INTO W_VBRK WHERE VBELN = W_VBRP-VBELN.
W_TARGET-VBELN = W_VBRK-VBELN.
W_TARGET-VKORG = W_VBRK-VKORG.
W_TARGET-VTWEG = W_VBRK-VTWEG.
W_TARGET-SPART = W_VBRK-SPART.
W_TARGET-FKDAT = W_VBRK-FKDAT.
W_TARGET-POSNR = W_VBRP-POSNR.
W_TARGET-MATNR = W_VBRP-MATNR.
W_TARGET-ARKTX = W_VBRP-ARKTX.
W_TARGET-FKIMG = W_VBRP-FKIMG.
W_TARGET-NETWR = W_VBRP-NETWR.
APPEND W_TARGET TO T_TARGET.
ENDLOOP.
ENDLOOP.
SORT T_TARGET BY VBELN.
ENDFORM. " DATA_RETRIVE
*& Form BUILD_FCAT
FORM BUILD_FCAT .
W_FCAT-COL_POS = 1.
W_FCAT-FIELDNAME = 'VBELN'.
W_FCAT-SELTEXT_M = 'BILLING NO'.
APPEND W_FCAT TO T_FCAT.
W_FCAT-COL_POS = 2.
W_FCAT-FIELDNAME = 'VKORG'.
W_FCAT-SELTEXT_M = 'SALES ORGANIZATION'.
APPEND W_FCAT TO T_FCAT.
W_FCAT-COL_POS = 3.
W_FCAT-FIELDNAME = 'VTWEG'.
W_FCAT-SELTEXT_M = 'DISTRIBUTION CHANNEL'.
APPEND W_FCAT TO T_FCAT.
W_FCAT-COL_POS = 4.
W_FCAT-FIELDNAME = 'SPART'.
W_FCAT-SELTEXT_M = 'DIVISION'.
APPEND W_FCAT TO T_FCAT.
W_FCAT-COL_POS = 5.
W_FCAT-FIELDNAME = 'FKDAT'.
W_FCAT-SELTEXT_M = 'CREATION DATE'.
APPEND W_FCAT TO T_FCAT.
W_FCAT-COL_POS = 6.
W_FCAT-FIELDNAME = 'POSNR'.
W_FCAT-SELTEXT_M = 'BILLING ITEM'.
APPEND W_FCAT TO T_FCAT.
W_FCAT-COL_POS = 7.
W_FCAT-FIELDNAME = 'MATNR'.
W_FCAT-SELTEXT_M = 'MATERIAL NUM'.
APPEND W_FCAT TO T_FCAT.
W_FCAT-COL_POS = 8.
W_FCAT-FIELDNAME = 'ARKTX'.
W_FCAT-SELTEXT_M = 'DESCRIPTION'.
APPEND W_FCAT TO T_FCAT.
W_FCAT-COL_POS = 9.
W_FCAT-FIELDNAME = 'FKIMG'.
W_FCAT-SELTEXT_M = 'QUANTITY'.
APPEND W_FCAT TO T_FCAT.
W_FCAT-COL_POS = 10.
W_FCAT-FIELDNAME = 'NETWR'.
W_FCAT-SELTEXT_M = 'NET VALUE'.
W_FCAT-DO_SUM = 'X'.
APPEND W_FCAT TO T_FCAT.
ENDFORM. " BUILD_FCAT
*& Form BUILD_LIST_HEAD
FORM BUILD_LIST_HEAD .
DATA : L_DATE(10),
L_TIME(8).
W_LIST_HEAD-TYP = 'S'.
W_LIST_HEAD-KEY = 'Sales org :'.
W_LIST_HEAD-INFO = S_VBELN-LOW .
APPEND W_LIST_HEAD TO T_LIST_HEAD.
CLEAR W_LIST_HEAD.
W_LIST_HEAD-TYP = 'S'.
W_LIST_HEAD-KEY = 'TO '.
W_LIST_HEAD-INFO = S_VBELN-HIGH.
APPEND W_LIST_HEAD TO T_LIST_HEAD.
CLEAR W_LIST_HEAD.
ENDFORM. " BUILD_LIST_HEAD
*& Form LIST_TOP_OF_PAGE
FORM LIST_TOP_OF_PAGE .
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = T_LIST_HEAD.
ENDFORM. " LIST_TOP_OF_PAGE
<code>
Regards -
How to print the data in ALV list format using an existing layout
Hi all
Iam displaying the output in ALV list format and I saved the layout with some name
now my requirement is i have to provide a field to select the layout name with F4 help and if i execute the program it should show the output with that layout format
I tried this iam getting F4 help for that layout and selecting the layout but iam not getting the output with that layout iam getting the normal basic layout
Can anyone send me a sample program code or what to do to get that
Thank youHi,
refer this code.
DATA : wa_variant TYPE disvariant, "Work area for variant
wa_variant1 TYPE disvariant, "Work area for variant
wa_layout TYPE slis_layout_alv, "Work area for layout
*& Form sub_get_default_variant *
This form will initialize the variant *
FORM sub_get_default_variant .
*--Clear
CLEAR wa_variant.
*--Pass the report name
v_repid = sy-repid. "Report ID
wa_variant-report = v_repid.
*--Call the function module to get the default variant
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = c_save
CHANGING
cs_variant = wa_variant1
EXCEPTIONS
wrong_input = 1
not_found = 2
program_error = 3
OTHERS = 4.
*--Check Subrc
IF sy-subrc = 0.
p_varnt = wa_variant-variant.
ENDIF.
ENDFORM. "sub_get_default_variant
*& Form sub_f4_for_variant *
This form will display the List of Variants *
FORM sub_f4_for_variant .
*--Local Variables
DATA: lv_exit(1) TYPE c. "ALV exit
*--Call the function module to display the list of Variants
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = wa_variant
i_save = c_save
IMPORTING
e_exit = lv_exit
es_variant = wa_variant1
EXCEPTIONS
not_found = 1
program_error = 2.
*--Check Subrc
IF sy-subrc <> 2 AND lv_exit IS INITIAL.
p_varnt = wa_variant1-variant.
ENDIF.
ENDFORM. "sub_f4_for_variant
*& Form sub_check_variant *
This form will check the variant *
FORM sub_check_variant .
IF NOT p_varnt IS INITIAL.
CLEAR wa_variant1.
MOVE wa_variant TO wa_variant1.
MOVE p_varnt TO wa_variant1-variant.
*--Call the function module to check the variant exist
CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
EXPORTING
i_save = c_save
CHANGING
cs_variant = wa_variant1.
wa_variant = wa_variant1.
ENDIF.
ENDFORM. "sub_check_variant
Regards,
Prashant -
Printing selected data in ALV or Table in Web Dynpro for ABAP
Hi Experts,
I have ALV / Table report in the Web Dypro for ABAP App. User wants to select a record in ALV/ table and / or preview it in PDF form and then he/she can print it. What is the technical steps do I need to achieve this result?
Thanks!
- Anthony -Hi,
In the Road map UI element , you can find number of Step .
Add one Interactive form in one that steps. Capture that records , pass that records to Step where the interactive form is there.
I think it will work...
regards,
Rama -
How to print text on container using oop on alv list
Hello Guru's,
pl guide me how to print text on container using alv list-display which have interactive events using oop classes/methods ...
I want to print hard coded text on coantainer , on double clicking it will call another screen.
Pl Help..
Message was edited by:
paresh sonavaneHi Paresh,
1. Go to the Layout and Create One custom container box and give name it.
2. Custom Container is the one type of tool and its used for Displaying the Reports
with the use of ABAP Objects.
3. Go to se38 and Write The Following Code.
tables ZTEAM_GD.
DATA : OBJ TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
OBJ1 TYPE REF TO CL_GUI_ALV_GRID.
DATA IT_TEAM LIKE TABLE OF ZPLAYER_BAT_DET .
SELECT * FROM ZPLAYER_BAT_DET INTO TABLE IT_TEAM.
CREATE OBJECT OBJ
EXPORTING
CONTAINER_NAME = 'ALV'. -
> Give ur Container Name
CREATE OBJECT OBJ1
EXPORTING
I_PARENT = OBJ.
CALL METHOD OBJ1->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_STRUCTURE_NAME = 'ZPLAYER_BAT_DET'
CHANGING
IT_OUTTAB = IT_TEAM.
*CALL METHOD OBJ1->SET_DROP_DOWN_TABLE
EXPORTING
I_STRUCTURE_NAME = 'ZTEAM_GD'
CHANGING
IT_OUTTAB = IT_TEAM.
CALL SCREEN 9000.
*& Module USER_COMMAND_9000 INPUT
text
MODULE USER_COMMAND_9000 INPUT.
CASE SY-UCOMM.
WHEN 'EXT'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_9000 INPU
Thanks.
Reward If Helpful. -
Destroy ALV which is using Screen as container
<b>What I did:</b>
*In the PBO of screen <b>200</b>
*Created a l_alv of type alv grid which is using screen as container
CREATE OBJECT l_alv EXPORTING i_parent = cl_gui_container=>screen0.
*filling it with data
*--Transfer data to ALV
CALL METHOD l_alv->set_table_for_first_display
Expor . . .
When user is pressing F3 on screen <b>200</b>, i m going back to sel-screen
leave to screen 1000
or
call selection-screen 1000
<b>Problem Statement:</b>
Though I am landing up to screen 1000 as i can see the menu of sel screen, but my ALV is still visible on top of screen 1000
<b>What I did:</b>
to destroy it, i m using these lines before <i>Call selection-screen 1000</i>
call method cl_gui_container=>screen0->free.
call method l_alv->free.* Internal Tables:
DATA: i_exclude TYPE ui_functions, " Function button table definitions
i_fieldcat TYPE lvc_t_fcat, " Field catalogue
i_output TYPE STANDARD TABLE OF ZLIGHT_STRUC,
i_groups TYPE lvc_t_sgrp,
* Work Areas:
w_variant TYPE disvariant, " Enable variant saving
w_layout TYPE lvc_s_layo, " Define the layout structure
w_output TYPE MARA.
* Constants Declaration
CONSTANTS: c_a TYPE c VALUE 'A'. "All Layouts
* Object Declarations
DATA : o_alvgrid TYPE REF TO cl_gui_alv_grid,
o_dockingcontainer TYPE REF TO cl_gui_docking_container.
In PBO,
FORM f9000_objects_create.
* Check to see if we are runnng on online
IF cl_gui_alv_grid=>offline( ) IS INITIAL.
CREATE OBJECT o_dockingcontainer
EXPORTING
ratio = '95'
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
others = 6.
IF sy-subrc NE 0.
* MESSAGE i001 WITH text-e01.
LEAVE LIST-PROCESSING.
ENDIF.
ENDIF.
CREATE OBJECT o_alvgrid
EXPORTING
i_parent = o_dockingcontainer.
ENDFORM. " f9000_objects_create
FORM f9200_build_field_cat TABLES p_fieldcat STRUCTURE lvc_s_fcat
USING value(p_structure).
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = p_structure
CHANGING
ct_fieldcat = p_fieldcat[]
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE i277.
LEAVE LIST-PROCESSING.
ENDIF.
ENDFORM. " f9200_build_field_cat
FORM f9400_layout USING value(ptitle)
value(pzebra)
value(pmode)
value(pwidth)
value(pvariant).
w_layout-grid_title = ptitle.
w_layout-zebra = pzebra.
w_layout-sel_mode = pmode.
w_layout-cwidth_opt = pwidth.
w_variant-handle = pvariant.
w_variant-report = sy-repid.
ENDFORM. " f9400_layout
FORM f9500_display_data TABLES p_output
p_groups
p_exclude
p_fieldcat
USING value(p_layout).
CALL METHOD o_alvgrid->set_table_for_first_display
EXPORTING
is_variant = w_variant
i_save = c_a
is_layout = p_layout
it_special_groups = p_groups[]
it_toolbar_excluding = p_exclude[]
CHANGING
it_outtab = p_output[]
it_fieldcatalog = p_fieldcat[]
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE i278.
LEAVE LIST-PROCESSING.
ENDIF.
ENDFORM. " f9500_display_data
FORM f9600_free_objects USING pobject
value(ptype)
value(ptext).
DATA: l_objectalv TYPE REF TO cl_gui_alv_grid.
* Need to type the field symbol or it does not work
CASE ptype.
WHEN 'ALV'.
l_objectalv = pobject.
IF NOT ( l_objectalv IS INITIAL ).
CALL METHOD l_objectalv->free
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
CLEAR: pobject, l_objectalv.
PERFORM f9700_error_handle USING ptext.
ENDIF.
WHEN 'DOCKING'.
DATA: lobjectdock TYPE REF TO cl_gui_docking_container.
lobjectdock = pobject.
IF NOT ( lobjectdock IS INITIAL ).
CALL METHOD lobjectdock->free
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
CLEAR: pobject, lobjectdock.
PERFORM f9700_error_handle USING ptext.
ENDIF.
WHEN 'CONTAINER'.
DATA: lobjectcontainer TYPE REF TO cl_gui_container.
lobjectcontainer = pobject.
IF NOT ( lobjectcontainer IS INITIAL ).
CALL METHOD lobjectcontainer->free
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
CLEAR: pobject, lobjectcontainer.
PERFORM f9700_error_handle USING ptext.
ENDIF.
WHEN OTHERS.
sy-subrc = 1.
PERFORM f9700_error_handle USING
text-e04.
ENDCASE.
ENDFORM. " f9600_free_objects
*& Form f9700_error_handle
* This form is used to handle errors
* -->P_PTEXT - Text holding the messsage to be displayed as
* information
FORM f9700_error_handle USING value(ptext).
IF sy-subrc NE 0.
* Add your handling, for example
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = text-e03
txt2 = sy-subrc
txt1 = ptext.
ENDIF.
ENDFORM. " f9700_error_handle
MODULE status_9001 OUTPUT.
IF o_dockingcontainer IS INITIAL.
SET PF-STATUS 'ZSTATUS'.
SET TITLEBAR 'ZTITLE'.
*Create Objects
PERFORM f9000_objects_create.
*Build field catalog
PERFORM f9200_build_field_cat TABLES i_fieldcat
USING 'MARA.
*Layout
PERFORM f9400_layout USING sy-title 'X' 'X' 'X' p_layout.
*Display data
PERFORM f9500_display_data TABLES i_output
i_groups
i_exclude
i_fieldcat
USING w_layout.
ENDIF.
ENDMODULE. " STATUS_9001 OUTPUT
*& Module USER_COMMAND_9001 INPUT
* This is used for PAI details
MODULE user_command_9001 INPUT.
CASE sy-ucomm.
WHEN 'EXIT' OR 'CANC'.
PERFORM f9600_free_objects:
USING o_alvgrid 'ALV' text-e02,
USING o_dockingcontainer 'DOCKING'
text-e01.
LEAVE PROGRAM.
WHEN 'BACK'.
PERFORM f9600_free_objects:
USING o_alvgrid 'ALV' text-e02,
USING o_dockingcontainer 'DOCKING'
text-e01.
SET SCREEN '0'.
LEAVE SCREEN.
WHEN OTHERS.
ENDCASE.
ENDMODULE. " USER_COMMAND_9001 INPUT
Hope this helps u. -
Print Selection Screen Parameters in ALV report only once
Does anyone know how to print the selection screen within a ALV report.
I've tried everything. I have the code to capture the selection parameters into a internal table. I can use top_of_page but I only want it printed once.Hi,
If you have captured the selection screen entries in an internal table, then you could display it once by using the BLOCK LIST ALV.
Check the function module.
REUSE_ALV_BLOCK_LIST_DISPLAY
Using this function module more than 1 alv could be display in the report.
In our case ..there will be two alvs ...one for the selection screen n other for the main report output.
Check the following example on the block List ALV....
<b>BALVBT01</b>.
Regards,
Vara -
Displaying selection screen details in Alv Report output display as Header
Hi all,
May be somebody knows how I can show selected values with select-options in top_of_page using REUSE_ALV_GRID_DISPLAY.
This shoud work for all the reports and diff selection screens .
I need one dynamic process which will for display any report selection screen selected details.(Basically varient information of report).
Small example if possible, please.
Thanks in advance,
RimasHi Thiru,
Thanks for the input.
This is my exact requirement.
Hi Experts,
I would like to Display / Print Select-options selected details in ALV Header.
Ex: Say suppose here i enter kunnr as 1000
lifnr as 2000 to 4000
p_langu as 'EN'.
p_dir as 'C:\TEMP,
p_upda as 'X'
for selection screen below.
SELECTION-SCREEN :BEGIN OF BLOCK blk1 WITH FRAME TITLE text-000.
SELECT-OPTIONS : s_kunnr FOR kna1-kunnr.
SELECT-OPTIONS : s_lifnr FOR lfa1-lifnr.
PARAMETER : p_lanuge LIKE t002-spras DEFAULT sy-langu.
PARAMETER: p_dir LIKE rlgrap-filename
DEFAULT text-003 LOWER CASE.
PARAMETERS: p_upd AS CHECKBOX DEFAULT 'X'.
I dont want to Hard code selection screen values like
DATA: header TYPE slis_t_listheader,
wa TYPE slis_listheader,
wa-typ = 'S'(093).
wa-key = s_lifnr .
wa-info = 'Vendor no".
APPEND wa TO header.
I want dynamic process for all of my selection screen values selected
hard code may be it will be fine small selection screen it will work.
Fur that i got one process to get dynamically through fm
Ex: DATA: irsparams TYPE rsparams OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
curr_report = program
TABLES
selection_table = irsparams
EXCEPTIONS
not_found = 1
no_report = 2
OTHERS = 3.
loop at irsparams.
write : / irsparams-SELNAME.
write : / irsparams-SIGN.
write : / irsparams-OPTION.
write : / irsparams-LOW.
write : / irsparams-HIGH.
endloop.
I have done my requirement partially but i am failed to achive my full requirement.
Because
rsparams strcture is diff from slis_t_listheader.
Can any one help me for further assistence to display irsparams strcture data in alv header.
Thanks
Nag -
Handling PRINT option in OO-ALV PAI
Hi,
I am using OO-ALV with 6 Grids.I have split the containers and populated the 6 Grids. My requirement is to print all of them in one go( i.e without using individual toolbars)
I created a GUI Status and included the Icon for "Print". I am not being able to figure out how do I handle this in PAI. i.e after
Case Sy-Ucomm.
When 'PRINT'.
Please let me know if some function module would be of some help OR/AND anything more to be done.
Please help. Thanks in advance!!
SowrabhaHi,
First fill your Selection Screen data, then Press F9 or From Menu Program->Execute in Background->
then one popup comes for Printer details , then give the correct details, and then ok, then you can reach the JOB setting window, here click on Immediate and then press save button. then use SM37 transaction and check the Job status , if it is finished you will see the spool using that you can take print(if you give the option spool while giving printer details).
Regards
vijay -
Dipslyaning Selection-screen values on ALV....
Hi,
Please guide on Displaying Input parameters (selection screen) on the top of ALV grid in the output.
Regards
KrishnaYou can use TOP-OF-PAGE to display the details in the header of teh output.
Refer this code for OOPS ALV.
* Class definition :
* CLASS v_lcl_event_receiver DEFINITION
CLASS v_lcl_event_receiver DEFINITION.
PUBLIC SECTION.
METHODS:
handle_print_top_of_page FOR EVENT print_top_of_page OF
cl_gui_alv_grid,
handle_top_of_page FOR EVENT top_of_page OF
cl_gui_alv_grid.
ENDCLASS.
* CLASS V_LCL_EVENT_RECEIVER IMPLEMENTATION
CLASS v_lcl_event_receiver IMPLEMENTATION.
METHOD handle_print_top_of_page.
IF sy-pagno = 1.
PERFORM top_of_page.
ENDIF.
ENDMETHOD.
METHOD handle_top_of_page.
PERFORM top_of_page.
ENDMETHOD.
ENDCLASS.
DATA: v_event_receiver TYPE REF TO v_lcl_event_receiver.
FORM top_of_page.
WRITE: text-020,
ENDFORM. " top_of_page
In PBo of the screen
DATA: v_split TYPE REF TO cl_gui_easy_splitter_container,
v_contnr_top TYPE REF TO cl_gui_container,
v_contnr_bot TYPE REF TO cl_gui_container,
v_grid_02 TYPE REF TO cl_gui_alv_grid,
v_html TYPE REF TO cl_dd_document,
v_text20(255) TYPE c,
v_text16(255) TYPE c,
FORM f9000_objects_create.
IF cl_gui_alv_grid=>offline( ) IS INITIAL.
Create a container
CREATE OBJECT o_dockingcontainer
EXPORTING
ratio = '95'
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
others = 6.
IF sy-subrc NE 0.
MESSAGE i000 WITH text-e01."Error in creating Docking container
LEAVE LIST-PROCESSING.
ENDIF.
CREATE OBJECT v_split
EXPORTING
parent = o_dockingcontainer
* ORIENTATION = 0
sash_position = 25
with_border = 0
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
others = 3.
IF sy-subrc NE 0.
MESSAGE i000 WITH text-e01."Error in creating Docking container
LEAVE LIST-PROCESSING.
ENDIF.
* Get the containers of the splitter control
v_contnr_top = v_split->top_left_container.
v_contnr_bot = v_split->bottom_right_container.
CREATE OBJECT o_alvgrid
EXPORTING
i_parent = o_dockingcontainer.
* Create an instance of alv control
CREATE OBJECT o_alvgrid
EXPORTING i_parent = v_contnr_bot.
* Object for display of selection parameters in HTML top container
CREATE OBJECT v_html
EXPORTING
style = 'ALV_GRID'.
* Must be after the SET HANDLER for TOP_OF_PAGE and foreground only
CALL METHOD o_alvgrid->list_processing_events
EXPORTING i_event_name = 'TOP_OF_PAGE'
i_dyndoc_id = v_html.
v_text20 = text-020(summary Record counts)Any text.
CALL METHOD v_html->add_gap
EXPORTING
width = 120.
CALL METHOD v_html->add_text
EXPORTING
text = v_text20.
CALL METHOD v_html->new_line.
** Display Text-016
v_text16 = text-016.
CALL METHOD v_html->add_gap
EXPORTING
width = 1.
CALL METHOD v_html->add_text
EXPORTING
text = v_text16.
v_text16 = v_sap_recon.
CALL METHOD v_html->add_gap
EXPORTING
width = 1.
CALL METHOD v_html->add_text
EXPORTING
text = v_text16.
CALL METHOD v_html->new_line.
* Display the data
CALL METHOD v_html->display_document
EXPORTING
parent = v_contnr_top.
* Handle the event
CALL METHOD o_alvgrid->list_processing_events
EXPORTING i_event_name = 'PRINT_TOP_OF_PAGE'.
IN PBO while populating in the output table
FORM f9004_display_data TABLES p_report_tab
p_fieldcat.
CALL METHOD o_alvgrid->set_table_for_first_display
EXPORTING
is_variant = w_variant
i_save = c_a
is_layout = w_layout
CHANGING
it_outtab = p_report_tab[]
it_fieldcatalog = p_fieldcat[]
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE i000 WITH text-e06."Error in ALV report display
LEAVE LIST-PROCESSING.
ENDIF.
* Create object
IF v_event_receiver IS INITIAL.
CREATE OBJECT v_event_receiver.
ENDIF.
SET HANDLER v_event_receiver->handle_print_top_of_page FOR o_alvgrid.
SET HANDLER v_event_receiver->handle_top_of_page FOR o_alvgrid. -
Hello All,
I have a container in which I am displaying 6 ALV grids. Of these 6 grids the data in first grid is populated using 'add_static_html' method of class cl_dd_document.This data is in HTML format. Other 5 grids are displayed using normal set_table_for_first_display method.
While taking printout I am able to convert the grid data of 5 grids (other than the grid which is having data in HTML format ) to list data using REUSE_ALV_BLOCK_LIST_APPEND function module and then using REUSE_ALV_BLOCK_LIST_DISPLAY FM I am able to print it. Can somebody please let me know how to print the data of grid having HTML display, in same format and same style as it is displayed in grid output. Let me tell you that I need to print all 6 grids in a single page which I am able to do using he above mentioned FM's. Since all grids are to be displayed in same page so I can't use set_frontend_print method of grids. Please suggest the solutions.
Note: Helpful answers will be duly rewarded.Ok, you specifically asked for SQL.
Here goes:
SQL> with t as (select 1 id from dual union all
select 12 id from dual union all
select 2231 id from dual union all
select 221 id from dual union all
select 21 id from dual union all
select 5 id from dual union all
select 56 id from dual)
select ltrim(max(sys_connect_by_path(id, ',' )), ',') unordered_list
from (select id, rownum rn from t)
start with rn = 1
connect by prior rn = rn-1
UNORDERED_LIST
1,12,2231,221,21,5,56
1 row selected.Regards
Peter -
GRID full screen using container
Hi,
I want to display the grid in full screen using container(OOPs) please let me know if any one knows how to do.
regards,
vijayHi,
Check this program..........
*& Report ZTEST
REPORT ZTEST.
Object variable for ALV grid
DATA: oref1 TYPE REF TO cl_gui_alv_grid.
DATA:
t_spfli TYPE STANDARD TABLE OF spfli WITH HEADER LINE.
Field catalog table for ALV grid
DATA: fieldcat TYPE lvc_t_fcat. " Workarea for field catalog table
DATA: w_field TYPE lvc_s_fcat.
START-OF-SELECTION.
select *
from spfli
into table t_spfli[].
append lines of t_spfli[] TO t_spfli[].
append lines of t_spfli[] TO t_spfli[].
perform prepare_fieldcatlog.
call screen '0100'.
*& Module STATUS_0100 OUTPUT
text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'TEST'.
SET TITLEBAR 'xxx'.
CREATE OBJECT OREF1
EXPORTING
I_PARENT = CL_GUI_CUSTOM_CONTAINER=>screen0
EXCEPTIONS
ERROR_CNTL_CREATE = 1
ERROR_CNTL_INIT = 2
ERROR_CNTL_LINK = 3
ERROR_DP_CREATE = 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.
CALL METHOD OREF1->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
IS_LAYOUT =
CHANGING
IT_OUTTAB = t_spfli[]
IT_FIELDCATALOG = fieldcat
IT_SORT =
IT_FILTER =
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_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
text
MODULE USER_COMMAND_0100 INPUT.
if sy-ucomm eq 'BACK' OR sy-ucomm eq 'EXIT'.
leave program.
endif.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form prepare_fieldcatlog
text
--> p1 text
<-- p2 text
FORM prepare_fieldcatlog .
w_field-col_pos = '1'.
w_field-fieldname = 'CARRID'.
w_field-tabname = 'T_SPFLI'.
w_field-ref_field = 'CARRID'.
w_field-ref_table = 'SPFLI'.
append w_field TO fieldcat.
clear w_field.
w_field-col_pos = '2'.
w_field-fieldname = 'CONNID'.
w_field-tabname = 'T_SPFLI'.
w_field-ref_field = 'CONNID'.
w_field-ref_table = 'SPFLI'.
append w_field TO fieldcat.
clear w_field.
w_field-col_pos = '2'.
w_field-fieldname = 'CONNID'.
w_field-tabname = 'T_SPFLI'.
w_field-ref_field = 'CONNID'.
w_field-ref_table = 'SPFLI'.
append w_field TO fieldcat.
clear w_field.
w_field-col_pos = '2'.
w_field-fieldname = 'CONNID'.
w_field-tabname = 'T_SPFLI'.
w_field-ref_field = 'CONNID'.
w_field-ref_table = 'SPFLI'.
append w_field TO fieldcat.
clear w_field.
w_field-col_pos = '2'.
w_field-fieldname = 'CONNID'.
w_field-tabname = 'T_SPFLI'.
w_field-ref_field = 'CONNID'.
w_field-ref_table = 'SPFLI'.
append w_field TO fieldcat.
clear w_field.
w_field-col_pos = '2'.
w_field-fieldname = 'CONNID'.
w_field-tabname = 'T_SPFLI'.
w_field-ref_field = 'CONNID'.
w_field-ref_table = 'SPFLI'.
append w_field TO fieldcat.
clear w_field.
w_field-col_pos = '2'.
w_field-fieldname = 'CONNID'.
w_field-tabname = 'T_SPFLI'.
w_field-ref_field = 'CONNID'.
w_field-ref_table = 'SPFLI'.
append w_field TO fieldcat.
clear w_field.
w_field-col_pos = '2'.
w_field-fieldname = 'CONNID'.
w_field-tabname = 'T_SPFLI'.
w_field-ref_field = 'CONNID'.
w_field-ref_table = 'SPFLI'.
append w_field TO fieldcat.
clear w_field.
w_field-col_pos = '2'.
w_field-fieldname = 'CONNID'.
w_field-tabname = 'T_SPFLI'.
w_field-ref_field = 'CONNID'.
w_field-ref_table = 'SPFLI'.
append w_field TO fieldcat.
clear w_field.
w_field-col_pos = '2'.
w_field-fieldname = 'CONNID'.
w_field-tabname = 'T_SPFLI'.
w_field-ref_field = 'CONNID'.
w_field-ref_table = 'SPFLI'.
append w_field TO fieldcat.
clear w_field.
w_field-col_pos = '3'.
w_field-fieldname = 'COUNTRYFR'.
w_field-tabname = 'T_SPFLI'.
w_field-ref_field = 'COUNTRYFR'.
w_field-ref_table = 'SPFLI'.
append w_field TO fieldcat.
clear w_field.
w_field-col_pos = '4'.
w_field-fieldname = 'CITYFROM'.
w_field-tabname = 'T_SPFLI'.
w_field-ref_field = 'CITYFROM'.
w_field-ref_table = 'SPFLI'.
append w_field TO fieldcat.
clear w_field.
w_field-col_pos = '4'.
w_field-fieldname = 'CITYFROM'.
w_field-tabname = 'T_SPFLI'.
w_field-ref_field = 'CITYFROM'.
w_field-ref_table = 'SPFLI'.
append w_field TO fieldcat.
clear w_field.
w_field-col_pos = '4'.
w_field-fieldname = 'CITYFROM'.
w_field-tabname = 'T_SPFLI'.
w_field-ref_field = 'CITYFROM'.
w_field-ref_table = 'SPFLI'.
append w_field TO fieldcat.
clear w_field.
w_field-col_pos = '4'.
w_field-fieldname = 'CITYFROM'.
w_field-tabname = 'T_SPFLI'.
w_field-ref_field = 'CITYFROM'.
w_field-ref_table = 'SPFLI'.
append w_field TO fieldcat.
clear w_field.
w_field-col_pos = '4'.
w_field-fieldname = 'CITYFROM'.
w_field-tabname = 'T_SPFLI'.
w_field-ref_field = 'CITYFROM'.
w_field-ref_table = 'SPFLI'.
append w_field TO fieldcat.
clear w_field.
w_field-col_pos = '4'.
w_field-fieldname = 'CITYFROM'.
w_field-tabname = 'T_SPFLI'.
w_field-ref_field = 'CITYFROM'.
w_field-ref_table = 'SPFLI'.
append w_field TO fieldcat.
clear w_field.
w_field-col_pos = '4'.
w_field-fieldname = 'CITYFROM'.
w_field-tabname = 'T_SPFLI'.
w_field-ref_field = 'CITYFROM'.
w_field-ref_table = 'SPFLI'.
append w_field TO fieldcat.
clear w_field.
w_field-col_pos = '4'.
w_field-fieldname = 'CITYFROM'.
w_field-tabname = 'T_SPFLI'.
w_field-ref_field = 'CITYFROM'.
w_field-ref_table = 'SPFLI'.
append w_field TO fieldcat.
clear w_field.
w_field-col_pos = '4'.
w_field-fieldname = 'CITYFROM'.
w_field-tabname = 'T_SPFLI'.
w_field-ref_field = 'CITYFROM'.
w_field-ref_table = 'SPFLI'.
append w_field TO fieldcat.
clear w_field.
w_field-col_pos = '5'.
w_field-fieldname = 'AIRPFROM'.
w_field-tabname = 'T_SPFLI'.
w_field-ref_field = 'AIRPFROM'.
w_field-ref_table = 'SPFLI'.
append w_field TO fieldcat.
clear w_field.
w_field-col_pos = '6'.
w_field-fieldname = 'COUNTRYTO'.
w_field-tabname = 'T_SPFLI'.
w_field-ref_field = 'COUNTRYTO'.
w_field-ref_table = 'SPFLI'.
append w_field TO fieldcat.
clear w_field.
w_field-col_pos = '7'.
w_field-fieldname = 'CITYTO'.
w_field-tabname = 'T_SPFLI'.
w_field-ref_field = 'CITYTO'.
w_field-ref_table = 'SPFLI'.
append w_field TO fieldcat.
clear w_field.
w_field-col_pos = '8'.
w_field-fieldname = 'AIRPTO'.
w_field-tabname = 'T_SPFLI'.
w_field-ref_field = 'AIRPTO'.
w_field-ref_table = 'SPFLI'.
append w_field TO fieldcat.
clear w_field.
w_field-col_pos = '8'.
w_field-fieldname = 'AIRPTO'.
w_field-tabname = 'T_SPFLI'.
w_field-ref_field = 'AIRPTO'.
w_field-ref_table = 'SPFLI'.
append w_field TO fieldcat.
clear w_field.
w_field-col_pos = '8'.
w_field-fieldname = 'AIRPTO'.
w_field-tabname = 'T_SPFLI'.
w_field-ref_field = 'AIRPTO'.
w_field-ref_table = 'SPFLI'.
append w_field TO fieldcat.
clear w_field.
w_field-col_pos = '8'.
w_field-fieldname = 'AIRPTO'.
w_field-tabname = 'T_SPFLI'.
w_field-ref_field = 'AIRPTO'.
w_field-ref_table = 'SPFLI'.
append w_field TO fieldcat.
clear w_field.
w_field-col_pos = '8'.
w_field-fieldname = 'AIRPTO'.
w_field-tabname = 'T_SPFLI'.
w_field-ref_field = 'AIRPTO'.
w_field-ref_table = 'SPFLI'.
append w_field TO fieldcat.
clear w_field.
w_field-col_pos = '9'.
w_field-fieldname = 'FLTIME'.
w_field-tabname = 'T_SPFLI'.
w_field-ref_field = 'FLTIME'.
w_field-ref_table = 'SPFLI'.
append w_field TO fieldcat.
clear w_field.
w_field-col_pos = '10'.
w_field-fieldname = 'DEPTIME'.
w_field-tabname = 'T_SPFLI'.
w_field-ref_field = 'DEPTIME'.
w_field-ref_table = 'SPFLI'.
append w_field TO fieldcat.
clear w_field.
w_field-col_pos = '11'.
w_field-fieldname = 'ARRTIME'.
w_field-tabname = 'T_SPFLI'.
w_field-ref_field = 'ARRTIME'.
w_field-ref_table = 'SPFLI'.
append w_field TO fieldcat.
clear w_field.
w_field-col_pos = '12'.
w_field-fieldname = 'DISTANCE'.
w_field-tabname = 'T_SPFLI'.
w_field-ref_field = 'DISTANCE'.
w_field-ref_table = 'SPFLI'.
append w_field TO fieldcat.
clear w_field.
w_field-col_pos = '13'.
w_field-fieldname = 'DISTID'.
w_field-tabname = 'T_SPFLI'.
w_field-ref_field = 'DISTID'.
w_field-ref_table = 'SPFLI'.
append w_field TO fieldcat.
clear w_field.
w_field-col_pos = '14'.
w_field-fieldname = 'FLTYPE'.
w_field-tabname = 'T_SPFLI'.
w_field-ref_field = 'FLTYPE'.
w_field-ref_table = 'SPFLI'.
append w_field TO fieldcat.
clear w_field.
w_field-col_pos = '15'.
w_field-fieldname = 'PERIOD'.
w_field-tabname = 'T_SPFLI'.
w_field-ref_field = 'PERIOD'.
w_field-ref_table = 'SPFLI'.
append w_field TO fieldcat.
clear w_field.
ENDFORM. " prepare_fieldcatlog
Maybe you are looking for
-
Event.hits property does not work at Adobe 9 (repost)
Hello to everyone! There is a some PDF file, which works fine on Adobe 8 and does not work properly on Adobe 9. You can download this file from the following hyper-link: http://www.pdf3d.co.uk/pdf/box97.pdf When I open this file on Adobe 8 then gold
-
Why is my itunes on my windows pc continue to shhut down even after removing to re installing
Pc is trying to download the new version itunes and my itunes keeps shutting down
-
Adding a counter to a filename that resets daily
Dear, I'm trying to add a counter to a filename, but I want it to reset daily. So on monday if I send three files I want file_1, file_2 and file_3. On tuesday it should once again be file_1, file_2, etc. I'm using the Counter option in the File Recei
-
I am attempting to upgrade to iTune 9.01. Currently, running 4.0. Had to complete a new OS install.... erased drive installed new operating OS. iTunes 4.0 loaded with Tiger reinstall. All updates are completed except software update will not install
-
Reading and writng at the same time through UrlConnection
Hi, I have written an applet that communicates with a servlet through a Urlconnection. However, the outputstream from the applet must be closed before the inputstream can receive info from the servlet. The coding is as follows : try{ URL url = new UR