Skip to Content
0
Former Member
Feb 14, 2011 at 09:10 PM

IDOC Error Logic Issue

144 Views

Hello friends, For an outbound Delivery IDOC in the user Exit I need to check a condition where the IDOC is created and then if everything looks good in my codition the IDOC needs to be generated and in the delivery the status should change to Green from Yellow. This piece works fine

However if the condition is not fulfilled the Status should remain Yellow Color and no IDOC should be generated.

Below is what I do.

This is how my Outbound IDOC FM is called. withhing the function module if my condition is not fulfilled, I raise an exception and pass a 'sy-subrc = ,01, - data not relevent.

By doing so the IDOC is not created, how ever the status turns to green and a pop message with processed sucessfully is shown. I dont want the status to be green. It should still remain Yellow or turn RED.

Any IDEA.

Thanks,

Rajeev

 CALL FUNCTION TEDE1-ROUTID
           EXPORTING
                CONTROL_RECORD_IN      = EDIDC
                OBJECT                 = NAST
           IMPORTING
                CONTROL_RECORD_OUT     = EDIDC
                OBJECT_TYPE            = HELP_OBJECT_TYPE
           TABLES
                INT_EDIDD              = INT_EDIDD
           EXCEPTIONS
                DATA_NOT_RELEVANT_FOR_SENDING = 01
                OTHERS                 = 04.

Edited by: Rajeev_D on Feb 14, 2011 10:10 PM