Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Standard view
Full view
of .
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1
Nota OSS 325546

Nota OSS 325546

|Views: 66,342|Likes:
Published by respinosamilla3252
Nota Sap donde se describe la forma de ampliar los informes estandar de Partidas Individuales de CO (Controlling)
Nota Sap donde se describe la forma de ampliar los informes estandar de Partidas Individuales de CO (Controlling)

More info:

Published by: respinosamilla3252 on Jul 23, 2011
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less





23.07.2011Page 1 of 4
SAP Note 325546 -CO line item reports: Creating auser-defined field
 Note Language: EnglishVersion: 8 Validity:
Valid Since 05.08.2002
The CO line item reports already provide a large number of fields fordisplaying.Nevertheless, you may need additional, user-defined fields fromtime to time.With a customer exit you can add user-defined fields to the CO line itemreports.The documentation is included in project "COOMEP01", which isaccessible via Transaction SMOD.You can actually add fields to the actual costs line item reports (forexample, KSB1, KOB1, CJI3), the planned costs line item reports (forexample, KSBP, KOBP, CJI4) and the commitment line item reports (forexample, KSB2, KOB2, CJI5). The budget line item reports that have beendeveloped for Release 4.6 may also be extended (for example, KOB4).This note contains a more detailed explanation of the procedure as thereare still questions concerning this problem.
Other terms
Reason and Prerequisites
oFilling the field requires programming an ABAP exit.Thus, ABAPknowledge is needed.oMoreover, you have to know of course where to find the data whichis to be filled into the new field.oYou have to know how to use Transaction SMOD and CMOD, thedocumentation can be called up via the initial screen of CMOD bychoosing "Utilities --> Apllication help".
oFirst you have to decide, whether you want to extend an actual,plan or commitment line item report.Depending on the report, youhave to use different exits:Actual EXIT_SAPLKAEP_001Plan EXIT_SAPLKAEP_002Commitment EXIT_SAPLKAEP_003Budget EXIT_SAPLKAEP_004The exits are also included in Transaction SMOD/CMOD.oYou have to execute the following steps that are explained indetail below:a)The output structure has to be extended by the user-defined field.b)The exit has to be programmed to fill the field.c)View V_TKALV has to be maintained to tell the report what technicalinformation on the new field is required.oIn the following we use the extension of the actual cost line item
23.07.2011Page 2 of 4
SAP Note 325546 -CO line item reports: Creating auser-defined field
report by the "Cost Center Manager" field as an example.The costcenter manager is contained in the master data table of the costcenters CSKS in the VERAK field.oThe first step is to extend the output structure of the line itemreport by the new field.These output structures include customerInclude structures which are intended for the enhancement:Output structure Customer include structureActual KAEP_COAC CI_RKPOSPlan KAEP_COPL CI_KAEP_COPLCommitment KAEP_CM CI_RKPOABudget KAEP_BDG CI_KAEP_BDGThus, to extend the actual line item report by the cost centermanager, you extend structure CI_RKPOS.Add a new field ZZ_VERAK tothis structure, as data element/component type enter VERAK (thesame type that you find for the VERAK field in the CSKS). Save andactivate the structure.oIn the next step you have to program the exit.Fist select thecorrect exit (for the extension of the actual line item report,this is EXIT_SAPLKAEP_001).The exit is called up for every read line item.Via the interface ofthe function module you recieve-parameter I_REP_OBJ, which you can use to distinguish fromwhich line item report the exit was called.The possiblecharacteristic values can be found via the fixed values fordomain KAEP_OBJ.You need this parameter because the same exitis called up for all actual (or plan or commitment) line itemreports.This way you avoid possible extra work with extensionsthat are to be carried out for all line item reports.-structure CS_RECORD which contains the complete line item thatis read and processed by the database, including the newfield.However, this is still blank when being accessed and hasto be filled with ABAP.Please note that this exit is passed through once for everyline item!A complex or a poorly programmed exit canconsiderably extend the runtime of the line item reports!In the example of the cost center manager, you should only fillthe field if the cost center line item report is actuallyexecuted.In this case I_REP_OBJECT = "KS".The first line of theexit should containCheck i_rep_object = 'KS'.This ensures that it is not further processed with other lineitem reports and thus does not extend their runtime.Now the cost center manager has to be determined.Table CSKS hasto be read for this.select single verak from csks into cs_record-zz_verakwhere kokrs = cs_record-kokrs andkostl = cs_record-kostl anddatbi >= cs_record-budat anddatab <= cs_record-budat.
23.07.2011Page 3 of 4
SAP Note 325546 -CO line item reports: Creating auser-defined field
oFinally you have to maintain view V_TKALV.Here you provide therequired information to the line item report which ensure that thereport always correctly displays the field.Call up Transaction SM34, enter "V_TKALV" and choose "Change".-First of all you have to provide the field and its technicalsettings:To do this go to the "Field catalog information" andcreate a new entry. As field structure enter the correspondingoutput structure (see above, for the actual line item reportsthis would be KAEP_COAC), and as Field name enter the name ofthe new field.For the Field group select "K", this ensures thatyou will find the field with the user-defined fields in thedisplay variant/layout maintenance.You can leave the otherfields blank for the time being.The meaning of the fields indetail:- Key flag: This characterizes the field as key field inoutput.- "Tech. Field", "Col.pos.default" and "Edit mask" are notimportant for user-defined fields and should therefore be leftblank.- Text field (only as of Release 4.5):If you not only extendthe report by one field but by two fields - one with atechnical code and a second with the corresponding text - it isrecommended to enter the name of the text field in this fieldfor the field with the technical code.With subtotalling via thekey field, the system also fills and displays the text field inthe totals rows.-Secondly you have to provide the fields of the line item forthe report that are required to fill the user-defined field inthe exit.Select the newly created field in the "Field cataloginformation" and go to the "Selection dependencies".Here, add an entry for every field that you need to fill yournew field. Always enter the name of your new field in the leftcolumn and to the right the field that you require to fill yourfield.You have to do this to tell the report which fields it mustread in any case if the new field is to be displayed.Inbackground processing the system only reads the fields from thedatabase that are absolutely necessary.These are the fields ofthe display variant which is used for the output, plus thefields that are needed to fill the fields of the displayvariant.In the example, the fields KOKRS, KOSTL and BUDAT are needed tofill the field ZZ_VERAK.However, there is a selectiondependency for the field OBJNR (you can display this byselecting the field KOSTL in the field catalog information andthen display the selection dependencies).Thus, you have to add3 entries for the selection dependencies:Field name Database field to be readZZVERAK KOKRSZZVERAK OBJNRZZVERAK BUDAT

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->