Need example of menu in ie
Hi, Same problem - different approach.
Can someone point me to a horizontal nav bar with vertical
dropdowns that works in ie? I just have to either see the code or
see the css to figure out what's causing the submenu links to jump
away before I can hover over them. Please help!
Truly grateful,
Jane
Yes. The PVII stuff is much more grounded in the reality of
web development
than the Zeldman stuff - which is often a bit too esoteric
and academic for
practical use.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"basketcasecafe1" <[email protected]> wrote
in message
news:glqi7a$osd$[email protected]..
> Murray - This tutorial also seems to answer my question.
>
http://www.projectseven.com/tutorials/navigation/auto_hide/index.htm
> I tested it in IE and it works - so I just have to
follow it.
>
> Jane
>
Similar Messages
-
Need example report program using PNPCE LDB in SAP HR
Need example report program using PNPCE LDB in SAP HR.
and how to create a report category in sap hr for using it as cutomised selection screen.Hi,
Go through the following links, i hope it will help you.....
/people/alvaro.tejadagalindo/blog/2006/02/19/how-to-deal-with-hr-payroll-reports
http://sap.ittoolbox.com/groups/technical-functional/sap-r3-dev/893908#
A sample prog with LDB PNP
*& Report ZH_REPT_PAYMENT *
report zh_rept_payment line-size 80 no standard page
heading.
tables: pernr, " Standard Selections for HR Master Data Reporting
pcl1, " HR Cluster 1
pcl2, " HR Cluster 2
pa0009,
PA9001,
PA9006,
pa0002,
pc260 , " Cluster Directory for Payroll Results
bnka .
Infotypes
infotypes: 0001. " Organizational Assignment
Declaration of Internal Tables
data : bnka1 like bnka occurs 0 with header line .
data: begin of t_int_rep occurs 100,
bankl like pc209-bankl, " Bank Number
zlsch like pc209-zlsch, " Payment method
pernr like pernr-pernr, " Employee Number
ename like pernr-ename, " Employee Name
bankn like pc209-bankn, " Bank Account Number
betrg like pc209-betrg, " Amount to be transfered
zweck like pa0009-zweck, " Purpose
end of t_int_rep.
data: begin of int_rep occurs 100,
bankl like pc209-bankl, " Bank Number
zlsch like pc209-zlsch, " Payment method
pernr like pernr-pernr, " Employee Number
ename like pernr-ename, " Employee Name
bankn like pc209-bankn, " Bank Account Number
betrg like pc209-betrg, " Amount to be transfered
zweck like pa0009-zweck, " Purpose
begda like pa0009-begda, "Begin date
end of int_rep.
Declaration of Data Variables
data: ws_betrg like pc209-betrg, " BT Amount
w_val like spell occurs 0 with header line,
int_rep1(6), " TYPE I, " Employee Number
cnt type i value 0, " Counter
calcmolga like t500l-molga value '40', " Country Grouping
v_id(15),
calc_currency like t001-waers value 'INR'. " Currency
data : ctr type i,
dt_merge like pa0009-begda.
data: ws_totemp(6) type c,
ws_totamt(20) type c,
r_mth(9) type c,
ws_fpbeg(6) type c,
ws_fpend(6) type c,
ws_mthyr(6) type c,
ws_mthyr_r(14) type c,
r_mth_t(3) type c,
ws_amt(8) type c,
ws_bankl(14) type c,
ws_date(6) type c,
amount_word(500),
total_page type i,
pages type i,
remain type i.
data begin of i_spell.
include structure spell .
data end of i_spell .
data : c_molga type t500l-molga value '40',
c_banks type bnka-banks value 'IN'.
Standard Includes
include rpc2cd09. "Cluster CD data definition
include pc2rxin0.
include rpc2rx09.
include rpppxd00. " Data Definition buffer PCL1/PCL2
include rpppxd10. " Common Part buffer PCL1/PCL2
include rpppxm00. " Buffer Handling RoutinePCL1/PCL2
include zrpc2rox2. " Data Definition POCLSTERS (not J,K,U)
Selection Screen
selection-screen begin of block b1 with frame title text-001.
parameter: pa_mth(2) type c default sy-datum+4(2) obligatory,
pa_year(4) type c default sy-datum(4) obligatory,
p_bankl like pc209-bankl, " Bank Number
p_zlsch like pc209-zlsch. " Payment method
selection-screen end of block b1.
save_calc_currency = calc_currency.
count_top = 0.
get_pernr_flag = 0.
Top-Of-Page
top-of-page.
perform convert_month using pa_mth(2) r_mth.
ws_mthyr_r = r_mth.
concatenate ws_mthyr_r pa_year into ws_mthyr_r separated by space.
SKIP 5.
skip 1.
skip 4.
if int_rep-bankl eq ' '.
if int_rep-zlsch eq 'C' or int_rep-zlsch eq 'E' or
int_rep-zlsch eq ' '.
write: /1(85) 'CHEQUE PAYMENT STATEMENT'(047) centered.
elseif int_rep-zlsch eq 'L'.
write: /1(85) 'DEMAND DRAFT STATEMENT'(047) centered.
endif.
else.
write: /1(85) 'BANK TRANSFER STATEMENT'(002) centered.
endif.
skip.
write: /34 ws_mthyr_r,
62 'Page :'(008),69(2) sy-pagno intensified off,
' Of ',78(2) pages intensified off.
clear pages.
read table bnka1 with key bankl = int_rep-bankl .
if sy-subrc = 0.
if int_rep-zlsch eq 'T'.
write:/03(10) 'Bank Name : ', bnka1-banka.
write:/03(10) 'Branch : ', bnka1-brnch.
write:/03(10) 'Address : ', bnka1-stras.
endif.
endif.
skip.
write:/1(80) sy-uline.
write: /1 sy-vline, 2(5) 'Sl.No'(002),
7 sy-vline, 8(8) 'Emp.No.'(003),
16 sy-vline,17(35) 'Employee Name'(004).
*--added for Demand Draft
if ( int_rep-zlsch = 'l' or int_rep-zlsch = 'L' ).
write : 47 sy-vline, 48(15) 'Payable at'(005).
else.
write : 47 sy-vline,48(15) 'Account No.'(005).
endif.
write: 63 sy-vline,64(16) 'Amount'(006),
80 sy-vline.
write:/1(80) sy-uline.
end-of-page.
write:/1(80) sy-uline.
write:/2 'Printed on ', sy-datum.
Start-of-selection.
start-of-selection.
*perform h_headr.
ctr = 0.
set margin 5.
call function 'RP_GET_CURRENCY'
exporting
molga = calcmolga
importing
waers = calc_currency
exceptions
others.
if sy-subrc ne 0.
calc_currency = 'DEM'.
calc_currency = save_calc_currency.
endif.
get pernr.
cd-key-pernr = pernr-pernr.
perform import_cluster.
get_pernr_flag = 1.
check : ocd-version-molga eq calcmolga.
The table 'tabpernr' is filled with the personnel numbers
and is used after selection is finished.
move-corresponding pernr to tabpernr.
append tabpernr.
The table 'tab_rgdir' is filled
loop at rgdir.
rx-key-pernr = pernr-pernr.
unpack rgdir-seqnr to rx-key-seqno.
perform int_tab. "fill tab_rgdir
perform import_bt.
perform validate.
endloop.
End of Selection
end-of-selection.
*perform h_headr.
perform convert_date_a using pa_mth r_mth_t.
sort int_rep by bankl zlsch pernr betrg descending.
delete adjacent duplicates from int_rep
comparing bankl zlsch pernr .
sort int_rep by bankl zlsch bankn . "PERNR.
loop at int_rep.
at new bankl.
select single * into bnka1 from bnka
where banks = c_banks and
bankl = int_rep-bankl .
append bnka1.
clear bnka1.
endat.
endloop.
for Demand Draft - purpose added
loop at int_rep.
concatenate pa_year(4) pa_mth(2) '01' into dt_merge.
select single * "zweck into int_rep-zweck
from pa0009 where
pernr = int_rep-pernr and
bankl = int_rep-bankl and
zlsch = int_rep-zlsch
and begda <= dt_merge and
endda >= dt_merge .
if sy-subrc = 0.
int_rep-zweck = pa0009-zweck.
modify int_rep.
endif.
endloop.
*-for DD and Chq sorted by PAyable at and EMPNO wise
if p_zlsch = 'T' .
sort int_rep by bankl zlsch bankn . "PERNR.
else. "added for "payable at" for DD/Chq
else.
sort int_rep by zweck pernr . "PERNR.
endif.
*delete adjacent duplicates from int_rep.
t_int_rep] = int_rep[.
loop at int_rep.
*-for page of page no.
total_page = 0.
loop at t_int_rep where bankl = int_rep-bankl
and zlsch = int_rep-zlsch.
total_page = total_page + 1.
endloop.
pages = total_page div 25.
remain = total_page mod 25.
comment bcoz its adding one extra page no.
done as on 29/11/2004
if remain > 0.
pages = pages + 1.
endif.
**-end
at new bankl.
ctr = 0 .
new-page.
endat.
at new zlsch.
ctr = 0 .
new-page.
endat.
clear v_id.
select single natio
into pa0002-natio
from pa0002
where pernr eq int_rep-pernr.
*-testing......for soma
if ctr > 24.
ctr = 0 .
write:/1(80) sy-uline.
new-page .
endif.
ctr = ctr + 1 .
cnt = cnt + 1.
pack int_rep-pernr to int_rep1.
write:/1 sy-vline, 2(3) cnt intensified off,
7 sy-vline, 9(6) int_rep1 intensified off,
16 sy-vline,17(35) int_rep-ename intensified off .
if ( int_rep-zlsch = 'l' or int_rep-zlsch = 'L' ).
write : 47 sy-vline,48(15) int_rep-zweck intensified off.
else.
write:
47 sy-vline,48(15) int_rep-bankn intensified off .
endif.
write: 63 sy-vline,64(16) int_rep-betrg
intensified off currency 'INR',
80 sy-vline.
ws_betrg = ws_betrg + int_rep-betrg.
*-testing......for soma
skip.
write :
/1 sy-vline, 7 sy-vline ,16 sy-vline ,47 sy-vline,63 sy-vline,80
sy-vline .
*-end testing......for soma
at end of zlsch.
if int_rep-bankl = ' '.
call function 'HR_IN_CHG_INR_WRDS'
exporting
amt_in_num = ws_betrg
importing
amt_in_words = amount_word
EXCEPTIONS
DATA_TYPE_MISMATCH = 1
OTHERS = 2
w_val-word = amount_word.
concatenate 'INR.' w_val-word into w_val-word
separated by space.
write:/1(80) sy-uline.
write: /1 sy-vline, 7 'Total transfer:'(009),
64(16) ws_betrg intensified off currency 'INR',
80 sy-vline.
write:/1(80) sy-uline.
write: /1 sy-vline, 3 w_val-word+0(76) intensified off,
80 sy-vline.
write :/1 sy-vline, 10 w_val-word+76(70) intensified off,
80 sy-vline.
write:/1(80) sy-uline.
clear: ws_betrg,cnt.
skip 2.
write: /2 'Prepared by :'(010), '_______________'(013),
45 'Checked by :'(011),'_______________'(013).
skip 2.
write: /2 'Printed On ', sy-datum,
45 'Approved by :'(012),'_______________'(013).
clear sy-pagno.
endif.
endat.
at end of bankl.
if int_rep-bankl ' '.
call function 'HR_IN_CHG_INR_WRDS'
exporting
amt_in_num = ws_betrg
importing
amt_in_words = amount_word
EXCEPTIONS
DATA_TYPE_MISMATCH = 1
OTHERS = 2
w_val-word = amount_word.
concatenate 'INR.' w_val-word into w_val-word
separated by space.
write:/1(80) sy-uline.
write: /1 sy-vline, 7 'Total transfer:'(009),
64(16) ws_betrg intensified off currency 'INR',
80 sy-vline.
write:/1(80) sy-uline.
write: /1 sy-vline, 3 w_val-word+0(76) intensified off,
80 sy-vline.
write :/1 sy-vline, 10 w_val-word+76(70) intensified off,
80 sy-vline.
write:/1(80) sy-uline.
clear: ws_betrg,cnt.
skip 2.
write: /2 'Prepared by :'(010), '_______________'(013),
45 'Checked by :'(011),'_______________'(013).
skip 2.
write: /2 'Printed on ', sy-datum,
45 'Approved by :'(012),'_______________'(013).
clear sy-pagno.
NEW-PAGE.
endif.
endat.
endloop.
End of Page
end-of-page.
write: /2 'Prepared by :'(010), '_______________',
45 'Checked by :'(011),'_______________'.
*& Form IMPORT_CLUSTER
Importing Data from Cluster *
form import_cluster.
sy-subrc = 0.
rp-imp-c2-cd.
if sy-subrc eq 0.
if cd-version-number ne ocd-version-number.
endif.
endif. " SY-SUBRC EQ 0
endform. " IMPORT_CLUSTER
*& Form INT_TAB
Filling internal table tab_rgdir form int_tab.
*Fill internal table tab_rgdir.
move-corresponding rgdir to tab_rgdir.
tab_rgdir-pernr = pernr-pernr.
append tab_rgdir.
endform. " INT_TAB
*& Form IMPORT_bt
Import Values from Bank Transactions Table (BT) form import_bt.
rp-init-buffer.
RP-IMP-C2-RX.
rp-imp-c2-in.
if rp-imp-in-subrc eq 0.
if in-version-number ne oin-version-number.
write: / 'Schlüssel des Clusters RX:'(015),
rx-key-pernr, rx-key-seqno.
write: / 'The imported version of the cluster'(016), 'RX',
'is not current'(017).
write: / 'Imported version :'(018),
oin-version-number.
write: / 'Current version of cluster :'(019),
in-version-number.
stop.
else.
sy-subrc = 0.
endif.
else.
sy-subrc = 8.
write: /
'Inconsistencies between cluster directory and directory for'(020).
write: /
'No payroll results found for data in cluster directory'(021).
write : /
'Please contact hotline to solve the current problem'(022).
endif.
ws_fpbeg(2) = versc-fpbeg+4(2).
ws_fpbeg+2(4) = versc-fpbeg(4).
ws_fpend(2) = versc-fpend+4(2).
ws_fpend+2(4) = versc-fpend(4).
ws_mthyr(2) = pa_mth.
ws_mthyr+2(4) = pa_year.
check ws_mthyr = ws_fpbeg.
check ws_mthyr = ws_fpend.
loop at bt. "from pc209
int_rep-pernr = pernr-pernr.
int_rep-ename = pernr-ename.
int_rep-bankl = bt-bankl.
int_rep-bankn = bt-bankn.
int_rep-betrg = bt-betrg.
int_rep-zlsch = bt-zlsch.
append int_rep.
endloop.
IF P_BANKL ' ' AND P_ZLSCH ' '.
DELETE INT_REP WHERE BANKL P_BANKL.
ELSEIF P_BANKL = ' ' AND P_ZLSCH ' '.
DELETE INT_REP WHERE ZLSCH P_ZLSCH.
ELSEIF P_BANKL ' ' AND P_ZLSCH = ' '.
DELETE INT_REP WHERE BANKL P_BANKL.
ENDIF.
endform. " IMPORT_BT
*& Form CONVERT_MONTH
Fetching Month Text form convert_month using mth t_mth.
case mth.
when '01'.
t_mth = 'January'(023).
when '02'.
t_mth = 'February'(024).
when '03'.
t_mth = 'March'(025).
when '04'.
t_mth = 'April'(026).
when '05'.
t_mth = 'May'(027).
when '06'.
t_mth = 'June'(028).
when '07'.
t_mth = 'July'(029).
when '08'.
t_mth = 'August'(030).
when '09'.
t_mth = 'September'(031).
when '10'.
t_mth = 'October'(032).
when '11'.
t_mth = 'November'(033).
when '12'.
t_mth = 'December'(034).
endcase.
endform. " CONVERT_MONTH
*& Form CONVERT_DATE_A
Fetching Month Text * form convert_date_a using mth_t t_mth_t.
case mth_t.
when '01'.
t_mth_t = 'Jan.'(035).
when '02'.
t_mth_t = 'Feb.'(036).
when '03'.
t_mth_t = 'Mar.'(037).
when '04'.
t_mth_t = 'Apr.'(038).
when '05'.
t_mth_t = 'May.'(039).
when '06'.
t_mth_t = 'Jun.'(040).
when '07'.
t_mth_t = 'Jul.'(041).
when '08'.
t_mth_t = 'Aug.'(042).
when '09'.
t_mth_t = 'Sep.'(043).
when '10'.
t_mth_t = 'Oct.'(044).
when '11'.
t_mth_t = 'Nov.'(045).
when '12'.
t_mth_t = 'Dec.'(046).
endcase.
endform. " CONVERT_DATE_A
*& Form VALIDATE
text
--> p1 text
<-- p2 text form validate .
if p_bankl <> ' ' and p_zlsch ' '.
delete int_rep where bankl p_bankl.
elseif p_bankl = ' ' and p_zlsch ' '.
delete int_rep where zlsch p_zlsch.
elseif p_bankl ' ' and p_zlsch = ' '.
delete int_rep where bankl p_bankl.
endif.
endform. " VALIDATE
check this weblog.....
/people/dj.adams/blog/2003/11/13/food-for-thought-ldbs-and-abap-objects
Also , check the following link too.
http://www.datamanagementgroup.com/Resources/Articles/Article_1005_2.asp
Regards,
Harish -
HOW TO CREATE A DRILLDOWN PROGRAM NEED EXAMPLE
HAI FRIENDS
1 I WANT TO KNOW HOW TO CREATE A DRILLDOWN PROGRAM NEED EXAMPLE IN ABAP
2 NEED ABAP PROGRAM EBOOK
PLZ DO ITCHECK THIS ALV DRILL DOWN REPORT
*& Report ZHAI_SD_CUSTOMER_DETAILS_ALV
REPORT ZHAI_SD_CUSTOMER_DETAILS_ALV.
TYPE-POOLS: SLIS.
TYPES DECLARATIONS
TABLES : KNA1.
DATA : BEGIN OF IT_CUST OCCURS 0,
KUNNR LIKE KNA1-KUNNR,
NAME1 LIKE KNA1-NAME1,
LAND1 LIKE KNA1-LAND1,
ORT01 LIKE KNA1-ORT01,
STRAS LIKE KNA1-STRAS,
PSTLZ LIKE KNA1-PSTLZ,
END OF IT_CUST.
DATA:BEGIN OF IT_SALE OCCURS 0,
VBELN LIKE VBAK-VBELN,"SALES DOC NO
AUDAT LIKE VBAK-AUDAT,"DATE RECIEVED AND SENT
AUART LIKE VBAK-AUART,"SALES DOC LIKE
NETWR LIKE VBAK-NETWR,"NET VALUE IN DOC CURRENCY
KUNNR LIKE VBAK-KUNNR,
END OF IT_sale.
TYPES: BEGIN OF TY_ITEM,
VBELN TYPE VBAP-VBELN,
POSNR TYPE VBAP-POSNR,"ITEM NO
MATNR TYPE VBAP-MATNR,"MATERIAL NO
CHARG TYPE VBAP-CHARG,"BATCH
MATKL TYPE VBAP-MATKL,"MATERIAL GROUP
MEINS TYPE VBAP-MEINS,"BASE UNIT OF MEASURE
END OF TY_ITEM.
SELECT-OPTIONS : S_KUNNR FOR KNA1-KUNNR.
INTERNAL TABLES
DATA:
IT_CUST TYPE TABLE OF TY_CUST,
IT_SALE TYPE TABLE OF TY_SALE,
IT_ITEM TYPE TABLE OF TY_ITEM.
INTERNAL TABLES FOR ALV
DATA: IT_FCAT TYPE SLIS_T_FIELDCAT_ALV,
IT_FCAT1 TYPE SLIS_T_FIELDCAT_ALV,
IT_FCAT3 TYPE SLIS_T_FIELDCAT_ALV.
DATA: IT_EVENTS TYPE TABLE OF slis_alv_event,
IT_EVENTS1 TYPE TABLE OF SLIS_ALV_EVENT,
IT_EVENTS2 TYPE TABLE OF SLIS_ALV_EVENT.
DATA: IT_LISTHEADER1 TYPE SLIS_T_LISTHEADER,
IT_LISTHEADER TYPE TABLE OF slis_listheader,
IT_LISTHEADER3 TYPE TABLE OF SLIS_LISTHEADER,
IT_FOOTER TYPE TABLE OF SLIS_LISTHEADER.
DATA: IT_SORT TYPE SLIS_T_SORTINFO_ALV,
WA_SORT LIKE LINE OF IT_SORT.
WORK AREAS FOR ALV
DATA: WA_LAYOUT TYPE SLIS_LAYOUT_ALV,
WA_LAYOUT1 TYPE SLIS_LAYOUT_ALV,
WA_FCAT LIKE LINE OF IT_FCAT,
WA_FCAT1 LIKE LINE OF IT_FCAT1,
WA_FCAT3 LIKE LINE OF IT_FCAT3,
WA_EVENTS LIKE LINE OF IT_EVENTS,
WA_EVENTS1 LIKE LINE OF IT_EVENTS,
WA_EVENTS2 LIKE LINE OF IT_EVENTS.
WORK VARIABLES
DATA: W_REPID TYPE SY-REPID,
W_KUNNR TYPE KNA1-KUNNR.
$$**----
WORK AREAS
MACROS
DEFINE ADD_FCAT1..
WA_FCAT1-COL_POS = &1.
WA_FCAT1-FIELDNAME = &2.
WA_FCAT1-TABNAME = &3.
WA_FCAT1-REF_TABNAME = &4.
WA_FCAT1-KEY = &5.
WA_FCAT1-DO_SUM = &6.
WA_FCAT1-HOTSPOT = &7.
WA_FCAT1-EMPHASIZE = &8.
APPEND WA_FCAT1 TO IT_FCAT1.
END-OF-DEFINITION.
START-OF-SELECTION.
PERFORM F_GET_DATA.
PERFORM F_BUILD_FCAT.
PERFORM F_GET_EVENTS.
PERFORM F_BUILD_LAYOUT USING WA_LAYOUT.
PERFORM F_GET_DISPLAY.
*& Form F_GET_DATA
FORM F_GET_DATA .
SELECT KUNNR
NAME1
LAND1
ORT01
STRAS
PSTLZ FROM KNA1
INTO TABLE
IT_CUST WHERE KUNNR IN S_KUNNR.
ENDFORM. " F_GET_DATA
*& Form F_GET_DISPLAY
text
--> p1 text
<-- p2 text
FORM F_GET_DISPLAY .
CLEAR W_REPID.
MOVE SY-REPID TO W_REPID.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = w_repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = 'F_TOP_OF_PAGE'
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = 'DUCK'
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT = WA_LAYOUT
IT_FIELDCAT = IT_FCAT
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS = IT_EVENTS
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = IT_CUST
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " F_GET_DISPLAY
*& Form F_GET_EVENTS
text
--> p1 text
<-- p2 text
FORM F_GET_EVENTS .
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = IT_EVENTS
EXCEPTIONS
LIST_TYPE_WRONG = 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.
SORT IT_EVENTS.
READ TABLE IT_EVENTS INTO WA_EVENTS
WITH KEY NAME = 'TOP_OF_PAGE' BINARY SEARCH.
IF SY-SUBRC EQ 0.
WA_EVENTS-FORM = 'F_TOP_OF_PAGE'.
MODIFY IT_EVENTS INDEX SY-TABIX FROM
WA_EVENTS TRANSPORTING FORM.
ENDIF.
READ TABLE IT_EVENTS INTO WA_EVENTS
WITH KEY NAME = 'USER_COMMAND' BINARY SEARCH.
IF SY-SUBRC EQ 0.
WA_EVENTS-FORM = 'F_USER_COMMAND'.
MODIFY IT_EVENTS FROM WA_EVENTS INDEX
SY-TABIX TRANSPORTING FORM.
READ TABLE IT_EVENTS INTO WA_EVENTS
WITH KEY NAME = 'USER_COMMAND' BINARY SEARCH.
ENDIF.
READ TABLE IT_EVENTS INTO WA_EVENTS WITH
KEY NAME = 'END_OF_PAGE' BINARY SEARCH.
IF SY-SUBRC EQ 0.
WA_EVENTS-FORM = 'F_END_OF_PAGE'.
MODIFY IT_EVENTS FROM WA_EVENTS
INDEX SY-TABIX TRANSPORTING FORM.
ENDIF.
ENDFORM. "F_GET_EVENTS
*& Form F_BUILD_LAYOUT
FORM F_BUILD_LAYOUT USING P_WA_LAYOUT LIKE WA_LAYOUT .
CLEAR P_WA_LAYOUT.
P_WA_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
*P_WA_LAYOUT-F2CODE = '&ETA'.
*p_wa_layout-detail_popup = 'X'.
P_WA_LAYOUT-DETAIL_TITLEBAR = 'ALV REPORT'.
*P_WA_LAYOUT-CONFIRMATION_PROMPT = 'X'.
ENDFORM. " F_BUILD_LAYOUT
*& Form F_TOP_OF_PAGE
FORM F_TOP_OF_PAGE .
refresh it_listheader.
DATA: LS_LIST TYPE SLIS_LISTHEADER.
LS_LIST-TYP = 'H'.
LS_LIST-INFO = TEXT-004.
APPEND LS_LIST TO IT_LISTHEADER.
LS_LIST-typ = 'S'.
LS_LIST-key = 'Date: '.
CONCATENATE sy-datum+6(2) '.'
sy-datum+4(2) '.'
sy-datum(4) INTO LS_LIST-info. "todays date
append LS_LIST to IT_LISTHEADER.
clear: LS_LIST.
LS_LIST-TYP = 'S'.
LS_LIST-KEY = 'DEVELOPED:'.
LS_LIST-INFO = SY-UNAME.
APPEND LS_LIST TO IT_LISTHEADER.
CLEAR LS_LIST.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = IT_LISTHEADER
I_LOGO = 'GLOBAL'.
ENDFORM. " F_TOP_OF_PAGE
*& Form F_BUILD_FCAT
FORM F_BUILD_FCAT .
CLEAR: W_REPID,
IT_FCAT.
MOVE SY-REPID TO W_REPID.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = W_REPID
I_INTERNAL_TABNAME = 'IT_CUST'
I_INCLNAME = W_REPID
CHANGING
CT_FIELDCAT = IT_FCAT
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " F_BUILD_FCAT
*& Form F_USER_COMMAND
FORM F_USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
CASE R_UCOMM.
WHEN '&IC1'.
IF RS_SELFIELD-FIELDNAME = 'KUNNR'.
READ TABLE IT_CUST
INDEX RS_SELFIELD-TABINDEX.
MOVE rs_selfield-value TO W_KUNNR.
IF IT_CUST IS NOT INITIAL.
PERFORM F_GET_SECONDARY_DATA.
PERFORM F_BUILD_FCAT1.
PERFORM F_BUILD_EVENTS.
PERFORM F_GET_SORT.
PERFORM F_BUILD_LAYOUT1.
PERFORM F_GET_DISPLAY1.
ENDIF.
ENDIF.
ENDCASE.
ENDFORM. " F_USER_COMMAND
*& Form F_GET_SECONDARY_DATA
FORM F_GET_SECONDARY_DATA .
data:v_data.
SELECT VBELN
AUDAT
AUART
NETWR
KUNNR FROM VBAK INTO TABLE IT_SALE
WHERE KUNNR EQ IT_CUST-KUNNR.
IF IT_SALE[] IS INITIAL .
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = SY-REPID
DIAGNOSE_OBJECT = ' '
TEXT_QUESTION = 'NO SALES FOR THIS CUSTOMER'
TEXT_BUTTON_1 = 'Ja'(001)
ICON_BUTTON_1 = ' '
TEXT_BUTTON_2 = 'Nein'(002)
ICON_BUTTON_2 = ' '
DEFAULT_BUTTON = '1'
DISPLAY_CANCEL_BUTTON = 'X'
USERDEFINED_F1_HELP = ' '
START_COLUMN = 25
START_ROW = 6
POPUP_TYPE =
IV_QUICKINFO_BUTTON_1 = ' '
IV_QUICKINFO_BUTTON_2 = ' '
IMPORTING
ANSWER = v_data
TABLES
PARAMETER =
EXCEPTIONS
TEXT_NOT_FOUND = 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.
case v_data.
when '2'.
leave screen.
when 'A'.
leave to screen '0'.
endcase.
ENDIF.
ENDFORM. " F_GET_SECONDARY_DATA
*& Form F_BUILD_FCAT1
FORM F_BUILD_FCAT1 .
REFRESH IT_FCAT1.
CLEAR WA_FCAT1.
ADD_FCAT1:
'1' 'VBELN' 'VBAK' 'VBAK' 'X' ' ' 'X' 'C500',
'2' 'AUDAT' 'VBAK' 'VBAK' ' ' ' ' ' ' 'C400',
'3' 'AUART' 'VBAK' 'VBAK' ' ' ' ' ' ' 'C100',
'4' 'NETWR' 'VBAK' 'VBAK' ' ' 'X' ' ' 'C300'.
ENDFORM. " F_BUILD_FCAT1
*& Form F_GET_DISPLAY1
text
--> p1 text
<-- p2 text
FORM F_GET_DISPLAY1 .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = 'F_USER_COMMAND1'
I_CALLBACK_TOP_OF_PAGE = 'F_TOP_OF_PAGE1'
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT =
IT_FIELDCAT = IT_FCAT1
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT = IT_SORT
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS = IT_EVENTS1
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = IT_SALE
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " F_GET_DISPLAY1
*& Form F_BUILD_EVENTS
FORM F_BUILD_EVENTS .
clear wa_events1.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = IT_EVENTS1.
EXCEPTIONS
LIST_TYPE_WRONG = 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.
SORT IT_EVENTS1.
read table It_events1 with key name = 'TOP_OF_PAGE'
into WA_eventS1.
if sy-subrc = 0.
move 'F_TOP_OF_PAGE1' to WA_EventS1-form.
append WA_eventS1 to it_events1.
endif.
READ TABLE IT_EVENTS WITH KEY NAME = 'USER_COMMAND'
INTO WA_EVENTS1.
IF SY-SUBRC = 0.
MOVE 'F_USER_COMMAND1' TO WA_EVENTS1-FORM.
APPEND WA_EVENTS1 TO IT_EVENTS1.
ENDIF.
*READ TABLE IT_EVENTS WITH KEY NAME = 'SUBTOTAL_TEXT'
INTO WA_EVENTS1.
IF SY-SUBRC = 0.
MOVE 'F_SUBTOTAL_TEXT' TO WA_EVENTS1-FORM.
APPEND WA_EVENTS1 TO IT_EVENTS1.
ENDIF.
ENDFORM. " F_BUILD_EVENTS
*& Form F_TOP_OF_PAGE1
FORM F_TOP_OF_PAGE1 .
DATA: LS_HEADER TYPE SLIS_LISTHEADER.
REFRESH : IT_LISTHEADER1.
LS_HEADER-TYP = 'H'.
LS_HEADER-INFO = 'SALES ORDER DETAILS FOR CUSTOMER'.
APPEND LS_HEADER TO it_listheader1.
CLEAR LS_HEADER.
LS_HEADER-TYP = 'S'.
LS_HEADER-KEY = 'CUSTOMER NO:'.
LS_HEADER-INFO = W_KUNNR.
APPEND LS_HEADER TO IT_LISTHEADER1.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = IT_LISTHEADER1
I_LOGO = 'DUCK'
I_END_OF_LIST_GRID =
I_ALV_FORM =
ENDFORM. " F_TOP_OF_PAGE
*& Form F_END_OF_PAGE
text
--> p1 text
<-- p2 text
FORM F_END_OF_PAGE .
DATA:LS_FOOTER TYPE SLIS_LISTHEADER.
LS_FOOTER-TYP = 'S'.
LS_FOOTER-KEY = SY-UNAME.
LS_FOOTER-INFO = 'DEVELOPED BY:'.
APPEND LS_FOOTER TO IT_FOOTER.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = IT_FOOTER
ENDFORM. " F_END_OF_PAG
*& Form F_USER_COMMAND1
text
--> p1 text
<-- p2 text
FORM F_USER_COMMAND1 USING R_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
CASE R_UCOMM.
WHEN '&IC1'.
READ TABLE IT_SALE INDEX RS_SELFIELD-TABINDEX.
PERFORM F_GET_SECONDARY2.
PERFORM F_GET_FCAT3 USING:
'VBELN' '1' 'C' '12' 'SALES_DOC' 'M' 'VBAP' 'X' 'C51' ' ',
'POSNR' '2' ' ' '5' 'ITEM_NO' 'M' 'VBAP' ' ' 'C61' ' ',
'MATNR' '3' ' ' '12' 'MATERIAL_NO' 'M' 'VBAP' ' ' 'C71' ' ',
'CHARG' '4' ' ' '10' 'BATCH_NO' 'M' 'VBAP' ' ' 'C41' ' ',
'MATKL' '5' ' ' '10' 'MAT_GROUP' 'M' 'VBAP' ' ' 'C31' ' ',
'MEINS' '6' ' ' '12' 'BASE_UNIT' 'M' 'VBAP' ' ' 'C21' 'X' .
PERFORM F_GET_EVENTS2 USING WA_EVENTS2
CHANGING IT_EVENTS2.
PERFORM F_GET_DISPLAY3.
REFRESH IT_FCAT3.
ENDCASE.
ENDFORM. " F_USER_COMMAND1
*& Form F_GET_SECONDARY2
text
--> p1 text
<-- p2 text
FORM F_GET_SECONDARY2 .
SELECT VBELN
POSNR
MATNR
MATKL
MEINS
FROM VBAP INTO
TABLE IT_ITEM WHERE
VBELN EQ IT_SALE-VBELN.
IF SY-DBCNT EQ 0.
MESSAGE E000(ZHAI) WITH TEXT-KO1.
ENDIF.
ENDFORM. " F_GET_SECONDARY2
*& Form F_GET_DISPLAY3
text
--> p1 text
<-- p2 text
FORM F_GET_DISPLAY3 .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = 'F_PF_STATUS'
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = 'F_TOP_OF_PAGE3'
I_CALLBACK_HTML_TOP_OF_PAGE = 'F_TOP_OF_PAGE3'
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT = WA_LAYOUT1
IT_FIELDCAT = IT_FCAT3
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT = IT_SORT
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS = IT_EVENTS2
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = IT_ITEM
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " F_GET_DISPLAY3
*& Form F_GET_FCAT3
FORM F_GET_FCAT3 USING VALUE(P1)
VALUE(P2)
VALUE(P3)
VALUE(P4)
VALUE(P5)
VALUE(P6)
VALUE(P7)
VALUE(P8)
VALUE(P9)
VALUE(P10).
CLEAR WA_FCAT3.
WA_FCAT3-FIELDNAME = P1.
WA_FCAT3-COL_POS = P2.
WA_FCAT3-JUST = P3.
WA_FCAT3-OUTPUTLEN = P4.
WA_FCAT3-SELTEXT_M = P5.
WA_FCAT3-DDICTXT = P6.
WA_FCAT3-REF_TABNAME = P7.
WA_FCAT3-HOTSPOT = P8.
WA_FCAT3-EMPHASIZE = P9.
WA_FCAT3-DO_SUM = P10.
APPEND WA_FCAT3 TO IT_FCAT3.
ENDFORM. " F_GET_FCAT3
*& Form F_BUILD_LAYOUT1
text
--> p1 text
<-- p2 text
FORM F_BUILD_LAYOUT1 .
WA_LAYOUT1-totals_text = 'TOTAL'.
wa_layout1-detail_popup = 'X'.
ENDFORM. " F_BUILD_LAYO
*& Form F_GET_EVENTS2
text
-->P_IT_EVENTS2 text
<--P_WA_EVENTS2 text
FORM F_GET_EVENTS2 USING VALUE(P_WA_EVENTS2) LIKE WA_EVENTS2
CHANGING P_IT_EVENTS2 LIKE IT_EVENTS2.
P_WA_EVENTS2-NAME = 'HTML_TOP_OF_PAGE'.
P_WA_EVENTS2-FORM = 'F_TOP_OF_PAGE3'.
APPEND P_WA_EVENTS2 TO P_IT_EVENTS2.
CLEAR P_WA_EVENTS2.
P_WA_EVENTS2-NAME = 'PF_STATUS'.
P_WA_EVENTS2-FORM = 'F_PF_STATUS'.
APPEND P_WA_EVENTS2 TO P_IT_EVENTS2.
CLEAR P_WA_EVENTS2.
P_WA_EVENTS2-NAME = 'USER_COMMAND'.
P_WA_EVENTS2-FORM = 'F_USER_COMMAND3'.
APPEND P_WA_EVENTS2 TO P_IT_EVENTS2.
CLEAR P_WA_EVENTS2.
p_wa_events2-name = 'HTML_END_OF_LIST'.
P_WA_EVENTS2-FORM = 'F_HTML_END_OF_LIST'.
APPEND P_WA_EVENTS2 TO P_IT_EVENTS2.
CLEAR p_wa_events2.
ENDFORM. " F_GET_EVENTS2
*& Form F_TOP_OF_PAGE3
text
--> p1 text
<-- p2 text
FORM F_TOP_OF_PAGE3 USING DOCUMENT TYPE REF TO cl_dd_document .
data : link_area type ref to cl_dd_area,
picture_area type ref to cl_dd_area.
CALL METHOD DOCUMENT->ADD_TEXT
EXPORTING
TEXT = 'ALV REPORT'
TEXT_TABLE =
FIX_LINES =
SAP_STYLE =
SAP_COLOR = cl_dd_area=>list_background_int
SAP_FONTSIZE = 'LARGE'
SAP_FONTSTYLE = 'TIMES'
SAP_EMPHASIS = 'STRONG'
STYLE_CLASS =
CHANGING
DOCUMENT =
CALL METHOD DOCUMENT->NEW_LINE.
CALL METHOD DOCUMENT->ADD_PICTURE
EXPORTING
PICTURE_ID = 'LOGO1'
WIDTH = '10%'
ENDFORM. " F_TOP_OF_PAGE3
*& Form F_GET_SORT
text
--> p1 text
<-- p2 text
FORM F_GET_SORT .
WA_SORT-FIELDNAME = 'NETWR'.
WA_SORT-SPOS = 4.
WA_SORT-UP = 'X'.
WA_SORT-SUBTOT = 'X'.
APPEND WA_SORT TO IT_SORT.
ENDFORM. " F_GET_SORT
*& Form F_PF_STATUS
text
--> p1 text
<-- p2 text
FORM F_PF_STATUS USING RS_EXTAB TYPE SLIS_T_EXTAB .
SET PF-STATUS 'ZHAIALV' EXCLUDING RS_EXTAB.
ENDFORM. " F_PF_STATUS
*& Form F_USER_COMMAND3
text
--> p1 text
<-- p2 text
FORM F_USER_COMMAND3 USING R_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
CASE R_UCOMM.
WHEN '&SALE'.
IF RS_SELFIELD-FIELDNAME = 'VBELN'.
SET parameter ID 'AUN' FIELD rs_selfield-value.
CALL TRANSACTION 'VA02' AND SKIP FIRST SCREEN.
ENDIF.
WHEN '&MAT'.
IF RS_SELFIELD-FIELDNAME = 'MATNR'.
SET PARAMETER ID 'MAT' FIELD RS_SELFIELD-VALUE.
CALL TRANSACTION 'MM02' AND SKIP FIRST SCREEN.
ENDIF.
ENDCASE.
ENDFORM. " F_USER_COMMAND3
*& Form F_HTML_END_OF_LIST
text
--> p1 text
<-- p2 text
FORM F_HTML_END_OF_LIST USING DOCUMENT TYPE REF TO CL_DD_DOCUMENT.
DATA : PAGE TYPE SDYDO_TEXT_ELEMENT.
MOVE SY-PAGNO TO PAGE.
CALL METHOD DOCUMENT->ADD_TEXT
EXPORTING
TEXT = PAGE
TEXT_TABLE =
FIX_LINES =
SAP_STYLE =
SAP_COLOR =
SAP_FONTSIZE =
SAP_FONTSTYLE =
SAP_EMPHASIS =
STYLE_CLASS =
CHANGING
DOCUMENT =
ENDFORM. " F_HTML_END_OF_LIS -
Needed example working code for FM"LAST_DAY_IN_PERIOD_GET"
needed example working code for FM"LAST_DAY_IN_PERIOD_GET"
Hi,
Go through this code
*& Report Z_FICO_REP_SHIPMENTS
REPORT z_fico_rep_shipments MESSAGE-ID sd.
TYPE-POOLS : slis.
TABLES : vbak,
kna1,
likp,
vbfa.
*>> DEFINE global Types
TYPES : BEGIN OF gt_vbak,
vbeln TYPE vbeln,
kunnr TYPE kunnr ,
spart TYPE spart,
audat TYPE audat,
END OF gt_vbak,
BEGIN OF gt_kna1,
kunnr TYPE kunnr,
name1 TYPE name1,
END OF gt_kna1,
BEGIN OF gt_likp,
vbeln TYPE vbeln,
wadat_ist TYPE wadat_ist,
END OF gt_likp,
BEGIN OF gt_vbfa,
vbelv TYPE vbelv,
erdat TYPE erdat,
rfwrt TYPE rfwrt,
END OF gt_vbfa,
BEGIN OF gt_final,
kunnr TYPE kunnr,
name1 TYPE name1,
cumon TYPE monat,
trcum TYPE rfwrt,
trcuy TYPE rfwrt,
perce TYPE rfwrt,
fiscy TYPE gjahr,
ftrcum TYPE rfwrt,
ftrcuy TYPE rfwrt,
fperce TYPE rfwrt,
END OF gt_final.
DATA : gwa_vbak TYPE gt_vbak,
gwa_kna1 TYPE gt_kna1,
gwa_likp TYPE gt_likp,
gwa_vbfa TYPE gt_vbfa,
gwa_final TYPE gt_final,
gwa_sort TYPE slis_sortinfo_alv,
gwa_layout TYPE slis_layout_alv. "ALV Layout
DATA : gi_vbak TYPE STANDARD TABLE OF gt_vbak,
gi_kna1 TYPE STANDARD TABLE OF gt_kna1,
gi_likp TYPE STANDARD TABLE OF gt_likp,
gi_vbfa TYPE STANDARD TABLE OF gt_vbfa,
gi_likp1 TYPE STANDARD TABLE OF gt_likp,
gi_vbfa1 TYPE STANDARD TABLE OF gt_vbfa,
gi_final TYPE STANDARD TABLE OF gt_final WITH HEADER LINE,
gi_final1 TYPE STANDARD TABLE OF gt_final WITH HEADER LINE.
*>> DEFINE INTERNAL TABLE
DATA : gi_fieldcat TYPE slis_t_fieldcat_alv, "ALV Fieldcatalog
gi_events TYPE slis_t_event, "ALV EventS
gi_sort TYPE slis_t_sortinfo_alv ,
gi_top_of_page TYPE slis_t_listheader. "ALV LIST HEADER
DATA : gv_month(2) TYPE n.
*>> GLOBAL CONSTANTS
CONSTANTS: gc_day(2) TYPE n VALUE 01,
gc_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE',
gc_x TYPE c VALUE 'X'.
SELECTION-SCREEN:BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: p_monat TYPE monat OBLIGATORY,
p_gjahr TYPE gjahr OBLIGATORY.
SELECT-OPTIONS : s_bukrs FOR vbak-bukrs_vf OBLIGATORY,
s_vkorg FOR vbak-vkorg,
s_spart FOR vbak-spart OBLIGATORY,
s_audat FOR vbak-audat NO-DISPLAY.
SELECTION-SCREEN:END OF BLOCK b1.
SELECTION-SCREEN:BEGIN OF BLOCK b2 WITH FRAME TITLE text-001.
PARAMETERS: p_det RADIOBUTTON GROUP grp DEFAULT 'X' ,
p_sum RADIOBUTTON GROUP grp.
SELECTION-SCREEN:END OF BLOCK b2.
START-OF-SELECTION.
*>> Take Period And year and find starting and ending date
PERFORM fiscal_date.
PERFORM collect_data.
PERFORM manipulation_collect_data.
END-OF-SELECTION.
*>> Sort
PERFORM gi_sort_table.
*>> MEARGE FIELD CATALOG USING INTERNAL TABLE
PERFORM mearge_field_catalog.
*>> SET EVENTS
PERFORM set_event.
*>> FOR ALV HEADER
PERFORM n_top_of_page USING gi_top_of_page[].
*>>For ALV Layout
PERFORM build_layout.
*>>For output display
PERFORM alv_grid_display.
*& Form fiscal_date
FORM fiscal_date.
TYPES : BEGIN OF lt_fisc,
bukrs TYPE bukrs,
periv TYPE periv,
bumon TYPE bumon,
butag TYPE butag,
END OF lt_fisc,
BEGIN OF lt_t009b,
periv TYPE periv,
bumon TYPE bumon,
butag TYPE butag,
poper TYPE poper,
END OF lt_t009b.
DATA : lwa_fisc TYPE lt_fisc,
lwa_t009b TYPE lt_t009b.
DATA : li_fisc TYPE STANDARD TABLE OF lt_fisc,
li_t009b TYPE STANDARD TABLE OF lt_t009b.
DATA : lv_date(2) TYPE c,
lv_mont(2) TYPE c,
lv_year(4) TYPE c.
SELECT bukrs periv FROM t001
INTO TABLE li_fisc
WHERE bukrs IN s_bukrs.
IF sy-subrc EQ 0.
SELECT * FROM t009b
INTO CORRESPONDING FIELDS OF TABLE li_t009b
FOR ALL ENTRIES IN li_fisc
WHERE periv EQ li_fisc-periv .
IF sy-subrc NE 0.
CLEAR li_t009b.
ENDIF.
ELSE.
CLEAR li_fisc.
ENDIF.
SORT li_t009b BY periv poper.
LOOP AT li_fisc INTO lwa_fisc.
READ TABLE li_t009b INTO lwa_t009b WITH KEY periv = lwa_fisc-periv
poper = '001'
BINARY SEARCH.
IF sy-subrc = 0.
s_audat-option = 'EQ'.
s_audat-sign = 'I'.
CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET'
EXPORTING
i_gjahr = p_gjahr
i_periv = lwa_t009b-periv
i_poper = lwa_t009b-poper
IMPORTING
e_date = s_audat-low.
ENDIF.
CLEAR lwa_t009b.
READ TABLE li_t009b INTO lwa_t009b WITH KEY periv = lwa_fisc-periv
poper = '012'
BINARY SEARCH.
IF sy-subrc = 0.
CALL FUNCTION 'LAST_DAY_IN_PERIOD_GET'
EXPORTING
i_gjahr = p_gjahr
i_periv = lwa_t009b-periv
i_poper = lwa_t009b-poper
IMPORTING
e_date = s_audat-high.
ENDIF.
CLEAR lwa_t009b.
READ TABLE li_t009b INTO lwa_t009b WITH KEY periv = lwa_fisc-periv
poper = p_monat
BINARY SEARCH.
IF sy-subrc = 0.
lv_date = s_audat-high+6(2).
lv_mont = s_audat-high+4(2).
lv_year = s_audat-high(4).
lv_mont = lwa_t009b-bumon.
lv_date = lwa_t009b-butag.
CONCATENATE lv_year lv_mont lv_date INTO s_audat-high.
APPEND s_audat.
CLEAR: lwa_fisc,lwa_t009b,lv_date,lv_mont,lv_year.
ENDIF.
ENDLOOP.
DELETE ADJACENT DUPLICATES FROM s_audat.
ENDFORM. "fiscal_date
*& Form collect_data
FORM collect_data .
SELECT vbeln kunnr spart audat
FROM vbak
INTO TABLE gi_vbak
WHERE audat GE s_audat-low AND
audat LT s_audat-high AND
vkorg IN s_vkorg AND
spart IN s_spart AND
bukrs_vf IN s_bukrs.
IF sy-subrc EQ 0.
SELECT kunnr name1
FROM kna1
INTO TABLE gi_kna1
FOR ALL ENTRIES IN gi_vbak
WHERE kunnr EQ gi_vbak-kunnr.
IF sy-subrc NE 0.
CLEAR gi_kna1.
ENDIF.
SELECT vbeln wadat_ist
FROM likp
INTO TABLE gi_likp
WHERE wadat_ist GE s_audat-low AND
wadat_ist LT s_audat-high .
IF sy-subrc EQ 0.
SELECT vbelv erdat rfwrt
FROM vbfa
INTO TABLE gi_vbfa
FOR ALL ENTRIES IN gi_likp
WHERE vbeln = gi_likp-vbeln AND
( vbtyp_n = 'M' OR
vbtyp_n = 'H' ) .
IF sy-subrc NE 0.
CLEAR gi_vbfa.
ENDIF.
ELSE.
CLEAR gi_likp.
ENDIF.
PERFORM change_date.
SELECT vbeln wadat_ist
FROM likp
INTO TABLE gi_likp1
WHERE wadat_ist GE s_audat-low AND
wadat_ist LT s_audat-high .
IF sy-subrc EQ 0.
SELECT vbelv erdat rfwrt
FROM vbfa
INTO TABLE gi_vbfa1
FOR ALL ENTRIES IN gi_likp1
WHERE vbeln = gi_likp1-vbeln AND
( vbtyp_n = 'M' OR
vbtyp_n = 'H' ) .
IF sy-subrc NE 0.
CLEAR gi_vbfa.
ENDIF.
ELSE.
CLEAR gi_likp.
ENDIF.
ELSE.
MESSAGE i261.
LEAVE SCREEN.
ENDIF.
ENDFORM. "collect_data
*& Form Manipulation_collect_data
FORM manipulation_collect_data.
SORT gi_vbak BY vbeln.
SORT gi_kna1 BY kunnr.
LOOP AT gi_vbak INTO gwa_vbak.
MOVE-CORRESPONDING gwa_vbak TO gwa_final.
READ TABLE gi_kna1 INTO gwa_kna1 WITH KEY kunnr = gwa_vbak-kunnr
BINARY SEARCH.
IF sy-subrc EQ 0.
gwa_final-name1 = gwa_kna1-name1.
ENDIF.
ENDLOOP.
* v_month = gwa_vbak-audat+4(2).
* gwa_final-cumon = p_monat.
* gwa_final-fiscy = p_gjahr.
* IF v_month = p_monat.
* CLEAR wa_ckmlhd.
* READ TABLE i_ckmlhd INTO wa_ckmlhd WITH KEY matnr = wa_vbap-matnr
* bwkey = wa_vbap-werks
* BINARY SEARCH.
* IF sy-subrc EQ 0.
* CLEAR i_nckmlcr.
* READ TABLE i_nckmlcr INTO wa_nckmlcr
* WITH KEY kalnr = wa_ckmlhd-kalnr
* BINARY SEARCH.
* IF sy-subrc EQ 0.
* gwa_final-peinh = wa_nckmlcr-peinh.
* gwa_final-kzwi6 = wa_vbap-kzwi6 - wa_vbap-kzwi5.
* gwa_final-kzwi5 = wa_vbap-kzwi5.
* gwa_final-totre = gwa_final-kzwi6 + gwa_final-kzwi5.
* gwa_final-actco = ( wa_nckmlcr-pvprs / wa_nckmlcr-peinh ) *
* wa_vbap-kwmeng.
* gwa_final-profit = gwa_final-totre - gwa_final-actco.
* gwa_final-prows = ( gwa_final-profit - gwa_final-kzwi6 ) *
*100.
* ENDIF.
* ENDIF.
* ELSE.
* CLEAR wa_ckmlhd.
* READ TABLE i_ckmlhd INTO wa_ckmlhd WITH KEY matnr = wa_vbap-matnr
* bwkey = wa_vbap-werks
* BINARY SEARCH.
* IF sy-subrc EQ 0.
* READ TABLE i_ckmlcr INTO wa_ckmlcr
* WITH KEY kalnr = wa_ckmlhd-kalnr
* BINARY SEARCH.
* IF sy-subrc NE 0.
* CLEAR wa_ckmlcr.
* ENDIF.
* CLEAR wa_nckmlcr.
* READ TABLE i_nckmlcr INTO wa_nckmlcr
* WITH KEY kalnr = wa_ckmlhd-kalnr
* BINARY SEARCH.
* IF sy-subrc EQ 0.
* gwa_final-fkzwi6 = wa_vbap-kzwi6 - wa_vbap-kzwi5.
* gwa_final-fkzwi5 = wa_vbap-kzwi5.
* gwa_final-ftotre = gwa_final-fkzwi6 + gwa_final-fkzwi5.
* gwa_final-factco = ( ( wa_nckmlcr-pvprs / wa_ckmlcr-peinh )
* * wa_vbap-kwmeng ) / wa_nckmlcr-count.
* gwa_final-fprofit = gwa_final-ftotre - gwa_final-factco.
* gwa_final-fprows = ( gwa_final-fprofit - gwa_final-kzwi6 ) *
*100
* ENDIF.
* ENDIF.
* ENDIF.
* APPEND gwa_final TO gi_final.
* CLEAR : gwa_final,wa_nckmlcr,wa_ckmlcr,wa_ckmlhd,
* gwa_vbak,wa_vbap,gwa_kna1.
* ENDLOOP.
* gwa_final-matnr = space.gwa_final-vbeln = space.
* MODIFY gi_final FROM gwa_final TRANSPORTING vbeln matnr
* WHERE matnr NE space.
* SORT gi_final BY kunnr vbeln matnr.
* IF p_sum = gc_x.
* LOOP AT gi_final INTO gwa_final.
* COLLECT gwa_final INTO gi_final1.
* ENDLOOP.
* CLEAR gwa_final.REFRESH gi_final.
* gi_final[] = gi_final1[].
* ENDIF.
ENDFORM. "manipulation_collect_data
*& Form change_date
FORM change_date.
DATA : lv_date(2) TYPE c,
lv_mont(2) TYPE c,
lv_year(4) TYPE n.
lv_date = s_audat-low+6(2).
lv_mont = s_audat-low+4(2).
lv_year = s_audat-low(4).
lv_year = lv_year - 1.
CONCATENATE lv_year lv_mont lv_date INTO s_audat-low.
CLEAR : lv_date ,lv_mont,lv_year.
lv_date = s_audat-high+6(2).
lv_mont = s_audat-high+4(2).
lv_year = s_audat-high(4).
lv_year = lv_year - 1.
CONCATENATE lv_year lv_mont lv_date INTO s_audat-high.
CLEAR : lv_date ,lv_mont,lv_year.
ENDFORM. " change_date
*& Form gi_sort_table
FORM gi_sort_table.
IF p_det = gc_x.
gwa_sort-spos = '1'.
gwa_sort-fieldname = 'KUNNR'.
gwa_sort-tabname = 'gi_final'.
gwa_sort-up = gc_x.
gwa_sort-subtot = gc_x.
APPEND gwa_sort TO gi_sort.
CLEAR gwa_sort.
gwa_sort-spos = '2'.
gwa_sort-fieldname = 'NAME1'.
gwa_sort-tabname = 'gi_final'.
gwa_sort-up = gc_x.
APPEND gwa_sort TO gi_sort.
* ELSE.
* gwa_sort-spos = '1'.
* gwa_sort-fieldname = 'KUNNR'.
* gwa_sort-tabname = 'gi_final'.
* gwa_sort-up = gc_x.
* APPEND gwa_sort TO gi_sort.
* CLEAR gwa_sort.
* gwa_sort-spos = '2'.
* gwa_sort-fieldname = 'NAME1'.
* gwa_sort-tabname = 'gi_final'.
* gwa_sort-up = gc_x.
* gwa_sort-group = gc_x.
* gwa_sort-subtot = gc_x.
* APPEND gwa_sort TO gi_sort.
ENDIF.
ENDFORM. "gi_sort_table
*& Form mearge_field_catalog
FORM mearge_field_catalog .
*>> LOCAL WORK AREA FOR FIELDCATALOG
DATA : lwa_fieldcata TYPE slis_fieldcat_alv.
CLEAR lwa_fieldcata.
lwa_fieldcata-fieldname = 'KUNNR'.
* lwa_fieldcata-col_pos = 1.
lwa_fieldcata-key = 'X'.
lwa_fieldcata-key_sel = 'X'.
lwa_fieldcata-ref_tabname = 'KNA1'.
lwa_fieldcata-seltext_l = 'Customer No.'.
APPEND lwa_fieldcata TO gi_fieldcat.
CLEAR lwa_fieldcata.
lwa_fieldcata-fieldname = 'NAME1'.
* lwa_fieldcata-col_pos = 2.
lwa_fieldcata-ref_tabname = 'KNA1'.
lwa_fieldcata-seltext_l = 'Customer Name'.
APPEND lwa_fieldcata TO gi_fieldcat.
IF p_det = gc_x.
CLEAR lwa_fieldcata.
lwa_fieldcata-fieldname = 'VBELN'.
* lwa_fieldcata-col_pos = 3.
lwa_fieldcata-ref_tabname = 'VBAK'.
lwa_fieldcata-seltext_l = 'Sales Order Number'.
APPEND lwa_fieldcata TO gi_fieldcat.
CLEAR lwa_fieldcata.
lwa_fieldcata-fieldname = 'MATNR'.
* lwa_fieldcata-col_pos = 4.
lwa_fieldcata-ref_tabname = 'VBAK'.
lwa_fieldcata-seltext_l = 'Material No.'.
APPEND lwa_fieldcata TO gi_fieldcat.
ENDIF.
CLEAR lwa_fieldcata.
lwa_fieldcata-fieldname = 'KWMENG'.
lwa_fieldcata-col_pos = 5.
lwa_fieldcata-ref_tabname = 'VBAP'.
lwa_fieldcata-do_sum = 'X'.
lwa_fieldcata-seltext_l = 'Order Quantity'.
APPEND lwa_fieldcata TO gi_fieldcat.
CLEAR lwa_fieldcata.
lwa_fieldcata-fieldname = 'PEINH'.
lwa_fieldcata-col_pos = 6.
lwa_fieldcata-ref_tabname = 'CKMLCR'.
lwa_fieldcata-text_fieldname = 'PEINH'.
APPEND lwa_fieldcata TO gi_fieldcat.
CLEAR lwa_fieldcata.
lwa_fieldcata-fieldname = 'CUMON'.
lwa_fieldcata-col_pos = 7.
lwa_fieldcata-ref_tabname = 'VBKPF'.
lwa_fieldcata-seltext_l = 'Month'.
lwa_fieldcata-no_sum = gc_x.
APPEND lwa_fieldcata TO gi_fieldcat.
CLEAR lwa_fieldcata.
lwa_fieldcata-fieldname = 'KZWI6'.
lwa_fieldcata-col_pos = 8.
lwa_fieldcata-ref_tabname = 'VBAK'.
lwa_fieldcata-seltext_l = 'Costed Sales'.
APPEND lwa_fieldcata TO gi_fieldcat.
CLEAR lwa_fieldcata.
lwa_fieldcata-fieldname = 'KZWI5'.
lwa_fieldcata-col_pos = 9.
lwa_fieldcata-ref_tabname = 'VBAK'.
lwa_fieldcata-seltext_l = 'Surcharges'.
APPEND lwa_fieldcata TO gi_fieldcat.
CLEAR lwa_fieldcata.
lwa_fieldcata-fieldname = 'TOTRE'.
lwa_fieldcata-col_pos = 10.
lwa_fieldcata-ref_tabname = 'VBAK'.
lwa_fieldcata-seltext_l = 'Total Revenues'.
APPEND lwa_fieldcata TO gi_fieldcat.
CLEAR lwa_fieldcata.
lwa_fieldcata-fieldname = 'ACTCO'.
lwa_fieldcata-col_pos = 11.
lwa_fieldcata-ref_tabname = 'VBAP'.
lwa_fieldcata-seltext_l = 'Actual Cost for Period'.
APPEND lwa_fieldcata TO gi_fieldcat.
CLEAR lwa_fieldcata.
lwa_fieldcata-fieldname = 'PROFIT'.
lwa_fieldcata-col_pos = 12.
lwa_fieldcata-ref_tabname = 'VBAK'.
lwa_fieldcata-seltext_l = 'Profit'.
APPEND lwa_fieldcata TO gi_fieldcat.
CLEAR lwa_fieldcata.
lwa_fieldcata-fieldname = 'PROWS'.
lwa_fieldcata-col_pos = 13.
lwa_fieldcata-ref_tabname = 'VBAK'.
lwa_fieldcata-seltext_l = 'Profit % w/surcharge'.
APPEND lwa_fieldcata TO gi_fieldcat.
CLEAR lwa_fieldcata.
lwa_fieldcata-fieldname = 'FISCY'.
lwa_fieldcata-col_pos = 14.
* lwa_fieldcata-ref_tabname = 'VBAK'.
lwa_fieldcata-seltext_l = 'Fiscal Year'.
APPEND lwa_fieldcata TO gi_fieldcat.
CLEAR lwa_fieldcata.
lwa_fieldcata-fieldname = 'FKZWI6'.
lwa_fieldcata-col_pos = 15.
lwa_fieldcata-ref_tabname = 'VBAK'.
lwa_fieldcata-seltext_l = 'Costed Sales'.
APPEND lwa_fieldcata TO gi_fieldcat.
CLEAR lwa_fieldcata.
lwa_fieldcata-fieldname = 'FKZWI5'.
lwa_fieldcata-col_pos = 16.
lwa_fieldcata-ref_tabname = 'VBAK'.
lwa_fieldcata-seltext_l = 'Surcharges'.
APPEND lwa_fieldcata TO gi_fieldcat.
CLEAR lwa_fieldcata.
lwa_fieldcata-fieldname = 'FTOTRE'.
lwa_fieldcata-col_pos = 17.
lwa_fieldcata-ref_tabname = 'VBAK'.
lwa_fieldcata-seltext_l = 'Total Revenues'.
APPEND lwa_fieldcata TO gi_fieldcat.
CLEAR lwa_fieldcata.
lwa_fieldcata-fieldname = 'FACTCO'.
lwa_fieldcata-col_pos = 18.
lwa_fieldcata-ref_tabname = 'VBAP'.
lwa_fieldcata-seltext_l = 'Actual Cost for Period'.
APPEND lwa_fieldcata TO gi_fieldcat.
CLEAR lwa_fieldcata.
lwa_fieldcata-fieldname = 'FPROFIT'.
lwa_fieldcata-col_pos = 19.
lwa_fieldcata-ref_tabname = 'VBAK'.
lwa_fieldcata-seltext_l = 'Profit'.
APPEND lwa_fieldcata TO gi_fieldcat.
CLEAR lwa_fieldcata.
lwa_fieldcata-fieldname = 'FPROWS'.
lwa_fieldcata-col_pos = 20.
lwa_fieldcata-ref_tabname = 'VBAK'.
lwa_fieldcata-seltext_l = 'Profit % w/surcharge'.
APPEND lwa_fieldcata TO gi_fieldcat.
ENDFORM. " mearge_field_catalog
*& Form set_event
FORM set_event .
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 1
IMPORTING
et_events = gi_events.
SORT gi_events BY name.
*-- To read Top of Page event
PERFORM read_events USING slis_ev_top_of_page gc_top_of_page.
ENDFORM. " set_event
*& Form top_of_page
FORM n_top_of_page USING lp_top_of_page TYPE slis_t_listheader.
DATA: lwa_listhead TYPE slis_listheader,
lv_ccode TYPE string,
lv_sales TYPE string,
lv_divis TYPE string.
CONCATENATE 'From : ' s_bukrs-low ' To: ' s_bukrs-high INTO lv_ccode.
CONCATENATE 'From: ' s_vkorg-low ' To: ' s_vkorg-high INTO lv_sales.
CONCATENATE 'From: ' s_spart-low ' To: ' s_spart-high INTO lv_divis.
CLEAR lwa_listhead.
lwa_listhead-typ = 'H'.
lwa_listhead-info = text-003.
APPEND lwa_listhead TO lp_top_of_page.
CLEAR lwa_listhead.
lwa_listhead-typ = 'S'.
lwa_listhead-key = 'Month'.
lwa_listhead-info = p_monat.
APPEND lwa_listhead TO lp_top_of_page.
CLEAR lwa_listhead.
lwa_listhead-typ = 'S'.
lwa_listhead-key = 'Year'.
lwa_listhead-info = p_gjahr.
APPEND lwa_listhead TO lp_top_of_page.
CLEAR lwa_listhead.
lwa_listhead-typ = 'S'.
lwa_listhead-key = 'Company Code'.
lwa_listhead-info = lv_ccode.
APPEND lwa_listhead TO lp_top_of_page.
CLEAR lwa_listhead.
lwa_listhead-typ = 'S'.
lwa_listhead-key = 'Sales Org'.
lwa_listhead-info = lv_sales.
APPEND lwa_listhead TO lp_top_of_page.
CLEAR lwa_listhead.
lwa_listhead-typ = 'S'.
lwa_listhead-key = 'Division'.
lwa_listhead-info = lv_divis.
APPEND lwa_listhead TO lp_top_of_page.
IF p_det = gc_x.
CLEAR lwa_listhead.
lwa_listhead-typ = 'A'.
lwa_listhead-info = text-004.
APPEND lwa_listhead TO lp_top_of_page.
ELSE.
CLEAR lwa_listhead.
lwa_listhead-typ = 'A'.
lwa_listhead-info = text-005.
APPEND lwa_listhead TO lp_top_of_page.
ENDIF.
ENDFORM. "top_of_page
*& Form TOP_OF_PAGE
FORM top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
i_logo = 'ENJOYSAP_LOGO'
it_list_commentary = gi_top_of_page.
ENDFORM. "TOP_OF_PAGE
*& Form build_layout
FORM build_layout .
gwa_layout-no_input = gc_x.
gwa_layout-colwidth_optimize = gc_x.
gwa_layout-zebra = gc_x.
ENDFORM. "build_layout
*& Form alv_grid_display
FORM alv_grid_display .
* Function module to display ALV report
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
is_layout = gwa_layout
it_fieldcat = gi_fieldcat[]
it_sort = gi_sort
i_save = 'A'
it_events = gi_events[]
TABLES
t_outtab = gi_final
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " alv_grid_display
*& Form read_events
FORM read_events USING pr_events TYPE slis_alv_event-name
pr_eventname TYPE slis_formname.
DATA: lwa_event TYPE slis_alv_event.
CLEAR lwa_event.
READ TABLE gi_events INTO lwa_event
WITH KEY name = pr_events BINARY SEARCH.
IF sy-subrc = 0.
MOVE pr_eventname TO lwa_event-form.
MODIFY gi_events FROM lwa_event
TRANSPORTING form
WHERE name = pr_events.
ENDIF.
ENDFORM. " read_events
Regards
Sandipan -
Need example BDC reports in HR ABAP
hi all,
I need example BDC reports in HR-ABAP .both download and upload reports..
I was tried but I'm not getting it , so please, any one send sample reports .
Rewarded for helpful answers.Hi,
Check these links
BDC for infotype 0008
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/erphcm/employee%2bphoto%2bupload
Search using "bdc" in this forum you will get lot of examples -
Need example on Java Sections.....
Hi
I need example senario on java sections and how we use both java sections and user defined funtions... can u give me any blog on that..... and i need information about packages used in java for sapxi.... and which class is used for what purpose.... please help me
Thanks & Regards
Ravi shankar BHi,
Refer this blog:
/people/sap.user72/blog/2005/10/01/xi-new-features-in-sp14
and the thread:
Re: Sequence Number in XI Mapping
Regards
suraj -
Need Example on Integartion of BEx application into EP
Hi
I need example on Integration of BEx application into EP and Display Data on EP from BW without using BEx web application.
Best Regards
Ravi ShankarHi Ravi,
have a look into the <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/88/3c1640d4642402e10000000a1550b0/frameset.htm">SAP Library</a>. There you will find descriptions of various options how to display BI content in the SAP NetWeaver Portal.
Best regards,
Martin -
Hi, I need example read whole DataBase
Hi
I have component table and field type checkbox.
I need example. Click in the button and read the whole Database
in the VWP
Thank'sI have code, buts not read last record
sociosDataProvider1.cursorFirst();
while(sociosDataProvider1.cursorNext())
}; -
I need example for VARIABLES with Customer Exit.
hi every body i need example for Variable for Customer Exit.
Hi,
You can define 'Formula' variables in your customer exit..for example..
you need to calculate no of machine running hours per month, in order to
caculate the machine total utilization time..in this context.. you need to know
how may hours are there in an month by month..
you can define a variable and write the code in the customer exit for deriving the total no. of hours available for that month and get that value into a variable for further calution like deducting the down time and set up time so on..in your
calculated KF..
Hope this helps..
Assign points if useful..
Cheers,
Pattan. -
I need a nice menu on a web page
I have 5 links on my page. I need the java/class files to make a pretty menu, without images. Can be singles like-bottons java based menu. Say me where can dowonload. I visit javaboutique.com, but only found complex examples. My email: [email protected]
Try http://www.photo.net (or a million other websites)- then look in your browser cache (e.g., Windows / Temporary Internet files for Windows Me - in general, just do a search for newly created files) for junk like menu.js
You might also look at http://www.jspsmart.com/scripts/pub/tpl/ShowTplADV_01.asp?P=330&L=EN
JavaScript (versus Java) is the best way to go; see:
http://www.pageresource.com/jscript/index4.htm -
I would like to create my own tab menu images using
Fireworks. Does anyone know of a good tutorial which can show me
how? I have FF but cant get it right.
I want images similar to these in this link -
http://www.dynamicdrive.com/style/csslibrary/item/plastic-tabs-menu/
Cheers
BillyI believe you will need css knowledge regardless of which
method you use.
The spry widget will get automatically inserted onto your
page, but you will
need to edit the associated css file to customise the way it
looks :-)
Link showing an overview of customising the Spry Menu bar
widget\
http://labs.adobe.com/technologies/spry/preview/articles/menu_bar/index.html
Nadia
Adobe® Community Expert : Dreamweaver
CSS Templates |Tutorials |SEO Articles
http://www.DreamweaverResources.com
~ Customisation Service Available ~
http://www.csstemplates.com.au
~ Forum Posting Guidelines ~
http://www.adobe.com/support/forums/guidelines.html
CSS Tutorials for Dreamweaver:
http://www.adobe.com/devnet/dreamweaver/css.html
"~Billy~" <[email protected]> wrote in
message
news:f26u1s$jvc$[email protected]..
> Hi Nadia
>
> I the Spry Tabbed Panel menus you linked to are exactly
the sort of thing
> I am
> looking for. I have also come across a css tab menu
which i have placed an
> example at -
http://www.tomkilbourn.com/slidingdoors/home.html
>
> Which method would you recommend ? Does DW Spry menu
require more advanced
> knowledge than the css menu?
> -
Need example vi using AT commands for dialing the modem at the remote end
Can any one give example vi for dialing up a modem and sending data to remote end
Hi sindhu6,
Presuming that you are connected to your modem via a serial connection:
I did find a forum related to your enquiry: http://forums.ni.com/t5/LabVIEW/AT-commands-in-labview/td-p/1213335
And I did find an example from ni.com: http://zone.ni.com/devzone/cda/epd/p/id/2577
Basically, what you need to do is to find out what are the AT commands used for your modem and send the command over using VISA related functions (e.g. VISA Read VI). You can send the command in a sequantial method. You can do this by using the method found in the first link. The best would be that you can create a state machine where by each case/state will consists of commands that you need to run in a sequence (let's say a sequence of AT commands for sending a message via TCP/IP communication).
You can also use a sequence structure but I would not suggest that since you cannot stop the sequence half way and if your command is very long, this may look pretty messy for your code.
The main question is:
What is the version of your LabVIEW?
What is the modem that you are using and how is your hardware setup is going to be (e.g. how did you communicate with your modem)?
Thank you
Warmest regards,
Lennard.C
Learning new things everyday... -
Need example with write to DATA log file programmatically?
Hi all,
I would like to request for an example of writing a datalog (*.DAT) file which could do this.
Datalog file.
NAME: AGE: SEX: (header)
john 16 M (data)
marie 55 F
Dolah 34 M
The program can also let me to add in new data and then store in the same file.dat. The data (hopefully) can be written to the bottom of the last saved entry of data. (eg. after the row Dolah).
I need to do this so that I can open and read back the datalog file and use the data for other purpose.
Please help,
juniYou've got some examples in Fundamentals>File Input and Output but one of the easiest things to do is to modify Write Strings to Spreadsheet File.vi to write strings as detailed at the bottom of the diagram and then save it to a different place and with a different name.
Attachments:
Spreadsheet_File_Write.jpg 17 KB -
Need help - Print Menue in Acrobat Pro and Standard
Hello,
at first, i have to apologize for my bad englisch because I'm german.
I downloaded a Trial of Acrobat pro and there I hava an extended Print menue where I can choose individual Color Profiles.
There is an image attached.
But I don't really need the Acobat pro Features, because I need Acrobat only for Color Printing on my Printer. And it ist expensive.
So my Question to you is: Is this extended Print menue also in Acobat 9 Standard?
There is no Trial, so that I hope, that someone can help me.
Can I also set this settings in Acrobat 9 Standard?
Thank you very much for helping me with my buying decision.
Greetings from Munich
SebastianThe Advanced Print menu in 9 Standard does not have all of the options that are in your screen shot.
Checked with a coworker who has 9 Standard, and the options are much more limited. (I have 8 Pro).
Bad news is you would need 9 Pro.
Saw this the other day; sorry for the slow answer, good luck. -
I'm in need of a menu bar new mail notifier...
Is there anything out there like GMail Notifier that will put an icon in the menu bar telling me that I have new mail? I need to have other windows covering the screen, can't always hear new mail alerts, and don't want to have my dock showing all the time. Just a little status icon in the menu bar showing maybe Online status, transferring, and unread messages. Anybody know of such a thing?
Thanks
AlBook 1.67 Mac OS X (10.4.7)There are a few:
Mail Status Control
PocketLight
NotifX
iAlert
You will find these and more at www.versiontracker.com or www.macupdate.com.
Maybe you are looking for
-
"Portable" way to do message passing between threads?
(I posted this on the Apple Developer Forums already, but since that forum is only accessible to registered and paid iPhone developers, I thought it would be nice to put it here as well so as to get some more potential eyeballs on it. I apologize if
-
Hi All, Here is the scenario. Trading Partner (TP) A is sending a RosettaNet business message (PIP3A2) to TP B. When the weblogic Integration server for TP B receives this message, I get the following error message, ####<Dec 4, 2001 4:00:33 PM PST> <
-
Importing multiple PDF pages into text boxes
Hi, Im wanting to import a pdf doc of adverts (roughly 300 pages) into indesign into a text box to allow me to treat the individual pages as text items to allow me to space them and fit them to the pages accordingly. I can add single pages into a tex
-
X3500 QoS settings -- do they do anything?
Hi, I've had an X3500 for a few weeks, and while it's functioned reasonably well I've been generally disappointed at the quality of the firmware (v1.0.0 build 18). One problem I'm having is with the QoS settings: whenever I change something and clic
-
Removing 3D Dock Reflection and/or Changing 2D Dock Background Color
Has anyone figured out a way to do either (or both) of the following: -remove reflections from the 3D dock -adjust the dark gray color of the 2D dock ? This is the last step I need to make the Dock visually tolerable for me. It would seem that both a