Application Development and Automation 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: 
Read only

Form Interface in Smartforms ?

Former Member
0 Likes
898

In my smartform Driver program , I created an internal table that includes VBAP structure and an extra field called "total". I populated the table and pass it via the Form FM to the smartform .

On the Smartform side :

In se11 i created a structure type ztest: that has vbap include and same field "total".

In the Form Interface , I declared my recieving table it_vbap to be of type ztest .

Now , i loop at this internal table into a local structure ( that also of type ztest ) on the table and print the value : &gs_vbap-total&.

I activate the form ...it is fine ...as well as program !!

Now , when i do the print preview of the form , It gives an error :

<b>

Reference field GS_VBAP-TOTAL unknown in form.</b>

Can anyone help on this one ?

7 REPLIES 7
Read only

Former Member
0 Likes
772

You declared GS_VBAP in the Global definitions of the smartform, correct?

Read only

0 Likes
772

Hi Matt,

yeah , GS_VBAP is in the global declarations of the form.

Thnx

Read only

Former Member
0 Likes
772

Hi,

Make sure you have declared your structure in the "Global definition section"..

Is the field TOTAL a currency field..I think it is looking for a currency reference field..

When you created the structure with the vbap and TOTAL..if the total is a currency field..which reference field did you give for TOTAL??

THanks,

Naren

Read only

0 Likes
772

Hi ,

Its a quantity total , so i reffered to the vbep BMENG the type definition ( se11 ).

Now , during activation i get this error :

ZTEST2-QTOTAL (combination reference table/field VBEP-BMENG does not exist)

Message was edited by: SAP BEE

Read only

Former Member
0 Likes
772

Hi,

Are you printing the GS_VBAP-MEINS field??

Thanks,

Naren

Read only

0 Likes
772

No , I am printing the GS_VBAP-TOTAL field , which is defined to be of type : Quant 13 3 in the Type Structure ZTEST2(se11) !! after defining it , when i am trying to set the reference for it to say vbep-bmeng field ..I get this error :

ZTEST2-QTOTAL (combination reference table/field VBEP-BMENG does not exist)

Read only

Former Member
0 Likes
772

Hi,

Try this..

Create a variable GV_TOTAL_QTY of type char16.

Use the program lines to write this code..

WRITE gs_vbap-total UNIT gs_vbap-meins TO

gv_total_qty.

Hope this works..

Thanks,

Naren