on 10-04-2010 5:16 PM
Hello,
I have a requirement to find all sales orders that were shipped to a specific US state within a specified date range. For example, it would be a report to find all sales orders from 2009-2010 where the region of the ship-to party is CA. The issue is that there is a generic "SHIPTO" partner set up where Customer Service manually enters the address and I cannot pull this information from customer master records. Is there a standard report that I can find this information? I cannot find in VA05, also tried looking on the delivery side in VL06o but I cannot find in there.
Andy,
Iu2019m afraid you will find nothing in standard R/3 that reports what you need.
This calls for a custom report that queries the delivery note header table LIKP for all deliveries with, among other relevant criteria, goods-issue date in your range.
For all selected deliveries, query the sales document partner table VBPA, and get this thing called an address number for the ship-to partner. This address number points to the ship-to address on the document, not the master record.
Then you invoke a function module to get the actual address assigned to the address number, and discard those that do meet your region criteria. Something like FM ADDRESS_READ ought to work.
Your ABAPer will enjoy this work.
Regards,
Ken
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
After doing additional digging on this, I developed a query in SQ01 using the following table join:
LIKP --> VBPA --> ADRC
|____> VBFA --> VBRK
The address code provided in table VBPA can be accessed via table ADRC. Therefore, when doing the link in SQ01, link together VBPA-ADRNR to ADRC-ADDRNUMBER. When doing this it brings in the address information, then you can further develop the query to filter by region code.
For my report, I used the following fields:
Delivery - LIKP-VBELN
Delivery Date - LIKP-LFDAT
Preceding Sales document - VBFA-VBELV
Preceding Item # - VBFA-POSNV (at my company every delivery document item starts with 10, later filter in the report to only show 10 in this field)
Follow-on document - VBFA-VBELN (I'm using the billing document as the follow-on to pull the net value of the invoice)
Follow-on document category - VBFA-VBTYP_N (set the document category to only look for M - Invoice; otherwise you'll pull in PGI document and WM documents if applicable)
Net Value - VBRK-NETWR
Ship-To Party - LIKP-KUNNR
Partner Function - VBPA-PARVW
Name 1 - ADRC-NAME1
Name 2 - ADRC-NAME2
Street - ADRC-STREET
City - ADRC-CITY1
Region - ADRC-REGION
Postal Code - ADRC-POST-CODE1
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.