cancel
Showing results for 
Search instead for 
Did you mean: 

Assign Reason for rejection as mandatory field in UD

0 Kudos

Dear Guru's,

I have created a code group and codes as Accepted, Rejected ane Partially Accepted in qs41.

Then i have assigned these codes to Selected set and assigned Valuation as:

Accepted----Accepted(OK)

Rejected----Rejected(NOT OK)

Partially Accepted----Rejected(NOT OK)

I have assigned these selected set to inspection type.

My question is while I am doing UD I have selected Partially Accepted, but the system is not showing Reason for Rejection as Mandatory Field.

Please suggest me how can I keep Reason for Rejection as Mandatory Field.

Regards

Prasad

Accepted Solutions (1)

Accepted Solutions (1)

jogeswararao_kavala
Active Contributor
0 Kudos

Hello varaprasad,


I have just worked out the solution through above mentioned exit QEVA0007The  following code is to be put in the include ZXQEVU09 of the exit

IF i_qave-vbewertung = 'R' AND i_qave-ltextkz IS INITIAL.


   DATA: lv_id TYPE icon-id.

   TABLES: icon.

   SELECT SINGLE id FROM icon INTO lv_id WHERE name = 'ICON_MESSAGE_ERROR'.

   CALL FUNCTION 'POPUP_TO_INFORM'

     EXPORTING

       titel = 'Error'

       txt1  = lv_id

       txt2  = 'UD can not be saved due to Reason for rejection not filled in longtext !'.


   LEAVE TO SCREEN 0.

ENDIF.

This code throws error pop-up , if the user does not fill the longtext in case of Rejection ( code R ).

You can work with your ABAPer and fine tune this to your requirements.

Good luck

KJogeswaraRao

/message/16501069/edit

0 Kudos

Hi

Thanks for your response .

I will test this scenario with my technical team and come back to you.

regards

Prasad

busyaban7
Active Contributor
0 Kudos

Jogeswara Sir,

This is fantastic. Down the line folks will get help form this thread!!

Thanks,

Arijit

Answers (3)

Answers (3)

jogeswararao_kavala
Active Contributor
0 Kudos

Hello varaprasad,

The exit suggested by Arijit namely QEVA0007 looks apt for this purpose. Code like :


IF i_qave-vbewertung = 'R' AND i_qave-ltextkz IS INITIAL.

message: 'Reason for Rejection to be logged in Long text.' TYPE 'E'.

ENDIF.

in the include ZXQEVU09 of this exit, seems to be working well, throwing a pop-up with the above message when Saving a UD with Rejection code, there is an issue here.

Due to some reason, this exit is so arranged that the error message pop-up that is supposed to trigger according to above code, surprisingly appears as Information po-up and UD saving will continue.

This is due to a clear line given in the documentation of this exit:

  • The messages that may be issued in this function module are intercepted by the calling program and issued as information messages (message type"I").

So, if our requirement is to stop UD  under some conditions, I doubt we need to go for Implicit Enhancement points in program SAPMQEVA.

The exit we are talking about can be used to open Long text window automatically with default longtext given in the table T_UD_LONGTEXT.

For information please.

Regards

KJogeswaraRao

Ayoub_Habchi
Contributor
0 Kudos

Hi,

You can capture the reason of rejection at the characteristic level by setting the corresponding flag in the master inspection characteristic.

Logically, at the UD, the details of inspection results explains why such decision has been taken.

Of you still need a mandatory reason at the ud level, you have to add small coding through follow up action.

Best regards,

Ayoub.

busyaban7
Active Contributor
0 Kudos

Hi Varaprasad,

Well, I think capturing 'Reasons for Rejection' as Long Text is not automatic. You need to build in specific custom codes in the below Enhancement -

QEVA0007  UD: Control of compulsory comment or long text presetting [EXIT_SAPMQEVA_007]

Thanks,

Arijit