09-11-2008 1:40 PM
Hi all,
Does anyone know if there is any standard SAP functionality for retrieving the non-total/raw item lines that lies beneath a total line in an ALV grid (after the user has selected the total line)?
All helpful answers will be rewarded!
Best regards,
MV
09-11-2008 2:08 PM
hello
try this make ur fieldcatalog and make DO_SUM field X
WA_FIELDCAT-SELTEXT_M = 'Net Weight'.
WA_FIELDCAT-DO_SUM = 'X'.
APPEND WA_FIELDCAT TO I_FIELDC
Thanks
09-11-2008 2:21 PM
In layout u have that fields. u search layout field catalog. u wil get it.
09-11-2008 2:57 PM
Hi,
I think you're misunderstanding...
I do not need to sum up the lines (time registration lines), they have already been aggregated in a total line. What I need is to retrieve (in the program code) the the item lines that makes up the total line/the lines that lies "hidden" behind the total line, so I can pass them on to time approval.
MV
09-11-2008 3:04 PM
Try the ALV event AFTER-LINE-OUTPUT may be it can help u to achieve ur requirement.
Append AFTER-LINE-OUTPUT event to the internal table T_EVENT.
CLEAR W_EVENT.
W_EVENT-FORM = SLIS_EV_AFTER_LINE_OUTPUT.
W_EVENT-NAME = SLIS_EV_AFTER_LINE_OUTPUT.u201CAFTER_LINE_OUTPUT event
APPEND W_EVENT TO T_EVENT.
FORM AFTER_LINE_OUTPUT
USING P_RS_LINEINFO TYPE SLIS_LINEINFO.
Here you have to write the logic to retrieve the 'total' line
ENDFROM.
Now call the alv FM
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = L_REPID "Program Name
IS_LAYOUT = W_LAYOUT "Layout of the Report
IT_FIELDCAT = T_FIELDCAT "Field Catalog for Report
IT_EVENTS = T_EVENT "For setting the events
TABLES
T_OUTTAB = T_OUTPUT "Report data Internal Table
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
09-12-2008 8:57 AM
Thank you!
But when is this event called...? For each line that is written to the screen, or...?
MV
09-12-2008 12:25 PM