2009 Dec 07 9:14 AM
Hi,
i have req, to post excess invoice had searched in the forum got the function module to post automatically (BAPI_EXCINV_CREATE_FROMDATA),but not able understand ... please send sample code....
regards,
santosh
Edited by: santosh jajur on Dec 7, 2009 10:29 AM
Edited by: santosh jajur on Dec 7, 2009 10:39 AM
Edited by: santosh jajur on Dec 7, 2009 11:20 AM
Edited by: santosh jajur on Dec 8, 2009 8:55 AM
Hi,
i have req, to post excess invoice had searched in the forum got the function module to post automatically (BAPI_EXCINV_CREATE_FROMDATA),but not able understand ... please send sample code....
regards,
santosh
Edited by: santosh jajur on Dec 7, 2009 10:29 AM
Edited by: santosh jajur on Dec 7, 2009 10:39 AM
Edited by: santosh jajur on Dec 7, 2009 11:20 AM
Edited by: santosh jajur on Dec 8, 2009 8:55 AM
2009 Dec 08 8:13 AM
code snippet :
DATA:BEGIN OF obhead.
INCLUDE STRUCTURE bapi_j_1iexchdr.
DATA:END OF obhead.
DATA: BEGIN OF errmsg OCCURS 10.
INCLUDE STRUCTURE bapiret2.
DATA: END OF errmsg.
DATA: BEGIN OF itab OCCURS 100.
INCLUDE STRUCTURE bapi_j_1iexcdtl.
DATA: END OF itab.
obhead-excise_number = 'INV960/09'.
obhead-excise_date = sy-datum.
obhead-reference_doc = '5000001638'.
obhead-ref_year = '2009'.
obhead-REF_INDICATOR = 'R'.
CALL FUNCTION 'BAPI_EXCINV_CREATE_FROMDATA'
EXPORTING
obj_header = obhead
process_flag = 'I'
TABLES
obj_item = itab
return = errmsg.
CLEAR errflag.
LOOP AT errmsg.
IF errmsg-type EQ 'E'.
WRITE:/'Error in function', errmsg-message.
errflag = 'X'.
ELSE.
WRITE:/ errmsg-message.
ENDIF.
ENDLOOP.
2009 Dec 08 9:02 AM
Hi Vasuki S Patki ,
Thanks for reply and also searched in forum u having same type issues can explain clear how solve this issue and also in my function module does not cantain any source code
can send me the deatails of coding step by step... please.
regards,
santosh
2009 Dec 08 9:07 AM
Hi Santosh,
yes, the code is commented in few releases. but, It is available in ECC .
I think it would be better to go for BDC.
2009 Dec 08 9:33 AM
Hi Vasuki S Patki,
Can ve copy code form ecc and implent it will creates any promblem ... am not much aware about the functional thing..
regards,
santosh