Monday, September 3, 2007

Conversion routine

Write this simple code.


REPORT ZFIELDCONV.
data: d_auart LIKE vbak-auart.
d_auart = 'TA'.
WRITE d_auart.

What the result output on screen do you expect, "TA"? No, the result will be "OR".

The result comes from conversion routine of its domain. In SE11 open table VBAK, find field AUART, double click to go to data element AUART, then double click to open domain AUART. You will see its conversion routine, named AUART. Double click the conversion routine, you got at least two conversion routine conversion routine input & output. They are function module, you can test them in SE37.
The INPUT routine performs the conversion from display format to internal format. The OUTPUT routine performs the conversion from internal format to display format. Take attention when we hard code value as a condition value in "WHERE condition", you must convert its value into internal format.

Other commonly used conversion routine is ALPHA. It is conversion used to insert leading zero for document number. For example, in sales order (VBAK-VBELN length 10), when we key in order no, for example we key in '4302', conversion routine input will automatically add leading zero, so it will become '0000004302', this is real value stored in table VBAK. On conversion routine output, it will delete leading zero.

In SE16, we can view the data wheather in internal format or display format, to toggle format, in display list, go to Setting->User Parameter, in tab strip "Data browser" choose "format, field conversion exit".

16 comments:

Anonymous said...

Hi Alionzo,

I'm a new abaper from Houston, I found your blog very good source for the newbies like me. I may have some questions about Abap, if you can please send me email at kevinabap@yahoo.com

Thanks

Anonymous said...

this info are very useful... thanks... pleeese.. feel free to visit my blog also... i put free movies download and software application for free..

sai krishna said...

excellent blog submit all your posts at www.indiantags.com we are social bookmarking site just like digg we share adsense revenue with our users who submit their stories who keep posting

Dj David Waatts said...

Hi Maas Alionzo,
How are you? How is Jakartha???

I am David from Chennai. Here i am with a small problem.

In se78 i imported few images and i named them. and also i created few screens in se51. even i allocated each image for each screen.
But the problem is, when i tried to call them from se38, the images are not properly applied to the screens. the first image which i allocated for the first screen is automatically apllied on all the screens.

Why it is happening. How can i solve this problen. i want each image for each scree evenly. what should i do? what would be the problem?
Please advice me regarding this problem.

Also send me your advise to davidjagan@mytechus.com.

Thank you bro.

alionzo said...

Hi David..
I'm fine, thanks..Thanks for visiting my blog..

Here is sample code about display image in abap:
http://www.saptechnical.com/Tutorials/ABAP/image/screen.htm
You can start by testing this sample progam.

Hope it help.

venkat said...

Hi,ALIONZO,

How are you ?. I hope your doing good.

i am new for SAP. Can you provide me ABAP Tutorials. Please...


Thanks
Venkatesh

Sherin said...

Hi,

This is Sherin from Pune. I wanted to compare the values of a conversion routine field and a normal field and give the o/p from the conversion routines field table. How can I do it? I have used the FM Conversion_Exit_Alpha_Input to no avail.

Unknown said...

Thanks for sharing this Information, Got to learn new things from your Blog on sap abap training in chennai

katrinaDcruz said...

Thanks for sharing this Information, Got to learn new things from your Blog on
abap

ERP said...

I had come to know about your blog from my friend nandu , hyderaba.i have read atleast 7 posts of yours by now, and let me tell you, your website gives the best and the most interesting information. This is just the kind of information that i had been looking for, i'm already your rss reader now and i would regularly watch out for the new posts.

Oracle Fusion HCM Training

Unknown said...

I have been a blogger too but you post much technical details. Thank you for sharing your knowledge. The creating experts was my first trainer in SAP ABAP got in depth learning from them

http://thecreatingexperts.com/selenium-training-in-chennai/


contact +91-08122241286

The Qb Payroll said...

Why waiting any longer? If you have issues, get it resolved by dialling QuickBooks Toll Free support Number 1-833-325-0220.

Prepare4test said...

Prepare4Test the best and reliable platform where you can get accurate 7691X question dumps which will assist you in passing your Avaya Mobility Networking Solutions Troubleshooting and Maintenance exam fast.

BSC 1st Year Result 2021 said...

Awesome article, it was exceptionally helpful! I simply began in this and I'm becoming more acquainted with it better! Cheers, keep doing awesome!

BSC 2nd Year Result 2021 | BSC 3rd Year Result 2021.

Aarfragrances said...

Amazing Blog. Visit AAR Fragrance for Perfumes for Men Online at Best Prices in India, Buy Perfumes for Women Online in India, Davidoff Cool Water For Men EDT 125ml, and Versace Pour Homme Dylan Blue EDT 100ml.
Perfumes for Men Online at Best Prices in India

Orange Pill Clinic said...

Visit Orange Pill Clinic for leading Nursing and Doctor Consultation Services at Home, Home Nursing Services in Delhi NCR, and Nursing Services for Suturing Removal at Home. For more information visit our website.
Home Nursing Services in Delhi NCR