cancel
Showing results for 
Search instead for 
Did you mean: 

Query related to SQ02

Former Member
0 Kudos

Hi,

I am creating query for delivery report in which i want display delivery related fields and sold to party from the VBPA. but in a report its getting display al the four partner funcatin how to restricut the SH,BP and PY to display in the report.

Regards,

Gajanan rudrakanthwar

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I suppose you want a join with LIKP, LIPS and VBPA table which VBPA table is Sold To only.

It can be done.

After you join the tables, you need to have selection fields.

In Extra -> Selections tab -> Create new selection criteria fields e.g. "SoldTo". Something like below.

Next, add another field, e.g. Out_PART. Key in the same Format as below. This will act as a selection for the partner type but not visible to user.

Add one more field for VBPA-POSNR and Extras also "No-DISPLAY". This will act as a selection for VBPA item field.

Next, you need to add code. There is a small icon to add code, 4th icon from the create icon.

In the code section, you add below codes in any of the selection field.

*DEFAULT PARTNER AS SOLD TO.
ob_item = 'IEQ000000'.
OUT_PART = 'IEQAG'.
APPEND: OB_ITEM, OUT_PART.

With above codes, you default the selection from VBPA table to Sold to Partner Only.

Try it and let me know again if you need further help.

Jelena
Active Contributor
0 Kudos

Not really an SD question. You can create a custom view that will have a condition only for specific partner type. This also can be done by adding some custom ABAP code in SQ02.

There is also a "quick and dirty" method - in the query (SQ01)  add Partner Type as a parameter, then in the variant set the default value (values?) and make the parameter hidden/disabled. Then make the query run with the variant only. This is not fool-proof, but will do in a pinch.