Sales document range in a period
Is there a direct & foolproof way to get the ranges of sales documents created within a time period.
For example, If I want sales document ranges between 04/01/2010 and 10/31/2010, is there anyway to get it rather than manually sorting from VBAK.
thanks
thanks Chandra.
I can get the same list from VBAK by restricting to ERDAT field.
Can I get a range of sales documents created in a time period.
For example, there might be a million sales orders created in a month with different ranges ranges.
Ideally I need to get this list.
Document ranges in period
11000000 - 1111289900
67823456 - 678999999
441400001 - 441499999
Thanks
Gova
Edited by: Govardhana Mabbu on Oct 29, 2010 8:53 PM
Similar Messages
-
Load Setup table using Sales Document Ranges
Hi,
Is there any way to load the Setup table for Billing using Multiple Sales Document Ranges or Multiple single values.
Since the field has no option of Multiple Entries.
I don't want to execute multiple setup table with different ranges.
I have to use the Sales Document number as its needed to load on the data for a particular period using Sales Document numbers.
Thanks in advance.
SBHi SB,
If Sales Documnent Number is your selection criteria, as you rightly said, there is no way you can have multiple selections. I don't think you have any option other than loading different mutually exclusive sales document number ranges. You can schedule these ranges in parallel and that way you can save time. Hope this makes sense.
Thanks and Regards
Subray Hegde -
Dear all,
I've a small issue with sales document number range. I create a range 01 from 1 to 4999999 by tcode VN01. But when the first sale document is created, the system gets the number 1000001 & assign to this sale doc. (Not 1 as usual). Do you know the reason why ?
Thank you very much for your help,
Regards,
Tweety.Go to VOV8, select the sale document type and execute. There ensure that this 01 is assigned to Number range int.assgt
If not, maintain 01 and retry to create a sale order.
thanks
G. Lakshmipathi -
Number range for sales document type
Hi,
I am having 1 client under that 5 company codes, ade according to that 5 plants & 5 sales organization.
so for one comapany code including all there are 15 sales document types same for other also
my question is
How can I assign number range for all that?
If i am going to maintain seperate document type it goes to 75
which userexit will help me out for this?
without userexit what is the otherway?
regards,
RahulNot only at order level, you will have to use exits at delivery and billing document level also.
For sales documents:
Exit USEREXIT_NUMBER_RANGE in MV45AFZZ
For delivery documents:
Exit USEREXIT_NUMBER_RANGE in MV50AFZ1
For billing documents:
Exit USEREXIT_NUMBER_RANGE in RV60AFZZ
You need to give tables for maintaining numbers for sales, delivery and billing documents. In the exit a select query can be written to fetch the data based on the parameters like sale orgainzation, company code etc.
Regards,
GSL. -
The number range for sales documents
Hi all,
I have difined a new number range intervals, but the "current number" doesn't match with saved sales documents' number.
I guess that's because there are old saved sales documents are remained in the system which had saved before I defined a new number range intervals.
Is there any way to delete past saved sales orders so that newly defined numbers are going to be assigned?
Thank you.To Lakshmipathi,
Thank you for your prompt reply. very appreciated.
ok, so now I understand that I can't delete saved sales orders from the system if these are important documents such as billings.
so If it's impossible to delete old documents in the system, I still need sales documents' number to match the numbers which I have newly defined.
For example, I recently defined a interval no. as below,
Interval No. From Numer To Number Current Number
Z1 010000000 019999999 010000503
I have assigned the interval no. "Z1" to a sales order type. and then created a sale order using the sales order type.
The sales order No. showed "010000504" which looks fine. But when I go back to the customizing to see how the "Z1"'s current number has changed,(I expected it to be "010000504"), I find the current number now became totally random number such as "010000913".
From here, again when I create sales orders, it is "010000505", "010000506", "010000507",,,,,and so on.
But the current number doesn't change at all from "010000913".
I'm lost and need a kind help from SAP pro.
Thank you very much,
Best regard
Misaki Nagaya -
Exit for assigning external number range to sales document
hello friends,
can anyone help with this issue.in tcode 'vn01' we are assiging internal number range but we dont want that number range that is external number range rather than using internal number for sales document.i.e the number range should start with 'ufc'followed by some number range.
plz reply as soon as possible .
thanks and regards,
siriHi Sirisha,
I believe you can assign external number range manually by using transaction SNRO and then assign the number range before entering into the main screen of VA01 or saving the document.
The number range is linked to the order type (VBAK-AUART), this is done in customizing.
For different sales area it need to have different number ranges for the same order type.
Please see that the same sales doument number should not be linked to several sales orders which are to be created,if I am not wrong
Regards,
Naresh
****Please do reward points if found useful -
External number range for Sales Document
hi,
I have a requirement to generate external number range for sales document. I tried this user exit (MV45AFZZ) to generate external number.
FORM USEREXIT_NUMBER_RANGE USING US_RANGE_INTERN.
Endform.
between these form and enform i written my logic and passing to US_RANGE_INTERN. But can one suggest where to write to generate external number range.
Can any one help me out.
Thanks and regards,
Vijay.Hi
Here you can assign a different number range for your sales order.
The number range is linked to the order type (field VBAK-AUART), this link is done in customizing.
It usually uses this routine if it can't assign the range in customzing because (for example) for different sales area it need have different number ranges for the same order type.
So you should create an external range by trx SNRO and then assign the number before entering in the main screen of va01 or saving the document.
When you need to assign the number depends on how you want to manage your range.
If you assign the number in entering you has to make sure to not assign the same number document to severals order to be created in the same time by several useers.
Max -
Regarding number ranges for sales documents.
Dear Guru's,
There are 2 number range fields in defining a sales document(i.e Int. & Ext.).
Actually we specify either internal or external ,but if we specify both what will happen.
Thanks in advance,
CherukuriHi,
The number ranges can be either external or internal. If it is external internal you need to mark it in the VN01 and at the same time delete the internal assignment number in the VOV8. If the internal assignment field in VOV8 is not blank the system will keep generating internal numbers.
If it is external no. range the current no. that is being used cannot be seen on the VN01 screen. And while creating the sales order itself the sytem will prompt you to enter a number between the available range. If you dont enter the same system will not allow you to proceed further.
Kind Regards
Chakradhar -
Sales Document Number ranges Split
Hi ,
We need to load from DSO to Cube by splitting the load on Sales order Document number because of the volume.
Can you please help me how do we split the ranges , how can we find the starting sales order and the ending sales order .
regards,
SruthiHi,
As per my understanding, you are trying to load data from DSO to cube on sales document number selection.
To see the data in ODS, Right click on ODS -
> Manage -
> Contents ---> Click on Active table.
You can see records in table. Sort the entries, then you can find the sales document numbers in order.
You have to do full load.
Hope this helps,
Regards,
Rama Murthy.
Edited by: Rama Murthy Pvss on Nov 17, 2009 2:40 PM -
Explanations on Sales Documents
Can anybody send explanations about sales documents that I have mentioned below?
Inquiry IN
Quotation QT
Free-of-charge delivery FD
Standard sales order OR
Cash sale BV
Rush order SO
Quantity contract CQ
Maintenance contract WV
Rental contract MV
Scheduling agreement DS
Credit memo request CR
Debit memo request DR
Subsequent delivery, free-of-charge SD
Returns REhi
==============================
can also refer to the link below for more info on SD ..
SD Process Flow
==============================
SD FLOW:
Sales
Inquiry - A customers request to a company that they provide a quotation or sales information without obligation. An inquiry can relate to materials or services, conditions and if necessary delivery dates. The sales area that accepts the inquiry becomes responsible for further processing.
Quotation - A quotation presents the customer with a legally binding offer for delivering a product or providing a service within certain fixed conditions. This offer is legally binding for the company within a specified time period. A sales area can reply to a customer inquiry with a customer quotation or use it to refer to a business partner contact.
Sales Order - Request from a customer to a company to deliver a defined quantity of products or provide a service at a certain time.
The sales area that accepts the inquiry is responsible for completing the agreement.
Create Delivery:a. Picking - The picking process involves taking goods from a storage location and staging the right quantity in a picking area where the goods will be prepared for shipping.
b. Packing - Packing is part of delivery- and shipment processing. When you process a delivery, you can select delivery items for packing and assign them to handling units (HUs).
c. Goods Issue - As soon as the goods leave the company, the shipping business activity is finished. This is illustrated using goods issue for outbound deliveries.
Billing - Billing represents the final processing stage for a business transaction in Sales and Distribution. Information on billing is available at every stage of order processing and delivery processing.
Sales Order Management Transactions
SALES ORDER PROCESSING
Creating Sales Order - VA01
Maintaining a Sales Order - VA02
Displaying a Sales Order - VA03
Releasing an Order or Delivery from Credit Hold: Non-Flooring - VKM1
Display List of RMAs by Customer - VA05
Confirm RMA Goods Receipt - VL02
Generate list of open return orders for deletion - VA05
Display Customer returns eligibility - MCSI
Removing a Billing Block (Approving Credit/Debit Requests) - V.23
PRICING MASTER DATA
Create Pricing - VK11
Creating a Sales Deal - VB21
Maintaining a Sales Deal - VB22
Displaying a Sales Deal - VB23
Maintaining Prices - VK12
Displaying Prices - VK13
MATERIAL MASTER DATA
Creating Material Substitution Master Data - VB11
Maintaining/Deleting Material Substitution Master Data - VB12
Displaying Material Substitution Master Data - VB13
Creating a Bundled Master - MM01
Creating a Sales BOM - CS01
Maintaining a Sales BOM - CS02
Displaying a Sales BOM - CS03
CUSTOMER MASTER DATA
Creating Partner Records - XD01
Maintaining Customer Master Data - XD02
Displaying Customer Master Data - XD03
Deactivating a Partner - VD06
CUSTOMER CREDIT INFO
Creating/Maintaining New Customer Credit Information - FD32
Displaying Customer Credit Information - FD33
Blocking or Unblocking a Customer - VD05
SHIPPING
Creating a Delivery - VL01N
Displaying a Delivery - VL03N
Changing a Delivery - VL02N
Shipment Inquiry / Display - VT03
Adjusting Transfer Order - Confirmation Quantity - LT12
Collectively Confirm Transfer Order - LT25
Batch Shipment Confirmation - VL19
PGI Reversal Cancellation - VL09
Creating Service Provider/Carrier Master Data - XK01
Maintaining Serive Provider/Carrier Master Data - XK02
Displaying Service Provider/Carrier Master Data - XK03
Maintaining Product Master/Serial # Profile/Unit of Measure/Shipping Unit - MM02
IDoc Inquiry - WE02 / WE05
BILLING
Invoicing a Customer Shipment - VF01
Reprinting an Invoice - VF31
Releasing a Sales Order for Billing - V.23
Creating an Invoice by Using the Billing Due List - VF04
Checking Open Billing Documents - VF05
Create Credit/Debit Memo - FB01
A/R
Controlling Total Debit/Credit bkgs - F.03
Generate FI Account balance - F.08
Generate Month-to-date Inv. register - F.02
Process payments - FBZ1
Rqst Individual Customer Corresp. - FB12
Generate Customer Correspondence - F.61
Enter Batch totals under Control ttl - FB07
Display G/L Acct. totals - FBL3N
Reverse Posted Amounts - FB08
Customer Refunds - FBL6
Customer Refund to other than Payer - FB05
Clearing Debit/Credit on Cust. acct. - FB1D
Customer Balance in Local Currency - F.23
G/L Account Balance Report - F.08
Create Invoice - legal entity adjust - FB01
Generate Cust. Acct. statements - F.27
Generate Dunning Letters - F150
Generate Billing Due List - VF04
Generate Blocked Billing Doc list - VFX3
Inq. via Credit Release Screen - VKM1
List orders by partner - VA05
Past Due invoices by customer - FD11
Check number info by G/L account - FBL3N
Display customer Line items - FBL5N
SD Configuration:
Enterprise Structure:
1. Maintaining Sales Organization
Sales Organization is an organizational unit responsible for the sale of certain products or services.
IMG -> Enterprise Structure -> Definition -> Sales and Distribution -> Define, copy, delete, check Sales organization
2. Assigning Sales Organization to Company Code
This assignment ensures all the sales made through this Sales Organization are accounted for in the assigned Company Code (Company Code is created by FI Consultant).
IMG -> Enterprise Structure -> Assignment -> Sales and Distribution -> Assign Sales Organziation to Company Code
3. Maintaining Distribution Channel
Distribution Channel is the way, in which Products or Services reach Customers.
IMG -> Enterprise Structure -> Definition -> Sales and Distribution -> Define, copy, delete, check distribution channel
4. Assigning Distribution Channel to Sales Organization
This assignment ensures, a Sales Organization can supply Materials to Customers through this Distribution Channel.
IMG -> Enterprise Structure -> Assignment -> Sales and Distribution > Assign distribution channel to sales organization
5. Maintaining Division
Division is a way of grouping materials, products, or services.
IMG -> Enterprise Structure -> Definition -> Logistics - General -> Define, copy, delete, check division
6. Assigning Division to Sales Organization
IMG -> Enterprise Structure -> Assignment -> Sales and Distribution -> Assign division to sales organization
7. Setting up Sales Area
All the sales are made from a particular sales Area. For creating a Sales Order Sales Area is compulsory.
IMG ->Enterprise Structure -> Assignment -> Sales and Distribution -> Set up sales area
8. Assigning Sales Organization- Distribution Channel- Plant
Plant is created ny MM Consultant.
IMG -> Enterprise Structure -> Assignment -> Sales and Distribution -> Assign sales organization - distribution channel - plant
9. Define Shipping Points
Shipping Point is the Organizational element, which is responsible for shipping the Materials to the Customers.
IMG -> Enterprise Structure -> Definition -> Logistics Execution -> Define, copy, delete, check shipping point
10 Assigning Shipping Point to Plant
This assignment ensures that goods from different Plant can be dispatched from different Shipping Points.
IMG -> Enterprise Structure -> Assignment -> Logistics Execution -> Assign shipping point to plant
Note: Ensure to do the undermentioned configuration also though it is not in Customizing node of Enterprise Structure.
11. Defining Common Distribution Channels for Master Data
Use
The purpose of this activity is to define distribution channels which have common master data..
Procedure
Access the activity using one of the following navigation options:
IMG Menu -> Sales and Distribution -> Master Data -> Define Common Distribution Channels
Transaction Code: VOR1
12. Defining Common Divisions for Master DataUse
The purpose of this activity is to define distribution channels which have common master data..
Procedure
Access the activity using one of the following navigation options:
IMG Menu -> Sales and Distribution -> Master Data -> Define Common Division
Transaction Code: VOR2
Pricing Procedure
In SD, Pricing Procedure is determined based on Sales Area (Sales Organization + Distribution Centre + Division) + Customer Pricing Procedure + Document Pricing Procedure. Sales Area is determined in Sales Order Header Level. Customer Pricing Procedure is determined from Customer Master. Document Pricing Procedure is determined from Sales Document Type / Billing Type (if configured). Once the pricing procedure is determined, Condition records are fetched. If appropriate condition records are found, the price is determined. If Mandatory pricing condition is missing, system will through an error message.
In SD, the steps to configure Pricing procedure are as under:
Step 1:
Condition table: If existing condition table meets the requirement, we need not create a new condition table. Considering the requirement for new condition table, the configuration will be done in spro as follows: IMG --> Sales & Distribution --> Basic Function --> Pricing Control --> Condition Table (select the required fields combination, which will store condition record).
Step 2:
Access Sequence: If existing access sequence meets the requirement, we need not create a new access sequence. Considering the requirement for new sequence, the configuration will be done in spro as follows: IMG --> Sales & Distribution --> Basic Function --> Pricing Control --> Access Sequence (Access sequence is made up of Accesses (Tables) & the order of priority in which it is to be accessed. Here we assign the condition table to access sequence.
Step 3:
Condition Type: If existing condition type meets the requirement, we need not create a new condition type. Considering the requirement for new condition type, the configuration will be done in spro as follows: IMG --> Sales & Distribution --> Basic Function --> Pricing Control --> Condition Type. It is always recommended to copy an existing similar condition type & make the neccessary changes. Here we assign Access sequence to Condition type.
Step 4:
a. Pricing Procedure: It is recommended to copy a similar pricing procedure & make the neccesary changes in new pricing procedure. Pricing Procedure is a set of condition type & arranged in the sequence in which it has to perform the calculation. Considering the requirement for new Pricing Procedure, the configuration will be done in spro as follows: IMG --> Sales & Distribution --> Basic Function --> Pricing Control --> Pricing Procedure --> Maintain Pricing Procedure.
b. Pricing Procedure: After maintaining the pricing procedure the next step will be determination of pricing procedure. Configuration for determining pricing procedure in SPRO is as follows: IMG --> Sales & Distribution --> Basic Function --> Pricing Control --> Pricing Procedure --> Determine Pricing Procedure.
5. Condition record: Condition record is a master data, which is required to be maintained by Core team / person responsible from the client. During new implementation, the condition records can be uploaded using tools like SCAT, LSMW, etc.
Normal Sales Order Cycle:-
Step 1: Sales Document Type
IMG > Sales and Distribution > Sales > Sales Documents >
Sales Document Header:
1. Sales Document Type:The sales document types represent the different business transactions, such as Inquiry, Quotation, Sales Order, etc. To create new sales order type, always copy as with reference to similar sales order. If possible use standard sales order.
2. Define Number Ranges For Sales Documents: Maintain number range with discussion with core team.
3. Assign Sales Area To Sales Document Types:
A. Combine sales organizations / Combine distribution channels / Combine divisions: Ensure to maintain these, else Sales Order creation will give error.
B. Assign sales order types permitted for sales areas: Assign only required Sales Order Types to required Sales Area. This will minimize selection of Sales Order Type as per sales area.
Sales Document Item:
1. Define Item Categories: If possible use Standard Item Category. Incase if required to create new, copy as from standard & maintain New.
2. Assign Item Categories: If possible, use standard. Formula for deriving item category: Sales Document Type + Item Category Group + Usage + Higher Level Item Category = Item Category
Schedule Line:
1. Define Schedule Line Categories: If possible use Standard Schedule Lines. Incase if required to create new, copy as from standard & maintain New.
2. Assign Schedule Line Categories: If possible, use standard. Formula for deriving Schedule Line: Item Category + MRP Type / No MRP Type.
Step 2:
IMG > Logistic Execution > Shipping > Deliveries >
1. Define Delivery Types: If possible use Standard Delivery Type. Incase if required to create new, copy as from standard & maintain New.
2. Define Item Categories for Deliveries: If possible use Standard Item Categories for Delivery Type. Incase if required to create new, copy as from standard & maintain New.
3. Define Number Ranges for Deliveries: Ensure to maintain number range.
Step 3:
IMG > Sales and Distribution > Billing >
1. Define Billing Types: If possible use Standard Billing Type. Incase if required to create new, copy as from standard & maintain New.
2. Define Number Range For Billing Documents: Ensure to maintain number range.
3. Maintain Copying Control For Billing Documents: Maintain relevant copy controls such as Sales Order to Billing, Deliver to Billing, etc.
he configuration differs from scenario to scenario & requirement of the client.
Interesting &important link to learn much more about configuration & business process is as under:
Link: http://help.sap.com/
Path: SAP Best Practices --> Baseline Packages --> Based on SAP ECC 5.00 --> Select Country: for eg, Localized for India --> Technical Information --> Building Blocks --> Select Country for eg, India --> List of Basic Configuration & scenarios will be listed.
Select the required basic configuration / scenario. These will consist of overview, configuration guide, business process, master data &so on.
====
Cash Sale & Rush Order
Cash Sales and Rush Orders
====
Contracts
General Contract Processing
http://help.sap.com/erp2005_ehp_02/helpdata/en/5e/69a1228f6211d2a9f60000e8a6f09e/frameset.htm
Renewing Contracts
http://help.sap.com/erp2005_ehp_02/helpdata/en/2c/275c9c456a11d189440000e829fbbd/frameset.htm
Subsequent Rental
http://help.sap.com/erp2005_ehp_02/helpdata/en/42/c820c5f8191377e10000000a1553f7/frameset.htm
Real Estate Contract
http://help.sap.com/erp2005_ehp_02/helpdata/en/8d/fb783b05efdb18e10000000a114084/frameset.htm
Value Contract
http://help.sap.com/erp2005_ehp_02/helpdata/en/dd/55fd7a545a11d1a7020000e829fd11/frameset.htm
Creating and Sending Complaint Notifications
http://help.sap.com/erp2005_ehp_02/helpdata/en/2a/df32f73d7a4bbd8d6e50b32e9227e8/frameset.htm
Use of Value Limits (for Unplanned Services)
http://help.sap.com/erp2005_ehp_02/helpdata/en/c3/72cd0755cd11d189660000e8323c4f/frameset.htm
====
Quantity Contract
http://help.sap.com/erp2005_ehp_02/helpdata/en/dd/55fd60545a11d1a7020000e829fd11/frameset.htm
http://help.sap.com/erp2005_ehp_02/helpdata/en/70/23c791419311d2ac100000e829fbfe/frameset.htm
Batch Determination in Quantity COntract
http://help.sap.com/erp2005_ehp_02/helpdata/en/25/283c804f7811d18a150000e816ae6e/frameset.htm
Customer Contracts
http://help.sap.com/erp2005_ehp_02/helpdata/en/dd/55fd53545a11d1a7020000e829fd11/frameset.htm
Purchase Contract
http://help.sap.com/erp2005_ehp_02/helpdata/en/70/23c6ce419311d2ac100000e829fbfe/frameset.htm
Contract Settlement & Billing
http://help.sap.com/erp2005_ehp_02/helpdata/en/ea/00efa6f94011d2968c006094b92c6a/frameset.htm
====
Service Contract
http://help.sap.com/saphelp_sm40/helpdata/en/8f/b4113a7e31e403e10000000a11402f/frameset.htm
Processing Service Contract
http://help.sap.com/saphelp_46c/helpdata/en/e6/4a8f849e0311d189b70000e829fbbd/content.htm
Service Order Processing
http://help.sap.com/saphelp_crm40/helpdata/en/81/78963ec975667fe10000000a114084/content.htm
<b>Sub Contracting Cycle</b>
(1) You have a material that can be procured externally, and you have maintained BOM with components. Any waste generated and received during subcontracting process can be maintained as component with negative quantity.
(2) You create a subcontracting PO (PO with Item Category L). You can also maintain Purchase Info Record for Subcontract category for material and subcontractor.
(3) You make a transfer posting to issue components for SC PO. Material is sent to subcontractor. As material remains under your ownership, system does not make any value entry. But quantity is shown as "Material Provided to Vendor"
(4) You receive finished material against SC-PO. You also specify components consumed in manufacturing of finished goods. Additionally, if you have negative components in BOM, now you'll also receive subcontracting by-products. There are three events, so three accounting entries are generated:
DR FG Stock/ SC By-Product Stock
CR Change in Stock (FG/ SC By-Product )
(for finished goods received)
DR Subcontracting Charges
CR GR/IR Clg
(for moneys payable to Subcontractor)
DR Consumption (Components)
CR Change in Stock (FG/ SC By-Product )
(material provided to Vendor is now charged to expense)
(5) You do the IV for SC Invoice, and the process is complete.
<b>Process of Subcontract in MM</b>
Sub-contract business process:
You want to buy material from the supplier (processed material/ assembled item) , but for some reason (quality of certain item / price ) you will give some component to vendor .
Vendor shall process the item / use the item provided & supply the final item.
SAP process:
1.Create the finished goods material code.
2.Maintain the BOM for the material.
3.Create PO with item category as "L" .
4.Issue material to vendor with movement type 541
5.Receive the material against the PO with movement type 101.
6.MIRO to account for vendor's invoice for the service charge& material used by him.
Can anybody tell me how a process has to be given to subcontracting?
Suppose, I have 3 operations 1)weaving 2)dyeing 3)cutting & packing
if no 2 process (i.e Dyeing) has to be given to subcontracting, what process should i follow ?
The following process to be followed for subcontracting.
1. Item code(material master) to be created at the stage of before dyeing.
2. Item code(material master) to be created after Dyeing as subcontracted item.(F30)
3. Bill of material to becreated for the material(2) calling for material(1)
4. Inforecord and source list to be created for material(2) with the corresponding vendor
5. PO to be released for material (2)
6.Along with PO the material(1) to be issued to vendor
7.On receipt of material when GR is made the stock with vendor will get updated.
<b>How to Create a Subcontract Order?</b>
To create a subcontract order, proceed as follows:
Enter the material you want to order and the item category for subcontracting (L) in the order item.
Press ENTER to display the screen for component processing.
Enter the components that the vendor requires to manufacture the product.
Please note:
You do not need to enter the date required for the components. This date is proposed by the system when you press ENTER.
It is calculated as follows:
Delivery date of the item - Planned delivery time
If you do not want the quantity of the components to be changed if the order quantity of the end product is altered, set the indicator Fixed quantity (column F).
You can determine whether the components are available on the date required by selecting Edit -> Availability check.
If you entered a bill of material as the material in the subcontract order, the components are created automatically.
If you want to determine the components in the bill of material at a later date (for example, if the bill of material is subsequently changed), choose Item -> Component -> New BOM explosion. The existing components are deleted and redetermined in the bill of material.
Save the purchase order.
When you print the purchase order, the components are printed per order item.
====
Scheduleing AGreements
Creating Schedule Agreements
http://help.sap.com/erp2005_ehp_02/helpdata/en/75/ee0f8155c811d189900000e8322d00/frameset.htm
Controling Scheduling Agrement
http://help.sap.com/erp2005_ehp_02/helpdata/en/93/7439ee546011d1a7020000e829fd11/frameset.htm
Example Data
http://help.sap.com/erp2005_ehp_02/helpdata/en/8a/815cc3b36211d188e70000e8216438/frameset.htm
Mass Maintenance of Scheduleing Agreements
http://help.sap.com/erp2005_ehp_02/helpdata/en/1a/8b4bbecdd74536acd4e970faaf6e2d/frameset.htm
Initial Data Transfer
http://help.sap.com/erp2005_ehp_02/helpdata/en/49/87c646f4a311d1955100a0c9306667/frameset.htm
Analysis & Copying of Scheduling Agreements
http://help.sap.com/erp2005_ehp_02/helpdata/en/45/f9a69036035f4be10000000a114a6b/frameset.htm
Processing Scheduling Agrements
http://help.sap.com/erp2005_ehp_02/helpdata/en/bd/1850f298a911d194fc00a0c9306667/frameset.htm
Scheduling Agreements for Suppliers
http://help.sap.com/erp2005_ehp_02/helpdata/en/93/743962546011d1a7020000e829fd11/frameset.htm
====
Credit Memo
Credit Memo
http://help.sap.com/erp2005_ehp_02/helpdata/en/a8/b99890452b11d189430000e829fbbd/frameset.htm
Creating Credit Memo / Debit Memo
http://help.sap.com/erp2005_ehp_02/helpdata/en/dd/561076545a11d1a7020000e829fd11/frameset.htm
Creating Credit Memo / Debit Memo Requests
http://help.sap.com/erp2005_ehp_02/helpdata/en/dd/55fed1545a11d1a7020000e829fd11/frameset.htm
Credit & Debit Memos
http://help.sap.com/erp2005_ehp_02/helpdata/en/a2/40418a496e11d3b3850008c719be0f/frameset.htm
Processing Credit Memo : Example
http://help.sap.com/erp2005_ehp_02/helpdata/en/4e/b3c399a1f711d194e700a0c9306794/frameset.htm
===
Debit Memo : http://help.sap.com/erp2005_ehp_02/helpdata/en/8d/a4b3880bc4c441905801d5025a5600/frameset.htm
====
Return process
You need to receipt the rejected goods through SD Module (VA01 - Sales Order type RE).
The steps are as follows :
1. Create a return request. (Using Sales Order in SD)
2. Create outbound delivery according to return request.
3. If the setting is correct in the outbound delivery screen SAP will automatically switch post goods issue button into post goods receipt. The setting is in sales order item category and delivery type.
4. In the standard system the movement type used is 651.
5. After post goods issues receipt is done using outbound delivery, the quantity is placed in blocked stock without value updating.
6. You will then decide if the return quantity are indeed bad stock or not.
7. Transfer Posting from block stock to unrestricted stock (mvt type 453), this will have accounting effect (Debit Inventory, Credit COGS)
8. Goods Issue to scrap account how to create new titles which can be used in creating the "address" view on the Vendor master.{T-Code: XK01}
In config go to Basis Components --> basis services --> Address Management --> Maintain title texts
Order type (RE)
Returns (RE) (VA01) Order will be placed as a return type order
PGR (VL02N) post goods receipt
Billing (VF01) --> Credit Memo is Raised
Accounting (VF02) --> Credit memo is passed to Accounting tables
===
Calcelling Invoice.
VF11 --> PGI (VL09N)
===
====
Reward if USeful
Thanx & regrads.
Naren.. -
Report to show the followup sales documents and items
Sales had executed many sales quotations with customers over a period of time.
Now the Sales Staff wanted to know how many sales documents and what/how many sales items are being purchased by the customer with respect to the quotation.
Is there a report that list out the sales documents and items created w/respect to a particular quotation instead of looking at the document flow which is difficult to diagnose.
Thankshello, friend.
you can try table VBFA, where you can see sales documents and their subsequent documents.
for a general listing of quotations, use tcode VA25.
regards. -
Sales Document Number field in ORDER05 IDoc
Hi All,
I am using a ORDERS05 message type for my inbound IDoc. I am using the copy of FM IDOC_INPUT_ORDERS. I am getting a Sales Document Number from BizTalk apart from other details. I want to feed this Sales Document Number in IDoc segment, so that the order is posted with the fed sales document number instead of system generating one.
Please let me know in which segment and field, I should assign the Sales Document Number (received from biztalk) in the IDoc?
Thanks in Advance,
BipenPass external Order number in segment E1EDK02. Set the field QUALF as '066' (External Order Number) and pass the order number in field BELNR (See code lines 69 to 73 of include LVEDAF5S). This assignment will work only if the Number range configuration for Order document type is External.
-
Block cancellation/creation of billing document on CLOSED posting period
Hi Experts,
Currently, user is allowed to cancel/create backdated billing document where period already closed, but it does not release to accounting automatically, due to the period has been closed.
When account user found out that the accounting document is missing for the billing document, they have to re-open the period and manual release it to accounting, in order to generate the accounting document.
Therefore, we need the billing document to be blocked for cancellation/creation on CLOSED posting period.
Is there any settings in stardard SAP to block cancellation/creation of billing document on CLOSED posting period?
would appreciate your inputs.
Thanks and Regards,
N.C.ReddyHi ,
We have blocked cancellation/ creation of billing document through below user exit. Below is the progran code also.
***INCLUDE RV60AFZC.
FORM USEREXIT_NUMBER_RANGE_INV_DATE USING US_RANGE_INTERN.
Example: Number range from TVFK like in standard
US_RANGE_INTERN = TVFK-NUMKI.
*{ INSERT KPDK904773 1
*Block creation or cancellation of billing doc in closed period
DATA : gv_gjahr TYPE bkpf-gjahr,
gv_monat TYPE bkpf-monat,
gv_poper TYPE t009b-poper,
gv_bukrs TYPE t001-bukrs,
lv_gjahr TYPE t001b-frye1,
lv_monat TYPE t001b-frpe1,
gv_oper TYPE t001b-frpe1.
CLEAR : gv_gjahr, gv_monat, gv_poper, gv_bukrs.
gv_bukrs = vbrk-bukrs.
IF NOT likp-wadat_ist IS INITIAL.
*- First determine the Period of the Actual GI date.
CALL FUNCTION 'FI_PERIOD_DETERMINE'
EXPORTING
i_budat = likp-wadat_ist
i_bukrs = gv_bukrs
IMPORTING
E_GJAHR = gv_gjahr
E_MONAT = gv_monat
E_POPER = gv_poper
EXCEPTIONS
FISCAL_YEAR = 1
PERIOD = 2
PERIOD_VERSION = 3
POSTING_PERIOD = 4
SPECIAL_PERIOD = 5
VERSION = 6
POSTING_DATE = 7
OTHERS = 8.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
CLEAR : lv_gjahr, lv_monat.
lv_gjahr = gv_gjahr.
lv_monat = gv_monat.
*- Once period is determine check whether Period is open or not for 'D' - Customer Account
CALL FUNCTION 'FI_PERIOD_CHECK'
EXPORTING
I_BUKRS = gv_bukrs
i_gjahr = lv_gjahr
i_koart = 'D'
i_monat = lv_monat
IMPORTING
E_OPER = gv_oper
EXCEPTIONS
ERROR_PERIOD = 1
ERROR_PERIOD_ACC = 2
INVALID_INPUT = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
*- Once period is determine check whether Period is open or not for 'S' - All G/L Accounts
CALL FUNCTION 'FI_PERIOD_CHECK'
EXPORTING
I_BUKRS = gv_bukrs
i_gjahr = lv_gjahr
i_koart = 'S'
i_monat = lv_monat
IMPORTING
E_OPER = gv_oper
EXCEPTIONS
ERROR_PERIOD = 1
ERROR_PERIOD_ACC = 2
INVALID_INPUT = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
*- Check Billing Date period is closed or not
IF kom-fkdat is not initial.
clear : gv_gjahr, gv_monat, gv_poper.
*- First determine the Period of the Actual GI date.
CALL FUNCTION 'FI_PERIOD_DETERMINE'
EXPORTING
i_budat = kom-fkdat
i_bukrs = gv_bukrs
IMPORTING
E_GJAHR = gv_gjahr
E_MONAT = gv_monat
E_POPER = gv_poper
EXCEPTIONS
FISCAL_YEAR = 1
PERIOD = 2
PERIOD_VERSION = 3
POSTING_PERIOD = 4
SPECIAL_PERIOD = 5
VERSION = 6
POSTING_DATE = 7
OTHERS = 8.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
CLEAR : lv_gjahr, lv_monat.
lv_gjahr = gv_gjahr.
lv_monat = gv_monat.
*- Once period is determine check whether Period is open or not for 'D' - Customer Account
CALL FUNCTION 'FI_PERIOD_CHECK'
EXPORTING
I_BUKRS = gv_bukrs
i_gjahr = lv_gjahr
i_koart = 'D'
i_monat = lv_monat
IMPORTING
E_OPER = gv_oper
EXCEPTIONS
ERROR_PERIOD = 1
ERROR_PERIOD_ACC = 2
INVALID_INPUT = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
*- Once period is determine check whether Period is open or not for 'S' - All G/L Accounts
CALL FUNCTION 'FI_PERIOD_CHECK'
EXPORTING
I_BUKRS = gv_bukrs
i_gjahr = lv_gjahr
i_koart = 'S'
i_monat = lv_monat
IMPORTING
E_OPER = gv_oper
EXCEPTIONS
ERROR_PERIOD = 1
ERROR_PERIOD_ACC = 2
INVALID_INPUT = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
IF kom-fkdat4(2) <> likp-wadat_ist4(2).
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
*} INSERT
ENDFORM.
FORM USEREXIT_FILL_VBRK_VBRP *
This userexit can be used to fill fields in VBRK and VBRP *
Be aware, that at this time the work areas KUAGV KURGV *
KUWEV and KUREV are not filled. *
This form is called from FORM VBRK_VBRP_FUELLEN. *
FORM USEREXIT_FILL_VBRK_VBRP.
Example: change Tax country
VBRK-LANDTX = T001-LAND1.
ENDFORM.
*eject -
Missing Records from R/3 Production to BW 3.5 Production (Sales Documents)
Hi Experts
I am working on SAP BW 3.5 Version
When I am Loading data from R/3 Production to BW 3.5 Production half of the Sales Documents are Missing which are start with Alphabetical and I have done right LO-Cokpit procedure properly for
2LIS_11_VAITM
2LIS_11_VAHDR
2LIS_13_VDITM
2LIS_13_VDHDR
It Capture only Numerical sales Documents, but there so many alphabetical Sales Documents like
Ex:
BPCL-KOCHI
CHEMPLAST
DEGREMONT
E125012800
F085012605
Y00P4A010G
Kindly let me know on urgent basis( why it happens )
Thanks in Advance
SumaHi,
Have you done an init on 11 extractors.
If not do an init (Filling of the Setup tables) without any selections.
What I think is happening here is that in your init selections you have put a numerical range for the document numbers. Thats why the alphabetical docs are not comming.
Check this and let me know if this helps.
Regards,
Jadeep -
Finding an idoc number from a given sales document
hi,
please send me the code for the finding idoc number for a given sales document.
it is urgent............
thanks in advance..........I written the code to find the idoc number for given Purchase order number,so you can change the code depends on your requirement
TYPE-POOLS: slis.
tables : edid4 , edidc ,edids ,lfa1,teds2.
DATA: t_fieldcatalog TYPE slis_t_fieldcat_alv.
DATA: s_fieldcatalog TYPE slis_fieldcat_alv.
DATA: s_layout TYPE slis_layout_alv.
DATA: text11 LIKE E1EDP02.
DATA: text111 LIKE E1MBXYI.
DATA: s_keyinfo TYPE slis_keyinfo_alv.
DATA: v_repid TYPE syrepid.
DATA: V_MSGNO LIKE T100-MSGNR.
*DATA: V_TEXT(90).
DATA : WA_EDIDS TYPE EDIDS.
data : begin of itab_edids occurs 0,
user like edids-UNAME,
date like edids-CREDAT,
time like edids-cretim,
idoc like edids-docnum,
MESSAGETYPE like edidc-MESTYP,
VENDOR LIKE EDIDC-SNDPRN,
name like lfa1-name1,
icon(1),
EXPAND TYPE C,
end of itab_edids.
data : itab type edid4.
data : begin of itab_edidc occurs 0,
doc_num like edidc-docnum,
MESSAGETYPE like edidc-MESTYP,
IDOCTYPE like edidc-DOCTYP,
PARTNERNUMBER like edidc-RCVPRN,
PARTNERTYPE like edidc-RCVPRT,
MESSAGECODE like edidc-MESCOD,
VENDOR LIKE EDIDC-SNDPRN,
data like edidc-credat,
*include structure edidc.
end of itab_edidc.
data : begin of itab_status occurs 0,
idoc like edids-docnum,
date_stauus like edids-logdat,
status_counter like edids-countr,
staTus like edids-status,
*descrp like teds2-descrp,
DESCRP(70),
ponumber like ekpo-ebeln,
MESS LIKE edidc-MESTYP,
*appdoc like edids-stapa1,
end of itab_status.
data : text like edid4-sdata.
DATA: text1 LIKE E1EDK01.
data : begin of itab_teds1 occurs 0.
include structure teds1.
data end of itab_teds1.
*selection-screen begin of block sb with frame title text-001.
*select-options:
s_rsdat for edidc-CREDAT.
*selection-screen end of block sb.
DATA: f_fieldcatalog TYPE slis_fieldcat_alv.
selection-screen begin of block sb with frame title text-001.
parameters:
p_su radiobutton group gp1,
p_re radiobutton group gp1,
p_al radiobutton group gp1.
select-options:
s_rsdat for edids-creDAT,
s_user for edids-uname.
selection-screen end of block sb.
initialization.
PERFORM INITIALIZATION.
start-of-selection.
PERFORM DATA_RETRIVAL.
PERFORM DATA_BASED_SELECTION.
PERFORM PASSING_ALV.
*select docnum mestyp doctyp rcvprn rcvprt mescod credat into
*table itab_edidc from edidc
*where credat in s_rsdat.
*CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
*EXPORTING
*i_program_name = v_repid
*I_INTERNAL_TABNAME = 'ITAB_STATUS'
*CHANGING
*ct_fieldcat = t_fieldcatalog.
*CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
*EXPORTING
*i_program_name = v_repid
*I_INTERNAL_TABNAME = 'ITAB_EDIDS'
*CHANGING
*ct_fieldcat = t_fieldcatalog.
s_LAYOUT-ZEBRA = 'X'.
*s_LAYOUT-SUBTOTALS_TEXT = 'SUBTOTAL'.
*s_LAYOUT-TOTALS_TEXT = 'TOTAL'.
*& Form INITIALIZATION
text
--> p1 text
<-- p2 text
FORM INITIALIZATION.
V_REPID = SY-REPID.
s_keyinfo-header01 = 'IDOC'.
s_keyinfo-item01 = 'IDOC'.
*s_layout-subtotals_text = 'SUBTOTAL TEXT'.
*s_layout-key_hotspot = 'X'.
*s_layout-expand_fieldname = 'EXPAND'.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = V_REPID
I_INTERNAL_TABNAME = 'ITAB_STATUS'
I_INCLNAME = V_repid
CHANGING
ct_fieldcat = T_fieldcatalog
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = V_REPID
I_INTERNAL_TABNAME = 'ITAB_EDIDS'
I_INCLNAME = V_repid
CHANGING
ct_fieldcat = T_fieldcatalog
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.
f_fieldcatalog-just = 'L'.
MODIFY t_fieldcatalog FROM f_fieldcatalog
TRANSPORTING just
WHERE ( fieldname = 'IDOC' OR FIELDNAME = 'STATUS_COUNTER' ).
f_fieldcatalog-SELTEXT_L = 'Status Message'.
MODIFY t_fieldcatalog FROM f_fieldcatalog
TRANSPORTING SELTEXT_L
WHERE fieldname = 'DESCRP'.
f_fieldcatalog-TECH = 'X'.
MODIFY t_fieldcatalog FROM f_fieldcatalog
TRANSPORTING TECH
WHERE fieldname = 'EXPAND'.
f_fieldcatalog-REPTEXT_DDIC = 'Vendor Name'.
MODIFY t_fieldcatalog FROM f_fieldcatalog
TRANSPORTING REPTEXT_DDIC
WHERE fieldname = 'NAME'.
*f_fieldcatalog-REPTEXT_DDIC = 'V Code 32122'.
*MODIFY t_fieldcatalog FROM f_fieldcatalog
*TRANSPORTING REPTEXT_DDIC
*WHERE fieldname = 'VENDOR'.
ENDFORM. " INITIALIZATION
*& Form DATA_RETRIVAL
text
--> p1 text
<-- p2 text
FORM DATA_RETRIVAL.
select uname credat cretim docnum into table
itab_edids from edids
where credat in s_rsdat and
uname in s_user and
countr = ' '.
select uname credat cretim docnum from edids
*APPENDING CORRESPONDING FIELDS OF TABLE itab_edids
where logdat in s_rsdat and
uname in s_user.
SELECT budat hkont belnr shkzg wrbtr FROM bsas
*APPENDING CORRESPONDING FIELDS OF TABLE it_temp WHERE hkont = w_glacct
*"wa_cb-gl_account
*AND bukrs IN (so_bukrs-low)
*AND budat < so_date-low.
delete adjacent duplicates from itab_edids.
if not itab_edids[] is initial.
select docnum mestyp doctyp rcvprn rcvprt mescod SNDPRN credat into
table itab_edidc from edidc for all entries in itab_edids
where docnum = itab_edids-idoc.
endif.
LOOP AT ITAB_edids.
READ TABLE ITAB_EDIDC WITH KEY DOC_NUM = ITAB_EDIDS-IDOC.
itab_edids-messagetype = ITAB_EDIDC-MESSAGETYPE.
itab_edids-VENDOR = ITAB_EDIDC-VENDOR.
MODIFY ITAB_EDIDS.
CLEAR ITAB_EDIDS.
ENDLOOP.
DELETE ITAB_EDIDC WHERE MESSAGETYPE = 'ORDERS'.
loop at itab_edids.
read table itab_edidc with key doc_num = itab_edids-idoc.
if sy-subrc ne 0.
delete itab_edids.
endif.
endloop.
select docnum logdat countr status into table itab_status from edids for
all entries in itab_edidc where docnum = itab_edidc-doc_num.
LOOP AT ITAB_STATUS.
READ TABLE ITAB_EDIDC WITH KEY DOC_NUM = ITAB_STATUS-IDOC.
ITAB_STATUS-MESS = ITAB_EDIDC-MESSAGETYPE.
MODIFY ITAB_STATUS.
CLEAR ITAB_STATUS.
ENDLOOP.
loop at itab_status.
clear : text ,text1 , text11, text111, itab.
select single descrp from teds2 into itab_status-descrp
where status = itab_status-STATUS AND
LANGUA = 'E'.
select single sdata into text from edid4 where
DOCNUM = itab_status-idoc and
segnam = 'E1EDK01'.
*MOVE: text TO text1,
text1-BELNR TO itab_status-ponumber.
itab_status-ponumber = text1-belnr.
move text+83(30) to itab_status-ponumber.
MODIFY ITAB_STATUS.
clear itab_status.
IF itab_status-MESS = 'WMMBXY'.
select single * from edid4 INTO ITAB where segnam = 'E1MBXYI' AND
HLEVEL = '02' AND DOCNUM = itab_status-idoc.
MOVE : ITAB-SDATA TO TEXT111 ,
text111-EBELN TO itab_status-ponumber.
**text1-BELNR TO ponumber.
ELSE.
select single * from edid4 INTO ITAB where segnam = 'E1EDP02' AND
HLEVEL = '03' AND DOCNUM = itab_status-idoc.
MOVE : ITAB-SDATA TO TEXT11 ,
*text1-EBELN TO ponumber.
text11-BELNR TO itab_status-ponumber.
endif.
MODIFY ITAB_STATUS.
clear itab_status.
endloop.
ENDFORM. " DATA_RETRIVAL
*& Form PASSING_ALV
text
--> p1 text
<-- p2 text
FORM PASSING_ALV.
s_LAYOUT-EXPAND_FIELDNAME = 'EXPAND'.
DATA: t_events TYPE slis_t_event.
DATA: s_events LIKE LINE OF t_events.
s_events-form = 'TOP_OF_PAGE'.
s_events-name = 'TOP_OF_PAGE'.
APPEND s_events TO t_events.
s_layout-lights_fieldname = 'ICON'.
sort itab_status by status_counter descending. " -
mod3
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
i_callback_program = v_repid
is_layout = s_layout
it_fieldcat = t_fieldcatalog
i_callback_user_command = 'USER_COMMAND'
i_tabname_header = 'ITAB_EDIDS'
i_tabname_item = 'ITAB_STATUS'
IT_EVENTS = t_events
is_keyinfo = s_keyinfo
TABLES
t_outtab_header = itab_EDIDS
t_outtab_item = itab_STATUS
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " PASSING_ALV
*& Form DATA_BASED_SELECTION
text
--> p1 text
<-- p2 text
FORM DATA_BASED_SELECTION.
if p_su eq 'X'.
*loop at itab_status where status = '53'.
*select single stapa1 from edids into itab_status-appdoc
where docnum = itab_status-idoc and status = '53'.
*delete itab_status where status ne '53'.
*modify itab_status.
*endloop.
delete itab_status where status ne '53'.
loop at itab_edids.
read table itab_status with key idoc = itab_edids-idoc binary search.
if sy-subrc ne 0.
delete itab_edids.
ELSE.
*SHIFT ITAB_EDIDS-IDOC LEFT DELETING LEADING '0'.
MODIFY ITAB_EDIDS.
endif.
endloop.
LOOP AT ITAB_STATUS WHERE MESS NE 'WMMBXY'.
SELECT SINGLE * FROM EDIDS INTO WA_EDIDS WHERE DOCNUM = ITAB_STATUS-IDOC
AND COUNTR = ITAB_STATUS-STATUS_COUNTER.
IF WA_EDIDS-STATXT CA '&'.
V_MSGNO = WA_EDIDS-STAMNO.
IF V_MSGNO NE '000'. "----mod3
CALL FUNCTION 'MESSAGE_PREPARE'
EXPORTING
msg_id = WA_EDIDS-STAMID
msg_no = V_MSGNO
MSG_VAR1 = wa_edids-stapa1
MSG_VAR2 = WA_EDIDS-STAPA2
MSG_VAR3 = WA_EDIDS-STAPA3
MSG_VAR4 = WA_EDIDS-STAPA4
IMPORTING
MSG_TEXT = itab_status-descrp.
CONDENSE ITAB_STATUS-DESCRP.
ENDIF."---- mod3
ELSE .
ITAB_STATUS-DESCRP = WA_EDIDS-STATXT.
ENDIF.
*SHIFT ITAB_STATUS-IDOC LEFT DELETING LEADING '0'.
*SHIFT ITAB_STATUS-STATUS_COUNTER LEFT DELETING LEADING '0'.
MODIFY ITAB_STATUS.
ENDLOOP.
LOOP AT ITAB_STATUS WHERE MESS EQ 'WMMBXY'.
SHIFT ITAB_STATUS-IDOC LEFT DELETING LEADING '0'.
SHIFT ITAB_STATUS-STATUS_COUNTER LEFT DELETING LEADING '0'.
ITAB_STATUS-DESCRP = 'APPLICATION DOCUMENT POSTED'.
MODIFY ITAB_STATUS.
ENDLOOP.
delete adjacent duplicates from itab_edids comparing idoc.
elseif p_re eq 'X'.
loop at itab_status where status = '53'.
delete itab_edids where idoc = itab_status-idoc.
endloop.
loop at itab_status.
read table itab_edids with key idoc = itab_status-idoc binary search.
if sy-subrc ne 0.
delete itab_status.
endif.
endloop.
LOOP AT ITAB_STATUS.
SELECT SINGLE * FROM EDIDS INTO WA_EDIDS WHERE DOCNUM = ITAB_STATUS-IDOC
AND COUNTR = ITAB_STATUS-STATUS_COUNTER.
IF WA_EDIDS-STATXT CA '&'.
V_MSGNO = WA_EDIDS-STAMNO.
IF V_MSGNO NE '000'. "----mod3
CALL FUNCTION 'MESSAGE_PREPARE'
EXPORTING
msg_id = WA_EDIDS-STAMID
msg_no = V_MSGNO
MSG_VAR1 = WA_EDIDS-STAPA1
MSG_VAR2 = WA_EDIDS-STAPA2
MSG_VAR3 = WA_EDIDS-STAPA3
MSG_VAR4 = WA_EDIDS-STAPA4
IMPORTING
MSG_TEXT = itab_status-descrp.
CONDENSE ITAB_STATUS-DESCRP.
endif. "-----mod3
ELSE .
ITAB_STATUS-DESCRP = WA_EDIDS-STATXT.
ENDIF.
SHIFT ITAB_STATUS-IDOC LEFT DELETING LEADING '0'.
SHIFT ITAB_STATUS-STATUS_COUNTER LEFT DELETING LEADING '0'.
MODIFY ITAB_STATUS.
ENDLOOP.
LOOP AT ITAB_EDIDS.
SHIFT ITAB_EDIDS-IDOC LEFT DELETING LEADING '0'.
MODIFY ITAB_EDIDS.
ENDLOOP.
delete adjacent duplicates from itab_edids comparing idoc.
elseif p_al eq 'X'.
delete adjacent duplicates from itab_edids comparing idoc.
LOOP AT ITAB_STATUS." WHERE MESS NE 'WMMBXY'.
SELECT SINGLE * FROM EDIDS INTO WA_EDIDS WHERE DOCNUM = ITAB_STATUS-IDOC
AND COUNTR = ITAB_STATUS-STATUS_COUNTER.
IF WA_EDIDS-STATXT CA '&'.
V_MSGNO = WA_EDIDS-STAMNO.
IF V_MSGNO NE '000'. "----mod3
CALL FUNCTION 'MESSAGE_PREPARE'
EXPORTING
msg_id = WA_EDIDS-STAMID
msg_no = V_MSGNO
MSG_VAR1 = WA_EDIDS-STAPA1
MSG_VAR2 = WA_EDIDS-STAPA2
MSG_VAR3 = WA_EDIDS-STAPA3
MSG_VAR4 = WA_EDIDS-STAPA4
IMPORTING
MSG_TEXT = itab_status-descrp.
CONDENSE ITAB_STATUS-DESCRP.
endif. "----mod3
ELSE .
ITAB_STATUS-DESCRP = WA_EDIDS-STATXT.
ENDIF.
*SHIFT ITAB_STATUS-IDOC LEFT DELETING LEADING '0'.
*SHIFT ITAB_STATUS-STATUS_COUNTER LEFT DELETING LEADING '0'.
MODIFY ITAB_STATUS.
ENDLOOP.
endif.
LOOP AT ITAB_EDIDS.
if p_su EQ 'X'.
itab_edids-icon = '3'.
elseif p_re eq 'X'.
itab_edids-icon = '1'.
ELSE.
read table itab_sTATUS with key idoc = itab_EDIDS-idoc
STATUS = '53' ."binary search.
IF SY-SUBRC EQ 0.
itab_edids-icon = '3'.
ELSE.
itab_edids-icon = '1'.
ENDIF.
ENDIF.
select single name1 from lfa1 into itab_edids-name where
lifnr = itab_edids-vendor.
SHIFT ITAB_EDIDS-IDOC LEFT DELETING LEADING '0'.
MODIFY ITAB_EDIDS.
clear itab_edids.
ENDLOOP.
loop at itab_status.
SHIFT ITAB_STATUS-IDOC LEFT DELETING LEADING '0'.
SHIFT ITAB_STATUS-STATUS_COUNTER LEFT DELETING LEADING '0'.
if itab_status-descrp is initial.
select single descrp from teds2 into itab_status-descrp
where status = itab_status-STATUS AND
LANGUA = 'E'.
endif.
MODIFY ITAB_STATUS.
clear itab_status.
endloop.
sort itab_status by idoc.
sort itab_edids by idoc.
ENDFORM. " DATA_BASED_SELECTION
*& Form TOP_OF_PAGE
text
FORM TOP_OF_PAGE.
SKIP.
ULINE.
IF P_SU EQ 'X'.
WRITE : / 'TITLE : SUCCESSFULLY POSTED IDOC', 50 'DATE :', SY-DATUM..
ELSEIF P_RE EQ 'X'.
WRITE : / 'TITLE : REJECTED IDOCS' ,50 'DATE :', SY-DATUM.
ELSEIF P_AL EQ 'X'.
WRITE : / 'TITLE : ALL IDOCS' ,50 'DATE :', SY-DATUM.
ENDIF.
WRITE :/9 'Successful-Green light Unsuccessful-Red Light'.
format color COL_TOTAL intensified on.
WRITE : / 'NOTE : DOUBLE CLICK TO SEE CORREPONDING IDOC AND PO'.
WRITE :/9 'DOUBLE CLICK IDOC NO ON HEADER LIST'.
WRITE : 'AND PO NUMBER ON DETAIL LIST'.
format color off.
ULINE.
SKIP.
ENDFORM. "TOP_OF_PAGE
FORM user_command *
--> UCOMM *
--> SELFIELD *
FORM user_command USING ucomm LIKE sy-ucomm
selfield TYPE slis_selfield.
DATA: WA_IDOC9 LIKE EDIDC-DOCNUM.
DATA: SELTAB TYPE TABLE OF RSPARAMS,
SELTAB_WA LIKE LINE OF SELTAB.
RANGES : R_DATE FOR EDIDC-CREDAT." SY-DATUM.
IF ucomm = '&IC1'.
if SELFIELD-SEL_TAB_FIELD = 'ITAB_EDIDS-IDOC'.
READ TABLE itab_edids INDEX selfield-tabindex.
IF sy-subrc = 0.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = ITAB_edids-IDOC
IMPORTING
OUTPUT = WA_IDOC9.
*r_date-low = itab_edids-date.
*r_date-high = itab_edids-date.
*r_date-SIGN = 'I'.
*r_date-OPTION = 'BT'.
*append r_date.
SUBMIT RSEIDOC2 WITH DOCNUM = wa_idoc9
WITH CREDAT in R_DATE[] AND RETURN.
ENDIF.
ELSEIF SELFIELD-SEL_TAB_FIELD = 'ITAB_STATUS-PONUMBER'.
READ TABLE itab_STATUS INDEX selfield-tabindex.
IF sy-subrc = 0.
SET PARAMETER ID 'BES' FIELD itab_sTATUS-PONUMBER.
CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
ENDIF.
ENDIF.
ENDIF.
ENDFORM..
Thanks
Seshu
Maybe you are looking for
-
Regarding Matrix Report Issue in (RTF Template)
Hi, We are developing the new report in XMLP (Matrix Report) and this is new stuff for us in XMLP. we dont have any material to explore about how to apply matrix report concepts in RTF Template. We have tried with some xml data with the RTF file but
-
Asynchronous SUBMIT or CALL WITH creation of NEW SESSION
I'm doing monotonous comparisons between systems, but I do need to see the SAP standard comparison for each. So I have an ALV list that I'd like to double click a line entry that will spawn 3 NEW SESSIONS and I'll automatically populate the parameter
-
How can I report degraded service in a location?
I want to report a relatively busy part of town where service is degraded to the point that phones and hotspots won't connect reliably to the internet on Verizon service. I can't find a way to do this through the website or even a link to call. Sugge
-
Can anyone help me with a tagging problem?
I have the latest version of ITunes on my Windows 7 machine. The problem I am having is as follows, I tag a song on my IPod and it shows up in the playlist as it should. When I go to buy it however, it won't purchase. Can someone please help me solve
-
Use OIM 11g UI directly for password resets
1. What is the best practice in using OIM for password resets? Two options that i have usually heard of are writing a custom app or UI and use OIM APIs for password resets. The other is use OIM UI directly. Are there any other options. 2. Of the two