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

problem with user exit

Former Member
0 Likes
912

Hello,

Iam using change pointers to create idoc whenever there is changes in Customer Master.Iam populating certain fields in idoc through to user exit.Iam using VSV00001 enhancement...But whenever the required field could not be filled i need to raise an exception(ie idoc should not be created)...But I could not find any exceptions in that enhancement...How can i stop the idoc being created is there any other way....?

Please help...

Thanks,

Larry

6 REPLIES 6
Read only

Former Member
0 Likes
720

how are you creating the IDOC? i think you calling the function module "IDOC_WRITE_AND_START_INBOUND" to create idoc. if that is the case, just before calling that func module check all the required fields are available .based on that call the func module else skip that call..

regards

Read only

suresh_datti
Active Contributor
0 Likes
720

Since there are no exceptions, have you tried to put in hard error & stop the process ie something like..

message e016(rp) with 'Stop the process'.

Regards,

Suresh Datti

Read only

Former Member
0 Likes
720

Hello,

Iam creating an outbound idoc through change pointers running rbdmidoc(BD21).In that Iam populating certain fields through user exit vsv00001 fn module MASTERIDOC_CREATE_DEBMAS.

Iam running a select query to populate the fields if the sy-subrc is not zero i need to stop the process of idoc creation.Normally i will raise exception but Iam not able to find an exception.....

U mean to say i can use 'stop' command to stop the process ...?

Please help.

Thanks,

Larry

Read only

0 Likes
720

Larry,

As per SAP Documentation for STOP command, check this out -

Basic form STOP.

This statement is not allowed in an ABAP Objects context. See

STOP not allowed.

Effect This statement terminates a processing block in an excutable

program.

Note The statement is only intended for use in the INITIALIZATION,

AT SELECTION-SCREEN, START-OF-SELECTION, and GET events. It

terminates the current processing block in an executable

program and triggers the END-OF-SELECTION event. In all other

processing blocks, or when you do not want to trigger the

END-OF-SELECTION event, you must use EXIT.

You may use Abort message or error message to come out of processing. As the processing is in user exit, if you need to inform user the reason for terminating processing, send email message and then use abort / error message to stop process. Try this out.

Read only

Former Member
0 Likes
720

Hello,

I tried using abend message and error message both seems to be ok.My doubt is if i schedule in background the program rbdmidoc for creating idocs and if this error occurs what might be the impact...?

thanks,

Larry

Read only

0 Likes
720

ideally the job would get cancelled.. Did you run it in the background?

Suresh Datti