Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Deactivate a Program

former_member199632
Participant
0 Kudos

Hello,

In our PRD, there is a custom program YVU_CORR_MATNR (Y-program)

Is it possible to deactivate this program. (rather than deleting)

How can we check the status of this program? (Activate or Inactivate)

(There is no t-code assign to this custom program)

I have cheeked in se38,

Under "Program" menu , it has "Active <-> Inactive"

When click on this is displays;

" YVU_CORR_MATNR does not have any inactive versions"

Kindly let me know, how to proceed with this

regards,

zerandib

Edited by: zerandib on Feb 15, 2012 7:44 AM

1 ACCEPTED SOLUTION

GauthamV
Active Contributor
0 Kudos

This program is active in your PRD system.

Since it doesnt have any tcode assigned,no one can execute it other than from SE38.

So why do u want to deactivate it in PRD directly ?

16 REPLIES 16

GauthamV
Active Contributor
0 Kudos

This program is active in your PRD system.

Since it doesnt have any tcode assigned,no one can execute it other than from SE38.

So why do u want to deactivate it in PRD directly ?

0 Kudos

hi Gautham ,

Is it possible to some other program to execute this.?

There are some inconsistencies in MBEW table. ..

when examining , SAP support informed that "YVU_CORR_MATNR which are also potential cause of inconsistencies "

So they have asked to deactivate/remove this program.

Is it possible to deactivate this prog.

regards,

Zerandib

GauthamV
Active Contributor
0 Kudos

Yes, this program can also be called from some other programs.

Do a where used list to find out all the places it has been used.

If it can cause inconsistencies then you can comment the code in DEV system

and transport to PRD instead of deleting the program.

If you dont want to comment the code,use an authorization object and

restrict access to other users from executing it.

Former Member
0 Kudos

Hi

you can only delete a program, there is no sort of deactivatin a program in ABAP. Check the usage of your program in other objects if no where used delete it, if it has been used in some other objects remove the usage and delete the program.

Former Member
0 Kudos

Is it possible to some other program to execute this.?

You can do a where used list to see if it is called from another program.

If OSS says get rid of it, nuke it.

Rob

Former Member
0 Kudos

HI,

If it a executable program then you can do is in event

at selection-screen.

if sy-ucomm eq 'ONLI'.

message e000(8i) with 'Program cannot be executed'.

endif.

Thanks,

Madhukar Shetty

Former Member
0 Kudos

Why don't you just comment out all the code in the report except for the first Report statement ?

ThomasZloch
Active Contributor
0 Kudos

If it is not required any more and even potentially harmful, then delete it in DEV system and transport through the landscape. Everything else, whether technically possible or not, is a waste of time, in my opinion (unless there are good reasons to keep it, that you did not tell us about yet)

Even if you would need it again later you can retrieve it from the version database via SE38.

Thomas

former_member214857
Contributor
0 Kudos

Hi zerandib

This is not possible to deactivate a program.

And option to switch between Ative <-> Inactive only works when you have one active version and a modified version.

Best regards

OttoGold
Active Contributor
0 Kudos

If you don't wat to delete it, comment the code out. If it is called from somewhere, the call won't fail, but nothing will hapen.

If you comment it out, it is safe to keep it, but as Thomas said delete it would make more sense.

Cheers Otto

Former Member
0 Kudos

What Thomas said. :-).

Rob

Edited by: Rob Burbank on Feb 15, 2012 9:23 AM

0 Kudos

Yup

Or if it is a case where only restricted access is needed, then assign some authorization roles to it.

Or if SAP suggests that its causing inconsistencies then why hesitating to delete?

Regards,

Joe

Edited by: lazarus_joey on Feb 15, 2012 4:58 PM

Former Member
0 Kudos

Hello zerandib,

Program details are stored in table: REPOSRC.

Field R3STATE corresponds to program status. "A" is for active and "I" is for "Inactive".

When a program is in "Inactive" stage then you will see two entries in this table. One will have "A" and the other will have "I".

That's why in SE38 when you go by menu: Active <-> Inactive then it switches from "I" to "A".

Anyways you can develop a program which can update this table and Insert "I" for the program you have mentioned.

However I still don't think that just by making a program "Inactive" it will serve your purpose. Even if a program is "Inactive" but if it is syntactically correct then it will execute anyways.

Alternative is to use SM01 and Lock this transaction

Good Luck,

Neeraj

Edited by: Neeraj Singh on Feb 15, 2012 9:12 PM

0 Kudos

Anyways you can develop a program which can update this table and Insert "I" for the program you have mentioned.

You must be kidding, right? Did you just suggest to update the SAP standard table directly?

0 Kudos

No i am not advising to update the SAP tale directly. didn't realize that someone will pick it literally. The intent is just to indicate how it can be done. One will have to find out a way of how standard SAP fills that table. It involved some debugging.

Former Member
0 Kudos

Hi Zeran,

There is no direct way for this, but if you really wish to use this program for some cases and switch off for other you should better put a check, for example you can keep an entry in TVARVC table and in the start of this program you have to put a code which will check this entry.

Let's say your entry will be nothing but a flag. 'X'. So if flag is there program will execute otherwise it will not, this way you can activate deactivate just by changing the table entry, no help required from any ABAPer. (Ofcourse one time help is required to put this code in the program) after that it will work as a switch.

Best Regards,

Tapodipta Khan.