cancel
Showing results for 
Search instead for 
Did you mean: 

Regrading sales doc. order reason

Former Member
0 Kudos

Hi All,

I have a scenario in which particular Condition type should be used for particular reason code e.g.

C-type ZACV (Unsold return)

Reason code (999 for unsold return).

When above mentioned condition type is using in document then only above mentioned Reason code is acceptable. Apart from this user is not allowed to maintain any other reason code.

How to procees for that. Please advice

Thanks I

Edited by: Sanjay Nair on Oct 23, 2008 1:42 PM

Edited by: Sanjay Nair on Oct 23, 2008 1:48 PM

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

unanswered closed

Former Member
0 Kudos

Hi there,

I guess that this requirement is to default a condition type in the pricing basing on the reason codes. Here is the answer.

Define the required condition types & maintain the access sequence & condition records.

When maintaining the pricing procedures in V/08, there is a field called requirement routine. In the routine put a logic in such a way that the system will check for the reason code in the sales order (I am not sure what table it is stored as I am not connected to SAP right now).

If the table value meets the required reason code, then only the system will apply the condition type.

Explain the requirement to the ABAPer, he will be able to help you. But as an SD consultant, you need to provide him the field values against which you are checking.

Finally asign the procedure to your order type.

Regards,

Sivanand

Former Member
0 Kudos

Hi Siva,

We hv pricing for the same & conditon type is manual, price use to maintain manually while creating sales order, no access seq is there for that.

Regards

San

Former Member
0 Kudos

Hi there,

Since it is manual condition type then enter the condition type manually in the order. Make the condition type not mandatory. So that you will have to enter only if you have a specific reason code.

Regards,

Sivanand

Former Member
0 Kudos

Hi Siva,

It is already not mandatory. We are using difeferent pricing proc. for debit & credit memo.

when we create the credit memo. So while creating credit memo we need to maintain order reason & there are lots of order reason. But user want if a particular condition type say zzzz are using to create credit memo then particular order reason (say not saleable ) should be accepted by system if user put anyother order reason then system should throw an error.

Regards

San

Former Member
0 Kudos

Hi there,

Ok got it.... so your requirement is reverse. If there is a particular condition type, then system should allow you to enter a particular order reason.

Then you need to put the code in save user exit in MV45AFZZ.

In the code put a logic where the system will compare the pricing tables in the order. Foe eg KOMP etc.

If the value in the table is condition type ZDIS for eg, then the system should allow only 'not saleble' in the order reason.

But I am not sure how the ABAPer is going to code it. When the user enters the condition type, heimmediately enters the reason code without saving 1st. So the condiiton type data values will not be saved into the data base. May be you can ask him to compare the dynamic values in the table.

Rather than this, can I suggest you something?

Since you are having a different pricing procedure for returns, define different condition types. In the V/08 pricing procedures maintain them as mandatory & automatic. So system will propose them automatically.

Basing on the values in the pricing tables, you can write a code in MV45AFZZ in save user exit to check the reason code. Since teh condition types are proposed automatically, system will save them into data base tables as & when you save the order. It will be easy for the ABAPer to call the values in the program.

Check with your business if they are OK to maintain the conditon records sothat system will propose themautomatically.

Regards,

Sivanand

Former Member
0 Kudos

Hi Siva,

Generally we don't touch pricing proc. for small thin becuase this is not allowed & changing the procedure may impact somewhere else also.

I was also thinking for the user exit again the problem is table.Because we dont have access seq. so data is not getting stored in any table.

I am planning ti use user exit USEREXIT_SAVE_DOCUMENT_PREPARE.

But again proble m is the logic.

Can you please suggest, condition type requirement will work in that scenario ?

Regards

San

Former Member
0 Kudos

Hi there,

You have mentioned that you use different prcing procedure for returns.

So what I meant is that in the pricing procedure, maintain the condition types as automatic (with access seq & condition records). In the requirement routine you can mention the condition under which they can apply. For eg: If it is a credit memo req then system will propose ZCDIS condition type. If it is debit memo, then ZDMS will be proposed & something like that.

By doing that system will store the values into the pricing tables immediately after orderis created. It will be easy for the ABAPer to call the tables to compare the reason code.

If it is entered manually, then this will happen. User will open VA01 / VA02. Then enter the condition types manually. In the same session he will also enter the reason codes. Here since the order isnot saved before entering the reason code, condition values willnot be saved into the DB tables.

From the ABAP standpoint, it will be difficult to call the values. It is not that it is impossible. ABAPer needs to call the dynamic values like (y-vbpa or y-komp) & compare them to the reason codes. (DB values are called x-vbpa or x-komp for eg). Then he should write a code in save user exit in MV45AFZZ.

Check with your ABAPer. Do whatever he feels convinent. Also as a consultant we need to suggest the business what is good / simple basing on the ABAP complexity.

So have a through understanding & check with the business before proceeeding

Regards,

Sivanand