cancel
Showing results for 
Search instead for 
Did you mean: 

FBL1N Report

Former Member
0 Kudos

Hi Experts,

I want to create a report based on FBL1N transaction. Input will be PO# and output should be Check no, Amount, Clearing doc no, clearing date etc. I tried to link PAYR and BSAK tables based on PAYR-VBLNR = BSAK-AUGBL. I am getting the desired output except PO# in BSAK table. EBELN field is blank in BSAK. I also tried BSEG which is also not capturing PO#. Can any one help me to provide a link between these tables?

Regards,

Sibin

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

For fetching PO details, Table BKPF would be useful.

BKPF - Reference Key (AWKEY) have the MIRO Document no. along with Fiscal Year, Use the same MIRO Document to fetch PO details in RSEG Table.

BKPF - AWKEY (MIRO Doc.) plus BKPF - BUKRS

pass in RSEG Table

RSEG - BELNR plus RSEG - BUKRS

Regards,

Jaymin R. Bhatt

Former Member
0 Kudos

Hi Jaymin,

Tahnks for your reply. I tried to link BKPF-BELNR with RSEG-BELNR, but I couldn't find any values in RSEG table.BKPF-AWKEY is of 20 char and RSEG-BELNR with 10 char. So both are having different values.

Regards,

Sibin

Former Member
0 Kudos

Hi Sibin,

Don't pass BKPF - BELNR in RSEG Table.

Take BKPF - AWKEY field (Ex.: 51056303172012, .i.e 5105630317 - Is the Document No. that needs to be passed in RSEG - BELNR (5105630317).

Last Four digit is the Fiscal Year & 1st 10 digit are the MIRO Doc. no.

Regards,

Jaymin R. Bhatt

Former Member
0 Kudos

Hi Jaymin,

I tried to link in following way:

PAYR-VBLNR = BSEG-BELNR

BSEF-AUGBL = BKPF-BELNR

BKPF-AWKEY = RSEG-BELNR

Eventhough I am not getting any PO values.

Regards,

Sibin

Former Member
0 Kudos

Hi,

Its a wrong link that is been established.

PAYR-VBLNR is your Payment document. Passing PAYR - VBLNR in BSEG - BELNR would not give you the corresponding Invoice Document. You need to pass the Payment Document as Clearing Document in BSEG to get corresponding invoice documents (BELNR) cleared against it.

And then fetch those BSEG - BELNR into BKPF-BELNR to get AWKEY

Payment documents would clear the Invoices, hence in BSEG table to get Invoice Documents we need to pass the Payment Document as Clearing Document (AUGBL) and not as BELNR.

Instead of BSEG, the same thing can be done with BSAK table, passing the Payment doc. (VBLNR) in BSAK-AUGBL.

Regards,

Jaymin R. Bhatt

Former Member
0 Kudos

Hi Jaymin,

Is there a direct link between check number and PO#? In FBL1N, single check no is assigned to different PO's and with different document no. Is there any other table to capture check no other than PAYR?

Regards,

Sibin

Former Member
0 Kudos

Hi Jaymin,

Can I link PAYR table with BSEG? The clearing document nos present in both these tables are different.

Regards,

Sibin

Former Member
0 Kudos

Hi Sibin,

The Report that you are talking about is PO 2 Pay Cycle. I would suggest you to go from Material Tables .i.e PO as an input parameters.

Input Parameter:

PO No.: EKBE - EBELN

PO Line Item: EKBE - EBELP

Table - EKBE - PO History Table

Also take the condition EKBE - BEWTP = Q (Inv Booking)

Collect

Document No. (BELNR) from EKBE table.

Pass the above BELNR into

Table BKPF - AWKEY by adding Fiscal Year to it.

In BKPF table you would get the BELNR (i.e. FI Document).

Collect all the FI Documents pass it to BSEG table in

BKPF - BELNR = BSEG - BELNR

Fetch the AUGBL from BSEG table.

Pass that AUGBL in PAYR table for cheque no.

Try this hope it could solve your query.

Regards,

Jaymin R. Bhatt

Former Member
0 Kudos

Hi Jaymin,

Thanks a lot for your reply. When I am linking BSEG-AUGBL with PAYR-VBLNR, I am getting different check no. The clearing document number present in FBL1N is different from that present in MSEG and PAYR. EBELN is blank for this matching VBLNR in BSEG table and it is linked to a Vendor. So I am not getting PO link from BSEG and PAYR. Is it due to any configuration issue?

Regards,

Sibin

Former Member
0 Kudos

Hi,

It is not due to any configuration issue. Ideally PO No. is not stored while MIRO document is generated in Vendor Line Item. Link between MM & FI breaks at time of generation of MIRO Invoice Booking as both the documents (MM & FI) gets generated.

Plus in Finance Module we make a single payment against multiple invoices booked having different PO No. Hence fetching those scenario seems complicated.

A way around which can work is:

Write a Substitution GGB1, for T. Code (SYST-TCODE) "MIRO", Substitute the ZUONR field by BSEG-EBELN.

It would populate the PO No. in Assignment Field which in turn can be reflected in Vendor Line Item for furhter analysis.

In my earlier reply, MSEG would have the material document plus MSEG would no where have the PAYR table document.

In EKBE you would get the MM Invoice document from which from BKPF we could fetch FI Document No., further passing the same into BSEG - BELNR would give you the corresponding Clearing Document of that Invoice. Which could be the Payment Document in PAYR table.

Regards,

Jaymin R. Bhatt

Answers (1)

Answers (1)

Marssel700
Active Contributor
0 Kudos

Hi Sibin,

You can't do it. The Note is very clear:

Note 152335 - Field EBELN in line layout variant for cust./vendor

To get you purchase order you must create an quivalence between MM invoice number and FI invoice number. As Jaymin said the field BKPF-AWKEY is your link.

There are entries for check in tables REGUP and REGUH

regards

Former Member
0 Kudos

Hi Experts,

I checked the links and found that EBELN in BSEG is not getting properly updated. I can find PO# in FBL1N, but this field is not getting updated in BSEG table. In DEV client it is working fine but in PRD, the values are not getting reflected. Can any one suggest the reason?

Regards,

Sibin

Marssel700
Active Contributor
0 Kudos

It´s not possible. You can have this scenário only if you had been entered manually in Financial Document Entry. Check SAP Note in mu previous comment.