07-22-2008 6:22 AM
Hi ,
How to create IDocs from the Flat file . For my business requirement LSMW through IDoc will not fit .
Thanks for watching this thread .
Regards
Sree
07-22-2008 6:23 AM
Hi,
you can do this scenario by using XI (FILE 2 IDOC)
Regards
sri
07-22-2008 6:27 AM
Hi Kanth ,
Thanks for ur reply , I am expecting an independent solution with out middle wares or XI . The solution I am expecting like to be handled in ABAP other than the middle ware.
Regards
Sree
07-22-2008 6:50 AM
Hi Sree,
You can create Inbound IDoc directly from your custom program after reading the flat file.
For this you need to use the Function Module IDOC_INBOUND_WRITE_TO_DB to create the IDoc.
CALL FUNCTION 'IDOC_INBOUND_WRITE_TO_DB'
EXPORTING
pi_do_handle_error = v_do_handle_error
pi_return_data_flag = ' '
IMPORTING
pe_idoc_number = control_record_db_in-docnum
pe_inbound_process_data = v_inbound_process_data_in
TABLES
t_data_records = i_data_records_db "IDoc Data
CHANGING
pc_control_record = control_record_db_in "Control Data
EXCEPTIONS
idoc_not_saved = 1
OTHERS = 2.
After this you can use the FM 'IDOC_START_INBOUND' to process the IDoc.
CALL FUNCTION 'IDOC_START_INBOUND'
EXPORTING
pi_inbound_process_data = v_inbound_process_data_in
pi_called_online = c_check "'X'
succ_show_flag = c_check "'X'
TABLES
t_control_records = i_control_records
EXCEPTIONS
OTHERS = 1.
Or else you can process the Inbound IDoc using transaction like BD87
07-22-2008 6:54 AM
Hi
Go through the link given below:
http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
With Regards
Nikunj Shah