09-18-2006 10:21 AM
Hello friends,
Just like to know, do any one know, if there is functional module which determine, the highest PSP ELEMENT ?
Regards,
09-18-2006 10:23 AM
Hello Malang,
To find out the top level PSP, there is field in PRPS table called STUFE.
If <b>STUFE = '1'</b> then it is a top level PSP.
If useful reward.
Vasanth
09-18-2006 10:24 AM
Hi Vasanth,
Thanks for you reply,
If stufe is not equal to '1', then whats next ? how to determine the highest element ?
Regards,
09-18-2006 10:26 AM
Hello,
If STUFE <> 1 then it is not the top level PSP. It will be the subordinate of other PSP.
Regards,
Vasanth
09-18-2006 10:28 AM
Hi vasanth,
thanks for your reply, and help .
Yes this I understood, if its <> 1 then its not top level psp element, my question is how to dertermine "THEN" top-level psp element ?
Is there any standard fm to do so, I was not able to find the one ?
Regards,
09-18-2006 10:33 AM
You can use the FM "AIPR_GET_HIERARCHY_TO_PSPEL" to find the top level PSPNR.This FM returns back a structure conaining the following fields :
OBJNR LIKE IMZO-OBJNR,
OBJNR_UP LIKE IMZO-OBJNR,
STUFE TYPE I,
Using these values returned you can fetch the WBS information from PRPS table based on objnr.
09-18-2006 10:34 AM
Hello,
Use this SQl
SELECT * FROM PRPS INTO TABLE ITAB WHERE POSID IN SO_PSPID
AND STUFE EQ '1'.
Vasanth
09-18-2006 10:51 AM
Hello Vasanth,
Thanks for your reply
okey, I want to create a fm now to determine the higest psp element.
CALL FUNCTION "GET_HIGHEST_PSPNR"
EXPORTING
tab_pspid = so_pspid
Importing
l_pspnr = lv_pspnr....
What do you think, how I can define the tab_pspid in the difination of fm... ( tab_pspid type _ _ _ )?
Regards,
09-18-2006 10:53 AM
Hello Vasanth,
ohhh wait, what if in so_pspid I dont have the highest element ( imagine, i have in selectin screen a lower level id, and I have to determien the highes level id ) so does not really fit, ?? OR
09-18-2006 11:05 AM
Hello Malang,
PARAMETERS: P_POSID LIKE PRPS-POSID.
Here P_POSID is the any PSP element
DATA: LV_POSID LIKE PRPS-POSID.
DATA: POSID like prps-posid.
CONCATENATE P_POSID '%' INTO LV_PSPID.
SELECT PSPID FROM PRPS INTO POSID WHERE POSID LIKE LV_PSPID AND STUFE EQ '1'.
Here in POSID u will get the TOP level PSP
Try like this.
Vasanth
Vasanth
Message was edited by: Vasanth M