cancel
Showing results for 
Search instead for 
Did you mean: 

PERI6 conversion routine -0calweek

Former Member
0 Kudos

I have a 0calweek in my infosource.

When I extract data

102005

122005

112005

It works fine.

If I have a data like this is my extrat strucutre

12005

22005

....

92005

I am getting the conversion exit error.PERI6 conversion routine is maintained in the infoobject 0CALWEEK.

My data extract team saying that when they are saving as .csv file.

They are not able to save 0calweek value as 012005.They are able to provide 12005.

I am getting the error message

Error in conversion exit CONVERSION_EXIT_PERI6_INPUT

Please advise on this .

Thanks

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

I solved this issue. I changed the file layout everything seems to working now

Former Member
0 Kudos

Hai,

Just another small addition. In excel if it doesnot allow you to enter the value in the format u want, you can right click on the cell> format cell>number tab> select text.

Former Member
0 Kudos

I solved this problem.I didn't apply ABAP code.

I loaded into PSA and select Process manually option.It works fine for me.

Former Member
0 Kudos

I have added the code in the 0calweek infoobject routine.

When I provide preview in the infopackage scheduler.I am still getting CONVERSION_EXIT_PERI6_INPUT error.

I have activated all the steps(transfer rule,updte rule)

In the file Calweek is 12005

22005

I am expecting the value is 012005

022005

----


FORM COMPUTE_CALWEEK

USING RECORD_NO LIKE SY-TABIX

TRAN_STRUCTURE TYPE TRANSFER_STRUCTURE

G_S_MINFO TYPE RSSM_S_MINFO

CHANGING RESULT TYPE /BI0/OICALWEEK

G_T_ERRORLOG TYPE rssm_t_errorlog_int

RETURNCODE LIKE SY-SUBRC

ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel datapackage

$$ begin of routine - insert your code only below this line -

  • DATA: l_s_errorlog TYPE rssm_s_errorlog_int.

data : str1 type i.

DATA: c1(2) TYPE c VALUE '0'.

data : c2(6) type c.

data : c5(7) type c.

c1 = '0'.

c2 = TRAN_STRUCTURE-CALWEEK.

str1 = strlen( TRAN_STRUCTURE-CALWEEK ).

  • CALL FUNCTION 'STRING_LENGTH'

  • EXPORTING

  • STRING = TRAN_STRUCTURE-CALWEEK

  • IMPORTING

  • LENGTH = str1 .

CONCATENATE c1 c2 INTO c5 .

if str1 = 5 .

RESULT = c5.

else.

RESULT = TRAN_STRUCTURE-CALWEEK.

endif.

  • returncode <> 0 means skip this record

RETURNCODE = 0.

  • abort <> 0 means skip whole data package !!!

ABORT = 0.

$$ end of routine - insert your code only before this line -

ENDFORM.

Is their anything missing .

Is it possible I can ask my user to provide other file format other than .csv

Please advise on this.

Former Member
0 Kudos

Hi,

may be you should add a routine in your transfer rules.

check the length of the field. if it is 5, add a leading zero.

regards

Siggi