cancel
Showing results for 
Search instead for 
Did you mean: 

Link schedule lines in SA to invoice

Former Member
0 Kudos


Hi All,

We have a purchase register report for imports process. Here for each scheduling agreement we have a material. For each material we have multiple schedule lines with a unique schedule line number. For import process, for each schedule line certain set of invoices are entered such as cutoms/excise, freight, clearing, material etc. But we are unable to link that for which particular schedule line what set of invoices are entered in the system. (Not able to link the table EKBE, EKET & RSEG other than schedule agreement no. & item. Need a link between schedule line no. & RSEG table).

Is there a possibility of defining such logic that would link the two. How to do that in SAP.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member183424
Active Contributor
0 Kudos

As of my knowledge, there are no direct relation between Schedule line (EKET) and Invoice (RSEG).

Invoice will always contain the data from EKPO (not from EKET), RSEG can show the line item which is same as EKPO table. EKET table contain the schedule line as per the line item.

It means the relation is EKPO and RSEG contain the Line item (10,20,30 etc) and EKET contain the schedule line (1,2,3 etc) for the line item (10,20,30 etc) in EKPO.

That means schedule line can be more than one for one SA line item.

You can only find the relation of Line Item as per the schedule agreement number in EKET and RSEG table. Else, you have to it with your own development.

former_member216541
Participant
0 Kudos

Hi,

   We had faced the similar issue and resolved it by storing the required data for the report in a Z table through the User exit or BADI when the transaction is saved. In your case the exit can be triggered in the MIRO transaction to store the data required in the Z table.

Regards,

Irfan

Former Member
0 Kudos

Hi,

Can you be more elaborate as to what solution you have applied to solve this issue.

Regards

former_member216541
Participant
0 Kudos

Dear Ambesh,

   When you process the invoice in MIRO, check for the User exit or BADI to store the run time data i.e the SA and the Schedule line number and the required fields for the report to be stored in a Z table with the help of an ABAP consultant .

Regards,

Irfan

Former Member
0 Kudos

Hi,

What you suggested is fine for PO. But for SA, in RSEG only scheduling agreement no. & the ietem no. get stored and not the schedule line no. which is populated in EKET table. Here what you are suggesting would create an issue.

Regards

former_member216541
Participant
0 Kudos

Hi,

   If the field can not be pulled by any logic during the run time , then enhance a Z field in the transaction so that the Schedule line line no. can be captured in the Z table.Kindly revert if you need any clarification.

Regards,

Irfan