Application Development and Automation 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: 
Read only

problem with GET_TREE_FROM_PRHI

Former Member
0 Likes
879

hi all

im trying to get the wbs elements in hierarchy using the fm GET_TREE_FROM_PRHI

im supposed to take the prhi-posnr

if i run the fm alone, i get different posnr

but if i call the fm in a program, im getting the same posnr.

for example, if there are 7 entries, im getting the 7 entries with the same posnr if i call the fm in a program but if i execute it alone, i get 7 entries with different posnr

does anybody know why this is happening

hi all

im trying to get the wbs elements in hierarchy using the fm GET_TREE_FROM_PRHI

im supposed to take the prhi-posnr

if i run the fm alone, i get different posnr

but if i call the fm in a program, im getting the same posnr.

for example, if there are 7 entries, im getting the 7 entries with the same posnr if i call the fm in a program but if i execute it alone, i get 7 entries with different posnr

does anybody know why this is happening

4 REPLIES 4
Read only

Former Member
0 Likes
718

Hi,

Are you passing I_POSID as export parameter of funcition?

And the 7 values are due to 7 function calls ?

Best regards,

Leandro Mengue

Read only

Former Member
0 Likes
718

Hi,

Remember that the result is a struct of project...

Using GET_TREE_FROM_PRHI with I_POSID = ''E50000999 2' I get:

In SE38:

MAN POSNR            PSPHI         UP             DOWN            LEFT            RIGHT
040 E-50000999-2     E-50000999                   E-50000999-21   E-50000999-1
040 E-50000999-21    E-50000999    E-50000999-2                                   E-50000999-22
040 E-50000999-22    E-50000999    E-50000999-2                   E-50000999-21


I ZPROGRAM:

POSNR     PSPHI     UP        DOWN      LEFT      RIGHT
00001860  00000264  00000000  00001861  00001859  00000000
00001861  00000264  00001860  00000000  00000000  00001862
00001862  00000264  00001860  00000000  00001861  00000000

Best regards,

Leandro Mengue

Read only

0 Likes
718

Hi Leandro

I didnt get exactly what you said

Can you explain ?

Thanks

Read only

0 Likes
718

Hi,

You solve your problem? (if yes, very good!)

Best regards,

Leandro Mengue