Skip to Content

FAGLB03- add SD fields added in config but not populating

Good Morning SAP Gurus-

I am unhappy to open this question but I am confused. My client wants to populate Customer and Sales Document to the FI document in SAP. We are on ECC 6.0. I have done this many times in the past and this time, it is not working. Here is what I have done:

SPRO=> FA=> GL=> Line items=> Define Special Fields for line item display

I have added the following:


BSEG EBELN Purchase document




BSEG XREF1 Ref key 1

BSEG XREF2 Ref key 2

Once changes were made, I execute FAGLB03 and I add the fields to the selection and the data is blank? The data is there on the Sales Order.

In addition, I have noticed that if the GL does not have the Customer in the offset, the detail is blank. Is there a solution to trigger the system to find the customer when one is not found??

Thanks a million!!


Thank you

Edited by: AMS on Apr 13, 2011 10:46 AM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Apr 14, 2011 at 04:52 PM

    Hi AMS

    Adding to Fernando's reply.....

    In SAP ECC 6.0 you can use FAGLL03 in addition to FBL*N for line item display. For displaying offset account info in FAGLL03 report, you must create and activate an implementation for the 'FAGL_ITEMS_CH_DATA' BAdI.

    We had a requirement to add offset account text in the layout, to meet this requirement we implemented a BAdi 'Z_FAGL_ITEMS_CHANGE_DATA' by writing additional logic.

    I guess you could achive this with little help from ABAP side by adding few lines of logic, without toching the offset account info logic after creating a new implementation.

    To create an implementation of the BAdi,

    Call transaction SE19 and Choose Classic BAdi and enter the BAdi Name as 'FAGL_ITEMS_CH_DATA' and click on Create Impl. Button and create a new implementation.

    As the Definition name select 'FAGL_ITEMS_CH_DATA'.

    Enter an Implementation Name u2018Z_FAGL_ITEMS_CH_DATAu2019

    On the 'Interface' tab select the 'CHANGE_ITEMS' method.

    Let me know if this helps resolving your problem.


    KIM Khan

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Apr 13, 2011 at 08:41 PM


    You can review note 215798 and 984305 regarding definition of special fields.

    The 'basic structure' for displaying the items is FAGLPOSE.

    From the relevant entries in the T021S table, the system generates the

    FAGLPOSYEXT structure. The special fields have the first characters


    Both structures are included in the FAGLPOSX structure, which is used for the display.

    You must have in your special fields the names like U_EBELN .

    After the procedure for adding special fields, and as per the note, regenerate the

    buffer with report BALVBUFDEL, and also run function module

    ITEM_STRUC_EXTENSION per the instructions in the note.

    Then test this again to see if there is any improvement.

    Also check the following information:

    In standard the vendor or customer number could NOT have been filled for these line item.

    The reason is that this line item is a PURE G/L account line item, and

    the vendor or customer number is not filled in such DIRECT FI postings.

    But how to implement the offsetting account logic for the FAGLL03 is

    described in the note 1034354.

    Now if you would want to also update the VENDOR or CUSTOMER field

    with the offsetting account if this OF COURSE is a vendor or customer,

    you would have to use the following coding in the BADI method


    DATA: wa_items TYPE faglposx.

    LOOP AT ct_items INTO wa_items.



    belnr = wa_items-belnr

    bukrs = wa_items-bukrs

    buzei = wa_items-buzei

    gjahr = wa_items-gjahr

    gknkz = '3'


    gkont = wa_items-gkont

    koart = wa_items-gkart


    belnr_not_found = 1

    buzei_not_found = 2

    gknkz_not_found = 3

    OTHERS = 4.

    IF sy-subrc = 0.

    IF wa_items-gkart = 'D' AND wa_items-kunnr IS INITIAL.

    wa_items-kunnr = wa_items-gkont.


    IF wa_items-gkart = 'K' AND wa_items-lifnr IS INITIAL.

    wa_items-lifnr = wa_items-gkont.


    MODIFY ct_items FROM wa_items.



    With this the vendor and customer field would be filled, where the

    offsetting line item is a vendor or customer.

    I hope I could be of assistance.

    Kind Regards,


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.