cancel
Showing results for 
Search instead for 
Did you mean: 

How to Schedule BSP programin background?

Former Member
0 Kudos

Hi all,

As my online progrm takes long time to process,i want to schedule it in background.I have an internal table which i like to schedule it in background.

Do i need to create an ABAP report to schedule it?

Is there a way to achieve it from BSP itself?

How to pass my itab from BSP to ABAP report?

Thanks and regards,

Jothi.P

Accepted Solutions (1)

Accepted Solutions (1)

raja_thangamani
Active Contributor
0 Kudos

<i>Do i need to create an ABAP report to schedule it?</i>

-->Yes you need to create ABAP Report to schedule it in backgroud.

<i>How to pass my itab from BSP to ABAP report?</i>

--> YOu can store it Memory/Buffer from BSP & read it from ABAP report.

Refer this below link:

<i>*Reward each useful answer</i>

Raja T

Former Member
0 Kudos

Hi Raja,

Could you give an example of how to store an itab in memory/buffer and how to read it in ABAP report ?

Rgds,

Jothi.P

Former Member
0 Kudos

Hi,

Export your internal table like this.

EXPORT IT_TEMPLATEID TO MEMORY ID 'IT_TEMPLATEID'.

where IT_TEMPLATEID is your internal table.

Import it in your application using the import command.

IMPORT IT_TEMPLATEID from memory id 'IT_TEMPLATEID'. "I am not sure on the syntax here

Hope this helps you.

Regards,

Subbu.

Former Member
0 Kudos

Hi Subramanian,

Im getting the foll error while exporting itab from Oninputprocessing of my BSP application.

Export Var1 to varn is not supported in OO context.

Rgds,

Jothi.P

Former Member
0 Kudos

Hi,

Try calling a Class method in the On input processing event of your BSP. Here pass the internal table ( Eg. Application->documents_todo ) to the class method. Now in the class method again call a custom FM and pass the same table to the FM.

Make the class method static and have the itab as importing parameter to the method.

Export syntax will surely work in the FM.

This is a workaround method that i know.

Hope this helsp you.

Regards,

Subbu.

Former Member
0 Kudos

Hello Subramanian,

Yes i want to export application->documents_todo to memory.

How to do that.

I have created a custom table (docu_todo = application->documents_todo )

and can't export that too.

Would you give the sytax for exporting this itab to memory.

Rgds,

Jothi.P

Former Member
0 Kudos

Hi,

Do the coding like this.

1. Create a Z or Y class in the tcode SE24. After this create a static method export_itab with import parameter documents_todo type HAP_T_DOCUMENTS.

2. Create a Z or Y FM in the Tcode SE37. Here export the table to the memory. Have the same documents_todo type HAP_T_DOCUMENTS as import parameter to the FM.

3. Call the Y or Z FM in newly created Class method "export_itab".

4. After this call the class method in your BSP application

  • Call this customer method to get the internal table into memory

CALL METHOD ycl_exportto_memory=>export_itab

EXPORTING

document_todo = docu_todo .

I am sure this only a workaround way. There should be a direct method possible.

Hope this helps you.

Regards,

Subbu.

Former Member
0 Kudos

Hi,

<u>How will i import this table t_docu_todo in ABAP report ?</u>

The scenario is to change the status from 'Process' to 'Approve'

I have created a BSP page which displays all the reporting employees details .and the manager can either do select all / individual seletion to approve the appraisals.

I have used 'HRHAP_DOCUMENT_CHANGE_STATUS' and its working fine.As it's taking long time to process 50 o employees...we pal to put this job in background.

Now i want to pass the selected records to ABAP report, so that i schedule the report in bckground.Am i on the right track or anyother workarnd is available ?

Rgds,

Jothi.P

Former Member
0 Kudos

Hi Jothi,

Where did you do the coding for the FM 'HRHAP_DOCUMENT_CHANGE_STATUS' ? Is it directly in the event handler of the BSP or in a separate Class method.

Try doing the coding in the Class method by placing your code (for status change)in the class method. This i think should be faster. since it creates a separate internal session (i think).

The schedule of report will not work.

Why??

Reason: The export to memory can contain one set of data at a time. After which the data has to be imported to some report immediately and free the memory.

Else the same BSP application will be called by another manager(as many mangers in the company) and so the new export memory will have data set correspoding to the next manger's appraisal documents.

So u have to call the report from your BSP or through class method immediately and utilize the exported memory immediately. which is the same as coding inside a class method which is called from the BSP.

The report cannot be scheduled separately in this approach. If you have a separate custom table to store the approved or rejected data(with appraisal doc id and status ) from the BSP then the report scheduling will work.

Hope i have clarified you.

Regards,

Subbu.

Former Member
0 Kudos

<i>Where did you do the coding for the FM 'HRHAP_DOCUMENT_CHANGE_STATUS' ? Is it directly in the event handler of the BSP or in a separate Class method.</i>

Calling directly in Oninputprocessing.

1.If i call the fn module in separate method class will the scheduler works ?

2.Whts the way to schedule BSP report in background?

3.can't we create the memory id by username who excute the report?will it work?

4.How do i import the table in abap report? syntx !

Thanks nd regards,

Jothi.P

Former Member
0 Kudos

Hi,

1.If i call the fn module in separate method class will the scheduler works ?

A: Irrespective of your scheduling, i think the performance of the FM call will improve if your FM is coded inside the class method.

2.Whts the way to schedule BSP report in background?

A: You have to create a Z table an have fields as Appraisal document id and status. Now in your custome program(Scheduler Report) fetch the data from this Ztable and change the status of the Appraisal document.

3.can't we create the memory id by username who excute the report?will it work?

A: I think it is not possible.

4.How do i import the table in abap report? syntx !

A : IMPORT 'TABLE_NAME' from memory id 'MEMORY_ID_NAME'.

Note that the table name should be the same. ie both the import and export table name should be same.

Hope this helps you.

Regards,

Subbu.

Former Member
0 Kudos

Hi,

<i>A: You have to create a Z table an have fields as Appraisal document id and status. Now in your custome program(Scheduler Report) fetch the data from this Ztable and change the status of the Appraisal document</i>.

Instead of ztable can't i pass the itable from function module to ABAP (scheduler report).

Can i pass the itable as Vairant in the fnmodule SIMPLE_BATCH_JOB_SUBMIT

Rgds,

Jothi.P

Rgds,

Jothi.P

Former Member
0 Kudos

Hi,

You have decided to schedule because the BSP takes time for processing all the appraisal docs right..Then u have to schedule the report for a later time.

Since you are scheduling the report, you have to get the data from a placeholder.

For this you need to have a custom DB table to store the data. The Buffer memory cannot hold the data for all the docs executed by all the managers.

Am i clear?

Also did you try by doing the change status function call through a class method?

Try that before going with scheduling approach.

Regards,

Subbu.

Former Member
0 Kudos

thnks . we have decided to create a custom table for scheduler.

wht happend if many managers run the program at the same time.

suppose mgr- A has some 10 recds to process, and mgr-B has n number of recs.

can i create a mgr field in the custom table and pass the mgrid from the BSP, so that only that mgr recs will be processed.

Rgds,

Jothi.P

Former Member
0 Kudos

Hi,

Yeah you can have a manager field to track which manager has approved or rejected the appraisal document for an employee.

Make sure u have the document id as one of the primary key in the table.

Regards,

Subbu.

Answers (0)