Application Development 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: 

BDC in Inboud idoc function module.

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

SuhaSaha
Advisor
Advisor
0 Kudos

Hello Sanu,

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

BR,

Suhas

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Regards,

Lalit Mohan Gupta.