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

regarding table relationships

Former Member
0 Likes
1,432

Hi All,

I am having all the data from MHND and MHNK , i want certain details from VBRK,

how to relate MHND and VBRK.

Points will be rewarded for helpful answers.

Thanks.

Ramya

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,153

If you start from Billing docs, you can link the Billng Doc with the A/C doc - IN BKPF if you pass the AWTYP = 'VBRK' and AWREF = Billing Doc # , it will give you the related ACCOUNTING doc number. ( When you click on the Accountting Doc button - this is how it fetches the Doc numer).

I guess this is the document number - stored in MHND-BELNR, MHND-GJAHR, MHND-BBUKRS for dunning.

Hi All,

I am having all the data from MHND and MHNK , i want certain details from VBRK,

how to relate MHND and VBRK.

Points will be rewarded for helpful answers.

Thanks.

Ramya

6 REPLIES 6
Read only

Former Member
0 Likes
1,153

Hi,

Use MHND-LAUFD- VBRK-FKDAT

MHDN-BUKRS = VBRk-BUKRS

MHND-KUNNR = VBRK- KUNAG

MHND-SMABER = VBRAK-MABER

regards

Shiva

Read only

0 Likes
1,153

belnr is the key in VBRK...

Read only

Former Member
0 Likes
1,153

If we want to link two tables using a join condition in a Select Query.

Easy to findout the link between N no. of tables for writing a where

condition in Select Query

1. Go to SQVI transaction code and Create a Quick view.

2. U will get a pop up. Give the Title and select Table Join

option in Data Source & Enter.

3. Click Insert table option and enter the Table name which we want

to join & Enter.

4. Again Select the Insert table option and enter the Table name

which u want to join with & Enter.

5. Now we can see the joining conditions between two tables.

VBRK MHND

FKDAT LAUFD

BUKRS BUKRS

KUNRG KUNNR

KUNAG SKNRZE

MABER SMABER

BELNR BELNR

GJAHR GJAHR

Reward if useful..........

Read only

Former Member
0 Likes
1,154

If you start from Billing docs, you can link the Billng Doc with the A/C doc - IN BKPF if you pass the AWTYP = 'VBRK' and AWREF = Billing Doc # , it will give you the related ACCOUNTING doc number. ( When you click on the Accountting Doc button - this is how it fetches the Doc numer).

I guess this is the document number - stored in MHND-BELNR, MHND-GJAHR, MHND-BBUKRS for dunning.

Read only

vijy_mukunthan
Active Contributor
0 Likes
1,153

hi gurus.

i have to bring the datas from a flatfile to SAP. i have written a code but am getting an error in phone in split statement. There are many phone number in the flatfile in unformatted form. some as mobile no,landline no, some with off: no and res: no how to split all the words and only the phone no i want. This is the sample data

07453/234802,231843,232277

08377/264265,R.254276

2417121/2417151/2417191

08377/551265,R.554276

Off:71 Resi:107

02465/22263,22210,Nanded

Off:20 Resi:38 & 267

(220)-6785,7321,7325,R:1707

244080, R.244172

445019

help me in sloving the problem

_________________________________________________________________

REPORT ZVKFO .

DATA : DSN(50) TYPE C VALUE '/sapmnt/bdc/fone.txt',

ROW(30) TYPE C,

DEL TYPE C VALUE '/',

DEL1 TYPE C VALUE '-',

DEL2 TYPE C VALUE ','.

DATA : BEGIN OF ITAB OCCURS 0,

PHONE(10) TYPE C,

END OF ITAB.

OPEN DATASET DSN FOR INPUT IN TEXT MODE ENCODING DEFAULT .

READ DATASET DSN INTO ITAB.

DO 100 TIMES.

SPLIT ITAB AT DEL INTO PHONE.

*split itab at del1 into phone.

*split itab at del2 into phone.

ITAB-PHONE = ROW.

ENDDO.

WRITE : ITAB-PHONE.

Read only

0 Likes
1,153

Hi,

the statement u r using is wrong. It should be

DATA: VALUE TYPE STRING.

SPLIT ITAB-PHONE AT DEL INTO ITAB-PHONE VALUE.

Always when u split the itab-phone the string will be split into two. so u need to give two variables after the into statement so the one will have first half of the string and the other will have the second half.

also i didnt get ur point u r splitting ur record to PHONE and assigning ROW to it. Also there is no append statement for the table.

thanks,

Srinath.

Message was edited by:

Srinath Srinivasan

Message was edited by:

Srinath Srinivasan