Automate

 View Only
  • 1.  Transaction recording: exit using Save or Back

    Posted 01-11-2022 07:17
    Hi Community

    I went through some old notes I had written down when I had my first training sessions when starting to use Winshuttle. In my notes there's a mention that when recording scripts that edit values in Material Master, exit from the transaction should be done using "Back", so that the save dialogue comes up. There "Yes" should be selected and that should conclude the record.

    I haven't necessarily always kept this in mind: I have probably recorded scripts that end with clicking "Save"-button, so no confirmation dialogue comes up.

    I'm wondering now if this can be a problem. I don't see how it could, WS will just save the values and exit, but probably there was a reason why this advice was given in the first place. Would anyone have more information about this?


  • 2.  RE: Transaction recording: exit using Save or Back

    Posted 01-11-2022 08:56
    Hi Henri -

    I feel like this is a personal preference.  For me, I never do a "save" by clicking on "back" and being asked by SAP if I want to save or not. Others do. For me, as as general rule, I like to be as explicit as possible in every single action that's being captured in the Studio script. If I want to save, I want it to have captured a true save, not a back -> prompt yes /no. To me, when  you take a single action and do that "same" action with two different actions, that's two opportunities for something to get messed up, instead of one. So for me, the less chances for something being messed up, the better. But again, this is a personal preference of mine.

    Remember that in the Studio world, there is rarely only one way of recording a transaction code. It can often be a preference, the way someone else told you to do something (which could have been their preference), you looked at documentation somewhere that recommended something be done a certain way, etc., but it didn't mean that that way was the only way or the best way or the correct way. It was just one of the ways to record the transaction successfully. And there's never a golden rule across all the transaction codes in SAP, as they're all unique, so one set of best practices for a transaction code isn't necessarily going to apply for another. 

    So why were you told to record it that way? It's really as simple as that's the way the trainer likes to record their material master so they taught it to you that way. If I had taught it, I would have taught it differently. But both would work fine. So you should record things the way you want to record things, whatever makes you comfortable. As long as it works successfully and as long as you understand why it works successfully, then great!

    Thanks!

    ------------------------------
    Jennifer Hwang | Senior Solutions Engineer
    Winshuttle North America
    ------------------------------



  • 3.  RE: Transaction recording: exit using Save or Back

    Posted 01-12-2022 01:27
    Thank you for the reply. I'm glad to hear that I probably haven't messed up.  I understand how developers' personal preferences can affect ways of working, it's good to know that anything that works goes and there's no single truth.





  • 4.  RE: Transaction recording: exit using Save or Back

    Posted 01-13-2022 02:26
    Hi Henri,

    I agree a lot with Jennifer. But I can understand the reason for using 'back'. You would get the same effect if you hit 'Enter' in the last screen you filled with data. The popup dialogue will come up also.
    And that's what I always recommend. The reason therefore is that by giving an enter it 'closes' that part of the recording. And then the save will be in a separate part of the recording. You will see this in the Expert View. If you use validate it wil check your script until it comes to the part where the 'save' is in. If you fill in all your data and give Save immediately after entering data in the last field the save will be in that part and therefore that part will not be validated.
    I expect that's the reason you were thought first using back to be sure the save will be in a seperate block.

    ------------------------------
    Jan van Asseldonk | Consultant
    CTAC | +31629078169
    ------------------------------



  • 5.  RE: Transaction recording: exit using Save or Back

    Posted 01-13-2022 04:59
    Thanks for the reply.  Interesting. So validation does not go through the screen where Save is, and thus the last data tab will be completely left out if the save is there. Well, I don't need validation that often.

    I'm under the impression that OK codes are what define what happens after each data screen, at least when recording MM02 scripts. The OK code for save seems to be =BU, so clicking Save in the final screen just saves and closes. Nothing appears after it.

    Pressing enter in the final selected screen sets OK code as /00. This then creates  another screen after it, which has to be the save dialogue. Clicking Yes gives that screen's OK code as =YES.

    Clicking Exit in the final screen gives the OK code as /00, which also makes the save prompt appear, though for some reason it appears before the final screen in expert view. The recording seems to work but it's strange. The OK code for it  saving in the save dialogue is still =YES.

    Clicking Back gives the OK code as =BABA, which then also makes the save dialogue appear. This time it appears to Expert view after the last data screen. =YES is save again.

    I'm not sure if there can be a difference between saving with =BU in the final data screen and saving with =YES in the save dialogue. Can you think of something?