Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Error handling in ALV grid for success and failure messages thru pop-up

Hi Friends,

I have a ALV grid report (REUSE_ALV_GRID_DISPLAY) which creates Sales Order thru bapi (BAPI_SALESORDER_CREATEFROMDAT2). Initially my requirement is to create one SO at a time for customer-material combinations. If the sales order is created sucessfully I gave a status message saying that " SO 123 created sucessfully for customer ABC". Till here it is working fine.

My requirement changed in such a way that - Lets say I have 8 different customers with different materials. I need to create the sales order for the selected customers. For that I created a checkbox coloum in my report and if user selects what ever customers she needs, it will create a sales order for that customers only. If she selects 3 different customers out of 8, three sales orders will be created.(It is working fine till here too).

My question is, let's say among the 3 different customers selected 2 sales order got created sucessfully and 1 has some error. I need to show the sucess or failure messages in a pop-up ALV which I should be able to save the information from pop-up to presentation server.

My thoughts were - Get the success and error messages into a table and display that table thru some pop-up ALV FM.

But , how do I need to loop thru the sucess and failure messages and Is there any FM for pop-up ALV display? Sugest me if I am wrong here.

Example:

1. Sales document 123 created sucessfully for customer ABC.

2. Sales document not created sucessfully for customer EFG.

3. Sales document 901 created sucessfully for customer IJK.

Please guide me/help me hoe to achieve this. Sample code snippet is appreciable.

Thanks.

Former Member
Not what you were looking for? View more on this topic or Ask a question