Iam trying to do an interface with idocs.just tryin to put some default values before uploading to sap.
iam creating a function module with input and output parameters as same as that of IDOC_INPUT_ACC_BILLING.
Iam declaring sements like this..
E1BPACHE01 like E1BPACHE01,
E1BPACAR01 like E1BPACAR01,
E1BPACGL01 like E1BPACGL01,
E1BPACCR01 LIKE E1BPACCR01,
wa_control like line of IDOC_CONTRL,
wa_data like line of IDOC_data,
I_EDIDD TYPE ZEDIDD.
REFRESH I_EDIDD.
adding data to internal table.
LOOP AT IDOC_CONTRL INTO WA_CONTROL.
LOOP AT IDOC_DATA into wa_data WHERE DOCNUM = WA_CONTROL-DOCNUM.
APPEND wa_DATA TO I_EDIDD.
ENDLOOP.
LOOP AT I_EDIDD INTO wa_DATA.
CASE wa_DATA-SEGNAM.
WHEN 'E1BPACHE01'.
E1BPACHE01 = wa_DATA-SDATA.
*********
IF E1BPACHE01-COMP_CODE
IS INITIAL.
move '0000' to E1BPACHE01-COMP_CODE.
endif.
*********
like this am checking other segments and changing values of field wat i require.the
then..
endcase.
modify I_EDIDD FROM WA_DATA.
ENDLoop.
ENDLOOP.
then am calling one standard function module IDOC_INPUT_ACC_BILLING for posting purpose.
please help me
the whole scenario described above is not working ..just tell me where i went wrong