BPS Documents

Embed Size (px)

Citation preview

  • 8/10/2019 BPS Documents

    1/30

    How to

    Documents in SEM-BPS

    and BW-BPS

    SEM-BPS/BW-BPS

    Applicable Releases: SEM 3.1B - SEM-BPS 3.5, BW-BPS 3.5

    SAP (SAP America, Inc. and SAP AG) assumes no responsibilit !or errors or omissions in t"ese materials.

    #"ese materials are pro$ided %as is& 'it"out a 'arrant o! an ind, eit"er epress or implied, includin* but not limited to, t"e implied'arranties o! merc"antabilit, !itness !or a particular purpose, or non-in!r in*ement.

    SAP s"all not be liable !or dama*es o! an ind includin* 'it"out limitation direct, special, indirect, or conse+uential dama*es t"atma result !rom t"e use o! t"ese materials.

    SAP does not 'arrant t"e accurac or completeness o! t"e in!ormation, tet, *rap"ics, lins or ot"er items contained 'it"in t"esematerials. SAP "as no control o$er t"e in!ormation t"at ou ma access t"rou*" t"e use o! "ot lins contained in t"ese materials anddoes not endorse our use o! t"ird part 'eb pa*es nor pro$ide an 'arrant '"atsoe$er relatin* to t"ird part 'eb pa*es.

    mSAP BI %o'-#o& papers are intended to simpli! t"e product implementation. W"ile speci!ic product !eatures and procedurestpicall are eplained in a practical business contet, it is not implied t"at t"ose !eatures and procedures are t"e onl approac" insol$in* a speci!ic business problem usin* mSAP BI. S"ould ou 'is" to recei$e additional in!ormation, clari!ication or support,please re!er to SAP Pro!essional Ser$ices (onsultin*/emote onsultin*).

  • 8/10/2019 BPS Documents

    2/30

    HOWTO VARIABLESO!"ME#TS O$T%PEE&ITI#SEM-BPS A#BW-BPS

    1 Sample Scenarios - Description___________________________________________________________2

    1.1 Copy Documents using a Planning Function____________________________________________2

    1.2 Delete Documents using a Planning Function___________________________________________2

    2 General Hints_________________________________________________________________________2

    3 Sample Scenarios: The Step By Step Solution_______________________________________________5

    3.1 Introduction_______________________________________________________________________5

    3.2 Basics____________________________________________________________________________5

    3.3 The Delete Function________________________________________________________________5

    3. The Copy Function_________________________________________________________________!

    3.4.1 Creating the planning function________________________________________________________63.4.2 Creating the parameter group_________________________________________________________7

    '((' SAP AMERI!A, I#!. A#SAP A)

  • 8/10/2019 BPS Documents

    3/30

    HOWTO VARIABLESO!"ME#TS O$T%PEE&ITI#SEM-BPS A#BW-BPS

    '((' SAP AMERI!A, I#!. A#SAP A)

  • 8/10/2019 BPS Documents

    4/30

    HOWTO VARIABLESO!"ME#TS O$T%PEE&ITI#SEM-BPS A#BW-BPS

    1

    ' Sa*ple Sce+ais - escipi+

    '.1 c/*e+ 0a+li+2 i+ 0e SEM-BPSBW-BPS

    In t"e SEM-BPS/BW-BPS t"e user can attac" documents (tpe MS Word, MS Po'erPoint, MS Ecelor Plain #et) to certain combinations o! c"aracteristic $alues and e!i*ure $alues. ne 'a to usedocuments is to enable t"e document !unctionalit in t"e manual plannin* and to create documentst"at are attac"ed to t"e c"aracteristic combination (includin* a e!i*ure) t"at is de!ined b a cell in alaout. #"e documents are stored in t"e 0no'led*e Ware"ouse and t"us are accessible in t"e BWas 'ell. As t"e 0no'led*e Ware"ouse o!!ers !unctionalit !or document mana*ement (suc" ascopin*, deletin*, etc.) t"e SEM-BPS/BW-BPS onl pro$ides t"e !ollo'in* !unctionalit1 to create,

    $ie', or delete sin*le documents.

    #"e e t"at is used to store t"e documents is made up !rom c"aracteristic $alues and possible!i*ures. nl t"ose c"aracteristics can be used as es t"at are %commentable&. 2ou can s'itc"t"at !eature on in t"e BW In!o b3ect maintenance b settin* t"e !la* %"aracteristic is documentattrib.&.

    '.' !p4 c/*e+s /si+2 a Pla++i+2 $/+ci+

    As t"e documents "old comments about speci!ic plan data and t"us are closel related to t"e datacustomers also 'ant to treat documents to*et"er 'it" t"e data, e.*. cop documents to a ne'$ersions '"ene$er t"e plan data is copied to t"at $ersion. #"is s"ould be done 'it" a plannin*

    !unction, as t"us t"e !unctionalit is accessible in all !ront ends alie and also can be combined 'it"a cop !unction (!or plan data) in a plannin* se+uence.

    #"e plannin* !unction must do a p"sical cop o! t"e documents on t"e database. I! ou 'ant toaccess t"e same document in sa t'o di!!erent $ersions it is better not to mar $ersion as bein*commentable as t"us t"e $ersion 'ill be i*nored '"en selectin* t"e documents.

    '.3 elee c/*e+s /si+2 a Pla++i+2 $/+ci+

    In t"e SEM-BPS/BW-BPS documents can onl be deleted one b one. I! data records are deletedt"e documents related to t"at data are not deleted. #"ere are a number o! reasons '" t"e sstembe"a$es t"is 'a. n t"e ot"er "and sometimes t"e documents s"ould be deleted to*et"er 'it" t"eplan data. A*ain t"is !unctionalit s"ould be reali4ed in a plannin* !unction.

    3 )e+eal Hi+s

    #"e SEM-BPS/BW-BPS o!!ers t'o di!!erent 'as to displa documents1

    '((' SAP AMERI!A, I#!. A#SAP A)

  • 8/10/2019 BPS Documents

    5/30

    HOWTO VARIABLESO!"ME#TS O$T%PEE&ITI#SEM-BPS A#BW-BPS

    5. #"e document !unctionalit in t"e Plannin* 6rame'or (prede!ined met"od 7-8). #"e!unctionalit is accessible $ia a node in t"e lo'er tree and displas all documents t"at belon*to a certain selection *i$en b t"e selected paca*e. #"is !unction displas a list o! alldocuments t"at contain rele$ant selections !or all (commentable) c"aracteristics t"at are int"e plannin* le$el. I! a document "as selections !or additional c"aracteristics (and t"us bein*de!ined in a le$el t"at is implicitl contained in t"e plannin* le$el) it 'ill be s"o'n as 'ell.8ocuments created or displaed 'it" t"is !unctionalit need not contain a e!i*ure in t"eselection.

    9. #"e document !unctionalit in t"e Manual Plannin*/Web. #"e !unctionalit is a$ailable !or alaout i! it is s'itc"ed to %read documents& in t"e laout builder. 8ocuments can be attac"edto plan data in cells (or columns in t"e Web). nl t"ose documents 'ill be s"o'n t"at "a$erele$ant selections !or eactl t"e commentable c"aracteristics o! t"e plannin* le$el and t"atalso "a$e a selection !or a e!i*ure. 8ocuments t"at "a$e additional c"aracteristics in t"eselection or do not "a$e a e!i*ure in t"e selection 'ill not be s"o'n.

    '((' SAP AMERI!A, I#!. A#SAP A)

  • 8/10/2019 BPS Documents

    6/30

    HOWTO VARIABLESO!"ME#TS O$T%PEE&ITI#SEM-BPS A#BW-BPS

    Eample1

    "aracteristics in t"e plannin* le$el (all commentable)1

    7:ESI;

    7

  • 8/10/2019 BPS Documents

    7/30

    HOWTO VARIABLESO!"ME#TS O$T%PEE&ITI#SEM-BPS A#BW-BPS

    7

  • 8/10/2019 BPS Documents

    8/30

    HOWTO VARIABLESO!"ME#TS O$T%PEE&ITI#SEM-BPS A#BW-BPS

    Sa*ple Sce+ais: T0e Sep B4 Sep Sl/i+

    .1 I+/ci+In t"is paper 'e 'ant to s"o' "o' a cop !unction and a delete !unction !or documents can be usedin t"e SEM-BPS/BW-BPS. 6rom release =.5B, Support Paca*e 5> and release =.9, Support Pac57 and "i*"er releases t"ere are s"ipped reali4ations !or suc" !unctions done as plannin* !unctionstpe eit. #"e same !unction modules are described in SS ;ote ?@=>.

    #"e lo*ic "o' t"ese !unctions 'or and "o' t"e are to be used 'ill be eplained in t"is paper.

    .' Basics

    #"e s"ipped $ersions o! t"e plannin* !unctions !or copin* and deletin* documents can be !ound int"e !unction *roup

  • 8/10/2019 BPS Documents

    9/30

    HOWTO VARIABLESO!"ME#TS O$T%PEE&ITI#SEM-BPS A#BW-BPS

    1.

    '((' SAP AMERI!A, I#!. A#SAP A)

  • 8/10/2019 BPS Documents

    10/30

    HOWTO VARIABLESO!"ME#TS O$T%PEE&ITI#SEM-BPS A#BW-BPS

    2.

    3.

    4.

    5.

    6.

    7. Error1 e!erence source not !ound Error: Reference source not found

    8.

    '((' SAP AMERI!A, I#!. A#SAP A)

  • 8/10/2019 BPS Documents

    11/30

    HOWTO VARIABLESO!"ME#TS O$T%PEE&ITI#SEM-BPS A#BW-BPS

    9.

    10.

    11.

    12.

    13.

    14.

    15.

    '((' SAP AMERI!A, I#!. A#SAP A)

  • 8/10/2019 BPS Documents

    12/30

    HOWTO VARIABLESO!"ME#TS O$T%PEE&ITI#SEM-BPS A#BW-BPS

    16.

    17.

    #"e op 6unction

    I! ou use t"e standard cop !unction in t"e BPS ou "a$e to de!ine t"e source and t"e tar*et o! t"e

    copin* process. #"e tar*et "as to be contained in t"e selection o! t"e plannin* paca*e, t"ein!ormation '"ic" source 'ill be copied to '"ic" tar*et is *i$en in t"e parameter *roup. #"e eit!unction deli$ered in t"e !unction *roup

  • 8/10/2019 BPS Documents

    13/30

    HOWTO VARIABLESO!"ME#TS O$T%PEE&ITI#SEM-BPS A#BW-BPS

    3..' !eai+2 0e paa*ee 2/p

    As 'it" a normal plannin* !unction tpe cop ou can use di!!erent parameter *roups. In t"eparameter *roups t"e eit parameters are !illed 'it" t"e name o! t"e c"aracteristic(s), t"e %!rom& andt"e %to& $alues.

    "aracteristics1

    6or t"e c"aracteristics ou "a$e to use t"e tec"nical name (e.*. 7BPSD;#2). I! ou 'ant to cop!rom one e!i*ure to anot"er ou "a$e to enter %DB0E;;HA& !or t"e c"aracteristic.

    %6rom& and %to& $alues1

    In t"ese !ields ou enter t"e $alue !or t"e c"aracteristic in t"e eternal !ormat. Please mae sure t"att"e $alue is not lon*er t"an 7 c"aracters (a $alue mi*"t be up to 7 c"aracters) as b de!inition eit

    parameters can onl "a$e 7 c"aracters. I! ou 'ant to cop bet'een e!i*ures and "a$e entered%DB0E;;HA& as c"aracteristic please enter t"e tec"nical names o! t"e e!i*ures.

    2ou can also use $ariables !or speci!in* t"e %!rom& and t"e %to& $alue. Enter manuall t"e name o!t"e $ariable in t"e rele$ant !ield. Please mae sure t"at our $ariable "as a name t"at is not identical'it" some c"aracteristic $alue. #"e sstem 'ill c"ec at runtime t"at t"e $ariable contains onl onesin*le $alue. I! t"e $ariable contains an inter$al and/or se$eral sin*le $alues t"e sstem 'ill stop t"eeecution o! t"e plannin* !unction.

    '((' SAP AMERI!A, I#!. A#SAP A)

  • 8/10/2019 BPS Documents

    14/30

    HOWTO VARIABLESO!"ME#TS O$T%PEE&ITI#SEM-BPS A#BW-BPS

    In t"is eample 'e cop documents !rom countr J8EK to a countr t"at is speci!ied b a $ariablecalled %:A

  • 8/10/2019 BPS Documents

    15/30

    HOWTO VARIABLESO!"ME#TS O$T%PEE&ITI#SEM-BPS A#BW-BPS

    *" REFERENCE!I_MET'OD# T$PE UPC_$_MET'OD*" REFERENCE!I_PRM# T$PE UPC_$_PRM*" REFERENCE!IT_E(ITP# T$PE UPF_$T_E(ITP*" REFERENCE!ITO_C')EL# T$PE UPC_$TO_C')EL*" REFERENCE!ITO_C'# T$PE UPC_$TO_C'*" REFERENCE!ITO_&$F# T$PE UPC_$TO_&$F*" E(PORTIN

    *" REFERENCE!ETO_C')# T$PE N$ TLE*" REFERENCE!ET_ME)# T$PE UPC_$T_ME)*"----------------------------------------------------------------------

    * T+,s ann,n/ funct,on deetes a docu0ents seected ,n t+e* ann,n/ ac1a/e. T+,s a,es to a docu0ents t+at are* de2ned on t+e sa0e e3e of a//re/at,on as t+e ann,n/ funct,on4* ,.e. on5 t+ose docu0ents are deeted t+at are 3,s,6e ,n a a5out* us,n/ t+e sa0e ac1a/e.

    * T+e fra0e7or1 does on5 ca t+e sa3e 0et+od for docu0ents* ,8 an5 docu0ent funct,ona,t5 ,s started fro0 t+e fra0e7or1.* s t+e fra0e7or1 does not 1no7 a6out t+e docu0ents created ,n* t+,s custo0er e9,t funct,on t+e sa3e 0ust 6e caed +ere. T+us* docu0ents are a7a5s sa3ed 7+en t+,s funct,on ,s caed.

    data: r_doc t5e ref to CL_)EM_MP_DOCUMENT)4 r_area_attr t5e ref to c_se0_anarea_attr,6utes.

    data: to_doc t5e UPC_$TO_DOC4 to_docu0ent_on/ t5e uc_5to_docu0ent_on/4 to_c+a t5e uc_5to_c+a4 to_c+a_co0 t5e uc_5to_c+a4 to_e3e1 t5e UPC_$TO_&$F4 to_c+ase ,1e ,to_c+ase4 s_c+a t5e uc_5s_c+a4 s_c+aro t5e uc_5s_c+aro4 s_0es/ t5e uc_5s_0es/4 s_doc t5e uc_5s_doc4

    s_docu0ent_on/ t5e uc_5s_docu0ent_on/4 s_15f t5e UPC_$)_&$F4 s_c+ase t5e UPC_$)_C')EL4 s_c+arn/ t5e uc_5s_c+arn/.

    to_c+ase ,to_c+ase.

    * /et t+e ,st of c+aracters fro0 t+e e3e CLL FUNCTION ;UPC_PLE%EL_ET; E(PORTIN I_RE ,_area I_PLE%EL ,_e3e IMPORTIN ETO_PLE%ELC to_c+a ETO_PLE%EL& to_e3e1 E(CEPTION) NO_E(I)TENCE < LOC&ED = NO_CON)I)TENCE > OT'ER) ?. IF )$-)URC @A B. s_0es/-0s/,d s5-0s/,d.s_0es/-0s/t5 s5-0s/t5. s_0es/-0s/no s5-0s/no.s_0es/-0s/3< s5-0s/3 s5-0s/3>. s_0es/-0s/3? s5-0s/3?.

    '((' SAP AMERI!A, I#!. A#SAP A)

  • 8/10/2019 BPS Documents

    16/30

    HOWTO VARIABLESO!"ME#TS O$T%PEE&ITI#SEM-BPS A#BW-BPS

    aend s_0es/ to et_0es/. e9,t. ENDIF.

    * /et an ,nstance of t+e anarea CLL MET'OD CL_)EM_PLNRE_TTRIUTE)AET_IN)TNCE E(PORTIN

    I_RE ,_area RECEI%IN ER_IN)TNCE r_area_attr E(CEPTION) FILED < ot+ers =. IF )$-)URC @A B. s_0es/-0s/,d s5-0s/,d.s_0es/-0s/t5 s5-0s/t5. s_0es/-0s/no s5-0s/no.s_0es/-0s/3< s5-0s/3 s5-0s/3>. s_0es/-0s/3? s5-0s/3?. aend s_0es/ to et_0es/. e9,t. ENDIF.

    cear to_c+a_co0.

    * 2 t+e ta6e of c+ars t+at can +a3e a co00ent oo at to_c+a ,nto s_c+a. read ta6e r_area_attr-Ato_c+aro ,nto s_c+aro 7,t+ ta6e 1e5 c+an0 s_c+a-c+an0. ,f s_c+aro-D)FL ,s ,n,t,a. deete to_c+ase 7+ere c+an0 s_c+a-c+an0. ese. ,nsert s_c+a ,nto ta6e to_c+a_co0. end,f. endoo.

    ,f to_c+a_co0 ,s ,n,t,a.

    * 0essa/e ,BB ra,s,n/ fa,ed. e9,t. end,f.

    s_c+a-c+an0 c_se0_0_docu0entsAc_na0e_1e5f. ,nsert s_c+a ,nto ta6e to_c+a_co0.

    * 7e ,nsert a seect,on for t+e 1e52/ure - e9act5 t+e ones t+at are* ,n t+e e3e cear s_c+ase. s_c+ase-c+an0 c_se0_0_docu0entsAc_na0e_1e5f.

    oo at to_e3e1 ,nto s_15f. s_c+arn/-s,/n ;I;. s_c+arn/-ot,on ;E;. s_c+arn/-o7 s_15f-15fn0. cear s_c+arn/-+,/+. aend s_c+arn/ to s_c+ase-t_c+arn/. endoo. ,f not s_c+ase-t_c+arn/ ,s ,n,t,a. ,nsert s_c+ase ,nto ta6e to_c+ase. end,f.

    * /et a o6ect of t+e 6u8er cass CLL MET'OD CL_)EM_MP_DOCUMENT)AET_IN)TNCE

    '((' SAP AMERI!A, I#!. A#SAP A)

  • 8/10/2019 BPS Documents

    17/30

    HOWTO VARIABLESO!"ME#TS O$T%PEE&ITI#SEM-BPS A#BW-BPS

    E(PORTIN I_RE ,_area RECEI%IN ER_IN)TNCE r_doc.

    * oad t+e docu0ents CLL MET'OD LR_DOC-AET_DOCUMENT_LI)T

    E(PORTIN ITO_C' to_c+a_co0 ITO_C')EL to_c+ase IMPORTIN ETO_DOCUMENT_LON to_docu0ent_on/ E(CEPTION) FILED < ot+ers =. IF )$-)URC @A B. s_0es/-0s/,d s5-0s/,d.s_0es/-0s/t5 s5-0s/t5. s_0es/-0s/no s5-0s/no.s_0es/-0s/3< s5-0s/3 s5-0s/3>. s_0es/-0s/3? s5-0s/3?. aend s_0es/ to et_0es/. e9,t. ENDIF.

    cear to_doc.

    oo at to_docu0ent_on/ ,nto s_docu0ent_on/. s_doc-DOC_ID s_docu0ent_on/-DOC_ID. s_doc-DOC_)OURCE ;D;. s_doc-DOC_TITLE s_docu0ent_on/-DOC_TITLE. s_doc-DOC_)IE s_docu0ent_on/-DOC_)IE. s_doc-DOC_T$PE s_docu0ent_on/-DOC_T$PE. s_doc-TO_C'%L s_docu0ent_on/-TO_C'%L. s_doc-RE ,_area. s_doc-todo ;D;. ,nsert s_doc ,nto ta6e to_doc.

    endoo.

    *7r,te to 6u8er CLL MET'OD r_doc-AUPDTE_DOCUMENT_LI)T E(PORTIN ITO_DOC to_doc ITO_C' TO_C'_COM E(CEPTION) FILED < ot+ers =. IF )$-)URC @A B. s_0es/-0s/,d s5-0s/,d.s_0es/-0s/t5 s5-0s/t5. s_0es/-0s/no s5-0s/no.s_0es/-0s/3< s5-0s/3 s5-0s/3>. s_0es/-0s/3? s5-0s/3?. aend s_0es/ to et_0es/. e9,t. ENDIF.

    * T+e fra0e7or1 does on5 ca t+e sa3e 0et+od for docu0ents* ,8 an5 docu0ent funct,ona,t5 ,s started fro0 t+e fra0e7or1.* s t+e fra0e7or1 does not 1no7 a6out t+e docu0ents created ,n* t+,s custo0er e9,t funct,on t+e sa3e 0ust 6e caed +ere. T+us* docu0ents are a7a5s sa3ed 7+en t+,s funct,on ,s caed. CLL MET'OD CL_)EM_MP_DOCUMENT)A)%E

    '((' SAP AMERI!A, I#!. A#SAP A)

  • 8/10/2019 BPS Documents

    18/30

    HOWTO VARIABLESO!"ME#TS O$T%PEE&ITI#SEM-BPS A#BW-BPS

    E(PORTIN I_)%E_MODE ;D; E(CEPTION) FILED < ot+ers =. IF )$-)URC @A B. s_0es/-0s/,d s5-0s/,d.s_0es/-0s/t5 s5-0s/t5.

    s_0es/-0s/no s5-0s/no.s_0es/-0s/3< s5-0s/3 s5-0s/3>. s_0es/-0s/3? s5-0s/3?. aend s_0es/ to et_0es/. e9,t. ENDIF.

    ENDFUNCTION.

    5.1.' "P$

  • 8/10/2019 BPS Documents

    19/30

    HOWTO VARIABLESO!"ME#TS O$T%PEE&ITI#SEM-BPS A#BW-BPS

    '((' SAP AMERI!A, I#!. A#SAP A)

  • 8/10/2019 BPS Documents

    20/30

    HOWTO VARIABLESO!"ME#TS O$T%PEE&ITI#SEM-BPS A#BW-BPS

    '((' SAP AMERI!A, I#!. A#SAP A)

  • 8/10/2019 BPS Documents

    21/30

    HOWTO VARIABLESO!"ME#TS O$T%PEE&ITI#SEM-BPS A#BW-BPS

    5.' T0e !p4 $/+ci+

    5.'.1 "P$FUNCTION uf_doc_co5_,n,t .*"----------------------------------------------------------------------*"*"Interface:*" IMPORTIN*" REFERENCE!I_RE# T$PE UPC_$_RE*" REFERENCE!I_PLE%EL# T$PE UPC_$_PLE%EL*" REFERENCE!I_PC&E# T$PE UPC_$_PC&E*" REFERENCE!I_MET'OD# T$PE UPC_$_MET'OD*" REFERENCE!I_PRM# T$PE UPC_$_PRM*" REFERENCE!IT_E(ITP# T$PE UPF_$T_E(ITP*" REFERENCE!ITO_C')EL# T$PE UPC_$TO_C')EL*" REFERENCE!ITO_C'# T$PE UPC_$TO_C'*" REFERENCE!ITO_&$F# T$PE UPC_$TO_&$F*" E(PORTIN*" REFERENCE!ETO_C')# T$PE N$ TLE*" REFERENCE!ET_ME)# T$PE UPC_$T_ME)*"----------------------------------------------------------------------

    * T+,s funct,on ,s used for co5,n/ docu0ents fro0 a set of* c+aracter,st,c co06,nat,ons to anot+er. s 7,t+ a nor0a ann,n/

    * funct,on of t5e co5 t+e TRET ,s sec,2ed 65 t+e ann,n/ ac1a/e.* T+e "fro0" and "to" 3aues are sec,2ed 65 t+e ara0eter /rou.* Note t+at on5 docu0ents are co,ed t+at are de2ned ,n t+e sa0e e3e* of a//re/at,on4 ,.e. a docu0ents are co,ed t+at are 3,s,6e ,n a* a5out ,n t+e sa0e ann,n/ e3e.

    * For sec,f5,n/ t+e "fro0" and "to" 3aues 7e use t+e e9,t ara0eters* ,n t+e ara0eter /rou. For eac+ c+aracter,st,c 7e use > ara0eters:*

  • 8/10/2019 BPS Documents

    22/30

    HOWTO VARIABLESO!"ME#TS O$T%PEE&ITI#SEM-BPS A#BW-BPS

    * >. To-3aue !s,n/e 3aue reGu,red#* T+,s /rou +as to 6e reeated for e3er5 c+aracter,st,c used.

    * T+e 3aues +a3e to 6e entered ,n t+e e9terna for0at. Eac+ 2ed* +as to 6e 2ed. Ma1e sure t+at t+e e9terna 3aue ,s not* on/er t+an HB c+aracters as t+,s ,s t+e ,0,t for t+e 2eds* ,n t+e e9,t ara0eters.

    ** Instead of enter,n/ a c+aracter,st,c 3aue 5ou can enter t+e na0e of* a 3ar,a6e de2ned ,n t+e sa0e ann,n/ area !5ou cannot use t+e* 3ar,a6e 6utton 6ut +a3e to enter t+e na0e 0anua5#. t runt,0e t+e* s5ste0 7, 2rst c+ec1 7+et+er t+e entr5 ,n an e9,t ara0eter ,s* t+e na0e of a 3ar,a6e. T+us 5ou s+oud not create 3ar,a6es t+at* +a3e t+e sa0e na0e as a c+aracter,st,c 3aue.

    * If t+e s5ste0 detects a 3ar,a6e ,t 7,* c+ec1 t+at t+e 3ar,a6e ,s 2ed 7,t+ e9act5 one 3aue. If t+e* 3ar,a6e ,s not 2ed or ,t ,s 2ed 7,t+ 0or t+an a s,n/e 3aue* t+e s5ste0 7, sto t+e ann,n/ funct,on.

    * 'ere an e9a0e +o7 t+e de2n,t,on of t+e funct,on s+oud* oo1 ,1e us,n/ t7o c+aracter,st,cs. Pease foo7 t+e na0,n/* con3ent,on 7,t+ t+e ead,n/ d,/,ts ,n order to +a3e a cear* /rou,n/ and order:

    * Para0eter na0e Data ee0ent*

  • 8/10/2019 BPS Documents

    23/30

    HOWTO VARIABLESO!"ME#TS O$T%PEE&ITI#SEM-BPS A#BW-BPS

    c+an0 T$PE uc_5_c+an04 fro0 T$PE uc_5_o74 to T$PE uc_5_o74 END OF 5s_fro0_to4

    5t_fro0_to T$PE )TNDRD TLE OF 5s_fro0_to.

    DT: s_fro0_to T$PE 5s_fro0_to4 t_fro0_to T$PE 5t_fro0_to.

    DT: _cntr T$PE n4 _su6rc LI&E s5-su6rc4 _e9,t T$PE c4 _,nes t5e ,.

    to_c+ase ,to_c+ase.

    * /et t+e ,st of c+aracters fro0 t+e e3e CLL FUNCTION ;UPC_PLE%EL_ET; E(PORTIN ,_area ,_area ,_e3e ,_e3e IMPORTIN eto_e3ec to_c+a eto_e3e1 to_e3e1 E(CEPTION) no_e9,stence < oc1ed = no_cons,stence > OT'ER) ?. IF s5-su6rc @A B. s_0es/-0s/,d s5-0s/,d.s_0es/-0s/t5 s5-0s/t5. s_0es/-0s/no s5-0s/no.s_0es/-0s/3< s5-0s/3 s5-0s/3>. s_0es/-0s/3? s5-0s/3?. PPEND s_0es/ TO et_0es/.

    E(IT. ENDIF.

    * /et an ,nstance of t+e anarea CLL MET'OD c_se0_anarea_attr,6utesA/et_,nstance E(PORTIN ,_area ,_area RECEI%IN er_,nstance r_area_attr E(CEPTION) fa,ed < OT'ER) =. IF s5-su6rc @A B. s_0es/-0s/,d s5-0s/,d.s_0es/-0s/t5 s5-0s/t5. s_0es/-0s/no s5-0s/no.s_0es/-0s/3< s5-0s/3 s5-0s/3>. s_0es/-0s/3? s5-0s/3?. PPEND s_0es/ TO et_0es/. E(IT. ENDIF.

    CLER to_c+a_co0.

    * 2 t+e ta6e of c+ars t+at can +a3e a co00ent LOOP T to_c+a INTO s_c+a.

    '((' SAP AMERI!A, I#!. A#SAP A)

  • 8/10/2019 BPS Documents

    24/30

    HOWTO VARIABLESO!"ME#TS O$T%PEE&ITI#SEM-BPS A#BW-BPS

    RED TLE r_area_attr-Ato_c+aro INTO s_c+aro IT' TLE &E$ c+an0 s_c+a-c+an0. IF s_c+aro-6dsJ I) INITIL. DELETE to_c+ase 'ERE c+an0 s_c+a-c+an0. EL)E. IN)ERT s_c+a INTO TLE to_c+a_co0. ENDIF.

    ENDLOOP.

    IF to_c+a_co0 I) INITIL.* 0essa/e ,BB ra,s,n/ fa,ed. E(IT. ENDIF.

    s_c+a-c+an0 c_se0_0_docu0entsAc_na0e_1e5f. IN)ERT s_c+a INTO TLE to_c+a_co0.

    * 7e ,nsert a seect,on for t+e 1e52/ure - e9act5 t+e ones t+at are* ,n t+e e3e CLER s_c+ase. s_c+ase-c+an0 c_se0_0_docu0entsAc_na0e_1e5f.

    LOOP T to_e3e1 INTO s_15f. s_c+arn/-s,/n ;I;. s_c+arn/-ot,on ;E;. s_c+arn/-o7 s_15f-15fn0. CLER s_c+arn/-+,/+. PPEND s_c+arn/ TO s_c+ase-t_c+arn/. ENDLOOP. IF NOT s_c+ase-t_c+arn/ I) INITIL. IN)ERT s_c+ase INTO TLE to_c+ase. ENDIF.

    * 6u,d u at ta6e for co5,n/ descr,6e ta6e ,t_e9,t ,nes _,nes. _,nes _,nes 0od >.

    ,f _,nes @A B. e9,t. end,f.

    CLER _e9,t. LOOP T ,t_e9,t INTO s_e9,t. DD < TO _cntr.

    C)E _cntr. 'EN ;

  • 8/10/2019 BPS Documents

    25/30

    HOWTO VARIABLESO!"ME#TS O$T%PEE&ITI#SEM-BPS A#BW-BPS

    U)IN s_e9,t-c+a3 ,_area s_fro0_to-c+an0 C'NIN s_fro0_to-to _su6rc et_0es/. IF _su6rc @A B. _e9,t ;(;. E(IT. ENDIF.

    * c+ec1 t+at t+e c+aractar,st,c ,s co00enta6e RED TLE to_c+a_co0 TRN)PORTIN NO FIELD) IT' &E$ c+an0 s_fro0_to-c+an0. IF s5-su6rc B. PPEND s_fro0_to TO t_fro0_to. ENDIF. CLER _cntr. ENDC)E. ENDLOOP.

    C'EC& _e9,t I) INITIL.

    * as 7,t+ ann,n/ funct,ons t+e seect,on ,n t+e ac1a/e* deter0,nes t+e TRETK E9c+an/e t+e 3aues ,n t+e seect,on 65 t+e* fro0 3aues ,n t+e ta6e fro0_to. If t+e seect,on ,n t+e ac1a/e* ,s 6,//er t+e 7e restr,ct ,t. LOOP T t_fro0_to INTO s_fro0_to. s_c+ase-c+an0 s_fro0_to-c+an0. s_c+arn/-s,/n ;I;. s_c+arn/-ot,on ;E;. s_c+arn/-o7 s_fro0_to-fro0. CLER s_c+arn/-+,/+.

    CLER s_c+ase-t_c+arn/. PPEND s_c+arn/ TO s_c+ase-t_c+arn/.

    DELETE to_c+ase 'ERE c+an0 s_fro0_to-c+an0. IN)ERT s_c+ase INTO TLE to_c+ase. ENDLOOP.

    * /et a o6ect of t+e 6u8er cass CLL MET'OD c_se0_0_docu0entsA/et_,nstance E(PORTIN ,_area ,_area RECEI%IN er_,nstance r_doc.

    * oad t+e docu0ents CLL MET'OD r_doc-A/et_docu0ent_,st E(PORTIN ,to_c+a to_c+a_co0 ,to_c+ase to_c+ase IMPORTIN eto_docu0ent_on/ to_docu0ent_on/ E(CEPTION) fa,ed < OT'ER) =. IF s5-su6rc @A B. s_0es/-0s/,d s5-0s/,d.s_0es/-0s/t5 s5-0s/t5. s_0es/-0s/no s5-0s/no.s_0es/-0s/3< s5-0s/3 s5-0s/3>. s_0es/-0s/3? s5-0s/3?. PPEND s_0es/ TO et_0es/. E(IT.

    '((' SAP AMERI!A, I#!. A#SAP A)

  • 8/10/2019 BPS Documents

    26/30

    HOWTO VARIABLESO!"ME#TS O$T%PEE&ITI#SEM-BPS A#BW-BPS

    ENDIF.

    CLER to_doc. LOOP T to_docu0ent_on/ INTO s_docu0ent_on/. CLER s_doc.

    * c+an/e t+e seect,on

    LOOP T s_docu0ent_on/-to_c+a3 INTO s_c+a3. RED TLE t_fro0_to INTO s_fro0_to IT' &E$ c+an0 s_c+a3-c+an0 FROM s_c+a3-c+a3,nt. IF s5-su6rc @A B. CONTINUE. ENDIF.

    DELETE TLE s_docu0ent_on/-to_c+a3 FROM s_c+a3.

    s_c+a3-c+a3,nt s_fro0_to-to. IN)ERT s_c+a3 INTO TLE s_docu0ent_on/-to_c+a3. ENDLOOP.

    * create a /u,d CLL FUNCTION ;UID_CRETE; IMPORTIN e3_/u,d_== s_doc-doc_,d.

    s_doc-todo ;I;. s_doc-doc_source ;D;. s_doc-to_c+a3 s_docu0ent_on/-to_c+a3. s_doc-doc_t,te s_docu0ent_on/-doc_t,te. s_doc-doc_s,e s_docu0ent_on/-doc_s,e. s_doc-doc_t5e s_docu0ent_on/-doc_t5e. s_doc-area ,_area.

    * /et t+e content CLL MET'OD r_doc-A/et_docu0ent_content E(PORTIN

    ,_doc_,d s_docu0ent_on/-doc_,d IMPORTIN et_content s_doc-t_content et_as_content s_doc-t_as_content E(CEPTION) fa,ed < no_docu0ent_found = OT'ER) >. IF s5-su6rc @A B. s_0es/-0s/,d s5-0s/,d.s_0es/-0s/t5 s5-0s/t5. s_0es/-0s/no s5-0s/no.s_0es/-0s/3< s5-0s/3 s5-0s/3>. s_0es/-0s/3? s5-0s/3?. PPEND s_0es/ TO et_0es/. E(IT. ENDIF. IN)ERT s_doc INTO TLE to_doc. ENDLOOP.

    *7r,te to 6u8er CLL MET'OD r_doc-Audate_docu0ent_,st E(PORTIN ,to_doc to_doc ,to_c+a to_c+a_co0 E(CEPTION)

    '((' SAP AMERI!A, I#!. A#SAP A)

  • 8/10/2019 BPS Documents

    27/30

    HOWTO VARIABLESO!"ME#TS O$T%PEE&ITI#SEM-BPS A#BW-BPS

    fa,ed < OT'ER) =. IF s5-su6rc @A B. s_0es/-0s/,d s5-0s/,d.s_0es/-0s/t5 s5-0s/t5. s_0es/-0s/no s5-0s/no.s_0es/-0s/3< s5-0s/3 s5-0s/3>. s_0es/-0s/3? s5-0s/3?.

    PPEND s_0es/ TO et_0es/. E(IT. ENDIF.

    * T+e fra0e7or1 does on5 ca t+e sa3e 0et+od for docu0ents* ,8 an5 docu0ent funct,ona,t5 ,s started fro0 t+e fra0e7or1.* s t+e fra0e7or1 does not 1no7 a6out t+e docu0ents created ,n* t+,s custo0er e9,t funct,on t+e sa3e 0ust 6e caed +ere. T+us* docu0ents are a7a5s sa3ed 7+en t+,s funct,on ,s caed. CLL MET'OD c_se0_0_docu0entsAsa3e E(PORTIN ,_sa3e_0ode ;D; E(CEPTION) fa,ed < OT'ER) =. IF s5-su6rc @A B. s_0es/-0s/,d s5-0s/,d.s_0es/-0s/t5 s5-0s/t5. s_0es/-0s/no s5-0s/no.s_0es/-0s/3< s5-0s/3 s5-0s/3>. s_0es/-0s/3? s5-0s/3?. PPEND s_0es/ TO et_0es/. E(IT. ENDIF.

    ENDFUNCTION.

    *--------------------------------------------------------------------** For0 reace_3ar,a6e

    *--------------------------------------------------------------------** te9t*---------------------------------------------------------------------** --AI_C'%L te9t* --AI_RE te9t* --AI_C'NM te9t* --A(_%LUE te9t* --A(_)URC te9t* --A(T_ME) te9t*---------------------------------------------------------------------*FORM reace_3ar,a6e U)IN ,_c+a3 T$PE uc_5_c+a3,nt ,_area T$PE uc_5_area ,_c+an0 T$PE uc_5_c+an0 C'NIN 9_3aue T$PE uc_5_o7 9_su6rc LI&E s5-su6rc 9t_0es/ T$PE uc_5t_0es/.

    DT: to_3aue T$PE uc_5to_c+arse4 s_3aue T$PE uc_5s_c+arse4 r_3ar,a6e T$PE REF TO c_se0_3ar,a6e4 s_0es/ T$PE uc_5s_0es/4 _c+a3e9t T$PE uc_5_c+a3e9t4 _3arn0 T$PE uc_5_3ar,a6e4

    '((' SAP AMERI!A, I#!. A#SAP A)

  • 8/10/2019 BPS Documents

    28/30

    HOWTO VARIABLESO!"ME#TS O$T%PEE&ITI#SEM-BPS A#BW-BPS

    _,nes T$PE ,.

    CLER: 9_su6rc4 9_3aue.

    CL)) c_se0_0_docu0ents DEFINITION LOD.

    * 0a56e 7e +a3e a 3ar,a6e - tr5 to reace ,t

    * does t+e 3ar,a6e e9,st _3arn0 ,_c+a3.

    CLL MET'OD c_se0_3ar,a6eA/et_,nstance E(PORTIN ,_area ,_area ,_3ar,a6e _3arn0 RECEI%IN rr_3ar,a6e r_3ar,a6e E(CEPTION) OT'ER)

  • 8/10/2019 BPS Documents

    29/30

    HOWTO VARIABLESO!"ME#TS O$T%PEE&ITI#SEM-BPS A#BW-BPS

    s_0es/-0s/3? s5-0s/3?. PPEND s_0es/ TO 9t_0es/. E(IT. ENDIF. "s5-su6rc

    * t+e 3ar,a6e 0ust conta,n a s,n/e 3aue DE)CRIE TLE to_3aue LINE) _,nes.

    RED TLE to_3aue INDE( < INTO s_3aue.

    IF _,nes @A < OR NOT s_3aue-+,/+ I) INITIL. CLER s_0es/. s_0es/-0s/,d ;UPP_L;. s_0es/-0s/t5 ;E;. s_0es/-0s/no ;BQ;. s_0es/-0s/3< _3arn0. PPEND s_0es/ TO 9t_0es/. 9_su6rc

    *" REFERENCE!I_PC&E# T$PE UPC_$_PC&E*" REFERENCE!IT_E(ITP# T$PE UPF_$T_E(ITP*" REFERENCE!ITO_C')EL# T$PE UPC_$TO_C')EL*" REFERENCE!ITO_C'# T$PE UPC_$TO_C'*" REFERENCE!ITO_&$F# T$PE UPC_$TO_&$F*" E(PORTIN*" REFERENCE!ET_ME)# T$PE UPC_$T_ME)*" C'NIN*" REFERENCE!(T'_DT# T$PE ')'ED TLE*"--------------------------------------------------------------------

    E9,t.

    ENDFUNCTION.

    '((' SAP AMERI!A, I#!. A#SAP A)

  • 8/10/2019 BPS Documents

    30/30

    HOWTO VARIABLESO!"ME#TS O$T%PEE&ITI#SEM-BPS A#BW-BPS