cancel
Showing results for 
Search instead for 
Did you mean: 

Smartform trouble

Former Member
0 Kudos

I have to display two fields from different tables in same text-element.Date of order and delivery date.

How can I display both the fields using loop such that only matching records are stored in the itab

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Musarrat

you can define a strucutre in se11 and can define your internal table of type that zstrucutre or else

you can define types statements in the types tab under the global definitions node this way.

Eg:

TYPES : BEGIN OF TY_MARA

MATNR LIKE MARA-MATNR,

WERKS LIKE MARC-WERKS,

END OF TY_MARA.

Now under the tables Tab in global definitions define your int table it_mara of <b>TYPE REF TO</b> ty_mara

in the initialization tab you can write your select queries to get data in the int table.

hope it is clear

Plz reward points if helpful.

Regards

Zarina

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

It is better to write a select before looping the internal table, it is easy to write a selct based on some fields, also you can use the FOR ALL ENTRIES based on these data, then you will get the perfect data in to a Internal table, then loop that internal table and print the fields

Regards

Sudheer

Former Member
0 Kudos

But then how should I define the table in form interface because the internal table will be having fieds from two different tables

Former Member
0 Kudos

You can define the table type in the global defination--> Types

assign points if it helps.

-Gaurang

Former Member
0 Kudos

Hi,

You can define the combined table wiht both the records' details and declare a TYPE of the same in the GLOBAL DEFINATION-->TYPES. and define the table wiht hte same in TABLES tab of the same.

Loop at the table and display the text and here solves your probelm.

Please close the thread and assign the points if it helps.

-Gaurang