‎2010 Feb 22 6:02 AM
hi,
i want to create idoc's to insert data in custom tables.i am not understanding how i will do this??
thanx,
vaneet thakur
‎2010 Feb 22 6:18 AM
Hi,
you have to create an IDOC type (tr. WE31) an probably also necessary segments (tr. WE31). You have to create a function module for inbound IDOCs processing. Its interface should look like:
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(INPUT_METHOD) LIKE BDWFAP_PAR-INPUTMETHD
*" VALUE(MASS_PROCESSING) LIKE BDWFAP_PAR-MASS_PROC
*" EXPORTING
*" VALUE(WORKFLOW_RESULT) LIKE BDWF_PARAM-RESULT
*" VALUE(APPLICATION_VARIABLE) LIKE BDWF_PARAM-APPL_VAR
*" VALUE(IN_UPDATE_TASK) LIKE BDWFAP_PAR-UPDATETASK
*" VALUE(CALL_TRANSACTION_DONE) LIKE BDWFAP_PAR-CALLTRANS
*" TABLES
*" IDOC_CONTRL STRUCTURE EDIDC
*" IDOC_DATA STRUCTURE EDIDD
*" IDOC_STATUS STRUCTURE BDIDOCSTAT
*" RETURN_VARIABLES STRUCTURE BDWFRETVAR
*" SERIALIZATION_INFO STRUCTURE BDI_SER
*" EXCEPTIONS
*" WRONG_FUNCTION_CALLED
*"----------------------------------------------------------------------You can copy it from function module BAPI_IDOC_INPUT1 or from some other standard FM for IDOC inbound processing.
Go to transaction WE19 and create an IDOC and run processing with created function module in debugging mode. You will see that data you need to insert to DB are stored in IDOC_DATA and you should be able to insert them to DB in this FM. Finally, you have to configure inbound processing.
Put following keywords into search engine and you will find enough informations: inbound idoc processing configuration tutorial.
Regards,
Adrian
‎2010 Feb 22 6:36 AM
hello VANEETTHAKUR ,
for your requirement you will have to do the following thing,
1. build a OUTBOUND function module to build the idoc...
2. build a INBOUND function module to extract data from idoc and post in the table
3. currosponding message types and process code are to be creation
if the building part is done by some other developer and you just want to post the data then only the step 2 is to be done by you... Generalised your function INBOUND module will consist for following operation...
1. to extract data from idoc ie. loop at IDOC_DATA check the segment name extract dta into local variables
2. uptdate your Tables according to the requirement
3. UPdate/set the status of the idoc and return
‎2010 Feb 22 6:50 AM
hi,
can u provide me the logic means how i can create FM and how i will read file in that FM.
Regards,
Vaneet Thakur
‎2010 Feb 22 6:52 AM
You will not read a file inside a FM for inbound processing, you will process IDOC inside.