Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Higest PSP-Element

Former Member
0 Kudos

Hello friends,

Just like to know, do any one know, if there is functional module which determine, the highest PSP ELEMENT ?

Regards,

9 REPLIES 9

Former Member
0 Kudos

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

0 Kudos

Hi Vasanth,

Thanks for you reply,

If stufe is not equal to '1', then whats next ? how to determine the highest element ?

Regards,

0 Kudos

Hello,

If STUFE <> 1 then it is not the top level PSP. It will be the subordinate of other PSP.

Regards,

Vasanth

0 Kudos

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,

0 Kudos

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.

0 Kudos

Hello,

Use this SQl

SELECT * FROM PRPS INTO TABLE ITAB WHERE POSID IN SO_PSPID

AND STUFE EQ '1'.

Vasanth

0 Kudos

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,

0 Kudos

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

0 Kudos

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