07-03-2007 6:27 AM
Hi All,
I am using a BAPI which gives errors in return table.I am executing this BAPI for several materials in a LOOP.I need to display the error messages for each of these materials as shown below:
Material 1:
error1
error2
Material 2:
error 1
error 2.
What is the best way to display this?Also plz let me know how to use REUSE_ALV_HIERSEQ_LIST_DISPLAY?
Thanks,
Rakesh.
07-03-2007 6:30 AM
07-03-2007 6:55 AM
Hi Rakesh,
You can loop through the return table where you have error messages and use control break statements for display purpose if u r using Classical or Interactive Report (not ALV).
Example: Before looping the return table, it should have been sorted on material number field... lets suppose we have material number in MESSAGE_V1...
sort lt_return by message_v1.
loop at lt_return into lwa_return.
at new MESSAGE_V1.
write: / 'lwa_return-MESSAGE_V1'.
endat.
write: / <error_message>.
endloop.
07-03-2007 7:22 AM
See programs SBAL_DEMO*
There are different ways of displaying messages, illustrated very well in these demo program.
Specially check program SBAL_DEMO_04_SELF, this I think will be best for your requirement...