Skip to Content
0
Former Member
Feb 14, 2007 at 09:17 AM

help in shifting field

18 Views

Hallow I have field of org. unit and I wont that the number of org unit move like the level of the org unit in the structure. I use the function to bring the org.unit and the org.unit below and the level .

I just wont make the org.unit field bigger and move the org.unit in field accordingly to the level that I get from the function.)

<b>Ex.</b>

Org unit level

163****** 1

182*****2

121****3

825 ** 4

163****** 1

Without the asterisk it just for the ex.

LOOP AT org_itab INTO wa_org_itab-objid.

CALL FUNCTION 'RHPH_STRUCTURE_READ'

EXPORTING

plvar = '01'

otype = 'O'

objid = wa_org_itab-objid

wegid = 'ORGEH'

begda = sy-datum

endda = sy-datum

  • PUP_INFO = 'X'

  • WITH_STEXT = 'X'

  • TDEPTH = 0

TABLES

stru_tab = stru_tab

  • EXCEPTIONS

  • CATALOGUE_PROBLEM = 1

  • ROOT_NOT_FOUND = 2

  • WEGID_NOT_FOUND = 3

  • OTHERS = 4

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDLOOP.

MOVE wa_stru_tab-objid TO wa_t_itab-org_unit.

<b>

Thanks for your suggestion.</b>