Skip to Content
0

Add field calcul time in transaction

Mar 24, 2017 at 06:15 AM

60

avatar image

Hello

I need to add a new column, a calculate field type time in a not-standard transaction.

I launch SE84 transaction to add field in ABAP Dictionnary --> Structur --> I find my structure and i see Components tab. I need to add in below the list. But, when i choose a Componant type i don't know what to tell.

So, i launch SE11 transaction and i create a "Data type" ZTPSSTDCALC. In data type tab i use MENGV13 (i need to calculate an activity field). Data type MENGV13 has type "QUAN", lenght "13", decimal "3", etc.

I create this, and i go in SE84. I add my new compnent with componenant type ZTPSSTDCALC, this is display data type, description, etc. but, when i active my structure, i have an error, i must to fill "Table reference" and "Reference area" in "Currency zones / quantities" Tab.

But, when i calculate this new field, i don't have table reference and area.

Sorry for my english and thank you for your help.

In SE84 i add my field (red) in tab components :

In tab currency zones / quantities : i don't know what write, because this is not field in a table but a calculate field

My component type Z in SE11 :

se84.png (30.6 kB)
se842.png (30.1 kB)
se111.png (20.0 kB)
se112.png (15.7 kB)
se113.png (12.7 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Matthew Billingham
Mar 24, 2017 at 06:56 AM
0

You have chosen to use a quantity type for the domain. Quantity types must have a Unit of Measure associated with them. Choose a non-quantity type, or create your own. Or use a predefined type, clicking on the Type Prédéfini button. If you want to know how to use that, refer to your course notes or online documentation.

Hint: you can create a new data element directly from the table/structure editor. Just enter the name of it and double click. Similarly you create a new domain directly from the data element editor.

Show 3 Share
10 |10000 characters needed characters left characters exceeded

Hello

Thank you for your fast reply !

I have change has following :

But i have same error :(

se114.png (17.0 kB)
error.png (25.9 kB)
0

I have change has following :

Now it's ok ! Thank you !

But, in my program SE80, i declare my type :

DATA : l_tpsstdcalc(13)

....
l_tpsstdcalc = w_alv_conf-tpsstdcalc

I have an error :

The type of "W_ALV_CONF-tpsstdcalc" can not be converted to the type of "L_tpsstdcalc"

Now i declare my variable :

DATA : l_tpsstdcalc TYPE zpp_alv_conf_uni-tpsstdcalc.

But i have an error : "L_TPSSTDCALC" Must be an alphanumeric data object (data type C, N, D, T or STRING)

se11ok.png (17.6 kB)
0

It's not ok. You've created a type that is a reference to a quantity. (e.g. like a pointer in C programming language). That's just not going to work.

QUAN is a quantity. It must have a Unit of Measure. Do F4 help on the "Type prédéfini" field and choose one of the decimal types or floating point. This is basic data dictionary stuff.

(By the way, a declaration like l_tpsstdcalc(13) is not good practice. Better is l_tpsstdcals type c length 13. )

0
Paul Karunakar Mar 24, 2017 at 12:17 PM
0

HI Check below screen when u choose data type as QUAN or CURR then u have to give reference table and field name. in ur Ztable click on currency/quantity fields tab and u will see a editable input box where u need to rite for Example VBAP as ref table and MEINS for ref field if it is Quan field. and ur issue will resolve.


ok.png (44.3 kB)
Share
10 |10000 characters needed characters left characters exceeded
Steve Feller Mar 28, 2017 at 05:38 AM
0

Hello

I'ts very good ! Thank you all.

Share
10 |10000 characters needed characters left characters exceeded