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: 

Report as per FBL1N - Vendor line Items

Former Member
0 Kudos

Hi Experts,

I have a requirement to generate a report as per FBL1N, the current process is as follows. User enters shipments in dynamic selection > document > Reference > right side Reference. '*' is kept before and after the shipments. Other selections are company code and All items radio button and Execute.

My question is , What are the tables this looks at ? I am assuming BSIK, BSAK and BSEG. How to know which tables it looks at ? I think this may be functional question. If you have any questions please let me know.

Thank you,

Surya

10 REPLIES 10

Former Member
0 Kudos

Dear surya,

1. just go to the screen and -


> click f1 -


> then technical details

-


> click on dataelement -


> double click on data element

-


> then check menu bar -


> utilities -


> where used list

you will find some tables ... so these are the main tables

2. or other wise go to st05 ,

activate trace

do the transaction

and deactive trace

and check the details in that u can view tables from that you have to see in which table it is updating..

Former Member
0 Kudos

Hi,

you are assuming well. The tables are correct.

But instead of doing the code with table selection, wy don't you use BAPI

BAPI_AP_ACC_GETOPENITEMS and

BAPI_AP_ACC_GETBALANCEDITEMS to retrieve the information?

This way, i don't need to be worry if there's any missing information in a table.

Best Regards,

krishnendu_laha
Active Contributor
0 Kudos

Hi Surya,

for FBL1n..tables are used LFA1, LFB1, BSIK and BSAK.

BSEG is not used.

you can also check from ST05 transaction.

Hope it will solve ur problem.

Regards

Krishnendu

0 Kudos

Hi All,

Thanks a lot for your quick responses. By looking at your responses, here I am presenting the actual reqirement.

Fianl aim of this report is to give the user to decide GR/IR clearing. User does as follows.

1. Run MB5S, with the report she finds shipments associated with them by looking at GL line items.

2. Then she runs The above steps to determine wether those shipments are paid or not.

3. If they are paid then clear the corresponding entries. If not paid then sends message to Vendor to send Invoice.

Right now I am doing as following:

Selctions screen has company code, GL account, Posting date (selection range), PO number (selection option).

I am querying BSIS for GR data with this data and document type WE. And query BSIS again for document type Z6(Haulier) and posting key 31 for Invoice data for all entries of GR data by matching XBLNR(shipment# in this case) and ZUONR(Assignment key a combinations of PO# and PO line item). GR data and IR data will be into two different tables.

Now I am going to BSEG for all entries of GR data and IR data and get quantity and Vendor (LIFNR). Now starts the matching of GR with corresponding IR happnes on company code, XBLNR(Shipment#) and ZUONR. If a match is found then keep GR data and corresponding IR data in one line and append to final result set. If no match found then just append IR data to the final result set.

Loop through the final result set to determine the status based on the following coditions.

1 if gr qty = ir qty and gr amount = ir amount then F13 pending

elseif gr qty > ir qty and gr amount > ir amount then GR surplus

elseif gr qty < ir qty and gr amount < ir amount then IR surplus

elseif gr qty = ir qty and gr amount <> ir amount then Qty correction

elseif gr qty <> ir qty and gr amount = ir amount then Amount correction

Now I have to take the shipments from the above list and go to FBL1N(I already described this). Once this list(FBL1N result) comes I have to prepare the final list for output based the shipmets found in this list by comparing the list came before FBL1N result.

I am little concerned about the performance also, any tips for that also welcome.

As mentioned by Pedro above, I want to know wether there are any FMs available or not at each step of this process. If you have any questions please let me know so that I can give more details. Your help is greatly appreciated.

Thank you,

Surya.

0 Kudos

Hi ,

Any one , please help me.

Thank you,

Surya

0 Kudos

If you have code, why don't you get back to the forum with specific questions about how to do certain things?

Rob

0 Kudos

Hi Rob,

Is there a BAPI equavalent FBL1N(Vendor line items) ?

Thank you,

Surya

0 Kudos

Hi Surya,

Do you have a look at the progrm linked with transaction FBL1N ? You can see that this program is linked with a logical database so can't you use the same for your requirement ?

Former Member
0 Kudos

Our BA defined the requirement properly and identified the necessary tables.

0 Kudos

And what were they?