Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Depot Sale

Former Member
0 Kudos

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 ?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.

4 REPLIES 4

Lakshmipathi
Active Contributor
0 Kudos

Moved from SAP ERP Sales and Distribution (SAP SD) to Internationalization and Unicode.  Post all your CIN related queries here.

G. Lakshmipathi

Former Member
0 Kudos

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.

Former Member
0 Kudos

Thanks Himavanth sir, i am new to this forum. Hope to learn things soon with guidance of people like you.

0 Kudos

Hi Mobashir,

If the above suggestion solves your problem then close the thread.

So that it will be useful for others.

Regards,

S.Himavanth.