2016 Jul 13 11:36 AM
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 ?
2016 Jul 19 10:07 AM
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
2016 Jul 19 10:07 AM
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