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: 

job fails in background but success in foreground

Former Member
0 Kudos

Hi,

we have executed a report in foreground which is executed succesfully. but in background the job failed at the container object.

  • create container for alv-tree

DATA: L_TREE_CONTAINER_NAME(30) TYPE C.

L_TREE_CONTAINER_NAME = 'CCONTAINER1'.

CREATE OBJECT G_CUSTOM_CONTAINER

EXPORTING

CONTAINER_NAME = L_TREE_CONTAINER_NAME

EXCEPTIONS

CNTL_ERROR = 1

CNTL_SYSTEM_ERROR = 2

CREATE_ERROR = 3

LIFETIME_ERROR = 4

LIFETIME_DYNPRO_DYNPRO_LINK = 5.

IF SY-SUBRC <> 0.

MESSAGE X208(Z0) WITH 'ERROR'(100).

ENDIF.

Please let us know any pointers on the same.

Why a job fails if we use container/object oriented concepts in report in background?

regards

Shiva

3 REPLIES 3

Former Member
0 Kudos

Hi Shiva,

it is not like that OO can't be used in background. Just check if this particular object may be require to execute in foreground.

Regards,

Atish

Former Member
0 Kudos

Hi Shiva,

this class creates a container object for displaying something (data, a tree, etc), when you use the dialog mode.

It makes no sense to use this class in background.

Somehow you have to controll, if you're in background or not.

One possibilty is to use SY-BATCH; it's TRUE in background.

Ciao Bernhard

marcelo_ramos
Active Contributor
0 Kudos

Hi,

It's uses CFW(Control Frame Work) and You can't use CFW in background.

Regards.

Marcelo Ramos