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

Runtime error RAISE_EXCEPTION has occurred

Former Member
0 Likes
2,805

Hi experts...

I am unable to run BDC for transaction GMGRANT in background but this program run successfully in foreground. The log created was like follow :

  • Runtime error RAISE_EXCEPTION has occurred

Any advice or views would be of great help.

Thanks in advance for your help!

Saiful

8 REPLIES 8
Read only

Former Member
0 Likes
918

Hi Sai,

U can use the following code.

CALL TRANSACTION tcode USING bdcdata MODE N.

Don't use any message.

It will be very much usefull to u.

reward point pls.

Regards

Srimanta

Read only

Former Member
0 Likes
918

Hi Srimanta,

Thanks 4 da suggest.. i already used dat.. but right now my program is to upload a .xls file n dis will going tru background and not foreground. What i need right now is i want to execute a batch input (transaction SM35) in background form, but an error don't let it be processed. The error is:

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

- "Runtime error RAISE_EXCEPTION has occurred"

here is bdc coding that i copy and used in my program.. who knows i might missing sumthing in da coding

perform bdc_dynpro using 'SAPLBDT_GMGR' '1000'.

perform bdc_field using 'BDC_CURSOR'

'GMG_HEADER_FIELDS-GRANT_NBR'.

perform bdc_field using 'BDC_OKCODE'

'=CREATE'.

perform bdc_dynpro using 'SAPLBDT_GMGR' '1000'.

perform bdc_field using 'BDC_OKCODE'

'=BDT_RETURN'.

perform bdc_field using 'BDC_CURSOR'

'GMG_HEADER_FIELDS-GRANT_TYPE'.

perform bdc_field using 'GMG_HEADER_FIELDS-GRANT_NBR'

itab_val-gnbr.

perform bdc_field using 'GMG_HEADER_FIELDS-GRANT_TYPE'

itab_val-type.

perform bdc_dynpro using 'SAPLBDT_GMGR' '1000'.

perform bdc_field using 'BDC_OKCODE'

'=BDT_RETURN'.

perform bdc_field using 'GMG_FIELDS-COMPANY_CODE'

itab_val-co_code.

perform bdc_field using 'GMG_FIELDS-GRANT_SHORT_DESC'

itab_val-name.

perform bdc_field using 'GMG_FIELDS-GRANT_DESC'

itab_val-desc.

perform bdc_field using 'GMG_FIELDS-VALID_FROM'

w_datab.

perform bdc_field using 'GMG_FIELDS-VALID_TO'

w_datbis.

perform bdc_dynpro using 'SAPLBDT_GMGR' '1000'.

perform bdc_field using 'BDC_OKCODE'

'=SAVE'.

perform bdc_dynpro using 'SAPMSSY0' '0120'.

perform bdc_field using 'BDC_OKCODE'

'=ENT'.

I can't find any bapi that can be used in my program.

Thanks,

Saiful.

Read only

0 Likes
918

Hi..

In background processing we cannot access the Presentation Server Files (GUI_UPLOAD). It will raise the exception in that case.

That means u create the Session in Foreground and Schedule the session in Background using the Standard program RSBDCSUB.

<b>reward if Helpful.</b>

Read only

0 Likes
918

hi,

Presentation server files cannot be accessed during background processing.

So transfer the file to application server, and then use open dataset, read dataset statements for reading from the file.

<b>Hope this is helpful</b>

Message was edited by:

Runal Singh

Read only

0 Likes
918

Hi...

thanks 4 da advice. i already do the exactly things that you told me here but the schedule session in background also give me the same result with the same error.

i don't get it why the background session can't be process. or mayb my program can't be schedule to the background session? i really don't get it.

Any other advice pls....

Read only

0 Likes
918

Hi,

if u r using gui_upload it wl not work in background.

use <b>ws_upload</b> in place of gui_upload.

Regards,

Reward point if helpfull.

Read only

0 Likes
918

i'm not using the gui_upload.. but ws_upload.

this is make me headache.. 😛

cause i use the standard coding n i also compare wit other upload program..

but my program can't be process in background...

really need solutions.... thanks

Read only

Former Member
0 Likes
918

Got problems related to grant transaction.. need to fix the grant problem first