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:

Kevin 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

arm 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

David 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

seventyros said...

For a Excellent Online Resource for SAP EP and SAP Web Dynpro ABAP, Visit Learn SAP Online

seventyros said...

For a Excellent Online Resource for SAP EP and SAP Web Dynpro ABAP, Visit Learn SAP Online

SAP EP - Standard Portal Services
Portal Eventing and Navigation
Portal Look and Feel - Branding the Portal
How to Develop Portal Applications
SAP EP-Developing portal content and assigning permissions
SAP EP-Role maintenance
SAP EP-How to make Enterprise Portal highly available
SAP Material Management Introduction
SAP EP-J2EE architechture

And Many More...

Basics of Web Dynpro ABAP
ABAP Data Types and Objects
ABAP Statements
WD4A - Topics to be covered in the upcoming posts
WD4A - Introduction
WDA - SAP Logon Procedures
WD4A-Format the Values appearing on value Axis of Business Graphic
WD4A-Navigate from one view to another and back to previous view
WD4A - How to Calculate next 12 months from current month in web dynpro ABAP
WD4A - Validate Inputs in a web dynpro ABAP Application

And Many More...

Roshan said...

Excellent Online Resource for SAP EP and SAP Web Dynpro ABAP. Visit Learn SAP Online for Free

SAP and Their Produstcs - SMB Customer - SAP Business One

What is SAP ?

Architecture of SAP Business One Application
Navigation in SAP Business One
SMB Portal and its Functionality
Netweaver Administrator Day to Day Work
SAP Business Intelligence
Business Partners in SAP Business One
Continuous Stock System in SAP business one
How to make WDJ Component available on SAP EP
SAP Enterprise Portal Application in NWDS

And Many Morte Topics

Anonymous said...

Here are a few links to Sample Report Programs on ALV Grid / List Display :


- Traffic Light In An ALV Report Program.

- Display ALV Report In Different Language.

- ALV Pop Up To Select The Options & Display Them.

- Example On Blocking ALV List/Grid Display.

- Change The Layout Of The ALV List/Grid Display.


- Add Color In ALV List/Grid Display.

- Use Of Double Click On ALV Grid/List Display.

- Hierarchical ALV Grid/List Display Report Program.

- Header In Bold - ALV Grid/List Display.

- Double Click On ALV Grid/List Report.


- ALV Interactive (Double Clicking).

- Simple Example On How To Display Table Data In ALV Grid/List Display.

- Change Of ALV Grid/ List Layout (VARIANT).

- Repeating Colors In ALV Grid/List Display.

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.

Anonymous said...

land marvel contact chennai
Customising and providing residential homes & commercial space as per clients requirements

chennai said...

land marvel contact chennai
Customising and providing residential homes & commercial space as per clients requirements

Divya Dheen 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

Logical DNA said...

Thanks for sharing the important points of view with us. It is really very nice blog which describes how to SAP Partners In Pune