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

Validate Z output while processing manually thru VF02

Former Member
0 Likes
3,248

Hi All,

We have created a Z - output and made it to trigger automatically if all conditions are satisfied. We have activated routine RV61B902 to validate conditions.

This 902 routine is working fine when Z - output is triggered automatically.(means its not processing Z output if condition are not satisfied). But still user are free to manually trigger Z output at VF02 and process it by saving. This manual processing of Z output need to be validated. Is there any user exit / badi / screen exit where we can implement this?

e.g. Once a invoice is created, due to some reason accounting doc has not generated and hence Z - output not triggered as per validation in 902 routine. Now user open VF02 and triggered Z output(still acct doc not created). Need to write code to restrict this manual output trigger. Is there any user exit / badi / screen exit where we can implement this?

Thanks in advance,

Sabu

12 REPLIES 12
Read only

Former Member
0 Likes
2,367

Hi, In the NACE configuration, General data tab, tick the option 'Can not be changed'. If you tick this option, the manual processing of the output type is restricted.

Read only

0 Likes
2,367

Hi Vijay,

Thanks for your quick response.

We have seen this option, but in our case there should be option for manual processing also.

In some rare case, it is required to regenerate I doc and send to third party system. Thats why we would like to restrict it in user exit / screen exit / badi.

Thanks again.

Sabu

Read only

Former Member
0 Likes
2,367

Include the conditions In your driver Program as well , if it fails do not call the Form and  set the return code to '3 before exit ' , .....Routines will not work when you add the output type manually !!!

Read only

0 Likes
2,367

Thanks Ramachandran for your response.

Yes, as I mentioned in initial post routine will not work for manual processing. But we need to some how stop user from processing manually if some validations are not satisfied. So where can we write that code. We are using standard program RSNASTED and form routine EDI_PROCESSING to trigger IDOC.

Thanks Again,

Sabu

Read only

0 Likes
2,367

Can you check in from routine EDI_PROCESSING , is there a parameter returnn code , something like, that as in RSNAST00 i remember seeing one... not sure in RSNASTED , by setting the reurn code to 3 the output will not be processed....

Read only

0 Likes
2,367

Hi Ramachandran,

Yes, we do have a return code(RC) in RSNASTED. Is it possible to make the change you suggested thru a user exit / any enhancement. Is it possible to do this by without standard code change?

Thanks,

Sabu

Read only

0 Likes
2,367

Hi Sabu

Probably you can try an implicit enhancement ... For my case it was a print program , so  i set the return code to '3' in it  and when i did that  the RSNAST00  did nt consider that a valid return code and it just exited from the processing (no NAST entry)... can u try that in ur debuggin  whether it works ????

Read only

Former Member
0 Likes
2,367

I could find a work around in this case.

In this case, it was triggering, Message Type = INVOIC and function module, IDOC_OUTPUT_INVOICE was triggering. Used user exit LVEDF001 available in this FM. Code change made to trigger error message in case manual output triggering and acct doc is not existing.

Read only

Former Member
0 Likes
2,367

I could find a work around in this case.

In this case, it was triggering, Message Type = INVOIC and function module, IDOC_OUTPUT_INVOICE was triggering. Used user exit LVEDF001 available in this FM. Code change made to trigger error message in case manual output triggering and acct doc is not existing.

Read only

0 Likes
2,367

Hi Sabu,

     I have the same requirement. Can you please explain in detail? I see you have mentioned that "Message type = INVOIC". I guess message type is the field "KSCHL" and its of CHAR4 which is the Z output type that we give. Can you brief as to how you found the function module? It will be really helpful.

Thanks & Regards,

Susmitha Pritam

Read only

0 Likes
2,367

Hi

Susmitha,

As you read thru the message, my requirement was totrigger IDOC, and INVOIC is the message type of IDOC, not KSCHL. IDOC_OUTPUT_INVOICE is the function module triggering for this message type and user exit LVEDF001 available in this FM.

Hope this clarify your doubts.

Thanks,

Sabu

Read only

0 Likes
2,367

Hi Sabu,

     Thank you so much for the reply i figured it out for my case.

Regards.

Susmitha Pritam