cancel
Showing results for 
Search instead for 
Did you mean: 

smart form - loop endloop problem

milascon_daniel
Participant
0 Kudos

I have created a simple smartform that display the whole content of scarr table.

So, in types tab* i have write:

TYPES: BEGIN OF struct,
       carrid TYPE scarr-carrid,
       carrname TYPE scarr-carrname,
       currcode TYPE scarr-currcode,
       url TYPE scarr-url,
       END OF struct.

global data tab:

it_scarr type table of struct

wa_scarr type struct

initialization tab:

output parameters: it_scarr

SELECT carrid carrname currcode url
FROM scarr
INTO TABLE it_scarr.

in Pages and windows->page1->main window I have created a LOOP1 where in data tab:

it_scarr into wa_scarr

and in LOOP1 i have insert new text node - TEXT1 where i have write:

&wa_scarr-carrid&   &wa_scarr-carrname&   &wa_scarr-currcode& &wa_scarr-url&

And when I execute this new smartforms it display:

&wa_scarr-carrid&   &wa_scarr-carrname&   &wa_scarr-currcode& &wa_scarr-url&
&wa_scarr-carrid&   &wa_scarr-carrname&   &wa_scarr-currcode& &wa_scarr-url&
&wa_scarr-carrid&   &wa_scarr-carrname&   &wa_scarr-currcode& &wa_scarr-url&

What should I do to fix this problem? Please someone help me!!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can't type the variables (e.g. &wa_scarr-carrid&) directly into the editor. Click first on 'Insert field' icon and enter the variable into the pop-up (including the &).

Regards,

Nick

Answers (2)

Answers (2)

Former Member
0 Kudos

HI,

Just make sure that you have inserted the field wa_scarr-carrid using INSERT FIELD button in the Text.

to do this : Click on INSERT FIELD button.

Type &wa_scarr-carrid& then press ok.

this will insert the field into text element.

Reward points if found helpful

Former Member
0 Kudos

Hi!

Try using TABLE instead of LOOP in your smartform.

And don't forget to enter your table into the global definitions part.

You can check out any existing smartforms for ideas.

Regards

Tamá