cancel
Showing results for 
Search instead for 
Did you mean: 

Add BSTNK to FBL5N

0 Kudos

Hi,

I would like to include field BSTNK in FBL5N.


My BTE works for FM 1650 as I am able to see the field. However no data shows. I have tried tables VBKD and VBAK and no values poulate.

But when I use another table (VBRP) and another text field (ARKTX) it works as expected.


Here is the code that works:

E_POSTAB = I_POSTAB.

if sy-tcode = 'FBL5N'.

tables vbrp.

select single arktx

   from vbrp

   into e_postab-zzbstnk

   where vbeln = i_postab-vbeln.

   endif.

Here is the one that does not work:

E_POSTAB = I_POSTAB.

if sy-tcode = 'FBL5N'.

tables vbak.

select single bstnk

   from vbak

   into e_postab-zzbstnk

   where vbeln = i_postab-vbeln.

   endif.

The only difference between these 2 is the tables/fields used.

I appreciate any assistance.


If I am in the wrong forum space, please let me know....

Thanks,

Sonia.

Accepted Solutions (1)

Accepted Solutions (1)

iklovski
Active Contributor
0 Kudos

Hi,

Try giving condition: where vbeln = i_postab-vbel2.

Regards,


Eli

0 Kudos

Thanks Eli & Jov!

I had a feeling it was something along the lines of my interpretation of the fields in RFPOS structure.

Thanks for clearing that up. Makes sense.

Eli, I ended up finding a corresponding field (SGTXT) in table bsis with the fields I wanted from VBAK so I used that one and it worked. However, this is very helpful for future reference where i have to add sales order fields to FBL5N.

Thanks sooo much but y'all and just to be sure, vbel2 will give me the corresponding sales doc number in RFPOS?

Thanks,

Sonia.

iklovski
Active Contributor
0 Kudos

It should, but I cannot confirm, as in my current system we have no SD, so I'm not able to check for sure.

0 Kudos

I checked it and yes, VBEL2 is the Sales Document for RFPOS....Thanks again...

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Sonia,

vbak-vbeln is the sales document number and i_postab-vbeln is the invoice number. Whereas vbrp-vbeln is the invoice number.