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: 

adding a field to FBL3N

Former Member
0 Kudos

Hello,

I have a request to add the offsetting account name to the FBL3N screen. I have traced the program RFITEMGL to try to understand the process. FBL3N looks like it works with ALV. I have not worked with ALV before so it is a little confusing. If I want to add the code to retrieve the offsetting account name, do I do this in the RFITEMGL program? After the screen is displayed, you have the option to do a "change layout" where you can select the fields that you want to appear on the screen. If I select the offseting account number, I want the name to appear as well. again, do I have to change only RFITEMGL or are there some other places that have to have modifications performed in order to accomplish this?

thanks in advance for your help.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Sridhar - thanks for your help on this.

I have one more question and depending on the answer, I should be okay to proceed. steps 2 and 3 of note 112312, for step 2 I found LINE_ITEMS_GET_GKONT and for step3 for the "P/S modules" and event 00001650 the product name is LINE_ITEMS_GET_GKONT. note 368310 talks about sample code. Am I supposed to copy LINE_ITEMS_GET_GKONT to a Z function module, add the sample code to retrieve the offsetting account name, and then replace the product entry name in the P/S module with my new Z module? Is this what the notes are trying to tell me?

18 REPLIES 18

sridhar_k1
Active Contributor
0 Kudos

Take a look at oss note 112312, might help you adding the field.

Regards

Sridhar

Manohar2u
Active Contributor
0 Kudos

Inorder to display an extra field in this standard report.

1) You need to copy this report into customer report ZREP.

2) Find the final internal table data which is displayed and passed to ALV function module.

3) Loop at that internal table and update the field you want to display. ( internal table should be changed at declaration by addding new field)

4) Update your field catalog with this new field

Regds

Manohar

Former Member
0 Kudos

whenyou talk about the internal table, are you talking about the structure RFPOSXEXT?. will I have to modify this structure to add the offset account name? if I have to modify, do I modify the existing structure or do have to copy this out to a new name

Former Member
0 Kudos

Search for the function REUSE_ALV_GRID_DISPLAY and you will find beside the table parameter t_outtab the internal table that our friend is talking about. Once you find, add your field to this internal table.

Please, mark ALL useful answers if it helps you.

Regards,

Felipe Cunha [Fpdc]

Former Member
0 Kudos

I do not see that function anywhere in the RFITEMGL program or any of the includes. all I have are for the include rfitem_inc in program RFITEMGL

REUSE_ALV_GRID_LAYOUT_INFO_GET

REUSE_ALV_LIST_LAYOUT_INFO_GET

REUSE_ALV_FIELDCATALOG_MERGE

REUSE_ALV_VARIANT_SELECT

REUSE_ALV_VARIANT_DEFAULT_GET

REUSE_ALV_VARIANT_EXISTENCE

is it possible that the function REUSE_ALV_GRID_DISPLAY is called within one of the function above.

Former Member
0 Kudos

Hi Timothy,

You need to copy the RFITEMGL into a Z program and there is an function FI_ITEMS_DISPLAY which will take care of the ALV part. This function module is used to create List or Grid ALV display. The internal table passed by this function module is IT_POS which will contain your final internal table. You need to find the offset a/c and populate 1 of the following internal tables based on relevance :it_accts[]

it_comps[]

it_h_t001[]

it_h_skat[]

it_h_skb1[].

Cheers,

Vikram

Pls reward for helpful replies!!

Former Member
0 Kudos

I found where IT_POS is being defined.

<b>it_pos like rfposxext occurs 1 with header line.</b>

<u>questions</u>

1) will I have to modify the structure RFPOSXEXT and add the offset account name?

2) to find the offset account name - i can use the offset account number and do a select against the LFA1 table correct?

Former Member
0 Kudos

I am having dome problems with this and I am hoping you can answer them for me

1) I copied the program RFITEMGL to ZRFITEMGL. the includes are still named with the original names. can I just right click on the include and copy the include to a "Z" include. I would check and rename any occurance iof the include to the new include. Is this correct?

2) I have read note 112312 and it seems confusing to me. is this what I have to in order to get offsetting account name for lines item?

3) I think I will have to modify the structure RFPOSXEXT and add the offset account name? there seems to be a process to do this.

1. Append basic structure RFPOSX with your field.

2. Run program RFPOSXEXTEND that extends structure RFPOSXEXT.

3. Run program BALVBUFDEL to delete the buffer.

am i going to modify the sap delivered structures? is this what is normally done? what about anything else that is using these structures?

0 Kudos

What version are you using?, what part of note 112312 is confusing to u, and do you want to display offsetting a/c number or name?

Regards

Sridhar

Former Member
0 Kudos

<b>What version are you using?,</b>

version 5

<b>what part of note 112312 is confusing to u,</b>

step4. when is states to call the line item display and start ist. I think this means to call fbl3n. it talks about the 'change layout' button and coping the offseting information to the display variant.

for the most part I have anything for this note in place. I am not sure from this notes how to get the offsetting account name.

<b>and do you want to display offsetting a/c number or name?</b>

offsetting account name

0 Kudos

Offset acc name, u mean acc short text like SKAT-TXT20 or long text SKAT-TXT50, is it?

Here's how to go abt displaying it:

It's combination of notes: 112312 and 368310

1. Implement Step 1 of note 368310

2. Implement Step 2 and 3 of note 112312,

also after getting GKONT in the custom function module,

get text of GKONT from SKAT or if it's different from SKAT get it and populate the corresponding field.

U can use the sample code from correction instructions of note 368310

3. Execute FBL3n, Default variant doesn't show the new fields,

How to show the new fields is described in step 4 of note 112312.

New fields will be in the hidden fields on the right side when you got to 'Settings --> Display Variant --> Current'

They are towards the end of the list, select and click on left arrow button and click copy.

Regards

Sridhar

Former Member
0 Kudos

i looked up the note for 368310. i have a question on the first step. it states "Extend structure RFPOS and RFPOSX by an append structure." how is this done? is there a special transaction or program for this? the notes also references a example. Where do I get this example? I have looked thru all of the tabs and I cannot see anything resembling example code

0 Kudos

You can extend RFPOS and RFPOSX by appending a Z structre in SE11.

SE11, display RFPOS, Goto->append structure click on new button, give a name and add teh required field.

YOu can use the same Z structure in RFPOSX.

Regards

Sridhar

Former Member
0 Kudos

Sridhar - thanks for your help on this.

I have one more question and depending on the answer, I should be okay to proceed. steps 2 and 3 of note 112312, for step 2 I found LINE_ITEMS_GET_GKONT and for step3 for the "P/S modules" and event 00001650 the product name is LINE_ITEMS_GET_GKONT. note 368310 talks about sample code. Am I supposed to copy LINE_ITEMS_GET_GKONT to a Z function module, add the sample code to retrieve the offsetting account name, and then replace the product entry name in the P/S module with my new Z module? Is this what the notes are trying to tell me?

0 Kudos

Yes, create a Z function module with same import export parameters and code as LINE_ITEMS_GET_GKONT.

After GET_GKONT in the Z module, select the text of the account using e_postab-gkont or as mentioned in the correction instructions tab of note 368310 if the text is in table t074t.

Create a product of any name and description in FIBF menu: 'Settings -> Products -> ...of a customer', check active chebox. and save.

Add 00001650 as new entry in FIBF menu: Settings --> P/S modules -->...of a customer, enter product name from previous step, and the function module name is the Z module.

Regards

Sridhar

Former Member
0 Kudos

I created a Z function module and added the code. I am going to have to change the code because I am selecting the offsetting accoutn anme from the SKAT tabvble and I was told that this is not correct. I should mirror the logic in KSB1 which does this process. There seems to be separate tables that hold the offsetting account information depending on the type iof the account.

I also created the product in FIBF and the new entry in the P/S module. I have two questions

1) I noticed that when I call the production FBL3N, it is using the Z function and not the original function assigned to the original entry. Is this what it is supposed to do?

2) I can see the new field in the it_pos table but I cannot get it to display on the screen. I cannot select it when I do the "change layout" function". Is there something else that I have to do in order to be able to display this?

if the logic to derive the offsetting account information is coded in the new Z function module and the structures are modified to handle to new entry, is there a reason why I need to copy the RFITEMGL program to the Z program? Is there code that I must add to this program in order to accomplish obtaining and displaying the offset account name?

thanks for the help on this.

0 Kudos

1. FBL3N calls FM BF_FUNCTIONS_FIND to process all BTE FM's assigned to event 1650, It decides which FM to process, refer to the documentation attached to BF_FUNCTIONS_FIND in SM37, gives u an idea of how the assigned BTE FMs are processed

2. Is the new field in the structure RFPOSXEXT?, all fields in that structure should be available for display in the ALV, because it's assigned to parameter I_STRUCTURE_NAME of FM REUSE_ALV_LIST_DISPLAY in FM FI_ITEMS_DISPLAY.

If it's the last field in RFPOSXEXT, usually it appears as last field in the Hidden fields when you select Settings->Layout->current in the ALV list.

You Don't need to copy RFITEMGL or do any extra coding to display the field in the final report.

Regards

Sridhar

Former Member
0 Kudos

for FBL3n, you enter the account and and the compnay code. to retrieve the account name from the SKAT table I also need the chart of accounts name. Is there a way to find this using the account number and the compnay code? I am looking at the SKA1 and SKB1 and I don't think I can use these tables.

thanks...