Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Output type Requirement triggering

Former Member
0 Likes
1,500

Hi,

In my project I have a requirement to stop triggering of an output type if all the items in the sales order have reason for rejection set.

I have done the condition check in a output requirement routine and if the condition fails then I set SY-SUBRC = 4.

Problem 1:

But when I am creating the sales order, the komkbv1 structure does not have the sales order no. (it has other fields) and kompbv1structure is not filled. Then how do I check if all the items have Reason for rejection set or not.

Problem 2:

For an existing sales order, I trigger the output type in Header-->Output... , this code is getting executed and sy-subrc is set to 4. But still the output is triggered.

Please let me know how do I proceed.

Code:

w_vbeln = komkbv1-vbeln.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

INPUT = w_vbeln

IMPORTING

OUTPUT = w_vbeln .

    • Atleast one item of the Sales Order does not have

    • reason for rejection set.

select single * from VBAP

where vbeln = w_vbeln and

ABGRU eq space.

if sy-subrc ne 0.

sy-subrc = 4.

EXIT.

endif.

Thanks in advance,

Vishnu Priya

3 REPLIES 3
Read only

Former Member
0 Likes
893

Hi,

For the first problem,

Check the standard structures available, but not sure.

For the Second one,

You routine include should be included in the standard include RV61BNNN

for it to get triggered.

Your routine will not get executed if your routine is not included in this standard include.

Hope this helps.

Read only

0 Likes
893

Hi,

In both the cases, the code is getting executed, that is not a problem.

Thanks ,

Vishnu Priya

Read only

0 Likes
893

Hi,

I have solved my problem,

In the header only there is one field ABSTK which is the overall rejection status. I can make a check on it while creation of the sales order and now it does not trigger output if all the items of the sales order are rejected. We cannot stop trigger the output when we are changing a sales order as per my anlalysis.

Thanks for all ur replies.

Vishnu Priya