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

reg :blocking idoc from procesing

Former Member
0 Likes
527

i have one segment e1edp28 in idoc invoic02. i should block the idoc if herkl field in e1edp28 segment is initial.could u plz suggest me how to do it?

plz see if the following code works or not

IF ztype EQ c_zinvoic02

AND ztype1 EQ c_invoic02.

if edi_e1edp28-herkl is initial.

MESSAGE E018 WITH 'Country of origin of material needs to be entered'.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
492

Hi

for my case could u plz tell me how to do

Regards

3 REPLIES 3
Read only

Former Member
0 Likes
492

Hi,

You have to update the status table with your error message.

Check the std FM IDOC_INPUT_ORDERS is you scroll down in the FM you will see how the status message is updated..

* füllen IDOC_Status
* fill IDOC_Status
      IF ok = space.
        idoc_status-docnum = idoc_contrl-docnum.
        idoc_status-status = beleg_nicht_gebucht.
        IF check_orga = 'X'.
          idoc_status-msgty  = 'E'.
          idoc_status-msgid  = 'VG'.
          idoc_status-msgno  = '204'.
          idoc_status-msgv1  = xvbak-kunnr.
          idoc_status-msgv2  = lieferant.
          APPEND idoc_status.
        ELSE.
          idoc_status-msgty  = sy-msgty.
          idoc_status-msgid  = sy-msgid.
          idoc_status-msgno  = sy-msgno.
          idoc_status-msgv1  = msgv1.
          idoc_status-msgv2  = msgv2.
          idoc_status-msgv3  = msgv3.
          idoc_status-msgv4  = msgv4.
          APPEND idoc_status.
        ENDIF.
      ELSE.

Hope this helps

Cheers

VJ

Read only

Former Member
0 Likes
493

Hi

for my case could u plz tell me how to do

Regards

Read only

0 Likes
492

Hi,

I believe that you are having a custom posting program to update the segments. If you have custom program then just update the status segments as i have posted in my previous post.

if you have std function module and not a custom program then you will have a USER EXIT to update the status segments. Kindly check and see where you can update the status segments.

let me know if you need more info.

Cheers

VJ