cancel
Showing results for 
Search instead for 
Did you mean: 

smartform query

Former Member
0 Kudos

Hi,

I have a smartform,which fetches value from Z table.I have to pick all the data corresponding to one field-eg if I have a single ebeln value,then all the data from z table corresponding to that particular value needs to be displayed,even if it has not been selected in my ALV(from where on selection of rows the smartform is displayed).

Please let me know,I am not able to implement this part.

thanks

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Sneha ,

create a structure (ex) yym_lineitems in se11 with the fields you want to export to smartforms.

In driver program create one internal table of type yym_lineitems

Popullate the data in the internal table based on the field (Ex) ebeln .

Go to smartforms in Form Interface create a internal table like yym_lineitems .

Arrange the new data to be displayed as per the requirement .

again go back to print program and delete the call to smartform function module .

Again apply the call to smartform FM using pattern .

Now the new internal table will be display in table parameters .

supply the name of internal table filled in the driver program to the new variable displayed in table parameters .

Regards

Former Member
0 Kudos

this is my query in program line .

SELECT * FROM ZPURCHASEORDER INTO TABLE ITAB WHERE PONO EQ ITAB1-PONO.

(itab1 is from my program code i have selected a single pono using paremeters )

here pono is the place where u have to replace ebeln.

in input parameter's u have to give itab1 (ie ur internal table in the program)

in output parameter u have to give itab (that is the internal table that u are using inside the program line)

i think it will help try alll thge best and tell the result

Former Member
0 Kudos

Hi

You can the EBELN to the smartform and fetch the value to be displayed inside the smartforms and then display the same.

write select statement inside the smartforms based on condition EBELN

Regards

Shiva

Former Member
0 Kudos

Thanks,I am still looking for a good solution.

Former Member
0 Kudos

HI,

Are you able to pass the ebeln to the smartform? Then one option, in the form interface node of the smartform, under Import tab define ws_ztable like ztable.

In the program, declare ws_str like ztable.

Use a select query to fill this ws_str based on the ebeln. Pass this strcuture to the smartforms FM and print it.

Or insert code lines in you smartforms, here write a select query. In the input parameters, give EBELN, in the output parameters enter ws_ztable.

select * from ztable into ws_ztable where ebeln = ebeln.

Now the structure ws_ztable will have all the entries for you to display.

Regards

Subramanian