Application Development and Automation 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: 
Read only

table link

Former Member
0 Likes
1,437

Hi all.

I am working with delivery note sap script. I need to fetch “term of delivery “ from TINC-BEZEI (based on LIKP-VBELN),so how can make link between those table?

Pls help me.

Reward for all helpful answers.

Regards.

jay

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,217

LIKP-INCO1 = TINC-INCO1 Check below query for better understanding:

SELECT a~vbeln a~inco1 b~beizei
  INTO TABLE i_inco
  FROM likp AS a
  INNER JOIN tinc AS b
  ON a~inco1 = b~inco1
  WHERE a~vbeln = p_vbeln
  AND   b~spras = sy-langu.

9 REPLIES 9
Read only

Former Member
0 Likes
1,218

LIKP-INCO1 = TINC-INCO1 Check below query for better understanding:

SELECT a~vbeln a~inco1 b~beizei
  INTO TABLE i_inco
  FROM likp AS a
  INNER JOIN tinc AS b
  ON a~inco1 = b~inco1
  WHERE a~vbeln = p_vbeln
  AND   b~spras = sy-langu.

Read only

0 Likes
1,217

Hi Eswar.

Thanks for your reply, I need to fetch field BEZEI,its not available in the table TINC,but am getting field BEZEI while seeing the content of table TINC .

How s happening?

How can I fetch BEZEI from TINC?

Is it possible? If No which table I need to refer?

What is relation between field BEZEI and table TINC?

Please help me to resolve this problem.

Regards,

Jay

Read only

0 Likes
1,217

You can see table TINC has a text table i.e TINCT, so change the above query and replace table TINC with TINCT. Rest remains the same.

SELECT a~vbeln a~inco1 b~beizei
  INTO TABLE i_inco
  FROM likp AS a
  INNER JOIN tinct AS b
  ON a~inco1 = b~inco1
  WHERE a~vbeln = p_vbeln
  AND   b~spras = sy-langu.

Read only

0 Likes
1,217

hI,

The Field BEZEI Is maintained in the text table TINCT(Click on GOTO-->Text table Here u will find the field).

use of the text table:let say you have A table where Material and material description are present in english and your user asked you to display in french,

so all the material descriptions are stored in different languages in the text table of that table.

Regards

Kiran Sure

Read only

0 Likes
1,217

Hi Eswar.

thanks for reply ,stilll i have doubt,as per ur select quary what is p_vbeln? (how ur giving link between LIKP and TINCT? pls explain)

how this field getting value?

pls reply me.

to be reward u if u slove my issue.

Regards.

jay

Read only

0 Likes
1,217

Hi Machi.

Help me da ,stilll i have doubt,as per ur reply ,how ur giving link between LIKP and TINCT? pls explain

pls reply me.

Regards.

Nagarajan jayaraman .

Read only

0 Likes
1,217

Your query is to find the link between LIKP and TINC-BEZEI. So the query i gave you is to establish the link in finding the text of Delivery Incoterms. P_VBELN is the delivery number. I have taken that as PARAMETER from selection-screen. Depending on your criteria you can alter the source of delivery number.

Read only

Former Member
0 Likes
1,217

Hi,

Relatioship between those two tables is likp-inco1 = tinc-inco1

these relationship you can write in program.

*reward points

Read only

Former Member
0 Likes
1,217

Hi,

Link both the table with INCO1 field...this is common in both...

Select BEZEI from TINC into table t_tinc

FOR ALL ENTRIES IN t_likp

where INCO1 = t_likp-INCO1

and ur other where condition....

Reward points if helpful...