cancel
Showing results for 
Search instead for 
Did you mean: 

Delivery date for Sales Order

former_member287204
Participant
0 Kudos

Dear Sirs,

I would like to ask a quite urgent question as below -

Currently when creating a Sales Order using VA01 and inputting the Delivery date as past date, a warning message will be prompted. Then, how to change the warning message to error message so as to block user to create / change the Sales Order with past Delivery date ?

Many Thanks,

KH Fong

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Fong,

The warning message is called in the function PERIOD_AND_DATE_CONVERT_INPUT, please check with you abap team if they can help you in changing the enhancement.

Also refer the note 409661.

Answers (4)

Answers (4)

former_member223981
Active Contributor
0 Kudos

The message you are referring to is:

Date is in the past: Please check

Message no. VD399

This is a non-customisable message and is hardcoded into the system. Therefore, your only option is to modify the system. The message is raised here:

====================================================

FUNCTION PERIOD_AND_DATE_CONVERT_INPUT

IF INTERNAL_DATE < SY-DATLO.

   IF DIALOG_DATE_IS_IN_THE_PAST NE SPACE AND

      SY-BINPT IS INITIAL.

     MESSAGE W399.

     ev_date_in_past = 'X'.

   ENDIF.

=====================================================

INTERNAL_DATE will contains the  requested delivery date (that will be in the past in your case) while SY-DATLO refers to the current date (today).

When this IF statement is true, then the warning will be issued. If you want this to be an error, you will have to change the above W to E. This modification would issue an error rather than a warning.

Hope this helps.

Former Member
0 Kudos

Hi Fong,

Discuss your requirement with abaper, they can put some validation in SO USer exit.

former_member287204
Participant
0 Kudos

Dear G. Lakshmipathi,

The message is like "Delivery date is in the past".

Tks,

KH Fong

Lakshmipathi
Active Contributor
0 Kudos

What was the message number ?

G. Lakshmipathi