Louis's Blog Space
ҽ
л
ҵBlog
¹鵵...
·...
ͳ...
վ...
Դ
===========================================================
Memory ID
===========================================================

EXPORT 1 TO MEMORY ID ZP10PSEX011TEST.
IMPORT FLAG FROM MEMORY ID ZP10PSEX011TEST.

FLAGûбΪ1﷨ûб˵ӦdzɹģΪʲôûгɹأ

ԭǣMEMORY IDдӦDzͬģ1FLAGȻͬûгɹյֵдP1 = 1IJʽ򲻻ƣ磺1EXPORT FLAGTO MEMORY ID ZP10PSEX011TEST.
IMPORT FLAG FROM MEMORY ID ZP10PSEX011TEST.

2EXPORT P1 = 1 TO MEMORY ID ZP10PSEX011TEST.
IMPORT P1 = FLAG FROM MEMORY ID ZP10PSEX011TEST.


zclouis :2010.05.07 23:59 ::: ( SAP ) ::Ķ:(227) :: (0) :: (0)
===========================================================
SAPıؿļ(ת)
===========================================================

SAP: ABAP will live on, but new skill focus required

1. Some developers have remarked that it seems SAP is moving away from classic ABAP development and going toward true object orientation. What does the future hold for ABAP versus OO?

Mario Herger: First off, the majority of SAP code around is still ABAP. However, what were seeing today is a need to expand beyond pure ABAP, which is why SAP opened up to Java a few years ago. The Java world is very different from what we used to have and offers many advantages. We have our own J2EE engine in place and were working with Eclipse to facilitate OO development in SAP. Meanwhile, ABAP is more than 10 years old and has the benefit of being a proven technology.

For those concerned about ABAPs future, I want to make it very clear that ABAP will live on. The majority of current SAP development going on is still done in ABAP, and there are tremendous investments made in ABAP.

So rather than viewing an either/or proposition, think of it as merely opening up for other technologies. What we see today is something of an equalization process where ABAP and Java are used in a complementary way. You can use either approach for pretty much anything, and SAP provides the platform and the tools to make it come together seamlessly.

2. What new development tools are on the horizon?Herger: Were going into an era of model-driven development. Increasingly, the question is: Are we still going to hand-code everything, or can we automatically generate most of the code? In other words, the focus is going away from directly coding every tedious call by hand and instead focusing on the pieces that are really interesting.

With that in mind, I see two big things in terms of development tools that should be of particular interest. First, there is a new, browser-based tool called Visual Composer. This product allows for building models in a graphical way by drag-and-drop, drawing lines and so forth. You can build from an analytical dashboard with a BW connection, creating complete transactions right there on screen.

I mentioned Eclipse earlier; its a development environment for Java that is very similar to the ABAP workbench. On top of that, we have the composite application framework, a modeling tool that supports building applications in that it generates most of the code while letting you focus on the last 10% of fine-tuning.

3. Speaking of Eclipse, will ABAP development be possible in Eclipse?Herger: At the moment, I dont see that happening. The ABAP workbench is very strong and there isnt much reason to move it to Eclipse. Bear in mind, the ABAP Workbench has the advantage of having had over a decade to evolve.

The only scenario where I see ABAP in Eclipse is as a result of an increasingly model-driven development world. ABAP code may be generated out of other tools, but I believe the ABAP Workbench will stay where it is for the foreseeable future.

4. Remote function calls (RFC)/BAPI support seems to be dwindling. Is SAP moving away from providing business objects with supporting BAPIs?Herger: SAP will, of course, continue to support existing BAPIs, though we actively try to cut bloated BAPIs to the right size whenever possible and make them ESA compliant. When youre talking about developing new BAPIs and RFCs, the focus today is on making sure they are ESA compliant.

5. Will SAP Java Connector (JCo) become fully compliant with the J2EE Connector Architecture standards?Herger: Normally, SAP tends to offer a richer set of functionality than what is in the standard. But we are aware that JCo isnt J2EE Connector Architecture standard compliant today. SAP is working on JCo to make it more compliant, but I cant make any guarantees as to the extent, nor can I give you a timeline for when -- or if - it will become 100% JCA compliant.

6. What skills should ABAP developers focus on to stay competitive?Herger: Look beyond the home system and focus on the technologies that allow you to talk to other systems and applications. That means mastering SAP Exchange Infrastructure (XI,) getting practical experience with Web Services and staying on top of integration technologies like Web Dynpro.

The applications well see in the future are primarily composite applications. Your system will talk to other systems; your data will come from somewhere else. To stay competitive, you need to learn how to seamlessly integrate with others. That doesnt mean just being able to tap someone elses data; it also means opening up your own system to the other party as well.


zclouis :2009.01.04 15:09 ::: ( SAPռ ) ::Ķ:(3276) :: (0) :: (0)
===========================================================
Ұæ3͵4ʵֲ
===========================================================

1. User create Quotation for a FG using MTO scenario, the dependent requirement for all component in the FG's BOM is also MTO using the quotation's number as account assignment. [standard function]

2. User create Sales Order with reference to the Quotation, which originally bring the Quotation's FG to the SO, which is still using the quotation's number as account assignment. [standard function]


3 (key point). Then user can change the copied sales order item to another FG (which share most of the same BOM as the FG in the quotation) or change the whole sales order to another customer

4 (key point). We expect the account assignment in Sales order item will retain as the "quotation's number".

5. If ok, the dependent requirement for all component in the Sales order's FG will be the same the Quotation's FG as they share the same account assignment.

Ұæڵ3͵4ʱܷʵֲ


zclouis :2008.03.06 17:30 ::: ( SAP ) ::Ķ:(1809) :: (0) :: (0)
===========================================================
תABAPַռ
===========================================================

ַַΪ 0; Character Fields: C,N, D, T, string (CNDT=> CN Data Time)

1. ַ
CONCATENATE dobj1 dobj2 ... INTO result
[IN { BYTE | CHARACTER } MODE]
[SEPARATED BY sep].

2.ַָ, split һstringIJֵһڱһϵеı
SPLIT dobj AT sep INTO
{ {result1 result2 ...} | {TABLE result_tab} }
[IN {BYTE|CHARACTER} MODE].

3. ַ, һַвģʽ(FIND or SEARCH)
FIND sub_string
IN SECTION [OFFSET off] [LENGTH len] OF dobj --> ɫСĿĴҵķΧ
[ IN { BYTE | CHARACTER } MODE ]
[ { RESPECTING | IGNORING } CASE ]
[ MATCH OFFSET moff ] [MATCH LENGTH mlen ].

FIND 'knows'
IN SECTION OFFSET 5 OF 'Everybody knows this is nowhere'
MATCH OFFSET moff " => moff = 10
MATCH LENGTH mlen. " => mlen= 5

ַdobjвpattern
SEARCH dobj FOR pattern [IN { BYTE | CHARACTER } MODE]
[STARTING AT p1] [ENDING AT p2]
[ABBREVIATED]
[AND MARK].
if sy-subrc = 0. then SY-FDPOS = patterndobjеλ
About pattern:
'pat' - βո
'.pat.' -βո
'*pat' - patβ
'pat*' - patʼ
ָ: ո , ; : ? ! () / + =ִָ

4. ַ滻
REPLACE SECTION [OFFSET off] [LENGTH len]
OF dobj WITH new
[IN { BYTE | CHARACTER } MODE].

REPLACE [{FIRST OCCURRENCE}|{ALL OCCURRENCES} OF]
[SUBSTRING] sub_string
IN [SECTION [OFFSET off] [LENGTH len] OF ] dobj WITH new
[IN {BYTE|CHARACTER} MODE]
[{RESPECTING|IGNORING} CASE]
[REPLACEMENT COUNT rcnt]
[REPLACEMENT OFFSET roff]
[REPLACEMENT LENGTH rlen].
eg:
DATA: text1 TYPE string VALUE 'xababx'.
REPLACE 'ab' IN text1 WITH 'xx'. --> xxxabx

5. ȥǰ0 (Remove leading zero)
SHIFT dobj LEFT DELETING LEADING '0'.
FM : CONVERSION_EXIT_ALPHA_OUTPUT

ǰ0 (Add leading zero)
DATA v_s(5).
UNPACK '123' to v_s. ==> v_s = '00123'
FM: CONVERSION_EXIT_ALPHA_INPUT

SHIFT dobj
[{BY num PLACES} | {UP TO sub_string}]
[LEFT|RIGHT] [CIRCULAR]
SHIFT dobj
{LEFT DELETING LEADING} | {RIGHT DELETING TRAILING} pattern.
[IN {BYTE|CHARACTER} MODE].

6. ַij, ڱ
STRLEN( dobj) ַij
LINES( itab ) ڱ

7. ɾַеĿո: CONDENSE text [NO-GAPS].

8. Сдתַ任
TRANSLATE text {TO {UPPER|LOWER} CASE} | {USING pattern}.
eg: text = `Barbcbdbarb`.
TRANSLATE text USING 'ABBAabba'. =>'Abracadabra'

9. CONVERT
CONVERT DATE dat [TIME tim [DAYLIGHT SAVING TIME dst]]
INTO TIME STAMP time_stamp TIME ZONE tz.

CONVERT TIME STAMP time_stamp TIME ZONE tz
INTO [DATE dat] [TIME tim]
[DAYLIGHT SAVING TIME dst].

CONVERT TEXT text INTO SORTABLE CODE hex.

10. OVERLAY text1 WITH text2 [ONLY pattern].
ָONLY pattern, text1еĿոᱻtext2еĶӦַ
ָֻƥַŻᱻעСд

11. ģʽƥ
CO / CN contains only or not
CA / NA contains any or not anyCS / NS contain string or not
CP / NP contains pattern or not

NOTE:
a) . CO, NO, CA, NAȽʱִСдβոҲڱȽϵķΧ֮
data: s1(10) value 'aabb'.
if s1 co 'ab' ==> false
if s1 co 'ab ' ==>true
CS, NS, CP, NPִСдβո

b) .CP, NP
* = s?
+ = s
# ַ, ƥ *, +ַ
##
#*
#+
#___ ȽϽβո
#[a-z] CP, NPǿִСд

c) . ȽϽΪ棬sy-fdposs2s1еƫϢ

12. ַ
ַмسлTABַԿʹ$13$10ASCIIв.ABAPҪʹsapCL_ABAP_CHAR_UTILITIES. ַ:CR_LF,HORIZONTAL_TAB,NEWLINEȵ.

13. ַλ
DATA: v_s(10) value 'abcd'.
v_s+0(1) = 'b'.
v_s+2(*) = '12'.
=> v_s = 'bb12'.


zclouis :2008.01.12 23:53 ::: ( SAPռ ) ::Ķ:(1037) :: (0) :: (0)
===========================================================
͵غ
===========================================================

Ͷ˵ĽΪҪִѧоڿոʱѪˮƽΪ80-120ˣ100ѪѪˮƽͣеƣͷΣվȻļ¡Ѫˮƽά֣Ҫȡһ쵱еһ͵ĽʳͣͺάѪˮƽͻֵѪǣֱӰ칤ѧϰ塣ͬʱ־СӦӦ½߿ɳѡѪǻԵȡ

Ͳԣǰһڶ͵ʱ̫мθҺصķڽʧȥƽ⣬ƫʳƫʳԽӰ졣


ЩΪ˼ʶҲǴġʵϣٳһҲ˷ʡΪ˰޶ȵģŶӽͷԵøࡣ


һҪԣΪ糿θҺķڲʢθҲûκʳʱǿǶάغͿʵһõʱ̡ͿȡʣǼʵԭҲǽ֮


͵ˣڳʱո̻ʵسͣ׷ʣصʳ֢ոʱҺķھͻ٣ɹϰҲθҪԭ


ڹ⣬һҪһٷÿճһٷḻͣʹ㳤١Ǽݴѧһεзֵġ7000׷ٵŮУϰ߲͵˵ʽ֮߸40%⣬ս˹ѧһ80-90Ϊĵз֣dzٵΨһͬ--ÿֳһٷḻ͡


оڲʱر겻ֱͣӰˮƽѧ8-13ͯĹϵо֣Ըߵ͵ĺ̵ƽ÷ߣΪԸǷ͵ĺӣ͵ĺ̵÷͡ɴ˵ڴ׶εͯҪʱͣͬʱҪע͵


ӪѧĹ۵ͳţ̻⣬ӦйʳƷﵰʡ⡢ˮ߲ˣԼ֬ǵʳƷ


zclouis :2008.01.01 01:31 ::: ( Ȥζ̸ ) ::Ķ:(339) :: (0) :: (0)
===========================================================
Regarding Month Closing
===========================================================

The following processes including SD,MM,PP,FI,CO .

SD Relevant Steps:
1.Check if all delivery in due list have been processed VL06G (Could set background jobs to automatically generate the billing due list for posting)
2.Check if all picking in due list have been processed VL06P
3.Check if all goods issue in due list have been processed VL04
4.Check if all billed AR has been release to accounting VFX3

PP Relevant Steps:
1.Check if all back flash error has been solved (COGI Check every day this kind of problem and solved on time)
2.Check if all production orders that will not be followed have been finally confirmed or technically closed. Do final confirmation even small quantity variance exist but we consider this order has finished
3.Do technical close at month end for the orders will not be followed in the future
4.Confirmation. Do not confirm any assembly scrap when do production order conf.

MM Relevant Steps 1.Check if all goods movement has been booked in SAP
2.GR/IR clearing accounts maintenance if needed
3.Open the MM period for movement posting when new period starts MMPV

FI Relevant Steps
1.Book all accounting entries for:
- Accrued expense
- Do recurring entry (prepayment, accrued expense, amortization)
- Process G/L, vendor, customer balance & open items
- Cost allocations by FI
2.AM Fixed asset depreciation run and period posting AFAB
3.AM Periodic posting ASKB
4.G/L,AR,AP balance check & Open item clearing
5.Foreign currency revaluation for bank/cash & AR AP open items
Bank/cash revaluation: F.06
AR AP open items: F.05
6.GR/IR clearing account regrouping process F.19
7.Automatic clearing for G/L accounts, vendor and customer F.13

CO Relevant Steps 1.Release standard cost estimate
CK24 Only when there are costing run to be released.
2.Cost reallocation according to activity
Distribution: CKV5
Assessment: KSU5
3.Cost splitting among activity KSS2
4.Actual activity price calculation KSII
5.Production order revaluation with actual activity price CON2
6.WIP calculation for the production orders KKAO
7.Variance calculation for the production orders KKS1
8.Production / Costing orders settlement CO88/KO88
9.Material ledger closing > MMPV first
a.Create costing run CKRU00
b.Allow settlement CKMF_RUN
c.Allow closing entries CKMG_RUN
d.Material selection CKMB_RUN
e.Determine costing sequence CKMC_RUN
f.Settle single level CKMH_RUN
g.Settle multi level CKMM_RUN
h.Post closing CKMI


zclouis :2007.12.28 12:08 ::: ( SAPռ ) ::Ķ:(447) :: (0) :: (0)
===========================================================
GR/IRݹ˼·
===========================================================

GR/IRݹ˼·ļ򵥶Ա /images/blogs/files/5251/GRIRĿ.doc
ӽɹ->->ƱУʵϻи,GR/IRĿʹ.
GR/IR
Ŀ,Tcode:OBYP|F.19|F.13|MB5S|MR11|MR11 SHOW
ʲô GR/IR?
GR/IR
ӢȫGoods Receipt/Invoice Receipt,йʲɹ|ϲɹĿ,ڶƿĿ:ԭҵƶʲɹƿĿҵϡƷȵIJɹɱҵʵʳɱDzüƻɱвϡƷճ㣬ʹñĿ

1.ڹҵҵԽĿΪϲɹĿвϵճ.
2.
ƷͨҵɹƷĩ;ƷԼʵʳɱϡƷҵ,ԽĿΪ;Ŀ.
3.
׼ƺȡʲɹĿʹãȷϲɹ;ĿĺݡУϲɹĿҵüƻɱвճϵIJɹɱĿӦչӦλƷֽϸ㣻;ĿҵʵʳɱۣвϣƷճ㣬ѸδĹϻƷIJɹɱĿӦչӦλϸ㡣ʲɹϲɹĿʵһ,ֻǿĿͬѡһGR/IRĿ
1
GR/IRĿ(Tcode: OBYC->WRX)OBYC->WRXøÿĿͨEľͽGR/IRƹϲɹֱʹӦʿ-ӦݹĿֱʹӦʿ-ӦݹĿҵͨDzƱδҵȷӦʿǷdzģϾǮͳȥǼܵ飬һҪ33ָͨӦ̵ͻҵջ͹Ӧ̷Ʊ൥ƥ䣬¢ԵǿƹӦ̻δͷƱŶûСĩҪGR/IRĿ(ϲɹ)Ŀĩطൽ;Ӧʿ-ӦݹĿֱʲծʲ͸ծ,õTcode:F.19з,F.19ҵͨͬʱƱδƱδҵҵǻƱδҵGR/IRĿӦʿ-ӦݹʵF.19طҲûбҪ,GR/IRֱӾ͹Ҹծر,ڿĿ,漰ƿĿ,ʹǿLMR1M002(Tcode:SMOD|CMOD)ǿGR/IRĿ


2.

ڶԱȹGR/IR˼·
1
ERPͳһʹGR/IRмĿ,ڲͷƱУʱȷʵ,ԭҪ,,ϵͳԽGR/IRƽڸԶƽΪ˵һɹͷƱУҵ񳡾:ɹ:ɹ10Ԫ/1000ʹUSDӱλңUSD/RMB=7.6ƾ֤
Dr:
ԭ10000(RMB) 1315.79USD
Cr:GR/IR 10000(RMB) 1315.79USD
ƱУһ:ʱ仯: USD/RMB=7.5,Ʊ1000.Ʊƾ֤ӦĻƾ֤:
Dr: GR/IR 10000(RMB) 1315.79(USD)
ʧ 0(RMB) 17.54 (USD)
Cr: 10000(RMB) 1333.33(USD)
ʧе˼,RMBΪ0,ȴUSD,Ϊϵͳһ֤ƽGR/IRĿ.ƱУζ:ʹõ켴ʱ7.5,ijԭ,Ӧ̾۸Ż,9.5Ԫ/,Ʊ1000.Ʊƾ֤ӦĻƾ֤:
Dr: GR/IR 10000(RMB) 1315.79(USD)
ʧ 0(RMB) 17.55 (USD)
Cr: 9500(RMB) 1266.67(USD)
ԭ(ʹƶƽ)|ϲɹ(ʹüƻ) 500(RMB) 66.67(USD) ͬ, Ϊϵͳһ֤ͷƱУƽмGR/IRĿ.ƱУ:ʹõ켴ʱ7.5,50ڲ֪,Ӧ̷Ʊ950.ƱУʱ950,GR/IRֻ
Dr: GR/IR 10000* 950/1000 (RMB) 1315.79*950/1000(USD)
ûϷʿڷƱУʱ1000,GR/IRƽ,950POGR/IRƽ,ʱʹMR11
2
ʹõӦûɴƾ֤Ӧ̶ͻ²Ʊƴ鷳ſһ´̣оҵ߼ùɬһ. ǰ˵, GR/IRĴʹF.19ֻв4ƾ֤, ڵӦݹ;ƾ֤,ͬʱ³,dz㣬ִˡͬȱ:ʵҵȽ,ͷƱУϴҷƱǿ,޴ڷƱ¶һӰ,ڼʵôڱ⡣

GR/IRĿ(Tcode:OBYP|OBL1)
OBYP
GR/IRĿһƼ÷ʹ4Ŀ, еĿרһмĿGR/IR,GNB(Ʊδ)|BNG(Ʊδ)ֱӦʿ-Ӧݹ ;,GR/IRĿ漰4Ŀ,,F.19ϵͳȡеGR/IRݴƾ֤:
Dr:GR/IR
Cr: Ӧʿ-ӦݹƱδ
Dr:
; Cr: GR/IRƱδǿ:Ʊδҵ,ERPGR/IRĿطൽӦʿ-Ӧݹǻ,ֹӦ,Ӧʿϸȱ,ͨҪΪдץȥݡõĺôF.19ʱGR/IRط಻ֱʹGR/IRĿרŵGR/IRҵȽϺʣGR/IRĿĩطࡣע⣺ط¼³,ʲծһOBYCGR/IRĿʵ,ͼ1
ͼ1пĿ:2121970000(Ӧʿ-Ӧݹ),1205000000(;)ͳԦĿʾOBYC-WRXõGR/IRĿĿмĿĿĿΪĿĿǰ˵4ĿȽϷ㣬ͼ1ʵֻ2ĿGR/IRĿ͵ĿõĶӦʿ-ӦݹĿͨҵһ㲻Ʊδҵ񣬼ʹд˵ҵ񣬱ijЩ¢ϹӦýүźóԲ򵽻, ҵҲԤԤʿעGR/IRмĿʵϳIJϲɹϣڳɱĵķòɹɹҲʹøмĿѡջķƱУͨ,ҵյӦ̻ﲢɹʼŽзƱУ(Tcode:MIRO),MIROҪӦ̵ͻ,ֿջ͹Ӧ̷ƱƥȷӦ,ʱӦݵIJɹ->->ջķƱУѡϴ˱־,ζһҪջܷƱУ,ϵͳôϢֹƱδҵ,ͼ2
ģṩ൱ûϢֻҪM8 081/504õϢΪEͽֹƱδҵ, ͼ2ֻǾ档GR/IRĿѯ(Tcode:MB5S|F.13|MR11|MR11SHOW)
MB5S:GR/IR

F.13:
Զ,ʼν, οϸοĩʸСڣͨԸPO+PO ItemԶ,⹦ʱҲdzʹ
MR11|MR11SHOW
ԭ,GR/IRջͷƱУʱӦͽȫMatchDzͨҲڱģӶνͼ۲磬͵ĻҺ,ˮIJ,ϵʧij͹ɹԭʱܲɹʱ1500֣ҵջʱΪ1499.05,̼챨Ϊ1499.03,Ӧ̷Ʊ1500.05ֵ,ЩʹMR11,ϲɹĿּ۸Ҳܳҵ1.2Ԫ/ļ۸ս1000ijԭ,ڼ۸/µԭ,ƱϿ1.251.15Ԫ,ɴ˲۸졣һЩ,ջ100,û,з10,ǹӦֻͬ90ķƱ,ҲʹMR11һģGR/IRIJͬʽڶGR/IRһַʽ,ϲɹֳ3:
1.
Ʊȫ
2.
Ʊδκδ,ȻŽй
3.
ƱδڴϵͳУ⹺ʹݹַʽݹƷʽַֹ֣ݹʹüƻ/³ݹݹʴ֣غ³һγأҵʷ㣬ƶҪʹ³صģַʽѾȷ޸ġ

zclouis :2007.12.28 11:59 ::: ( SAPռ ) ::Ķ:(1018) :: (1) :: (0)
===========================================================
ʽӢ
===========================================================
1we two who and who
>> ˭˭

2how are you ? how old are you?
>> ô,ô㣿

3you don' t bird me , I don' t bird you
>> 㲻ңҲ

4you have seed , I will give you some color to see see, brothers together up
>> ֣Ҫɫƣֵǣһϣ

5hello everybody ! if you have something to say,then say ! if you have nothing to say , go home !!
>> ࣬˳


6you me you me . >> ˴˱˴

7You Give Me Stop!! >> վס
8know is know ,noknow is noknow .>> ֪֮Ϊ֪֪֮Ϊ֪
9WATCH SISTER >>
10 dragon born dragon,chicken born chicken,mouse'son can make hole!! >> Ķӻ򶴣

11 American Chinese not enough .>> в
12 one car come one car go ,two car pengpeng,people die >> ֳ
13 heart flower angry open >> Ļŭ
14 go past no mistake past >> ߹·Ҫ

15СI am sorry! >> I am sorry too! >> СI am sorry three! >> What are you sorry for? >> СI am sorry five!
16 If you want money,I have no; if you want life,I have one! >> ҪǮûУҪһ
17 I call Li old big. toyear 25. >> ҽϴ󣬽25

18 you have two down sonӡ

19 as far as you go to die
>> жԶԶ
20 I give you face you don""t wanna face,you lose you face ,I turn my face >> 㲻Ҫ㶪ҷ
zclouis :2007.12.26 21:19 ::: ( Ȥζ̸ ) ::Ķ:(357) :: (3) :: (0)
===========================================================
BW Glossary
===========================================================
Aggregate

An aggregate is a subset of an InfoCube. The objective when using aggregates is to reduce I/O volume. The BW OLAP processor selects an appropriate aggregate during a query run or a navigation step. If no appropriate aggregate exists, the BW OLAP processor retrieves data from the original InfoCube instead.

Aggregate rollup

Aggregate rollup is a procedure to update aggregates with new data loads.

Application component

Application components are used to organize InfoSources. They are similar to the InfoAreas used with InfoCubes. The maximum number of characters allowed for the technical name is 32.

Authorization

An authorization defines what a user can do, and to which SAP objects. For example, a user with an authorization can display and execute, but not change, a query. Authorizations are defined using authorization objects.

Authorization object

An authorization object is used to define user authorizations. It has fields with values to specify authorized activities, such as display and execution, on authorized business objects, such as queries. The maximum number of characters allowed for the technical name is 10.

Authorization profile

An authorization profile is made up of multiple authorizations. The maximum number of characters allowed for the technical name is 10.

Bitmap index

A bitmap index uses maps of bits to locate records in a table. Bitmap indices are very effective for Boolean operations of the WHERE clause of a SELECT statement. When the cardinality of a column is low, a bitmap index size will be small, thereby reducing I/O volume.

Business Content

Business Content is a complete set of BW objects developed by SAP to support the OLAP tasks. It contains roles, workbooks, queries, InfoCubes, key figures, characteristics, update rules, InfoSources, and extractors for SAP R/3, and other mySAP solutions.

BW

BW is a data warehousing solution from SAP.

BW Monitor

BW Monitor displays data loading status and provides assistance in troubleshooting if errors occur.

BW Scheduler

BW Scheduler specifies when to load data. It is based on the same techniques used for scheduling R/3 background jobs.

BW Statistics

BW Statistics is a tool for recording and reporting system activity and performance information.

Change run

Change run is a procedure used to activate characteristic data changes.

Characteristic

Characteristics are descriptions of key figures, such as Customer ID, Material Number, Sales Representative ID, Unit of Measure, and Transaction Date. The maximum number of characters allowed for the technical name is 9.

Client

A client is a subset of data in an SAP system. Data shared by all clients is called client-independent data, as compared with client-dependent data. When logging on to an SAP system, a user must specify which client to use. Once in the system, the user has access to both client-dependent data and client-independent data.

Communication structure

The communication structure is the structure underlying the InfoSource.

Compound attribute

A compound attribute differentiates a characteristic to make the characteristic uniquely identifiable. For example, if the same characteristic data from different source systems mean different things, then we can add the compound attribute 0SOURSYSTEM (source system ID) to the characteristic; 0SOURSYSTEM is provided with the Business Content.

Data packet size

For the same amount of data, the data packet size determines how work processes will be used in data loading. The smaller the data packet size, the more work processes needed.

Data Warehouse

Data Warehouse is a dedicated reporting and analysis environment based on the star schema database design technique and requiring special attention to the data ETTL process.

DataSource

A DataSource is not only a structure in which source system fields are logically grouped together, but also an object that contains ETTL-related information. Four types of DataSources exist:

  • DataSources for transaction data

  • DataSources for characteristic attributes

  • DataSources for characteristic texts

  • DataSources for characteristic hierarchies

If the source system is R/3, replicating DataSources from a source system will create identical DataSource structures in the BW system. The maximum number of characters allowed for a DataSource's technical name is 32.

Delta update

The Delta update option in the InfoPackage definition requests BW to load only the data that have been accumulated since the last update. Before a delta update occurs, the delta process must be initialized.

Development class

A development class is a group of objects that are logically related.

Display attribute

A display attribute provides supplemental information to a characteristic.

Drill-down

Drill-down is a user navigation step intended to get further detailed information.

ETTL

ETTL, one of the most challenging tasks in building a data warehouse, is the process of extracting, transforming, transferring, and loading data correctly and quickly.

Free characteristic

A free characteristic is a characteristic in a query used for drill-downs. It is not displayed in the initial result of a query run.

Full update

The Full update option in the InfoPackage definition requests BW to load all data that meet the selection criteria specified via the Select data tab.

Generic data extraction

Generic data extraction is a function in Business Content that allows us to create DataSources based on database views or InfoSet queries. InfoSet is similar to a view but allows outer joins between tables.

Granularity

Granularity describes the level of detail in a data warehouse. It is determined by business requirements and technology capabilities.

IDoc

IDoc (Intermediate Document) is used in SAP to transfer data between two systems. It is a specific instance of a data structure called the IDoc Type, whose processing logic is defined in the IDoc Interface.

Index

An index is a technique used to locate needed records in a database table quickly. BW uses two types of indices: B-tree indices for regular database tables and bitmap indices for fact tables and aggregate tables.

InfoArea

InfoAreas are used to organize InfoCubes and InfoObjects. Each InfoCube is assigned to an InfoArea. Through an InfoObject Catalog, each InfoObject is assigned to an InfoArea as well. The maximum number of characters allowed for the technical name is 30.

InfoCube

An InfoCube is a fact table and its associated dimension tables in the star schema. The maximum number of characters allowed for the technical name is 30.

InfoCube compression

InfoCube compression is a procedure used to aggregate multiple data loads at the request level.

InfoObject

In BW, key figures and characteristics are collectively called InfoObjects.

InfoObject Catalog

InfoObject Catalogs organize InfoObjects. Two types of InfoObject Catalogs exist: one for characteristics, and one for key figures. The maximum number of characters allowed for the technical name is 30.

InfoPackage

An InfoPackage specifies when and how to load data from a given source system. BW generates a 30-digit code starting with ZPAK as an InfoPackage's technical name.

InfoSource

An InfoSource is a structure in which InfoObjects are logically grouped together. InfoCubes and characteristics interact with InfoSources to get source system data. The maximum number of characters allowed for the technical name is 32.

Key figure

Key figures are numeric values or quantities, such as Per Unit Sales Price, Quantity Sold, and Sales Revenue. The maximum number of characters allowed for the technical name is 9.

Line item dimension

A line item dimension in a fact table connects directly with the SID table of its sole characteristic.

Logical system

A logical system is the name of a client in an SAP system.

Multi-cube

A multi-cube is a union of basic cubes. The multi-cube itself does not contain any data; rather, data reside in the basic cubes. To a user, the multi-cube is similar to a basic cube. When creating a query, the user can select characteristics and key figures from different basic cubes.

Navigational attribute

A navigational attribute indicates a characteristic-to-characteristic relationship between two characteristics. It provides supplemental information about a characteristic and enables navigation from characteristic to characteristic during a query.

Number range

A number range is a range of numbers that resides in application server memory for quick number assignments.

ODS

ODS is a BW architectural component located between PSA and InfoCubes that allows BEx reporting. It is not based on the star schema and is used primarily for detail reporting, rather than for dimensional analysis. ODS objects do not aggregate data as InfoCubes do. Instead, data are loaded into an ODS object by inserting new records, updating existing records, or deleting old records, as specified by the 0RECORDMODE value.

Parallel query

A parallel query uses multiple database processes, when available, to execute a query.

Partition

A partition is a piece of physical storage for database tables and indices. If the needed data reside in one or a few partitions, then only those partitions will be selected and examined by a SQL statement, thereby significantly reducing I/O volume.

Profile Generator

Profile Generator is a tool used to create authorization profiles.

PSA

PSA is a data staging area in BW. It allows us to check data in an intermediate location, before the data are sent to its destinations in BW.

Query

A BW query is a selection of characteristics and key figures for the analysis of the data in an InfoCube. A query refers to only one InfoCube, and its result is presented in a BEx Excel sheet. The maximum number of characters allowed for the technical name is 30.

Read mode

Read mode for a query determines the size and frequency of data retrievals from database: all data at once, as needed per navigation step, or as needed per hierarchy node.

Reconstruct

Reconstruct is a procedure used to restore load requests from PSA.

Request

A request is a data load request from BW Scheduler. Each time that BW Scheduler loads data into an InfoCube, a unique request ID is created in the data packet dimension table of the InfoCube.

RFC

RFC (Remote Function Call) is a call to a function module in a system different from the caller'susually another SAP system on the local network.

Role

In Profile Generator, an authorization profile corresponds to a role. A user assigned to that role also has the corresponding authorization profile. A user can be assigned to multiple roles. The maximum number of characters allowed for the technical name is 30.

SID

SID (Surrogate-ID) translates a potentially long key for an InfoObject into a short four-byte integer, which saves I/O and memory during OLAP.

Source system

A source system is a protocol that BW uses to find and extract data. When the source system is a non-SAP system, such as a flat file or a third-party tool, the maximum number of characters allowed for the technical name is 10. When the source system is an SAP system, either R/3 or BW, the technical name matches the logical system name. The maximum number of characters allowed for the technical name is 32.

Star schema

A star schema is a technique used in the data warehouse database design to help data retrieval for online analytical processing.

Statistics

For a SQL statement, many execution plans are possible. The database optimizer generates the most efficient execution plan based on either the heuristic ranking of available execution plans or the cost calculation of available execution plans. Statistics is the information that the cost-based optimizer uses to calculate the cost of available execution plans and select the most appropriate one for execution. BW uses the cost-base optimizer for Oracle databases.

System Administration Assistant

System Administration Assistant is a collection of tools used to monitor and analyze general system operation conditions.

System landscape

The system landscape specifies the role of each system and the paths used in transporting objects among the various systems.

Time-dependent entire hierarchy

A time-dependent entire hierarchy is a time-dependent hierarchy whose nodes and leaves are not time-dependent.

Time-dependent hierarchy structure

A time-dependent hierarchy structure consists of nodes or leaves that are time-dependent, but the hierarchy itself is not time-dependent

Transfer rule

Transfer rules specify how DataSource fields are mapped to InfoSource InfoObjects.

Transfer structure

A transfer structure maps DataSource fields to InfoSource InfoObjects.

Update rule

An update rule specifies how data will be updated into their targets. The data target can be an InfoCube or an ODS object. If the update rule is applied to data from an InfoSource, the update rule's technical name will match the InfoSource's technical name. If the update rule is applied to data from an ODS object, the update rule's technical name will match the ODS object's technical name prefixed with number 8.

Variable

A variable is a query parameter. It gets its value from user input or takes a default value set by the variable creator.

Workbook

A BW workbook is an Excel file with a BEx query result saved in BDS. BW assigns a 25-digit ID to each workbook. Users need merely name a workbook's title.


zclouis :2007.12.04 23:07 ::: ( SAPռ ) ::Ķ:(583) :: (0) :: (0)
===========================================================
BAPIIJ
===========================================================

1.BAPI Structure (StructureBAPIظʹãΪһBAPIͷţStructureT-CODESE11

2.FUNCTION MODULET-CODESE37

ÿBAPIԼFunction GroupFunction GroupԱΪRFC

3.Business Object(T-CODESWO1)

4.ʹBAPI WIZARDAPI Method (T-CODE:SWO1:Utilities--API methods--methods)

BAPIԱⲿ

5.Function ModuleBOR Method

4.ͷBAPI Function Module,

ͷBusiness Object Type,ͷŶͷŶµ

ͷBAPIΪBORһMethod

PathCODESWO1Editchange release statusObject typeTo modeled


zclouis :2007.11.08 13:29 ::: ( SAP ) ::Ķ:(893) :: (0) :: (0)
===========================================================
SAP Netware-- J2EE 洴 RFC Ŀļ
===========================================================

J2EE 洴 RFC Ŀļ

Use

In this activity you establish the RFC destination of the BW system for
the J2EE Engine.

Requirements

You have already established an RFC destination for the BW system in the
J2EE Engine.

Activities

1. Choose Edit -> Create.

2. Enter a name and a description for the destination.

3. Choose T as the connection type (start an external program using
TCP/IP).

4. On the Technical Settings tab page, choose Registered ServerProgram as the activation type and specify the registered server program
under program ID.
The program ID here has to correspond to the program ID that you
entered when maintaining the RFC destination in the J2EE Engine.

5. Specify the gateway host and the gateway service under Gateway
Options.

6. Save and test the connection.


zclouis :2007.10.14 21:59 ::: ( SAP ) ::Ķ:(738) :: (0) :: (0)
===========================================================
SAP Netware--֪ J2EE ˿ں
===========================================================

֪ J2EE ˿ں

Use

In order for the administrator of the Computing Center Management System
(CCMS) to be able to monitor the J2EE Engine, you must inform the system
of the host and port of the J2EE Engine.

Standard settings

Standard HTTP Port: 50000.


zclouis :2007.10.14 21:51 ::: ( SAP ) ::Ķ:(338) :: (0) :: (0)
===========================================================
԰׳
===========================================================

ڿͣҿĵ
СףôƵģ
ڿͣľ
Сףû
ڿͣ
Сףģ
ڿͣĵ棡
Сףҵĵԡûа
ڿͣˣʲôҲû

ڿͣѾĵ
СףŶ
ڿͣ˰ɣٺ
СףãɱɱɣҵĻëܶҮ
ڿͣ

Сףôҵ
ڿͣװǽ
СףװǽͲܽ
ڿֻͣӵȤζԣĵҾúܰ׳Ү

Сף˵조
ڿͣ
СףԿƱ˵ĵԣ
ڿͣһǵ
СףԺڵЩվ
ڿͣȻû˼ҽҡڿ͡
СףŶ~~~`һΪΪ㳤úܺڡ
~~

ڿͣˣ
Сףúܷ
ڿͣǺܷĻҼõһ̨
Сףǰɣ
ڿͣ˵ĻϷֻв
СףŶ~~㿴ҵġ𣬲ǵװģ˺þҮ
ڿͣټ

ڿͣ~~~ˣ
Сףü첻㣬ҵķǽס
ڿͣЦĻӱԼĻף˰
Сףһæ
ڿͣʲô£
Сףܲܽϵͳ޸һ
ڿͣ
Сף㣬ҰҼµĵ˰ɡ
ڿͣȥ

ڿͣȥˣ
Сףȥ˼찡Ҹ
ڿͣҪҵ㶫
Сףʲô
ڿͣһǰϲֻĻϲȫ

ڿͣˣ

ڿͣô˵
Сף鲻
ڿͣ˭۸ˣ
СףҵһQŸ㶪ˣҵϳ
ڿͣ򵥣Ұû
Сףò
ڿͣܣңٺţ
Сף~~~~Dzǵ

Сףҳ
ڿͣô
СףDzҵIDȥ̳ˣ
ڿͣ˼˸ˣûɻ£Ϲ˸ӣұ֤´Ҳ
СףDzУ
ڿͣ㻹Ҫô
Сף㷢ӵúҮҵһεúÿŶٸұһ
ڿͣ

ڿͣٺ٣ղһȤ
Сףʲô
ڿͣҵ̳ȥ
Сףƽ
ڿͣҼͶ¥ý
Сף̫ˣҿɴңᱻɱģ
ڿͣûѾɱˡ
Сף⻹Ȥ
ڿͣǰΪõID

СףǸ
ڿͣ˵ǰɡ
Сףߵʲô̶ȣ
ڿͣţĵʱԼԼ
СףҲᣡ
ڿͣ#%Ҳԣ
Сףǰһػͺˡ
ڿͣ

úڿĿǰסںҽԺȷѳֳǰף


zclouis :2007.10.11 10:23 ::: ( Ȥζ̸ ) ::Ķ:(198) :: (0) :: (0)
===========================================================
ALV˫¼
===========================================================

*&---------------------------------------------------------------------*
*& Report ZMM71 *
*&---------------------------------------------------------------------*
* &Program : ZMM71 *
* &Author : Louis(ZhouCong) *
* &CreateDate : 10/04/2006 *
* &Change Author : Louis(ZhouCong) *
* &ChangeDate : 10/04/2006/-11/04/2006 *
* &Last ChangeDate : 11/05/2006 *
* &Code type : Report *
* &Description : ???????? *
* &--------------------------------------------------------------------*

REPORT zmm71
NO STANDARD PAGE HEADING LINE-SIZE 255 .

***********************************************************************
***>Include TYPE-POOLS
***********************************************************************
TYPE-POOLS: slis.
CLASS cl_mmim_auth DEFINITION LOAD.

***********************************************************************
***>Include Tables
***********************************************************************
TABLES: ekko, "Purchasing Document Header
ekpo, "Purchasing Document Item
ekbe, "History per Purchasing Document
ekkn, "Account Assignment in Purchasing Document
lfa1, "Vendor Master (General Section)
t023t, "Material Group Descriptions
t001. "Company Codes

***********************************************************************
***>Define Intervals tables
***********************************************************************
* working table for the entries of all Po tables
DATA: BEGIN OF wa_line,
ebeln LIKE ekko-ebeln, "?????'
lifnr LIKE ekko-lifnr, "?????'
waers LIKE ekko-waers, "????'
wkurs LIKE ekko-wkurs, "??'
* wkurc(15) TYPE c, "????'
ebelp LIKE ekpo-ebelp, "?????????'
matkl LIKE ekpo-matkl, "???'
txz01 LIKE ekpo-txz01, "???'
meins LIKE ekpo-meins, "????'
menge LIKE ekpo-menge, "????'
netwr LIKE ekpo-netwr, "PO??'
peinh LIKE ekpo-peinh, "????
netpr LIKE ekpo-netpr, "??'
netps(13) TYPE p DECIMALS 6, "????'
mwskz LIKE ekpo-mwskz, "??'

belnr LIKE ekbe-belnr, "??????'
bwart LIKE ekbe-bwart, "???? (????)'
budat LIKE ekbe-budat, "????????'
mengs LIKE ekbe-menge, "????'
dmbts LIKE ekbe-dmbtr, "????'
wrbtr LIKE ekbe-wrbtr, "????
mengi LIKE ekbe-menge, "??????'
dmbti LIKE ekbe-dmbtr, "??????'
shkzg LIKE ekbe-shkzg, "??/????'

sakto LIKE ekkn-sakto, "?????'
kostl LIKE ekkn-kostl, "????'
wgbez LIKE t023t-wgbez, "?????'
name1 LIKE lfa1-name1, "?????'

color TYPE slis_t_specialcol_alv,
END OF wa_line,
it_line LIKE TABLE OF wa_line WITH HEADER LINE,
itab LIKE TABLE OF wa_line WITH HEADER LINE.

DATA: BEGIN OF it_ekbe OCCURS 0,
ebeln LIKE ekbe-ebeln, "?????'
ebelp LIKE ekbe-ebelp, "?????????'
zekkn LIKE ekbe-zekkn, "????????'
vgabe LIKE ekbe-vgabe, "????/????'
belnr LIKE ekbe-belnr, "??????'
buzei LIKE ekbe-buzei, "????????'
bewtp LIKE ekbe-bewtp, "????????'
bwart LIKE ekbe-bwart, "???? (????)'
menge LIKE ekbe-menge, "??'
dmbtr LIKE ekbe-dmbtr, "????????'
shkzg LIKE ekbe-shkzg, "??/????'
END OF it_ekbe.

DATA: tab_lines TYPE i,
color TYPE slis_t_specialcol_alv WITH HEADER LINE.

DATA: g_menge LIKE ekbe-menge, "????'
g_dmbtr LIKE ekbe-dmbtr, "????'
g_mengt LIKE ekbe-menge, "????'
g_dmbtt LIKE ekbe-dmbtr. "????'

***>Uses For ALV
DATA: it_fieldcat TYPE slis_t_fieldcat_alv,
it_event TYPE slis_t_event,
wa_event TYPE slis_alv_event,
it_listhead TYPE slis_t_listheader,
sortcat TYPE slis_t_sortinfo_alv,
sortcat_ln LIKE LINE OF sortcat,
wa_listhead TYPE slis_listheader,
wa_layout TYPE slis_layout_alv,
wk_repid LIKE sy-repid,
g_command_form TYPE slis_formname VALUE 'USER_COMMAND',
gt_list_top_of_page TYPE slis_t_listheader,
g_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE'.

*********************************************************
***>Parameters Selection-screen
*********************************************************
* Selection Conditions OBLIGATORY
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_ekorg FOR ekko-ekorg,
s_budat FOR ekbe-budat MEMORY ID but,
s_lifnr FOR ekko-lifnr MEMORY ID lif,
s_ebeln FOR ekko-ebeln MEMORY ID ebl,
s_matnr FOR ekpo-matnr MEMORY ID mat,
s_belnr FOR ekbe-belnr MEMORY ID mbl.
SELECTION-SCREEN END OF BLOCK b1.

*************************************************************
*INITIALIZATION
*************************************************************
INITIALIZATION.
wk_repid = sy-repid.

AT SELECTION-SCREEN.
CALL FUNCTION 'MMIM_ENTRYCHECK_MAIN'
TABLES
it_lifnr = s_lifnr
it_ekorg = s_ekorg.

**************************************************************
*START-OF-SELECTION
**************************************************************
START-OF-SELECTION.
IF ( s_ekorg IS INITIAL ) AND ( s_budat IS INITIAL ) AND
( s_lifnr IS INITIAL ) AND ( s_ebeln IS INITIAL ) AND
( s_matnr IS INITIAL ) AND ( s_belnr IS INITIAL ).
MESSAGE text-inf TYPE 'S' DISPLAY LIKE 'E'.
EXIT.
ENDIF.

PERFORM account_list_01.

CLEAR tab_lines.
DESCRIBE TABLE itab LINES tab_lines.
IF tab_lines EQ 0 OR tab_lines LT 0 .
MESSAGE text-msg TYPE 'S'.
EXIT.
ENDIF.

SORT itab BY lifnr ebeln ebelp belnr bwart.
PERFORM comment_build USING gt_list_top_of_page[].
PERFORM alv_field_cat_01.
PERFORM alv_show_01.

END-OF-SELECTION.


*&--------------------------------------------------------------------*
*& Form account_list_01
*&--------------------------------------------------------------------*
* text
*---------------------------------------------------------------------*
FORM account_list_01 .

REFRESH : it_line, itab, it_ekbe.
SELECT ekko~ebeln ekko~lifnr ekko~waers ekko~wkurs ekpo~ebelp
ekpo~matkl ekpo~txz01 ekpo~meins ekpo~menge ekpo~netwr
ekpo~peinh ekpo~netpr ekpo~mwskz ekbe~belnr ekbe~bwart
ekbe~budat ekbe~menge AS mengs ekbe~dmbtr AS dmbts ekbe~wrbtr
ekbe~shkzg
INTO CORRESPONDING FIELDS OF TABLE it_line
FROM ekko
INNER JOIN ekpo ON ekko~ebeln = ekpo~ebeln
INNER JOIN ekbe ON ekpo~ebeln = ekbe~ebeln AND ekpo~ebelp =
ekbe~ebelp
WHERE ekko~ebeln IN s_ebeln AND ekko~bstyp = 'F' AND
* ekko~bsart = 'ZSPO' AND ekko~loekz = space AND
ekko~lifnr IN s_lifnr AND ekko~ekorg IN s_ekorg AND
ekpo~matnr IN s_matnr AND ekpo~loekz = space AND
* ekbe~zekkn = '00' AND ekbe~vgabe = '1' AND
* ekbe~belnr IN s_belnr AND ekbe~bewtp = 'E' AND
ekbe~budat IN s_budat.
IF sy-subrc NE 0.
MESSAGE text-msg TYPE 'S'.
EXIT.
ENDIF.

SORT it_line BY ebeln ebelp belnr bwart.
REFRESH itab.
LOOP AT it_line INTO wa_line.
IF wa_line-bwart = '101'.
MOVE-CORRESPONDING wa_line TO itab.
APPEND itab.
ELSEIF wa_line-bwart = '102'.
LOOP AT itab WHERE ebeln = wa_line-ebeln AND ebelp = wa_line-ebelp
.
itab-mengs = itab-mengs - wa_line-mengs.
itab-dmbts = itab-dmbts - wa_line-dmbts.
itab-wrbtr = itab-wrbtr - wa_line-wrbtr.
MODIFY itab.
ENDLOOP.
ENDIF.
IF wa_line-bwart = '122'.
MOVE-CORRESPONDING wa_line TO itab.
APPEND itab.
ELSEIF wa_line-bwart = '123'.
LOOP AT itab WHERE ebeln = wa_line-ebeln AND ebelp = wa_line-ebelp
.
itab-mengs = itab-mengs - wa_line-mengs.
itab-dmbts = itab-dmbts - wa_line-dmbts.
itab-wrbtr = itab-wrbtr - wa_line-wrbtr.
MODIFY itab.
ENDLOOP.
ENDIF.
ENDLOOP.

SELECT ekbe~ebeln ekbe~ebelp ekbe~zekkn ekbe~vgabe ekbe~belnr
ekbe~buzei ekbe~bewtp ekbe~bwart ekbe~menge ekbe~dmbtr
ekbe~shkzg
INTO CORRESPONDING FIELDS OF TABLE it_ekbe
FROM ekbe
FOR ALL ENTRIES IN itab
WHERE ekbe~ebeln = itab-ebeln AND ekbe~ebelp = itab-ebelp AND
ekbe~zekkn = '01' AND ekbe~vgabe = '2' AND ekbe~bewtp = 'Q'.
SORT it_ekbe BY ebeln ebelp.

LOOP AT itab.
* ?????'
SELECT SINGLE wgbez INTO itab-wgbez
FROM t023t WHERE spras = sy-langu AND matkl = itab-matkl.
* ?????'
SELECT SINGLE name1 INTO itab-name1
FROM lfa1 WHERE lifnr = itab-lifnr.
* ?????/????'
SELECT SINGLE sakto kostl INTO (itab-sakto,itab-kostl)
FROM ekkn
WHERE ebeln = itab-ebeln AND ebelp = itab-ebelp AND zekkn = '01'.
* ??'
itab-netps = itab-netpr / itab-peinh.

CLEAR: itab-mengi, itab-dmbti.
LOOP AT it_ekbe WHERE ebeln = itab-ebeln AND ebelp = itab-ebelp.
* ??????/??????'
IF it_ekbe-zekkn = '01'.
IF it_ekbe-shkzg = 'S'.
itab-mengi = itab-mengi + it_ekbe-menge.
itab-dmbti = itab-dmbti + it_ekbe-dmbtr.
ENDIF.
IF it_ekbe-shkzg = 'H'.
itab-mengi = itab-mengi - it_ekbe-menge.
itab-dmbti = itab-dmbti - it_ekbe-dmbtr.
ENDIF.
ENDIF.
ENDLOOP.
REFRESH color.
IF itab-shkzg = 'H'.
itab-mengs = - itab-mengs.
itab-dmbts = - itab-dmbts.
itab-wrbtr = - itab-wrbtr.
* CLEAR:itab-mengi, itab-dmbti.
color-color-col = '6'.
ELSE.
color-color-col = '5'.
ENDIF.
color-fieldname = 'MENGE'. APPEND color.
color-fieldname = 'MEINS'. APPEND color.
color-fieldname = 'NETPS'. APPEND color.
color-fieldname = 'NETWR'. APPEND color.
color-fieldname = 'WAERS'. APPEND color.
color-fieldname = 'WKURS'. APPEND color.
color-fieldname = 'MWSKZ'. APPEND color.
color-fieldname = 'BELNR'. APPEND color.
color-fieldname = 'MENGS'. APPEND color.
color-fieldname = 'DMBTS'. APPEND color.
color-fieldname = 'WRBTR'. APPEND color.
color-fieldname = 'BUDAT'. APPEND color.
color-fieldname = 'MENGI'. APPEND color.
color-fieldname = 'DMBTI'. APPEND color.
itab-color[] = color[].
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = itab-lifnr
IMPORTING
output = itab-lifnr.
MODIFY itab.
ENDLOOP.
ENDFORM. " account_list_01

*&--------------------------------------------------------------------*
*& Form comment_build
*&--------------------------------------------------------------------*
* text
*---------------------------------------------------------------------*
* -->LT_TOP_OF_Ptext
*---------------------------------------------------------------------*
FORM comment_build USING lt_top_of_page TYPE
slis_t_listheader.
DATA:g_budat(25) TYPE c,
g_lifnr(25) TYPE c,
ls_line TYPE slis_listheader.

CLEAR ls_line.
ls_line-typ = 'H'.
ls_line-info = text-h01.
APPEND ls_line TO lt_top_of_page.
CLEAR ls_line.
ls_line-typ = 'S'.
ls_line-key = text-h02.
IF s_budat IS INITIAL.
g_budat = sy-datum.
CONCATENATE sy-datum+6(2) '.' sy-datum+4(2) '.' sy-datum+0(4)
INTO g_budat.
ELSE.
CONCATENATE s_budat-low+6(2) '.' s_budat-low+4(2) '.'
s_budat-low+0(4) ' To ' INTO g_budat.
CONCATENATE g_budat s_budat-high+6(2) '.' s_budat-high+4(2)
'.' s_budat-high+0(4) INTO g_budat.
ENDIF.
WRITE g_budat TO ls_line-info.
APPEND ls_line TO lt_top_of_page.
ls_line-key = text-h03.
ls_line-info = sy-uname.
APPEND ls_line TO lt_top_of_page.
ENDFORM. " COMMENT_BUILD

*&---------------------------------------------------------------------*
*& Form alv_field_cat_01
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM alv_field_cat_01 .
DATA:wa_fieldcat TYPE slis_fieldcat_alv.

REFRESH it_fieldcat.
PERFORM field_cat USING 'LIFNR' 'Verdor' '08' '' '' ''.
PERFORM field_cat USING 'NAME1' 'Vendor N' '08' '' '' ''.
PERFORM field_cat USING 'EBELN' 'Po.' '08' '' '' ''.
PERFORM field_cat USING 'EBELP' 'Po.Item' '06' '' '' ''.
PERFORM field_cat USING 'MATKL' 'M.Group' '10' '' '' ''.
PERFORM field_cat USING 'WGBEZ' 'M.Group.D' '20' '' '' ''.
PERFORM field_cat USING 'TXZ01' 'Text' '20' '' '' ''.
PERFORM field_cat USING 'MENGE' 'Qty' '10' 'MEINS' '' ''.
PERFORM field_cat USING 'MEINS' 'Unit' '08' '' '' ''.
PERFORM field_cat USING 'NETPS' 'Price' '08' '' '' ''.
PERFORM field_cat USING 'NETWR' 'PO.Am' '08' 'MEINS' '' ''.
PERFORM field_cat USING 'WAERS' 'Curr' '04' '' '' ''.
PERFORM field_cat USING 'WKURS' 'Rate' '04' '' '' ''.
PERFORM field_cat USING 'MWSKZ' 'Tax' '04' '' '' ''.
PERFORM field_cat USING 'BELNR' 'Gr.No' '08' '' '' ''.
PERFORM field_cat USING 'MENGS' 'Gr.Qty' '10' 'MEINS' 'X' ''.
PERFORM field_cat USING 'DMBTS' 'Gr.Am(L)' '14' 'MEINS' 'X' ''.
PERFORM field_cat USING 'WRBTR' 'Gr.Am(F)' '14' 'MEINS' 'X' ''.
PERFORM field_cat USING 'MENGI' 'Ir.Qty' '10' 'MEINS' '' ''.
PERFORM field_cat USING 'DMBTI' 'Ir.Am' '10' 'MEINS' '' ''.
PERFORM field_cat USING 'SAKTO' 'G/L Ac' '10' '' '' ''.
PERFORM field_cat USING 'KOSTL' 'Cost.C' '08' '' '' ''.
ENDFORM. " alv_field_cat_01


*&--------------------------------------------------------------------*
*& Form alv_show_01
*&--------------------------------------------------------------------*
* text
*---------------------------------------------------------------------*
FORM alv_show_01 .

* wa_layout-zebra = 'X'.
CLEAR : sortcat, sortcat_ln.
sortcat_ln-spos = '1'.
sortcat_ln-fieldname = 'LIFNR'.
sortcat_ln-fieldname = 'EBELN'.
sortcat_ln-up = 'X'.
sortcat_ln-down = space.
sortcat_ln-subtot = 'X'.
APPEND sortcat_ln TO sortcat.

wa_layout-coltab_fieldname = 'COLOR'.
* wa_layout-totals_text = 'Test'.
* wa_layout-subtotals_text = 'Test'.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = wk_repid
it_fieldcat = it_fieldcat
is_layout = wa_layout
i_callback_top_of_page = g_top_of_page
i_callback_user_command = g_command_form
i_default = 'X'
i_save = 'X'
it_events = it_event
it_sort = sortcat
TABLES
t_outtab = itab[]
EXCEPTIONS
program_error = 1
OTHERS = 2.

ENDFORM. " alv_show_01

*&--------------------------------------------------------------------*
*& Form field_cat
*&--------------------------------------------------------------------*
* text
*---------------------------------------------------------------------*
* -->P_FIELD text
* -->P_TEXT text
* -->P_LEN text
* -->P_MEINS text
* -->P_SUM text
* -->P_FIX text
*---------------------------------------------------------------------*
FORM field_cat USING p_field
p_text
p_len
p_meins
p_sum
p_fix.

DATA:wa_fieldcat TYPE slis_fieldcat_alv.

wa_layout-colwidth_optimize = 'X'.

CLEAR wa_fieldcat.
wa_fieldcat-fieldname = p_field.
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-seltext_l = p_text.
wa_fieldcat-outputlen = p_len.
wa_fieldcat-qfieldname = p_meins.
wa_fieldcat-do_sum = p_sum.
wa_fieldcat-fix_column = p_fix.
APPEND wa_fieldcat TO it_fieldcat.

ENDFORM. "field_cat

*&--------------------------------------------------------------------*
*& Form top_of_page
*&--------------------------------------------------------------------*
* text
*---------------------------------------------------------------------*
FORM top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = gt_list_top_of_page.
ENDFORM. " TOP_OF_PAGE

*&--------------------------------------------------------------------*
*& Form user_command
*&--------------------------------------------------------------------*
* text
*---------------------------------------------------------------------*
* -->R_UCOMM text
* -->RS_SELFIELDtext
*---------------------------------------------------------------------*
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE r_ucomm.
WHEN '&IC1'. "doubleclick
READ TABLE itab INDEX rs_selfield-tabindex.
IF sy-subrc = 0.
CASE rs_selfield-fieldname.
WHEN 'BELNR'.
IF itab-belnr IS INITIAL.
EXIT.
ENDIF.
SET PARAMETER ID 'MBN' FIELD itab-belnr.
SET PARAMETER ID 'MJA' FIELD ''.
CALL TRANSACTION 'MB03' AND SKIP FIRST SCREEN.
WHEN 'EBELN'.
IF itab-ebeln IS INITIAL.
EXIT.
ENDIF.
SET PARAMETER ID 'BES' FIELD itab-ebeln.
CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
ENDCASE.
ENDIF.
ENDCASE.
CLEAR r_ucomm.
ENDFORM. "user_command


zclouis :2007.10.09 14:55 ::: ( SAP ) ::Ķ:(1170) :: (0) :: (0)
===========================================================
дݵEXCELģȥ
===========================================================

*&---------------------------------------------------------------------*
*& Report Z_TEST_2
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

REPORT Z_TEST_2.
*---------------------------OLE----------------------------------*
include ole2incl.

data: excel type ole2_object, " Excel object
workbook type ole2_object, " Workbook object
sheet type ole2_object, " Worksheet object
range type ole2_object, " Range object
cell type ole2_object. " Cell object

data: sheet_name(20) value 'BS'. "Excelļsheet name
data local_file like rcgfiletr-ftfront."ļ
local_file = 'c:DO_TEST_OLE.xls'.

START-OF-SELECTION.

data: c1 type i,
c2 type i,
c3 type i,
c4 type i.

create object excel 'EXCEL.APPLICATION'. " CREATE EXCEL OBJECT
if sy-subrc ne 0.
write: / 'Excel init failed, return code is ', sy-subrc.
exit.
endif.
set property of excel 'Visible' = 1.
call method of excel 'Workbooks' = workbook.
data h type i.

call method of workbook 'Open' exporting #1 = local_file.
call method of excel 'Sheets' = sheet exporting #1 = sheet_name.
call method of sheet 'SELECT' .

*̧ͷ
perform fill_range using 1 1 'F_TEST1'.
perform fill_range using 1 2 'F_TEST2'.

free object excel.
free object workbook.
free object sheet.
free object range.
free object cell.


*---------------------------------------------------------------------*
* FORM fill_range *
*---------------------------------------------------------------------*
* ........ *
*---------------------------------------------------------------------*
* --> VALUE(F_ROW) *
* --> VALUE(F_COL) *
* --> VALUE(F_VALUE) *
*---------------------------------------------------------------------*
form fill_range using value(f_row)
value(f_col)
value(f_value).

call method of excel 'CELLS' = cell
exporting
#1 = f_row
#2 = f_col.
set property of cell 'VALUE' = f_value.
endform. "FILL_RANGE


zclouis :2007.10.09 14:52 ::: ( SAP ) ::Ķ:(443) :: (1) :: (0)