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

MM01/MM02 call screen with particular tab

Hello,

My requirement is :

If user is in the Purchasing View/Tab of the MM01/MM02 (with a particular Material Type), a warning message should appear before user can proceed to the next screen.

My issue is, i'm able to trigger the message but how to trigger it only on Purchasing tab. I mean, how to write the if condition for the screen with Purchasing Tab ?

Thanks.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Nov 19, 2012 at 10:20 AM

    Hi,

    Check how to add field to Material Master. In your case you will not add any fields but you will only copy the purchasing screen to Yscreen. In PAI you can give whatever message you want.

    You can search how to add field on SCN you will find many blogs. In short.

    1. Read how to configure Material Master.

    2. Copy Function Group MGD1 to ZMGD1

    3. In screens change the PAI logic of Purchasing screen

    4. In customizing Define Structure of Data Screens for Each Screen Sequence Choose you screen sequence (You will find Y or Z one if already configured for your client)

    5. Select the screen sequence and choose data screen.

    6. here select Purchasing and select subscreen for which you changed PAI

    7. Here maintain program name of copied fuction group it will be SAPLZMDG1 for that subscreen.

    Now when you run MM01/2 you fuction group will be called for the perticular screen and your PAI logic will be triggered.


    MM.JPG (60.4 kB)
    MM.JPG (39.1 kB)
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 16, 2012 at 06:35 AM

    Hi Roshni,

    find out the screen number for that tab and in the code add a check before that message to display it only for that screen. Hope it helps.

    Regards,

    Umar Syed.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hello Sravan,

      I have convinced the functional for displaying this message when saving the material.

      But, now the issue is, if the user is currently in 'Purchasing' or had passed through this tab while creating the material, only then warning should be triggered. Actually, these tabs are restricted for some users. So, if they do not access this tab, then definitely no message should be thrown. In debugging mode, I can only see sy-ucomm values as 'BU' and 'YES'. No other way to differentiate the tabs.

      Currently, I've coded in a way that, the user will be able to see the message on clicking Save button only (sy-ucomm = 'BU') and can skip the code if they need to go the next tabs on pressing enter (sy-ucomm = 'YES'). But, on any other tabs if user clicks SAVE, the warning pops up(need to avoid this).

      Regards,

      Roshni

  • author's profile photo Former Member
    Former Member
    Posted on Nov 16, 2012 at 08:45 AM

    Hi,

    You could use BDC recording to find screen details -

    Go to SHDB and start a recording for your desired transaction. Just keep entering the madatory fields and make sure you also go to your desired tab (Purchasing tab) so that the specific details are recorded. Once you are done traversing through the transaction save your recording and you will be able to see a list of fields and screen numbers that you have entered your values in.

    Cheers,

    Vidya.

    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.