Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

display error messages for each material

Former Member
0 Kudos

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.

3 REPLIES 3

Former Member
0 Kudos

Hi

You can populate your own error table with the messages returned in BAPIRETURN for each material.

Reg: REUSE_ALV_HIERSEQ_LIST_DISPLAY

Refer

Regards

Raj

sivapuram_phanikumar
Active Participant
0 Kudos

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.

Pawan_Kesari
Active Contributor
0 Kudos

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...