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: 

Coding in SQ02 for compare the BKPF and RSEG Tables

Former Member
0 Kudos

Hi Expects ,

I am going to develop report for getting Accounting document from RSEG Table with comparison of BKPF  ,

But in RSEG  Reference filed contain docno+year  and BKPF Contain onyy Docno , how can i compare and where can i write the code please.

Regards,

Suman Baina

12 REPLIES 12

jaheer_hussain
Active Contributor
0 Kudos

Hi Suman,

Both table have field Accounting document number,you use this field for your comparions.

field name:BELNR and other common field GJAHR for both table.

With regards,

0 Kudos

Dear Sir,

As per my observations RSEG Contain Only MIRO Document Numbers not MIRO Accounting Document number .

I need accounting Documents number against the MIRO Document Please.

Regards,

Suman

former_member201529
Active Contributor
0 Kudos

Dear Suman,

Kindly try the same with reference field(XBLNR) instead of reference key (AWKEY).

Else you need to use BSEG table along with field SGTXT for finding GR number.

Regards,

Karna J

0 Kudos

Dear Sir,

As per observations BSEG contain only accounting document,but there is no MIRO Document number for getting right values.

Please advise any other solutions.

Regards,

Suman

0 Kudos

Dear Suman,

Did you try with reference field (XBLNR)....

Regards,

Karna J

0 Kudos

Dear Sir,

Yes Sir ,But this field is not updated with GR number for Delivery costs.

Regards,

Suman

0 Kudos

Dear Suman,

You can come to know the GR number, IR Number and PO number from RSEG table and pass GR no to BSEG-SGTXT for finding accounting document (BELNR) of IR.

Regards,

Karna J

0 Kudos

Dear Sir,

Just now i have tested , there is no values in  BSEG-SGTXT  , as per my objervation .


we should get the date from BKPF and RSEG  table only with some small code like



AWKEY-GJAHR = BELNR



Please advise how to write this code and where to write in SQ02.

Regards,

Suman

0 Kudos

Dear Suman,

Then you have to append the field to store IR document and FI document in RSEG OR BKPF,

from there you can take it.

Regards,

Karna J

0 Kudos

Dear  Karna ,

Thank you , but i don't know how to do this , please guide me .

I am a functional please.

Regards,

Suman

0 Kudos

Suman,

The code needs to be added in 'Extras' -> Code in SQ02. However, in this case it will involve some amount of text parsing etc. You will better served if you post your query in the ABAP development forum.

0 Kudos

Dear Sir,

Thank you very much .

Regards,

Suman