ALV selection not displayed/shown
Hello,
I have a question concerning the ALV:
In NW 7.0 everything was fine and working, as of EhP1 the selection for one ALV is not displayed.
...the selection is done alright and also corresponding events are raised. Nevertheless there is no visual representation for a selection - meaning the yellow/orange highlighting of a selected line. It is neither done for the lead selection nor for "normal" selections.
Other ALV in the same application (though different component) work fine and as far as I can tell all are initilized similarly.
Does anyone know this effect and - most important - how to correct it?
Regards,
Robert
Hello all,
We were able to solve the issue of selections not being visible - although they are correctly set in ALV/context.
-> The default view of the window has to be set to the ALV usage!
Don't ask me why, but in case the default setting is on the empty view, no selections will be visible on the UI. As soon as you set the ALV usage as default, the selections will be visible again.
Kind Regards,
Robert
Similar Messages
-
Problem with ALV Grid Not Displaying Data
Hi Gurus,
I have a report program, when i run it I display an output summary on ALV Grid, and when i click on each of the row in the output summary, I'm suppose to see the item detail of each record.
This item detail is showing for some record and is not showing for some other records (when i use different selections). I debugged it and observed that the table populating the ALV grid actually has records in it. The ALV grid is not just displaying the records.
I debugged the 2 examples (one showing record and the other not showing), I found out that nothing is different in the way they run till they populate the final internal record to passed to the ALV Grid.
Please any suggestions on this:
This is the function code for the ALV grid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = g_program_id
i_callback_pf_status_set = c_detail_status
i_callback_user_command = c_detail_user_comm
i_grid_title = lv_grid_title
is_layout = w_detail_layout
it_fieldcat = i_detail_fieldcat
it_sort = i_detail_sort
TABLES
t_outtab = i_faglflexa[] "NEM - detail
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE e064
WITH sy-subrc.
Function REUSE_ALV_GRID_DISPLAY failed on detail view SY-SUBRC = &
ENDIF.This is the full code:
***INCLUDE ZFIGL_HYPERION_F01.
*& Form open_files
Open files used by the program.
FORM open_files.
OPEN DATASET p_fileot FOR OUTPUT IN TEXT MODE ENCODING DEFAULT
MESSAGE g_message.
IF sy-subrc <> 0.
MESSAGE e056
WITH g_message.
Unable to open output file &
ENDIF.
ENDFORM. " open_files
*& Form close_files
Close files used by the program.
FORM close_files.
CLOSE DATASET p_fileot.
ENDFORM. " close_files
*& Form extract_data
Extract data from database needed to generate output file and report.
FORM extract_data.
Get the required general ledger totals records.
PERFORM get_faglflext_data.
Derive any other necessary fields for I_FAGLFLEXT.
PERFORM derive_add_fields_faglflext.
Split records by fiscal period.
PERFORM split_records_by_period.
Summarize the detail records to allow for creation of the file and
reporting.
PERFORM summarize_records_by_period.
Get the required general ledger actual line items records.
PERFORM get_faglflexa_data.
Derive any other necessary fields for I_FAGLFLEXA.
PERFORM derive_add_fields_faglflexa.
Sort the detail and summary output tables into key sequence.
PERFORM sort_output_tables.
ENDFORM. " extract_data
*& Form process_data
Create the requested file and report.
FORM process_data.
Create the local file if requested by the user or the month-end file
at month-end.
IF cb_test = c_not_selected.
PERFORM create_pc_file.
ELSEIF sy-uname = c_user_batch_admin.
PERFORM create_output_file.
ENDIF.
Create the necessary tables for summary ALV report.
PERFORM build_summary_layout.
PERFORM build_summary_field_catalog.
PERFORM build_summary_sort_table.
Check to see that there is data in the summary output table. If yes,
generate report, if not, then give a message to the user.
READ TABLE i_output_summary INDEX 1 TRANSPORTING NO FIELDS.
IF sy-subrc <> 0.
MESSAGE s062.
STOP.
No data extracted for selection criteria entered
ENDIF.
Generate the summary ALV report view.
PERFORM generate_summary_alv_report.
ENDFORM. " process_data
*& Form verify_user_selections
Verify data input by the user.
FORM verify_user_selections.
IF NOT p_ryear IS INITIAL.
IF p_ryear < 2006 OR
p_ryear > 2100.
MESSAGE e057.
Fiscal year is invalid
ENDIF.
ENDIF.
If program is being run in a non-test mode and the user has left the
fiscal year selection blank, display a error message.
IF cb_test IS INITIAL AND
p_ryear IS INITIAL.
MESSAGE e058.
A fiscal year must be entered when generating the file
ENDIF.
If program is being run in a non-test mode and the user has left the
period selection blank, display a error message.
IF cb_test IS INITIAL AND
s_rpmax IS INITIAL.
MESSAGE e132.
A period must be entered when generating the file
ENDIF.
IF cb_test IS INITIAL AND
p_lfile IS INITIAL.
MESSAGE e071.
Local filename is required when generating the file
ENDIF.
****Basil Balogun's addition to include the hyperion acct in selection. (10/03/2007)***
IF s_rhype IS NOT INITIAL.
LOOP AT s_rhype.
CLEAR r_hyper.
r_hyper-sign = 'I'.
r_hyper-option = 'CP'.
CONCATENATE '' s_rhype-low '' INTO r_hyper-low.
APPEND r_hyper.
ENDLOOP.
SELECT bukrs saknr hyper
FROM zall_gl_hype INTO TABLE i_zall_gl
WHERE hyper IN r_hyper.
LOOP AT i_zall_gl INTO w_zall_gl.
w_zall_gl1-saknr = w_zall_gl-saknr.
w_zall_gl2-bukrs = w_zall_gl-bukrs.
APPEND w_zall_gl1-saknr TO i_zall_gl1.
APPEND w_zall_gl2-bukrs TO i_zall_gl2.
CLEAR: w_zall_gl, w_zall_gl1, w_zall_gl2.
ENDLOOP.
SORT i_zall_gl1 BY saknr.
SORT i_zall_gl2 BY bukrs.
DELETE ADJACENT DUPLICATES FROM i_zall_gl1 COMPARING saknr.
DELETE ADJACENT DUPLICATES FROM i_zall_gl2 COMPARING bukrs.
IF s_racct IS INITIAL.
LOOP AT i_zall_gl1 INTO w_zall_gl1.
r_saknr-sign = 'I'.
r_saknr-option = 'EQ'.
r_saknr-low = w_zall_gl1.
APPEND r_saknr.
CLEAR r_saknr.
CLEAR w_zall_gl1.
ENDLOOP.
ELSE.
r_saknr[] = s_racct[].
ENDIF.
IF s_rbukrs IS INITIAL.
LOOP AT i_zall_gl2 INTO w_zall_gl2.
r_bukrs-sign = 'I'.
r_bukrs-option = 'EQ'.
r_bukrs-low = w_zall_gl2-bukrs.
APPEND r_bukrs.
CLEAR r_bukrs.
CLEAR w_zall_gl2.
ENDLOOP.
ELSE.
r_bukrs[] = s_rbukrs[].
ENDIF.
ELSE.
r_saknr[] = s_racct[].
r_bukrs[] = s_rbukrs[].
SELECT bukrs saknr hyper
FROM zall_gl_hype INTO TABLE i_zall_gl.
ENDIF.
****Basil Balogun's addition to include the hyperion acct in selection. (10/03/2007)***
ENDFORM. " verify_user_selections
*& Form get_faglflext_data
Get FAGLFLEXT (General Ledger: Totals) data from the database.
FORM get_faglflext_data .
Use the fiscal year for the selection, if it was populated by the
user.
IF NOT p_ryear IS INITIAL.
SELECT ryear rldnr rvers racct rbukrs prctr rfarea kokrs segment
zzsarea zzsareaim rassc hsl01 hsl02 hsl03 hsl04 hsl05 hsl06
hsl07 hsl08 hsl09 hsl10 hsl11 hsl12 hsl13 hsl14 hsl15 hsl16
hslvt
INTO TABLE i_faglflext
FROM faglflext
WHERE rldnr = c_run_ledger AND
rbukrs IN r_bukrs AND
racct IN r_saknr AND
rfarea IN s_rfarea AND
prctr IN s_prctr AND
ryear = p_ryear AND
rvers = c_run_version.
ELSE.
SELECT ryear rldnr rvers racct rbukrs prctr rfarea kokrs segment
zzsarea zzsareaim rassc hsl01 hsl02 hsl03 hsl04 hsl05 hsl06
hsl07 hsl08 hsl09 hsl10 hsl11 hsl12 hsl13 hsl14 hsl15 hsl16
hslvt
INTO TABLE i_faglflext
FROM faglflext
WHERE rldnr = c_run_ledger AND
rbukrs IN r_bukrs AND
racct IN r_saknr AND
rfarea IN s_rfarea AND
prctr IN s_prctr AND
rvers = c_run_version.
ENDIF.
ENDFORM. " get_faglflext_data
*& Form derive_add_fields_faglflext
Derive additional fields needed for the I_FAGLFLEXT.
FORM derive_add_fields_faglflext.
Get needed company code and profit center data from the database.
PERFORM get_t001_data.
PERFORM get_t880_data.
READ TABLE i_faglflext INDEX 1 TRANSPORTING NO FIELDS.
IF sy-subrc = 0.
PERFORM get_cepc_data.
ENDIF.
SORT i_zall_gl BY bukrs saknr.
LOOP AT i_faglflext INTO w_faglflext.
Get necessary company code data.
READ TABLE i_t001 INTO w_t001
WITH KEY bukrs = w_faglflext-rbukrs
BINARY SEARCH.
IF sy-subrc <> 0.
MESSAGE e059
WITH w_faglflext-rbukrs.
Company code & not found on table T001
ENDIF.
Determine the entity.
PERFORM derive_entity USING w_t001-rcomp
CHANGING w_faglflext-entity.
Determine the strategic segment.
PERFORM derive_strategic_segment USING w_faglflext-rassc
w_faglflext-prctr
CHANGING w_faglflext-strat_seg
w_faglflext-zzsareaim
w_faglflext-zzsarea.
Determine the strategic segment channel.
PERFORM derive_strat_seg_chnl USING w_faglflext-rassc
w_faglflext-prctr
CHANGING w_faglflext-strat_seg_chnl.
Determine the all item ID and all products.
PERFORM derive_all_item_id USING w_t001-waers
CHANGING w_faglflext-all_item_id
w_faglflext-all_products.
Determine the all customers and all customers channel.
PERFORM derive_all_customers_fields USING w_faglflext-strat_seg
*w_faglflext-strat_seg_chnl
CHANGING w_faglflext-all_cust
*w_faglflext-all_cust_chnl.
Determine the sub account using the company ID of the trading partner.
PERFORM derive_sub_account USING w_faglflext-rassc
CHANGING w_faglflext-sub_acct.
PERFORM derive_sub_account USING w_t001-rcomp
w_faglflext-rassc
CHANGING w_faglflext-sub_acct.
****Begin Basil changes to include hyperion acct in selection (10/03/2007).
READ TABLE i_zall_gl INTO w_zall_gl
WITH KEY bukrs = w_faglflext-rbukrs
saknr = w_faglflext-racct
BINARY SEARCH.
IF sy-subrc = 0.
****End Basil changes to include hyperion acct in selection (10/03/2007).
Determine the Hyperion account number from G/L account long text.
PERFORM derive_hyperion_account USING w_faglflext-racct
w_faglflext-rfarea
"KMK5/22/06 ITR: 20592
w_faglflext-sub_acct
w_faglflext-rassc
w_faglflext-prctr
CHANGING w_faglflext-hyperion_acct
w_faglflext-reverse_sign "NEM8/21/06 ITR: 24286
w_faglflext-balance_sheet "NEM8/21/06 ITR: 24286
w_faglflext-zzsarea
w_faglflext-zzsareaim
w_faglflext-strat_seg.
ENDIF.
Determine the all customers and all customers channel.
PERFORM derive_all_customers_fields USING w_faglflext-strat_seg
w_faglflext-strat_seg_chnl
CHANGING w_faglflext-all_cust
w_faglflext-all_cust_chnl.
Update i_FAGLFLEXT with the newly derive fields.
MODIFY i_faglflext FROM w_faglflext
TRANSPORTING entity
strat_seg
strat_seg_chnl
all_item_id
all_products
all_cust
all_cust_chnl
hyperion_acct
sub_acct
fiscal_period
zzsarea
zzsareaim
reverse_sign "NEM8/21/06 ITR: 24286
balance_sheet. "NEM8/21/06 ITR: 24286
ENDLOOP.
CHECK s_rhype IS NOT INITIAL.
SORT s_rhype BY low.
LOOP AT i_faglflext INTO w_faglflext.
READ TABLE s_rhype WITH KEY low = w_faglflext-hyperion_acct.
IF sy-subrc NE 0.
CLEAR w_faglflext-hyperion_acct.
MODIFY i_faglflext FROM w_faglflext.
ENDIF.
ENDLOOP.
DELETE i_faglflext WHERE hyperion_acct IS INITIAL.
ENDFORM. " derive_add_fields_faglflext
*& Form derive_entity
Derive the entity using the company code.
-->RCOMP - Company code.
<--ENTITY - Entity
FORM derive_entity USING rcomp TYPE t_t001-rcomp
CHANGING entity TYPE t_faglflext-entity.
CLEAR:
entity.
Get necessary global company code data.
READ TABLE i_t880 INTO w_t880
WITH KEY rcomp = rcomp
BINARY SEARCH.
IF sy-subrc = 0.
entity = w_t880-name2+0(3).
TRANSLATE entity TO UPPER CASE.
ELSE.
MESSAGE e060
WITH w_t001-rcomp.
Company code & not found on table T880
ENDIF.
ENDFORM. " derive_entity
*& Form get_t001_data
Get T001 (Company Codes) data from the database.
FORM get_t001_data.
SELECT bukrs waers rcomp
INTO TABLE i_t001
FROM t001
CLIENT SPECIFIED
WHERE mandt = sy-mandt.
SORT i_t001 BY bukrs.
ENDFORM. " get_t001_data
*& Form get_t880_data
Get T880 (Global Company Data (for KONS Ledger)) data from the
database.
FORM get_t880_data.
SELECT rcomp name2
INTO TABLE i_t880
FROM t880
CLIENT SPECIFIED
WHERE mandt = sy-mandt.
SORT i_t880 BY rcomp.
ENDFORM. " get_t880_data
*& Form derive_all_item_id
Derive the all item ID from the company code currency key.
-->WAERS - Currency key.
<--ALL_ITEM_ID - All item ID.
<--ALL_ITEM_ID - All item ID.
FORM derive_all_item_id USING waers TYPE t_t001-waers
CHANGING all_item_id TYPE t_faglflext-all_item_id
all_products TYPE t_faglflext-all_products
CLEAR:
all_item_id.
Populate all item ID.
all_item_id = c_all_item_id.
IF waers = c_us_dollars.
REPLACE '*' WITH c_united_states INTO all_item_id.
ELSE.
REPLACE '*' WITH c_local INTO all_item_id.
ENDIF.
Populate all products.
all_products = c_all_products.
TRANSLATE all_products TO UPPER CASE.
ENDFORM. " derive_all_item_id
*& Form derive_all_customers_fields
Derive the all customers and all customer channel fields from
the strategic segment and strategic segment channel respectively.
-->STRAT_SEG - Strategic segment.
-->STRAT_SEG_CHNL - Strategic segment channel.
<--ALL_CUST - All customers.
<--ALL_CUST_CHNL - All customers channel.
FORM derive_all_customers_fields USING strat_seg TYPE
t_faglflext-strat_seg
strat_seg_chnl TYPE
t_faglflext-strat_seg_chnl
CHANGING all_cust TYPE
t_faglflext-all_cust
all_cust_chnl TYPE
t_faglflext-all_cust_chnl.
CLEAR:
all_cust,
all_cust_chnl.
all_cust = strat_seg.
all_cust+2(1) = c_all_customers.
TRANSLATE all_cust TO UPPER CASE.
all_cust_chnl = strat_seg_chnl.
TRANSLATE all_cust_chnl TO UPPER CASE.
ENDFORM. " derive_all_customers_fields
*& Form derive_hyperion_account
Read G/L account long text to get the Hyperion account number.
-->RACCT - SAP G/L account number.
<--HYPERION_ACCT - Hyperion account number.
FORM derive_hyperion_account USING racct TYPE t_faglflext-racct
farea TYPE t_faglflext-rfarea
"KMK5/22/06 ITR 20592
sub_account TYPE
t_faglflext-sub_acct
rassc TYPE t_faglflext-rassc
prctr TYPE t_faglflext-prctr
CHANGING hyperion_acct TYPE t_faglflext-hyperion_acct
reverse_sign TYPE t_faglflext-reverse_sign "NEM8/21/06 ITR: 24286
balance_sheet TYPE t_faglflext-balance_sheet "NEM8/21/06 ITR: 24286
zzsarea TYPE t_faglflext-zzsarea
zzsareaim TYPE t_faglflext-zzsareaim
strat_seg TYPE t_faglflext-strat_seg.
DATA:
lv_text_name TYPE thead-tdname,
l_strl TYPE i VALUE 0,
l_hyperion_acct(10), "KMK5/20/06 ITR 20527
l_farea(10) VALUE '0000000000', "KMK5/22/06 ITR 20592
l_balance_sheet(1), "NEM8/17/06 ITR 25792
l_string TYPE tline-tdline. "NEM8/17/06 ITR 25792
DATA: l_hyp_account_1 TYPE tline-tdline,
l_hyp_account_2 TYPE tline-tdline,
l_hyp_account_3 TYPE tline-tdline.
reverse_sign = '1'.
SELECT SINGLE bilkt xbilk
FROM ska1
INTO (l_hyperion_acct,l_balance_sheet)
WHERE ktopl = c_global_tcoa
AND saknr = racct.
balance_sheet = l_balance_sheet.
l_string = w_zall_gl-hyper.
SEARCH l_string FOR '-'.
IF sy-subrc = '0'.
reverse_sign = -1.
ELSE.
reverse_sign = 1.
ENDIF.
CHECK w_zall_gl-hyper IS NOT INITIAL.
CLEAR: l_hyp_account_1, l_hyp_account_2, l_hyp_account_3.
SPLIT w_zall_gl-hyper
AT ';'
INTO l_hyp_account_1 l_hyp_account_2 l_hyp_account_3.
IF l_hyp_account_2 IS INITIAL. " Only one hyperion account
hyperion_acct = l_hyp_account_1+0(7).
l_strl = STRLEN( hyperion_acct ) - 1.
IF hyperion_acct+l_strl(1) EQ '1'.
CLEAR sub_account.
PERFORM repopulate_strategic_segment
USING rassc prctr
CHANGING strat_seg.
zzsareaim = g_hold_sales_type.
zzsarea = g_hold_sales_area.
ENDIF.
ELSE. " Two or more hyperion accounts
IF sub_account > ''.
hyperion_acct = l_hyp_account_2+0(7).
ELSE.
hyperion_acct = l_hyp_account_1+0(7).
ENDIF.
ENDIF.
CLEAR: w_hyperion.
w_hyperion-racct = racct.
w_hyperion-hyperion_acct = hyperion_acct.
w_hyperion-reverse_sign = reverse_sign.
ENDFORM. " derive_hyperion_account
*& Form derive_sub_account
Determine the sub account based on the company ID of the trading
partner.
-->RASSC - Company ID of trading partner.
<--SUB_ACCT - Sub account.
*FORM derive_sub_account USING rassc TYPE t_faglflext-rassc
CHANGING sub_acct TYPE t_faglflext-sub_acct.
IF rassc IS INITIAL.
CLEAR: sub_acct.
ELSE.
sub_acct = rassc.
TRANSLATE sub_acct TO UPPER CASE.
ENDIF.
*ENDFORM. " derive_sub_account
FORM derive_sub_account USING rcomp TYPE t_t001-rcomp
rassc TYPE t_faglflext-rassc
CHANGING sub_acct TYPE t_faglflext-sub_acct.
IF rassc IS INITIAL.
CLEAR: sub_acct.
ELSE.
READ TABLE i_t880 INTO w_t880
WITH KEY rcomp = rassc
BINARY SEARCH.
IF sy-subrc = 0.
sub_acct = w_t880-name2.
TRANSLATE sub_acct TO UPPER CASE.
ELSE.
MESSAGE e060
WITH w_t001-rcomp.
Company code & not found on table T880
ENDIF.
ENDIF.
ENDFORM. " derive_sub_account
*& Form repopulate_strategic_segment
Derive the strategic segment based on the company ID of the trading
partner or the profit center.
-->RASSC - Company ID of trading partner.
-->PRCTR - Profit center.
<--STRAT_SEG - Strategic segment.
FORM repopulate_strategic_segment USING rassc TYPE t_faglflext-rassc
prctr TYPE t_faglflext-prctr
CHANGING strat_seg TYPE t_faglflext-strat_seg
DATA:
lv_segment TYPE cepc-segment.
CLEAR:
strat_seg.
Find the valid profit center record.
LOOP AT i_cepc INTO w_cepc
WHERE prctr = prctr AND
datab <= sy-datum AND
datbi >= sy-datum.
Pad segment with leading zeros if necessary.
lv_segment = w_cepc-segment.
SHIFT lv_segment RIGHT DELETING TRAILING ' '.
TRANSLATE lv_segment USING ' 0'.
Get the segment name from FAGL_SEGMT (Master Data for Segments).
SELECT SINGLE *
FROM fagl_segmt
WHERE langu = sy-langu AND
segment = lv_segment.
IF sy-subrc = 0.
strat_seg = fagl_segmt-name+0(3).
TRANSLATE strat_seg TO UPPER CASE.
ENDIF.
ENDLOOP.
ENDFORM. "repopulate_strategic_segment
" repopulate_strategic_segment&----
*& Form derive_strategic_segment
Derive the strategic segment based on the company ID of the trading
partner or the profit center.
-->RASSC - Company ID of trading partner.
-->PRCTR - Profit center.
<--STRAT_SEG - Strategic segment.
FORM derive_strategic_segment USING rassc TYPE t_faglflext-rassc
prctr TYPE t_faglflext-prctr
CHANGING strat_seg TYPE t_faglflext-strat_seg
sales_type TYPE t_faglflext-zzsareaim
sales_area TYPE t_faglflext-zzsarea.
DATA:
lv_segment TYPE cepc-segment.
CLEAR:
strat_seg.
*Hold values in Sales Type and Sales area before setting to default
*values
In case need to use them later
g_hold_sales_type = sales_type.
g_hold_sales_area = sales_area.
If the company ID of the trading partner is populated, then set the
strategic segment to a default value.
And set Sales Type and Sales area to default values **NEM 07/13/06
IF NOT rassc IS INITIAL.
strat_seg = c_def_strat_seg.
sales_type = c_sales_type.
sales_area = c_sales_area.
TRANSLATE strat_seg TO UPPER CASE.
TRANSLATE sales_type TO UPPER CASE.
TRANSLATE sales_area TO UPPER CASE.
EXIT.
ENDIF.
Find the valid profit center record.
LOOP AT i_cepc INTO w_cepc
WHERE prctr = prctr AND
datab <= sy-datum AND
datbi >= sy-datum.
Pad segment with leading zeros if necessary.
lv_segment = w_cepc-segment.
SHIFT lv_segment RIGHT DELETING TRAILING ' '.
TRANSLATE lv_segment USING ' 0'.
Get the segment name from FAGL_SEGMT (Master Data for Segments).
SELECT SINGLE *
FROM fagl_segmt
WHERE langu = sy-langu AND
segment = lv_segment.
IF sy-subrc = 0.
strat_seg = fagl_segmt-name+0(3).
TRANSLATE strat_seg TO UPPER CASE.
ENDIF.
ENDLOOP.
ENDFORM. " derive_strategic_segment
*& Form get_cepc_data
Get CEPC (Profit Center Master Data Table) data from the database.
FORM get_cepc_data.
SELECT prctr datbi kokrs datab khinr segment
INTO TABLE i_cepc
FROM cepc
FOR ALL ENTRIES IN i_faglflext
WHERE prctr = i_faglflext-prctr.
SORT i_cepc BY prctr datab.
ENDFORM. " get_cepc_data
*& Form derive_strat_seg_chnl
Derive the strategic segment channel based on the company ID of the
trading partner or the profit center area.
-->RASSC - Company ID of trading partner.
-->PRCTR - Profit center.
<--STRAT_SEG_CHNL - Strategic segment channel.
FORM derive_strat_seg_chnl USING rassc TYPE t_faglflext-rassc
prctr TYPE t_faglflext-prctr
CHANGING strat_seg_chnl TYPE
t_faglflext-strat_seg_chnl.
CLEAR:
g_setclass,
g_subclass,
g_setname,
strat_seg_chnl.
If the company ID of the trading partner is populated, then set the
strategic segment to a default value.
IF NOT rassc IS INITIAL.
strat_seg_chnl = c_def_strat_seg_chnl.
TRANSLATE strat_seg_chnl TO UPPER CASE.
EXIT.
ENDIF.
Check for SETNAME = 2*** in setleaf table.
PERFORM get_setleaf_data USING c_prctr_group
prctr
CHANGING g_subrc.
IF g_subrc NE c_no_record.
PERFORM find_setleaf_record CHANGING g_subrc.
SELECT SINGLE *
FROM setheadert
WHERE setclass = g_setclass AND
subclass = g_subclass AND
setname = g_setname AND
langu = sy-langu.
IF sy-subrc = 0.
strat_seg_chnl = setheadert-descript+0(2).
TRANSLATE strat_seg_chnl TO UPPER CASE.
ENDIF.
ELSE.
Find the valid profit center record.
LOOP AT i_cepc INTO w_cepc
WHERE prctr = prctr AND
datab <= sy-datum AND
datbi >= sy-datum.
Get the correct SETNODE (Lower-level sets in sets) record.
PERFORM get_setnode_data USING c_prctr_group
w_cepc-khinr
CHANGING g_subrc.
PERFORM find_setnode_record CHANGING g_subrc.
IF g_subrc = c_no_record.
EXIT.
ENDIF.
If an appropriate SETNODE record still has not been found, then
keep looking.
IF g_subrc = c_wrong_record.
DO.
PERFORM get_setnode_data USING c_prctr_group
w_setnode-setname
CHANGING g_subrc.
PERFORM find_setnode_record CHANGING g_subrc.
IF g_subrc = c_no_record OR
g_subrc = c_correct_record.
EXIT.
ENDIF.
ENDDO.
ENDIF.
In the end, there was no SETNODE record to find.
IF g_subrc = c_no_record.
EXIT.
ENDIF.
SELECT SINGLE *
FROM setheadert
WHERE setclass = g_setclass AND
subclass = g_subclass AND
setname = g_setname AND
langu = sy-langu.
IF sy-subrc = 0.
strat_seg_chnl = setheadert-descript+0(2).
TRANSLATE strat_seg_chnl TO UPPER CASE.
ENDIF.
ENDLOOP.
ENDIF.
ENDFORM. " derive_strat_seg_chnl
*& Form get_setnode_data
Get SETNODE (Lower-level sets in sets) data from the database.
-->SETCLASS - Set class.
-->SUBSETNAME - Subordinate set ID.
<--SUBRC - Return code.
FORM get_setnode_data USING setclass TYPE c
subsetname TYPE c
CHANGING subrc TYPE sy-subrc.
SELECT setclass subclass setname
INTO TABLE i_setnode
FROM setnode
WHERE setclass = c_prctr_group AND
subsetname = subsetname.
subrc = sy-subrc.
ENDFORM. " get_setnode_data
*& Form get_setleaf_data
Get SETLEAF (Values in Sets) data from the database.
-->SETCLASS - Set class.
-->VALFROM - Subordinate set ID.
<--SUBRC - Return code.
FORM get_setleaf_data USING setclass TYPE c
valfrom TYPE c
CHANGING subrc TYPE sy-subrc.
subrc = c_correct_record.
SELECT setclass setname valfrom subclass
INTO TABLE i_setleaf
FROM setleaf
WHERE setclass = c_prctr_group AND
valfrom = valfrom AND
setname GE '2000' AND
setname LE '2999'.
IF sy-subrc <> 0.
subrc = c_no_record.
EXIT.
ENDIF.
ENDFORM. " get_setleaf_data
*& Form find_setleaf_record
Find the appropriate SETLEAF record.
<--SUBRC - Return code.
FORM find_setleaf_record CHANGING subrc TYPE sy-subrc.
subrc = c_wrong_record.
If no records were found during selection, then exit the routine.
READ TABLE i_setleaf INDEX 1 TRANSPORTING NO FIELDS.
IF sy-subrc <> 0.
subrc = c_no_record.
EXIT.
ENDIF.
Check to see if one of the records has a setname in the 2000 series of
numbers.
LOOP AT i_setleaf INTO w_setleaf.
g_setclass = w_setleaf-setclass.
g_subclass = w_setleaf-subclass.
g_setname = w_setleaf-setname.
subrc = c_correct_record.
ENDLOOP.
ENDFORM. " find_setleaf_record
*& Form find_setnode_record
Find the appropriate SETNODE record.
<--SUBRC - Return code.
FORM find_setnode_record CHANGING subrc TYPE sy-subrc.
subrc = c_wrong_record.
If no records were found during selection, then exit the routine.
READ TABLE i_setnode INDEX 1 TRANSPORTING NO FIELDS.
IF sy-subrc <> 0.
subrc = c_no_record.
EXIT.
ENDIF.
Check to see if one of the records has a setname in the 2000 series of
numbers.
LOOP AT i_setnode INTO w_setnode.
IF w_setnode-setname+0(1) = c_valid_number.
g_setclass = w_setnode-setclass.
g_subclass = w_setnode-subclass.
g_setname = w_setnode-setname.
subrc = c_correct_record.
EXIT.
ENDIF.
ENDLOOP.
ENDFORM. " find_setnode_record
*& Form split_records_by_period
Split the i_FAGLFLEXT records by fiscal period. This is necessary
because all (16) fiscal periods are on one record.
FORM split_records_by_period .
REFRESH:
i_output_detail.
LOOP AT i_faglflext INTO w_faglflext.
START OF CHANGES BY BAYAPV on 07/07/2007**********************
*SELECT SINGLE BUKRS
SAKNR
XOPVW
into w_skb1
from skb1
FOR ALL ENTRIES IN I_FAGLFLEXT
where bukrs = w_faglflext-rbukrs
and SAKNR = w_faglflext-racct.
*IF w_skb1-XOPVW = 'X'.
*SELECT BUKRS
HKONT -
ALV Title Not Display after transporting the Programme from DeV to Qlty
Hellow Experts,
i developed one ALV report with two screens, i transported the report from Development server to Qulaity server.
in Development server report are working fine but in Qulaity server after transporting the TiTle of ALV not display , plz give me some hint , below is my code to display alv title
DATA: alv_grid TYPE REF TO cl_gui_alv_grid.
DATA:alv_grid_ref type ref to CL_GUI_ALV_GRID.
DATA: layout TYPE lvc_s_layo.
layout-grid_title = 'Daily Material Reports.' .
DATA: fieldcat TYPE lvc_t_fcat.
I m using ALL METHOD alv_grid->set_table_for_first_display method for display alv .
Thanks,
Regards
Neha.Hi neha,
use the sap/help link to solve your issue,
[http://help.sap.com/saphelp_erp2004/helpdata/en/0a/b5533cd30911d2b467006094192fe3/content.htm]
if not use the below example code ,
Heading 3 :h3 Set the title of the grid
Fill the grid_title field of structure lvc_s_layo.
Note that the structure lvc_s_layo can be used for to customize the grid appearance in many ways.
DATA:
ALV control: Layout structure
gs_layout TYPE lvc_s_layo.
For example :
Set grid title
gs_layout-grid_title = 'Flights'.
CALL METHOD go_grid->set_table_for_first_display
EXPORTING
i_structure_name = 'SFLIGHT'
is_layout =gs_layout*
CHANGING
it_outtab = gi_sflight.
Regards,
Saravana.S
Edited by: saravanasap on Dec 21, 2011 8:13 AM -
Selections not displaying in Photoshop CC
When using any selection tool in Photoshop CC it will not display the selection - it will only dosplay the sele ction when I go to the Edit option on the Toolbar.
I'm using a HP Envy Laptop running Windows 8.1.
Any ideas as to what might be going on?Yes follow the instracktion.
-
ALV footer not displayed, column header icons missing.
Hi,
My simple application uses the ALV grid, but the footer (showing the page number, next page icon, etc) does not display, even though there are pages and pages of data. This is in both Internet Explorer (6) and Firefox (I was expecting it to be an IE problem !).
I have tried using the relevant method (though I think it should be visible by default):
l_table->if_salv_wd_table_settings~set_footer_visible( value = IF_SALV_WD_C_TABLE_SETTINGS=>FOOTER_VISIBLE_TRUE ).
but it still doesn't work. Other table settings methods do work (eg. setting the number of rows). Additionally, the icons for sorting columns do not appear in the column headers.
I've searched on this forum, and looked for relevant OSS notes, but can't find anything. Any thoughts anyone ?
Thanks,
Nick.Hi
Did u try with this code?
lr_config->if_salv_wd_table_settings~set_visible_row_count( '5' ).
lr_config->if_salv_wd_table_settings~SET_FOOTER_VISIBLE( '5' ).
Regards
Arun.P -
ALV table not displayed in Popup
Hello Experts,
I have created a view which contains an ALV table. This view is embedded in one window.
I am opening this window on click of a button. I am reading data from one custom table and displaying it in ALV.
The problem I am facing is that ALV displays the data the very first time window is opened. After closing the window if we again open the window the ALV table is not displayed.
I have checked the code in debugging and values are coming in Node but not displayed. There is no visibility property attached to this ALV.
Every thing was working fine until patching was applied. The same code is working fine in prod but in Dev I am facing this issue.
Can any one you guys suggest me that why it is happening? Is it because of Patch upgrade and is there any sap note to resolve this.
Thanks in Advance
AmitHi Khandelwala,
Is the entire ALV table disappearing? as it is a popup, the view will always be destroyed when the popup window is closed. It will be again recreated once the popup window is thrown again.
However the component controller instance will not be freed and will exist.
My guess is some plugs are being fired displaying empty view.
Please let us know if it is only data that is disappearing.
Just check the stack level of ur dev and production landscapes. If Dev is on higher version, then it might be due to patch.
Thanks,
Anand -
Dynamic Selection not displayed from tcode ZME5A but from se93 yes
I have made a copy of standard program RM06BA00 and transaction ZME5A.
Everything works except Dynamic selection which is not displayed.
When I run transaction from SE93 Dynamic selections show up.
Do you know why this happens and how to fix it?Hi,
You problem probably is related with the "container" of this screen. Check if it still in the screen 1000, because this program is a report and if you change some screen parameter, the screen is recreated and elements inserted by user may be lost.
Also, check the program names link, like:
CALL SUBSCREEN %_SUBSCREEN_%_SUB%_CONTAINER INCLUDING 'SAPLSSEL' '2001' .
Best regards,
Mengue
Do not consider this above if the button is not displayed ****
Edited by: Leandro Mengue on Oct 15, 2010 7:56 PM -
Standard view in ALV is not displaying
hai experts,
While displaying the results in the ALV, the standard view is not displaying, although it contains entries.the "display" tab in the settings, all the displayed rows are auto matically setting ')', can anyone help me out how to solve this problem?
Madhucan u please tell me in a detailed way, because it is in web dynpro abap.
please tell the process in the detailed way.
what i did is:
settings->display tab->
Displayed Rows: 10
Displayed Columns: all.
and made all the columns which were hidden to visible and it is working for this time.
but next time when i execute the application, the standard view is not displayed again.
hope u understood my problem
Madhu -
Cell(Row) Selection not display in OOPS ALV
Hi all,
I am not able to get the cell(row) selection in the oops ALV when i called it second time.
I am displaying some information using oops alv in 100 screen. After user action on 100 screen i am calling 200 screen with different information which is also display in oops alv. When i displaying information in second time the cell(row) selection is not getting displayed.
For both ALV the fieldcatelog is different.
Initially i tried using same container but i face same problem, so i am trying to call second alv in new screen.
But problem remain same.
Can anyone help me to solve this problem ?
Regards
Nileshhi,
can u send ur report so dat i can look furhter to it.and help u out -
Added new field to ALV but not displaying the ouput
Hi guys,
I'm adding one more column to be displayed on an old existing program that uses REUSE_ALV_FIELDCATALOG_MERGE to generate the ALV fieldcat.
DATA : BEGIN OF itab OCCURS 0,
matnr LIKE eina-matnr,
extwg LIKE mara-extw,
matkl LIKE mara-matkl,
mtart LIKE mara-mtart,
maktx LIKE makt-maktx,
lifnr LIKE eina-lifnr,
wglif LIKE eina-wglif,
<span style="color:red">idnlf like eina-idnlf, " <----
new field</span>
name1 LIKE lfa1-name1,
profl LIKE mara-profl,
END OF itab.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-cprog
i_internal_tabname = 'ITAB'
i_client_never_display = ''
i_inclname = sy-cprog
i_bypassing_buffer = 'X'
CHANGING
ct_fieldcat = t_cat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
I've added in a new field inside the ITAB internal table, but it wouldn't appear in the t_cat, only all the old fields will appear. What have i done wrong?Hi
Facing similar kind of issue.. added one field to the existing internal table. This is not getting populted by the field catalog merge FM. Tried with the suggested solution also of running programs BALVBUFDEL,
BCALV_BUFFER_DEL_SHARED then logging off and logging in..
But the newly added field is not getting populated. Any suggestions would be of great help.
Regards,
sridevi S -
Web Dynpro ALV is not really shown in an iview
Hello,
I have a web dynpro application with an ALV. When I test my application in SE80 everything is fine. I get the list I want to have, but when I have implemented the web dynpro application into a web dynpro iview in the portal, the ALV is empty. I can't see any content. I can only see, that some rows are selected, but I can't see them. It's a little bit strange.
Can somebody helps me?
Thanks, MarkusHi markus there are certain special object like `ALV, tabstrip pop ups etc etc which find it difficult to render on portal....
open up a OSS message with SAP, hope they suggest some note to rectify the same.
one other wild thought to it we can attach a transaction to it and then create a WinGui Transaction ivew of the same (but will work for only those who have SAP Gui in there m/c).
Cheers!!
SJ. -
0ACCNT_ASGN_TEXT - 0LANGU Selection not displayed
Hello all,
How r u ?
We are extracting 0ACCNT_ASGN_TEXT data to ZACCASGN InfoObject. I wonder why the selection for 0LANGU is displayed in the InfoPackage -> Data Selection Tab.
The Selection Check box is checked in the DataSource/Trans. Structure Tab. I could see the same in the R/3 - RSA3 also. There I entered the selection and viewed the data.
There are records with many languages, but we require only data related to one Language.
How to make this out ?
Best Regards....
Sankar Kumar
+91 98403 47141Hi Paolo,
We are not loading 0ACCNT_ASGN, but a Z.... IO.
Also, I deleted the data in Z.... IO before loading.
I shall paste the complete code in the start routine here,
PROGRAM CONVERSION_ROUTINE.
Type pools used by conversion program
TYPE-POOLS: RS, RSARC, RSARR, SBIWA, RSSM.
Declaration of transfer structure (selected fields only)
TYPES: BEGIN OF TRANSFER_STRUCTURE ,
Record number to be filled in case of adding row(s)
to enable 'error handling'
record TYPE rsarecord,
InfoObject 0LANGU: LANG - 000001
LANGU(000001) TYPE C,
InfoObject ZCV_BUCAT: CHAR - 000060
KEY1(000060) TYPE C,
InfoObject 0TXTSH: CHAR - 000020
TXTSH(000020) TYPE C,
END OF TRANSFER_STRUCTURE .
Declaration of Datapackage
TYPES: TAB_TRANSTRU type table of TRANSFER_STRUCTURE.
Global code used by conversion rules
$$ begin of global - insert your declaration only below this line -
TABLES:
DATA: ...
$$ end of global - insert your declaration only before this line -
FORM STARTROUTINE
USING G_S_MINFO TYPE RSSM_S_MINFO
CHANGING DATAPAK type TAB_TRANSTRU
G_T_ERRORLOG TYPE rssm_t_errorlog_int
ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel datapackage
$$ begin of routine - insert your code only below this line -
DATA: l_s_datapak_line type TRANSFER_STRUCTURE,
l_s_errorlog TYPE rssm_s_errorlog_int.
abort <> 0 means skip whole data package !!!
DELETE DATAPAK WHERE LANGU <> 'NL'.
ABORT = 0.
$$ end of routine - insert your code only before this line -
ENDFORM.
Sankar -
Alv Icon not displaying when download to local directory
Dear All,
I have ALV report sent THROUGH email . When i had download the report to local directory . I am unable to see the Icons like block , in the report .
Thanks,
SridharHi Sridhar,
The icons are only displayed by the SAPGUI. In the report data they are only something like @1F@... - which then is interpreted by the SAPGUI.
When downloading the report the internal data is downloaded, but no SAPGUI will interpret them any longer (since you are not using SAPGUI to view the downloaded data).
So in conclusion it is not possible to see those items. If you want to download the report you should avoid the usage of icons.
Regards,
Gerd Rother -
I'm using the same User id in two different PC's, In one PC the ALV title is coming and in another PC the ALV title is not coming. Can anyone advice me on this.
Thanks.Please check the SAPGui version and patch level in both systems
aRs -
ALV grid is not displaying few fields of final internal table of type DMBTR
hello frnds,
i am displaying 10 fields in ALV grid using field catalog.
among them five fields are currency fields on which i doing some arithematic operations. but all these fields are not getting displayed in alv grid.
here is my code....
declaring final strucutre to generate report
TYPES:BEGIN OF ty_final,
gjahr TYPE gjahr, " Year
wwert TYPE wwert_d, " Traslation date
bukrs TYPE bukrs, " company code
hkont TYPE hkont, " General ledger account
txt20 TYPE txt20_skat, " Account name
belnr TYPE belnr_d, " Purchase order number
shkzg TYPE shkzg, " Dt/Cr indicator
dmbtr1 TYPE dmbtr, " Ammount in local currency
v_alc TYPE dmbtr, " Ammount in local currency
wrbtr TYPE wrbtr, " Ammount in foreign currency
ebeln TYPE ebeln, " Purchase order number
ebelp TYPE ebelp, " Item number
matnr TYPE matnr, " Material number
menge TYPE menge_d, " Qunatity
meins TYPE meins, " Unit of measure
stprs TYPE stprs, " Std material master
v_iv TYPE dmbtr, " Invoice value
pswsl TYPE pswsl, " Currency
v_erc TYPE dmbtr, " Exchange rate calculated
v_op TYPE dmbtr, " Order price
v_uos TYPE dmbtr, " Unit order to stock
v_io TYPE dmbtr, " Invoice to order
v_uv TYPE dmbtr, " Unit value
v_t TYPE dmbtr, " Total
v_d TYPE dmbtr, " Differecne
netpr TYPE bprei, " Net price in purchasing document
v_total TYPE dmbtr, " Total
v_os TYPE dmbtr, " Order to stock
v_ito TYPE dmbtr, " Invoice to order
saknr TYPE saknr, " G/L account number
END OF ty_final.
FORM move_data.
IF NOT i_bseg[] IS INITIAL.
LOOP AT i_bseg INTO wa_bseg.
wa_final-gjahr = wa_bseg-gjahr.
wa_final-bukrs = wa_bseg-bukrs.
wa_final-hkont = wa_bseg-hkont.
wa_final-belnr = wa_bseg-belnr.
wa_final-shkzg = wa_bseg-shkzg.
wa_final-wrbtr = wa_bseg-wrbtr.
wa_final-ebeln = wa_bseg-ebeln.
wa_final-ebelp = wa_bseg-ebelp.
wa_final-matnr = wa_bseg-matnr.
wa_final-menge = wa_bseg-menge.
wa_final-meins = wa_bseg-meins.
wa_final-pswsl = wa_bseg-pswsl.
wa_final-dmbtr1 = wa_bseg-dmbtr.
wa_final-saknr = wa_bseg-saknr.
wa_final-v_total = wa_bseg-dmbtr.
READ TABLE i_bkpf INTO wa_bkpf WITH KEY bukrs = wa_bseg-bukrs.
IF sy-subrc = 0.
wa_final-wwert = wa_bkpf-wwert.
ENDIF.
CLEAR wa_bkpf.
READ TABLE i_mbew INTO wa_mbew WITH KEY matnr = wa_bseg-matnr.
IF sy-subrc = 0.
wa_final-stprs = wa_mbew-stprs.
ENDIF.
CLEAR wa_mbew.
READ TABLE i_ekpo INTO wa_ekpo WITH KEY ebeln = wa_bseg-ebeln.
IF sy-subrc = 0.
wa_final-netpr = wa_ekpo-netpr.
ENDIF.
CLEAR wa_ekpo.
READ TABLE i_skat INTO wa_skat WITH KEY saknr = wa_bseg-saknr.
IF sy-subrc = 0.
wa_final-txt20 = wa_skat-txt20.
ENDIF.
calculating output values
IF wa_bseg-shkzg = 'H'.
wa_final-v_alc = -1 * wa_bseg-dmbtr.
ELSEIF wa_bseg-shkzg = 'S'.
wa_final-v_alc = 1 * wa_bseg-dmbtr.
ENDIF.
DATA : l_c_v_alc TYPE p DECIMALS 2,
l_c_v_iv TYPE p DECIMALS 2.
l_c_v_alc = wa_final-v_alc.
IF wa_bseg-menge NE 0.
wa_final-v_iv = wa_bseg-dmbtr / wa_bseg-menge.
ENDIF.
IF wa_bseg-dmbtr NE 0.
wa_final-v_erc = wa_bseg-wrbtr / wa_final-dmbtr1.
ENDIF.
IF wa_final-v_erc NE 0.
wa_final-v_op = wa_ekpo-netpr / wa_final-v_erc.
ENDIF.
wa_final-v_uos = wa_mbew-stprs - wa_final-v_op.
wa_final-v_io = wa_final-v_iv + wa_final-v_uos.
wa_final-v_uv = wa_final-v_uos + wa_final-v_io.
wa_final-v_t = wa_final-v_uv + wa_bseg-menge.
wa_final-v_d = wa_final-v_t - wa_final-v_alc.
wa_final-v_os = wa_final-v_uos * wa_bseg-menge.
wa_final-v_ito = wa_final-v_io * wa_bseg-menge.
CLEAR wa_bseg.
APPEND wa_final TO i_final.
CLEAR wa_final.
ENDLOOP.
ENDIF.
ENDFORM. "data_retrieval
*& Form build_fieldcat
text
--> p1 text
<-- p2 text
FORM build_fieldcat.
CLEAR wa_fieldcat.
* TYPES : v_alc TYPE dmbtr. "curr. " decimal 2.
DATA: l_c_v_alc TYPE p DECIMALS 2,
l_c_v_iv TYPE p DECIMALS 2 .
l_c_v_alc = v_alc.
l_c_v_iv = v_iv.
Constant Declarations.
CONSTANTS:
l_c_gjahr(5) TYPE c VALUE 'GJAHR', " Year
l_c_wwert(5) TYPE c VALUE 'WWERT', " Traslation date
l_c_bukrs(5) TYPE c VALUE 'BUKRS', " company code
l_c_hkont(5) TYPE c VALUE 'HKONT', " General ledger account
l_c_txt20(10) TYPE c VALUE 'TXT20', " Account name
l_c_belnr(5) TYPE c VALUE 'BELNR', " Doc number
l_c_shkzg(5) TYPE c VALUE 'SHKZG', " Dt/Cr indicator
l_c_dmbtr(5) TYPE c VALUE 'DMBTR1', " Ammount in local currency
" l_c_v_alc TYPE c VALUE 'V_ALC', " Ammount in local currency
l_c_wrbtr(5) TYPE c VALUE 'WRBTR', " Ammount in foreign currency
l_c_ebeln(5) TYPE c VALUE 'EBELN', " Purchase order number
l_c_ebelp(5) TYPE c VALUE 'EBELP', " Item number
l_c_matnr(5) TYPE c VALUE 'MATNR', " Material number
l_c_menge(7) TYPE c VALUE 'MENGE', " Qunatity
l_c_meins(5) TYPE c VALUE 'MEINS', " Unit of measure
l_c_stprs(5) TYPE c VALUE 'STPRS', " Std material master
" l_c_v_iv(4) TYPE c VALUE 'V_IV', " Invoice value
l_c_pswsl(5) TYPE c VALUE 'PSWSL', " Currency
l_c_v_erc(5) TYPE c VALUE 'V_ERC', " Exchange rate calculated
l_c_v_op(4) TYPE c VALUE 'V_OP', " Order price
l_c_v_uos(5) TYPE c VALUE 'V_UOS', " Unit order to stock
l_c_v_io(4) TYPE c VALUE 'V_IO', " Invoice to order
l_c_v_uv(4) TYPE c VALUE 'V_UV', " Unit value
l_c_v_t(3) TYPE c VALUE 'V_T', " Total
l_c_v_d(3) TYPE c VALUE 'V_D', " Differecne
l_c_netpr(5) TYPE c VALUE 'NETPR', " Net price in purchasing document
l_c_v_total(7) TYPE c VALUE 'V_TOTAL', " Total
l_c_v_os(4) TYPE c VALUE 'V_OS', " Order to stock
l_c_v_ito(5) TYPE c VALUE 'V_ITO', " Invoice to order
l_c_saknr(5) TYPE c VALUE 'SAKNR', " G/L account number
l_c_i_final(7) TYPE c VALUE 'I_FINAL'. " Final internal table
Fieldcat for fiscal year
wa_fieldcat-col_pos = 1.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_gjahr.
wa_fieldcat-seltext_m = text-007.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Translation date
wa_fieldcat-col_pos = 2.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_wwert.
wa_fieldcat-seltext_m = text-008.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Company code
wa_fieldcat-col_pos = 3.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_bukrs.
wa_fieldcat-seltext_m = text-009.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for General ledger account
wa_fieldcat-col_pos = 4.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_hkont.
wa_fieldcat-seltext_m = text-010.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Account name
wa_fieldcat-col_pos = 5.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_txt20.
wa_fieldcat-seltext_m = text-011.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Doc number
wa_fieldcat-col_pos = 6.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_belnr.
wa_fieldcat-seltext_m = text-012.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Dt/Cr indicator
wa_fieldcat-col_pos = 7.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_shkzg.
wa_fieldcat-seltext_m = text-013.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Ammount in local currency
wa_fieldcat-col_pos = 8.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = 'DMBTR1'.
wa_fieldcat-seltext_m = text-014.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Ammount in local currency
wa_fieldcat-col_pos = 9.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = 'V_ALC'.
wa_fieldcat-seltext_m = text-015.
wa_fieldcat-ref_fieldname = 'DMBTR'.
wa_fieldcat-no_sign = 'X'.
wa_fieldcat-do_sum = c_x.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Ammount in foreign currency
wa_fieldcat-col_pos = 10.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_wrbtr.
wa_fieldcat-seltext_m = text-016.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Purchse order number
wa_fieldcat-col_pos = 11.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_ebeln.
wa_fieldcat-seltext_m = text-017.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Item No
wa_fieldcat-col_pos = 12.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_ebelp.
wa_fieldcat-seltext_m = text-018.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Material number
wa_fieldcat-col_pos = 13.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_matnr.
wa_fieldcat-seltext_m = text-019.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Qunatity
wa_fieldcat-col_pos = 14.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_menge.
wa_fieldcat-seltext_m = text-020.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Unit of measure
wa_fieldcat-col_pos = 15.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_meins.
wa_fieldcat-seltext_m = text-021.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Std material master
wa_fieldcat-col_pos = 16.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_stprs.
wa_fieldcat-seltext_m = text-022.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Invoice value,
wa_fieldcat-col_pos = 17.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = 'V_IV'.
wa_fieldcat-seltext_m = text-023.
wa_fieldcat-ref_fieldname = 'DMBTR'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Currency
wa_fieldcat-col_pos = 18.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_pswsl.
wa_fieldcat-seltext_m = text-024.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Exchange rate calculated
wa_fieldcat-col_pos = 19.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = 'V_ERC'.
wa_fieldcat-seltext_m = text-025.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Order price
wa_fieldcat-col_pos = 20.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_v_op.
wa_fieldcat-seltext_m = text-026.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Unit order to stock
wa_fieldcat-col_pos = 21.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_v_uos.
wa_fieldcat-seltext_m = text-027.
wa_fieldcat-do_sum = c_x.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Invoice to order
wa_fieldcat-col_pos = 22.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_v_io.
wa_fieldcat-seltext_m = text-028.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Unit value
wa_fieldcat-col_pos = 23.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_v_uv.
wa_fieldcat-seltext_m = text-029.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Total
wa_fieldcat-col_pos = 24.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_v_t.
wa_fieldcat-seltext_m = text-030.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Difference
wa_fieldcat-col_pos = 25.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_v_d.
wa_fieldcat-seltext_m = text-031.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Net Price in Purchasing Document
wa_fieldcat-col_pos = 26.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_netpr.
wa_fieldcat-seltext_m = text-032.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Total
wa_fieldcat-col_pos = 27.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_v_total.
wa_fieldcat-seltext_m = text-033.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Order to stock
wa_fieldcat-col_pos = 28.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_v_os.
wa_fieldcat-seltext_m = text-034.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Invoice to order
wa_fieldcat-col_pos = 29.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_v_ito.
wa_fieldcat-seltext_m = text-035.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
fieldcat for invoice to order
wa_fieldcat-col_pos = 30.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_saknr.
wa_fieldcat-seltext_m = text-035.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
ENDFORM. "build_fieldcatHi romanch,
defining the field catalog you must reference all currency fields to the respective currency key field (type CUKY).
<alv_fieldcat>-cfieldname = 'HWAER'.
This is sample for alv output of a currency field. The alv structure has a field HWAER which carries the currency key, e.g. USD or so.
Obviously you do not provide a cutrrency key for your values. If they are initial (zero), ALV will not display them as 0,00 but leave the field empty if the reference too currency key is not established.
If you define a DDIC structure for the ALV output this refernce is enforced. You can pass the DDIC structure name to the ALV and don not have to create the field catalog manually.
Regards,
Clemens
Maybe you are looking for
-
I am changing my hard drive and want to copy my old hard drive to the new one.
I went to the apple store with a bad hard drive in my macbook pro. The apple store said change the hard drive, they did, but I wanted to save the old hard drive to get everything off of it. So, I borrowed a sata enclosure and I was able to get everyt
-
I tried googling several solutions, but so far nothing seems to work. Everytime i start up my laptop i press CMND+R to make it go to the repair disk utility but instead it takes me as if i have to install lion when i had Snow Leopard 10.6.8. When i d
-
Hello all, I'm on a MacBookPro, OSX MOuntain Lion 10.8.5, ca. 18 months young/old, and the computer has had ongoing issues ..actually since day 1.... (It's been bought in france because of the need of an "azerty", i live in germany - i write here in
-
IPad 2 Wifi iOS 5.1.1 Stuck on Apple Logo
Hello Everybody, My iPad 2 Wifi with iOS 5.1.1 is stuck on the Apple logo. I didn't do anthing to it and this is the first problem I've had since I bought it during the iPad 2 launch. I've tried a few things and they didn't work. I wonder if Apple
-
Sorting Music from 2 different Itune accounts in 1 Library??
I have music from 2 different i-tunes accounts co-mingled in one library on one of my laptops - I'm not exactly sure how that happened - maybe trying to synch the wrong ipod to the wrong computer? Is there easy way to sort a library by user-account n