Application Development and Automation 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: 

In ALV report, while running Background job some columns are displaying empty (misaligned) ?

vinayad
Participant
0 Kudos
1,488

Hello team,

In ALV report, while running Background job some empty columns are displaying between each column (misaligned) but displaying correct for foreground ?

What would be the issue ?

Any help would be appreciated !

12 REPLIES 12

Sandra_Rossi
Active Contributor
1,155

I guess you output the ALV to a spool request. It might be the issue that you didn't define sufficient width for the spool file, and so lines continue on the next line? Please post a screenshot so that we can make sure what is your exact issue.

vinayad
Participant
0 Kudos
1,155

Hi sandra.rossi

Thanks for replying. Here I have attached the screenshot.

Sandra_Rossi
Active Contributor
0 Kudos
1,155

Generating a file from the spool file is a difficult mission. There's no standard converter for that. Usually, a custom program is created to run the program to intercept the data before it goes to the spool file.

RaymondGiuseppi
Active Contributor
0 Kudos
1,155

Which tool dit you use in OO ALV (e.g. using CL_SALV_PRINT (from CL_SALV_TABLE->GET_PRINT) to set some parameters when CL_SALV_TABLE=>IS_OFFLINE = if_salv_c_bool_sap=>true or some other parameter or method)

vinayad
Participant
0 Kudos
1,155

Hi raymond.giuseppi

Used here 'Reuse_alv_grid_display'

RaymondGiuseppi
Active Contributor
0 Kudos
1,155

Did you pass some values in IS_PRINT parameter, do they comply with values passed to the background job for print options?

vinayad
Participant
0 Kudos
1,155

Hi raymond.giuseppi

Yes, passing a custom structure.

fields like, werks TYPE mt61d-werks,

matnr TYPE mt61d-matnr

RaymondGiuseppi
Active Contributor
0 Kudos
1,155

I was not asking on the structure of internal table and field catalog (even if a consistency check is always a good idea) but explicitally on the IS_PRINT parameter.

vinayad
Participant
0 Kudos
1,155

raymond.giuseppi

no not passing any values to IS_PRINT parameter.

RaymondGiuseppi
Active Contributor
1,155

Can you set parameter ID SALV_SWITCH_TO_LIST to 'X' and execute your report in foreground (will switch to from REUSE_ALV_GRID_DISPLAY to REUSE_ALV_LIST_DISPLAY as in background job)

if no problem during spool display, then insure consistency between print parameter of the background job step and default values in your ALV.

vinayad
Participant
0 Kudos
1,155

raymond.giuseppi

I followed the same but no changes but when tried to extract with ALV foreground with REUSE_ALV_LIST_DISPLAY it is proper output means no gap/empty columns.

RaymondGiuseppi
Active Contributor
0 Kudos
1,155

In SM37 look at the print parameters of the background job.