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: 

help in alv display

Former Member
0 Kudos

Hallow I doing a alv report that display org. unit. for that I use function

That bring all the unit below and the level of the org. unit .my problem is that I wont to display the org.unit below write side the father

For that I can use the level but I don’t now how

thankes

Org units

Ex.

163

271

315

415

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.

The biggest problem is that I wont to do it in alv (maybe take the field of org unit and make it bigger and move the org.unit in field accordingly. to the level )

Thanks for your suggestion.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello Antonio,

I did'nt get your question clearly.But if you are trying to display the org unit in ascending order,then you can sort the internal table that you pass to your alv before calling the method SET_TABLE_FOR_FIRST_DISPLAY.

ie:

Sort t_itab by org_unit ASCENDING.

Now call the method

ALV_GRID_INSTANCE ->SET_TABLE_FOR_FIRST_DISPLAY and pass the above internal tabe t_itab.

Hope this helps.

Regards,

Beejal

**Reward if it helps

5 REPLIES 5

Former Member
0 Kudos

Hello Antonio,

I did'nt get your question clearly.But if you are trying to display the org unit in ascending order,then you can sort the internal table that you pass to your alv before calling the method SET_TABLE_FOR_FIRST_DISPLAY.

ie:

Sort t_itab by org_unit ASCENDING.

Now call the method

ALV_GRID_INSTANCE ->SET_TABLE_FOR_FIRST_DISPLAY and pass the above internal tabe t_itab.

Hope this helps.

Regards,

Beejal

**Reward if it helps

0 Kudos

hi beejal i dont understand u well i try to display my alv accordingly to the level of the unit in the structure like tree .

regards

Former Member
0 Kudos

sorry for the ex.

i wont to see the org unit like that

123

***456

******233

********156

without the asterisk it just for the ex.

regards

Former Member
0 Kudos

if i cant do that or its to complicated, please tell me

regards

0 Kudos

Hi,

I think you can use ALV - Trees for your functionality.

Example Checkhte BC Program

BCALV_TREE_01

Regards,

Manju