Skip to Content

Get the current work process details

Hi,

Is there any way to identify the work process id of the current program when it is running?

I have seen an FM 'TH_WP_DETAIL_INFO'. This returns me the work process details based on the index I am passing. But how do I know the Work Process index and server of the current process/program when it is running. So that I can get the work process detail.

Below is my situation:

I schedule a batch job, which repeatedly calls an FM for each of the inputs.

What I want to do is, when the FM is called the first time, I want to store some data and mark the data as below:

Process ID-Process start time - Data

Later when the same FM is called, within the same job, I will see if Data has been store for the same Process ID. If so I will pick up and use it.

Alternative:

Can I use Memory IDs for this?

What happens when multiple such jobs are scheduled? Will the same Memory id-Value be accessible across all? I want the memory id-value to be specific to a job.

Thanks.

V.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jun 10 at 11:30 AM

    Use as below:

      CALL FUNCTION 'TH_GET_OWN_WP_NO'
        IMPORTING
          wp_index = wp_index.
      CALL FUNCTION 'TH_WP_DETAIL_INFO'
        EXPORTING
          wp_index = wp_index
        IMPORTING
          wpinfo   = wp_info
        EXCEPTIONS
          OTHERS   = 99.
    Add comment
    10|10000 characters needed characters exceeded