April 20, 2010 – 10:57 pm | 11 Comments

Dear Jane,
95% of this presentation is half mental.
Seriously! STOP playing games. Throw away those shrouds of insanity. Get out of that virtual ‘web’.
Ok, about your presentation, in few words – no reasoning. Just some facts …

Read the full story »
Bon Voyage

Business-Startups

Healthcare

MBA

Technology

Home » Technology

SAP ABAP: Converting unique identifier in data dictionary objects

Submitted by Ameya Pimpalgaonkar on January 29, 2010 – 12:38 pm No Comment

With basic knowledge on data dictionary objects, it is clear that all the records in the database are stored with a unique identifier. And this unique identifier can be of any form. However, one of the challenges is to deal with the unique key which is stored in the form of RAW16.

The unique identifier for the records in CRM module and in Audit Management Application of Quality Module is in RAW16 format. However the way we display the record name on the screen is with the External Identifier which exists for each unique identifier.

 

Code provided below demonstrates how to get the Character format of the unique identifier which is stored in RAW format.

This will be helpful for the objects which use tables like CGPL_PROJECT, CGPL_TASK etc, (which are used in CRM modules and also in Audit Management Application of Quality Module as mentioned above).

 

 To convert the GUID (RAW16) into Char24:

     

DATA: V_GUID TYPE PLMT_QUEST_RES_UI,
      V_EXTERNAL_ID TYPE CGPL_EXTID.

 

Pass the value of GUID (RAW16) for which we need to convert into Character Format into the variable V_GUID-GUID.

 

  CALL METHOD CL_PLM_AUDIT_CONVERT_SERVICES=>CONVERSION_OUTPUT
      EXPORTING
        IV_INPUT  = V_GUID-GUID
      RECEIVING
        RV_OUTPUT = V_EXTERNAL_ID.

 

This method internally uses the function module CONVERSION_EXIT_CGPLP_OUTPUT for the conversion purpose.

 

Here is the process to call a method inside our object (report, function module etc,):

 

  1. Click the Button “Pattern” or Ctrl+F6 present on the toolbar.
  2. Select the radio button “ABAP Object patterns” and click Ok button.
  3. Enter the class name in Class/Interface field (Enter CL_PLM_AUDIT_CONVERT_SERVICES).
  4. Enter instance variable also incase of calling an Instance method. (As CONVERSION_OUTPUT is a static method no need of instance in this case)

Press F4 in method field which will list the methods that are available for the class (Select CONVERSION_OUTPUT) and click ‘Yes’.

Twitter del.icio.us Digg Facebook linked-in Yahoo Buzz StumbleUpon

Related Articles

Leave a comment!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar blog.

eXTReMe Tracker