cancel
Showing results for 
Search instead for 
Did you mean: 

Web Dynpro ABAP to background job triggered, No data when processing

Former Member
0 Kudos

Hi,

My development is in Web Dynpro ABAP pass an internal table to report and make it as a background job. I did by using the Memory ID.Without background job I did it as follows, it is working fine


EXPORT et_list FROM et_list
         TO MEMORY ID 'MEMID1'.

SUBMIT zbackjob AND RETURN.  
Report:   IMPORT et_list TO lt_list FROM MEMORY ID 'MEMID1'.
lt_list is contains correct value  

I done the background job, background job triggered, No data when processing it


EXPORT et_list FROM et_list
         TO MEMORY ID 'MEMID1'.
*  SUBMIT zbackjob AND RETURN.

  CALL FUNCTION 'JOB_OPEN'
  ***
  ***    
  CALL FUNCTION 'JOB_SUBMIT'
    EXPORTING
      authcknam               = lv_authcknam
      jobcount                = lv_job_count
      jobname                 = lv_jobname
      report                  = 'ZBACKJOB'

  CALL FUNCTION 'JOB_CLOSE'
  ***
  ***    

Report:   IMPORT et_list TO lt_list FROM MEMORY ID 'MEMID1'.
lt_list is empty 

Help me please!!!

By Anand Babu R

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

The job doesn't occur synchronously. If you try to code the Import from memory immediately after submitting the job, the job probably hasn't even ran yet. You need to check and see if your job is completed running before you try and get the report out. Also keep in mind that when running background jobs, they might load ballance to another application server in a multi-application server environment. I don't think your design of export/import to memory of the report information will work in that environment. I think you need to design differently and consider perhaps swapping the data into and out of a temporary database table instead.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Thomas,

What about if we trigger Job by Event and Import Data in a program.

Example below.

EXPORT et_list FROM et_list TO MEMORY ID 'MEMID1'.

CALL FUNCTION 'BP_EVENT_RAISE'

       EXPORTING

         eventid                      = 'ZTEST'

        EVENTPARM                    = ' '

        TARGET_INSTANCE              = ' '

        TARGET_MODE                  = ' '

      EXCEPTIONS

        BAD_EVENTID                  = 1

        EVENTID_DOES_NOT_EXIST       = 2

        EVENTID_MISSING              = 3

        RAISE_FAILED                 = 4

        OTHERS                       = 5

  ***   

****Background job Which Triggered by Event.

Report:  

IMPORT et_list TO lt_list FROM MEMORY ID 'MEMID1'.

Is this will work out.

Thanks

Raj

Former Member
0 Kudos

Hi Thomas,

I used temporary database table it is working fine.

Thanks,

Anand Babu R