How can i pull alv layouts for selection screen ?
hello ,
i search way to give the user option to choose his layout,
i sow here examples that look good , but
all of tham talk about function :
"REUSE_ALV_VARIANT_DEFAULT_GET"
i run it in 'se37' and no data is pull ,
i know that there is layouts for my alv report ,
i use it like this in my report and in 'se37' :
CLEAR ls_variant.
ls_variant-report = sy-repid.
ls_variant-handle = 'LIST'.
MOVE ls_variant TO def_variante.
MOVE vari TO def_variante-variant.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = 'A'
CHANGING
cs_variant = def_variante
EXCEPTIONS
not_found = 2.
IF sy-subrc = 0.
p_vari = def_variante-variant.
ENDIF.
thanks
Hi,
Try this.
INITIALIZATION.
Get Default display variant
PERFORM f200_display_default_variants.
Enable variant saving
data w_variant TYPE disvariant.
FORM f200_display_default_variants.
*initialize to default layout if one exist.
w_variant-report = sy-repid.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = 'A'
CHANGING
cs_variant = w_variant
EXCEPTIONS
wrong_input = 1
not_found = 2
program_error = 3
OTHERS = 4.
IF sy-subrc EQ 0.
p_layout = w_variant-variant.
ENDIF.
ENDFORM.
Try this and reward points by clicking the star on the left of reply,if it helps.
Similar Messages
-
How can i set a layout for MIGO screen
Hello all,
How can i set a layout for MIGO screen. & make that layout default. Like i want to drag Requistioner column next to quantity in MIgo screen. temporarily I can drag but is there a way to save as layout & save it.Hi
First you arrange however you want and then go to table settings which is there in the right corner of the item details and create a variant and save.
Find a button with blue yellow and white at the top end above the vertical drag bar when put the cursor it will show you as Configuration.
After creating the variant tick the check box use as standard setting below the variant
Hope it helps
Edited by: Girish Adaviswamy on Mar 3, 2010 1:27 PM -
How can we use list box on selection screen
hi, howe can we use list box on selection screen and how can we populate the dat ainto the list box and how can we retrive data based on list box from ther database.
thanks in advance
rajuUse the VRM_SET_VALUES function module.
DATA: list TYPE vrm_values,
value LIKE LINE OF list.
AT SELECTION SCREEN OUTPUT
AT SELECTION-SCREEN OUTPUT.
name = 'P_OBJECT'.
CLEAR list.
REFRESH list.
CLEAR value.
value-key = '1'.
value-text = 'Development Class'.
APPEND value TO list.
CLEAR value.
value-key = '2'.
value-text = 'Program'.
APPEND value TO list.
CLEAR value.
value-key = '3'.
value-text = 'Function Module'.
APPEND value TO list.
CLEAR value.
value-key = '4'.
value-text = 'Database Table'.
APPEND value TO list.
CLEAR value.
value-key = '5'.
value-text = 'Structure'.
APPEND value TO list.
CLEAR value.
value-key = '6'.
value-text = 'View'.
APPEND value TO list.
CLEAR value.
value-key = '7'.
value-text = 'Data Element'.
APPEND value TO list.
CLEAR value.
value-key = '8'.
value-text = 'Table Type'.
APPEND value TO list.
CLEAR value.
value-key = '9'.
value-text = 'Class / Interface'.
APPEND value TO list.
CLEAR value.
value-key = '10'.
value-text = 'Type Group'.
APPEND value TO list.
CLEAR value.
value-key = '11'.
value-text = 'Domain'.
APPEND value TO list.
CLEAR value.
value-key = '12'.
value-text = 'Search Help'.
APPEND value TO list.
CLEAR value.
value-key = '13'.
value-text = 'Lock Object'.
APPEND value TO list.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name
values = list
EXCEPTIONS
id_illegal_name = 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. -
ALV Layout on selection screen?
Is it possible to offer the ALV Layouts on the selection screen? And how can i pass such a variant to the reuse-FM?
Hi,
Yes u can do it.Check this sample code
Variant for ALV display
SELECTION-SCREEN BEGIN OF BLOCK 0 WITH FRAME TITLE text-000.
<b>PARAMETERS: p_varnt LIKE disvariant-variant.</b>
DATA: w_save(1) TYPE c,
w_default(1) TYPE c,
i_variant LIKE disvariant,
i_variant1 LIKE disvariant.
INITIALIZATION.
i_variant-report = w_repid.
i_variant1 = i_variant.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = w_save
CHANGING
cs_variant = i_variant1
EXCEPTIONS
not_found = 2.
IF sy-subrc = 0.
p_varnt = i_variant1-variant.
ENDIF.
Process on value request (list of possible variants)
<b>AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_varnt.</b>
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = i_variant
i_save = w_save
it_default_fieldcat =
IMPORTING
e_exit = w_exit
es_variant = i_variant1
EXCEPTIONS
not_found = 2.
IF sy-subrc = 2.
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
IF w_exit = space.
p_varnt = i_variant1-variant.
ENDIF.
ENDIF.
<b>AT SELECTION-SCREEN.</b>
IF NOT p_varnt IS INITIAL.
MOVE i_variant TO i_variant1.
MOVE p_varnt TO i_variant1-variant.
CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
EXPORTING
i_save = w_save
CHANGING
cs_variant = i_variant1.
i_variant = i_variant1.
ELSE.
PERFORM variant_init.
ENDIF.
START_OF_SELECTION.
Call ABAP/4 List Viewer
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
i_callback_program = w_repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
i_structure_name = 'SFLIGHT'
i_background_id = 'ALV_BACKGROUND'
I_GRID_TITLE =
I_GRID_SETTINGS =
is_layout = i_layout
it_fieldcat = i_fieldcat[]
IT_EXCLUDING =
it_special_groups = i_sp_group[]
it_sort = i_sort[]
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
i_save = w_save
<b> is_variant = i_variant</b>
it_events = i_events[]
IT_EVENT_EXIT =
is_print = i_print
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = i_sflight
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.
Hope u understood.
Thanks&Regards,
Ruthra. -
How can i do submit to 2 selection screen ?
i try to do submit for program RKAEP000 ,
this program have few selection screen ,
how can i send parameters to prarameters in
more than one selection screen ,
i add exmple for what i need :
SUBMIT RKAEP000
USING SELECTION-SCREEN '100'
VIA SELECTION-SCREEN
WITH P_TCODE = 'KOB1'
WITH AUFNR IN SO_AUFNR
WITH KSTAR IN SO_KSTAR
WITH R_BUDAT IN SO_BUDAT
WITH BUKRS IN SO_BUKRS
USING SELECTION-SCREEN '110'
WITH P_DISVAR EQ 'DBW' sign 'I'Please check the following code
TABLES : aufk,
rkpln,
cskb,
cobk,
t001.
DATA: wa_rsparams TYPE rsparams,
i_rsparams TYPE STANDARD TABLE OF rsparams.
DATA: wa_cskb TYPE cskb,
i_cskb TYPE STANDARD TABLE OF cskb.
DATA: wa_cobk TYPE cobk,
i_cobk TYPE STANDARD TABLE OF cobk.
DATA: wa_t001 TYPE t001,
i_t001 TYPE STANDARD TABLE OF t001.
DATA: wa_aufk TYPE aufk,
i_aufk TYPE STANDARD TABLE OF aufk.
PARAMETERS : p_code TYPE sytcode,
p_disvar TYPE slis_vari.
SELECT-OPTIONS: s_aufnr FOR rkpln-aufnr,
s_kstar FOR cskb-kstar,
r_budat FOR cobk-budat,
s_bukrs FOR t001-bukrs.
wa_rsparams-selname = 'P_TCODE'.
wa_rsparams-kind = 'P'.
wa_rsparams-sign = 'I'.
wa_rsparams-option = 'EQ'.
wa_rsparams-low = p_code.
APPEND wa_rsparams TO i_rsparams.
CLEAR wa_rsparams.
wa_rsparams-selname = 'P_DISVAR'.
wa_rsparams-kind = 'P'.
wa_rsparams-sign = 'I'.
wa_rsparams-option = 'EQ'.
wa_rsparams-low = p_disvar.
APPEND wa_rsparams TO i_rsparams.
CLEAR wa_rsparams.
wa_rsparams-selname = 'AUFNR'.
wa_rsparams-kind = 'S'.
wa_rsparams-sign = 'I'.
wa_rsparams-option = 'BT'.
wa_rsparams-low = s_aufnr-low.
wa_rsparams-high = s_aufnr-high.
APPEND wa_rsparams TO i_rsparams.
CLEAR wa_rsparams.
wa_rsparams-selname = 'KSTAR'.
wa_rsparams-kind = 'S'.
wa_rsparams-sign = 'I'.
wa_rsparams-option = 'BT'.
wa_rsparams-low = s_kstar-low.
wa_rsparams-high = s_kstar-high.
APPEND wa_rsparams TO i_rsparams.
CLEAR wa_rsparams.
wa_rsparams-selname = 'R_BUDAT'.
wa_rsparams-kind = 'S'.
wa_rsparams-sign = 'I'.
wa_rsparams-option = 'BT'.
wa_rsparams-low = r_budat-low.
wa_rsparams-high = r_budat-high.
APPEND wa_rsparams TO i_rsparams.
CLEAR wa_rsparams.
wa_rsparams-selname = 'BUKRS'.
wa_rsparams-kind = 'S'.
wa_rsparams-sign = 'I'.
wa_rsparams-option = 'BT'.
wa_rsparams-low = s_bukrs-low.
wa_rsparams-high = s_bukrs-high.
APPEND wa_rsparams TO i_rsparams.
CLEAR wa_rsparams.
SUBMIT rkaep000 WITH SELECTION-TABLE i_rsparams AND RETURN. -
LaTeX issue: How can I make a layout for a magazine?
Hi!
I'm planning to "migrate" all my Scribus templates that I use for a magazine (actually a "fanzine") to LaTeX.
Unfortunately, I can't figure out how to fit two pages in a single A4 layout, in order to fold the A4 page in half.
I'm checking out the papertex package, but I doesn't seem to provide the solution I'm looking forward.
Does anyone know how to make this folded-in-half-magazine layout with LaTeX?
Thanks in advance!!I think you're looking for something called a 2-up? Or number-up for the general term. I could be wrong, but I think there are ps tools to handle this, like psnup and psbook.
To take care of this in LaTeX, you can use either 2up macros or the booklet package. One caveat of using either one, I don't think it takes creep into account. I think pdfpages would also work.
2up generic: http://www.ctan.org/tex-archive/macros/generic/2up/
booklet package: http://www.ctan.org/tex-archive/macros/ … b/booklet/
pdfpages: http://www.ctan.org/tex-archive/macros/ … /pdfpages/
I don't have any personal experience with these, so you may just have to play around with them. There are also probably a ton of other different ways to go about this as well.
---Edit---
Examples of two different 2-ups:
---Edit---
Cups, search for N-up: http://www.cups.org/documentation.php/options.html
you'll have to play around with the bottom, top, left, right order to get folded vs. cut.
Last edited by Berticus (2010-05-27 15:27:12) -
How can I pull a avg for a range in a lookup statement
I have 2 data sources that I am trying compare Once has a start date and end date and the other has a constant list of values and dates. I want to AVG the values for the time between the start and end date in the other table. See example below....
DataSet1
Group Start End
123 3/21/14 1:00:00PM 3/21/14 5:00:00 PM
124 3/21/14 6:00:00PM 3/21/14 9:00:00 PM
125 3/21/14 9:00:00PM 3/22/14 1:00:00 AM
DataSet2
Datetime Value
3/21/14 1:00:00PM 33.2
3/21/14 2:00:00PM 34.2
3/21/14 3:00:00PM 31.2
3/21/14 4:00:00PM 37.2
3/21/14 5:00:00PM 33.2
3/21/14 6:00:00PM 34.2
3/21/14 7:00:00PM 31.2
3/21/14 8:00:00PM 37.2
ETC......
I want it o make a table that shows ...
Group Start End
AVG Value for time
123 3/21/14 1:00:00PM 3/21/14 5:00:00 PM
124 3/21/14 6:00:00PM 3/21/14 9:00:00 PM
I can get the value for the start date and end date but I need all values Averaged. Any ideas?Hi mbh23,
After testing the issue in my environment, we can refer to the steps below to achieve your requirement:
Drag a table to design surface, insert Datetime field, Datetime field and Value field.
In the Row Groups pane, right-click the Details group to add a parent group grouped by the expression below:
=iif(Fields!Datetime.Value>="3/21/14 1:00:00PM" and Fields!Datetime.Value<"3/21/14 6:00:00PM",123,iif(Fields!Datetime.Value>="3/21/14 6:00:00PM" and Fields!Datetime.Value<"3/21/14 10:00:00PM",124,125))
Right-click the Details Group to add a total row after.
Modify the expressions of new row to like below:
=First(Fields!Datetime.Value) =Last(Fields!Datetime.Value)
=Sum(Fields!Value.Value) / Count(Fields!Datetime.Value)
Right-click the second row to select Row Visibility with Hide option in the table.
The following screenshot is for your reference:
If there are any other questions, please feel free to ask.
Thanks,
Katherine Xiong
If you have any feedback on our support, please click
here.
Katherine Xiong
TechNet Community Support -
Can i get multiple records if selection screen is 900 using PROVIDE
Hi All,
Iam using following statement for fetching MULTIPLE records from infotype 0008. In Attributes if i declare LDB as pnp and selection screen as 900, then iam not getting any records.
Instead of th selection screen 900 is empty. then records will getting properly.
How can i get multiple records if selection screen is 900?
PROVIDE * FROM p0008
between pn-begda and pn-endda.Hi Ranjith
You can use
PYBEGDA and PYENDDA instead of PN-BEGDA AND PN-ENDDA.
Regards
Muneer.VK -
Default value for selection screen field
Hi all,
I am using LDB PNPCE. I want to give default value for field Personnel area on selection screen.
How can I do it?
Thanks
RahulHi Rahul,
In the INITIALIZATION event we can set the default values for selection screen fields.
INITIALIZATION.
loop at screen.
if screen-name = 'S_MATNR-LOW'.
CLEAR S_MATNR.
s_matnr-low = '1234'.
s_matnr-option = 'EQ'.
s_matnr-sign = 'I'.
append s_matnr.
CLEAR S_MATNR.
s_matnr-high = '5678'.
s_matnr-option = 'EQ'.
s_matnr-sign = 'I'.
append s_matnr
clear s_matnr.
endif.
endloop.
Hope it helps.
Mark if useful
Regards,
Saumya -
HOW CAN I HAVE THE NUMBER OF SELECTED ROWS IN ALV GRID?
HI.
HOW CAN I HAVE THE NUMBER OF SELECTED ROWS IN ALV GRID????
GABRY =)You need to use
data : grid1 type ref to cl_gui_alv_grid.
call method grid1->get_selected_rows
importing
et_index_rows = i_sel_alvrows[].
a® -
HI Experts,
Pls. clarify that, How can I pull the BUKRS (company code) value, for a X_USER (sy-uname) as input?
ThanQ.Check with USRM1 Table
give user name (Uname ) and you get company code (BUKRS)
also check with other tables : USRM* in SE11
Thanks
Seshu -
How can we benefit from WebDynpro for ABAP over Normal ABAP
Dear Guru's,
Please guide me what are +Ves of WebDynpro over Normal ABAP. Once all Applications are developed how can we organize them. For Example In SD module there is sequence of Tcodes to be executed this is true for all modules . Is there any concept involved in this new technology.
For What purpose we can suggest someone to implement in an Organization.
Many Thanks in Advance.
Regards
RamHi Ram,
Here Are some comparisions I made w.r.t Webdynpro for ABAP (also some benifits over Java):
1 "Pros:it will be easier to move your development project through the system landscape if both the UI and business logic are in the same development environment.(Update: This is is less of a concern now that CTS+ lets you bundle your WD Java UI developement with ABAP development objects into a single transport, with SPS13. )
2 tons of custom ABAP business logic is easier to access via WD for ABAP
3 WD for ABAP has a code wizard, so easy to build
4 SAP List Viewer and ALV handled better
5 The biggest thing is the NWDI. Most of the SAP customer have ABAP stack, but not everyone has the Java stack. To develop WD Java you need to set up the NWDI envrionment, like SLD, CMS, CBS, DTR, etc. which is a huge effort if you don't have them in place. While for WD ABAP, the environemnt is normally there as given for most of customers if they have the right version.
6 If your business is in SAP system, I would prefer WD ABAP. There are many WD components available in WD ABAP like select-option, Alv table, F4-help which are not available in WD Java. Beside in WD ABAP you can deal the context node in form of internal table which is much more performant than dealing with the contextelement which is the case for WD Java.
Regards,
Tanaya
Edited by: Tanaya A on Dec 10, 2009 6:19 PM -
ALV - Layout for header and item level data
Experts,
A program extracts complete sales order details (including item level data) in ALV format. Now, during display, if anyone changes the layout to have only header level fields, I would like the duplicate records created by item data to go away. Would you know how to accomplish this?
Any help would be rewarded with points.
UVHello,
You can do it instead of adding a button on the ALV, on the selection screen add a radiobutton asking what information is required.
Header Information
Detailed Information
Or something like that
Bye
Gabriel P -
How can we modify alv output list
Hi
this is fazil.
Please tell me any body How can we modify alv output list.
Thanks & Regards
Fazil
[email protected]Fazil,
check the program,
You can find the code in this program 'BCALV_FIELDCAT_TEST'
*& Report BCALV_FIELDCAT_TEST *
This report allows to modify the fieldcatalog of a corresponding
output table and to view the effects of your changes directly.
Note that for some changes you need to newly display the whole
ALV Grid Control, e.g., DDIC-Fields are read only the first time
you call SET_READY_FOR_FIRST_DISPLAY.
Note also that not all scenarios can be tested since the output
table does not comprise all fields to test available features
of the fieldcatalog. Copy this program and extend the output
table accordingly if you want to test such a special feature.
(The field CARRNAME in 'gt_sflight' was added to test field REF_FIELD
and TXT_FIELD of the fieldcatalog - see what happens if you
calculate subtotals by carrier-id).
report bcalvt_fieldcatalog .
data: ok_code type sy-ucomm,
save_ok_code type sy-ucomm,
fieldcatalog for output table
gt_fieldcat type lvc_t_fcat,
fieldcatalog for fieldcatalog itself:
gt_fcatfcat type lvc_t_fcat,
gs_fcatlayo type lvc_s_layo.
Output table
data: begin of gt_sflight occurs 0.
data: carrname type s_carrname.
include structure sflight.
data: end of gt_sflight.
data: g_max type i value 100.
data: g_all type c value SPACE.
Controls to display gt_sflight and corresponding fieldcatalog
data: g_docking type ref to cl_gui_docking_container,
g_alv type ref to cl_gui_alv_grid.
data: g_custom_container type ref to cl_gui_custom_container,
g_editable_alv type ref to cl_gui_alv_grid.
LOCAL CLASS Definition
class lcl_event_receiver definition.
public section.
methods handle_data_changed
for event data_changed of cl_gui_alv_grid
importing er_data_changed.
endclass.
class lcl_event_receiver implementation.
method handle_data_changed.
at the time being, no checks are made...
endmethod.
endclass.
data: event_receiver type ref to lcl_event_receiver.
end-of-selection.
set screen 100.
*& Module STATUS_0100 OUTPUT
text
module status_0100 output.
set pf-status 'BASIC'.
set titlebar 'BASICTITLE'.
create ALV Grid Control in the first run
if g_docking is initial.
perform create_and_init_controls.
endif.
endmodule. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
text
module user_command_0100 input.
save_ok_code = ok_code.
clear ok_code.
case save_ok_code.
when 'SUBMIT'.
set the frontend fieldcatalog
ATTENTION: DDIC-Fields are not updated using this method!
(see 'RESTART')
call method g_alv->set_frontend_fieldcatalog
exporting
it_fieldcatalog = gt_fieldcat.
call method g_alv->refresh_table_display.
call method cl_gui_cfw=>flush.
when 'RESTART'.
Destroy the control currently visible and display it again
using the changed fieldcatalog.
perform restart_sflight.
when '&ALL'.
perform switch_visibility.
endcase.
endmodule. " USER_COMMAND_0100 INPUT
*& Form CREATE_AND_INIT_CONTROLS
text
--> p1 text
<-- p2 text
form create_and_init_controls.
create object g_docking
exporting
dynnr = '100'
extension = 150
side = cl_gui_docking_container=>dock_at_bottom.
create object g_alv
exporting
i_parent = g_docking.
create object g_custom_container
exporting
container_name = 'CC_0100_FIELDCAT'.
create object g_editable_alv
exporting
i_parent = g_custom_container.
register events
create object event_receiver.
set handler event_receiver->handle_data_changed for g_editable_alv.
call method g_editable_alv->register_edit_event
exporting
i_event_id = cl_gui_alv_grid=>mc_evt_modified.
perform build_fieldcatalogs changing gt_fieldcat gt_fcatfcat.
perform modify_fieldcatalog changing gt_fcatfcat.
perform select_data. "CHANGING gt_sflight
call method g_alv->set_table_for_first_display
changing
it_outtab = gt_sflight[]
it_fieldcatalog = gt_fieldcat[].
optimize column width of grid displaying fieldcatalog
gs_fcatlayo-cwidth_opt = 'X'.
Get fieldcatalog of table sflight - alv might have
modified it after passing.
call method g_alv->get_frontend_fieldcatalog
importing et_fieldcatalog = gt_fieldcat[].
call method cl_gui_cfw=>flush.
Display fieldcatalog of table sflight:
call method g_editable_alv->set_table_for_first_display
exporting
is_layout = gs_fcatlayo
changing
it_outtab = gt_fieldcat[]
it_fieldcatalog = gt_fcatfcat[].
register events
create object event_receiver.
set handler event_receiver->handle_data_changed for g_editable_alv.
endform. " CREATE_AND_INIT_CONTROLS
*& Form restart_sflight
text
--> p1 text
<-- p2 text
form restart_sflight.
data: ls_fieldcat type lvc_s_fcat.
free g_docking and thus g_alv
call method g_docking->free.
clear g_docking.
clear g_alv.
create new instances
create object g_docking
exporting
dynnr = '100'
extension = 150
side = cl_gui_docking_container=>dock_at_bottom.
create object g_alv
exporting
i_parent = g_docking.
This is an internal method to invalidate all fields in the fieldcat
loop at gt_fieldcat into ls_fieldcat.
clear ls_fieldcat-tech_comp.
modify gt_fieldcat from ls_fieldcat.
endloop.
Newly display the list with current fieldcatalog.
call method g_alv->set_table_for_first_display
changing
it_outtab = gt_sflight[]
it_fieldcatalog = gt_fieldcat.
Get fieldcatalog - it might be changed by ALV in the last call
call method g_alv->get_frontend_fieldcatalog
importing
et_fieldcatalog = gt_fieldcat[].
call method g_editable_alv->refresh_table_display.
call method cl_gui_cfw=>flush.
endform. " restart_sflight
*& Form select_data
text
--> p1 text
<-- p2 text
form select_data.
data: lt_sflight type table of sflight with header line,
ls_scarr type scarr.
select data of sflight
select * from sflight into table lt_sflight up to g_max rows.
copy data to gt_sflight and update CARRNAME
loop at lt_sflight.
move-corresponding lt_sflight to gt_sflight.
select single * from scarr into ls_scarr
where carrid = gt_sflight-carrid.
gt_sflight-carrname = ls_scarr-carrname.
append gt_sflight.
endloop.
endform. " select_data
*& Form BUILD_FIELDCATALOGS
text
<--P_GT_FIELDCAT text
<--P_GT_FCATFCAT text
form build_fieldcatalogs changing p_fieldcat type lvc_t_fcat
p_fcatfcat type lvc_t_fcat.
data: ls_fcat type lvc_s_fcat.
Fieldcatalog for table SFLIGHT: p_fieldcat
generate fieldcatalog automatically
call function 'LVC_FIELDCATALOG_MERGE'
exporting
i_structure_name = 'SFLIGHT'
I_CLIENT_NEVER_DISPLAY = 'X'
changing
ct_fieldcat = p_fieldcat[]
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.
shift all column positions to the right except for MANDT
loop at p_fieldcat into ls_fcat.
if ls_fcat-fieldname ne 'MANDT'.
add 1 to ls_fcat-col_pos.
if ls_fcat-fieldname = 'CARRID'.
ls_fcat-txt_field = 'CARRNAME'."link CARRNAME to CARRID
endif.
modify p_fieldcat from ls_fcat.
endif.
endloop.
create a new line for CARRNAME in p_fieldcat
clear ls_fcat.
ls_fcat-fieldname = 'CARRNAME'.
ls_fcat-ref_table = 'SCARR'.
ls_fcat-col_pos = 1.
insert new line before CARRID (do not forget MANDT!).
insert ls_fcat into p_fieldcat index 1.
Fieldcatalog for table LVC_T_FCAT:p_fcatfcat
Generate fieldcatalog of fieldcatalog structure.
This fieldcatalog is used to display fieldcatalog 'p_fieldcat'
on the top of the screen.
call function 'LVC_FIELDCATALOG_MERGE'
exporting
i_structure_name = 'LVC_S_FCAT'
I_CLIENT_NEVER_DISPLAY = 'X'
changing
ct_fieldcat = p_fcatfcat[]
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.
Hide all fields that are not documented (valid for release 4.6A)
perform hide_fields changing p_fcatfcat.
endform. " BUILD_FIELDCATALOGS
*& Module EXIT_PROGRAM INPUT
text
module exit_program input.
leave program.
endmodule. " EXIT_PROGRAM INPUT
*& Form MODIFY_FIELDCATALOG
text
<--P_GT_FCATFCAT text
form modify_fieldcatalog changing p_fcatfcat type lvc_t_fcat.
data ls_fcat type lvc_s_fcat.
loop at p_fcatfcat into ls_fcat.
ls_fcat-coltext = ls_fcat-fieldname.
ls_fcat-edit = 'X'.
if ls_fcat-fieldname = 'COL_POS' or ls_fcat-fieldname = 'FIELDNAME'.
ls_fcat-key = 'X'.
endif.
modify p_fcatfcat from ls_fcat.
endloop.
endform. " MODIFY_FIELDCATALOG
form hide_fields changing p_fieldcat type lvc_t_fcat.
data: ls_fcat type lvc_s_fcat.
Only show documented fields of fieldcatalog.
For a documentation choose "Help->Application Help" in the menu.
loop at p_fieldcat into ls_fcat.
if not (
ls_fcat-fieldname eq 'CFIELDNAME'
or ls_fcat-fieldname eq 'COL_POS'
or ls_fcat-fieldname eq 'COLDDICTXT'
or ls_fcat-fieldname eq 'COLTEXT'
or ls_fcat-fieldname eq 'CURRENCY'
or ls_fcat-fieldname eq 'DD_OUTLEN'
or ls_fcat-fieldname eq 'DECIMALS_O'
or ls_fcat-fieldname eq 'DECMLFIELD'
or ls_fcat-fieldname eq 'DO_SUM'
or ls_fcat-fieldname eq 'DRAGDROPID'
or ls_fcat-fieldname eq 'EDIT_MASK'
or ls_fcat-fieldname eq 'EMPHASIZE'
or ls_fcat-fieldname eq 'EXPONENT'
or ls_fcat-fieldname eq 'FIELDNAME'
or ls_fcat-fieldname eq 'HOTSPOT'
or ls_fcat-fieldname eq 'ICON'
or ls_fcat-fieldname eq 'INTLEN'
or ls_fcat-fieldname eq 'INTTYPE'
or ls_fcat-fieldname eq 'JUST'
or ls_fcat-fieldname eq 'KEY'
or ls_fcat-fieldname eq 'LOWERCASE'
or ls_fcat-fieldname eq 'LZERO'
or ls_fcat-fieldname eq 'NO_OUT'
or ls_fcat-fieldname eq 'NO_SIGN'
or ls_fcat-fieldname eq 'NO_SUM'
or ls_fcat-fieldname eq 'NO_ZERO'
or ls_fcat-fieldname eq 'OUTPUTLEN'
or ls_fcat-fieldname eq 'QFIELDNAME'
or ls_fcat-fieldname eq 'QUANTITY'
or ls_fcat-fieldname eq 'REF_FIELD'
or ls_fcat-fieldname eq 'REF_TABLE'
or ls_fcat-fieldname eq 'REPREP'
or ls_fcat-fieldname eq 'REPTEXT'
or ls_fcat-fieldname eq 'ROLLNAME'
or ls_fcat-fieldname eq 'ROUND'
or ls_fcat-fieldname eq 'ROUNDFIELD'
or ls_fcat-fieldname eq 'SCRTEXT_L'
or ls_fcat-fieldname eq 'SCRTEXT_M'
or ls_fcat-fieldname eq 'SCRTEXT_S'
or ls_fcat-fieldname eq 'SELDDICTXT'
or ls_fcat-fieldname eq 'SELTEXT'
or ls_fcat-fieldname eq 'SP_GROUP'
or ls_fcat-fieldname eq 'SYMBOL'
or ls_fcat-fieldname eq 'TECH'
or ls_fcat-fieldname eq 'TIPDDICTXT'
or ls_fcat-fieldname eq 'TOOLTIP'
or ls_fcat-fieldname eq 'TXT_FIELD' ).
ls_fcat-tech = 'X'.
endif.
modify p_fieldcat from ls_fcat.
endloop.
endform.
form switch_visibility.
data: lt_fcatfcat type lvc_t_fcat,
ls_fcat type lvc_s_fcat.
call method g_editable_alv->get_frontend_fieldcatalog
importing ET_FIELDCATALOG = lt_fcatfcat.
if not g_all is initial.
perform hide_fields changing lt_fcatfcat.
g_all = SPACE.
else.
loop at lt_fcatfcat into ls_fcat.
if ls_fcat-tech eq 'X'.
ls_fcat-tech = SPACE.
ls_fcat-no_out = 'X'.
modify lt_fcatfcat from ls_fcat.
endif.
endloop.
g_all = 'X'.
endif.
call method g_editable_alv->set_frontend_fieldcatalog
exporting it_fieldcatalog = lt_fcatfcat.
call method g_editable_alv->refresh_table_display.
endform.
Don't forget to rewaard if useful.. -
Hi folks
iam developing report for following requirement.
want to disply the vendor transaction file for all company codes Fiscal year,of 2004,2005,2006, and 2007 (to date).
The purpose of oureport is to analyze our company invoices and investigate potential overpayment opportunities. In order to effectively accomplish this, we need a single invoice record for each invoice that was received by compnay from their vendors. The single invoice record would contain at least the following columns: Vendor Number, Vendor Invoice Number, Invoice Date, Invoice Amount, SAP Document Number, Check/Wire Number, Check/Wire Date, Check/Wire Amount. SAP would have multiple rows in a table for any one invoice, whereas we would only want to see ONE row for every vendor invoice.
if you know that company pays (for example) 75,000 invoices/year - then the transaction file you would have about 300,000 records in it. 75,000 Invoices * 4 years.
inodrer to develop this report iam using table PAYR -payee
BSIK ( closed items) BSAK ( open items).
my question is any one tell me how can i pull the payment transactions for each invoice?
regards
neerutry to use function module GET_CHECK_INFORMATION
hope that helps
Andreas
Maybe you are looking for
-
VirtualBox from hard disk, nvidia glx conflict
Howdy folks, I recently started getting into arch linux and set it up for dual booting. Being a graphics engine developer for multiple platforms I began to work on adding support for linux. What I was trying to set up was so that I can use VirtualBox
-
Can I set 1 laptop wireless connect with static IP to WRT610N?
I have a WRT610N with 3 PCs wired and various wireless devices accessing. 1 of the wireless devices, running Windows 7, needs to run a static IP. Do/Can I set this up in the router or do I need to do in the PC?
-
Indesign CS6 Problems with OS X Services
With Indesign CS5.5, services work, but not in CS6 on Snow Leopard. What I mean is, if you select some text (in my case Tex text), go to the Indesign menu, select Services, then select something like Typeset LaTex Text, Indesign says the service cann
-
I've lost my itunes icon from my desktop and can't see it anywhere else. I have recently upgraded to windows 9 and thought maybe this had something to do with it. Can anyone help please?
-
I can not swipe and when i go into general i can not page down to refresh. I have to tap once the tap twice to open up any apps on my phone or the make calls. Help me please