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: 

regarding background processing

Former Member
0 Kudos

hi experts,

i have developed a report in which huge amount of data is involved so i decided to execute in the background,,,for this i created the variant and for back ground i wrote this code but when i execute this it gives an error plz help me to solve this problem sud i change something in the variant or in the function module....

report given here::::

REPORT ZBACKGROUND.

parameters:job(32) .

data:count like btcevtjob-JOBCOUNT,

teamit like TBTCJOB-AUTHCKNAM.

CALL FUNCTION 'JOB_OPEN'

EXPORTING

  • DELANFREP = ' '

  • JOBGROUP = ' '

JOBNAME = JOB

  • SDLSTRTDT = NO_DATE

  • SDLSTRTTM = NO_TIME

  • JOBCLASS =

IMPORTING

JOBCOUNT = COUNT

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

WRITE:/ SY-SUBRC.

CALL FUNCTION 'JOB_SUBMIT'

EXPORTING

  • ARCPARAMS =

AUTHCKNAM = TEAMIT

JOBCOUNT = COUNT

JOBNAME = JOB

REPORT = 'ZRAW_PRODUCTION_REPORT'

VARIANT = 'ZRAW'

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

WRITE:/ SY-SUBRC.

CALL FUNCTION 'JOB_CLOSE'

EXPORTING

JOBCOUNT = COUNT

JOBNAME = JOB.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

WRITE:/ SY-SUBRC.

error:::ShrtText

Exception condition "INVALID_JOBDATA" raised.

What happened?

The current ABAP/4 program encountered an unexpected

situation.

Error analysis

A RAISE statement in the program "SAPLBTCH" raised the exception

condition "INVALID_JOBDATA".

Since the exception was not intercepted by a superior program

in the hierarchy, processing was terminated.

Short description of exception condition:

Error in Job Data, See SYSLOG

For detailed documentation of the exception condition, use

Transaction SE37 (Function Library). You can take the called

function module from the display of active calls.

-

Trigger Location of Runtime Error

Program SAPLBTCH

Include LBTCHU24

Row 308

Module type (FUNCTION)

Module Name JOB_SUBMIT

ource Code Extract

ine SourceCde

278 GLOBAL_STEP_TBL-AUTHCKNAM = AUTHCKNAM.

279 GLOBAL_STEP_TBL-STATUS = BTC_SCHEDULED.

280 MOVE-CORRESPONDING PRINT_PARAMS TO GLOBAL_STEP_TBL.

281 MOVE-CORRESPONDING ARC_PARAMS TO GLOBAL_STEP_TBL.

282 APPEND GLOBAL_STEP_TBL.

283

284 CALL FUNCTION 'BP_JOB_MODIFY'

285 EXPORTING

286 DIALOG = DIALOG_FLAG

287 JOBCOUNT = GLOBAL_JOB-JOBCOUNT

288 JOBNAME = GLOBAL_JOB-JOBNAME

289 NEW_JOBHEAD = GLOBAL_JOB

290 OPCODE = BTC_MODIFY_WHOLE_JOB

291 TABLES

292 NEW_STEPLIST = GLOBAL_STEP_TBL

293 EXCEPTIONS

294 CANT_ENQ_JOB = 02

295 INVALID_NEW_JOBDATA = 09

296 OTHERS = 99.

297

298 CASE SY-SUBRC.

299 WHEN 0.

300 *

301 * Stepnummer ermitteln

302 *

303 DESCRIBE TABLE GLOBAL_STEP_TBL LINES STEP_NUMBER.

304

305 WHEN 02.

306 RAISE LOCK_FAILED.

307 WHEN 09.

>>>>> RAISE INVALID_JOBDATA.

309 WHEN OTHERS.

310 RAISE JOB_SUBMIT_FAILED.

311 ENDCASE.

312

313 ENDFUNCTION.

2 REPLIES 2

Former Member
0 Kudos

0 Kudos

thnx for ur help santosh but instead of sending url better to solve it by own that wud b better for u this is my suggestion for learing purpose..........