cancel
Showing results for 
Search instead for 
Did you mean: 

How to collect messages displaying in FM ?

Former Member
0 Kudos

Hi All,

I am calling FM BAPI_OUTB_DELIVERY_CREATE_SLS, after creating Delivery it throughs some messages.

Now i want to collct those messages and display in webdynpro mesage area. I know how to display messages in message area,

But how to get mesages from FM to WD? PleaseHelp.

Thanks,

Venkat.

Accepted Solutions (1)

Accepted Solutions (1)

Madhu2004
Active Contributor
0 Kudos

Hi Venkat,

From the place you are calling the BAPI export the messages to the webdynpro component .

Now show these messages using the REPORT_ERROR_MESSAGE method.

Regards,

Madhu

Former Member
0 Kudos

Hi All,

i am declare like this..

data : bapi_return type TABLE OF bapiret2.

after executing FM BAPI_RETURN contains some no. of messages.

Now my doubt is how to display all these mesages in message are? which method i ahve to use?

here BAPI_RETURN is a table, how to pass this table to report_mesage or report_error_message method?

thanks,

Venkat.

Former Member
0 Kudos

Hi

Try this..

loop at bapi_return into wa_bapi_return.

lo_api_controller ?= wd_This->Wd_Get_Api( ).

CALL METHOD lo_api_controller->GET_MESSAGE_MANAGER

RECEIVING

MESSAGE_MANAGER = lo_message_manager.

if wa_bapi_return-type = 'E'.

  • report error message

CALL METHOD lo_message_manager->report_error_message

EXPORTING

message_text = wa_bapi_return-message.

ELSEIF wa_bapi_return-type = 'S'.

  • report success message

CALL METHOD lo_message_manager->report_success

EXPORTING

message_text = wa_bapi_return-message.

ELSEIF wa_bapi_return = 'W'.

  • report warning message

CALL METHOD lo_message_manager->report_warning

EXPORTING

message_text = wa_bapi_return-message.

ENDIF.

CLEAR wa_bapi_return.

ENDLOOP.

Cheers,

Kris.

gill367
Active Contributor
0 Kudos

after the table is filled it contains the messages.

just read the table using the loop into a workarea.

then show it using the message manager.

thanks

sarbjeet singh

Answers (2)

Answers (2)

sahai
Contributor
0 Kudos

hi venkat,

check out the message type declaration in the Function module of your..now declare a variable in the method/action where you are using the function module ,of the same message type as in the function module .

now in the exporting part of the function module just pass the message table to that variable...

so this variable will have all the values being exported from the function module.

remember to declare the variable as type table of...

hope this information wil be helpful to you

regards,

sahai.s

Former Member
0 Kudos

Hi ,

Create a context node for the message table structure and once if you get the messages from the FM just Bind that message table to this context node and while displaying in message area get the messages from context into an message table and display in message area.

Regards,

Devi