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

Problem in Memory ID

Former Member
0 Likes
765

Hi Experts,

I am facing a problem while using Memory ID.

I am using Parallel Processing for a Batch program where I need to SUBMIT a report for a bunch of records in a loop and need to Export an internal table to a Memory ID for that submitted report which will be imported in that particular Report.

Now the problem I am facing is, The Parameter value is getting overlapped.

Below is the peace of code:

LOOP AT gt_installation INTO gwa_installation.

gwa_installation2 = gwa_installation.

APPEND gwa_installation2 TO gt_installation2.

lv_count = lv_count + 1.

IF lv_count = 1000.

lv_jobcount = lv_jobcount + 1.

PERFORM f_create_jobs USING lv_jobcount

CHANGING gt_installation2.

CLEAR lv_count.

ENDIF.

ENDLOOP.

IF lv_count IS NOT INITIAL.

lv_jobcount = lv_jobcount + 1.

PERFORM f_create_jobs USING lv_jobcount

CHANGING gt_installation2.

ENDIF.

FORM f_create_jobs USING lvp_jobcount TYPE i

CHANGING gtt_installation2 TYPE tt_instalation2 .

DATA:

lv_jcount(3) TYPE c,

lv_jobname TYPE v_op-jobname,

lv_jobnumber TYPE btcjobcnt.

CONSTANTS: lc_job_name(10) TYPE c VALUE 'READREMIND',

lc_underscore TYPE c VALUE '_'.

EXPORT gtt_installation2 TO DATABASE indx(xy) ID 'INST'.

lv_jcount = lvp_jobcount.

CONDENSE lv_jcount.

CONCATENATE lc_job_name

sy-datum

sy-uzeit

lv_jcount

INTO lv_jobname SEPARATED BY lc_underscore.

  • Open batch JOB

CALL FUNCTION 'JOB_OPEN'

EXPORTING

jobname = lv_jobname

IMPORTING

jobcount = lv_jobnumber

EXCEPTIONS

cant_create_job = 1

invalid_job_data = 2

jobname_missing = 3

OTHERS = 4.

IF sy-subrc EQ 0.

  • Submit sub job

SUBMIT zmet_prl_periodic_readreminder

VIA JOB lv_jobname NUMBER lv_jobnumber

WITH p_subjob EQ gc_x

WITH s_mru IN s_mru

WITH s_mrreas IN s_mrreas

WITH p_sydate EQ p_sydate

WITH cb_bdd EQ cb_bdd

WITH cb_wa EQ cb_wa

WITH p_rdrmdt EQ p_rdrmdt

AND RETURN.

  • Close JOB

CALL FUNCTION 'JOB_CLOSE'

EXPORTING

jobcount = lv_jobnumber

jobname = lv_jobname

strtimmed = 'X'

EXCEPTIONS

job_close_failed = 1

OTHERS = 2.

IF sy-subrc <> 0.

CLEAR lv_jobname.

ENDIF.

  • Clear records for next JOB

  • CLEAR: lv_count.

REFRESH gtt_installation2[].

ENDIF.

ENDFORM. " F_CREATE_JOBS

Any help would be really appreciated.

Regards,

Nitin Karamchandani.

2 REPLIES 2
Read only

Former Member
0 Likes
546

Hello,

Can you please try to use export statement (EXPORT gtt_installation2 TO DATABASE indx(xy) ID 'INST'.)

after JOB_OPEN fucntion module call..?

And before JOB_CLOSE use below statement

EXPORT space TO DATABASE indx(xy) ID 'INST'

Thanks.

Read only

0 Likes
546

Solved the problem myself by using Dynamic Memory ID.

Thanks for you reply.

Regards,

Nitin Karamchandani.