SAP GST India J_1IG_INV BAPI

SAP BAPI to post GST Invoice J_1IG_INB_INV_CREATE

DATA : gv_ktopl TYPE ktopl,
gv_gjahr TYPE bkpf-gjahr,
gv_awsys TYPE logsystem.

SELECT SINGLE a~vbeln, “Invoice Number
a~bukrs, “Company Code
a~bupla, “Shipping Plant
b~blart
* c~ebeln “PO No
* c~werks “Plant Code
FROM vbrk AS a
INNER JOIN j_1ig_doctyp_con AS b ON
b~bukrs = a~bukrs
INTO @DATA(ls_result)
WHERE vbeln = @dono.

*** Get the document type
CALL FUNCTION ‘FI_CHART_OF_ACCOUNT_DETERMINE’
EXPORTING
i_bukrs = ls_result-bukrs
IMPORTING
e_ktopl = gv_ktopl.
*** Get Fiscal year
CALL FUNCTION ‘GET_CURRENT_YEAR’
EXPORTING
bukrs = ls_result-bukrs
date = sy-datum
IMPORTING
curry = gv_gjahr.

*** Get the logical system
CALL FUNCTION ‘OWN_LOGICAL_SYSTEM_GET’
IMPORTING
own_logical_system = gv_awsys
EXCEPTIONS
own_logical_system_not_defined = 1
OTHERS = 2.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.

*
*CALL FUNCTION ‘J_1IG_INB_INV_CREATE’
* EXPORTING
* im_bukrs = ls_result-bukrs
* im_werks =
* im_vbeln = ls_result-vbeln
* im_ktopl = gv_ktopl
* im_gjahr = gv_gjahr
* im_awsys = gv_awsys
* im_swerks = ls_result-bupla
* im_ebeln = “PO Number
* im_xblnr = “Inoive No
* im_badi = gv_badi
* im_blart = ls_result-blart
* IMPORTING
* ex_belnr = lv_belnr
* TABLES
* t_return = it_return.

Leave a Reply

Your email address will not be published. Required fields are marked *