New ABAP Conversions

Index

 

ABAP HANA 7.51: New Conversions

New ABAP provides new types of conversions which are not only time saver but also performance tuned. Some of the most important conversions are Alpha conversion, Date/Time conversion, Number conversion etc.

Sample Source Code: ALPHA Conversion

Alpha_Conversion

Output: ALPHA Conversion

Alpha_Conversion_Output

Explanation:

Two types of materials are used here viz. Material1 and Material2. Both Materials have only one difference that Material1 is provided without preceding zeros and Material2 is instantiated with preceding zeros. Irrespective of the Material, Alpha IN and Alpha OUT are same in both the cases.

This new syntax eliminates the use of Alpha conversion Function Modules.

Sample Source Code: Date Format

Conversion_Date_Var1_source

Output: Date Format

Conversion_Date_Var1_output

Conversion Explanation:

Date formats can be changed during printing using ISO, USER, and ENVIRONMENT types as per source code. User Date format can be changed in Owner’s settings. You may get a different output for User and Environment formats depend on the settings.

Date format for a User can be changed in Menu > Settings > User Profile > User Data > Defaults > Date Format.

Sample Source Code: Time Format

Conversion_Time_Var1_source

Output: Time Format

Conversion_Time_Var1_output

Conversion Explanation:

There are four Format variants available for Time format viz. Raw format, User format, Environment format, and ISO format. These can be easily printed or stored using conversion syntax provided by SAP.

Time format for a User can be changed in Menu > Settings > User Profile > User Data > Defaults > Time Format.

Sample Source Code: Case of Text

Conversion_Case_Var1_source

Output: Case of Text

Conversion_Case_Var1_output

Case Change Explanation:

The case of given text can be easily changed during printing. It can be printed in Raw format, in Upper case or Lower case by just mentioning the CASE of text to be printed.

Sample Source Code: Timestamp Fromats

Conversion_Timestamp_Var1_source

Output: Timestamp Fromats viz. SPACE, ISO & Environment

Conversion_Timestamp_Var1_output

Three formats for Timestamp are shown above viz. SPACE, ISO & Environment. They can be easily converted in formats by mentioning  “TIMESTAMP” parameter.

Sample Source Code: Number Format

Conversion_Number_Var1_source

Output: Number Format viz. User, Environment & Raw

Conversion_Number_Var1_output

 
Index

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s