2013 Jun 13 10:24 AM
Hi ,
I have added a Custom Tab for Purchase Requisition via Enhancement MEREQ001 .
Now I want that tab to be seen only for ME52N and ME57 and not for other transactions such as ME51N,ME53N etc. How can this be achieved?
Rahul
2013 Jun 13 10:27 AM
please have a condition before call screen as ..if sy-tcode = <> or sy-tcode = <>.
regards,
Siva
2013 Jun 13 10:41 AM
Hi Rahul,
Try the below code.
If sy-tcode = 'ME52N' or ME57'.
Loop at screen.
if screen-name CP 'Your screen name'.
screen-active = 1.
modify screen.
endif.
endloop.
endif.
Regards,
Guru
2013 Jun 13 10:44 AM
You could check SY-TCODE in the PBO of the subscreen (as well as in the exit FM involved) and set SCREEN-INACTIVE for every field; but perform first some debug, and during execution switch between display and update mode using the glasses/pencil icon. (call ME53N, switch mode, you are in maintain mode, but always ME53N and not ME52N) -> so also check the transaction type received from exit FM (and carefully stored in global area everytuime it is received).
Regards,
Raymond
2013 Jun 13 11:00 AM
Hi
In the PBO event of the screen 111 of program SAPLXM02. you will find the module for PBO event.
If it is not there then create it (SAP will suggest a include).
In this PBO module -
Check the sy-tcode .
Loop at the SCREEN.
if screen-group1 = 'GRP'
if sy-tcode = 'ME52N' OR 'ME57'.
screen-active ='1'.
screen-invisible = '0'.
ELSEIF ME51N OR ME53N.
screen-active = '0'
screen-invisible = '1'.
ENDIF.
MOdify screen,
endif.
ENDLOOP.
Before doing the above step. In the propperties of each screen element, set the Group1 . say for example 'GRP' .
Let us know, if it helps.
2013 Jun 13 11:09 AM
Hi Atul ,
Thanks for your response. But the issue is that , the tab itself should not be displayed in the first place . As per your suggestions, we will be controlling the tab elements . but is there any was to control the tab? That is the tab should not appear when the user happens to go in ME51N or ME53N transactions.
Rahul.
2013 Jun 14 4:09 PM
Hi Rahul -
Here, I do not think you can the control tab by coding.
Please check the FM - 'MEGUI_BUILD_REQ_ITEM_PLUGIN' and debug if it can help you.
Also let us know, if you find a way to do that.
Regards,
Atul Mohanty
2013 Jun 14 5:17 PM
Hi Rahul,
here TC_TEST contains, tab strips name and tab Pushbuttons. to inactive entire tab and its properties check below code.
also write this for only your transactions
LOOP AT SCREEN.
IF screen-name CP '*TC_TEST*'.
screen-invisible = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Thanks
Rambabu
2013 Jun 17 6:58 AM
Thanks Atul ,
I haven't found a way to do this yet , but yes definitley I will update this thread once I have my hands on something . Till now it seems that this is not possible and may by something for SAP itself to ponder about.
If we raise this as an OSS , they will dismiss this as a Consulting Issue . So probably got to get hold of someone in SAP incase we are unable to get a way out of this
Rahul
2013 Jun 17 7:06 AM
Hi Atul ,
The other round about could be , in the FM that you have given me , MEGUI_BUILD_REQ_ITEM_PLUGIN , where the exit is called , MODX_FUNCTION_ACTIVE_CHECK , for SAPLMEREQ and func number 001 , get the access key of this FM , and put the sy-tcode check ,before calling this exit .
I know , there is ugly feeling of touching the standard code , but then it seems this is the only way out if the client does get deperate while testing
Rahul.