on 04-12-2017 8:44 PM
I created the infoset with VBAP and LIPS. They are joined using VBAP.VBEL and LIPS.VGBEL. Since I have multiple items for each sales order, my query shows the same line multiple times.See below an example:
I would like to show only one line per SO, for instance
100392380101340blank
1003928801013410091001205
100392980101342blank
And so on.
The invoice number is not a table defined in the query but is an extra field with this code.
Is there a way in the infoset to do this and obtain only one line?
Thank you in advance.
First of all, the document flow is always at the line level, so it simply will not be accurate to present the information the way you're asking. Even if it is how, de facto, process works in your system there is nothing preventing anyone from creating multiple references.
That aside, in a query obviously you can't just JOIN line item tables and then expect to see the result at the header level. To achieve what you are asking you'd need to start with the header level table (e.g. VBAK) and then add entries using ABAP code in Extras. But it'd be much more efficient to do this in an ABAP report.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortunately the sales order number is not in LIKP. The sales order number is in LIPS (field VGBEL=Reference doc).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you try VBAK and LIKP ? If you want to have Billing reference also, then, add VBRK. In fact, the easy method is Table Join in SQVI
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
any suggestions at my question?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vibhor,
thank you for the suggestion.
You suggested to use VBFA table instead of LIPS. If I set VBAP.VBELN (sale document) = VBFA.VBELV (preceding doc), I still have multiple records because of the items. Could you please tell me the correct link of the two tables?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Daniel
You are querying item level tables so if you don't want multiple line you might want to limit it by selecting only first item number on LIPS.
Why don't you use VBFA table to get this data?
Thanks
Vibhor.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
11 | |
6 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.