Hi Aromal,
Thanks for your reply. Yes I had done as you suggested and was able to successfully capture the excise invoice using J1IEX_C tcode but the part1 and part 2 details are not updated. Please can you tell me how we can post using J1IEX_C tcode. I checked the internet and found that we can use J1I5 to update part 1 and J1IEX to post(part2 also updated here). But while creating BDC and executing it the material doc no, posting date and classification is not getting updated on the screen. If I need to run the J1I5 tcode manually. Please can you help me in identifying why the values of material doc no, posting date and classification is not flowing into the screen parameters.
This is my program for J1I5
DATA: it_item TYPETABLEOF ty_part1,
wa_item TYPE ty_part1.
f_option-updmode = 'L'.
f_option-defsize = 'X'.
f_option-dismode = 'A'.
CALLFUNCTION'CONVERSION_EXIT_PDATE_OUTPUT'
EXPORTING
input = wa_mkpf-budat
IMPORTING
output = v_date.
wa_part1-bukrs = ekko-bukrs.
wa_part1-werks = ekpo-werks.
wa_part1-exgrp = wa_final-exgrp.
wa_part1-mblnr = materialdocument.
wa_part1-budat = v_date.
wa_part1-class = 'ROP'.
* APPEND wa_part1 TO it_part1.
*
* it_item = it_part1.
* SORT it_item BY mblnr.
* DELETE ADJACENT DUPLICATES FROM it_item.
*
* LOOP AT it_part1 INTO wa_part1.
PERFORM bdc_dynpro USING'J_1IREGSN''1000'.
PERFORM bdc_field USING'BDC_CURSOR'
'C_BTH_MD'.
PERFORM bdc_field USING'BDC_OKCODE'
'=ONLI'.
PERFORM bdc_field USING'BUKRS'
wa_part1-bukrs. " 'IN10'.
PERFORM bdc_field USING'WERKS'
wa_part1-werks. " 'IN01'.
PERFORM bdc_field USING'EXGRP'
wa_part1-exgrp. "'10'.
* ENDLOOP.
*
* LOOP AT it_item INTO wa_item WHERE mblnr = wa_part1-mblnr.
PERFORM bdc_field USING'MBLNR-LOW'
wa_part1-mblnr. " '5000000297'.
PERFORM bdc_field USING'BUDAT-LOW'
wa_part1-budat. " '05.10.2014'.
PERFORM bdc_field USING'P_CLSFCN'
wa_part1-class. "'ROP'.
* PERFORM bdc_field USing 'r_doc_dt'
* ''.
PERFORM bdc_field USING'R_PST_DT'
'X'.
PERFORM bdc_field USING'R_RG23A'
'X'.
PERFORM bdc_field USING'C_BTH_MD'
'X'.
PERFORM bdc_dynpro USING'J_1IREGSN''1000'.
PERFORM bdc_field USING'BDC_OKCODE'
'/EE'.
PERFORM bdc_field USING'BDC_CURSOR'
'BUKRS'.
* PERFORM bdc_transaction USING 'J1I5'.
CALLTRANSACTION'J1I5'USING t_bdcdata
OPTIONS FROM f_option
MESSAGES INTO itab_bdcmsgcoll.
IF sy-subrc EQ0.
v_subrc = sy-subrc.
ELSE.
ENDIF.
* ENDLOOP.
ENDFORM. " UPDATE_PART1
Thanks,
Priya