Skip to Content
author's profile photo Former Member
Former Member

How to use the cases in button action?

Hi Experts,

I want to get a prompt message if the field is empty.I got it but at the same time if the field is filled I want the other action to be performed that is to call a BAPI and give me output.How can I give two events for the same action.

How to use the cases in button action?

So, please guide me.Urgent need

Regards

Nutan

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 10:36 PM

    Hi Nutan,

    if I understand you, then you have a simple validation. Therefore you can use the validation functionality of VC for your components. An alternative could be by writing a new ABAP RFC function module like:

    BAPI Input parameters as input and BAPI output parameters as output and an additional return code or string for a message:

    IF I_FIELD IS INITIAL.

    E_RETURN_CODE = "THE FIELD IS EMPTY."

    ELSE.

    CALL FUNCTION <YOUR_BAPI>

    <BAPI PARAMETERS>

    ENDIF.

    I hope that helps.

    Best Regards,

    Marcel

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Nutan,

      I think you have to enter a value into an input field and then click on a button.

      So you can add a formula so that the button is disabled if the input field is empty, e.g. ISNULL(@filed) or the user can click on the button and a guard condition decides which of the two action will be done.

      E.g. ISNULL(@filed) for showing the error message in a plaintext (passing the message to a data store and the plaintext field refers to the data store value) and !ISNULL(@field) for passing the data to the BAPI.

      Best Regards,

      Marcel

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 02:58 PM

    Hi Nutan,

    How are you populating your field? By query, BAPI...

    Regards,

    Gilson

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.