‎2009 Nov 10 12:36 PM
Hi,
I want to avoid to call the fm 'POPUP_TO_INFORM' for showing an error message in my alv. I'd like to collect all errors and set the field in error (red). I am trying to follow the following steps:
1) DATA pr_data_changed type ref to cl_alv_changed_data_protocol.
2) call method pr_data_changed->add_protocol_entry
exporting
i_msgid = '0K' i_msgno = '000' i_msgty = 'E'
i_msgv1 = text-i03
i_fieldname = 'MATNR'
i_row_id = 1.
3) CALL METHOD pr_data_changed->display_protocol.
I receive this error when the step 2 is executed.
You attempted to use a 'NULL' object reference (access a component (variable: "PR_DATA_CHANGED").
Any help will be well appreciated.
Thanks in advance.
Regards,
Giovanni
‎2009 Nov 10 1:00 PM
Create the object PR_DATA_CHANGED before calling the methods of the class CL_ALV_CHANGED_DATA_PROTOCOL using the object PR_DATA_CHANGED.
‎2009 Nov 10 1:00 PM
Create the object PR_DATA_CHANGED before calling the methods of the class CL_ALV_CHANGED_DATA_PROTOCOL using the object PR_DATA_CHANGED.
‎2009 Nov 10 1:56 PM
Hi and thanks for the suggestion but is it possible ti have an example how to create the PR_DATA_CHANGED object?
Thanks.
Giovanni