Skip to Content
author's profile photo Former Member
Former Member

How to use 'TH_WP_DETAIL_INFO'

Hi all,

How do we use this FM 'TH_WP_DETAIL_INFO' to get the PID of the current program?

when I execute like this

CALL FUNCTION 'TH_WP_DETAIL_INFO'
EXPORTING
WP = 'XX'
WITH_CPU = '10'
WP_INDEX = '0'
IMPORTING
WPINFO = wpinfo.


I am always getting the first PID in stack.


Please help me

Thanks in advance.

Santhosini

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 06, 2014 at 05:43 AM

    Dear All..

    Thank you for the suggestions.

    1.I tried TH_WPINFO inside a small report . But the FM failed to return me the current PID even after passing the report name in WP_REPORT

    2. same with RZL_SYSTEMWIDE_WPINFO

    when I executed SM50 I was able to see my report running . But the entry is not showing up when i view the list inside my program.

    And the Major issue why i needed the PID is,

    The same program calls the BADI in multiple sessions. The BADI needs to be switched OFF/ON based on the user decision for each individual execution.

    We had problems when we used a static variable.

    Now we are using ABAP memory

    Still we require a unique number that can identify my individual execution and sustain the BADI

    Say I use GUID_CREATE , and generate a GUID in my calling program , the same guid can not be generated in the BADI.

    Any Random number generation , number ranges would fail in this case.

    Reading the WP_LIST with WP_REPORT l is ambiguous as well.

    any thing out of the box in this case is definitely what I am looking at 😊

    Thanks in advance,

    Santhosini

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 03, 2014 at 08:21 AM

    Hi Santhosini,

    Please pass the wp_index as 1, 2, 3... etc.

    Based on the above number it fetches the pid value.

    Run the function module and check with sm50.

    Arivazhagan S

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 03, 2014 at 08:41 AM

    Hi Santhosini,

    for taking values from any FM, you have to pass correct parameters onto it.

    Please see this link for all the possible parameters

    SAP Function TH_WP_DETAIL_INFO - Determine detailed information on a work process

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 03, 2014 at 08:58 AM

    Hi,

    Can you check the note Note 900837 - No DB data in work process detail display

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 03, 2014 at 10:09 AM

    Thanks for the replies...

    My requirement is still not met..

    I want to run this FM in my program and get the PID of the current process.. Is this possible?

    What I found here is , we need to pass the work index number to fetch the respective PID

    In my case i do not know the work Index number

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Sanhosini,

      1. First you have to get the sever name!

      2. Then get the work process list on the server

      3. Get the PID of the current program

      CALL FUNCTION RZL_SYSTEMWIDE_WPINFO

      It will retrieve the system/server wide work process

      READ TABLE WPLIST WITH KEY WP_REPORT = SY-CPROG

      IF SY-SUBRC = 0.

      WPLIST-WP_PID - get the PID

      ENDIF.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.