cancel
Showing results for 
Search instead for 
Did you mean: 

using join query in Smart forms

Former Member
0 Kudos

Hi to all,

I used 2 different tables in driver program and in select query i joined two tables using inner join.

Now 2 tables values contain in an single internal table...

now how will u call these table values in smartform???

Preferbaly in Global interface and internal inteface how will u declare the table??

Eg: it_mara Like Mara

ie. i joined two table in internal table.

how will u declare the orginal table there???

+ it_xxxx like ????+

Regards,

Thanesh.

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member196280
Active Contributor
0 Kudos

Easier way to acheive this is to create program lines in your smartform and write the query in your program lines.

Sample: SELECT avbeln awadat_ist avkorg bmatnr

INTO CORRESPONDING FIELDS OF TABLE t_data

FROM likp AS a INNER JOIN lips AS b

ON avbeln = bvbeln

WHERE a~wadat_ist IN s_budat

AND a~vbeln IN s_vbeln

AND b~matnr IN s_matnr.

Regards,

SaiRam

Former Member
0 Kudos

Hi,

If you define the structure of your internal table in SE11 it can be used in both your driver program and the smartform interface. Otherwise you will have to declare it locally in both your driver and the smartform global data (Types tab), which is fine once, but as soon as it changes you need to change both places else the form will short dump.

Regards,

Nick

Former Member
0 Kudos

Hi Thanesh,

Either you will have to a physical structure like the internal table in which you are joining two tables or

u can define a table type in global definitions Types

and then you can define the table as

T_MARA like mara if mara is defined in se11

or T_mara type standard table of t_type_mara if its defined in types.

Reward points if useful.

Cheers,

Deepthee Kasal