I am not sure if my question isn't too general or company-specific, but even to know as much would be helpful in my current state.
I need to modify a query (in SQ02) so that a SRET financial-controlling report includes a column with the invoice number... and that needs to be the newest one as corrections are possible.
All I managed to learn so far is that I need to add another "additional fields" in SQ02 and write my select query here...
The thing is, I THINK that I need to take the information from VBFA because I was told it's there, but I am absolutely clueless how am I supposed to:
1. Locate the "reference number" for which I should add the invoice number (examples of invoice numbers I found in VL03N.. for a reason I don't understand). I don't know what goes to WHERE (...) part of the statement. What database table is that kept in?
2. Put the data INTO a table... what table? Should I just create a custom internal table in the same statement in which I should put the data extracted from VBFA? I don't know what goes in INTO (...) part of the statement.
3. Make sure that I even got the invoice number right... is the column called "Next document" a place where invoices are kept in VBFA?
Again, I am aware this might be either too general or perhaps company-specific, but I'd be grateful to learn at least that as I am starting to shoot blind and have no idea how to learn what I need to know.