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: 

Error in BDC when executed in back ground

Former Member
0 Kudos

Hi All,

We are working on a BDC interface for Material Master Basic Data Add or Change using SAP 4.7. The interface is working fine with CALL TRANSACTION (N,A screen modes), BDC foreground and Display error modes.

When the same session is executed in background mode it is not getting processed.

The error is caused while calling screen 2031 which uses a control. The diagnosis we received is given below

Control Framework: Fatal error - GUI cannot be reached

Message no. DC006

Diagnosis

When the Control Framework is started, the system checks whether the installed GUI supports frontend components such as controls. This check failed; the causes may be as follows:

1.) The program is running in the background

2.) A transaction was called using CALL TRANSACTION ... STARTING IN BACKGROUND TASK.

Procedure

Programs that run in the background cannot address controls on the frontend. In this case, the application must either include a fallback that does not depend on the user interface, or the program or transaction must detect for itself that is running in the background and terminate itself.

Is there any alternate method available for running the session in background with the controls?

Please help us in this regard.

Thanks in advance.

Kathirvel Balakrishnan

1 ACCEPTED SOLUTION

andreas_mann3
Active Contributor
0 Kudos

Hi Kathirvel,

another alternative to create/change mm-data is program <b>RMDATIND</b>

(direct-input mechanism)

regards Andreas

6 REPLIES 6

christian_wohlfahrt
Active Contributor
0 Kudos

Hi Kathirvel!

In description of error: 'In this case, the application must either include a fallback that does not depend on the user interface, or the program or transaction must detect for itself that is running in the background and terminate itself.'

Obviously in material master only second option was implemented - termination.

Alternative: using IDOCs or BAPIs like BAPI_MATERIAL_SAVEDATA, BAPI_MATERIAL_MAINTAINDATA_RT.

Regards,

Christian

andreas_mann3
Active Contributor
0 Kudos

Hi Kathirvel,

another alternative to create/change mm-data is program <b>RMDATIND</b>

(direct-input mechanism)

regards Andreas

Former Member
0 Kudos

Hi All,

Thanks for your valuable suggestions.

The problem was due to the controls present in the screen 2031, which are not supported when a session is executed in back ground. Further our requirement is not to use BAPI's and Direct Input methods.

There is one more option for the same, i.e. using MMZ1 for MM01 and MMZ2 for MM02. This works out well.

Thanks and Regards,

Kathirvel

christian_wohlfahrt
Active Contributor
0 Kudos

Hi!

Attributes of MMZ1 says: not any longer used standard programs - it's not a good idea to use this routines.

Life isn't easy: you can't have simple program (like BDC) and update complex master data views.

'Correct' approach: use BAPI. Of course it's more work, but this save way for your master data - customer should understand this topic (after a while...)

Regards,

Christian

0 Kudos

Hello,

I'm facing the same problem.

Really bizzare that this is not working any more (a simple MM01 in background). But I guess SAP is pushing all of us to stop using BI's and start using bapi's and idoc-like solutions.

I didn't find anything on oss about this issue however. Did anybody else do?

Christoph

Former Member
0 Kudos

The error was due to front end controls that cannot be accessed in background. I replaced them BAPI_MATERIAL_SAVEDATA and the problem was solved.

Regards

Kathirvel