SAP Reusable activities Custom package

Hi, i would like to share my new custom package. feel free to use it and ask me any questions

1. Go to transaction code - go to specified t-code.
Video Example https://youtu.be/vxaT8X8o6Hs?t=2

2. Import Text File to SAP List - Batch import data to SAP using a text file.
Video Example:
https://youtu.be/vxaT8X8o6Hs?t=12
Inputs

  1. Selector of “More items” button
  2. input file path (text file)
    image

3. Filter page - filter SAP Table based on input dictionary.
Video Example https://youtu.be/vxaT8X8o6Hs?t=71
Inputs:

  1. in_filterDictionary:
  2. in_filterButtonSelector - selector of filter button

Example dictionary:
New Dictionary(Of String, String()) From {{“Location”,{“Loc1”,“”}},{“Date”,{“2019.10.19”,“2020.10.19”}},{“Time”,{“10:00:00”,“12:00:00”}}}

Result:
image

4. ClickExecuteAndCheckResult - Standardized sequence that will click execute button in SAP and handle all scenarios:
Video Example https://youtu.be/vxaT8X8o6Hs?t=181

This is a standardized sequence that will click execute button in SAP and handle all scenarios

  • Success case
  • Fail case (where it will send Business Exception)
  • Timeout (where it will send System Exception)

(Note that you need to provide the selectors to it to tell it what is success and what is fail)

Success case includes:

  1. Landing in success page (you can capture a selector in this page and pass it to the sequence)
  2. Status bar showing success message e.g. image (you can capture the message and pass to the
    sequence)

Fail case includes: (throws Business Exception)

  1. Landing in fail page (you can capture a selector in this page and pass to the sequence)
  2. Status bar showing message with type=Error e.g. image (you don’t have to capture the message
    as any message with type=”Error” will be treated as Fail
  3. Status bar showing message with type NOT = Error but the message indicates an error. E.g.image
    (in this case you need to pass this message to the sequence)
2 Likes

Hey @jack.chan

Good one. Thanks for sharing.

#nK

1 Like

Update (version 1.0.1)

  1. recompiled using modern framework
  2. When Click Execute and check result module throws a business exception, it will add 2 keys to the exception

a) Type: Either of the two (this tells you whether the business exception is due to error found in statusbar or selector)

  • StatusBar
  • Selector

b) FailedSelector: (only if type = selector)
If Type = Selector, this will return the failed selector address
c) FooterText: (only if type = statusBar)
If Type = StatusBar, this will return the failed statusbar message

How to access type and failed selector/failedMessage?
image
image

1 Like