cancel
Showing results for 
Search instead for 
Did you mean: 

separate customized Z Sales document types for each Sales activity

Former Member
0 Kudos

Hi All,

Client require a separate customized Z Sales document types for each Sales activity.

These documents will be based on C&F locations name wise and have unique number range for each state C&F.

Example:

1.Sales Document

Z Delhi Order

2. Return Document

Z Delhi Return Order

3.Normal Delivery Doc.

Z Delhi Delivery

4. Return delivery Doc

Z Delhi Return Delivery

5.Credit Memo

Z Delhi Cr Memo

6.Debit Memo

Z Delhi Dr.Memo

7.Normal Invoice Doc.

Z Delhi Invoice

8.Return Invoice

Z Delhi Return Invoice

9. Excise Invoice

Z Delhi Excise

Client has 28 C&F locations across the India and for that we have create (28X9) =252 Document types.

If we go this configuration process it would be a time consuming activity and most important it will create huge data duplication during the IMG configuration because each of the configurations is relevant to a document type.

We are tried to convince them that what is the problem if we create a centralized data of all sales activities for a perticular sales process (C&F sales,Export Sales,Scrap Sales) with the standard single sales document types, but they need it mandatorily for the Audit perspective.

According to them they have Individual registration state by state. If they produce a sales order List of Delhi sales Order.

Example:

Sales Document C&F location

1001 Delhi

1002 Mumbai

1003 Kolkata

1004 Chennai

1005 Delhi

As per client they can not say to the Audit person that 1001 sales order is for Delhi and 1002 is for Mumbai and again 1005 for Delhi, because that person is not bothered about the sale of other states. He could make a Penalty for data hiding.

Please suggest me how to proceed with this requirment.What will be the complecation I could face If I go with this..

Regards

VenkaT

Accepted Solutions (0)

Answers (2)

Answers (2)

Lakshmipathi
Active Contributor
0 Kudos

Ideally, it is recommended to go for region wise separate number range for billing documents with different billing types; rather creating multiple sales documents types which will definitely affect the system performance.

You can go with billing exit USEREXIT_NUMBER_RANGE (Module pool SAPLV60A, program RV60AFZZ) if the above suggestion is okay.

G. Lakshmipathi

eduardo_hinojosa
Active Contributor
0 Kudos

Hi

If I understand it, your concern is related with authorizations. So, I suggest you run tcode SU24 for tcode VA01 and see all authorization objects. It will give you an idea what type of fields you can use to block users. If you don't have the proper level for your requirements, you can define your own authorization object and set it in a userexit (see SAP Note 105621 - Authorization check for the condition screen as an example), because your requirement sounds to sales office or to sales district. If you need an additional suggestion, please, let me know.

I hope this helps you

Regards

Eduardo

Edited by: E_Hinojosa on Jan 19, 2012 4:57 PM

Former Member
0 Kudos

Thanks Eduardo,

this is not regarding the Autherization of the VA01.

Client needs number range for each of the sales Activity as I described and fo that I need to create a ZDoc type for each of the sales Document and assign a separate number range.But I dont know what will be the implecation if I go with this so many Doc Types.

prasanna_kumar4
Active Contributor
0 Kudos

HI

system will allow the any Z Sales Document type because you are assigning the document types to Sales area not for C & F'

otherwise you need to create separate distribution channels for each and every C& F

it is very difficult to control the enduser if he select the different documnent type system will accept

you need to do some Enhancement and create Z table based on C& F and maintain the document types

If i am wrong correct me

Regards,

Prasanna

former_member657193
Contributor
0 Kudos

Hi

As of My Understanding is , the client want to have a Continuous number range for Each of the Location.

I mean a seperate number range for each of the location.

I think you can do it easily. You can pursue with a single sales order type and can still have a different - different number range for the same doucument.

But here the KEY point is on what criteria you want to split the number range. Assuming that you are capturing each of C&F as

a Plant or Sales Office , you can maintain a seperate number range.

Here we have only One document Type

Client - Sales Org - Sales order type - Plant - Numebr Range object

400 - R001 -


OR - 1001 (Delhi) - 01

400 - R001 -


OR - 1002( Mumbai) -02

400 - R001 -


OR - 1003 ( Bangalore) - 03

In VN01 for each Number Range Maintain a number series -

01 - 10001 TO 19999

02 -20001 TO 29999

03 - 30001 To 39999

Like this you can have say 30 C& F mapped as Plant.

Here you can replace the Plant code with SALES offices if you have mapped it that way.

Now as per the scenarion - We have one document type But when ever a sales order - is punched with respective plant or sales offices the respective number range should get picked up.

Here you can see the we have a table here -

Using the User Exit - INCLUDE MV45AFZZ we Can easily map this.

Ask you abaper create a table on this combination -

-


Client

-


Sales Org

-


Order Type

-


Plant or Sales Office (Primary Key)

-


Numer Range Object (VN01)

Logic for referene - Ask you ABAPer to refer

----


  • FORM USEREXIT_NUMBER_RANGE *

----


  • This userexit can be used to determine the numberranges for *

  • the internal document number. *

  • *

  • US_RANGE_INTERN - internal number range *

  • *

  • This form is called from form BELEG_SICHERN *

  • *

----


FORM USEREXIT_NUMBER_RANGE USING US_RANGE_INTERN.

TABLES: ZNUMB_RANGE.

  • Example: Numer range from TVAK like in standard

  • US_RANGE_INTERN = TVAK-NUMKI.

break abap.

*IF ( xvbaK-VTWEG = '50' OR xvbaK-VTWEG = '60' ).

  • IF xvbap-ps_psp_pnr IS INITIAL.

  • MESSAGE 'Please Fill Up WBS Element' TYPE 'E'.

  • ENDIF.

*ENDIF.

SELECT SINGLE * FROM ZNUMB_RANGE

WHERE BUKRS = VBAK-BUKRS_VF AND

AUART = VBAK-AUART.

IF SY-SUBRC = 0.

IF NOT ZNUMB_RANGE-NRRANGENR IS INITIAL.

US_RANGE_INTERN = ZNUMB_RANGE-NRRANGENR.

ENDIF.

ENDIF.

ENDFORM.

*eject

Similarly you can create a Table for Delivey / Billing and then User the Same logic to have a seperate Number range with SINGLE DOCUMENT TYPE.

"DELIVERY" - MV50AFZ1 ( table to be used - Sales org / Delivey Doc type / Plant / Number range object)

FORM USEREXIT_NUMBER_RANGE *

----


  • This userexit can be used to determine the numberranges for *

  • the internal document number. *

  • *

  • US_RANGE_INTERN - internal number range *

  • *

  • This form is called from form BELEG_SICHERN *

  • *

----


FORM USEREXIT_NUMBER_RANGE USING US_RANGE_INTERN.

  • Example: Numer range from TVLK like in standard

  • US_RANGE_INTERN = TVLK-NUMKI.

*{ INSERT MCDK900729 1

TABLES:ZSD_DELV_RANGE.

SELECT SINGLE * FROM ZSD_DELV_RANGE

WHERE VKORG = LIKP-VKORG AND

werks = LIPS-werks.

IF SY-SUBRC = 0.

IF NOT ZSD_DELV_RANGE-NRRANGENR IS INITIAL.

US_RANGE_INTERN = ZSD_DELV_RANGE-NRRANGENR.

ENDIF.

ENDIF.

*} INSERT

ENDFORM.

"BILLING" - RV60AFZZ ( Table to be used - sales Org / Billing Doc type / Plant / Number Range Objecy)

----


  • FORM USEREXIT_NUMBER_RANGE *

----


  • This userexit can be used to determine the numberranges for *

  • the internal document number. *

  • US_RANGE_INTERN - internal number range *

  • This form is called from form LV60AU02 *

----


FORM USEREXIT_NUMBER_RANGE USING US_RANGE_INTERN.

  • Example: Number range from TVFK like in standard

  • US_RANGE_INTERN = TVFK-NUMKI.

*{ INSERT MCDK900676 1

TABLES: ZNUMB_RANGE_BILL.

SELECT SINGLE * FROM ZNUMB_RANGE_BILL

WHERE BUKRS = VBRK-BUKRS AND

werks = vbrp-werks and

FKART = VBRK-FKART.

IF SY-SUBRC = 0.

IF NOT ZNUMB_RANGE_BILL-NRRANGENR IS INITIAL.

US_RANGE_INTERN = ZNUMB_RANGE_BILL-NRRANGENR.

ENDIF.

ENDIF.

*} INSERT

ENDFORM.

*eject

Similar to above program write the respective logic.

One the table is created - input the date into the table and test- It will work

Like .

Thanks................Rishi