Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Selection from different tables

former_member1360394
Participant
0 Kudos

Hello Everyone,

I have a situation where I have 15 fields in the selection screen.

The selection is dependent on three or more tables.

First I have selected from two tables but if the user enters values in the selection screen then how to make the selection.

Tables dont have common fields between them. LIKP, LIPS, VTTK, VBUK and VEKP are the tables.

Can you guys guide me.

Thank you.

1 ACCEPTED SOLUTION

former_member1360394
Participant
0 Kudos

I have resolved the problem by myself.

Thank you so much guys for the feedback.

15 REPLIES 15

Former Member
0 Kudos

Hi,

if those fields having primary key we can you use inner join or for all entries.

Regards,

Raman

VijayaKrishnaG
Active Contributor
0 Kudos

Hi Vinod,


First I have selected from two tables but if the user enters values in the selection screen then how to make the selection.

Your query is not so clear. When are you fetching the data from two table whether before selection screen input (Initialization event) or after selection screen?

Can you please elaborate your query and better if you post your Selection Screen screen-shot.

Regards,

VIjay

0 Kudos

Hello Vijaykrishna,

I need to link LIKP, LIPS, VTTK, VTTP, VBUK and VEKP table for getting the values based on the selection screen.

I have linked LIKP, LIPS and VBUK using vbeln as the field using Inner Join.

I would like to know how to link VTTK,VTTP and VEKP with LIKP table to get the values.

Thank you for your reply.

Former Member
0 Kudos

Hi Vinod,

LIKP and LIPS are Delivery Header and item table and common field is VBELN.

VTTK is shipment header table and its key field is TKNUM; you will find "Z_TRANSPORTNO" in LIKP.

VBUK: VBELN can link with LIKP.

VEKP: Key field is VENUM, but not able to get link with any of the 4 table; please ask functional fellow for this; how to link this table.

Thanks,

Dharmishta

0 Kudos

Hello Dharmishta,

Thanks for the reply.

But I don't find a field 'Z_TRANSPOTRNO' in LIKP.

Can you please let me know the correct field.

Thank you.

0 Kudos

Also if the user doesn't enter any value in the selection screen for shipment number it should select only from LIKP and shouldn't say "No inputs available".

0 Kudos

Hi,

TERNR[ Order numebr] is in LIKP and VTTK, please check, if you can use this field to join these two tables.

Thanks,

Dharmishta

0 Kudos

Hello Dharmishta,

TERNR cannot be used for linking both table.

former_member1360394
Participant
0 Kudos

Everyone,

Also i'm having a problem when using Inner Joins between LIKP and VTTP.

If 8 records are selected in LIKP and if only two records has shipment then only two records are being selected even though the user has not entered any shipment numbers in the selection-screen.

0 Kudos

Hi,

what are common field for likp and VVTP???

Regards,

raman

0 Kudos

LIKP-VBELN = VTTP-VBELN,

also check the table VTFA-Shipment Document Flow

0 Kudos

Hi,

I hope that this is a good example

   SELECT k~tknum  h~vbeln .........

    FROM vttk AS k
    JOIN vttp AS p
      ON k~tknum = p~tknum
    JOIN likp AS h
      ON h~vbeln = p~vbeln

       ..............

       ..............

former_member1360394
Participant
0 Kudos

I have resolved the problem by myself.

Thank you so much guys for the feedback.

0 Kudos

Hi Vinod,

Please share the solution or procedure how the issue got resolved by yourself. It can help others.

Regards,

Vijay

0 Kudos

Hello Everyone,

Since I had to get entries from different tables.

First I did the inner join on LIKP, LIPS and VBUK.

Then I took each entry and check in other tables.

If the entry doesnt exist in the other table, then I deleted it from the main table.

By this I was able to get the entries based on different tables.