cancel
Showing results for 
Search instead for 
Did you mean: 

adding fields in smart forms

Former Member
0 Kudos

Hi Experts ,

How can i add fields Discount (komp-kzwi6) and imei number(objk-sernr) in the standandar Invoice smartform(LB_BIL_INVOICE)

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member196280
Active Contributor
0 Kudos

Goto SMARTFORMS tcode and copy the standard form to Z_* you will see copy button, give the original form name and target form name.. now goto the Z_* form and make your changes,.. on the left side you will see the window names.. add the fields accordingly in which window you want to display..

If fields does not exists, add command line and write your code...

Sample example attached below....

sMART fORM

uSING TABLE IN Smart Form

1) Tcode --> SmartForms

2) Form name --> Z_SF_TEST Create

3) Under Global settings

a) Form Interface

Table Tab

ITAB LIKE EKPO

b) GLOBAL Definitions

WA_NETPR LIKE EKPO-NETPR

In smart forms if we want to display quantity and currency fields. We can't directly display currency field and quantity fields

For that we have to create an extra variable in global definitions

Ex: netpr FIELD of EKPO

CREATE program lines and specify WA_NETWR = itab-netpr.

4) RT CLick on main Window

CREATE --> TABLE

Click Table painter

DEFAULT %LTYPE will be Created

a) If you want more like Header footer etc add by rt click on %LTYPE1

Table (Tab)

%LTYPE Radio(SELECT) 5 CM 5 CM 6 CM

CLICK on DATA (Tab)

INTERNAL TABLE ITAB LIKE ITAB

5)RT click on table control and create --> program lines

General attribute (Tab)

INPUT PARAMETER OUTPUT PARAMETER

itab WA_NETPR

Code Area

WA_NETWR = ITAB-NETPR.

6) RT CLcick on table ctl and create 3 text to display the fields

a) % text1 +button(insert field)

FIELD name &itab-ebeln&

Output options (tab)

Check New line LINETYPE %Ltype1

check new cell

b) % text2

& itab-ebelp&

output options

check new cell

c) % text2

& wa_netpr&

output options

check new cell

Report ac

Tables ekpo.

Data: itab1 like ekpo occurs 0 with header line.

select * into table itab1 from ekpo.

Call function module

Regards,

SaiRam

Former Member
0 Kudos

Hi,

Copy this form as zform.

after changes assign this form in printprogram.

Thanks.

Former Member
0 Kudos

thanks for ur reply,

I need the how to make the changes so that i can add the fields

Former Member
0 Kudos

Just copy the smartform in the customer namespace.

Then look for the table from which want to add the fields, add that table in the interface of the form. then give the local name of the fields for the smarform.

Also add the code in the driver program.

Now if you want to add the fields in some existing table in the smartform then you also have to modify the templat of that table.

for this you can see an existing template n table in smartform,

Revert back in case of any clarifications.

Reward points if useful.

THNX