2012 Jun 04 6:07 PM
Hi ,
I have used 'STREE_EXTERNAL_DISPLAY' function module for to call customized IMG.
I have hard coded the structure ID but my requirement is get the structure id dynamically
Is there any possibilities to get structure id dynamicallly using project id (Table --TOBJECTP, field name -- Project ID).
Thanks,
Vimal
2012 Jun 05 7:34 AM
Hi,
Any function module used for getting structure ID dynamically ?
Thanks,
Vimal
Hi ,
I have used 'STREE_EXTERNAL_DISPLAY' function module for to call customized IMG.
I have hard coded the structure ID but my requirement is get the structure id dynamically
Is there any possibilities to get structure id dynamicallly using project id (Table --TOBJECTP, field name -- Project ID).
Thanks,
Vimal
2012 Jun 05 7:34 AM
Hi,
Any function module used for getting structure ID dynamically ?
Thanks,
Vimal
2012 Jun 05 9:44 PM
Hi,
I did a quick debug, SAP uses SPROJECT_GET_OBJECT (nothing more than a SELECT to TOBJECTP anyway).
Sandra
2012 Jun 06 11:01 AM
Hi Sandra,
SPROJECT_GET_OBJECT (Function Module) returns Object id only, I need ID value ( Table name - TTREE, Field Name - ID), is there any realtionship between TOBJECTP-Object ID and TTREE-ID ?
My input for this requirement is project ID (Table --TOBJECTP, Field Name - Project ID) OR Object ID (Table --TOBJECTP, Field Name - Object ID), Based on the project ID or Object ID i need to get ID value ( Table name - TTREE, Field Name - ID).
Any function module is available OR any table relationship is there?
Thanks,
Vimal
2012 Jun 06 12:24 PM
Hi Vimal,
Finally, I'm not sure to understand exactly what is your requirement.
I repeat again, but with more details: by calling the function module above and passing parameters PROJECT_ID = your custom project ID of 10 characters, and, I forgot to mention, OBJ_TYPE = 'PLAN' (but I guess you saw it in table TOBJECTP), it returns a structure ID (a GUID) in parameter OBJECT_ID, that you can pass to parameter STRUCTURE_ID of STREE_EXTERNAL_DISPLAY. This structure ID also corresponds to TTREE-ID. It works well for me.
Regards,
Sandra
2012 Jun 06 2:33 PM
Hi Sandra,
For my case STREE_EXTERNAL_DISPLAY (Function module) return a guid (OBJECT_ID) when i pass the guid into table TTREE-ID it does not show any data that's why i am asking any relationship between OBJECT_ID (Funtion Module return guid) and TTREE-ID.
Thanks,
Vimal
2012 Jun 06 3:43 PM
I don't understand what you say: why are you talking about the returned values of STREE_EXTERNAL_DISPLAY? You just use this FM for display. Why do you pass the "guid into table TTREE-ID"? Please show your code.
2012 Jun 06 3:50 PM
Hi Sandra,
Sorry... I wrongly update the funtion module name.
For my case SPROJECT_GET_OBJECT (Function module) return a guid (OBJECT_ID) when i pass the guid into table TTREE-ID it does not show any data that's why i am asking any relationship between OBJECT_ID (Funtion Module return guid) and TTREE-ID.
Thanks,
Vimal
2012 Jun 06 4:07 PM
2012 Jun 06 4:42 PM
Hi Sandra,
I have used the following code..
data : g_id like ttree-id.
case sy-tcode.
when 'YTEST_IMG'.
g_id = 'E1A59393739A4CF19ECA005056A70010'.
ENDCASE.
CALL FUNCTION 'STREE_EXTERNAL_DISPLAY'
EXPORTING
structure_id = g_id
LANGUAGE = SY-LANGU
DISPLAY_STRUCTURE = 'X'.
* NO_COMMIT_WORK = 'X'
* USE_REMOTE_CONNECTION = ' '
* RFC_DESTINATION = 'NONE'
* POSITION_ON_NODE = ' '
* POSITION_ON_NODES =
* ID_FOR_USE_AS_FILTER = ' '
* IMPORTING
* MESSAGE =
* TOGGLE =
* TABLES
* USER_PARAMETERS =
* POSITION_HIERARCHY =
.
the above code working fine. My requirement is i dont want hard code the structure ID.
I have to fetch the structure ID dynamically is it possible ?
Thanks,
Vimal
2012 Jun 06 8:36 PM
This answer is the same than my first one, but even even more detailed.
Do you have this in table TOBJECTP?
| PROJECT_ID | OBJ_TYPE | OBJECT_ID |
|---|---|---|
| YTEST_IMG | PLAN | E1A59393739A4CF19ECA005056A70010 |
If yes, then simply call
PARAMETERS project TYPE project_id DEFAULT 'YTEST_IMG'.
TYPE-POOLS spro.
DATA lt_object_id TYPE spro_object_id_tab.
DATA ls_object_id TYPE spro_object_id_struc.
CALL FUNCTION 'SPROJECT_GET_OBJECT'
EXPORTING
project_id = project
obj_type = 'PLAN'
TABLES
object_id = lt_object_id.
READ TABLE lt_object_id INTO ls_object_id INDEX 1.
CALL FUNCTION 'STREE_EXTERNAL_DISPLAY'
EXPORTING
structure_id = ls_object_id-object_id.Otherwise, I don't know, and give up.
Sandra
2012 Jun 07 2:48 PM
Hi Sandra,
No Need to fetch structure ID dynamically because while creating a customizing IMG the structure ID captured in CTS so it does not change if we move the object into quality or production .
The solution for this requirement we have to hard code the structure ID in the 'STREE_EXTERNAL_DISPLAY' (Function Module) .
Thanks for your timely help.
Vimal
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |