cancel
Showing results for 
Search instead for 
Did you mean: 

Date format conversion through OD

Former Member
0 Kudos

Hi Experts

My client has a requirement where QM inspector enters the value in a MIC (Date) which is further linked to Class characteristics (Initial_date). In this way, this value is getting updated in the batch classification (both are numeric format)

Another characteristic (Date format) is made i.e Actual_date and assigned to respective class.

Here is the requirement, Since the QA user enter the value as 21122013 and same is updated in Initial_date as 21122013 (on the basis of linkage between MIC and Class characteristics), Value in Actual_date should also get updated in final format i.e 21.12.2013.

Is it possible to achieve through OD assignment? If yes, what are required syntax to achieve this??

Thanks,

Gaurav

Accepted Solutions (1)

Accepted Solutions (1)

Flavio
Active Contributor
0 Kudos

Hi Gaurav,

As far as I have seen, date format characteristic is accepting as input a value in the format YYYYMMDD, and then convert it to display according to the user profile settings (for instance, DD.MM.YYYY)

I think that one possible solution to achieve your requirement is by means of an user function, called via an object dependency.

The user function will receive as input the INITIAL_DATE characteristic, will properly convert it to the value expected by the date format characteristic, and will return that value to ACTUAL_DATE characteristic.

About user function and how to call it from an OD, there is an example in the Variant Configuration (LO-VC) document available on help.sap.com (here).

Hope this could be of some help.

With kind regards,

Flavio

Former Member
0 Kudos

Hi Flavio

Thanks for your response.

Yes, we created a Function Module & called via an object dependency as per your suggestion.

Regards,

Gaurav

Answers (1)

Answers (1)

Former Member
0 Kudos

Hii Gaurav,

if i consider the objective of QA inspector date availability in batch, on of the way around is mention, i hope it will add value in your objective.

Define three 'MIC' and three batch characteristic of 'CHAR' type let say DAY, MONTH and YEAR.

The QA inspector will type value in these three MIC and on locking results will flow them to batch characteristic.

The Actual_Date characteristic also should be in 'CHAR' format assigned to same class

Further the procedure,  with following syntax, assigned to char will give the desired results.

$Self.Actual_Date = $Self.Day||'.'||$Self.Month||'.'|| $Self.Year

Regards,