cancel
Showing results for 
Search instead for 
Did you mean: 

File Upload validation

Former Member
0 Kudos

Hi All

I have an upload file UI element on a view.

When a user types an invalid path to a file he will get a stanard validation error .

If he corrects the path or choose a valid path via browse , he will still get the standard message

and will not be able to continue until he gets out of the application and in again.

any suggestion ?

Thanks

Nitsan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

You can use clear messages function in the following way.


DATA lo_message_manager    TYPE REF TO if_wd_message_manager.
* get message manager
DATA lo_api_controller     TYPE REF TO if_wd_controller.
DATA lo_message_manager    TYPE REF TO if_wd_message_manager.

lo_api_controller ?= wd_this->wd_get_api( ).

CALL METHOD lo_api_controller->get_message_manager
  RECEIVING
    message_manager = lo_message_manager
    .

* report message
CALL METHOD lo_message_manager->CLEAR_MESSAGES

*    EXPORTING
*      including_permanent_msg = ABAP_FALSE
*      only_permanent_msg      = ABAP_FALSE
      .

I hope it hepls.

Regards,

Rohit

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi All

I have solved the problem,

I guess it is a sap bug, and the solution is more stupid then the problem.

Nitsan

Pramanan
Active Participant
0 Kudos

Hi Nitsan,

What is the solution? Can you provide me the same.

Regards,

Ramanan

Former Member
0 Kudos

Hi Rohit

That still does not help me.

In my application I use alot of validation checks and messages .

This is the only message I can't get rid of.

It seems like a standard bug...

Thanks

Nitsan

Former Member
0 Kudos

Hi Rohit

Thanks for your answer, but this does not solve the problem.

We still get this standard validation message even if I clear messages.

Thanks,

Nitsan

Former Member
0 Kudos

Hi,

Change the exporting parameters.



 
*    EXPORTING
*      including_permanent_msg = ABAP_TRUE
*      only_permanent_msg      = ABAP_TRUE
      .
 

Regards,

Rohit