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

Link between tables

Former Member
0 Likes
1,074

What is the link between the tables BSEG and TCJ_POSITIONS/ TCJ_DOCUMENTS?

1 ACCEPTED SOLUTION
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
915

Hello,

You can use the following params:

BSEG-BUKRS = TCJ_POSITIONS-COMP_CODE

BSEG-GJAHR = TCJ_POSITIONS-FISC_YEAR

BSEG-BELNR = TCJ_POSITIONS-POSTING_NUMBER

BSEG-BUZEI = TCJ_POSITIONS-POSITION_NUMBER

I think this will help.

BR,

Suhas

What is the link between the tables BSEG and TCJ_POSITIONS/ TCJ_DOCUMENTS?

5 REPLIES 5
Read only

Former Member
0 Likes
915

You are not getting BELNR and BUZEI as common ?

Read only

Former Member
0 Likes
915

BSEG-BELNR = TCJ_POSITIONS-POSTING_NUMBER

BSEG-BUKRS = TCJ_POSITIONS-COMP_CODE

TCJ_DOCUMENTS-POSTING_NUMBER = TCJ_POSITIONS-POSTING_NUMBER

TCJ_DOCUMENTS -COMP_CODE =TCJ_POSITIONS-COMP_CODE

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
916

Hello,

You can use the following params:

BSEG-BUKRS = TCJ_POSITIONS-COMP_CODE

BSEG-GJAHR = TCJ_POSITIONS-FISC_YEAR

BSEG-BELNR = TCJ_POSITIONS-POSTING_NUMBER

BSEG-BUZEI = TCJ_POSITIONS-POSITION_NUMBER

I think this will help.

BR,

Suhas

Read only

Former Member
0 Likes
915

PARAMETERS: p_bukrs type bkpf-bukrs,

             p_gjahr type bkpf-gjahr,

             p_belnr type bkpf-belnr.

data: p_num type tcj_documents-posting_number,

       CJ_NUM type      tcj_documents-CAJO_NUMBER.

data: v_name type tcj_documents-bp_name.

data: v_awkey type bkpf-awkey.

select single awkey into v_awkey from bkpf where belnr = p_belnr and bukrs = P_bukrs and gjahr = p_gjahr.

  p_num = v_awkey+0(10).

  cj_num = v_awkey+10(4).

  select single BP_NAME into v_name from tcj_documents where COMP_CODE = p_bukrs and CAJO_NUMBER = cj_num and

                                                              FISC_YEAR = p_gjahr and POSTING_NUMBER = p_num.

    write: v_name.

Read only

Former Member
0 Likes
915

PARAMETERS: p_bukrs type bkpf-bukrs,

             p_gjahr type bkpf-gjahr,

             p_belnr type bkpf-belnr.

data: p_num type tcj_documents-posting_number,

       CJ_NUM type      tcj_documents-CAJO_NUMBER.

data: v_name type tcj_documents-bp_name.

data: v_awkey type bkpf-awkey.

select single awkey into v_awkey from bkpf where belnr = p_belnr and bukrs = P_bukrs and gjahr = p_gjahr.

  p_num = v_awkey+0(10).

  cj_num = v_awkey+10(4).

  select single BP_NAME into v_name from tcj_documents where COMP_CODE = p_bukrs and CAJO_NUMBER = cj_num and

                                                              FISC_YEAR = p_gjahr and POSTING_NUMBER = p_num.

    write: v_name.