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: 

routine creation

Former Member
0 Kudos

Hi folks,

i have below requirement

1.Get the Billing Document numbner.

2.Through document flow get the Sales Document number and document type.

3.Check if the Document type is Proejcts Order type.

4.If the Sales Document type is Projects Related then send the return code 4 .

to reach the above requirement, how can i write the code in pricing routine, could any one help me on this,

thanks in advance.

3 REPLIES 3

Former Member
0 Kudos

Hi ,

First of all where is routine to be called when do u do billing .

if yes then

xvbrk-vbeln would be Billing document number

xvbrp-aubel would be sales order number .

based on that select from VBAK will get document type .

0 Kudos

Check Standard program RV80HGEN.

Former Member
0 Kudos

Hi,

First get the billing document number from table VBRK.

Get the sales document number of particular billing document by using table VBFA.

For this sales order number check the AUART field values in table VBAK.

If AUART is project related then retunr sy-subrc = 4.

Thanks,

radha.