9.19.2009

Restricting Number Of Items In Billing Doc

You can restrict delivery with delivery tolerance, thereby causing invoicing of the desired.

or

Go to SPRO>>>IMG>>>Sales & Distribution>>>Billing>>>Billing Documents>>>Country-specific features>>>Maintain Maximum No. Of Billing Items.

This is where you can define a maximum number of items allowed for all billing documents within a given sales organization.

However, maintaining data here is not enough alone to bring about a billing split by number of billing items.

You must also go to copying control for order/delivery to billing document at item level under "Data VBRK/VBRP" and maintain routine 006 "individual invoice limited" or a similar routine that accesses the data maintained here.
read more...

Steps for creating a new or changing an existing Billing Document Types

Create/Change your Billing types configuration in VOFA.

Some of the IMG stuff are :-

1) To block automatic transfer of the billing document to accounting, mark the field.
Indicates whether the system blocks automatic transfer of the billing document to
accounting.

During document processing, you can manually transfer blocked billing documents to
accounting by selecting:

Billing -> Change -> Release accounting

2) Account determination procedure

3) Output determination procedure etc. ...

After customizing, use transaction VCHECKVOFA to check your configuration :-

1) Proforma billing types: If it is a proforma billing type, (VBTYP = U), the field must
be blank and the account determination procedure must be empty.

2) Cancellation billing document types: : A check is made to see if the cancellation
billing document type has the right VBTYP. An F2 invoice, for example, (VBTYP 'M')
can only be canceled with billing type S1 with VBTYP 'N' . A billing type with
VBTYP '5' can only be canceled with the VBTYP '6' and vice versa.

3) Cancellation billing document type partner functions A check is made to see if the
cancellation billing document type partner functions are empty or if those that
correspond to the billing type used are empty.

Next, make sure that you maintain the copy control for the Billing Types:

Sales documents in VTFA

Target Source
e.g. F1 - Invoice OR - Standard Sales Order
F1 - Invoice ZOR - Your Sales Order

Billing documents in VTFF
e.g. G2 - Debit Memo F1 - Invoice
G2 - Debit Memo F2 - Invoice

Deliveries in VTFL
e.g. F1 - Invoice LF - Delivery
F1 - Invoice ZOR - Your Delivery
read more...

Condition Exclusion which will be determined in the billing document

The system
can exclude conditions so that they are not taken into account during pricing.

For example:
Material 4711 costs 150 USD. Some customers receive a discount of 10 USD per 100 pieces.

However, a specific customer can buy the material for 100 USD. Since this is a particularly good price, the customer should not also have a discount of 10 USD per 100 pieces. Therefore, this discount is to be excluded from pricing.

To create a condition exclusion procedure which will be determined in the billing document.

Assign the procedure to the pricing schema, and maintain copy control so that pricing is not copied from Sales Order.

To achieve this, copy the standard pricing to a ZXXXX Pricing.


Define new document pricing procedure in SM30 - V_TVKV for billing.

Assign new document pricing procedures to billing types in SM30 - V_TVFK_PR


Define the Condition Exclusion Groups in OV31.

Assign the Condition type for the Condition Exclusion Groups in OV32.

Assign the Billing Pricing Procedure in VOK8 for the Condition Exclusion Groups.

When billing document is being created just enter manually your new price and the pricing program logic will include only the higher price one, excluding the rest that are lower price.
read more...

Default Start Variant for VF04

There are two types of variant in VF04.

One is the selection variant before clicking the Display Billing List Button.

You can set the start variant via SE93 using the Change mode.


The second variant is the Billing Layout display variant.

This is after clicking the Display Billing List Button.

After creating your layout display variant, you can set it by clicking :-

Settings ->
Display Variant
-> Administration


Select the layout display variant you want and click :-

Edit ->
Define default settings
read more...

Billing cannot be Release to Accounting

This SAP message will appear if the system is unable to find the G/L codes match from the configuration in transaction VKOA

No account is specified in item 0000001001
Message no. F5 670

Diagnosis
No account was specified for account type "S" in item "0000001001" of the FI/CO document.

System Response
The Financial Accounting program cannot process the document.

Procedure
A system error has probably occurred in the application you called up. Check the data transferred to item "0000001001" of the FI/CO document.

Assuming that one of the key combination is Account Assignment Group, you will have to check whether have the Account Assignment Group been input in the Customer Master (Billing tabstrips - Accounting sections - Field name: Acct assgmt group).

The Account Assignment Group will be copied automatically into the sales order.

Check whether the configuration in transaction VKOA have been done correctly.

Check whether the sales order (VA03 - Goto - Header - Financial Accounting - Field name: AcctAssgGr) have been filled in automatically.

Check whether the billing document (VF03 - Goto - Header - Header - Field name: AcctAssgGr) have been filled in automatically.

If the customer master have not been maintained and the user have already input the sales order, then the user will have to maintained the Account Assignment Group manually either in the sales order or the billing documents.

Take note for One Time Customer, the user have to input the Account Assignment Group manually into the sales order. One Time Customer can be used by many customer, therefore, the system will not be able to determine the Account Assignment Group manually.
read more...

8.16.2009

Dynamic Open SQL – within SUB ROUTINE


Above program is an example of Dynamic Open SQL used within a sub-routine. In a complex program which requires WHERE statement construction throughout the codes, the program will append dynamically various information into “STRWHERE” and “STRLINE”. As a part of another sub-routines and codes, this program will generate output dynamically based on what button the user click. In this example, if the user click “All Class” the program will display all booking list while if the user click “Business Class” the program will only display all booking in Business class.
The ability of Dynamic Open SQL is far more than just what explained in this paper, however using these simple examples we understand that there is always way to develop our current programming method or system.


read more...

Above program is featuring more complex programming techniques. If in the previous program the codes only use one parameter as Dynamic component, in above program the code must implement some additional features to allow the program runs dynamically.

This program will allow the user to search a particular customer name and one other search condition which will be executed during runtime. This program will then display all the records from table customer SCUSTOM which matches with the conditions defined by the user.

Apart from the usage of Internal Table, the program will also require the usage of Table EDPLINE. This is a special feature in Release 4.6 in its pre-release to allow the construction of string or characters which later will be used within the SELECT statement.

As any other program, the first requirement is variable and table declaration. This program will be using one internal table to keep all the data “ITAB_SCUSTOM” (Line 3) and one constructible WHERE statement built on a TABLE OF EDPLINE and EDPLINE (Line 4 and 5). EDPLINE will handle all small pieces or components of WHERE statement and the TABLE OF EDPLINE will construct all the pieces or components from EDPLINE into a WHERE string statement which will be used in the WHERE condition in SELECT statement.

For the selection screen, the program will allow the user to input a particular name LIKE which means any number of first character(s) which the user want to search on. And also, the program will allow one other optional selection condition from the user (Line 6 and 7). In this example the default is “A” for the name and “ID BETWEEN 1 and 99” as the other condition.


Once the user click “Execute” or F8 button, the program will start allocating information from the selection screen into EDPLINE which in this example called “STR_LINE” (Line 8). If the user input an additional condition in the selection screen, the program will also add that information into “STR_LINE” (Line 9 – 11).

After all the conditions constructed, the information in “STR_LINE” will be appended into “STR_WHERE” as the “TABLE OF EDPLINE” (Line 13) which will be used in the SELECT statement (Line 14).

Using that dynamically constructed SELECT statement, the program will display the matching records available in table customer SCUSTOM.
read more...