Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Display ALV column

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.

16 REPLIES 16

former_member182915
Active Contributor
0 Kudos

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.

former_member182915
Active Contributor
0 Kudos

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.

raymond_giuseppi
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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.

0 Kudos

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.

   

0 Kudos

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:

Apurva Maduskar

0 Kudos

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

0 Kudos

does not work, the problem remains the same.

Former Member
0 Kudos

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.

0 Kudos

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

0 Kudos

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.

naimesh_patel
Active Contributor
0 Kudos

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

0 Kudos

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

0 Kudos

not yet I have not found the solution to the FM.

0 Kudos

Did you try different printers? Try SAP printer LP 01 or printer locl.

Regars, Clemens

0 Kudos

yeah, that's the first thing you try. and in both cases the same result.