07-02-2015 3:00 AM
Hola expertos.
necesito una ayuda con un ALV, tengo el presente problema.
uso el modulo de funcion REUSE_ALV_GRID_DISPLAY, a la cual tiene como parametros de entrada los siguientes:
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = repid
I_CALLBACK_PF_STATUS_SET = 'PF_STATUS'
i_callback_user_command = 'USER_COMMAND'
i_callback_top_of_page = 'TOP_OF_PAGE'
i_structure_name = 'TI_ALV1[]'
is_layout = alv_layout
it_fieldcat = alv_field1[]
it_sort = ti_sort[]
i_default = 'X'
i_save = 'A'
is_variant = alv_variant "w_es_variant
it_events = p_ti_evento[]
is_print = gs_print "Print
TABLES
t_outtab = ti_alv1[]
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.
ALV is generated the proper activation:
but when generating the print spool in the order I get this:
removes two columns of the table.
but to generate a excel columns are suppressed in printing are shown.
I've tried various options but still can not find the solution. please help.
07-09-2015 3:21 PM
hello everyone.
I found no solution to the problem of FM, but if you can help them found the solution to my problem with the creation of an ALV OO.
if they find a possible solution to the FM, please add a possible contribution.
07-02-2015 7:21 AM
Hi,
First of all you have to use Only English.
come to your problem this error due to how you fill fieldcat i.e. weather u pass L,M or S for column heading.
Share what u fill in fcat for the above two column.
07-02-2015 7:26 AM
Here is Solution
Declare a variable of type LVC_S_GLAY
Assign the variable with -NO_COLWOPT = 'X'.
Then assign variable to the field I_GRID_SETTINGS ln REUSE_ALV_GRID_DISPLAY FM.
After completing, you will get the column-width u save in your layout .
u don't have to manually change the column-with in the print preview.
07-02-2015 7:32 AM
First: Either use English (google translate can help) or post in Comunidad SAP en Español (Spanish Language Community)
Then check your grid with the the Consistency Check (should become a reflex once you are able to display the grid)
Regards,
Raymond
07-03-2015 5:44 AM
Sorry, what it was comment:
Hello experts.
I need a help with a ALV, I have this problem.
Use REUSE_ALV_GRID_DISPLAY function module, which has as input parameters the following:
thanks for your answers.
I tried what you said and I still have the same problem.
07-03-2015 9:38 AM
data lv_SETTINGS type LVC_S_GLAY.
lv_SETTINGS-NO_COLWOPT = 'X'.
Then assign variable to the field I_GRID_SETTINGS ln REUSE_ALV_GRID_DISPLAY FM.
After completing, you will get the column-width u save in your layout .
u don't have to manually change the column-with in the print preview.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_GRID_SETTINGS = lv_SETTINGS <<- add this line which by pass column opt
i_callback_program = repid
I_CALLBACK_PF_STATUS_SET = 'PF_STATUS'
i_callback_user_command = 'USER_COMMAND'
i_callback_top_of_page = 'TOP_OF_PAGE'
i_structure_name = 'TI_ALV1[]'
is_layout = alv_layout
it_fieldcat = alv_field1[]
it_sort = ti_sort[]
i_default = 'X'
i_save = 'A'
is_variant = alv_variant "w_es_variant
it_events = p_ti_evento[]
is_print = gs_print "Print
TABLES
t_outtab = ti_alv1[]
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.
07-03-2015 2:57 PM
hello, good sadwhin.
Yes. I have already made these changes:
look:
definition:
setting:
now that there was an operation carried out before, it is to remove the layout of the print preview, and shows me the following:
and when printing:
only shows previously hidden columns.
now with the LAYOUT of the print preview shows the following:
and when printing, It shows the same error:
07-06-2015 6:46 AM
Hi,
I think this is because of printer you have selected for background job.
SO define a new format with column 1023 and try .
Then
do the changes in Other Tab
As may post are cancelled only because of sharing link so have some search with below text.
Note-
Google with 'Increasing the width of the spool when using ALV List' you
07-07-2015 6:32 PM
07-09-2015 3:21 PM
hello everyone.
I found no solution to the problem of FM, but if you can help them found the solution to my problem with the creation of an ALV OO.
if they find a possible solution to the FM, please add a possible contribution.
07-09-2015 4:29 PM
Hi Miguel,
I never faced a problem like this. Do you get the same if it is displayed online and you switch to print preview?
I tried with SE16. When printing, I got a warning "System cannot print the last 264 columns of the report". The resulting spool is formatted correctly.
Although I'd also prefer OO grid or even SALV grid I don't think that this is the reason.
I can only guess that it is related to the TOP_OF_PAGE processing. Remove the TOP_OF_PAGE-callback and try again.
If you do any settings in TOP_OF_PAGE, restore the settings before leavin the form.
Regards,
Clemens
07-14-2015 4:34 PM
Hi Clemens.
It does not give me the same online as in print preview, the difference when I put the optimize columns, in which the AVL are displayed correctly, but the impression to optimize columns marked 2 columns disappear. without dialing the optimize columns displayed only in the print preview the 2 columns that are hidden to optimize marking columns.
in SE16 or se16n are when printed, shows no message and all columns are displayed in the print preview.
in TOP_OF_PAGE they are only displayed elements of the system as the user, etc. I've already locked commenting all events, each event generating them again.
and nothing has worked.
07-09-2015 8:35 PM
Looks like an issue with the ALV buffer.
Try to run the program BCALV_BUFFER_DELETE with your program name to clear-up the buffer and see how it goes.
Regards,
Naimesh Patel
07-09-2015 9:22 PM
Hi Naimesh,
As far as I remember from an extended debug experience the ALV Buffer is refreshed if it is older than one day. Miguel posted the question on Jul 2, 2015 and supplied details on Jul 5. ALV bufferrelated problems are usually gone the next day.
Anyway, I'd like to know the reason. Miguel, did you find out something?
Best regards,
Clemens
07-14-2015 4:37 PM
07-14-2015 5:42 PM
Did you try different printers? Try SAP printer LP 01 or printer locl.
Regars, Clemens
07-15-2015 1:46 PM
yeah, that's the first thing you try. and in both cases the same result.