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

BDC in Inboud idoc function module.

Former Member
0 Likes
647

Hi all,

Please tell me a if i can distribute data in inbound idoc function module using BDC.My function module is IDOC_INPUT_MATMAS01.

Thank you.

Edited by: sanu debu on Apr 16, 2009 5:09 PM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
524

HI Sanu,



* Inside the function module use can use BAPI/ Call transaction...

* find the Proper User exit and Write you r call transaction..

"<<< see the sample code..
 LOOP AT it_edidd INTO idoc_data.
      CASE idoc_data-segnam.
        WHEN 'Z1PROCORD'.
          wa_z1procord = idoc_data-sdata.
          PERFORM call_transaction                 "Use call transaction Peform..
            USING    wa_z1procord
            CHANGING l_subrc
                     l_return.
          IF l_subrc = 0.
            l_posting_ok = 'X'.

          ELSE.
            l_posting_error = 'X'.
*            APPEND l_return TO lt_return.
          ENDIF.
      ENDCASE.
    ENDLOOP.

Regrads,

Prabhudas

4 REPLIES 4
Read only

Former Member
0 Likes
524

If it is standard idoc then it will trigger BDC / BAPI automatically, you no need to do develop.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
524

Hello Sanu,

Before answering, a quick question: "What makes you feel that you cannot? Did you try & it did not work?"

BR,

Suhas

Read only

Former Member
0 Likes
525

HI Sanu,



* Inside the function module use can use BAPI/ Call transaction...

* find the Proper User exit and Write you r call transaction..

"<<< see the sample code..
 LOOP AT it_edidd INTO idoc_data.
      CASE idoc_data-segnam.
        WHEN 'Z1PROCORD'.
          wa_z1procord = idoc_data-sdata.
          PERFORM call_transaction                 "Use call transaction Peform..
            USING    wa_z1procord
            CHANGING l_subrc
                     l_return.
          IF l_subrc = 0.
            l_posting_ok = 'X'.

          ELSE.
            l_posting_error = 'X'.
*            APPEND l_return TO lt_return.
          ENDIF.
      ENDCASE.
    ENDLOOP.

Regrads,

Prabhudas

Read only

Former Member
0 Likes
524

when you use standard idoc and the segment type is standard the bapi takes care to distribute data to tables.

Regards,

Lalit Mohan Gupta.