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: 

ALV in Back ground..

Former Member
0 Kudos

Dear All,

I need change the layout of a ALV (from 33 fields to 22 fields in the output) with the number of characters in the header (255 Characters) and the number of Characters in the each column under header in the layout (169 Characters). Layout is changed & the output is OK when the report is run normally; but when the report is run in background, last field (22nd) is completely missing and even three characters in 21st field are missing.

Kindly let me know if <b>whats the problem in executing the ALV report in background??, why is this happening?? and what is to be done????</b>

Thanks a lot.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi,

check this one ,u will get some help

How can I use ALV for reports that are going to be run in background?

http://www.sapfans.com/forums/viewtopic.php?t=83243

http://www.sapfans.com/forums/viewtopic.php?t=19224

14 REPLIES 14

Former Member
0 Kudos

Background means, when Job scheduling is done.

Thanks.

Former Member
0 Kudos

hi,

check this one ,u will get some help

How can I use ALV for reports that are going to be run in background?

http://www.sapfans.com/forums/viewtopic.php?t=83243

http://www.sapfans.com/forums/viewtopic.php?t=19224

MarcelloUrbani
Active Contributor
0 Kudos

In background you usually ALV gives you an abap list.

I think you should simply increase the line size of your report.

Pawan_Kesari
Active Contributor
0 Kudos

try with this

Report XXXXXX ..... LINE-SIZE 255 LINE-COUNT 65

Former Member
0 Kudos

@ Marcello Urbani: Yes ALV is displayed as a List when run in background.

@ Pawan Kesari: I already tried this Report xxxxxxxxx LINE-SIZE 255 LINE-COUNT 65. But there is no change in the way the List is being displayed.

0 Kudos

Farooq,

I faced similar problem earlier ... I checked the code just now and foud that I did two change to correct

1. Change in LINE-SIZE and LINE COUNT

2. I put below code in AT SELECTION-SCREEN event,


  CALL FUNCTION 'SET_PRINT_PARAMETERS'
       EXPORTING
            layout     = 'X_65_255'
            line_count = 65
            line_size  = 255.

I was using ALV list.. try with this FM

0 Kudos

Hai Pawan,

Thanks a lot dear, I tried these, but nothing is changing... any other alternative Pllzzzz....

0 Kudos

Hopefully you are using FM REUSE_ALV_GRID_DISPLAY

Please try these option once..

1. Set field no_min_linesize in LAYOUT structire to 'X'

2. There is and importing parameter IS_PRINT in that you need to pass structure SLIS_PRINT_ALV. Set field SLIS_PRINT_ALV-no_change_print_params = 'X'.

Along with these change keep LINE-SIZE 255 in report.

0 Kudos

Hi Farooq,

I believe you are not using OO programming anywhere but thenthe report when run in background gives unpredictable results..

raymond_giuseppi
Active Contributor
0 Kudos

Look at parameter IS_PRINT, (if reuse alv) look for the field NO_CHANGE_PRINT_PARAMS

<i> Value range: SPACE, 'X'

SPACE = (default) The output format (number of columns) is

dynamically adjusted depending on the list width (255 at most).

'X' = The current print parameters are always used. If the list is

wider, the output width is not adjusted dynamically. </i>

Regards

Former Member
0 Kudos

Hi Farooq

What do you mean by executing in bg means...what output format are you using?? is it saved as an excel and send as an email or something else??

Cheers

~Arun

0 Kudos

Dear Arun,

Actually the scenario is:

<i>Currently when executing the program in background it outputs the file with a default layout that doesn’t contain the correct information required for the business. This means that the end user has to run this report themselves. This is not an issue when the end of the month falls on a weekday as the user can run the report in foreground and save as an Excel file, however if it falls on a weekend then somebody needs to come into work to run this. The information needs to be ‘live’ for the last day so retrospective running of this report is not viable.</i>

This means that when needed the user is scheduling the Job to execut the Report in the Background. Hope U understand.. If Possible kindly help me out dear.

Thanks in advance.

Former Member
0 Kudos

@ Raymond: I have not understand what U wrote. Can u please elaborately explain with a example & its advs & implications.... Pllllzzzzzz

@ Mehra, Ya, I am not using any OO Concepts here.

I found the exact problem & its solution in the link below, but the Problem in the link is that the solution is given in OO concepts. But the report here is the normal ALV grid.

<a href="http://www.saptechnical.com/Tutorials/ALV/ALVFatalError/ALVFatalError1.htm">http://www.saptechnical.com/Tutorials/ALV/ALVFatalError/ALVFatalError1.htm</a>

If anyone can get me a solution using this concept in normal ALV Grid then I will be very thank ful to U.

Thanks in Advance.

former_member223537
Active Contributor
0 Kudos

Hi,

Refer this blog:

/people/prashant.patil12/blog/2007/02/20/displaying-alv-grid-in-background-job

Best regards,

Prashant