cancel
Showing results for 
Search instead for 
Did you mean: 

error in looping in smartform

Former Member
0 Kudos

hai all

iam new to smartforms iam trying a simple scenario

where iam getting data from kna1 based on customer

<b>in form interface</b>

i declared as

itab like kna1

<b>in global definitions</b>

wa_kna1 like kna1

<b>in table section</b>

when i gave

itab into wa_kna1

the error is

itab is neither defined under tables nor defined as an internal table

can any one help me how to solve and creat a form

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi Pavan,

Check the following Code

SELECT SINGLE A~ADRNR

B~NAME1

B~CITY1

B~POST_CODE1

B~STREET

B~COUNTRY

  • B~P_O_BOX

INTO CORRESPONDING FIELDS OF ADRC

FROM KNA1 AS A

INNER JOIN ADRC AS B

ON

BADDRNUMBER = AADRNR

WHERE

A~KUNNR = X_VBRK-KUNAG.

here ADRC is used in Input parameters side.

Here ADRC is define in Global Definitions Section Like this way

ADRC LIKE ADRC

and the above selected fields are used in some window

&ADRC-name1&

&ADRC-city1&

&ADRC-post_code1&

&ADRC-street&

here ADRC and V_LANDX is used in Input parameters side.

where as ouput parameters side use V_LANDX only

  • Getting Country Description.

SELECT SINGLE LANDX INTO V_LANDX

FROM T005T

WHERE LAND1 = ADRC-COUNTRY AND

SPRAS = SY-LANGU.

&v_landx&

Regards

Sreeni

Former Member
0 Kudos

Hi Pavan

If u need to declare a table in the smartform and use, u need to declare it in the types as a type .. then declare it as an internal table... and use...

The form interface is the one which passes values from the print program to report..

U should not declre in the form...

Just think like ( function module and a report ) is ( smartform and print program).....

Hope its clear..

Award if useful..

Thanks

Rajiv

Former Member
0 Kudos
Former Member
0 Kudos

in form interface

<b> in form interface IN TABLE TAB</b>

i declared as

itab type kna1

Message was edited by:

Naresh Reddy

Former Member
0 Kudos

in interface.

use itab type kna1.

in global definition use.

wa_kna1 type kna1.

former_member188827
Active Contributor
0 Kudos

hi

first create a structre in dictionary containing dose fields of kna1 dat r required.

den declare internal table in frm interface under tables tab giving da type of ur structure.

Former Member
0 Kudos

Hi

U need to create the ITAB in the TABLE section of the interface

Max