04-16-2009 4:09 PM
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
04-16-2009 4:17 PM
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
04-16-2009 4:12 PM
If it is standard idoc then it will trigger BDC / BAPI automatically, you no need to do develop.
04-16-2009 4:14 PM
Hello Sanu,
Before answering, a quick question: "What makes you feel that you cannot? Did you try & it did not work?"
BR,
Suhas
04-16-2009 4:17 PM
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
04-16-2009 4:44 PM
when you use standard idoc and the segment type is standard the bapi takes care to distribute data to tables.
Regards,
Lalit Mohan Gupta.