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: 
Read only

Problem running ALV in Background.

sarbajitm
Contributor
0 Likes
522

Hi all,

I have created a simple report which take a file as input and display it either LIST or GRID mode based on the radibutton choose on the selection screen.Until this point everything is going smoothly.Now I have created two variant choosing one will display loaded table in GRID mode and another one will display in LIST mode.

Now I am creating a job in SM36 giving the details like program name,variant name. and running the job in IMMEDIATE mode.The job become CANCELED and the error log display message FrontEnd function is not possible in Batch Input Mode.

If anybody have faced similar kind of problem, then kindly share how to solve this problem.

Thanks in advance.

Sarbajit.

Hi all,

I have created a simple report which take a file as input and display it either LIST or GRID mode based on the radibutton choose on the selection screen.Until this point everything is going smoothly.Now I have created two variant choosing one will display loaded table in GRID mode and another one will display in LIST mode.

Now I am creating a job in SM36 giving the details like program name,variant name. and running the job in IMMEDIATE mode.The job become CANCELED and the error log display message FrontEnd function is not possible in Batch Input Mode.

If anybody have faced similar kind of problem, then kindly share how to solve this problem.

Thanks in advance.

Sarbajit.

3 REPLIES 3
Read only

Former Member
0 Likes
494

cl_gui_alv_grid=>offline( ) does the trick

The only thing is u have to code it in oops if u want i can send u the whole logic

below is the code for background

SET PF-STATUS 'MAIN100'.

SET TITLEBAR 'TB000'.

IF m_custom_container IS INITIAL.

*
For backgroung processing

IF cl_gui_alv_grid=>offline( ) IS INITIAL.

CREATE OBJECT m_custom_container

EXPORTING container_name = container_main.

CREATE OBJECT m_grid

EXPORTING i_parent = m_custom_container.

ELSE.

  • If it is in backround:

CREATE OBJECT m_grid

EXPORTING i_parent = m_doc_container.

ENDIF.

*// For backgroung processing

CALL METHOD m_grid->set_table_for_first_display

EXPORTING

i_structure_name = 'IT_MDPS'

is_layout = wa_layout

is_variant = wa_variant

i_save = 'A'

it_special_groups = it_fieldgroups

CHANGING

it_outtab = it_mdps

it_fieldcatalog = it_fieldcat.

CREATE OBJECT event_receiver.

SET HANDLER event_receiver->handle_hotspot_click FOR m_grid.

ELSE.

CALL METHOD m_grid->refresh_table_display

EXPORTING i_soft_refresh = 'X'.

ENDIF.

ENDMODULE. " status_0100 OUTPUT

Read only

0 Likes
494

Hi! Bhanu,

The code snippet in your thread is based on OO ALV, i think. As I'm not using OO ALV so can you kindly tell me how to solve the problem staying within normal ALV or you can also explain your above thread a bit elaborately.

Thanks.

Read only

Former Member
0 Likes
494

as you are upload flat file data into your internal table from presentation server it is giving you this error.

if you place this file in the application server and upload it into youer internal table using open dataset , then this error will not come

in back ground front end will not work.