cancel
Showing results for 
Search instead for 
Did you mean: 

filtering in Smartform

Former Member
0 Kudos

Basically my program start from ALV, let say I select 3 material and press submit, 3 material barcode will be generated in smartform.

Material selected will be stored in 1 internal table to be pass to smartform.

But now I have problem passing this internal table into smartform.

I have this internal table called IT_MATERIAL contains only 1 column (matnr).

In smartform form interface->table I put it as T_Material like ZBCODEMATERIAL (structure I created in SE11 contain only 1 column)

In Global Definition->Initialization, I put this

select EBELN TXZ01 MATNR MENGE
  from EKPO
  into table I_BCODE
  WHERE MATNR eq  T_MATERIAL-matnr.

Where the Input parameters is T_material and output parameter is I_bcode

The problem is, when I run the smartform (from the print program) only 1 material show up, where it should be according to my selection in ALV program.

Thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

To filter the output in smartform and to display all the filterd values,

Please try the following:

In the Main Window or the window which you are created, you get your fields under that window node.

Right click on that field or column -> Create -> Flow Logic -> Loop.

In that you have 4 tabs . Go to Data Tab.Loop your Internal table.

Then o to Conditions Tab Specify Your Condition . For e.g. MATNR EQ WA_MATERIAL-MATNR.

Else Right click on that field or column -> Create -> Flow Logic -> Program lines . There you can write your code.

Hope this will help you.

Regards,

Renuka S.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Thanks for the answer, i already try both, but it still not working.. so i just do it differently.

I do all the logic/filtering in print program and then pass the data to the smartform.

But now i'm having problem passing the data to the smartform

I create an internal table in my print program IT_Material with structure i created in SE11 called ZS_BCODE

and inserted all the data there..

so i pass it to my smartform from printprogram

now in the Form Interface, i declare the table IT_Material LIKE ZS_BCODE

In the Global Definition, I declare new structure FS_MATERIAL TYPE ZS_BCODE.

and in the table, i loop IT_MATERIAL into FS_Material. (actually i create a table for this. .so i loop it in the table.) not in the flow logic loop..

so where did i do wrong?

Former Member
0 Kudos

Hi

In the initialization change your select query to

select EBELN TXZ01 MATNR MENGE

from EKPO

into table I_BCODE

FOR ALL ENTRIES IN T_MATERIAL

WHERE MATNR eq T_MATERIAL-matnr.

Currently the barcode is selected only for the material you last inserted in the IT_MATERIAL.

Then proceed with FLOW LOGIC->LOOP on I_BCODE.

Br,

Nikhil Patil