cancel
Showing results for 
Search instead for 
Did you mean: 

Anable to display currency field -smart forms

Former Member
0 Kudos

Hai,

I am new to ABAP ,I am trying to display PO using smart form but I am unable to display currency field (netpr).there is no syntax error or runtme error but when i press print preview button

' Reference field X_EKPO-NETPR unknown in form'.

message is displayed.

can any one help me.

thanks in advance

regards

Swetha Singh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi swetha,

the reference field for ekpo-netpr is ekko-waers. but u dont have to mention that in the smartform.

In global data under currency/quantity tabs give

fieldname-> x_ekpo-netpr

reference field-> netpr

data type-> curr

Now under the global data tab give,

variable name->netpr

type assignment-> type

associated type->netwr

The smartform now understands that x_ekpo-netpr has a reference field netpr. So it will automatically take the properties of netpr from table which also includes its reference to the field ekko-waers. Remove all other declarations for the field x_ekpo-netpr. it will work now..

reward if useful

regards

anoop

Former Member
0 Kudos

Hai

Anoop,

Even now the same error is coming.can u say me what i am missing

thanks

regrads

Swetha Singh

Former Member
0 Kudos

hi swetha,

U r getting the msg that the variable x_ekpo-netpr has already been declared right? check if u have declared it anywhere else..

and in global data tab, in associated type give netpr instead of netwr.

regards

anoop

Former Member
0 Kudos

hi

Anoop

In global tab i have declared x_ekpo like ekpo.

is this causing the error.

regards

Swetha Singh

former_member196280
Active Contributor
0 Kudos

Hi Swetha,

In Smart Form if you want to display quantity and currency fields. We cannot directly display this fields.

For this we have to create extra variable in Global definition.

Ex: wa_NETPR LIKE EKPO-NETPR

Create program lines and sepecify wa_netpr = <internal table field>

Now it will won't give error, it will work

Reward points!!

Regards,

SaiRam

Former Member
0 Kudos

Hi swetha,

if u r passing the internal table x_ekpo through the form interface, u need to define it there only. u dont have to define it in the global definitions.. try removing that and check..

regards

anoop

former_member181995
Active Contributor
0 Kudos

sheta just go thru struture rv61a.

i mean u shud refrence ur perticuler curr field in z structure which u made plz refer that field to rv61a in z structure..

plz reward if it helps..

Answers (5)

Answers (5)

Former Member
0 Kudos

hai

Thank u very much.

regards

Swetha Singh

Former Member
0 Kudos

Also check these threads

Former Member
0 Kudos
arul_murugan
Active Participant
0 Kudos

hai,

i think X_EKPO-NETPR has reference fields check it se11 if netpr has reference field you need to declare in smartforms.

go to global declaration in that go to currency/quantity fields

give field name x_ekpo-netpr and give reference field name( get it from the ekpo table reference field) and give data type ( currency or unit).

and one more thing

reference field is like this format tablename-fieldname.

you need to display this table name in the global data tab like the following format

tablename type tablename

it will work

regards

arul.

Former Member
0 Kudos

Hai,

Arul

Firstly Thanks for the response.

when i give x_ekpo-netpr in global field ,

'Field X_ekpo-netpris already declared' error is comming.

suggest a workaround please.

regards

Swetha Singh

Former Member
0 Kudos

Hi swetha,

if u r using the quantity and the currrency fields u should enter the referencing field in global definitions->currency/quantity fields.

So make the entry in this tab for the reference field.