2005 Oct 25 8:18 AM
Hi,
I have made a copy of the program RFITEMAR/txn FBL5N, But I cannot save layouts for this program, I can create a new layout but cannot set this layout as the default initial layout.
Help would be appreciated,
Thanks,
Hi,
I have made a copy of the program RFITEMAR/txn FBL5N, But I cannot save layouts for this program, I can create a new layout but cannot set this layout as the default initial layout.
Help would be appreciated,
Thanks,
2005 Oct 25 9:28 AM
ALV layouts are program specific. On the ALV screen you goto layout administration, where you can change a layout or set it to default. What is the problem , are you getting any error message while saving the variant.
Cheers.
2005 Oct 25 10:21 AM
Hi,
there's a fm 'FI_ITEMS_DISPLAY'
in the report .
check parameters and change par. caller_repid
Andreas
2005 Oct 25 1:20 PM
Thank you for the response.
Let me be clearer.
I want to save a layout for the program YRFITEMAR; this is a copy of RFITEMAR,
I would like to create a layout for the YRFITEMAR and make the layout the default layout. I have been able to create new
layouts using administration but I could not save/set one of these new layouts as the default initial layout. I have tried to
default an SAP defined layout but couldn't do it. Further I have changed the program name parameter in FI_ITEMS_DISPLAY to
sy-repid, so it does accept the new program name.
2005 Oct 25 1:22 PM
2005 Oct 25 1:36 PM
Hi Nagaraju,
The following is a piece of code from FI_ITEMS_DISPLAY,
if not is_u_variant-variant is initial.
check existence of named variant:
perform alv_variant_check changing x_varexist.
if x_varexist is initial.
message i000(msitem) with is_u_variant-variant.
endif.
else.
check existence of default variant:
perform alv_default_check changing x_varexist.
endif.
if x_varexist is initial.
take 1SAP, if it exists:
clear is_u_variant.
case acctype.
when 'D'.
<b> is_u_variant-report = c_program_ar.</b>
when 'K'.
is_u_variant-report = c_program_ap.
when 'S'.
is_u_variant-report = c_program_gl.
endcase.
is_u_variant-variant = '1SAP'.
is_u_variant-username = sy-uname.
perform alv_variant_check changing x_varexist.
if x_varexist is initial.
clear is_u_variant.
endif.
endif.
Now if you dont have a default variant for the first time system changes is_u_variant-report to c_program_ar (RFITEMAR).
And from that point onwards the variants that you create, get created for RFITEMAR !!
I suggest you first try changing <b>is_u_variant-report</b> in debugger after the above processing block to YRFITEMAR and then try creating a layout and mark it as default.
I think then next time onwards you should be able to see the default layout..
Hope this helps..
Sri
2005 Oct 26 10:10 AM
I re-did everything
1) Created a copy of RFITEMAR – ZRF2
2) Changed c_program_ar to sy-repid (it would accept the current program)
3) Extecuted ZRF2
4) Created a new layout and made it the default layout in Administration
But the new layout does not default.
5) I can create a new layout for RFITEMAR and make it default , SO authorization is not a problem.
Anything else I should change other than the one mentioned above ?
2005 Oct 26 10:38 AM
Hi,
<b>2) Changed c_program_ar to sy-repid (it would accept the current program)</b>
Could you please tell me what exactly you did to change this? As this is a constant declared in TOP include of function group FI_ITEMS.
Did you change it in LFI_ITEMSTOP?
OR you changed it to SY-REPID in the function module FI_ITEMS_DISPLAY itself? If this is the case then actually sy-repid at this point will be SAPLFI_ITEMS.
Try changing it to your program name YRFITEMAR or ZRF2 like,
is_u_variant-report = 'ZRF2'. "'YRFITEMAR' whatever it is.
OR you overwrote it in debugger by filling your program name into is_u_variant-report after at this point in FI_ITEMS_DISPLAY,
*... no field catalog given by caller?
describe table it_u_fieldcat lines nlines.
?
Actually what I am trying to say is that if you dont have a default variant for the first time, system tries to change is_u_variant-report to RFITEMAR inside FI_ITEMS_DISPLAY fm. So when it executes and you start saving layouts they are really saved for RFITEMAR or
Hope this helps...
Sri
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |