cancel
Showing results for 
Search instead for 
Did you mean: 

WBS with billing element but no Sales Order

Former Member
0 Kudos

Trying to write a SQ01 query to find WBS with billing element but no sales order assigned. Can anyone help?

Accepted Solutions (0)

Answers (3)

Answers (3)

Jelena
Active Contributor
0 Kudos

VBRP is the billing item table, OP is asking about the sales documents.

Queries for something that does not exist might be tricky. Use the tables/fields mentioned above (not VBRP), but make sure to use LEFT JOIN to VBAP. In this case you'll get blank/initial values in the query when no sales record exist. If you do a regular INNER JOIN then you just won't see the WBS that don't have VBAK/VBAP records.

former_member206976
Active Contributor
0 Kudos

Hi,

Just check in VBRP - for Field 'PS_PSP_PNR'

regards

Former Member
0 Kudos

Hello,

Fetch from PRPS-FAKKZ, table, all WBS elements with billing element, loop all of these entries in VBAK-PS_PSP_PNR for assingment at header level or VBAP-PS_PSP_PNR to check at item level if any sales order eixts

filter those with no sales order

hope this helps

Thanks

Akash