on 01-16-2014 11:25 AM
My requirement is to create transportation zone hierarchy tree with 5 child through program for tcode : /SAPAPO/RELHSHOW.
I created hierarchy through FM : /SAPAPO/REL_CREATE but i m unable to update hierarchy tree with child node from FM : /SAPAPO/RELH_CHANGE.
Please suggest how can i append child node to Transportation Zone Hierarchy.
Thanks.
Hi,
to me the function module '/SAPAPO/RELH_CHANGE' looks correct. What error do you get?
Just tried it out and it worked fine for me (of course you need to adjust the GUIDS!!!). The GUID for the Transportation Zone hierarchy can be found in table /SAPAPO/RELDSTR searching with RELNAME = 'RELH_ZONE'. Keep in mind that you can maintain multiple hierarchies in the system, but SAP TM only considers entries from RELH_ZONE!!!
The CHAR22 guids of the zones can be found in table /SCMB/TOENTITY searching with the names in field ENTITY.
DATA: lt_relh_entries TYPE STANDARD TABLE OF /sapapo/relhmodify,
ls_relh_entry TYPE /sapapo/relhmodify.
ls_relh_entry-pnodeid = '051Mh06I7jEW}ZNmCzeI5W'. <- ADJUST
ls_relh_entry-cnodeid = '051Mh06I7jEW}ZNmCzeI6W'. <- ADJUST
ls_relh_entry-clevid = '001'.
APPEND ls_relh_entry TO lt_relh_entries.
CALL FUNCTION '/SAPAPO/RELH_CHANGE'
EXPORTING
iv_hierarchy = '051Mh06I7k6zqewTbD{IfG' <- ADJUST
TABLES
it_relhmodify = lt_relh_entries
EXCEPTIONS
not_qualified = 1
relid_not_found = 2
relstrid_not_found = 3
no_hierarchy_type = 4
wrong_hierarchy_type = 5
OTHERS = 6.
IF sy-subrc <> 0.
RETURN.
ENDIF.
Cheers,
Marcus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Inderjeet Kalra,
Maybe you can post this question in some APO/SCM group too, probably there you will have the answer.
Regards, Marcelo Lauria
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
4 | |
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.