cancel
Showing results for 
Search instead for 
Did you mean: 

DATECONV from transformation library.

Former Member
0 Kudos

I'm trying to use the DATECONV function identified in the transformtion library in a transfer rule routine. I cannot seem to resolve the syntax required. I'm getting the following error message:

E:Comma without preceding colon (after ZRESULT ?).

My code is as follows:

RESULT = DATECONV( ZOPTDTE, 'MDY', '/' ).

We are on support pack SAPKW31019.

Thanks for your time.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

if I understood you correctly you have tried use same syntax of dateconv function from formula builder in routine in transfer rules.

You can not do like that.

Code in routine would look like that (I am not sure if it is correct I just copy this from transfer rules generated report):

*Data definition:

DATA: l_Arg1 TYPE SYDATUM ,

l_Arg2 TYPE CHAR10 ,

l_Arg3 TYPE CHAR10 ,

l_Arg4 TYPE CHAR1 .

*Calculation:

l_Arg2 = TRAN_STRUCTURE-ZOPTDTE.

l_Arg3 = `MDY`.

l_Arg4 = `/`.

CALL METHOD CL_RSAR_FUNCTION=>DATECONV(

EXPORTING I_DATE = l_Arg2

I_FORM = l_Arg3

I_DEL = l_Arg4

IMPORTING E_DATE = l_Arg1 ).

result = l_Arg1 .

Another thing is: I do not think you can write date in this format 'MDY' (e.g.: how do you want to show november or december as one digit)?

Regards,

Andrzej

Former Member
0 Kudos

Thanks.

I will try looking at the generated code.

Answers (0)