Skip to Content
-1

ABAP chain and chain based on user events (module pool)

I have 4 input fields and 2 buttons

1st Input field to provide 'download path'

Followed by Download button

2nd Input field to provide 'upload path'

3rd Input field to provide date

4th Input field to provide user name

Followed by Upload button

When user clicks on download button without specifying download path(1st input) i need to show error.

When user clicks on upload button without specifying upload path, date and user name i need to force him to fill these fields.

The problem is when i use chain and end chain it force me to provide all input field value and lock everything on error.

My requirement is to validate certain fields based on buttons click without forcing user to provide un neccessary input fields

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Mar 06, 2017 at 01:19 PM

    Check this example, it shows how to handle single input fields.

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 06, 2017 at 03:03 PM

    Why use CHAIN when CHAIN is to cause the processing of multiple fields and have those fields all affected by an error message requesting rentry of erroneous data.

    The MODULES statement has the clauses ON INPUT, ON CHANGE(?) etc....

    MODULE mod [ AT {EXIT-COMMAND|CURSOR-SELECTION} ]   [ ON {CHAIN-INPUT|CHAIN-REQUEST} ] 
    [ SWITCH switch ].

    By looking at the SAP provided help you can see all of the available options, along with examples of how to do what you require. By doing it this way, rather than asking for help you might also learn other things as well....

    Rich

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 06, 2017 at 01:15 PM
    -1

    Hello,

    use separate CHAIN..ENDCHAIN for set of fields based on button, which you want to validate and force user to fill them as mandatory on particular button press.

    something like:

    CHAIN.

    FIELD <download_path> MODULE <validate_dowload>.

    ENDCHAIN.

    CHAIN.

    FIELD: <upload_path>,

    <username>,

    <date>.

    MODULE <validation_upload>.

    ENDCHAIN.

    within your validation modules validate based on the OK_CODE of button.

    thank you!!

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 06, 2017 at 01:05 PM

    Don't use a Chain - just evaluate the function code and write your own routine(s) based on which button was pressed and what the other screen fields are at that moment.

    Add comment
    10|10000 characters needed characters exceeded