08-19-2015 1:11 PM
In a Depot Sale excise invoice is created after PGI and before invoice- How can we block the billing for a delivery whose excise invoice is not yet created ?
08-20-2015 8:54 AM
HI Mobashir,
Normally spoon feeding is not recommended in the forum. search the threads before posting a query.
you can meet your requirement as mention.
In the copy controls of delivery document to billing document of depot sales(VTFL) have a custom copy routine to fulfill your requirement. Prepare FS for the same & ask your abaper to place the below mentioned code.
DATA: V_WERKS type LIPS-WERKS .
DATA: V_werks1 type J_1IWRKCUS-J_1IWERKS.
DATA: V_vbeln type likp-vbeln.
select single werks from lips INto v_werks where VBELN = likp-vbeln.
if sy-subrc = 0.
select single J_1IWERKS from J_1IWRKCUS INTO V_WERKS1 where J_1IWERKS = V_WERKS
and J_1IDEPOT = 'X'.
if sy-subrc = 0.
select single VBELN from J_1IRG23D INTO v_vbeln where vbeln = likp-vbeln.
if sy-subrc ne 0.
MESSAGE 'Invoice cannot be created as Depot excise invoice is not created' type 'E'.
endif.
else.
clear sy-subrc.
endif.
endif.
Regards,
S.Himavanth.
08-19-2015 3:06 PM
08-20-2015 8:54 AM
HI Mobashir,
Normally spoon feeding is not recommended in the forum. search the threads before posting a query.
you can meet your requirement as mention.
In the copy controls of delivery document to billing document of depot sales(VTFL) have a custom copy routine to fulfill your requirement. Prepare FS for the same & ask your abaper to place the below mentioned code.
DATA: V_WERKS type LIPS-WERKS .
DATA: V_werks1 type J_1IWRKCUS-J_1IWERKS.
DATA: V_vbeln type likp-vbeln.
select single werks from lips INto v_werks where VBELN = likp-vbeln.
if sy-subrc = 0.
select single J_1IWERKS from J_1IWRKCUS INTO V_WERKS1 where J_1IWERKS = V_WERKS
and J_1IDEPOT = 'X'.
if sy-subrc = 0.
select single VBELN from J_1IRG23D INTO v_vbeln where vbeln = likp-vbeln.
if sy-subrc ne 0.
MESSAGE 'Invoice cannot be created as Depot excise invoice is not created' type 'E'.
endif.
else.
clear sy-subrc.
endif.
endif.
Regards,
S.Himavanth.
08-21-2015 6:26 AM
Thanks Himavanth sir, i am new to this forum. Hope to learn things soon with guidance of people like you.
08-22-2015 7:13 AM
Hi Mobashir,
If the above suggestion solves your problem then close the thread.
So that it will be useful for others.
Regards,
S.Himavanth.