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: 

Different behaviour from PPCO0007 user exit ?

Former Member
0 Kudos

I  am working on controlling  a customized PP procedure and written logic  in user exit PPCO0007.

I have written some validation in PPCO0007 user exit based on the system status HEADER_IMP-STTXT = 'REL' .

This exit is working correctly when I was releasing the order from CO02 ( I got the value in HEADER_IMP-STTXT field in exit).

But when I am trying to mass release the production orders from COHV transaction the same user exit is triggering, but the HEADER_IMP-STTXT field does not hold any values in it.

But After completing the exit,  status is updating in JCDS table.(I have checked the table while debugging & after debugging also).

can any one have face similar scenario previously ? Why the exit does not hold status values  when it is triggering from COHV ?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Problem solved, while doing mass release in COHV we will not get the status text, so we need to get the function code of the COHV into the user exit by using the field symbols.

If the function code = '130' (Release). then do the validations.

it will work fine.

Code : unassign<COHV>

IF SY-TCODE = 'COHV'.

ASSIGN (C_COHV) to <COHV>.

     IF <COHV>-FUNCT = '130'.

****          Do your validation here

      ENDIF.

ENDIF.

Thanks,

Sivanagaprasad G

1 REPLY 1

Former Member
0 Kudos

Problem solved, while doing mass release in COHV we will not get the status text, so we need to get the function code of the COHV into the user exit by using the field symbols.

If the function code = '130' (Release). then do the validations.

it will work fine.

Code : unassign<COHV>

IF SY-TCODE = 'COHV'.

ASSIGN (C_COHV) to <COHV>.

     IF <COHV>-FUNCT = '130'.

****          Do your validation here

      ENDIF.

ENDIF.

Thanks,

Sivanagaprasad G