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: 

RESTRICT USASGE DECISION OF ACCEPT IF ANY TEST CHARACTERISTICS FAILED

Former Member
0 Kudos

Same user must not perform the functions of both results recording and usage decision.

For the above case Enhancement name is QEVA0006 and function module is EXIT_SAPMQEVA_006.

It is working fine.

Coming to the following case:

Is there any User Exist to Prevent performing the Usage Decision if the user trying to perform the Usage Decision is same as the user on RR tables?????

Once QA11 or QA12 is executed and SAVE button is clicked, check the user ID On QAMR / QAVE:

Input parameter:

QAVE-PRUEFLOS

QAVE-MANDANT

I would appreciate if any one could help on this....

Regards

Prabhakar

1 ACCEPTED SOLUTION

Former Member
0 Kudos

HI prabhakara,

1. is same as the user on RR tables?????

What does this mean ?

Probably the user who created the

inspection lot

in QALS table.

2. In the FM,

u get the input as

QAVE

which contains nothing but

the data entered by the user on the screen.

3. Also in this FM, u get

the tcode.

4. Compareing 1, 2, 3 and user name

u can write IF condition

for your requirement.

5. If the user is same,

and u don't want to make the usage decision,

then in export parameters

there is avariabl

E_NO_ACCESS

make that to 'X'.

6. Just see the documentation on this FM.

U will get your query cleared !

regards,

amit m.

Message was edited by: Amit Mittal

5 REPLIES 5

Former Member
0 Kudos

HI prabhakara,

1. is same as the user on RR tables?????

What does this mean ?

Probably the user who created the

inspection lot

in QALS table.

2. In the FM,

u get the input as

QAVE

which contains nothing but

the data entered by the user on the screen.

3. Also in this FM, u get

the tcode.

4. Compareing 1, 2, 3 and user name

u can write IF condition

for your requirement.

5. If the user is same,

and u don't want to make the usage decision,

then in export parameters

there is avariabl

E_NO_ACCESS

make that to 'X'.

6. Just see the documentation on this FM.

U will get your query cleared !

regards,

amit m.

Message was edited by: Amit Mittal

0 Kudos

Hi Amit,

The following is of my requirement.

ASSUMPTIONS:

Program does not prevent if user wants to REJECT an inspection lot EVEN when all the test characteristics were PASSED.

If conditional tests FUNCTIONAL and LAL tests are used within inspection plans, then Code group / GRUPPE1: FUNCTIONAL or LAL-TEST Code / CODE1: GC02

OBJECTIVE:

The following code must work from and when usage decision is being made.

It must prevent performing the UD if the user trying to perform the UD is same as the user on RR tables.

Once QA11 or QA12 is executed and SAVE button is clicked, check the user ID On QAMR / QAVE:

1. Check for validity of the user (SAP user ID) performing the Usage decision

Input parameter:

QAVE-PRUEFLOS

QAVE-MANDANT

IF QA12 transaction is executed, then check QAVE table as follows:

If system user ID = QAVE-VAENAME or QAVE-VNAME

THEN continues processing without any message

ELSE CHECK THE FOLLOWING FOR QA12

IF QA11 transaction is executed

For QALS-PRUEFLOS = QAVE-PRUEFLOS and QALS-MANDT = QAVE-MANDT

GET QALS-PLNNR (GROUP)

QALS-PLNAL (COUNTER)

QALS-ART (INSPECTION TYPE)

QALS-HERKUNFT (ORIGIN)

GOTO table PLPO Where, PLPO-PLNNR = QALS-PLNNR and PLPO-STEUS = ‘QM01’

GET ALL THE RECORDS of PLPO-VORNR and PLPO-PLNTY

GOTO table PLMK Where, PLMK-PLNTY = PLPO-PLNTY and PLMK-PLNNR = PLPO-PLNNR and PLMK-PLNKN_LOW = ‘1’ and PLMK-PLNKN_HIGH = COUNT

GET ALL THE RECORDS of PLMK-MERKNR (number of MICs)

Count all the PLMK-MERKNR records

MIC_COUNT = COUNT

The number of MIC COUNT must MATCH with number of records in QAMR table

FOR EVERY record of PLMK-MERKNR,

GOTO table QAMR Where, QAMR-PRUEFLOS = QALS-PRUEFLOS

AND QAMR-MERKNR = PLMK-MERKNR

GET QAMR-SATZSTATUS (processing status)

& QAMR-MBEWERTG (valuation)

& QAMR-GRUPPE1 (code group)

& QAMR-CODE1 (code)

(WHEN FUNCTIONAL or LAL-TEST NOT REQUIRED)

IF QAMR-CODE1 = ‘GC02’

SUBTRACT 1 RECORD FROM QAMR_REC_COUNT

ELSE

KEEP UPDATING

QAMR_REC_COUNT = Number of QAMR records

(IF A RECORD DOES NOT EXIST, or Number of QAMR records less than MIC count THEN SOME OR ALL CHARACTERISTICS WERE NOT PROCESSED YET).

IF RECORD = NULL or (QAMR_REC_COUNT < MIC_COUNT ) or QAMR-SATZSTATUS <> ‘5’

THEN DISPLAY MESSAGE “Some of the test characteristics were not yet processed completely. Usage Decision can not be performed at this time.”

CANCEL THE TRANSACTION.

ELSE (Now, the valuation of every test characteristic is checked)

UNTIL HERE ALL THE ABOVE CODE HAS BEEN EXECUTED FROM USER EXIT . HENCE, I AM HOPING THAT THIS FUNCTION MODULE HAS ACCESS TO THE OUTPUT OF THE USER EXIT. IF NOT, THEN ALL THE ABOVE CODE MUST BE EXECUTED AGAIN.

CHECK

For every record of PLMK-MERKNR,

(Make sure that valuation of every test char. is ACCEPTED. OR, If valuation is rejected then, in order to accept that characteristic, the test characteristic MUST have code GC01 which is, conditional test is required.)

IF QAMR-MBEWERTG <> ‘A’

Or

((QAMR-MBEWERTG) <> ’R’ & (QAMR-CODE1 <> ‘GC01’) & (QAMR-GRUPPE1 <> ‘LAL-TEST’))

Or

((QAMR-MBEWERTG) <> ’R’ & (QAMR-CODE1 <> ‘GC01’) & (QAMR-GRUPPE1 <> ‘FUNCTIONAL’))

THEN

DISPLAY MESSAGE “Some of the test characteristics were valuated as REJECTED. Usage decision can not be ACCEPTED. Please change the code”.

Place the cursor on RQEVA-VCODE (screen field)

ELSE

Then the record is acceptable and continues processing

I hope it help you for better understanding

Regards

Prabhakar

0 Kudos

Hi Amit

Could you help on this.

I would appreciate an early answer.

<b>Its very urgent</b>

Regards

Prabhakar

0 Kudos

Hi,

You must enter 'X' in the export parameter E_EXIT_ACTIV; otherwise the system does not take the other export parameters into account.

try like this.

Laxman

0 Kudos

Hi Laxmana,

You are absolutely right.

But here 2 cases:

<b>Case1:</b>

Same user must not perform the functions of both results recording and usage decision.

For this Enhancement name is QEVA0006 and function module is EXIT_SAPMQEVA_006.

It is working fine.

<b>Case2:</b>

To Prevent performing the Usage Decision if the user trying to perform the Usage Decision is same as the user on RR tables?????

This is different to the first case.

Is there any Enhancement for the second case:

i want to do this as an seperate FM, if no correspondance Enhancement exists.

I hope that you r getting my point.

I would appreciate an early reply, its very urgent.

Regards,

Prabhakar