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: 

cant get field STCD3 from lfa1

Former Member
0 Kudos

Hi im using the logical tabla kdf i need the field STCD3, i try to get it from the

get LFA1.

MOVE LFA1-STCD3 to i_lfa1-stcd3.

But the value is ##################.

in the table lfa1 with the same lifnr it does have the correct value,

i have already solved like this,

get LFA1.

select stcd3

from lfa1

into lfa1-stcd3

where lifnr eq lfa1-lifnr.

endselect.

MOVE LFA1-STCD3 to i_lfa1-stcd3.

Still i want to know why some fields have ##### instead of the value.

Thanks

Pablo Santos

1 ACCEPTED SOLUTION

Former Member
0 Kudos

I don't know a whole lot about logical databases, but I did a performance trace on your code and found that the database is selecting from the view VF_KRED not LFA1. (I couldn't see how this was defined in the LDB.) VF_KRED doesn't include lfa1-stcd3 (and a number of other fields), so I guess the bottom line is that if you need this field, you can't use this logical database.

Rob

4 REPLIES 4

Former Member
0 Kudos

This typically happens if you are inside a loop and you are in the 'AT NEW f1' or 'AT LAST f1' or 'ON CHANGE OF f1' etc. These will read the values of the fields up to the field f1 in your internal table. All others will be filled with ###. In such cases you have re-read the line of the table to see the rest of the values.

0 Kudos

The trouble its that i'm taking the value right after the get event from the logical tables. it shouldn't be happening.

Even when i'm debbuging the value all the time its #####..

My code its.

GET lfa1.

move lfa1-stcd3 to i_lfa1-stcd3.

GET LFB1.

move-corresponding lfb1 to i_lfa1.

...

Pablo Santos.

Former Member
0 Kudos

I don't know a whole lot about logical databases, but I did a performance trace on your code and found that the database is selecting from the view VF_KRED not LFA1. (I couldn't see how this was defined in the LDB.) VF_KRED doesn't include lfa1-stcd3 (and a number of other fields), so I guess the bottom line is that if you need this field, you can't use this logical database.

Rob

0 Kudos

Rob is correct, even I am trying to figure out where VF_KRED came into picture when this logical database is used. I will post my findings here soon.

Srinivas