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: 

how to test enhancement

Former Member
0 Kudos

hai,

i have written in the coding under the ehancement CATS0003

DATA :

w_fields LIKE cats_comm,

w_sap_tcats LIKE tcats,

w_i_messages LIKE cats_mesg.

w_fields = fields .

w_sap_tcats = sap_tcats .

if fields-raufnr = '4000020'.

w_i_messages-msgid = 'Z001'.

w_i_messages-msgty = 'E'.

w_i_messages-msgv1 = 'can not use this network and acivity'.

APPEND w_i_messages TO i_messages.

ENDIF.

show me the procedure of how to test this coding in the transaction CAT2

1 ACCEPTED SOLUTION

Former Member
0 Kudos

You can test report program or transaction in the way stated in my last post. There is no need to start with /h. You can start the transaction in normal way. If the program executes the include coded by you then it will stop at breakpoint set by you. If that does not happen then you have to check the activations etc.

13 REPLIES 13

Former Member
0 Kudos

Put a breakpoint in the include where you have added your code and execute the transaction. The progrm will stop at the breakpoint and then you can execute it in debug mode to see how your code behaves.

If the program does not stop at breakpoint then see if your include, your enhancement project are activated and try again.

0 Kudos

The main program is not a online report, so i won't be able to execute it and check, can u provide some other solution for it.

0 Kudos

The main program is not a online report, so i won't be able to execute it and check, can u provide some other solution for it.

0 Kudos

Hi Anitha,

1. I assume the enhancement u have used

is correct one for the program in question.

2. U want to say that the main program

is not an online report.

3. No problem.

U must be executing it thru some TCODE.

4. Run that tcode.

when some screen appears,

type

/h

and press enter

in the command text box(same where u type tcode)

5. This will put the program

in DEBUGGING mode.

6. Now as u have already put a break-point,

the program will come there afterwards

whenever the user-exit gets triggered.

I hope it helps.

Regards,

Amit M.

Former Member
0 Kudos

Hi again,

1. one simple way is to

write code for issuing some

MESSAGE

of type Warning or STATUs

so that u can know, its the correct enhancement.

2. also code : BREAK-POINT there.

regards,

amit m.

Former Member
0 Kudos

You can test report program or transaction in the way stated in my last post. There is no need to start with /h. You can start the transaction in normal way. If the program executes the include coded by you then it will stop at breakpoint set by you. If that does not happen then you have to check the activations etc.

0 Kudos

Hi Anitha,

If the control still doesn't stop in the User Exit include, even after keeping the break-point and running the CAT2 transaction, then check whether you have attached a CMOD Project for your Enhancement.If not, create a project for your enhancement in CMOD transaction.

Regards,

Ravi

0 Kudos

The project name i gave it as zcat001, the enhancement name is CATS0003 - CATS: Validate recorded data.

The Components Function Exit - Exit_SAPLCATS_003, under this an include INCLUDE ZXCATU03.

i have given the coding as

if sy-uname = 'myuserid'. " here i am giving my userid

message 'username'

Endif.

This should reflect in CAT2 transaction when i enter into it. I am not able to see the reflection. Can u tell me how should i check it

0 Kudos

Hi Anitha,

Before you start using CAT2, pl ensure the relevant CATSPROFILE is maintained in the PID 'CVR' in the User defaults. I have used all the ZXCAT*** exits and didn't have an issue. What is the first screen you see when you called the transaction CAT2?

Regards,

Suresh Datti

0 Kudos

hi, how do i check the relevant CATSPROFILE is maintained in the PID "CVR" in the user defaults, what is PID 'CVR'. pls can u explain it clearly

0 Kudos

First of all after crearing the project zcat001 in smod , activate it before using it in cmod.

Put a breakpoint on the if statement and check for sy-uname.

Hope this helps...

0 Kudos

i am able to check, it cmod, its working perfectly, but i don't know how it reflects in CAT2 transacion, can u tell me how it gets reflected in CAT2 transaction. how to check the display

Former Member
0 Kudos

Hi just write

if sy-uname = 'dev01'

........

.......

......

endif

so that it wont disturb the other users when executing the same program. Also put a break point there execute it in the debug mode.

satish