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: 

Need to find table/field behind "Item long text" field in Notes tab in FB70

Former Member
0 Kudos

Hello,

To print a custom FI invoice, I need to access the data entered in the "Item long text" field of the Notes tab in FB70. To test, I used 5000 characters in that field to make sure it stood out from the rest of the data. F1 help does nothing on that field, and even running an SQL trace (ST05) doesn't show the text in that field being entered into any table. I tried F1 on a nearby field and got a structure instead of a table, so I investigated the structure through SE11 but found no character field with such a large capacity. How else can I find where that field is stored?

4 REPLIES 4

Former Member
0 Kudos

I should mention I've tried other options as well, like some of the ones suggested at the [Mungapen SAP blog|http://www.consulting.mungapen.com/2010/01/05/top-five-ways-to-find-a-table-and-field-within-a-transaction], but I'm fairly new to SAP and probably don't know how to use them most effectively.

0 Kudos

The tables are the STX* tables but you'll use functions to get the info. Set a breakpoint in function READ_TEXT or READ_TEXT_INLINE and you'll find the details you need. You can find this information in the call stack list from transaction SE30 - Runtime Analysis.

0 Kudos

Hi,

Item Long text can be extracted using the function module READ_TEXT with following values

Text Name : Company code + Document Number + Fiscal Year + Line item id 
            (BKPF-BUKRS + BKPF-BELNR + BKPF-GJAHR + BSEG-BUZEI)
Text Id : 0001
Text Object : DOC_ITEM.

Search SCN to get details of how to use the FM READ_TEXT.

Regards

Vinod

0 Kudos

Thanks! It took a while, but with your help and a few other pages I managed to piece together an answer.

Vinod helpfully explained that the text name is a concatenation of various fields, but didn't specify how to find the line item ID. If you go to table STXH (as hinted by Brad and confirmed [here|http://fuller.mit.edu/SAPWebDocs/LongComment.html]) and search for texts created today (or whenever you were testing), you'll see the text name ends in '001' after GJAHR, so the line item ID is '001' regardless of how many line items you enter in the invoice.

Armed with that info, you can call READ_TEXT and loop through the results to concatenate the contents of each TDLINE field. (FB70 automatically breaks the user-entered text into different lines even if the user didn't press Enter, and each line gets its own record in the results.)

Thanks again,

Pedro