cancel
Showing results for 
Search instead for 
Did you mean: 

smartforms

Former Member
0 Kudos

hi

i have a problem with the smartforsm which has to pull the data from the kna1 how to pull the data from it can anyone explain me as to how to do it and your help is much appriciated.

i have 5 fields like kunnr, name1 ort01, land1, pstlz.

please help ,me out

regards,

jacob.

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

thanks

Former Member
0 Kudos

Hi Jacob,

There are 2 ways to retrive the data.

1. when you create a smartform it generate a function module, in smartforms in global setings -> form interface you can declaree a varable the kna1-kunnr.

as you use these FM in the print program just pass the single value on kunnr to these FM.

in smartforms in programming code lines write the abap code to get the data from kna1.

you can declare all the global data in global declarations in smartforms

2. in second case write the code line to retrive the data in the print program and pass that table to the smartforms FM .

before that u should define these table in the form interface in global settings.

these are the basics of smartforms, just read about smartforms from the below link

http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRSF/BCSRVSCRSF.pdf

regards

kumar m

Former Member
0 Kudos

Hi,

you can fetch the data from KNA1 based on some primary key. lets consider that KUNNR is the primary key here. Then you can write a query in your print program as follows:

SELECT kunnr

name1

ort01

land1

pstlz

INTO corresponding fields of TABLE itab_kna1

FROM kna1

WHERE kunnr = ???.

You can put here the parameter filed name or any other field name having the value of KUNNR. Itab_kna1 here is the internal table used to store the data from KNA1. Then to read the internal table do a loop at itab_kna1.

Then in smartform you can you can retrieve the data and get it populated in any window/table.

Former Member
0 Kudos

Hi ,

In global definitons -->

global data declare the variable name and associated type.

Types declare the field string.

initialization --> write the select query for 5 fields.

In page--> create table --> create the cells for the fields.

Create the text nodes for the cells in header area and drag and drop the fields in the main area in the respective text nodes.

Regards,

Sravanthi

Former Member
0 Kudos
Former Member
0 Kudos

Hi,

You can directly fetch d data thru kna1 table in smartform itself... for that u hav to just do rt click on win then create flow logic - program lines.

Here u can write select query..

Otherwise fetch data form kna1 table into internal table (in report) and pass it to smartform FM

Former Member
0 Kudos

Hi,

Looks you need Basic Training on SMARTFORMS........SDN is not the right place for the same.......