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 00-341 RAISE_EXCEPTION when using Call Transaction for VA01 in backgr

kasithunuguntla
Participant
0 Kudos

Hi,

I am getting this message when I use call transaction to create a sales order using VA01. Following is the statement I have used. Note that when i execute the program online, I am not getting any errors. I could create sales order without any problem. I am getting this exception only when I run in background.

CALL TRANSACTION 'VA01'

USING BDC_TAB

MODE 'N'

UPDATE 'S'

MESSAGES INTO W_MESS_TAB.

When I captured message tab, I got following messages.

DC006 - Control Framework: Fatal error - GUI cannot be reached

00341 Runtime error RAISE_EXCEPTION has occurred.

Please help me in this regard.

Regards

Kasi

9 REPLIES 9

Former Member
0 Kudos

Check your screenflow once again? There should be some problem with screen flow. Execute this in foreground in all screen mode and see if it is working fine.

Also check if BDCTAB is cleared before reuse.

0 Kudos

I think my details are incomplete. When I execute the program in foreground with all possible Modes given below, it works fine.

*'A' Display the screens

*'E' Only display if an error occurs

*'N' Do not display

I am getting this error only when I schedule a job in the background.

For ex. if I use MODE 'N' and execute program in foreground, SO is created without any problem.

0 Kudos

As I said in my preivous post its because of the controls that cannot be executed in background.

Regards,

Ravi

0 Kudos

Why don't you use BAPI - BAPI_SALESORDER_CREATEFROMDAT2 for the same.

Have a look at this thread

Former Member
0 Kudos

Some times execution of BDC program in back ground is different from the foreground. Some screens may appear in background and raise error while same will not when executed in foreground.

Double click the message in Session log to know more details.

One way is to suppress the screen while executing BDC.

Alternatively I suggest to use BAPI instead.

- Sanjay

Former Member
0 Kudos

Looks like VA01 has got some ALV controls becuase of which it cannot be executed in the background. Are you in the latest version where there are controls on VA01 screen? If yes, then you cannot do a BDC, you will have to go the BAPI way.

Regards,

Ravi

Note : Please mark all the helpful answers

kasithunuguntla
Participant
0 Kudos

I figured out the problem. it is because I am calling Header text screen to populate data. This works fine when I execute the call transaction in foreground in all modes but does not work when I schedule a background job. I have removed calls to these screens and called a FM SAVE_TEXT to add texts after SO is created.

Thanks for all your support.

regards

Kasi

0 Kudos

Got it resolved on my own. Thanks for all your support.

0 Kudos

How do you Rosolve It?

is it posible run a BDC in background?

Please Help!