‎2011 Feb 03 11:11 AM
Hi All,I am using BAPI,BAPI_PO_CREATE1 to create PO and if there are any errors i am capturing them on a ALV Report.If there are 5 Error messages in bapiret2 then my repot is showing the message 5 times with all the data like preq number,preq item number,i want to see empty in the report for preq number and preq item and only 4 error message should be there int he next 4 lines.
Please help me
Thanks
Shakeer
‎2011 Feb 03 11:31 AM
Hi Shakeer,
It will come depends on your coding, use control break statements to achieve that.
Thanks & Regards,
Faheem.
‎2011 Feb 03 12:39 PM
Hi.I have already used AT NEW,but it is not working.i am looping for an internal table and then giving structure for BAPI .afer looing i am giving as at new..but it is not working ..is there any thing we have to give?
‎2011 Feb 03 1:10 PM
In debugging check bapiret2 table and see the error messages, if 5 different messages then there is a problem in your code.
‎2011 Feb 03 11:11 PM
Hi Shakeer,
Be sure that when you use the AT NEW statement that all the fields in the internal table are the same which are before the field you want to group by (PREQ).
Since you are using the BAPIRET2 type, different errors for the same PREQ will show the PREQ no. for all the items. Only if the errors are of the same type for the same PREQ no. once.
Now I would imagine that there can only be 1 error per PREQ/ITEM and therefore I do not see really how this could work. Only maybe in case you also want to show the warnings /Info message.
Also in your example, I would imagine that the PREQ no. would be different for the 5 errors and therefore you will not be able to group them anyway.
Of course it is possible that I misunderstood what you are trying to accomplish.
Kind regards,
Robert