cancel
Showing results for 
Search instead for 
Did you mean: 

How to restrict billing output

Former Member
0 Kudos

Hi,

I have a situation where ZRMS output in the billing document output procedure which needs to be restricted based on sales org and payment terms. But there are some challenges. There is already one requirement routine assigned to that output type in procedure '900'. The same requirement routine is being used for some other condition types of the same procedure. e.g. same requirement routine is assigned to YABS, ZASM.

So to restrict ZRMS from being determined I tried below code for that requirement routine 900. But it does not work.

If xnast-kschl = 'ZRMS' AND komkbv3-vkorg = 'M901' AND komkbv3-zterm = 'Y093'

Sy-subrc = 4

Exit.

End  if

Am I using wrong structures?

Regards,

Tushar

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member186385
Active Contributor
0 Kudos

Hi Tushar,

Instead of write a routine, you could ask your Functional consultant to create the access sequence based on the Sales organization and access Sequence

After adding the access sequence depending on the condition records system will determine

For example, if Sales org used is IT10 and condition record maintained for this sales org, system will determine output else it will not

it also improves system performance effectively since it is being controlled by configuration

hope it is clear

regards,

santosh

former_member209818
Active Contributor
0 Kudos

Hi Tushar,

I am doubtful about the availability of the xnast structure and its value population in this Routine.

Have you verified if xnast is population by the time your Routine is called?

You can switch on the debugging and check.

Also, I assume that your newly created Routine is assigned to your Output determination Procedure. You can verify the same from Tcode NACE.

Also, I dont think you need Exit statement inside your IF statements. If you have any further conditions to check, you may put your condition at the end of the routine.

Hope this helps !!

Former Member
0 Kudos

Hi Harshad,

Yes, the routine is assigned to output type in NACE. xnast is available populated in routine. it even sets sy-subrc to 4 but it gets reset somewhere.

I will try putting the code at the end and will let you know.

Regards,

Tushar