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 to get error message in IDOC_INPUT_ORDERS

HariMaradana
Active Participant
0 Likes
806

Hello All,

I am trying to stop the idoc by some conditions like given below code in one of the user exit. I am able to append the error record in standard errtab internal table.

I could see the appended error record also. But it is not throwing any error message. IDOC is created successfully. Please check the given code and correct me where i went wrong?

ExitName: EXIT_SAPLVEDA_001

*Check for existing Project Numbet and Version. If already exists in system throw the error in IDOC

IF ZE1EDK02-QUALF EQ '001'.

hxvbak = dxvbak.

v_bstnk = ZE1EDK02-BELNR.

select bstnk vsnmr_v into corresponding fields of table i_vbak from vbak

where bstnk = v_bstnk

and vsnmr_v = hxvbak-vsnmr_v.

describe table i_vbak lines l_lines.

if l_lines > 1.

sy-msgno = '209'.

sy-msgid = 'VG'.

raise user_error.

endif.

clear hxvbak.

ENDIF.

3 REPLIES 3
Read only

Former Member
0 Likes
632

Hi Cris,

I don't think by using Raise you will be able to raise the error. Better write Meesage of type E or the best option is delete the entry from the IDOC for which you don't want IDOC to be generated.

Regards,

Atish

Read only

0 Likes
632

Hi Atish,

Thanks for your quick reply...Actually my logic is working. I haven't checked properly. we can throw the error message.

Thanks

Cris

Read only

Former Member
0 Likes
632

hi cris,

i have the same requirement,

can u help me out in this problem,i am very much new to ale/idoc.

my requirement is

if idoc_data-segnam = 'e1edk02'.

if e1edk02-qualf = '011'.

xvbak-xblnr = e1edk02-belnr.

endif.

endif.

waiting for your reply