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

Exit in Idoc processing

0 Likes
921

Hi gurus,

I'm new on Idocs and maybe it's a silly question.

My requirement is to send a custom Idoc with the result status from an inbound standard Idoc COND_A04. It's like some kind of acknowledge.

Because of a requirement, I'm unable to use custom process code, and I'm finding the best-standard solution.

I've searched exits in standard process code IDOC_INPUT_COND_A but I've only found pre-input enhancements points (at this time I'm unable to get the final status) and a exit for custom segments.

Does anyone faced a similar problem.

Thanks a lot.

David.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
772

hi David,


* after every segement append in idoc FM there is Customer exit and badi available to add your custom code
IDOC_INPUT_COND_A

please check the customer exit after whcih segment you want to add status..

then read the segment and ..
   LOOP AT it_edidd INTO idoc_data.
      CASE idoc_data-segnam.
        WHEN 'Z1PROCORD'.   "example add you segment here 
                  ---<<< add your Logic
    End case.
endloop.              

Regards,

Prabhudas

4 REPLIES 4
Read only

Former Member
0 Likes
773

hi David,


* after every segement append in idoc FM there is Customer exit and badi available to add your custom code
IDOC_INPUT_COND_A

please check the customer exit after whcih segment you want to add status..

then read the segment and ..
   LOOP AT it_edidd INTO idoc_data.
      CASE idoc_data-segnam.
        WHEN 'Z1PROCORD'.   "example add you segment here 
                  ---<<< add your Logic
    End case.
endloop.              

Regards,

Prabhudas

Read only

0 Likes
772

Hi Prabhudas,

I'm sorry, I don't understand you.

I've to process a standard Idoc COND_A04 in a standard way (using FM IDOC_INPUT_COND_A). When Idoc is completely processed, I need to retrieve the return message of the standard input (error code or succes) and send it to PI with a standard Idoc.

I need to put my custom code, after the processing of the Idoc.

Where can I put your code?

Thanks a lot.

David

Read only

0 Likes
772

hi David,


after Processing the idoc you can read the status by using this function module..

*** Read idoc status

    CALL FUNCTION 'IDOC_STATUS_VALUES_READ'
         EXPORTING 
              idoc_number               = s_edidc-docnum 
         TABLES 
              idoc_status               = itab_edids 
         EXCEPTIONS 
              idoc_foreign_lock         = 1 
              idoc_not_found            = 2 
              idoc_status_records_empty = 3 
              idoc_status_invalid       = 4 
              db_error                  = 5 
              OTHERS                    = 6. 

after reading the statusa and send it to PI with a standard Idoc...

Regards,

Prabhudas

Edited by: Prabhu Das on Apr 15, 2009 10:28 PM

Edited by: Prabhu Das on Apr 15, 2009 10:29 PM

Read only

0 Likes
772

Thanks again.

I'm sorry, I've not explained the question correctly.

My problem is where, not how. The Idoc must be send immediatly after input processing.

Maybe this requirement can be only be achieved using events?

Sorry for my bad explanation.

Thanks,

David.