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: 

Joining the Tables VBAK and CDHDR

Former Member
0 Kudos

Hi All,

I am a novice to SAP, and probably have the most basic question. I need to join the two tables VBAK and CDHDR and I dont see any common fields between them.

I would need to do this for as generating a custom report that lists all the valid contracts created or changed within the period of selection. I also need to show the old value and the new value, the user ID of who made the change/creation and the date of the change.

Anyhelp in this regard is highly appreciated and will be rewarded appropriately.

Many thanks in anticipation.

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor
0 Kudos

CDHDR is used for each and every table of SAP, so don't look for common key with your table.

Look for records in CDHDR with OBJECTCLAS = 'VERKBELEG' and OBJECTID = VBAK-VBELN, and then in CDPOS with keys of CDHDR and tabname = 'VBAK' and tabkey = VBAK-VBELN. (You also get VBAP and other tables under the same Id)

Take a look at report RVSCD100

Regards

4 REPLIES 4

raymond_giuseppi
Active Contributor
0 Kudos

CDHDR is used for each and every table of SAP, so don't look for common key with your table.

Look for records in CDHDR with OBJECTCLAS = 'VERKBELEG' and OBJECTID = VBAK-VBELN, and then in CDPOS with keys of CDHDR and tabname = 'VBAK' and tabkey = VBAK-VBELN. (You also get VBAP and other tables under the same Id)

Take a look at report RVSCD100

Regards

Former Member
0 Kudos

Hi,

CDHDR and VBAK does not have common field between these two. In CDHDR table field name called objectid, this is actually a combination of client+comapny code + document number+ year of VBAK. You need to cancatenate these into one variable and check in CDHDR table.

Thanks,

Sriram Ponna.

0 Kudos

Many thanks Sreeram and Giuseppi

0 Kudos

Hi Sap Novice

My requirements are same as your, I would be thankful if you post your report program for reference

regards