Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Dictionary, Table, Counter Question

Former Member
0 Kudos

Hi,

I'm trying to create a special customer table (SE11) with the following fields and have question regarding TYPE etc:

  • Fields of table

CUST_ID

CUST_NAME

CUST_DESC

1. CUST_ID should work as a counter (increment by 1 every time.) What kind of TYPE should I use ?

(How do i do the increment stuff...)

2. CUST_DESC should be able to take approx 5 kb of data and be searchable in WHERE clause. What kind of TYPE should I use ?

3. Is there any advantages of creating/using Data Element instead of Build-in type ?

//Martin

Message was edited by: Martin Andersson

1 ACCEPTED SOLUTION

Former Member
0 Kudos

You must create a number range using transaction code SNRO.

When adding new records to database use FM Number_get_next to find next available number.

For CUST_DESC u can use data element DI_DATA.

-


If it helps please give points.

2 REPLIES 2

Former Member
0 Kudos

You must create a number range using transaction code SNRO.

When adding new records to database use FM Number_get_next to find next available number.

For CUST_DESC u can use data element DI_DATA.

-


If it helps please give points.

Former Member
0 Kudos

Hi Martin,

1. SE11 will help you only to create a table, but not to add any special functionality (as far as i have known) the CUST_ID can be made as counter only by programming. while moving data use a variable to get the previous maximum CUST_ID value from the tabel and increment it before you insert the value into the table.

2. To give long descriptions declare the CUST_DESC as LCHR or LRAW types, i am not sure whether it will hold 5kb of data. Then searching for a particular word will not be a problem you can use,

SEARCH <c> FOR <str> <options>.

<option> in the SEARCH FOR statement can be any of the following:

ABBREVIATED

STARTING AT <n1>

ENDING AT <n2>

AND MARK

can be used to find the required word.

3. I think this is what you meant - if a data element is created by a domain, the technical attributes of the domain are inherited by data elements and these domains can be used by any number of data elements, besides you can also create data elements by refering to the existing data elements using 'TYPE'.

Hope this helps.

Regards,

Kathirvel