cancel
Showing results for 
Search instead for 
Did you mean: 

unknown value in main window

former_member636068
Participant
0 Kudos

Hello Experts,

I am facing an problem in smartforms.i have defined the floowing in types tab of global definitions.

TYPES: BEGIN OF TY_LIKP,

VBELN LIKE LIKP-VBELN,

KUNNR LIKE LIKP-KUNNR,

WERKS LIKE LIKP-WERKS,

LFDAT LIKE LIKP-LFDAT,

END OF TY_LIKP.

and in the global data tab

it_likp type table of ty_likp

wa_likp type ty_likp.

in the initializaion tab....

SELECT * FROM LIKP INTO CORRESPONDING FIELDS OF TABLE IT_LIKP.

and in the main window i have created a loop in which it_likp into wa_likp.

then in that a text which contains &wa_likpn-vbeln& &wa_likp-kunnr&.

but in the print preview i am getting the only value is '180000103' & not anything from kunnr. can anybdy tell me where does this valu come from?

and i have one more doubt.

if in the initialization tab i write loop at it_likp into wa_likp.endloop.

will dis happen like for each iteration it will go to main window and print the value n come back back for the next iteration n then go to main window....and so on till the last value in it_likp.?

or it will just fish looping first in the initialization tab and then will go to main window for &wa_likp&.....and print only the last value in &wa_likp&.

plz help.

thnks n regards,

Ashmita

Accepted Solutions (1)

Accepted Solutions (1)

former_member156446
Active Contributor
0 Kudos

>

> in the initializaion tab....

> SELECT * FROM LIKP INTO CORRESPONDING FIELDS OF TABLE IT_LIKP.

> and in the main window i have created a loop in which it_likp into wa_likp.

> then in that a text which contains &wa_likpn-vbeln& &wa_likp-kunnr&.

> but in the print preview i am getting the only value is '180000103' & not anything from kunnr. can anybdy tell me where does this valu come from?

>>it will come from LIKP table as per your select, if there is not kunnr then u cannot get it..

> and i have one more doubt.

> if in the initialization tab i write loop at it_likp into wa_likp.endloop.

> will dis happen like for each iteration it will go to main window and print the value n come back back for the next iteration n then go to main window....and so on till the last value in it_likp.?

>>no as soon as the loop is hit what ever values are in it_likp only that will be displayed. Initialization is hit only once per execution of the form.

>

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Asmitha,

Upto data fetching part you are doing correct(means select statement ).do below steps and check it

1. In the intialization just do the data fetching into internal table it_likp. Don't do loop in initialization.

2. In the main window ,create one loop and in that loop create text element

3.first select main window and right click it there select the loop.similarly select loop(create->flowlogic->loop) and right click on

it ,then select text element.

4.For the loop you will find 5 tabs.In that select 'DATA' tab. and mention the internal table and work area as below

it_likp INTO wa_likp.

5. Beside the 'Form painter ' button you will find one button'Field list on' in application tool bar.Just click it

6.There you will find global data(wa_likp) and drag the required field into text element which is under loop.

Please close the thread once it is solved.

Thanks,

Suma.

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

Ashmita,

You have selected the data . Its well and good.

For displaying, you need to create a table and the table line in the MAIN Window and tick on the Loop and provide your table

like for eg: IT_LIKP into wa_likp

Omit the Header if you do not need any titles for the display.

In the main area, select the table line(specify how many columns u need) and create the that many texts and there one

can display the values as &wa_likp-vbeln& &wa_likp-kunnr& etc...

Hope this helps.

Regards,

Vinay