Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 758379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T15:28:22+00:00 2026-05-14T15:28:22+00:00

I need to create a 2 column array in ABAP so that a program

  • 0

I need to create a 2 column array in ABAP so that a program can look up a record item (defined by the letters A – ZZZ) and then return the number associated with it.

For example:

A = 1
B = 2
C = 3
…
Z = 26
AA = 27
AB = 28
…
AZ =
BA =
…
BZ =
CA =
…
…
ZZZ =

Please can you suggest how I can code this.

Is there a better option than writing an array?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T15:28:22+00:00Added an answer on May 14, 2026 at 3:28 pm

    you don’t need to lookup the value in a table. this can be calculated:

    parameters: p_input(3) type c value 'AAA'.
    
    data: len type i value 0,
          multiplier type i value 1,
          result type i value 0,
          idx type i.
    
    * how many characters are there?
    len = strlen( p_input ).
    idx = len.
    
    * compute the value for every char starting at the end
    * in 'ABC' the C is multiplied with 1, the B with 26 and the A with 26^2
    do len times.
    
    * p_input+idx(1) should be the actual character and we look it up in sy-abcde
      search p_input+idx(1) in SY-ABCDE.
    
    * if p_input+idx(1) was A then sy-fdpos should now be set to 0 that is s why we add 1
      compute result = result + ( sy-fdpos + 1 ) * multiplier.
    
      idx = idx - 1.
      multiplier = multiplier * 26.
    enddo.
    
    write: / result.
    

    i didn’t test the program and it has pretty sure some syntax errors. but the algorithm behind it should work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to create some xaml that shows text in columns like newspaper, something
I need to bind width property of the GridView column that is created dynamically
I need create clone repository. but I do not know where can I get
I need create a document word with Java. And I ask, how can I
I have a list/array of strings: l = ['jack','jill','bob'] Now I need to create
I need to create a Postgres 9.1 PL/pgSQL stored procedure that, among other parameters,
I need to create a table from an array recieved with an ajax call.
I have an array with 30000 plus entries that need to go into a
I need to optimize a PL/SQL function that is currently like that: CREATE OR
I have a Excel sheet with two columns and I need to create new

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.