Issue with Hierarchial ALV using class
Hi,
I am trying to create a report where when the user executes the selection screen he would get an output as a alv tree with the nodes expanded. I have not used the class cl_gui_alv_tree before. The alv is created but I need all the nodes to be expanded. There is a method expand_nodes, but I am unable to get the result as the output still is not in expanded form. All sales orders with list of material being used to be shown on the alv in expanded form.
Please suggest.
Thanks
Sachin
refer below link
http://****************/Tutorials/ALV/ALVTreeDemo/interactive.htm
http://****************/Tutorials/ALV/ALVTreeDemo/demo.htm
Similar Messages
-
Issue with editable alv using cl_gui_alv_grid
Hello all,
its a table update program . user can save create new entry and delete the entires . the screen should be avaiable for multiple time inputs by the user . i achived it by method handle double click and i am refreshing the scrren and making the alv for ready for input . but user wants the screen shoukld get refreshed automatically once user clicks on save button .
how can I achive plz advise .
I am working on ALV by cl_gui_alv_grid , I am using the followingmethods of the class
1) METHODS: handle_toolbar FOR EVENT toolbar OF cl_gui_alv_grid
IMPORTING e_object e_interactive.
2) METHODS: handle_user_command FOR EVENT
user_command OF cl_gui_alv_grid
IMPORTING e_ucomm,
check_changed_data.
3) METHODS: handle_double_click FOR EVENT
double_click OF cl_gui_alv_grid
IMPORTING e_row e_column.
4) METHODS: handle_data_changed
FOR EVENT data_changed OF cl_gui_alv_grid
IMPORTING er_data_changed.
Thanks in advance .Hi Soumyaprakash,
SAve is an user command . I want to have the values which are changed by the user and again the output should be ready for any actions like change the data , create new and delete any entry .
basically the alv output screen should be reday for inputs any number of times untill user clicks on back button .
Thanks
Basavaraj -
Reg..ALV using classes
i have displayed a ALV report with a push button 'HST'.
When i select a particular line(vbeln) and click on pushbutton 'HST' it has to display me a interactive report based on the condition vbeln and posnr.
can anyone help me with the detail code using classes..
answers will be rewarded....
regards,
kumarHi,
Class ALV Specification
Classes used:
CL_GUI_ALV_GRID
Example of ALV using Classes
DATA: lcl_alv TYPE REF TO cl_gui_alv_grid,
t_flights TYPE STANDARD TABLE OF FLIGHTS.
SELECT * FROM flights INTO TABLE t_flights.
CREATE OBJECT lcl_alv
EXPORTING I_PARENT = cl_gui_container=>screen0.
CALL METHOD lcl_alv->set_table_for_first_display
EXPORTING
I_STRUCTURE_NAME = 'FLIGHTS'
CHANGING
IT_OUTTAB = t_flights.
CALL SCREEN 100.
Example Details
This is a simple example of the class ALV, we do not need to create, in this case, a field catalog because we are using the whole table of FLIGHTS and we will show all the fields that this table contains, we do this at the I_STRUCTURE_NAME = 'FLIGHTS' statement.
The CL_GUI_ALV_GRID constructor needs the I_PARENT parameter to define where it will be show, in the example we set the entire screen to place the ALV.
reward if helpful -
List display for ALV using class and methods
Hi friends
I want the list display for the ALV using Class and methods
which class and methods i can use.
Here we can't use the REUSE_ALV_LIST_DISPLAY and also GRID
I was done GRID display using class and methods but i want only list display for using class.
plz Give me sample code of list display not for grid.
Thanks
Nani.hi
please check with this code...
declare grid and container.
DATA : o_alvgrid TYPE REF TO cl_gui_alv_grid,
o_dockingcontainer TYPE REF TO cl_gui_docking_container,
i_fieldcat TYPE lvc_t_fcat,"fieldcatalogue
w_layout TYPE lvc_s_layo."layout
If any events like double click,etc., are needed we have to add additional functionality.
call the screen in program.
Then , create the container as follows
IF cl_gui_alv_grid=>offline( ) IS INITIAL.
CREATE OBJECT o_dockingcontainer
EXPORTING
ratio = '95'
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
others = 6.
ENDIF.
CREATE OBJECT o_alvgrid
EXPORTING
i_parent = o_dockingcontainer.
Build the fieldcatalog
create a output structure in SEll for the ALV output
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = <alv output>
CHANGING
ct_fieldcat = i_fieldcat[]
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE i030."Error in building the field catalogue
LEAVE LIST-PROCESSING.
ENDIF.
*If you need to modify the field catalog,modify it using field sysmbols
*setting the layout
w_layout-grid_title = title.
w_layout-zebra = 'X'.
then displaying the output
CALL METHOD o_alvgrid->set_table_for_first_display
EXPORTING
i_save = 'A'
is_layout = w_layout
CHANGING
it_outtab = i_output[]
it_fieldcatalog = i_fieldcat[]
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE i032 ."Error in Displaying
LEAVE LIST-PROCESSING.
ENDIF.
*After that in PAI of the screen, you need to free the *object while going back from the screen(according to *your requirement)
MODULE user_command_9001 INPUT.
CASE sy-ucomm.
WHEN 'EXIT' OR 'CANC'.
PERFORM f9600_free_objects:
USING o_alvgrid 'ALV' text-e02,
USING o_dockingcontainer 'DOCKING'
text-e01.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_9001 INPUT
*in the program, write the follwoing code
FORM f9600_free_objects USING pobject
value(ptype)
value(ptext).
DATA: l_objectalv TYPE REF TO cl_gui_alv_grid.
CASE ptype.
WHEN 'ALV'.
l_objectalv = pobject.
IF NOT ( l_objectalv IS INITIAL ).
CALL METHOD l_objectalv->free
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
CLEAR: pobject, l_objectalv.
PERFORM f9700_error_handle USING ptext.
ENDIF.
WHEN 'DOCKING'.
DATA: lobjectdock TYPE REF TO cl_gui_docking_container.
lobjectdock = pobject.
IF NOT ( lobjectdock IS INITIAL ).
CALL METHOD lobjectdock->free
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
CLEAR: pobject, lobjectdock.
PERFORM f9700_error_handle USING ptext.
ENDIF.
WHEN 'CONTAINER'.
DATA: lobjectcontainer TYPE REF TO cl_gui_container.
lobjectcontainer = pobject.
IF NOT ( lobjectcontainer IS INITIAL ).
CALL METHOD lobjectcontainer->free
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
CLEAR: pobject, lobjectcontainer.
PERFORM f9700_error_handle USING ptext.
ENDIF.
WHEN OTHERS.
sy-subrc = 1.
PERFORM f9700_error_handle USING
text-e04.
ENDCASE.
ENDFORM. " f9600_free_objects
FORM f9700_error_handle USING value(ptext).
IF sy-subrc NE 0.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = text-e03
txt2 = sy-subrc
txt1 = ptext.
ENDIF.
endform.
also check with this
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVALV/BCSRVALV.pdf
Hope this helps
if it helped, you can acknowledge the same by rewarding
regards
dinesh -
Download Option Not Working in ALV Using Classes
Hi,
Can anyone let me know what im missing since i get only my header downloaded when i download my output to EXCEL.
Im using ALV using CLASSES.
Thanks,
AnitaREPORT ZTMM_STOCK MESSAGE-ID zmsg
LINE-SIZE 270
LINE-COUNT 58
NO STANDARD PAGE HEADING.
tables: YGFMLINV, "Material Ledger - Inventory Data Extract
lfa1, "Vendor Master (General Section)
setheader, "Set Header and Directory(checking profit center grp)
mseg,
t001w,
mslbh,
mslb,
t001.
Internal Tables Declaration
data: begin of i_ygfmlinv occurs 0,
BDATJ like ygfmlinv-bdatj, "Posting date YYYY
POPER like ygfmlinv-poper, "Posting period
BUKRS like ygfmlinv-bukrs, "Company Code
PRCTR like ygfmlinv-prctr, "Profit center
WERKS like ygfmlinv-werks, "Plant
BKLAS like ygfmlinv-bklas, "Valuation class
MATNR like ygfmlinv-matnr, "Material number
BWTAR like ygfmlinv-bwtar, "Valuation type
STOCK_IND like ygfmlinv-stock_ind, "Stock indicators
MEINS like ygfmlinv-meins, "Base unit of measure
MLAST like ygfmlinv-mlast, "Material Price Dtermination: Control
LBKUM like ygfmlinv-lbkum, "Total valuated stock
vprsv like ygfmlinv-vprsv, "Price control indicator
lc_mvp_prc like ygfmlinv-lc_mvp_prc, "LC:Moving Avg/Periodic Prc
LC_CURTP like ygfmlinv-LC_CURTP, "Currency Type
LC_CURRENCY like ygfmlinv-lc_currency, "Currency Key
gc_curtp like ygfmlinv-gc_curtp, "Grp.Curr Type
gc_currency like ygfmlinv-gc_currency, " Grp.Curr
LC_TOT_AMT like ygfmlinv-lc_tot_amt, "LC: Total Amount
KONTS LIKE T030-KONTS, "G/L Account No
XBILK LIKE SKA1-XBILK,
lc_cogs like ygfmlinv-lc_var_amt,
lifnr like mslbh-lifnr,
lc_trfix_amt like ygfmlinv-lc_trfix_amt,
lc_lofix_amt like ygfmlinv-lc_lofix_amt,
lc_var_amt like ygfmlinv-lc_var_amt,
lc_utp_amt like ygfmlinv-lc_utp_amt,
end of i_ygfmlinv.
data: begin of i_mslbh occurs 0,
MATNR like mslbh-matnr, "Material number
SOBKZ like mslbh-sobkz, "Special stock indicator
LIFNR like mslbh-lifnr, "Account number of vendor or creditor
WERKS like mslbh-werks, "Plant
CHARG like mslbh-charg, "Batch number
LFGJA like mslbh-lfgja, "Fiscal year of current period
LFMON like mslbh-lfmon, "Current period (posting period)
LBLAB like mslbh-lblab, "Current period (posting period)
LBINS like mslbh-lbins, "Stock in quality inspection
end of i_mslbh.
data: begin of i_MSLB occurs 0,
MATNR like mslb-matnr,
WERKS like mslb-werks,
SOBKZ like mslb-sobkz,
LIFNR like mslb-lifnr,
LFGJA like mslb-lfgja,
LFMON like mslb-lfmon,
LBLAB like mslb-lblab,
LBINS like mslb-lbins,
LBEIN like mslb-lbein,
end of i_mslb.
*data: begin of i_t030 occurs 0,
KTOPL like t030-ktopl,
BKLAS like t030-bklas,
KONTS like t030-konts,
end of i_t030.
*data: begin of i_ska1 occurs 0,
SAKNR like ska1-saknr,
XBILK like ska1-xbilk,
end of i_ska1.
DATA : BEGIN OF i_non_subc OCCURS 0,
MATNR LIKE YGFMLINV-MATNR, "Material
WERKS LIKE YGFMLINV-WERKS, "Plant,
bukrs like ygfmlinv-bukrs, "Company Code
BKLAS LIKE YGFMLINV-BKLAS, "Val Class
PRCTR LIKE YGFMLINV-PRCTR, "Profit Center
BWTAR LIKE YGFMLINV-BWTAR, "Val Type
LBKUM LIKE YGFMLINV-LBKUM, "QTY
PEINH LIKE YGFMLINV-PEINH, "Price Unit
MEINS LIKE YGFMLINV-MEINS, "Unit of Measure
lc_currency like ygfmlinv-lc_currency,
lc_curtp like ygfmlinv-lc_curtp,
gc_currency like ygfmlinv-gc_currency,
gc_curtp like ygfmlinv-gc_currency,
LC_VAR_AMT LIKE YGFMLINV-LC_VAR_AMT, "LC :Variable Amt
LC_TRFIX_AMT LIKE YGFMLINV-LC_TRFIX_AMT, "LC :Trnsfer Fixed Amt
LC_LOFIX_AMT LIKE YGFMLINV-LC_LOFIX_AMT, "LC:Local Fixed Amt.
LC_COGS LIKE YGFMLINV-LC_VAR_AMT, "Total LC fixed COGS
"added as per CC01507
LC_UTP_AMT LIKE YGFMLINV-LC_UTP_AMT, "LC:UTP Amount.
LC_TR_VAL LIKE YGFMLINV-LC_LOFIX_AMT,"TotalLC Transfer value
XBILK LIKE SKA1-XBILK, "Balance Indicator
gc_var_amt like ygfmlinv-gc_var_amt,
gc_trfix_amt like ygfmlinv-gc_trfix_amt,
gc_lofix_amt like ygfmlinv-gc_lofix_amt,
gc_cogs like ygfmlinv-gc_var_amt,
gc_utp_amt like ygfmlinv-gc_utp_amt,
gc_tr_val like ygfmlinv-gc_lofix_amt,
END OF i_non_subc.
Final Output Table
types: begin of t_output,
matnr like ygfmlinv-matnr,
lifnr like mslbh-lifnr,
werks like ygfmlinv-werks,
spstk like mslbh-lblab,
totstk like ygfmlinv-lbkum,
lc_currency like ygfmlinv-LC_CURRENCY,
lc_curtp like ygfmlinv-lc_curtp,
gc_curtp like ygfmlinv-gc_curtp,
gc_currency like ygfmlinv-gc_currency,
name1 like lfa1-name1,
vprsv like ygfmlinv-vprsv,
bukrs like ygfmlinv-bukrs,
mlast like ygfmlinv-mlast,
meins like ygfmlinv-meins,
bklas like ygfmlinv-bklas,
maktx like makt-maktx,
stdprice(18),
totval like ygfmlinv-lc_tot_amt,
sobkz like mslbh-sobkz,
end of t_output.
Work Area for Final Output Table
data: wa_output type t_output.
ALV Display
Name of Custom Container added on the screen
data: G_CONTAINER TYPE SCRFNAME VALUE 'ZGRID_CTRL',
ALV GRID Instance Reference
G_GRID1 TYPE REF TO CL_GUI_ALV_GRID, "Grid
Instance Reference to Custom Container
G_CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER.
PBO Status
data: ok_code like sy-ucomm,
Field Catalog Table
gT_FIELDCAT TYPE LVC_T_FCAT,
Layout Structure
gs_layout type lvc_s_layo,
Sorting anf Subtotal
gt_sort TYPE lvc_s_sort occurs 0,
gt_output type standard table of t_output.
data: g_curr(2).
CLASS lcl_event_receiver DEFINITION
class lcl_event_receiver definition.
public section.
Add SUB TOTAL TEXT to the ALV DISPLAY
methods handle_subtotal_text
for event subtotal_text of cl_gui_alv_grid
importing es_subtottxt_info ep_subtot_line e_event_data.
endclass.
Declaration for EVENT Receiver
data: event_receiver type ref to lcl_event_receiver,
l_subtxt(60) value 'Subtotal Text'.
field-symbols: <fs> type t_output,
<fs1>.
CLASS LCL_EVENT_RECEIVER IMPLEMENTATION
CLASS LCL_EVENT_RECEIVER IMPLEMENTATION.
METHOD HANDLE_SUBTOTAL_TEXT.
FIELD for which the SUBTOTAL is Calculated
if es_subtottxt_info-criteria = 'MATNR'.
ASSIGN EP_SUBTOT_LINE->* TO <FS1>.
ASSIGN E_EVENT_DATA->M_DATA->* TO <FS>.
CONCATENATE es_subtottxt_info-keyword ':MATERIAL'
<fs>-matnr INTO <fs1>.
ENDIF.
ENDMETHOD. "HANDLE_SUBTOTAL_TEXT
ENDCLASS. "LCL_EVENT_RECEIVER IMPLEMENTATION
Constants
constants: c_eb(2) value 'EB',
c_m value 'M',
C_KTOPL(4) VALUE 'TCOA',
C_KTOSL(3) VALUE 'BSX',
C_KONTS(4) VALUE '002%'.
Selection Screen
selection-screen:begin of block b1 with frame title text-001.
select-options: s_lifnr for lfa1-lifnr , "Vendor
s_werks for YGFMLINV-werks obligatory, "Plant
s_prctr for YGFMLINV-prctr, "Pr.Ctr
s_matnr for ygfmlinv-matnr, "Mat.No
s_bwtar for mseg-bwtar no-display.
parameters: p_bukrs like YGFMLINV-bukrs obligatory, "C.Code
p_pctrgp like SETHEADER-SETNAME, "Pf.ct.Grp
p_poper like YGFMLINV-poper obligatory, " Period
p_bdatj like YGFMLINV-bdatj obligatory, " Year
r_ccode radiobutton group rad1 default 'X',
r_grpcur radiobutton group rad1.
selection-screen: end of block b1.
Ranges Declaration
RANGES : R_PROFIT_CTR FOR CEPC-PRCTR.
INITIALIZATON
*initialization.
Validations for Selection Screen
Validation for Vendor
at selection-screen on s_lifnr.
select single lifnr
from lfa1
into lfa1-lifnr
where lifnr in s_lifnr.
if sy-subrc ne 0.
message e039.
endif.
Validation for Plant
at selection-screen on s_werks.
select single werks
from t001w
into t001w-werks
where werks in s_werks.
if sy-subrc ne 0.
message e040.
endif.
Validation for Profit Center
at selection-screen on s_prctr.
select single prctr
from ygfmlinv
into ygfmlinv-prctr
where prctr in s_prctr.
if sy-subrc ne 0.
message e041.
endif.
Validation for Company Code
at selection-screen on p_bukrs.
select single bukrs
from t001
into t001-bukrs
where bukrs eq p_bukrs.
if sy-subrc ne 0.
message e042.
endif.
Validation for Profit Center Group
at selection-screen on p_pctrgp.
if not p_pctrgp is initial.
select single setname
from setheader
into setheader-setname
where setname eq p_pctrgp.
if sy-subrc ne 0.
message e043.
endif.
endif.
Validation for Fiscal Period
*at selection-screen on p_poper.
select single poper
from YGFMLINV
into YGFMLINV-poper
where poper eq p_poper.
if sy-subrc ne 0.
message e045.
endif.
Validation for Fiscal Year
*at selection-screen on p_bdatj.
select single bdatj
from YGFMLINV
into YGFMLINV-bdatj
where bdatj eq p_bdatj.
if sy-subrc ne 0.
message e046.
endif.
start-of-selection.
if p_pctrgp ne ' '.
perform f_profit_center_select.
endif.
perform f_data_selection. "using p_profit_center..
end-of-selection.
call screen 100.
*& Form f_data_selection
text
--> p1 text
<-- p2 text
FORM f_data_selection.
data: l_flg,
l_lblab like mslbh-lblab,
l_name1 like lfa1-name1,
l_rate like mslbh-lblab,
l_maktx like makt-maktx,
l_diff_stk like mslbh-lblab,
l_totval like ygfmlinv-lc_tot_amt.
From profit center group get Profit Center
LOOP AT R_PROFIT_CTR.
IF R_PROFIT_CTR-LOW EQ R_PROFIT_CTR-HIGH.
R_PROFIT_CTR-OPTION = 'EQ'.
R_PROFIT_CTR-HIGH = SPACE.
MODIFY R_PROFIT_CTR.
ENDIF.
ENDLOOP.
if r_ccode eq 'X'.
g_curr = '10'.
else.
g_curr = '30'.
endif.
if g_curr eq '10'.
Fetch TOTAL STOCK ,VALUE from ML - Inv. Data Extract Table
select BDATJ POPER BUKRS PRCTR WERKS BKLAS MATNR
BWTAR STOCK_IND MEINS MLAST LBKUM
vprsv lc_mvp_prc LC_CURTP
LC_CURRENCY LC_TOT_AMT
lc_var_amt LC_UTP_AMT
lc_trfix_amt lc_lofix_amt
gc_curtp gc_currency
from YGFMLINV
into corresponding fields of table i_YGFMLINV
where bdatj eq p_bdatj and
poper eq p_poper and
bukrs eq p_bukrs and
werks in s_werks and
matnr in s_matnr and
STOCK_IND eq c_m and
trans_type eq c_eb and
lc_curtp eq g_curr.
else.
Fetch TOTAL STOCK ,VALUE from ML - Inv. Data Extract Table
select BDATJ POPER BUKRS PRCTR WERKS BKLAS MATNR
BWTAR STOCK_IND MEINS MLAST LBKUM
vprsv lc_mvp_prc LC_CURTP
LC_CURRENCY LC_TOT_AMT
lc_var_amt LC_UTP_AMT
lc_trfix_amt lc_lofix_amt
gc_curtp gc_currency
from YGFMLINV
into corresponding fields of table i_YGFMLINV
where bdatj eq p_bdatj and
poper eq p_poper and
bukrs eq p_bukrs and
werks in s_werks and
matnr in s_matnr and
STOCK_IND eq c_m and
trans_type eq c_eb and
gc_curtp eq g_curr.
endif.
Delete Entries not in Profit Center range
LOOP AT I_YGFMLINV.
IF NOT I_YGFMLINV-PRCTR IN R_PROFIT_CTR.
DELETE I_YGFMLINV.
ENDIF.
ENDLOOP.
if not i_ygfmlinv[] is initial.
data l_date like mkpf-budat.
move : p_bdatj to l_date(4),
p_poper to l_date+4(2),
'31' to l_date+6(2).
Get the TOTAL STOCK for Vendor and Material
SELECT MATNR
WERKS
CHARG
SOBKZ
LIFNR
LFGJA
LFMON
LBLAB
LBINS
FROM MSLBH INTO corresponding fields of TABLE I_MSLBH
for all entries in i_ygfmlinv
WHERE MATNR eq i_ygfmlinv-matnr and
WERKS EQ i_ygfmlinv-WERKS AND
SOBKZ in p_stkind AND
LIFNR in s_LIFNR AND
LFGJA GE P_BDATJ and
lfmon eq p_poper.
if sy-subrc eq 0.
DELETE I_MSLBH WHERE LFGJA EQ P_BDATJ AND
LFMON LT P_POPER.
endif.
endif.
sort i_mslbh by matnr lifnr werks lfgja lfmon.
sort i_ygfmlinv by matnr werks bdatj poper.
loop at i_mslbh.
l_lblab = l_lblab + i_mslbh-lblab.
at end of lifnr.
l_flg = 'X'.
endat.
read table i_ygfmlinv with key matnr = i_mslbh-matnr
werks = i_mslbh-werks
bdatj = i_mslbh-lfgja
poper = i_mslbh-lfmon
binary search.
if sy-subrc eq 0.
select single name1 from lfa1 into l_name1
where lifnr eq i_mslbh-lifnr.
if sy-subrc eq 0.
select single maktx
from makt
into l_maktx
where matnr eq i_mslbh-matnr and
spras eq sy-langu.
if l_flg eq 'X'.
Subtract Total stk from Special Stock Vendor to get the difference
l_diff_stk = i_ygfmlinv-lbkum - l_lblab.
move : i_mslbh-matnr to wa_output-matnr,
i_mslbh-lifnr to wa_output-lifnr,
i_mslbh-werks to wa_output-werks,
l_lblab to wa_output-totstk,
l_name1 to wa_output-name1,
i_ygfmlinv-vprsv to wa_output-vprsv,
i_ygfmlinv-meins to wa_output-meins,
i_ygfmlinv-lc_mvp_prc to wa_output-stdprice,
i_ygfmlinv-mlast to wa_output-mlast,
i_ygfmlinv-bukrs to wa_output-bukrs,
i_ygfmlinv-bklas to wa_output-bklas,
i_mslbh-sobkz to wa_output-sobkz.
if g_curr eq '10'.
move: i_ygfmlinv-lc_curtp to wa_output-lc_curtp,
i_ygfmlinv-lc_currency to wa_output-lc_currency.
else.
move: i_ygfmlinv-gc_curtp to wa_output-gc_curtp,
i_ygfmlinv-gc_currency to wa_output-gc_currency.
endif.
if wa_output-totstk ne 0.
l_rate = i_ygfmlinv-LC_TOT_AMT / i_ygfmlinv-lbkum.
wa_output-totval = l_rate * l_lblab.
endif.
append wa_output to gt_output.
move wa_output-totval to l_totval.
clear: l_rate,wa_output.
if l_diff_stk ne 0.
wa_output-totval = i_ygfmlinv-LC_TOT_AMT - l_totval.
move: i_mslbh-matnr to wa_output-matnr,
*Included - Remove
i_mslbh-matnr to wa_output-matnr,
i_mslbh-werks to wa_output-werks,
l_diff_stk to wa_output-totstk,
i_ygfmlinv-vprsv to wa_output-vprsv,
i_ygfmlinv-meins to wa_output-meins,
i_ygfmlinv-lc_mvp_prc to wa_output-stdprice,
i_ygfmlinv-mlast to wa_output-mlast,
i_ygfmlinv-bukrs to wa_output-bukrs,
i_ygfmlinv-bklas to wa_output-bklas.
if g_curr eq '10'.
move: i_ygfmlinv-lc_curtp to wa_output-lc_curtp,
i_ygfmlinv-lc_currency to wa_output-lc_currency.
else.
move: i_ygfmlinv-gc_curtp to wa_output-gc_curtp,
i_ygfmlinv-gc_currency to wa_output-gc_currency.
endif.
append wa_output to gt_output.
clear: i_ygfmlinv,l_flg,l_lblab,l_name1,wa_output,
i_mslbh.
endif.
endif.
endif.
endif.
endloop.
sort: i_ygfmlinv by matnr werks,
i_mslbh by matnr werks.
LOOP AT I_YGFMLINV.
read table i_mslbh with key matnr = i_ygfmlinv-matnr
binary search.
if sy-subrc eq 0.
delete i_ygfmlinv.
clear i_ygfmlinv.
else.
MOVE-CORRESPONDING I_YGFMLINV TO i_non_subc.
APPEND i_non_subc.
CLEAR I_YGFMLINV.
endif.
ENDLOOP.
sort i_non_subc by matnr werks.
data: l_lc_cogs(16) type p decimals 2,
l_lc_tr_val(16) type p decimals 2,
l_gc_cogs(16) type p decimals 2,
l_gc_tr_val(16) type p decimals 2.
LOOP AT i_non_subc.
if g_curr eq '10'.
l_LC_COGS = i_non_subc-LC_TRFIX_AMT +
i_non_subc-LC_LOFIX_AMT.
l_LC_TR_VAL = i_non_subc-LC_VAR_AMT + l_LC_COGS +
i_non_subc-LC_UTP_AMT.
else.
l_gc_cogs = i_non_subc-gc_trfix_amt + i_non_subc-gc_lofix_amt.
l_gc_tr_val = i_non_subc-gc_var_amt + i_non_subc-gc_cogs +
i_non_subc-gc_utp_amt.
endif.
at end of matnr.
l_flg = 'X'.
endat.
if l_flg eq 'X'.
move: i_non_subc-matnr to wa_output-matnr,
i_non_subc-werks to wa_output-werks,
i_non_subc-lbkum to wa_output-totstk,
i_non_subc-meins to wa_output-meins,
i_non_subc-bukrs to wa_output-bukrs,
i_non_subc-bklas to wa_output-bklas,
i_non_subc-lc_curtp to wa_output-lc_curtp,
i_non_subc-lc_currency to wa_output-lc_currency,
i_non_subc-gc_curtp to wa_output-gc_curtp,
i_non_subc-gc_currency to wa_output-gc_currency.
if g_curr eq '10'.
move l_lc_tr_val to wa_output-totval.
else.
move l_gc_tr_val to wa_output-totval.
endif.
i_non_subc-mlast to wa_output-mlast.
select single maktx
from makt
into l_maktx
where matnr eq i_non_subc-matnr and
spras eq sy-langu.
if sy-subrc eq 0.
move l_maktx to wa_output-maktx.
append wa_output to gt_output .
clear: wa_output,l_flg,l_lc_tr_val,l_lc_cogs,
l_gc_cogs,l_gc_tr_val.
endif.
endif.
ENDLOOP.
ENDFORM. " f_data_selection
*& Module STATUS_0100 OUTPUT
text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'ZPF_STATUS'.
SET TITLEBAR 'ZTITLE'.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module alv_display OUTPUT
text
MODULE alv_display OUTPUT.
data: total type ref to data,
subtotal1 type ref to data.
field-symbols <total> like gt_output .
field-symbols <subtotal1> like gt_output.
if g_grid1 is initial.
perform f_create_objects.
perform f_build_field_catalog changing gt_fieldcat.
perform f_prepare_layout changing gs_layout.
perform f_sort_sub_total changing gt_sort.
CALL METHOD G_GRID1->GET_SORT_CRITERIA
IMPORTING
ET_SORT = gt_sort[] .
CALL METHOD g_grid1->GET_SUBTOTALS
IMPORTING
EP_COLLECT00 = total
EP_COLLECT01 = subtotal1 .
EP_COLLECT02 =
EP_COLLECT03 =
EP_COLLECT04 =
EP_COLLECT05 =
EP_COLLECT06 =
EP_COLLECT07 =
EP_COLLECT08 =
EP_COLLECT09 =
ET_GROUPLEVELS = .
assign total->* to <total>.
assign subtotal1->* to <subtotal1>.
*ALV Display - Specify Sorting,Filtering Criteria
if gt_output[] is initial.
message i015.
endif.
CALL METHOD G_GRID1->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE =
I_CONSISTENCY_CHECK =
I_STRUCTURE_NAME =
IS_VARIANT =
I_SAVE =
I_DEFAULT = 'X'
IS_LAYOUT = gs_layout
IS_PRINT =
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING =
IT_HYPERLINK =
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
CHANGING
IT_OUTTAB = gt_output[]
IT_FIELDCATALOG = gt_fieldcat
IT_SORT = gt_sort[]
IT_FILTER =
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.
CALL METHOD G_GRID1->REFRESH_TABLE_DISPLAY
EXPORTING
IS_STABLE =
I_SOFT_REFRESH =
EXCEPTIONS
FINISHED = 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.
endif.
ENDMODULE. " alv_display OUTPUT
*& Module USER_COMMAND_0100 INPUT
text
MODULE USER_COMMAND_0100 INPUT.
case ok_code.
when 'BACK'.
set screen '0'.
leave screen.
when 'EXIT' or 'CANCEL'.
PERFORM EXIT_PROGRAM.
endcase.
clear ok_code.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form f_create_objects
text
--> p1 text
<-- p2 text
FORM f_create_objects.
Creating Custom Container Objects and GRID
IF G_grid1 IS INITIAL.
*Creating Custom Container Instance
Pass the name of the control that you have created on the screen
CREATE OBJECT G_CUSTOM_CONTAINER
EXPORTING CONTAINER_NAME = 'ZGRID_CTRL'.
*Creating ALV Grid Instance
CREATE OBJECT G_GRID1 EXPORTING I_PARENT = G_CUSTOM_CONTAINER.
endif.
ENDFORM. " f_create_objects
*& Form f_build_field_catalog
text
--> p1 text
<-- p2 text
FORM f_build_field_catalog changing pt_fieldcat type lvc_t_fcat.
data ls_fcat type lvc_s_fcat.
Val Type
ls_fcat-fieldname = 'BUKRS'.
ls_fcat-inttype = 'C'.
ls_fcat-outputlen = '4'.
ls_fcat-coltext = 'Val.Type'.
ls_fcat-seltext = 'Val.Type'.
ls_fcat-col_pos = '1'.
append ls_fcat to pt_fieldcat.
clear ls_fcat.
Val.Class
ls_fcat-fieldname = 'BKLAS'.
ls_fcat-TABNAME = 'YGFMLINV'.
ls_fcat-outputlen = '4'.
ls_fcat-coltext = 'Val.Class'.
ls_fcat-seltext = 'Val.Class'.
ls_fcat-col_pos = '2'.
append ls_fcat to pt_fieldcat.
clear ls_fcat.
*Plant
ls_fcat-fieldname = 'WERKS'.
ls_fcat-TABNAME = 'YGFMLINV'.
ls_fcat-outputlen = '4'.
ls_fcat-coltext = 'Plant'.
ls_fcat-seltext = 'Plant'.
ls_fcat-col_pos = '3'.
append ls_fcat to pt_fieldcat.
clear ls_fcat.
*Material
ls_fcat-fieldname = 'MATNR'.
ls_fcat-TABNAME = 'YGFMLINV'.
ls_fcat-outputlen = '18'.
ls_fcat-coltext = 'Material'.
ls_fcat-seltext = 'Material'.
ls_fcat-col_pos = '4'.
append ls_fcat to pt_fieldcat.
clear ls_fcat.
*Description
ls_fcat-fieldname = 'MAKTX'.
ls_fcat-TABNAME = 'MAKT'.
ls_fcat-outputlen = '40'.
ls_fcat-coltext = 'Description'.
ls_fcat-seltext = 'Description'.
ls_fcat-col_pos = '5'.
append ls_fcat to pt_fieldcat.
clear ls_fcat.
*Price Control
ls_fcat-fieldname = 'VPRSV'.
ls_fcat-TABNAME = 'YGFMLINV'.
ls_fcat-outputlen = '1'.
ls_fcat-coltext = 'Price Control'.
ls_fcat-seltext = 'Price Control'.
ls_fcat-col_pos = '6'.
append ls_fcat to pt_fieldcat.
clear ls_fcat.
*Price Determination
ls_fcat-fieldname = 'MLAST'.
ls_fcat-TABNAME = 'YGFMLINV'.
ls_fcat-outputlen = '1'.
ls_fcat-coltext = 'Price Determination'.
ls_fcat-seltext = 'Price Determination'.
ls_fcat-col_pos = '7'.
append ls_fcat to pt_fieldcat.
clear ls_fcat.
Total Stock
ls_fcat-fieldname = 'TOTSTK'.
ls_fcat-REF_TABLE = 'YGFMLINV'.
ls_fcat-REF_FIELD = 'LBKUM'.
ls_fcat-QFIELDNAME = 'MEINS'.
ls_fcat-IFIELDNAME = 'YGFMLINV'.
ls_fcat-coltext = 'Total Stock'.
ls_fcat-seltext = 'Total Stock'.
ls_fcat-col_pos = '8'.
ls_fcat-do_sum = 'X'.
append ls_fcat to pt_fieldcat.
clear ls_fcat.
Std. Price
ls_fcat-fieldname = 'STDPRICE'.
ls_fcat-TABNAME = 'YGFMLINV'.
ls_fcat-REF_TABLE = 'YGFMLINV'.
ls_fcat-ref_field = 'LC_MVP_PRC'.
ls_fcat-coltext = 'Std.Price'.
ls_fcat-col_pos = '9'.
append ls_fcat to pt_fieldcat.
clear ls_fcat.
if g_curr eq '10'.
Currency Type
ls_fcat-fieldname = 'LC_CURTP'.
ls_fcat-TABNAME = 'YGFMLINV'.
ls_fcat-coltext = 'Currency Type'.
ls_fcat-seltext = 'Currency Type'.
ls_fcat-col_pos = '10'.
append ls_fcat to pt_fieldcat.
clear ls_fcat.
else.
Currency Type
ls_fcat-fieldname = 'GC_CURTP'.
ls_fcat-TABNAME = 'YGFMLINV'.
ls_fcat-coltext = 'Currency Type'.
ls_fcat-seltext = 'Currency Type'.
ls_fcat-col_pos = '10'.
append ls_fcat to pt_fieldcat.
clear ls_fcat.
endif.
*Per Unit Price
ls_fcat-fieldname = 'STDPRICE'.
ls_fcat-TABNAME = 'YGFMLINV'.
ls_fcat-ref_table = 'YGFMLINV'.
ls_fcat-ref_field = 'LC_MVP_PRC'.
ls_fcat-currency = 'LC_CURRENCY'.
ls_fcat-coltext = 'Per.Unit.Price'.
ls_fcat-seltext = 'Per.Unit.Price'.
ls_fcat-col_pos = '11'.
append ls_fcat to pt_fieldcat.
clear ls_fcat.
Quantity Measurement
ls_fcat-fieldname = 'MEINS'.
ls_fcat-TABNAME = 'YGFMLINV'.
ls_fcat-coltext = 'Base Unit'.
ls_fcat-seltext = 'Base Unit'.
ls_fcat-col_pos = '12'.
append ls_fcat to pt_fieldcat.
clear ls_fcat.
*Total Value
ls_fcat-fieldname = 'TOTVAL'.
ls_fcat-TABNAME = 'YGFMLINV'.
ls_fcat-currency = 'GC_CURRENCY'.
ls_fcat-coltext = 'Total Value'.
ls_fcat-seltext = 'Total Value'.
ls_fcat-col_pos = '13'.
ls_fcat-do_sum = 'X'.
append ls_fcat to pt_fieldcat.
clear ls_fcat.
*Value/period
ls_fcat-fieldname = 'TOTVAL'.
ls_fcat-TABNAME = 'YGFMLINV'.
ls_fcat-currency = 'GC_CURRENCY'.
ls_fcat-coltext = 'Value/Period'.
ls_fcat-seltext = 'Value/Period'.
ls_fcat-col_pos = '14'.
append ls_fcat to pt_fieldcat.
clear ls_fcat.
*Vendor
ls_fcat-fieldname = 'LIFNR'.
ls_fcat-TABNAME = 'LFA1'.
ls_fcat-coltext = 'Vendor'.
ls_fcat-seltext = 'Vendor'.
ls_fcat-col_pos = '15'.
append ls_fcat to pt_fieldcat.
clear ls_fcat.
*Vendor Description
ls_fcat-fieldname = 'NAME1'.
ls_fcat-TABNAME = 'LFA1'.
ls_fcat-coltext = 'Vend.Desc'.
ls_fcat-seltext = 'Vend.Desc'.
ls_fcat-col_pos = '16'.
append ls_fcat to pt_fieldcat.
clear ls_fcat.
*Special Stock Indicator
ls_fcat-fieldname = 'SOBKZ'.
ls_fcat-TABNAME = 'MSLBH'.
ls_fcat-coltext = 'Spl.Stock Ind'.
ls_fcat-seltext = 'Spl.Stock Ind'.
ls_fcat-col_pos = '17'.
append ls_fcat to pt_fieldcat.
clear ls_fcat.
ENDFORM. " f_build_field_catalog
*& Form f_prepare_layout
text
<--P_GS_LAYOUT text
FORM f_prepare_layout CHANGING P_GS_LAYOUT type lvc_s_layo.
p_gs_layout-zebra = 'X'.
p_gs_layout-grid_title = 'Material List: Prices and Inventory Values'.
p_gs_layout-smalltitle ='X'.
p_gs_layout-no_totline = 'X'.
p_gs_layout-no_totarr = 'X'.
p_gs_layout-no_totexp = 'X'.
p_gs_layout-totals_bef = 'X'.
ENDFORM. " f_prepare_layout
*& Form f_profit_center_select
Validate the Profit Center Groups with Profit Center
--> p1 text
<-- p2 text
FORM f_profit_center_select.
DATA:V_RETCODE LIKE BAPIRET2,
V_GROUPNAME LIKE BAPICO_GROUP-GROUPNAME ,
p_kokrs like CEPC-KOKRS value 'DU01',
I_HIERARCHYNODES LIKE BAPISET_HIER OCCURS 0 WITH HEADER LINE,
I_PRCTR LIKE BAPI1116_VALUES OCCURS 0 WITH HEADER LINE.
V_GROUPNAME = P_PCTRGP.
CALL FUNCTION 'BAPI_PROFITCENTERGRP_GETDETAIL'
EXPORTING
CONTROLLINGAREA = P_KOKRS
GROUPNAME = V_GROUPNAME
IMPORTING
RETURN = V_RETCODE
TABLES
HIERARCHYNODES = I_HIERARCHYNODES
HIERARCHYVALUES = I_PRCTR.
LOOP AT I_PRCTR.
R_PROFIT_CTR-LOW = I_PRCTR-VALFROM.
R_PROFIT_CTR-HIGH = I_PRCTR-VALTO.
R_PROFIT_CTR-SIGN = 'I'.
R_PROFIT_CTR-OPTION = 'BT'.
APPEND R_PROFIT_CTR.
ENDLOOP.
ENDFORM. " f_profit_center_select
*& Form f_sort_sub_total
text
<--P_GT_SORT text
FORM f_sort_sub_total CHANGING P_GT_SORT.
DATA: ls_sort TYPE lvc_s_sort occurs 0 with header line.
ls_sort-spos = '1' .
ls_sort-fieldname = 'MATNR'.
ls_sort-up = 'X'.
ls_sort-subtot = 'X'.
ls_sort-expa ='X'.
ls_sort-group = 'UL'.
append ls_sort TO gt_sort.
ENDFORM. " f_sort_sub_total
*& Form EXIT_PROGRAM
text
--> p1 text
<-- p2 text
FORM EXIT_PROGRAM.
data: g_repid like sy-repid.
g_repid = sy-repid.
CALL METHOD G_CUSTOM_CONTAINER->FREE.
CALL METHOD CL_GUI_CFW=>FLUSH.
IF SY-SUBRC NE 0.
add your handling, for example
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
TITEL = G_REPID
TXT2 = SY-SUBRC
TXT1 = 'Error in Flush'(009).
ENDIF.
LEAVE PROGRAM.
ENDFORM. " EXIT_PROGRAM -
Provide me Helpful Links/Documents on ALV using Classes
Dear all,
Could you guys provide me with some Helpful Links/Documents on ALV using Classes.
Thanks in Advance,
Joseph ReddyHi,
Check these out:
Check this for basic concepts of OOPS
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap code samples/abap objects/abap code sample to learn basic concept of object-oriented programming.doc
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap code samples/alv grid/abap code sample to display data in alv grid using object oriented programming.doc
Tabstrip
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap code samples/alv grid/abap code sample for tab strip in alv.pdf
Editable ALV
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap code samples/alv grid/abap code sample to edit alv grid.doc
Tree
http://www.sapdevelopment.co.uk/reporting/alv/alvtree/alvtree_usrint.htm
General Tutorial for OOPS
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/an easy reference for alv grid control.pdf
http://www.geocities.com/mpioud/Abap_programs.html
Best Regards,
Anjali -
Compatibility issue with developer 6i using (64 bit) OS
Hi All,
I am using oracle 9iR2 (32 bit) on Linux Red Hat (32 bit) with developer 6i. Now i want to upgrade OS Red Hat (64 bit) and migrate database 10gR2 (64 bit).Is there any compatibility issue with developer 6i using 64 bit Red Hat OS / Oracle Database ?
ThanksIs there any compatibility issue with developer 6i using 64 bit Red Hat OS / Oracle Database ?
No, as long as developer 6i is at least patch 16. We use it. -
WebI issue with hierarchy display and aggregation
Trying to wrangle what looks like a defect in WebI's handling of hierarchy display and aggregation. We just completed an update cycle and are running BOBJ 4.1 SP4.
The hierarchy is a standard FM Commitment Item hierarchy in which both the nodes and leaves are Commitment Items (i.e. it uses InfoObject nodes, not text nodes). An example of one of these nodes looks like this in BW:
Cmmt_Item A - Node
Cmmt_Item B - Leaf
Cmmt_Item C - Leaf
Let's pretend Commitment Item A has $50 posted to it, B has $20 and C has $30. Analysis for OLAP handles this by adding a virtual leaf line to distinguish postings that are on the parent node like so:
Cmmt_Item A - Node $100
Cmmt_Item A - Leaf $50
Cmmt_Item B - Leaf $20
Cmmt_Item C - Leaf $30
So you see both the total for the node ($100) and a line for each Commitment Items with KFs posted to them. Our users like this. They can easily see the aggregation and the breakdown.
WebI, on the other hand, will display it like this:
Cmmt_Item A - Node $150
Cmmt_Item B - Leaf $20
Cmmt_Item C - Leaf $30
It doesn't create a separate line for the value of the parent node, but it does add it's value into the aggregate. Twice. Modifying the table with the 'avoid duplicate row aggregation' checkbox yields output like this:
Cmmt_Item A - Node $100
Cmmt_Item A - Node $50
Cmmt_Item B - Leaf $20
Cmmt_Item C - Leaf $30
We're about halfway there. While the top row now shows the correct aggregation and it creates a new line to show the distinct amount on the parent node, that new line appears on the same level as the parent. It's no longer clear that there's an aggregate and a breakdown. And attempting to expand or contract a node will now crash the report with one of those 'Error 16' messages.
Has anyone encountered this issue with hierarchies in WebI? This report was built from scratch in 4.1, so I'm not sure if this affects older versions or not. Or if it would affect any hierarchy that uses InfoObject nodes instead of text nodes.Without a fix, the simplest workaround I can think of would be to restructure the hierarchy. It can't use postable nodes, so Cmmt_Item A - Node from my example would need to be converted into a text node and the postable characteristic added as a child on the same level as the B and C leaves.
This looks like it would affect anyone using hierarchies with postable nodes in a WebI report.
Another oddity in WebI's behavior here - even though the postable nodes show incorrect sums the sum at the root node is correct. So extending my examples from the original post:
Root Node $100
Cmmt_Item A - Node $150
Cmmt_Item B - Leaf $20
Cmmt_Item C - Leaf $30 -
Issue while sending mails using classes
Hi Experts ,
i have one issue when i try to send mails using classes cl_document_bcs,cl_cam_address_bcs,cl_bcs etc
ISSUE :
i put some data in selection screen and i get some output ( say i got 5 records), i select 3 records and press some button to trigger mail and mail is send, and now again the OUTPUT screen is shown with sended records but we can not send these records again ............ now i selcect remaining two records and press button to trigger mail and THIS TIME MAIL IS NOT SEND.
amd my code is :
CREATE OBJECT l_document.
CREATE OBJECT l_recipient.
TRY.
cl_bcs_convert=>string_to_solix(
EXPORTING
iv_string = fp_wa_output
iv_codepage = fp_v_code_page
iv_add_bom = 'X'
IMPORTING
et_solix = l_wa_output_binary
ev_size = l_v_size ).
l_send_request = cl_bcs=>create_persistent( ).
*-->Creating Document
l_document = cl_document_bcs=>create_document(
i_type = 'RAW'
i_text = fp_it_content[]
i_subject = fp_text_48 ) .
*-->Adding Attachment*
CALL METHOD l_document->add_attachment
EXPORTING
i_attachment_type = fp_text_049
i_attachment_size = l_v_size
i_attachment_subject = fp_v_file
i_att_content_hex = l_wa_output_binary.
*-->Add document to send request*
CALL METHOD l_send_request->set_document( l_document ).
* do send delivery info for successful mails
CALL METHOD l_send_request->set_status_attributes
EXPORTING
i_requested_status = 'E'
i_status_mail = 'A'.
*-->Get Sender Object
l_uname = sy-uname.
l_sender = cl_sapuser_bcs=>create( l_uname ).
CALL METHOD l_send_request->set_sender
EXPORTING
i_sender = l_sender.
LOOP AT fp_s_mail INTO l_wa_mail.
l_v_objid = l_wa_mail-low.
l_v_mail = l_v_smtpadr.
TRANSLATE l_v_mail TO LOWER CASE.
l_recipient = cl_cam_address_bcs=>create_internet_address( l_v_mail ).
CALL METHOD l_send_request->add_recipient
EXPORTING
i_recipient = l_recipient
i_express = 'X' .
* i_copy = ' '
* i_blind_copy = ' '
* i_no_forward = ' '.
ENDLOOP.
**-->Trigger E-Mail immediately*
* IF fp_send_all EQ 'X'.
* l_send_request->set_send_immediately( 'X' ).
* ENDIF.
CALL METHOD l_send_request->send(
EXPORTING
i_with_error_screen = 'X'
RECEIVING result = l_v_sent_to_all ).
BREAK TARK.
IF l_v_sent_to_all = 'X'.
MESSAGE i000 .
ENDIF.
COMMIT WORK.
CATCH cx_document_bcs INTO l_bcs_exception.
CATCH cx_send_req_bcs INTO l_send_exception.
CATCH cx_address_bcs INTO l_addr_exception.
CATCH cx_bcs INTO l_exp.
ENDTRY.
thanks in advance
rahulEvery time when i choose other network or dongle to send those mails it gets sent.
As per the description, seems it's an issue related to this specific network. Probably, they've adjusted their security policy, like blocked some port numbers, etc.
You might need to contact the support of your ISP to confirm what SMTP settings you need. Check port number, and security settings.
By the way, this is the forum to discuss questions and feedback for Windows-based Microsoft Office client. Since your query is directly related to
Office for mac, I would suggest you to post in the forum of
Office for Mac, where you can get more experienced responses:
http://answers.microsoft.com/en-us/mac/forum/macoffice2011?tab=Threads
The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
Regards,
Ethan Hua
TechNet Community Support
It's recommended to download and install
Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
programs. -
Issue with Instantiation of a Class in Workflow
I created a subclass of CL_HRASR00_WF_PROCESS_OBJECT to include some of my custom methods to be used in the workflow. Since the subclass methods cant be referred using the super class name(as we do in BO) in the standard task , i used a custom method to create the instance of the subclass using the following code and then using the subclass instance i tried to call my subclass method, but the issue what i am facing is the subclass instance is not getting created using the following code(may be i am missing something) instead the superclass instance is returned by the method containing the below code an in the next step(in workflow) when it tries to call the subclass method I am getting an error that : "Method not found":'CL.CL_HRASR00_WF_PROCESS_OBJECT.GET_INIT_EMAIL'. Please advice what is that I am missing.
TRY.
CREATE OBJECT processinst
EXPORTING
guid = guid.
CATCH cx_bo_error .
ENDTRY.
where processinst is of type ZCL_HRASR00_WF_PROCESS_OBJECT.Well, what about if you just forget the whole sub-classing? Just build your own class that is not a subclass of anything). It does need only the minimum: the constuctor and the LPOR-methods and of course your own custom logic/methods. This way you can still use the functionalitites of the super-class but can also use your own custom logic offered by your own class. You don't even need to implement the LPOR-methods, if you use only static methods (for example some kind of "get email address" method could be static).
Of course this will not work, if you have a specific reason for using subclass, but I doubt you have. Trying to emulate the BO super/subclass delegation functionality is not good enough reason. It is totally ok to build your own class that has nothing to do with the actual standard class. It all depends on the requirements and what makes the most sense.
Regards,
Karri -
Issue with Hierarchy selection in Filter area
Hi experts,
We have an issue with BEx query selection.
Structure of Quey
1. Filter Area
=> Characteristic Relations : Restriction condition with hierarchy
2. Rows
=> Display characteristic with hierarchy active
3.Columns
=> Formula with keyfigure using sign reverse of hierarchy (formula variance).
<symptom >
When I use context menu, "Keep filter value", with the displayed hierarchy node,
and drilldown with other characteristics, the result became wrong. Filter value I kept became inactive.
Workaround I found was like belows.
1. Remove sign reverse calculation in Formula.
2. Keep sign reverse calculation and move restriction condition with hierarchy in filter area TO default values.
I wonder this symptom was right technically or bug ocurred after version upgrade or something.
Thanks in advance.
BEx BI Addon 7.X(based on 710)/SP11 Revision 634Hi
This depends on the logical database that the report is based on. Secondly I have experienced that the report variant overwrites the date selections and therefore it looks like that the dates are not parsed (which I think is your problem).
For e.g. logical PHP and PHPCE both the period and data dates are filled with the data selection from the portal. (check on the report attributes in SE38 which logical DB used) For e.g. PTRVP (travel) no date are passed at all in the call of the report!!
To make sure that the report variant isnu2019t overwriting I normally set the variant for the report to u201CSave field without valuesu201D for the date selection periods and then it isnu2019t filled by the variant.
Data selection period
Data selection period: Start
Data selection period: End
Employee selection period
Employee selection period: Start
Employee selection period: End
Regards,
Lars -
URGENT: Issue with hierarchy level keys and report drill down
Hi,
BASIC STRUCTURE:
I have created a subject area with 3 facts (FACT_A, FACT_B, FACT_C) and 4 dimesnions (TIME_DIM,DIM_2,DIM_3,DIM_4). Each fact table also has additional aggregate tables aggregated along levels of the time dimension. Also our timw dimension has aggregated dimension tables like TIME_DIM_WEEK, TIME_DIM_MONTH, TIME_DIM_QUARTER and TIME_DIm_YEAR.
GOAL:
All 3 facts have the same measures M_1 and M_2 in them but may not have data for the same dimension values selected.
For example
For month JAN 2000 FACT_A.M1=100$ and no data exists for JAN 2000 in FACT_B and FACT_C. Then in the report
for JAN2000 it should show FACT_A.M1= $100, FACT_B.M1 = 0 and FACT_C.M1 =0. In this case I should be able to drill down to the lowest level.
ISSUE:
The time dimension TIME_DIM has the following levels - Total -> Year -> Quarter -> Month -> Week -> Day
However I am having an issue with drill down in the reports whenever I pull metrics from more than 1 fact at a time. I have defined the level keys but not sure if I need to do anything in addition since I am using aggregates.
I have to fix this issue quickly. Please help me.Alastair,
All the fact tables have aggregated facts as sources.
I have checked the levels set for each of the sources to the time dimesnion table in BMM and they look okay. So the Time dim table in BMM has 4 source tables
Time_Day (level set to day, table key is "day"),
Time_month (level set to month, table key is "Fiscal_Month_Code"),
Time_Quarter(level set to quarter, table key is "Fiscal_Quarter_Code") and
Time_Year(level set to year, table key is :Fiscal_Year_Code").
Note: No time week aggregate added as logical source.
Again the time dim hierarchy based off of this table has levels: Total -> Year ->quarter -> Month -> week -> day
The levels keys set for each level are
Year -> Primary key is Year_Name (YYYY)(Checked as chronological key) and another key is Year_Num (YYYY)(Checked as chronological key)
Quarter->Primary Key is Quarter_Name (YYYY Qn), another key is Quarter_Number (Format n where n can assum values 1,2,3,4). Both keys are set as chronological keys
Month -> Primary key is Month_Name (MON YYYY), another key is Month_Num (Format n where n can assume values from 1 to 12) Both keys are set as chronological keys
Week -> Primary Key is week name (YYYY Wk nn, where nn can have values from 1 to 53), another key is week num (nn, where nn can have values from 1 to 53)
Day -> primary key set to day (date format)
Issue1: When I try to drill to lower levels it throws out an error saying report cannot find any data because filters may be too restrictive even though I see data at higher level
For ex: If I drill down to Year: 2010 and Qtr: 2010 Q2 and M1:$100 when I click on Qtr to drll to month level it throws me the error
Issue2: when I add year and qtr colums to the report I see data as below which is incorrect
Year_Name Qtr_Name data:FACTA_M1 Data: FactB_M1
2009 2009 Q1 $10 $5
2009 2009 Q2 $20 $80
2009 2009 Q3 $20
2009 2009 Q4 $30
2010 2010 Q1 $100
2010 Q2 $101
2010 Q3 $102 $230
2010 Q4 $103
2011 Q1 $10
In the above example year_name is not showing up for 2010 Q2 and after. However if I change the primary key for level 'Quarter' by having key consist of year name and quarter name instead of just quarter name the issue doesnt occur and drill down works great. The only issue is when I drill from qtr it first shows year name and quarter name instead of showing the next level which would be month name.
Sorry about the long message but I thought you might notice something in how I have set up the keys.
Thanks -
Hi Friends,
I have created a Hierarchial ALV report using OOP concept (Class Builder). The output is OK but it is displaying the unwanted columns in the header part.
The code written is as follows.
=====================================================
data: gt_zsd_abcd type zsd_abcd occurs 0, "Output-Table
data l_hierarchy_header type treev_hhdr.
perform build_hierarchy_header changing l_hierarchy_header.
call method g_alv_tree->set_table_for_first_display
exporting
i_structure_name = 'zsd_abcd'
is_hierarchy_header = l_hierarchy_header
changing
it_outtab = gt_zsd_abcd. "table must be empty !
perform create_hierarchy.
call method g_alv_tree->frontend_update.
=====================================================
I would like know as to how to display only the required columns in the header part.
Pls guide me.
TIA.
Regards,
Mark KHi Mark,
i got it, in your case you will get all the fields present in the structure you mentioned in the method.
so if you want only Purchase Order then you need to Build the fieldcat only for that field and then pass that fieldcat to the method. and don't pass the structure in this case.
call method alv_tree_control->set_table_for_first_display
exporting
is_variant = l_variant
i_save = 'A'
i_default = 'X'
is_hierarchy_header = l_hierarchy_header
it_special_groups = l_special_groups
it_toolbar_excluding = l_toolbar_excluding
changing
<b>it_fieldcatalog = l_field_catalog</b>
it_outtab = l_output_tbl.
Regards
vijay -
Capturing data changes in alv using classes
Hello All,
Currently am working on alv report using classes..,In this report am displaying 3 grids in the output in 3 different containers(cl_gui_custom_container)...,Am able to handle the data changes done in the grid at the run time using event data_changed ...,
Now the requirement + problem is ...if i do the changes in all the grids ,,,,,and if i click(hotspot event) on any of the rows/records in any of the grids ...,, I need to be able to capture all the data changes done in all the other grids....,,
for example:-
if i modify some records in all the 3 grids ,,, and if I click any of the row in any of the grid at a time,,, all the changes done in all the grids should be captured.....( in simple words one click all changes )
I tried using data_changed event....., am only able to capture the changes of the grid on which i clicked ( ie.hotspot event) but not the changes which i have done on other grids.....Pls. help me out with the possibilities
Hope am clear..
Thanks
JohnHi friend,
METHOD handle_user_command.
CASE e_ucomm.
WHEN 'UPDATE'.
CALL METHOD r_grid->get_selected_rows
IMPORTING
ET_INDEX_ROWS =
et_row_no = it_rows.
LOOP AT it_rows INTO wa_rows.
*****modify the first container data***********
endloop.
CALL METHOD r_grid1->get_selected_rows
IMPORTING
ET_INDEX_ROWS =
et_row_no = it_rows1.
LOOP AT it_rows1 INTO wa_rows1.
*****modify the second container data***********
endloop.
CALL METHOD r_grid1->get_selected_rows
IMPORTING
ET_INDEX_ROWS =
et_row_no = it_rows2.
LOOP AT it_rows2 INTO wa_rows2.
*****modify the third container data***********
endloop.
endcase.
Now we can create three container and three different grid class object but we are using same method.
UPDATE buttton is common to all three containers.
But one important point when u change the records in container we must select the rows then only selected rows r come to the internal table otherwise it is not come.
CREATE OBJECT r_container
EXPORTING
container_name = 'CONTAINER_1'
CREATE OBJECT r_container2
EXPORTING
container_name = 'CONTAINER_2'
CREATE OBJECT r_container3
EXPORTING
container_name = 'CONTAINER_3'
CREATE OBJECT r_grid
EXPORTING
i_parent = r_container
CREATE OBJECT r_grid1
EXPORTING
i_parent = r_container2
CREATE OBJECT r_grid2
EXPORTING
i_parent = r_container3
NOW WE CAN CALL THE METHOD.
CREATE OBJECT event_receiver1.
SET HANDLER event_receiver1->handle_before_user_command FOR r_grid.
CREATE OBJECT event_receiver1.
SET HANDLER event_receiver1->handle_before_user_command FOR r_grid2.
CREATE OBJECT event_receiver1.
SET HANDLER event_receiver1->handle_before_user_command FOR r_grid3
I thing it should be possible.But u must remeber u must select the records when u modifie in three containersBUT UPDATE button is common to all three containers.
Regards,
MURALII -
Top of Page Sequential/Hierarchical ALV using Class
Hi Experts.
I'd like to ask some codes on how to have the top-of-page function of the Sequential ALV using the CLASS cl_salv_hierseq_table.
Points would be rewarded.
Thanks!
Message was edited by:
Jay Cruz
Message was edited by:
Jay CruzHi Jay,
Plz check out this code.
REPORT BALVHT01 NO STANDARD PAGE HEADING.
ALV
TYPE-POOLS: SLIS.
DB-Table
TABLES: SCARR, SPFLI.
Includes
INCLUDE .
CONSTANTS:
GC_FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE'.
DATA: GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
GS_LAYOUT TYPE SLIS_LAYOUT_ALV,
GS_KEYINFO TYPE SLIS_KEYINFO_ALV,
GT_SORT TYPE SLIS_T_SORTINFO_ALV,
GT_SP_GROUP TYPE SLIS_T_SP_GROUP_ALV,
GT_EVENTS TYPE SLIS_T_EVENT.
Data to be displayed
DATA: BEGIN OF GT_SPFLI OCCURS 0.
INCLUDE STRUCTURE SPFLI.
DATA: ADD1,
BOX,
WERT TYPE P,
LIGHTS.
DATA: END OF GT_SPFLI.
DATA: BEGIN OF GT_SCARR OCCURS 0.
INCLUDE STRUCTURE SCARR.
DATA: BOX,
LIGHTS,
EXPAND.
DATA: END OF GT_SCARR.
DATA: G_REPID LIKE SY-REPID.
DATA: GT_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
Report Selections
SELECT-OPTIONS CARRID FOR SCARR-CARRID.
SELECTION-SCREEN SKIP 1.
Parameters
PARAMETERS: P_MAXROW TYPE I DEFAULT 50.
SELECTION-SCREEN SKIP 1.
Variante
SELECTION-SCREEN BEGIN OF BLOCK 0 WITH FRAME TITLE TEXT-064.
PARAMETERS: P_VARI LIKE DISVARIANT-VARIANT.
SELECTION-SCREEN END OF BLOCK 0.
Layout
SELECTION-SCREEN BEGIN OF BLOCK A WITH FRAME TITLE TEXT-060.
PARAMETERS:
P_ZEBRA AS CHECKBOX DEFAULT ' ',
P_NOCOLH AS CHECKBOX DEFAULT ' ',
P_COLOPT AS CHECKBOX DEFAULT ' ',
P_KEYHOT AS CHECKBOX DEFAULT ' ',
P_NOINPT AS CHECKBOX DEFAULT ' '.
SELECTION-SCREEN END OF BLOCK A.
SELECTION-SCREEN BEGIN OF BLOCK B WITH FRAME TITLE TEXT-061.
PARAMETERS:
P_LIGHTS AS CHECKBOX DEFAULT ' ',
P_LIGHTC AS CHECKBOX DEFAULT ' '.
SELECTION-SCREEN END OF BLOCK B.
SELECTION-SCREEN BEGIN OF BLOCK C WITH FRAME TITLE TEXT-062.
PARAMETERS:
P_TOTONL AS CHECKBOX DEFAULT ' ',
P_TOTEXT(60),
P_STTEXT(60).
SELECTION-SCREEN END OF BLOCK C.
SELECTION-SCREEN BEGIN OF BLOCK D WITH FRAME TITLE TEXT-063.
PARAMETERS:
P_GPCE AS CHECKBOX DEFAULT ' ',
P_CHKBOX AS CHECKBOX DEFAULT ' ',
P_EXPAND AS CHECKBOX DEFAULT ' ',
P_DETPOP AS CHECKBOX DEFAULT ' '.
SELECTION-SCREEN END OF BLOCK D.
DATA: G_BOXNAM TYPE SLIS_FIELDNAME VALUE 'BOX',
G_EXPANDNAME TYPE SLIS_FIELDNAME VALUE 'EXPAND',
P_F2CODE LIKE SY-UCOMM VALUE '&ETA',
P_LIGNAM TYPE SLIS_FIELDNAME VALUE 'LIGHTS',
G_SAVE(1) TYPE C,
G_TABNAME_HEADER TYPE SLIS_TABNAME,
G_TABNAME_ITEM TYPE SLIS_TABNAME,
g_default(1) type c,
G_EXIT(1) TYPE C,
GX_VARIANT LIKE DISVARIANT,
G_VARIANT LIKE DISVARIANT.
INITIALIZATION.
G_REPID = SY-REPID.
G_TABNAME_HEADER = 'GT_SCARR'.
G_TABNAME_ITEM = 'GT_SPFLI'.
define keyinfo
CLEAR GS_KEYINFO.
GS_KEYINFO-HEADER01 = 'CARRID'.
GS_KEYINFO-ITEM01 = 'CARRID'.
PERFORM E01_FIELDCAT_INIT USING GT_FIELDCAT[].
PERFORM E03_EVENTTAB_BUILD USING GT_EVENTS[].
PERFORM E04_COMMENT_BUILD USING GT_LIST_TOP_OF_PAGE[].
PERFORM E06_T_SORT_BUILD USING GT_SORT[].
PERFORM E07_SP_GROUP_BUILD USING GT_SP_GROUP[].
Schalter Varianten benutzerspezifisch/allgemein speicherbar setzen
Set Options: save variants userspecific or general
G_SAVE = 'A'.
PERFORM VARIANT_INIT.
Get default variant
GX_VARIANT = G_VARIANT.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
I_SAVE = G_SAVE
CHANGING
CS_VARIANT = GX_VARIANT
EXCEPTIONS
NOT_FOUND = 2.
IF SY-SUBRC = 0.
P_VARI = GX_VARIANT-VARIANT.
ENDIF.
Process on value request
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_VARI.
PERFORM F4_FOR_VARIANT.
PAI
AT SELECTION-SCREEN.
PERFORM PAI_OF_SELECTION_SCREEN.
START-OF-SELECTION.
PERFORM SELECTION.
END-OF-SELECTION.
PERFORM E05_LAYOUT_BUILD USING GS_LAYOUT. "wg. Parameters
Call ABAP/4 List Viewer
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = G_REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
IS_LAYOUT = GS_LAYOUT
IT_FIELDCAT = GT_FIELDCAT[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS = GT_SP_GROUP[]
IT_SORT = GT_SORT[]
IT_FILTER =
IS_SEL_HIDE =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
i_default = g_default
I_SAVE = G_SAVE
IS_VARIANT = G_VARIANT
IT_EVENTS = GT_EVENTS[]
IT_EVENT_EXIT =
I_TABNAME_HEADER = G_TABNAME_HEADER
I_TABNAME_ITEM = G_TABNAME_ITEM
IS_KEYINFO = GS_KEYINFO
IS_PRINT =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
TABLES
T_OUTTAB_HEADER = GT_SCARR
T_OUTTAB_ITEM = GT_SPFLI.
FORM E01_FIELDCAT_INIT *
--> E01_LT_FIELDCAT *
FORM E01_FIELDCAT_INIT USING E01_LT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
DATA: LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'ADD1'.
LS_FIELDCAT-TABNAME = G_TABNAME_ITEM.
LS_FIELDCAT-REPTEXT_DDIC = '?'.
LS_FIELDCAT-OUTPUTLEN = 1.
LS_FIELDCAT-NO_OUT = 'X'.
LS_FIELDCAT-INPUT = 'X'.
LS_FIELDCAT-SP_GROUP = 'A'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME =
I_INTERNAL_TABNAME = G_TABNAME_HEADER
I_STRUCTURE_NAME = 'SCARR'
I_CLIENT_NEVER_DISPLAY = 'X'
CHANGING
CT_FIELDCAT = E01_LT_FIELDCAT[].
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME =
I_INTERNAL_TABNAME = G_TABNAME_ITEM
I_STRUCTURE_NAME = 'SPFLI'
I_CLIENT_NEVER_DISPLAY = 'X'
CHANGING
CT_FIELDCAT = E01_LT_FIELDCAT[].
geht am Anfang nicht !!!!
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'WERT'.
LS_FIELDCAT-TABNAME = G_TABNAME_ITEM.
LS_FIELDCAT-REPTEXT_DDIC = 'Wert'(070).
LS_FIELDCAT-OUTPUTLEN = 4.
LS_FIELDCAT-INTTYPE ='P'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
ENDFORM.
FORM E02_DATA_ADD *
--> E02_LT_SFLIGHT *
FORM E02_DATA_ADD TABLES E02_LT_SPFLI STRUCTURE GT_SPFLI.
LOOP AT E02_LT_SPFLI.
IF SY-TABIX > 10.
E02_LT_SPFLI-ADD1 = 'A'.
E02_LT_SPFLI-BOX = 'X'.
E02_LT_SPFLI-LIGHTS = '3'.
ELSE.
IF SY-TABIX = 1.
E02_LT_SPFLI-LIGHTS = '2'.
ELSE.
E02_LT_SPFLI-LIGHTS = '1'.
ENDIF.
ENDIF.
E02_LT_SPFLI-WERT = SY-TABIX MOD 5.
MODIFY E02_LT_SPFLI.
ENDLOOP.
ENDFORM.
FORM E03_EVENTTAB_BUILD *
--> E03_LT_EVENTS *
FORM E03_EVENTTAB_BUILD USING E03_LT_EVENTS TYPE SLIS_T_EVENT.
DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 1
IMPORTING
ET_EVENTS = E03_LT_EVENTS.
READ TABLE E03_LT_EVENTS WITH KEY NAME = SLIS_EV_TOP_OF_PAGE
INTO LS_EVENT.
IF SY-SUBRC = 0.
MOVE GC_FORMNAME_TOP_OF_PAGE TO LS_EVENT-FORM.
APPEND LS_EVENT TO E03_LT_EVENTS.
ENDIF.
ENDFORM.
FORM E04_COMMENT_BUILD *
--> E04_LT_TOP_OF_PAGE *
FORM E04_COMMENT_BUILD USING E04_LT_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
DATA: LS_LINE TYPE SLIS_LISTHEADER.
Listenüberschrift: Typ H
CLEAR LS_LINE.
LS_LINE-TYP = 'H'.
LS_LINE-KEY: not used for this type
LS_LINE-INFO = TEXT-001.
APPEND LS_LINE TO E04_LT_TOP_OF_PAGE.
Kopfinfo: Typ S
CLEAR LS_LINE.
LS_LINE-TYP = 'S'.
LS_LINE-KEY = TEXT-050.
LS_LINE-INFO = TEXT-010.
APPEND LS_LINE TO E04_LT_TOP_OF_PAGE.
LS_LINE-KEY = TEXT-051.
APPEND LS_LINE TO E04_LT_TOP_OF_PAGE.
Aktionsinfo: Typ A
CLEAR LS_LINE.
LS_LINE-TYP = 'A'.
LS_LINE-KEY: not used for this type
LS_LINE-INFO = TEXT-002.
APPEND LS_LINE TO E04_LT_TOP_OF_PAGE.
ENDFORM.
FORM E05_LAYOUT_BUILD *
<-> E05_LS_LAYOUT *
FORM E05_LAYOUT_BUILD USING E05_LS_LAYOUT TYPE SLIS_LAYOUT_ALV.
E05_LS_LAYOUT-F2CODE = P_F2CODE.
E05_LS_LAYOUT-ZEBRA = P_ZEBRA.
E05_LS_LAYOUT-COLWIDTH_OPTIMIZE = P_COLOPT.
IF P_CHKBOX = 'X'.
E05_LS_LAYOUT-BOX_FIELDNAME = G_BOXNAM.
E05_LS_LAYOUT-BOX_TABNAME = G_TABNAME_ITEM.
ELSE.
CLEAR E05_LS_LAYOUT-BOX_FIELDNAME.
CLEAR E05_LS_LAYOUT-BOX_TABNAME.
ENDIF.
IF P_EXPAND = 'X'.
E05_LS_LAYOUT-EXPAND_FIELDNAME = G_EXPANDNAME.
ELSE.
CLEAR E05_LS_LAYOUT-EXPAND_FIELDNAME.
ENDIF.
E05_LS_LAYOUT-NO_INPUT = P_NOINPT.
E05_LS_LAYOUT-NO_COLHEAD = P_NOCOLH.
IF P_LIGHTS = 'X' OR P_LIGHTC = 'X'.
E05_LS_LAYOUT-LIGHTS_FIELDNAME = P_LIGNAM.
E05_LS_LAYOUT-LIGHTS_TABNAME = G_TABNAME_ITEM.
ELSE.
CLEAR E05_LS_LAYOUT-LIGHTS_FIELDNAME.
CLEAR E05_LS_LAYOUT-LIGHTS_TABNAME.
ENDIF.
IF P_GPCE = 'X'.
E05_LS_LAYOUT-GROUP_CHANGE_EDIT = 'X'.
ENDIF.
E05_LS_LAYOUT-LIGHTS_CONDENSE = P_LIGHTC.
E05_LS_LAYOUT-TOTALS_TEXT = P_TOTEXT.
E05_LS_LAYOUT-SUBTOTALS_TEXT = P_STTEXT.
E05_LS_LAYOUT-TOTALS_ONLY = P_TOTONL.
E05_LS_LAYOUT-KEY_HOTSPOT = P_KEYHOT.
E05_LS_LAYOUT-DETAIL_POPUP = P_DETPOP.
ENDFORM.
FORM E06_T_SORT_BUILD *
--> E06_LT_SORT *
FORM E06_T_SORT_BUILD USING E06_LT_SORT TYPE SLIS_T_SORTINFO_ALV.
DATA: LS_SORT TYPE SLIS_SORTINFO_ALV.
CLEAR LS_SORT.
LS_SORT-FIELDNAME = 'CARRID'.
LS_SORT-TABNAME = G_TABNAME_HEADER.
LS_SORT-SPOS = 1.
LS_SORT-UP = 'X'.
APPEND LS_SORT TO E06_LT_SORT.
CLEAR LS_SORT.
LS_SORT-FIELDNAME = 'CONNID'.
LS_SORT-TABNAME = G_TABNAME_ITEM.
LS_SORT-SPOS = 2.
LS_SORT-DOWN = 'X'.
APPEND LS_SORT TO E06_LT_SORT.
ENDFORM.
FORM E07_SP_GROUP_BUILD *
--> E07_LT_SP_GROUP *
FORM E07_SP_GROUP_BUILD USING E07_LT_SP_GROUP TYPE SLIS_T_SP_GROUP_ALV.
DATA: LS_SP_GROUP TYPE SLIS_SP_GROUP_ALV.
CLEAR LS_SP_GROUP.
LS_SP_GROUP-SP_GROUP = 'A'.
LS_SP_GROUP-TEXT = TEXT-005.
APPEND LS_SP_GROUP TO E07_LT_SP_GROUP.
ENDFORM.
FORM SELECTION *
FORM SELECTION.
SELECT * FROM SCARR INTO CORRESPONDING FIELDS OF TABLE GT_SCARR
WHERE CARRID IN CARRID.
SELECT * FROM SPFLI INTO CORRESPONDING FIELDS OF TABLE GT_SPFLI
UP TO P_MAXROW ROWS
WHERE CARRID IN CARRID.
LOOP AT GT_SCARR.
READ TABLE GT_SPFLI WITH KEY CARRID = GT_SCARR-CARRID.
IF SY-SUBRC NE 0.
DELETE GT_SCARR.
ENDIF.
ENDLOOP.
PERFORM E02_DATA_ADD TABLES GT_SPFLI.
ENDFORM.
FORM TOP_OF_PAGE *
FORM TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
ENDFORM.
FORM F4_FOR_VARIANT *
FORM F4_FOR_VARIANT.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
IS_VARIANT = G_VARIANT
I_SAVE = G_SAVE
I_TABNAME_HEADER = G_TABNAME_HEADER
I_TABNAME_ITEM = G_TABNAME_ITEM
it_default_fieldcat =
IMPORTING
E_EXIT = G_EXIT
ES_VARIANT = GX_VARIANT
EXCEPTIONS
NOT_FOUND = 2.
IF SY-SUBRC = 2.
MESSAGE ID SY-MSGID TYPE 'S' NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
IF G_EXIT = SPACE.
P_VARI = GX_VARIANT-VARIANT.
ENDIF.
ENDIF.
ENDFORM.
*& Form PAI_OF_SELECTION_SCREEN
text
FORM PAI_OF_SELECTION_SCREEN.
IF NOT P_VARI IS INITIAL.
MOVE G_VARIANT TO GX_VARIANT.
MOVE P_VARI TO GX_VARIANT-VARIANT.
CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
EXPORTING
I_SAVE = G_SAVE
CHANGING
CS_VARIANT = GX_VARIANT.
G_VARIANT = GX_VARIANT.
ELSE.
PERFORM VARIANT_INIT.
ENDIF.
ENDFORM. " PAI_OF_SELECTION_SCREEN
*& Form VARIANT_INIT
text
--> p1 text
<-- p2 text
FORM VARIANT_INIT.
CLEAR G_VARIANT.
G_VARIANT-REPORT = G_REPID.
ENDFORM. " VARIANT_INIT
Regards,
Kiran
Maybe you are looking for
-
How do I move purchased tv show from one computer to another - same acct.
I have multiple computers that are all authorized to use the same iTunes Store account. I purchased a season pass to a TV show and when new episodes become available, my daughter's computer is first to download. I would like to also play those episod
-
How do you get a table to flow onto the second page?
Since upgrading to Yosemite, I cannot figure out how to get my table to continue on to the second page. If you look at my screenshot, you can see that my table was so big so the whole thing was moved to the next page. I want it to remain on the 1st p
-
Opinion on the "Verizon Edge" program please
I am contemplating on signing up for the Edge. My phone and my daughters phone are crap now and we seriously need to upgrade but aren't due until May of 2015. My monthly bill is already ridiculous, I really can't have it costing more. So of course th
-
Hi I want to buy Openoffice in App Store but I can't find it. One month ago Openoffice was in App Store but now I don't find it and i need it to work. Can someone tell me if I downald Xtreme Writer or Word to go it will be the same or where I can fin
-
Previews not correct in open file dialog
Hello all, I am on CS4 Photoshop. The previews of files in the File>Open dialog do not update or show the correct picture. Files with various layers often only show one layer instead of the whole picture, or layers are shifted wrongly over one anothe