Skip to Content
author's profile photo
Former Member

Customer Alpha Conversion

Hi All,

I have customer ID's being used from sales data(DataSource ), GL data (Attribute of 0PROJECT), Cost for Controlling (Routine which picks the same table of 0PROJECT).

I have checked this table /bi0/PProject here I see the customers having values such as 00000R1010, 00000R4000 when these should be R1010, and R4000.

0CUSTOMER is a CHAR 10 Field with ALPHA.

Customer numbers with just numeric values are correct while customer numbers starting with charecter i.e. (R) is having the problem.

All suggestions are appreciated.

Kind Regards

James

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    author's profile photo
    Former Member
    Posted on May 04, 2011 at 05:43 AM

    hi,

    The Alpha conversion will only work for Numeric values, for Alpha numeric values it does not do anything.

    The data in IO 0PROJECT is being loaded from the R/3 system and the values itself are coming with appended zeros in the beginning. You can write the ABAP code in the transformation to 0PROJECT to delete the leading zeros while loading customer values in 0PROJECT.

    SHIFT CUSTOMER LEFT DELETING LEADING '0' .

    This will delete leading zeros and store values in 0PROJECT as R4000

    regards,

    Arvind.

    Edited by: Arvind Tekra on May 4, 2011 7:46 AM

    Add comment
    10|10000 characters needed characters exceeded

    • HI ,

      Use the below syntax in the update rule , you can just paste this

      DATA: CUSTOMER TYPE /BI0/OICUSTOMER .

      IF COMM_STRUCTURE-CUSTOMER IS NOT INITIAL .

      CUSTOMER = COMM_STRUCTURE-CUSTOMER .

      SHIFT CUSTOMER LEFT DELETING LEADING '0' .

      RESULT = CUSTOMER .

      ENDIF .

      if you are using transformation, replace COMM_STRUCTURE with SOURCE_FIELDS

      Hope this helps ,

      Sathya

  • Posted on May 04, 2011 at 12:49 AM

    HI ,

    ALPHA convertion will work only on numeric values , may be you

    can try a simple ABAP code like below to solve the issue

    SHIFT CUSTOMER LEFT DELETING LEADING '0' .

    Best regards,

    Sathya

    Add comment
    10|10000 characters needed characters exceeded