Hi all,
Needed input about how to display all the wagetypes of pa0008 subty 11 in an ALV Grid format.No LDB is being used here.
The format has to be | Wagetype | Amount |.
Regards,
Amrita
hi amrita,
0008 is a repetitive structures.so u have to write like following .fieldcat will be same like normal alv.
DATA: BEGIN OF wagetypes,
lga LIKE P0008-LGA01,
bet LIKE P0008-BET01,
END OF wagetypes.
RP_PROVIDE_FROM_LAST P0041 SPACE PN-BEGDA PN-ENDDA.
DO 12 TIMES VARYING wagetypes-lga FROM P0041-lga01
NEXT P0041-lga02.
IF wagetypes-lga IS INITIAL.
EXIT.
ELSE.
WRITE: / wagetypes-lga ,wagetypes-bet.
ENDIF.
ENDDO.
Since you are not using LDB you can not use macros.
1. Use below Function module to get all the records on IT0008:
call function 'HR_READ_INFOTYPE'
exporting
tclas = 'A'
pernr = pernr-pernr
infty = '0008'
begda = pn-begda
endda = pn-endda
tables
infty_tab = p0008
exceptions
infty_not_found = 1
others = 2
.
if sy-subrc <> 0.
message e028 with 'Record not Found in Infotype 0008'.
endif.
2. Then you can loop for the subtypes you need and create ALV report using REUSE_ALV_GRID_DISPLAY Function module.
Add a comment