cancel
Showing results for 
Search instead for 
Did you mean: 

WDA Message manager: How to fire message?

Former Member
0 Kudos

Hello to all

 

I have a simple WDA application, where the user push a button, to start a process chain ( SAP BW/BI 7.3)

Technically the coding is embedded in the event behind the push button.

It looks like this:

I intend to give a message at the beginning to the end user that the process chain has started (A). Then the
process chain is started (B) and after a while a message informs the end user (C), that the process chain has finished successfully.

Everything works fine, just L

    • Message A and C appears at the end of the application together instead first message A and
      after a while message C.

My question therefore

How can I fire the message A to the end user straight away before starting process chain (B). I have the
feeling, that there must be something to close the message manager and force to fire the message to the end user?

Thanks a lot for your help and good ideas .

Best regards

Christian

APPENDIX:

 

Structure of the coding:

A)   Message 'DAT file processing started’

   lo_api_controller ?= wd_this->wd_get_api( ).

  
call method lo_api_controller->get_message_manager

    receiving message_manager
= lo_message_manager.

  
concatenate ' DAT-File processing started'

    
into lv_message_text respecting blanks.

  
call method lo_message_manager->report_success

   
exporting message_text =lv_message_text.

B)     Execute Function module to start process chain

   C)     Message ‘ DAT file successfully transfered

   lo_api_controller ?= wd_this->wd_get_api( ).

  
call method lo_api_controller->get_message_manager

    receiving message_manager
= lo_message_manager.

  
concatenate ' DAT file
successfully transferred


    
into lv_message_text respecting blanks.

  
call method lo_message_manager->report_success

   
exporting message_text =lv_message_text.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

The Messages will be shown together after the roundtrip is finished. It seems that you're starting the function module synchron!? Therefore, the application waites until the FM is finished and Shows then all raised Messages.

So, you can try to start the FM asynchron and work with the "timedTrigger" to get the result of FM..


Former Member
0 Kudos

Hello Christopher

I am starting the fm RSPC_API_CHAIN_START with the Parameter I-Synchron = ABAP_FALSE.

So is there not a possibility in WDA to force or trigger a round trip?

Best regards

Christian


Former Member
0 Kudos

What happens if you start the fm mit synchron = abap_false? Do you have to wait until the chain is running/finish or does the fm "come back" immediately?

Former Member
0 Kudos

Hello Christopher

I have to wait. It is the running time the process chain needs to be executed.

Best regards

Christian

Former Member
0 Kudos

Try Parameter I_DONT_WAIT = ABAP_TRUE

Only if the chain is starting asynchron, your Scenario makes sense

Former Member
0 Kudos

Hello Christopher

The parameter  I_DONT_WAIT = ABAP_TRUE doesn't change anything to the behaviour. Even I am not sure if this paramater is used by the FM.

Nevertheless my simple question is:

How to force a round trip in the abap code? Is it possible? This question arises as you said, that the Messages are displayed after a round trip.

Best regards

Christian


Former Member
0 Kudos

You can't Trigger a round trip while you're waiting for the fm:

What you have to do:

a) Raise message a

b) start FM in background

c)  check in a timed Trigger (or Manual refresh button) if chain is finished

d) as soon as c) is done, raise message b

a) and b) are in one round trip

c) is a round trip

d) is a round trip

But you have Problems with b). You can start in Background, but then you loose the Connection because you don't get the ID back.

Do you not have an ABAP developer who can Support you?


Answers (0)