cancel
Showing results for 
Search instead for 
Did you mean: 

How to make comments mandatory in UD long text after defined time period

former_member608385
Active Participant
0 Kudos

Hi SAPians,

I want to make comments mandatory in UD long text if UD is being done after 15 days (which is already defined in material master as avg insp duration).

Thanks & Regards,

Accepted Solutions (0)

Answers (1)

Answers (1)

busyaban7
Active Contributor
0 Kudos

Hi Atul,

I think your requirement can be done through an enhancement. You can try the below steps -

1. Use the below exit -

QEVA0007  UD: Control of compulsory comment or long text presetting

2. Collect SY-DATUM for UD at runtime. Your request can't wait till saving this UD to populate 'UD Code date' [QAVE-VDATUM].

3. Check 'Avg. insp. duration' [MARC-MPDAU] or 'Mean insp. dur.' [QMAT-MPDAU]. I prefer the 2nd one, as this is more relevant. 

4. The above exit should programmatically check during runtime -

SY-DATUM (for UD) > GR Date + QMAT-MPDAU (Corresponding to the inspection type/material/plant) ==> Then 'force' QAVE-LTEXTKZ update by user. Else throw error.

5. Once LT is updated, you can see it using FM: READ_TEXT, by passing the values -

ID => Text ID => QAVE

NAME => Text Name => STXH-TDNAME

OBJECT => Text Object => QPRUEFLOS

Please work with your ABAP team colleague and check if these proposal helps you.

Thanks,

Arijit