Adding fields to ALV output list in Tcode S_ALR_87012357
Hi,
I need your help to insert new fields in output at standard t-code S_ALR_87012357 for GST Report.
Report name is RFUMSV00.
The add/insert columns are
1)Vendor Description,
2)SGD Gross Amt(100% tax Reporting curr)
3)SGD Tax Base Amt(100% Tax Reporting curr),
4)SGD Input Tax(7% Tax Reporting curr) and
5) Value(100%Vendor Curr)
Could anyone help me how to do this.
Thanks,
Shabareesh
Changing the field catalog should not add the new fields required in internal table (e.g. structure RFUMS_TAX_ITEM for items)
You could try to append a structure to those, and fill its value with FI_TAX_BADI_011 ?
Regards,
Raymond
PS: List of BAdI for this report
FI_TAX_BADI_010
RFUMSV00: Events for List Output Using ALV
FI_TAX_BADI_011
RFUMSV00: Event 'APPEND' for Line Item Lists
FI_TAX_BADI_012
RFUMSV00: Event 'GET bkpf LATE' during Selection
FI_TAX_BADI_013
RFUMSV00: Set Parameters for DME Tool (Tree Type UMS1)
FI_TAX_BADI_014
RFUMSV00: Field Catalog of Output Lists for ALV
FI_TAX_BADI_015
RFUMSV00: Event "END-OF-SELECTION" before Data File Creation
FI_TAX_BADI_016
RFUMSV00: Transfer of All Tax Data
Similar Messages
-
Adding fields in EDI output of Invoice List
Hi!
I am trying to find out what is a process of adding fields in EDI output of Invoice List...
I mean that I need to add some extra fields to Invoice lists.
The information I have is: name of Form, print program and output type.
I guess I need to modify printing program, is it a correct way to go?
Hope to avoid modifying of print form...
Will reward,
Mindaugas.I did not work on invoice list EDI,but i have done invoice.
First you need to look at segment,if you want to add new fileds in output,then you need to create segment at WE31 Transaction.
now create idoc type based on invoice idoc type ( WE30) here you need to use ur segment.
Idoc has function module
outbound - FM will start IDOC_OUTBOUND_inv*
Inbound - FM will Start IDOC_INBOUND_INV*
in the FM,you will have user exit ,populate ur fields in user exit.
Configuration :
1 create or maintain logical system - SALE
2. Create RFC Destination - Sm59
3. Create port - WE21 - ( EDI - Port is FILE)
6.Maintain partner profile - WE20 ( Give all required details like message type,idoc type)
IDOC Status - WE02 or WE05
Status Record - WE47
Change pointer - BD52
Message type : WE81
Assign message type to idoc WE82
finally when you create invoice list and output type medium is 6 then output will go to other system as text file.
Note : Please maintain message control in Partner profile. -
ADDING A DATE FIELD IN THE OUTPUT SCREEN OF Tcode FBL1N
Hi guys..I want to add a From-->To 'DATE' field in the output screen of Tcode 'FBL1N' in the line items header part....Please tell me how to do this..??
Hi,
Unfortunately you can't add these fileds using with Settings>Layouts>Current header rows, you can only add the field Open items as on date.
Rgds
Murali. N -
How can we modify alv output list
Hi
this is fazil.
Please tell me any body How can we modify alv output list.
Thanks & Regards
Fazil
[email protected]Fazil,
check the program,
You can find the code in this program 'BCALV_FIELDCAT_TEST'
*& Report BCALV_FIELDCAT_TEST *
This report allows to modify the fieldcatalog of a corresponding
output table and to view the effects of your changes directly.
Note that for some changes you need to newly display the whole
ALV Grid Control, e.g., DDIC-Fields are read only the first time
you call SET_READY_FOR_FIRST_DISPLAY.
Note also that not all scenarios can be tested since the output
table does not comprise all fields to test available features
of the fieldcatalog. Copy this program and extend the output
table accordingly if you want to test such a special feature.
(The field CARRNAME in 'gt_sflight' was added to test field REF_FIELD
and TXT_FIELD of the fieldcatalog - see what happens if you
calculate subtotals by carrier-id).
report bcalvt_fieldcatalog .
data: ok_code type sy-ucomm,
save_ok_code type sy-ucomm,
fieldcatalog for output table
gt_fieldcat type lvc_t_fcat,
fieldcatalog for fieldcatalog itself:
gt_fcatfcat type lvc_t_fcat,
gs_fcatlayo type lvc_s_layo.
Output table
data: begin of gt_sflight occurs 0.
data: carrname type s_carrname.
include structure sflight.
data: end of gt_sflight.
data: g_max type i value 100.
data: g_all type c value SPACE.
Controls to display gt_sflight and corresponding fieldcatalog
data: g_docking type ref to cl_gui_docking_container,
g_alv type ref to cl_gui_alv_grid.
data: g_custom_container type ref to cl_gui_custom_container,
g_editable_alv type ref to cl_gui_alv_grid.
LOCAL CLASS Definition
class lcl_event_receiver definition.
public section.
methods handle_data_changed
for event data_changed of cl_gui_alv_grid
importing er_data_changed.
endclass.
class lcl_event_receiver implementation.
method handle_data_changed.
at the time being, no checks are made...
endmethod.
endclass.
data: event_receiver type ref to lcl_event_receiver.
end-of-selection.
set screen 100.
*& Module STATUS_0100 OUTPUT
text
module status_0100 output.
set pf-status 'BASIC'.
set titlebar 'BASICTITLE'.
create ALV Grid Control in the first run
if g_docking is initial.
perform create_and_init_controls.
endif.
endmodule. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
text
module user_command_0100 input.
save_ok_code = ok_code.
clear ok_code.
case save_ok_code.
when 'SUBMIT'.
set the frontend fieldcatalog
ATTENTION: DDIC-Fields are not updated using this method!
(see 'RESTART')
call method g_alv->set_frontend_fieldcatalog
exporting
it_fieldcatalog = gt_fieldcat.
call method g_alv->refresh_table_display.
call method cl_gui_cfw=>flush.
when 'RESTART'.
Destroy the control currently visible and display it again
using the changed fieldcatalog.
perform restart_sflight.
when '&ALL'.
perform switch_visibility.
endcase.
endmodule. " USER_COMMAND_0100 INPUT
*& Form CREATE_AND_INIT_CONTROLS
text
--> p1 text
<-- p2 text
form create_and_init_controls.
create object g_docking
exporting
dynnr = '100'
extension = 150
side = cl_gui_docking_container=>dock_at_bottom.
create object g_alv
exporting
i_parent = g_docking.
create object g_custom_container
exporting
container_name = 'CC_0100_FIELDCAT'.
create object g_editable_alv
exporting
i_parent = g_custom_container.
register events
create object event_receiver.
set handler event_receiver->handle_data_changed for g_editable_alv.
call method g_editable_alv->register_edit_event
exporting
i_event_id = cl_gui_alv_grid=>mc_evt_modified.
perform build_fieldcatalogs changing gt_fieldcat gt_fcatfcat.
perform modify_fieldcatalog changing gt_fcatfcat.
perform select_data. "CHANGING gt_sflight
call method g_alv->set_table_for_first_display
changing
it_outtab = gt_sflight[]
it_fieldcatalog = gt_fieldcat[].
optimize column width of grid displaying fieldcatalog
gs_fcatlayo-cwidth_opt = 'X'.
Get fieldcatalog of table sflight - alv might have
modified it after passing.
call method g_alv->get_frontend_fieldcatalog
importing et_fieldcatalog = gt_fieldcat[].
call method cl_gui_cfw=>flush.
Display fieldcatalog of table sflight:
call method g_editable_alv->set_table_for_first_display
exporting
is_layout = gs_fcatlayo
changing
it_outtab = gt_fieldcat[]
it_fieldcatalog = gt_fcatfcat[].
register events
create object event_receiver.
set handler event_receiver->handle_data_changed for g_editable_alv.
endform. " CREATE_AND_INIT_CONTROLS
*& Form restart_sflight
text
--> p1 text
<-- p2 text
form restart_sflight.
data: ls_fieldcat type lvc_s_fcat.
free g_docking and thus g_alv
call method g_docking->free.
clear g_docking.
clear g_alv.
create new instances
create object g_docking
exporting
dynnr = '100'
extension = 150
side = cl_gui_docking_container=>dock_at_bottom.
create object g_alv
exporting
i_parent = g_docking.
This is an internal method to invalidate all fields in the fieldcat
loop at gt_fieldcat into ls_fieldcat.
clear ls_fieldcat-tech_comp.
modify gt_fieldcat from ls_fieldcat.
endloop.
Newly display the list with current fieldcatalog.
call method g_alv->set_table_for_first_display
changing
it_outtab = gt_sflight[]
it_fieldcatalog = gt_fieldcat.
Get fieldcatalog - it might be changed by ALV in the last call
call method g_alv->get_frontend_fieldcatalog
importing
et_fieldcatalog = gt_fieldcat[].
call method g_editable_alv->refresh_table_display.
call method cl_gui_cfw=>flush.
endform. " restart_sflight
*& Form select_data
text
--> p1 text
<-- p2 text
form select_data.
data: lt_sflight type table of sflight with header line,
ls_scarr type scarr.
select data of sflight
select * from sflight into table lt_sflight up to g_max rows.
copy data to gt_sflight and update CARRNAME
loop at lt_sflight.
move-corresponding lt_sflight to gt_sflight.
select single * from scarr into ls_scarr
where carrid = gt_sflight-carrid.
gt_sflight-carrname = ls_scarr-carrname.
append gt_sflight.
endloop.
endform. " select_data
*& Form BUILD_FIELDCATALOGS
text
<--P_GT_FIELDCAT text
<--P_GT_FCATFCAT text
form build_fieldcatalogs changing p_fieldcat type lvc_t_fcat
p_fcatfcat type lvc_t_fcat.
data: ls_fcat type lvc_s_fcat.
Fieldcatalog for table SFLIGHT: p_fieldcat
generate fieldcatalog automatically
call function 'LVC_FIELDCATALOG_MERGE'
exporting
i_structure_name = 'SFLIGHT'
I_CLIENT_NEVER_DISPLAY = 'X'
changing
ct_fieldcat = p_fieldcat[]
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
shift all column positions to the right except for MANDT
loop at p_fieldcat into ls_fcat.
if ls_fcat-fieldname ne 'MANDT'.
add 1 to ls_fcat-col_pos.
if ls_fcat-fieldname = 'CARRID'.
ls_fcat-txt_field = 'CARRNAME'."link CARRNAME to CARRID
endif.
modify p_fieldcat from ls_fcat.
endif.
endloop.
create a new line for CARRNAME in p_fieldcat
clear ls_fcat.
ls_fcat-fieldname = 'CARRNAME'.
ls_fcat-ref_table = 'SCARR'.
ls_fcat-col_pos = 1.
insert new line before CARRID (do not forget MANDT!).
insert ls_fcat into p_fieldcat index 1.
Fieldcatalog for table LVC_T_FCAT:p_fcatfcat
Generate fieldcatalog of fieldcatalog structure.
This fieldcatalog is used to display fieldcatalog 'p_fieldcat'
on the top of the screen.
call function 'LVC_FIELDCATALOG_MERGE'
exporting
i_structure_name = 'LVC_S_FCAT'
I_CLIENT_NEVER_DISPLAY = 'X'
changing
ct_fieldcat = p_fcatfcat[]
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
Hide all fields that are not documented (valid for release 4.6A)
perform hide_fields changing p_fcatfcat.
endform. " BUILD_FIELDCATALOGS
*& Module EXIT_PROGRAM INPUT
text
module exit_program input.
leave program.
endmodule. " EXIT_PROGRAM INPUT
*& Form MODIFY_FIELDCATALOG
text
<--P_GT_FCATFCAT text
form modify_fieldcatalog changing p_fcatfcat type lvc_t_fcat.
data ls_fcat type lvc_s_fcat.
loop at p_fcatfcat into ls_fcat.
ls_fcat-coltext = ls_fcat-fieldname.
ls_fcat-edit = 'X'.
if ls_fcat-fieldname = 'COL_POS' or ls_fcat-fieldname = 'FIELDNAME'.
ls_fcat-key = 'X'.
endif.
modify p_fcatfcat from ls_fcat.
endloop.
endform. " MODIFY_FIELDCATALOG
form hide_fields changing p_fieldcat type lvc_t_fcat.
data: ls_fcat type lvc_s_fcat.
Only show documented fields of fieldcatalog.
For a documentation choose "Help->Application Help" in the menu.
loop at p_fieldcat into ls_fcat.
if not (
ls_fcat-fieldname eq 'CFIELDNAME'
or ls_fcat-fieldname eq 'COL_POS'
or ls_fcat-fieldname eq 'COLDDICTXT'
or ls_fcat-fieldname eq 'COLTEXT'
or ls_fcat-fieldname eq 'CURRENCY'
or ls_fcat-fieldname eq 'DD_OUTLEN'
or ls_fcat-fieldname eq 'DECIMALS_O'
or ls_fcat-fieldname eq 'DECMLFIELD'
or ls_fcat-fieldname eq 'DO_SUM'
or ls_fcat-fieldname eq 'DRAGDROPID'
or ls_fcat-fieldname eq 'EDIT_MASK'
or ls_fcat-fieldname eq 'EMPHASIZE'
or ls_fcat-fieldname eq 'EXPONENT'
or ls_fcat-fieldname eq 'FIELDNAME'
or ls_fcat-fieldname eq 'HOTSPOT'
or ls_fcat-fieldname eq 'ICON'
or ls_fcat-fieldname eq 'INTLEN'
or ls_fcat-fieldname eq 'INTTYPE'
or ls_fcat-fieldname eq 'JUST'
or ls_fcat-fieldname eq 'KEY'
or ls_fcat-fieldname eq 'LOWERCASE'
or ls_fcat-fieldname eq 'LZERO'
or ls_fcat-fieldname eq 'NO_OUT'
or ls_fcat-fieldname eq 'NO_SIGN'
or ls_fcat-fieldname eq 'NO_SUM'
or ls_fcat-fieldname eq 'NO_ZERO'
or ls_fcat-fieldname eq 'OUTPUTLEN'
or ls_fcat-fieldname eq 'QFIELDNAME'
or ls_fcat-fieldname eq 'QUANTITY'
or ls_fcat-fieldname eq 'REF_FIELD'
or ls_fcat-fieldname eq 'REF_TABLE'
or ls_fcat-fieldname eq 'REPREP'
or ls_fcat-fieldname eq 'REPTEXT'
or ls_fcat-fieldname eq 'ROLLNAME'
or ls_fcat-fieldname eq 'ROUND'
or ls_fcat-fieldname eq 'ROUNDFIELD'
or ls_fcat-fieldname eq 'SCRTEXT_L'
or ls_fcat-fieldname eq 'SCRTEXT_M'
or ls_fcat-fieldname eq 'SCRTEXT_S'
or ls_fcat-fieldname eq 'SELDDICTXT'
or ls_fcat-fieldname eq 'SELTEXT'
or ls_fcat-fieldname eq 'SP_GROUP'
or ls_fcat-fieldname eq 'SYMBOL'
or ls_fcat-fieldname eq 'TECH'
or ls_fcat-fieldname eq 'TIPDDICTXT'
or ls_fcat-fieldname eq 'TOOLTIP'
or ls_fcat-fieldname eq 'TXT_FIELD' ).
ls_fcat-tech = 'X'.
endif.
modify p_fieldcat from ls_fcat.
endloop.
endform.
form switch_visibility.
data: lt_fcatfcat type lvc_t_fcat,
ls_fcat type lvc_s_fcat.
call method g_editable_alv->get_frontend_fieldcatalog
importing ET_FIELDCATALOG = lt_fcatfcat.
if not g_all is initial.
perform hide_fields changing lt_fcatfcat.
g_all = SPACE.
else.
loop at lt_fcatfcat into ls_fcat.
if ls_fcat-tech eq 'X'.
ls_fcat-tech = SPACE.
ls_fcat-no_out = 'X'.
modify lt_fcatfcat from ls_fcat.
endif.
endloop.
g_all = 'X'.
endif.
call method g_editable_alv->set_frontend_fieldcatalog
exporting it_fieldcatalog = lt_fcatfcat.
call method g_editable_alv->refresh_table_display.
endform.
Don't forget to rewaard if useful.. -
Negative sign for DMBTR field in ALV output
Hi Experts,
Before posting I have searched for more than 3 hours in the forums to get a solution for this.
I did not get any solution so I am posting this problem which I need to resolve.
I have to display the DMBTR field in ALV output for which a grand total will have to be displayed.
Here for all the values in DMBTR which are negative are getting displayed as '- 6673.56','- 289956.23' as I am using the edit mask 'V_____________.__'.
I have to get the value shown as '-6673.56', '-289956.23'.
I tried to use convert this DMBTR to String and have successfully displayed the negative sign correctly in front of the value but I am not getting the totals which I need to have
PLease check and suggest for a solution.
Regards
KishoreHi,
If this is the case, then you can use character field to display the sign on the left. Sum up the total and use the event end of list to display the same. Remember to set the TECH and NO_OUT in the field catalog.
Hope this helps.
Regards,
Siva -
Co41 enhancement for add field in ALV output
I must add a custom filed to ALV output of transaction CO41 and i trying to use all the 25 enhancements provided (that i find in other post CO41- Enhancement ), but i haven't found any way to get the desired results.
Can any body help me?
Thanks in advance.Hi,
I had the same requirement to add a custom field to ALV output of transaction CO41.
1. I first added the custom field to an new append-structure to the structure SFC_POCO.
2. Then i added this field to the Dynpro-Screen 200 in the function-group COUP (by choosing the table control, pressing F6 and then adding the custom field of SFC_POCO).
3. At last i added an Enhancement to the function CO_UP_PLANNED_ORDERS_SELECT and filled my custom field with data there.
Please reward if useful.
Regards,
Henry -
Adding fiedls in VA05 output list
Hi,
I want add some fields in VA05 output list , please help in this regard.
Netaji.BHello All,
Assume you want to add VBAK-VSBED to the VA05 ALV o/p. You may proceed as follows:
First add this field to structure VBMTV. Proceed as follows:
1. Table VBMTV: Replace the dummy field with VSBED in Include VBMTVZ.
2. Table T180A: Add a new data record via Transaction SE16.
TBNAM = 'VBMTV'
FDNAM = 'VSBED'
ZUART = 'D'
3. Update of VSBED:User exit PERFORM MOVE_USERFIELDS USING 'VBAK' in
LV05TFMO, Include V05TZZMO add the following line behind
WHEN 'VBAK':
MOVE LVBAK-VSBED TO LVBMTV-VSBED. <-- Insert
4. Activate Include V05TZZMO.
5. If then, you log on to the system again and call up Transaction VA05
the system displays 'Shipping Cond' field.
Regards,
Asmita... -
I am not getting the headings of the fields in ALV output.
I am not getting ALV out put but the headings of the fields in ALV output.
Please see my below code .
TYPES : BEGIN OF ty_zgxmit.
INCLUDE STRUCTURE zgxmit.
TYPES : END OF ty_zgxmit.
DATA : gt_zgxmit TYPE TABLE OF ty_zgxmit.
*& Form alv_display *
This subroutine is to display the out put in ALV. *
FORM alv_display .
Local data
DATA: y_x LIKE boole VALUE 'X'.
DATA: lt_fieldcat TYPE slis_t_fieldcat_alv.
DATA: lf_fieldcat TYPE slis_fieldcat_alv.
DATA: lh_index LIKE lf_fieldcat-col_pos.
For variant
DATA: ws_repid LIKE sy-repid,
g_save TYPE c VALUE 'A',
g_exit TYPE c,
g_variant LIKE disvariant,
gx_variant LIKE disvariant.
For 1st field.( RPT_LOC )
CLEAR lf_fieldcat.
lf_fieldcat-fieldname = 'RPT_LOC'.
lf_fieldcat-tabname = 'GT_ZGXMIT'.
lf_fieldcat-ref_tabname = 'RPT_LOC'.
lf_fieldcat-ref_fieldname = 'ZGXMIT'.
lh_index = lh_index + 1.
lf_fieldcat-col_pos = lh_index.
lf_fieldcat-key = y_x.
lf_fieldcat-no_sum = y_x.
APPEND lf_fieldcat TO lt_fieldcat.
For 2nd field.( BAL_XMIT )
CLEAR lf_fieldcat.
lf_fieldcat-fieldname = 'BAL_XMIT'.
lf_fieldcat-tabname = 'GT_ZGXMIT'.
lf_fieldcat-ref_tabname = 'BAL_XMIT'.
lf_fieldcat-ref_fieldname = 'ZGXMIT'.
lh_index = lh_index + 1.
lf_fieldcat-col_pos = lh_index.
lf_fieldcat-key = y_x.
lf_fieldcat-no_sum = y_x.
APPEND lf_fieldcat TO lt_fieldcat.
For 3rd field.( INC_XMIT )
CLEAR lf_fieldcat.
lf_fieldcat-fieldname = 'INC_XMIT'.
lf_fieldcat-tabname = 'GT_ZGXMIT'.
lf_fieldcat-ref_tabname = 'INC_XMIT'.
lf_fieldcat-ref_fieldname = 'ZGXMIT'.
lh_index = lh_index + 1.
lf_fieldcat-col_pos = lh_index.
lf_fieldcat-key = y_x.
lf_fieldcat-no_sum = y_x.
APPEND lf_fieldcat TO lt_fieldcat.
For 4th field.( Z500_XMIT )
CLEAR lf_fieldcat.
lf_fieldcat-fieldname = 'Z500_XMIT'.
lf_fieldcat-tabname = 'GT_ZGXMIT'.
lf_fieldcat-ref_tabname = 'Z500_XMIT'.
lf_fieldcat-ref_fieldname = 'ZGXMIT'.
lh_index = lh_index + 1.
lf_fieldcat-col_pos = lh_index.
lf_fieldcat-key = y_x.
lf_fieldcat-no_sum = y_x.
APPEND lf_fieldcat TO lt_fieldcat.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = 'ZJV_2245'
it_fieldcat = lt_fieldcat
TABLES
t_outtab = gt_zgxmit
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " alv_displayYou can force the headings like so.
CLEAR lf_fieldcat.
lf_fieldcat-fieldname = 'RPT_LOC'.
lf_fieldcat-tabname = 'GT_ZGXMIT'.
lf_fieldcat-ref_tabname = 'RPT_LOC'.
lf_fieldcat-ref_fieldname = 'ZGXMIT'.
lf_fieldcat-reptext_ddic = 'Whatever Heading'. "<- Right here
lh_index = lh_index + 1.
lf_fieldcat-col_pos = lh_index.
lf_fieldcat-key = y_x.
lf_fieldcat-no_sum = y_x.
APPEND lf_fieldcat TO lt_fieldcat.
Regards,
Rich Heilman -
How to display the fields in ALV Output without using Field catalog?
How to display the fields in ALV Output without using Field catalog?
Could you pls tell me the coding?
Akshitha.Hi,
u mean without building field catalog. is it? I that case, we can use the FM REUSE_ALV_FIELDCATALOG_MERGE.
data: itab type table of mara.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_structure_name = itab
CHANGING
ct_fieldcat = lt_fieldcat[]
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
*Pass that field catalog into the fillowing FM
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
i_grid_title = 'REPORTING'
is_layout = gt_layout
it_fieldcat = lt_fieldcat[]
tables
t_outtab = itab. -
Add button to QA33 ALV output list
Hi, SAP experts:
I need to add a custom button to the ALV output list display in QA33 transaction.
I´ve only found the BAdi ALV_SWITCH_GRID_LIST, but it doesn´t fit my requirements at all.
Any idea?
Thank you very much!Hi,
Please check if this explanation helps you,
Custom Butoon in REUSE_ALV_GRID_DISPLAY_LVC
Regards
Ram -
What are all the ways that can add fields in the output list of FBL3N transaction?
Hello dear experts,
There is this transaction FBL3N, which you might be aware of. Now, the requirement is to add 4 new fields in the output list of the standard program.
The fields are:
NAME1 KNA1
LOKKT BSEG
USNAM BKPF
TXT50 SKA1 -> SKAT
Please tell me how to do this apart from implementing the note 310886. What are the other ways?I agree, start reading 984305 - Line item: Definition of special fields (T021S)
Then for non BSEG/BKPF fields, better use BAdI FI_ITEMS_CH_DATA (1323512) and not the good old BTE 1650, the BAdI will be called once with the full internal table with special fields already filled, when the BTE will be executed for each and every record without special fields, so harder to optimize, and may require access to BKPF/BSEG for missing fields.
Regards,
Raymond
PS: Did you use search tool, there are already many discussions/threads on this subject. -
How to pass custom search help(F4 help) for a field in ALV output?
Hi,
I want to activate the F4 help in ALV output for a field for which we do not have search help assigned at table ,data element and domain level.
In field catalog i have enabled it by below line.
ls_fcat-F4AVAILABL = 'X'.
but because there are no standard input help available it is giving message as "No input help is available".
so how to pass our custom search help (g_search) for any field in ALV output.
I am using object oriented ALV grid display.
Thanks!!!
Rajesh Gupta.hi,
check this out:
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b3d5e890-0201-0010-c0ac-bba85ec2ae8d
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/acdefb13-0701-0010-f1a2-8eeefa7d3780
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b3d5e890-0201-0010-c0ac-bba85ec2ae8d?quicklink=index&overridelayout=true -
How to create 2 ALV output lists in a single output?
Hi guys...
My clients requirement is to create 2 ALV output lists in a single output list.how can i do this?i mean which function module i can use for this requirement?please help me out...
Regards..*& Report ZLCL_ALV_INT_INVOICE *
REPORT ZLCL_ALV_INT_INVOICE .
DATA: O_CONT1 TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
O_CONT2 TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
O_GRID1 TYPE REF TO CL_GUI_ALV_GRID,
O_GRID2 TYPE REF TO CL_GUI_ALV_GRID.
DATA: IT_VBRK LIKE VBRK OCCURS 1 WITH HEADER LINE.
DATA: IT_VBRP LIKE VBRP OCCURS 1 WITH HEADER LINE.
DATA: WA_VBRK LIKE VBRK.
*--Layout
DATA: WA_LAYO TYPE LVC_S_LAYO.
CLASS LCL_BILLING DEFINITION
CLASS LCL_BILLING DEFINITION.
PUBLIC SECTION.
CLASS-METHODS: HANDLE_HOTSPOT_CLICK
FOR EVENT HOTSPOT_CLICK
OF CL_GUI_ALV_GRID
IMPORTING E_ROW_ID.
ENDCLASS. "LCL_BILLING DEFINITION
CLASS LCL_BILLING IMPLEMENTATION
CLASS LCL_BILLING IMPLEMENTATION.
METHOD HANDLE_HOTSPOT_CLICK.
IF NOT E_ROW_ID IS INITIAL.
*--Reading selected billing docno
READ TABLE IT_VBRK INTO WA_VBRK INDEX E_ROW_ID-INDEX.
*--GETTING BILLING DOC ITEMS
REFRESH IT_VBRP.
SELECT *
FROM VBRP
INTO TABLE IT_VBRP
WHERE VBELN = WA_VBRK-VBELN.
CALL SCREEN 200.
ENDIF.
ENDMETHOD. "HANDLE_HOTSPOT_CLICK
ENDCLASS. "LCL_BILLING IMPLEMENTATION
SELECT-OPTIONS: S_VBELN FOR IT_VBRK-VBELN.
START-OF-SELECTION.
PERFORM GET_DATA.
SET SCREEN 100.
*& Form GET_DATA
text
FORM GET_DATA .
*--billing header data
SELECT *
FROM VBRK
INTO TABLE IT_VBRK
WHERE VBELN IN S_VBELN.
IF SY-SUBRC <> 0.
MESSAGE I000(Z00) WITH 'No Data Found'.
ENDIF.
EXIT.
ENDFORM. " GET_DATA
*& Module STATUS_0100 OUTPUT
text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'MENU'.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
text
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'BACK'.
PERFORM EXIT_PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Module PBO_100 OUTPUT
text
MODULE PBO_100 OUTPUT.
IF O_CONT1 IS INITIAL.
CREATE OBJECT O_CONT1
EXPORTING
CONTAINER_NAME = 'VBRK_CONT'
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
CREATE_ERROR = 3
LIFETIME_ERROR = 4
LIFETIME_DYNPRO_DYNPRO_LINK = 5
OTHERS = 6
IF SY-SUBRC <> 0.
MESSAGE I000(Z00) WITH 'Error in container'.
EXIT.
ENDIF.
CREATE OBJECT O_GRID1
EXPORTING
I_PARENT = O_CONT1
EXCEPTIONS
ERROR_CNTL_CREATE = 1
ERROR_CNTL_INIT = 2
ERROR_CNTL_LINK = 3
ERROR_DP_CREATE = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE I000(Z00) WITH 'Error in Grid'.
EXIT.
ENDIF.
ENDIF.
*--Layout for 1st grid
WA_LAYO-KEYHOT = 'X'.
WA_LAYO-GRID_TITLE = 'Billing Document Header Data'.
CALL METHOD O_GRID1->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_STRUCTURE_NAME = 'VBRK'
IS_LAYOUT = WA_LAYO
CHANGING
IT_OUTTAB = IT_VBRK[]
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
OTHERS = 4.
IF SY-SUBRC <> 0.
MESSAGE I000(Z00) WITH 'Error in showing grid'.
EXIT.
ENDIF.
*-Setting the focus on the grid
CALL METHOD CL_GUI_CONTROL=>SET_FOCUS
EXPORTING
CONTROL = O_GRID1 "Grid control object
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE I000(Z00) WITH 'Error in setting focus'.
ENDIF.
*--Event handler registration
SET HANDLER LCL_BILLING=>HANDLE_HOTSPOT_CLICK FOR O_GRID1.
ENDMODULE. " PBO_100 OUTPUT
*& Module STATUS_0200 OUTPUT
text
MODULE STATUS_0200 OUTPUT.
SET PF-STATUS 'MENU'.
ENDMODULE. " STATUS_0200 OUTPUT
*& Module USER_COMMAND_0200 INPUT
text
MODULE USER_COMMAND_0200 INPUT.
CASE SY-UCOMM.
WHEN 'BACK'.
LEAVE TO SCREEN 100.
ENDCASE.
ENDMODULE. " USER_COMMAND_0200 INPUT
*& Module PBO_200 OUTPUT
text
MODULE PBO_200 OUTPUT.
IF O_CONT2 IS INITIAL.
CREATE OBJECT O_CONT2
EXPORTING
CONTAINER_NAME = 'VBRP_CONT'
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
CREATE_ERROR = 3
LIFETIME_ERROR = 4
LIFETIME_DYNPRO_DYNPRO_LINK = 5
OTHERS = 6
IF SY-SUBRC <> 0.
MESSAGE I000(Z00) WITH 'Error in container'.
EXIT.
ENDIF.
CREATE OBJECT O_GRID2
EXPORTING
I_PARENT = O_CONT2
EXCEPTIONS
ERROR_CNTL_CREATE = 1
ERROR_CNTL_INIT = 2
ERROR_CNTL_LINK = 3
ERROR_DP_CREATE = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
MESSAGE I000(Z00) WITH 'Error in grid linking'.
EXIT.
ENDIF.
CALL METHOD O_GRID2->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_STRUCTURE_NAME = 'VBRP'
CHANGING
IT_OUTTAB = IT_VBRP[]
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
OTHERS = 4.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ELSE.
*--refreshing the alv grid with the latest content of the internal table
*--which is linked
CALL METHOD O_GRID2->REFRESH_TABLE_DISPLAY
EXCEPTIONS
FINISHED = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE I000(Z00) WITH 'Error in Refreshing gird'.
ENDIF.
ENDIF.
ENDMODULE. " PBO_200 OUTPUT
*& Form EXIT_PROGRAM
text
FORM EXIT_PROGRAM .
*--Deallocating the memory
IF NOT O_CONT2 IS INITIAL.
CALL METHOD O_CONT2->FREE
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE I000(Z00) WITH 'Error in deallocating memory'.
EXIT.
ENDIF.
CLEAR: IT_VBRP,
IT_VBRP[].
FREE: IT_VBRP,
IT_VBRP[].
ENDIF.
IF NOT O_CONT1 IS INITIAL.
CALL METHOD O_CONT1->FREE
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE I000(Z00) WITH 'Error in deallocating memory'.
EXIT.
ENDIF.
CLEAR: IT_VBRK,
IT_VBRK[].
FREE: IT_VBRK,
IT_VBRK[].
ENDIF.
*--Cearing the buffered content
CALL METHOD CL_GUI_CFW=>FLUSH
EXCEPTIONS
CNTL_SYSTEM_ERROR = 1
CNTL_ERROR = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE I000(Z00) WITH 'Error in clearing Buffer'.
EXIT.
ENDIF.
LEAVE PROGRAM.
ENDFORM. " EXIT_PROGRAM
SCREEN 100
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
MODULE PBO_100.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.
SCREEN200
PROCESS BEFORE OUTPUT.
MODULE STATUS_0200.
MODULE PBO_200.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0200. -
Add check box in alv output list in web dynpro
Dear Friends,
I want to Add check box in begining of each row of alv output list for WEB DYNPRO Program.
ISHALalsha - you need an attribute (I will named check_box) in your context node to be in the 1st position of your ALV context node
Data: lv_check_box type ref to cl_salv_wd_uie_checkbox,
lr_table_settigns type ref to if_salv_wd_table_settings,
l_value type ref to cl_salv_wd_config_table,
lt_columns type salv_wd_t_column_ref,
ls_column type salv_wd_s_column_ref,
l_col_name type string.
if l_value is not initial.
lr_table_settings ?= l_value.
lt_columns = l_value->if_salv_wd_column_settings~get_columns( ).
Loop AT lt_columns into ls_column.
l_col_name = ls_column-r_column->get_id( ).
IF l_col_name = 'check_box' *your attribute name*
CREATE OBJECT lv_check_box
EXPORTING
checked_fieldname = l_col_name.
ls_column-r-column->set_cell_editor( value = lv_check_box ).
endif.
endloop
Hope this help
Jason P-V -
Adding custom fields to Va05n output list
Hi Experts,
i am looking to add some custom fields to Transaktion Va05n.
It seems,at least to me, that the underling Program "SD_SALES_ORDERS_VIEW" is not meant to be enhanced. I guess i could do a append to the structure used in the ALV-Output, but there is no user-exit or Badi to fill the custom fields.
Am i missing something here?Hi,
You can do "Implicit Enhancement Option" as follow.
1. Adding your customer field catalog at routine "FORM fieldcat_init "
You have to enhance at the end of this routine.
2. Filling you value the internal table at routine "FORM liste_anzeigen".
You have to enhance at begin of this routine before it is display.
Hope it help.
Sayan.
Maybe you are looking for
-
Help - Unable to start 11.1.2 Report Server !!!
Hello All I installed 11.1.2 report server as part of Forms & Reports implementation using weblogic server. Everything went well until I shutdown the reports server using opmn and restarted it again, i got this error message. [2013-04-25T20:06:53.160
-
Data is not comming in BSP page
Hi Experts, At R/3 side while executing the appraisal template application in se80 t-code we are unable to view the total data but the same is working fine Development and Quality but, in Production system only some data is comming what necessary ste
-
How to find a difference between two date in format 04/23/2003(mm/dd/yyyy)?
-
Hi Guys, Can you please advise me if you have any document on the below. 1.Cut-off activities to deactivate the warehouse in existing plant /sloc 2.Steps to deactivate SAP WMS Thanks Tata Reddy
-
Attachments.Add COMException HRESULT: 0x80004004 (E_ABORT)
I overrode the Outlook attach file button by my ribbon command: <commands> <command idMso="AttachFile" onAction="onAttachFile" /> </commands> In the ribbon class I implemented the prompt to use my own attach file logic or default. I didn't found how