cancel
Showing results for 
Search instead for 
Did you mean: 

VBFA field

Former Member
0 Kudos

Hi,

I am having a hard time to identify, how the field stufe in vbfa is used. In the table description is says (Level of the document flow record) but i don't know how it can be used in a "where" condition on the "Select" on the table.

Thanks.

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi,

VBFA-STUFE can be thought of as the "degree of separation". If an invoice is created with reference to a delivery, then the entry in VBFA with the delivery as the preceding document and invoice as subsequtn will have a STUFE of "00".

The entry in VBFA with the order as preceding and invoice as subsquent will have STUFE = 01 to indicate there is a document between them.

For example, for the case where the preceding document is an order, If you have an entry in VBFA-VBTYP_N = M and VBFA-STUFE = 03 then you will find that for the corresponding VBFA-VBELV there is another entry with VBTYP_N = M and VBFA-STUFE = 00 or 01 (depending if it was order-related billing or delivery-related billing). This would have occurred if you had an original transaction (order 1) that was invoiced (say invoice A), then a new order (order 2) was created with reference to invoice A which wsa then invoiced (invoice B). There will be an entry in VBFA for

preceding subsequent stufe

order 1 invoice A 00 or 01

order 1 invoice B 03

order 2 invoice B 00

Hope this helps....

Robyn

Former Member
0 Kudos

above is the same scenario that i am encountering.. please reply to this thread if you already encounter the same issue...

Thank you so much..

Regards,

xtianALMIGHTY

madhu_vadlamani
Active Contributor
0 Kudos

HI xtianALMIGHTY,

Actually what is the business requirement. Please explain that.

Regards,

madhu.

Former Member
0 Kudos

Im just updating this thread, so that, if there is anyone who knows what does the level/s of the field stufe from the table vbfa corresponds to... thanks..

Regards,

xtianALMIGHTY

former_member209761
Active Contributor
0 Kudos

Dear xtianALMIGHTY ,

Will reply back when we find something about this field.

But is this a doubt or you have any requirement to be mapped using VBFA-STUFE?

Thanks & Regards,

Hegal K Charles

Former Member
0 Kudos

Hi Hegal K Charles

I am asking because I am encoutering an issue regarding on the pulling of data in the Sales Document Flow table, while printing the credit memo,

in the selection I have a:

Subsequent sales and distribution document (vbeln)

Subsequent item of an SD document (posnn)

Document category of preceding SD document (vbtypv_v)

SELECT SINGLE vbelv posnv FROM vbfa INTO (l_vbelv, l_posnv)

WHERE vbeln = z_vbeln

AND posnn = z_posnr

AND vbtyp_v = 'G'.

then i have 2 valid entries for those three filters that i have used.

i believe for that it will take the 1st entry rather than the 2nd one, because of the logic of the select single.

but there are instance in the data given by the user that it picks the 2nd entry instead of the 1st.

here is an example doc flow to explain it clearly.

... S&D Quote 56426874

.. S&D Authorization 60686941

. S&D Credit Claim Req 81249761

..... S&D Quote 56212135

.... S&D Authorization 60582594

... S&D Quote 56427016

.. S&D Authorization 60686947

. S&D Credit Claim Req 81249762

in this case it should pick 60686947, but on the credit memo 60582594 is picked from vbfa.

and on the table vbfa where in i follow the data to be inputed. it displays 2 entries

Table vbfa

vbelv posnn vbeln stufe vbtyp_v

60686947 00002 537439622 01 G

60582594 00002 537439622 03 G

and in most of my data, as i observed the field stufe which has a value of 01 is the one that should be pulled. Now, my proposed solution to this is to add the field stufe to the selection to pull the correct vbelv, but i am researching on what are levels of stufe because i wanted it to run smoothly and will not return any issue regarding my fix when it is implemented on the production.

Thank you so much for anwering my questions.

Regards,

xtianALMIGHTY

Former Member
0 Kudos

anyone who knows what does the level of the field stufe in table vbfa stands for? I am finding hard time to identify what does the numbers of stufe stands for.. thanks in advance..

Lakshmipathi
Active Contributor
0 Kudos

The field STUFE will get filled if your sale order material have multi level BOMs or WBS element or Product Hierarchies involved.

thanks

G. Lakshmipathi

Former Member
0 Kudos

Hi Lakshmipathi and Hegal K Charles,

Thanks to your good answers Hegal K Charles and Lakshmipathi.

Lakshmipathi, i want to know there respective levels because I've seen some VBELN has a value for stufe (1,2,3)

I would like to ask if what those numbers in stufe stands for? is 1 for the active doc number?( i dont know what their levels corresponds to)

Thanks.

former_member209761
Active Contributor
0 Kudos

Dear XtainAlmighty,

Table VBFA is mainly used to get the document flow.

For example, imagine you have to find a logic to get details from sales order tables (VBAK and VBAP)

and also some details from the delivery header and item (LIKP and LIPS) and print them in the Billing Output.

Now you can write the logic to fetch the details of VBAK/VBAP , LIKP/LIPS but for that you will have to find the link between the invoice and its sales order and delivery.

Now comes the use of VBFA . In VBFA , you can input your invoice number as the subsequent document

and execute. System will give all the preceding document as the output.

Now you can filter document type = c , which will be the sales order

document type = j , will be the delivery.

The reverse logic will work when you have a sales order and have to find the document created from it.

Please check the forum and you will get more input on this.

Thanks & Regards,

Hegal K Charles