?_Pt@7lp&/&;)z4 G |CONTEXTj|CTXOMAP|FONTʳ|KWBTREE |KWDATA|KWMAP|SYSTEM|TOPIC|TTLBTREE;|bm0|bm1)|bm10|bm11|bm12?|bm2&|bm3|bm4|bm5|bm6|bm7|bm8?|bm9-] L> I need to add a new field to the structure of an existing table which> contains data.Is there any risk of losing the data if the structure is> modified.A1:Use append structure and there is no risk.Recently I have extended VEKP (Shipping unit header) this way.DominikA2:I've had experience with this in the past. I've found that as long as youfollow the SAP recommended approach, which is to create an APPEND structure by1aˋF Z[a gmhitting the "Append Structures..." button when in Table Display / Change,everything should be okay. This also ensures that your custom data is not lostin the event of an upgrade.A3:Remeber these alterations when you, or your Basis staff, upgrades your SAPsystem(s). There is a phase in the upgrade where the R/3 tool (transaction)SPDD is executed. SPDD compares SAP tables that are being imported/changedin the applied upgrade with the current state of those same tables in theGE X[a gmexisting system. When it detects differences (i.e. customer has addedcustom fields to SAP table) it ASKS you what to do. Your choices are to"Return to SAP standard" or to add the custom fields to "appendstructures".Returning to SAP standard is easy to explain; the custom fields are droppedand the table is "converted". This means the ENTIRE contents of thealtered table is exported to disk, the table is dropped and re-definedaccording to the current SAP standard for that table (including any newˋ9D V[a gmfields that SAP added during the upgrade) and then the data is re-imported.This means two things: the data in the custom fields is lost forever ANDif the table is huge, the upgrade process takes several more hours to allowfor the table conversion.If you choose to keep your custom fields during the upgrade, R/3 adds themautomatically to an append structure. Any fields that SAP themselves haveadded to the table are9 appended to the end of the physical table.GD V[a gmAppend structures is an SAP R/3 concept. Logically, it looks like you haveall the fields in one table. In reality, any fields that are part of thetable in a the append structure (look in SE11 for append structureinformation for a table) are actually stored in a separate, R/3 maintainedtable. When operations occur against a table with append structures,special ABAP/4 auto-generated routines are executed that use additional SQLto go after the custom fields stored elsewhere through append structures.9E X[a gmThe benefit here is that when new "custom" fields are added to an SAP tablewith append structures, the base SAP table is not changed. This means noconversion needs to occur during an upgrade. The problem is that now youhave extra overhead, i.e. 2 reads versus 1, updaters may also experiencehits if fields are indexed, for every access to your table.Bottom line, you can do this, no problem, but there are down-streamramifications that should be considered....I ? N[a gm-Bob?'1 'Defining typesM h[a gmDefining typestypes: begin of t_itab, cpudt like bkpf-cpudt,blart like bkpf-blart, end of t_itab.; '010Data typesQ k[a gmData types Type Description SLInitial value CText (character)1Blank NNumeric text1'00...0' DDate (YYYYMMDD)8'00000000' TTime (HHMMSS)6'000000' XHexadecimal1X'00' IInteger40 PPacked number80 FFloating point no. 80 |=0? Nz[a gm C@1@Defining constantsJ b[a gmDefining constantsCONSTANTS:LEVEL_BILAGSART TYPE I VALUE 1,LEVEL_ARTSKONTO TYPE I VALUE 2,LEVEL_POST TYPE I VALUE 3.J@[1 [Indhold - Internal tablesO ΀[a gm㱰8ur[؉@nr(he&O$c-"]=72Indhold - Internal tablesCopy an internal table to anoterh internal tableReading an entry from internal table using its key.Read database tabels into internal tableLoop over internal tableDefining internal tablesSummarizing data when read into internal tableDeleting, Inserting, Modifying lines in an internal tableDisplaying the contents of an internal table ( editor-call )Working with subtotals in internal tables using AT/ENDATs1[B Tb[a gmljDifference between SYST-TMAXL and SYST-TFILLa0~1 ~<Copy an internal table to anoterh internal tablez<D X[a gmCopy an internal table to anoterh internal tableNote: The tabels must have exactly the structureitab2[] = itab2[]],~1 Difference between SYST-TMAXL and SYST-TFILL(<N j[a gmDifference between SYST-TMAXL and SYST-TFILL>The maximum number of entries in SYST-TMAXL will not> decrease if I delete sentences out of this table?> Do you know a difference to SYST-TFILL? syst-tfill contains the current number of entries ininternal table.But be caref<ull, those fields vary per internal table.i.e.If your are looping thru itab 1 it is itab1sy-tfill.but if you are looping thru itab2 inside loop ofitab1, you will have sy-tfill from itab2.P n[a gmMake a copy of itab1 if needed.Test it,I am not 100% SURE, BUT ONE THING IS CERTAIN,that sy-tfill contains the current number of entries.loop at itab1. loop at itab2. if sy-tfill = ... ... tmp2 = sy-tfill. "tfill of itab2 endloop."itab2..tmp = sy-tfill. "tfill of itab1endloop."itab1HOPE this helps.Regards,Jean-Michel CharetteDatahorse Inc.jcharette@datahorse.comi81 Working with subtotals in internal tables using AT/ENDATu /[a gmWorking with subtotals in internal tables using AT/ENDATFor sorted inyternal tables you can use at/endat commands in a loop to test for the first, last occurence of a field:AT FIRSTProcesssed at the very beginning of the tableAT NEW fProcesssed when the content of table field f has changed or one of thepreceding fields in the table has changed.AT END OF fProcesssed when the content of table field f will change at the next entry or one of preceding fields in the table will change at the next entry."a [a gmE!AT LASTProcesssed at the end of the tableNote: To use AT the fields in the table must occur in the same order as you sort the table.In the example below, carrid must be the first field in the tableSe also: Control level reporting Example:sort itab by carrid.loop at itab. at new carrid. write: / 'Carrid: ', carrid. endat. at last carrid. write: / 'Total for', carrid, sum_carrid. endat.endloop.d3'1# 'Reading an entry from internal table using its key.j X ~%[a gmReading an entry from internal table using its key.You can read an entry from an internal table using a specified key. Only the first match is selected.Note that for tables without headerline the general syntax for reading an entry is: READ TABLE WITH KEY k1 = v1 INTO Method 1READ TABLE itab WITH KEY k1 = v1 k2 = v2 The system uses these methods for search:Standard table: If you use the BINARY SEARCH option, the system uses binary search, otherwise<' H ^[a gmsequential search is used.Sorted table: If the specified field occurs at the begining of the table, binary search is used, otherwise the system uses sequential search.Hash table: Sequential search.Example: read table i_nulsaldi with key zbukrs = i_saldi-zbukrs zsaknr = i_saldi-zsaknr. if sy-subrc <> 0.  T v[a gm write: / 'Fejl i_nulsaldi', i_saldi-zbukrs, i_saldi-zsaknr. endif. Method 2READ TABLE itab WITH TABLE KEY k1 = v1 k2 = v2The system uses these methods for search:Standard table: Starts at the first line. The search time is linear to the number of entries.Sorted table: Search time is logarithmic to the number of entries.Hash table: Search time is constant.m< S1t SQADisplaying the contents of an internal table ( editor-call )QAM hK[a gmDisplaying the contents of an internal table ( editor-call )The editor-call statement displaSQAys the contents of an internal table in an editor similar to the ABAP/4 editor. Can be used for debugging and to modify data in an internasl table.Syntax:editor-call for If display-option = display mode then the user can't alter data.Example:editor-call for i_costcheck display mode.j9SA1iAEDeleting, Inserting, Modifying lines in an internal table5QACr [a gmDeleting, Inserting, Modifying lines in an internal tableModifying all linesloop at itab. itab-name = 'My name'. itab-age = 40. modify itab.endat.Modifying a single lineread table itab with key persno = '0001245' binary search.if sy-subrc = 0. itab-name = 'My name'. itab-age = 40. modify itab index sy-tabix.endif.Deleting all lines in an internal tablerefresh itab.If you want to clear the headerline too:mAE] [a gmclear itab.Deleting a single lineread table itab with key persno = '0001245' binary search.if sy-subrc = 0. itab-name = 'My name'. itab-age = 40. delete itab index sy-tabix.endif.Deleting a subsetYou can do this in a loop, but it's also possible to do it this way:delete itab where cp 'E*'Delete all lines where name begins with 'E'.Y(CF1AFJRead database tabels into internal table+E>Hs q[a gmRead database tabels into internal table1. read the records one by one, moving selected records to the internal table2. Read all records 3. Read all or selected records in one step4. Reading selected fields using INTO1. read the records one by one, moving selected records to the internal tableSELECT * FROM ZTSAPSPEC. MOVE ZTSAPSPEC-ZZREVLOGPR TO ITAB-ZZREVLOGPR. APPEND ITAB.ENDSELECT.2. Read all records F]J\ [a gmSELECT BUPER BLART ZZPOLNR SGTXT DMBTR BLDAT BUDAT ZUONR FROM ZTSAPSPEC APPENDING CORRESPONDING FIELDS OF TABLE ITAB WHERE HKONT = '89407110 ' AND BLDAT IN S_BLDAT.3. Read all or selected records in oneselect * from personal into table itab.orselect * from personal into table itab where name = 'Robert'.4. Reading selected fieldsSELECT perno name INTO CORRESPONDING FIELDS OF TABLE itab _>HJ? N[a gm FROM personal WHERE name = 'Robert'.I]JDK1DKKLoop over internal tablesJKD X[a gmLoop over internal tableloop at saldo_list. write: / saldo_list-kontonr, saldo_list-kontotext.endloop.HDKCL1CLnDefining internal table$KgNx Y[a gmDefining internal tableTypes of tables:Standard tableSorted tableHashed tableExamples:1. Internal standard table with headerline2. Internal standard table without headerline3. Sorted table with key1. Internal standard table with headerlineDATA: BEGIN OF ITAB OCCURS 500, costum_no type i, name(30) type c, END OF ITAB.ortypes: begin of tabline,>CLb [a gm costum_no type i, name(30) type c, end of tabline.data: itab type tabline occurs 0 with header line.2. Internal standard table without headerlinetypes: begin of tabline, costum_no type i, name(30) type c, egNKnd of tabline.data: itab type tabline occurs 0. 3. Sorted table with headerline and unique keytypes: begin of tabline, costum_no type i, kgNnR r[a gm@nr name(30) type c, end of tabline.DATA: itab TYPE SORTED TABLE OF tabline WITH HEADER LINE INITIAL SIZE 0 WITH UNIQUE KEY custom_no.If the key is not unique, replace UNIQUE KEY with NON-UNIQUE KEY.Note: You must use INSERT to insert an entry into a sorted table._.͂1͂ Summarizing data when read into internal table>n P n[a gmSummarizing data when read into internal tableUse collect to summarize data when read into an internal table.SELECT * FROM BKPF WHERE CPUDT = PCPUDT. MOVE-CORRESPONDING BKPF TO ITAB. COLLECT ITAB.ENDSELECT.C͂N1;NFIndhold - Open SQL F] 7[a gm q` 색XBIndhold - Open SQLOpen SQL syntax examplesJOIN in ABAP Dynamic where clauses in open SQLUsing IN in logical expressions and sql statementsIN1 'Open SQL syntax examplesF ڀ1[a gmOpen SQL syntax examples1. Working with single entries2. Reading all entries into an internal table3. Reading singel entries 4. Selecting single fields5. Append new record6. Update with where clause7. For all entries1. Working with single entriesselect * from ska1 where saknr = '77004500'.* Do something with data move-corresponding ska1 to itab. append itab.)։\ [a gmendselect.2. Reading all entries into an internal tableThis is more efficient that example 1select * from ska1 into table itab where saknr like '77%' order by saknr. 3. Reading single entries You must specify the full primarykey in the where clause to get a correct result.tables: zsd00004.data l_custname like like zsd00004-zcustname. SELECT SINGLE zcustname into l_custname FROM zsd00004 WHERE zcustno = '1551'.0d [a gm4. Selecting single fieldsThis could improve effciency for database tables with many entries and many fields.data: l_kunnr like kna1-kunnr, l_kukla like kna1-kukla.SELECT kunnr kukla INTO (l_kunnr,l_kukla) FROM kna1. write: / l_kunnr, l_kukla.ENDSELECT.5. Append new recordTables: zsd00003. zsd00003-zprogram = g_screen0100-zprogram. zsd00003-zstep = g_screen0100-zstep. zsd00003-zenhed = g_screen0100-zenhed.7։=U x[a gm INSERT INTO zsd00003 VALUES zsd00003. IF sy-subrc = 4.SY-SUBRC = 0: Line inserted. SY-SUBRC = 4: The line could not be inserted. A line with the same keyalready existed. 6. Update with where clauseThis statement updates the fields zlogdato and zlogtid for the records thatsatisfies the where clause.update zsd00003 set zlogdato = sy-datum zlogtid = sy-uzeit where zdriftscenter = g_screen0100-zdriftscenter.-v[ [a gm7. For all entriestables: mara, makt.data: begin of i_material occurs 0, matnr like mara-matnr, maktx like makt-maktx, end of i_material.start-of-selection. select matnr appending corresponding fields of table i_material from mara. select matnr maktx into corresponding fields of table i_material from m=vFakt for all entries in i_material where matnr = i_material-matnr and spras = sy-langu.l='E Z[a gmend-of-selection. loop at i_material. write: / i_material-matnr, i_material-maktx. endloop.R!vy1RyyDynamic where clauses in open SQL:'K d[a gmDynamic where clauses in open SQLYou can use an internal table to build a dynamic where clause:data: where_tab(30) occurs 1 with header line, where_clause(30) type c. * Build the where clause. Will look like this when finished* WHERE ZAFSTMD02 = 'X' AND rbusa = '5145'* With a constant, result: ZAFSTMD01 = 'X'concatenate 'ZAFSTMD' zcostcheck-zmaaned ' = ''X''' into where_clause. 7yH ^[a gm* Append to internal table where_tabappend where_clause to where_tab. * With a variable, result: AND rbusa = '5145'concatenate 'AND rbusa = ' '''' i_tab-zgsber ''''append where_clause to where_tab. * Selectselect * from zcostfreq where (where_tab). endselect. JyE X[a gm Note that you can combine static and dynamic where clauses:select * from zcostfreq where bukrs = '2021' AND (where_tab). endselect. = 1JOIN in ABAPIy] [a gmJOIN in ABAP Example 1SELECT a~zafstemnr b~zafstemnr b~zsaknr INTO CORRESPONDING FIELDS OF TABLE i_tab FROM zcostafstm as a INNER JOIN zcostplan as b ON b~zafstemnr = a~zafstemnr. Example 2SELECT lips~vbeln lips~lfimg likp~wadat INTO corresponding fields of table ltab_orders FROM lips JOIN likp on ( lips~vbeln = likp~vbeln ) JOIN vbfa on ( lips~vbeln = vbfa~vbelv ) G \[a gm WHERE lips~matnr = matnr and lips~vbeln in vbeln and likp~vbeln in vbeln and vbfa~vbelv in vbeln and lips~werks in werks and likp~wadat in datum and vbfa~vbtyp_n = 'Q' "WMS transfer order and vbfa~vbtyp_v = 'J'. "Delivery From ABAP hints & Tips: http://oasis.fortunecity.com/skegness/110/JOIN.htmlJh15hSIndhold - Database tablesiS Ҁ[a gm@nrp\ 6݉?h㉂~ r.lMIndhold - Database tablesReading a file from the applikation serverUpdating a database tableAdding records to a database tableDeleting records from a database tableExtracting records that don't exist in another tableTable transportSAP system tablesWhat table stores the names of all the sap tables and fields.BSEG table reading[*h1H Reading a file from the applikation server8S` [a gm Reading a file from the applikation serverBy Henrik FrankScenario:You have a file on the applikation server with same structure as the SAP database table zcostafstmREPORT zcostkon.TABLES: zcostafstm. * Name and path of file Son the applikation serverPARAMETERS: f_afstem LIKE rlgrap-filename DEFAULT '/tmp/sappool/costa.konv.tilsap.afstem'.DATA: i_zcostafstm LIKE zcostafstm OCCURS 500 WITH HEADER LINE.?1Z [a gm counter TYPE i.* Delete records from the datbase table if necessarySELECT * FROM zcostafstm. DELETE zcostafstm. ENDSELECT. * Read file into internal tableOPEN DATASET f_afstem FOR INPUT IN TEXT MODE. CLEAR i_zcostafstm. READ DATASET f_afstem INTO i_zcostafstm. CLEAR counter. DuF Z[a gmWHILE sy-subrc = 0. APPEND i_zcostafstm. counter = counter + 1. READ DATASET f_afstem INTO i_zcostafstm. ENDWHILE. IF sy-subrc NE 4. WRITE: / 'Error while reading'. ELSE. D1M h[a gm WRITE: / 'costa.konv.tilsap.afstem - OK number read: ' , counter. ENDIF. CLOSE DATASET f_afstem. * Update database table from internal table. LOOP AT i_zcostafstm. MOVE-CORRESPONDING i_zcostafstm TO zcostafstm. INSERT zcostafstm. 8uM h[a gm IF sy-subrc = 0. * Errorhandling ........................... ENDIF. ENDLOOP. @1 11  Table transportY Q p[a gmTable transport> Hi all,> May be this is a stupid question but, how can I transport de data from a> table?>> TIA>> AsierHi Asier,It's not a stupid question. You use SE01 to create a transport request.Then when you've completed the transport attributes, you save and enter theeditor. You insert an entry: R3TR TABU xxxxxxxx where xxxxxxxx is the tablename. You must also GOTO --> Object Key and then insert the Keys you want.You may also enter * to select all table entries. Save and release yourz91  A Rr[a gmtransport.I hope this helps.Regards,Cheryl MorganC G 1G cABSEG table reading< O l[a gmBSEG table reading Hi all, I am trying to Accounting documments from BSEG table and doing some manupulation on the data it takes lot of time to get data. Is there any other table where i can read it faster OR should i create additional index on that table. Any Lights are Welcome. SJ------------------ The access to the following tables are much faster than bseg : You may try looking into them : BSIS, BSAS, BSID, BSAD, BSIK, BSAK and BSIM.<G @G \[a gm Alternatively, try to limit your search by accessing BKPF first followed by BSEG. BKPF contains the posting date field which is part of an index. Try to limit the posting date in your selection criteria if possible. If the above solutions do not help, please re-post your question a@ nd be more specific on what data you are trying to extract and the selection criteria which you have used. By the way, I dun think you can create indexes for a cluster tableTcAD X[a gm like BSEG. Hope this helps. Regards, Hwee Hoonn=@A1;ACWhat table stores the names of all the sap tables and fields.~cACO l[a gmWhat table stores the names of all the sap tables and fields.try DD02L> ----------> From: Jake Allen[SMTP:Jake2888@aol.com]> Sent: Thursday, February 11, 1999 11:50 AM> To: SAP-R3-L@MITVMA.MIT.EDU> Subject: DEVEL: Table containing tables and fields>> Hi All,>> What table stores the names of all the sap tables and fields.>> TIA> Jake AllenJAC1C"JUpdating a database tableIC1Fs [a gmUpdating a database table 1. Updating records in the database table from an internal table2. Updating a single entry3. Updating multiple entries1. Updating records in the database table from an internal tabletable: personel.data: itab like personel.* Read records from the database table where name is space, into an internal tableselect * from personal into table itab where name = space.* Update name in the internal table to UnknownDCuHb [a gmloop at itab. itab-name = 'Unknown' endloop.* Modify records in the database table. Only records with the same key values as then* internal table is modifiedmodify personel from table itab.2. Updating a single entryIn this example the entry with the key value ( Customerno ) 1 is changed.table customer.customer-customerno = 1.customer-customnavme = 'John'.update customer.if sy-subrc <> 0. ..... No entry with the customerno = 1, add error handling[1F"JR r[a gmendif.3. Updating multiple entriesExamle updating the field zchecked to 'X'update zcostcheck set zchecked = 'X' where zcostcheck-zaar = zaar and zcostcheck-zmaaned = zmaaned and zcostcheck-zbukrs = zbukrs and zcostcheck-zsaknr = zsaknr2 and zcostcheck-zgsber = zgsber. e4uHJ1JPExtracting records that don't exist in another table5"JLM h[a gmExtracting records that don't exist in another table>Hi all,>I am breaking my head over trying to figure out how I can extract all>the values in table A that do not exist in table B.>Can this be done by a select statement?>Table A key: MATNR Table B key: MATNR>Can anybody tell me if this is possible, I don't want to loop the>whole table A and compare each record to table B, I believe it will>take up to much processing time... Can anybody shed some light?+JNO l[a gm>Thanks in Advance !>HelenHelen, As long as you can specify the whole key for table B, You don't have to worry about looping all of table A. Because you will be using key access on table B it will be very fast. The code would be tables: tableA, tableB. data a_matnr like tableA-matnr. select matnr from tableA into ( a_matnr ). select single matnr from tableB where matnr = a_matnr. if sy-subrc <> 0."LQ p[a gm write / a_matnr. endif. endselect. The important thing is that you can use the 'single' clause in the select statement. You must be able to specify the whole keyN"J of tableB. If you are not sure about any of this, email me directly with the table names you want to compare and I will be able to tell you definitely whether you can do this efficiently. Daniel Wan HR Consultant...................5NJU x[a gmHi,This will work assuming that you never have a MATNR in table b that is notin table a.An even bigger performance gain -and undying gratitude from yourbasis-guy(M/K):Select just the MATNRs from each table: SELECT MATNR INTO table itab_a-matnr.This is fun, isn't it?Bent Hansen.......................Hi,You might want to further optimize the step 3 by using one of the examplesin the Tips and Tricks for Joining two sorted internal tables with uniqueNS t[a gmkeys. The code would look something like :I2 = 1.loop at int_a. read table int_b index I2. if sy-subrc <> 0. exit. endif. if int_a-matnr <> int_b-matnr. append int_a to int_c. else. I2 = I2 + 1. endif.endloop.For this both internal table int_a and int_b have to be sorted.RajendraChanging selection screen dynamically> > >I have three select-options on my screen. My requirement is to have> > >the user input values only in one of the fields. If he enters in0JȇN j[a gmone> > >field the others should become input disabled.> > >> > >I want to know if this is possible.> > >> > >Thanks> > >Hari> > >It is not really realtime. After the user puts something in a fieldthen the user has to press the enter key.After pressing enter the event AT SELECTION-SCREEN OUTPUT isprocessing. And here you can start screen manipulation.Here is a very small example:-----------------------------REPORT ZSIDSOPT.TABLES: MARA.PARAMETERS: P_TEST(10).O l[a gmSELECT-OPTIONS O_MATNR FOR MARA-MATNR MODIF ID MAT.AT SELECTION-SCREEN OUTPUT. IF P_TEST = 'DISABLE'. LOOP AT SCREEN. IF SCREEN-GROUP1 = 'MAT'. SCREEN-INPUT = 0. SCREEN-INVISIBLE = 1. MODIFY SCREEN. ENDIF. ENDLOOP. ENDIF.START-OF-SELECTION.END-OF-SELECTION.If you put in the selection for field p_test 'disable' then afterpressing enter the select-option will be vanished from the selectionscreen.l(ȇPD XP[a gmRegards, Ingo-Willy Raddatz. W&1JDeleting records from a database tablePi [a gmDeleting records from a database tableDelete a single record Delete from ztsapspec where id > -1.orcustomer-customerno = '155151'.delete cutsomer.Delete all records select * from zmellemtab. delete zmellemtab. endselect. Deleting records using records from an internal tabledelete employees from table itab.S"13Adding records to a database table&m M[a gmAdding records to a database tableAdd a single record to a database tableinsert into values Example:tables: mytable. mytable-number = 1.mytable-name = 'John'.insert into mytable values mytable. Inserting all lines from an internal table into a database table:insert from table You can add the option: accepting duplicate keys If you add accepting duplicate keys you can test if the table was successfully updated, else a runtime error wil be generated. X3O l[a gmNote: accepting duplicate keys does not mea3n that duplicate keys will be accepted, only that it is possible to test on sy-subrc if you have tried to insert records with duplicate keys. All remaining records will be inserted.After you have inserted the recors the variable sy-dbcnt contains the number of records that were inserted.S"1B uIndhold - Elements of the language83 @[a gm!ӵ2ʼn㵾J㨍3y )d 1h!Field symbols*uP n[a gmField symbolsYou can use field symbols to make the program more dynamic. In this exanmple the name of a table control isd substitutedby a field symbol. Thus you cal call the form with any internal table, using the name of the table control as a parameter. Exampleform insert_row using p_tc_name. field-symbols type cxtab_control. "Table controlassign (p_tc_name) to .* insert 100 lines in table control-lines = 100.c2@1"@Using IN in logical expressions and sql statements,l^ [a gmUsing IN in logical expressions and sql statementsIt is possible to use a selection table if together with the IN operator.Example:* Selection table DATA: BEGIN OF it_select_fkart OCCURS 0, sign(1), option(2), low LIKE zsd00010-fkart, high LIKE zsd00010-fkart, END OF it_select_fkart.* Build selection table SELECT * FROM zsd00010 WHERE zaftaletype = '0/0'. CLEAR it_select_fkart.0@Y [a gm it_select_fkart-sign = 'I'. it_select_fkart-option = 'EQ'. it_select_fkart-low = zsd00010-fkart.* it_select_fkart-high = . "Optional APPEND it_select_fkart. ENDSELECT.* Select statement SELECT vbeln zuonr kunag fkart fkdat INTO CORRESPONDING FIELDS OF TABLE i_indlaes_vbrk FROM vbrk WHERE kunag IN s_kunag AND fkart IN it_select_fkart.Ol> L"[a gm endselect.@+1#+Indhold - FormsYU z[a gm!ӵOd!ىIndhold - FormsSyntaxCalling a form with a table parameterTerminating formsB+1$Terminating formsBQ p[a gmTerminating formsUnconditionally using the EXIT statement:FORM Terminate. .... Some code .... EXIT.ENDFORM.Conditionally using CHECKFORM Divide using num1 num2 changng Result. * If the result of CHECK is negative ( Num2 <= 0 ) then terminate the form CHECK num2 > 0. Result = num1 / num2.ENDFORM.V%1%MCalling a form with a table parameter=MX ~[a gmCalling a form with a table parameterThe table i_decscan is used as a parameter when the form is called. Note the reference to the structure of the table. PEMRFORM decode_variable_length_field TABLES i_decscan CHANGING g_scanstr.FORM decode_variable_length_field TABLES i_decscan STRUCTURE zzbardec CHANGING w_scanstr. Y(1c&Assign variable type at runtime and more^MN j![a gmAssign variable type at runtime and moreDynamic programing can save a lot of 'superfluous' coding.To assign a variable a type at runtime, use the ABAP statement ASSIGN with the option TYPE.For instance:DATA: D_TYPE, D_FIELD(35).DATA: D_TEST TYPE P.FIELD-SYMBOLS: .D_FIELD = 'D_TEST'.D_TYPE = 'P'.ASSIGN (D_FIELD) TO TYPE D_TYPE.Additionally you can use the option DECIMALS of the ASSIGN statement if your type is 'P'.You can even change the type at runtime of previously assigned field symbol likeNRH ^ [a gmASSIGN TO TYPE 'C'.One more thing for dynamic programing.With the following coding you can access every DDIC table with the key you want:SELECT SINGLE * FROM (DF_TNAME) INTO S_TMP WHERE (IF_KEY).It is very powerful, isn't it !!![ Ingo-Willy Raddatz, posted to SAP listserver]Print page "n of x pages" on reportsThe following code is just a function to loop total pages. To use from the beginning ofyour report, you will have to loop through your report once before display. ABAP does not provide oK d[a gman easy "read-ahead" method of doing this, so this is the "cludgy" way of making it work if needed.FORM GET_TOTAL_PAGENO. WRITE SY-PAGNO TO NUM_PAGES_C LEFT-JUSTIFIED. DO SY-PAGNO TIMES. READ LINE 2 OF PAGE SY-INDEX. REPLACE '*****' WITH NUM_PAGES_C INTO SY-LISEL. MODIFY LINE 2 OF PAGE SY-INDEX. ENDDO. ENDFORM. " GET_TOTAL_PAGENO [found on the Web at http://homepages.tcp.co.uk/~bob866/how_to.html]AR= J[a gmEo1 '$BSELECT with VARIABLEA6 O l[a gmSELECT with VARIABLEQ.> -----------------------------------------------> > > Hi all,> > > Can somebody help me with this (little) problem.> > > -----------------------------------------------> > > IS:> > > DATA Z0051 LIKE T005 OCCURS 0 WITH HEADER LINE.> > > DATA Z0052 LIKE T005 OCCURS 0 WITH HEADER LINE.> > >> > > SELECT * INTO TABLE Z0051 FROM T005.> > > SELECT * INTO TABLE Z0052 FROM T005.> > > =====> > > ----------------------------------------------->t M h[a gm> > > DEBIT:> > > Instead of these two SELECT specification I would> > > like to write a SELECT specification with a variable> > > internal table.> > >> > > SELECT * INTO TABLE variable FROM T005.> > > ========> > > -----------------------------------------------> > > Is that possible?> > > I hope you understand what I wrote.> > > I am improving my english but it isn't perfect.A1:There are a lot of ways you can use dynamically internal table assignments.>6 R r[a gmThe best way, for my attitude, is to use the following code:PROGRAM ZXXXXXX.DATA: Z0051 LIKE T005 OCCURS 0 WITH HEADER LINE.DATA: Z0052 LIKE T005 OCCURS 0 WITH HEADER LINE.START-OF-SELECTION. PERFORM ADD-DYNAMIC TABLES Z0051. PERFORM ADD-DYNAMIC TABLES Z0052.END-OF-SELECTION.FORM ADD-DYNAMIC TABLES F_TAB. SELECT * FROM T005 INTO TABLE F_TAB.ENDFORM.Kind regards, Ingo-Willy Raddatz.A2:Hi Roland,I believe, here is an example that could help you. Worked perfectly.t AP n[a gmADATA: Z001 LIKE T005 OCCURS 0 .DATA: Z002 LIKE T005 OCCURS 0 .DATA: ITAB_NAME(10).FIELD-SYMBOLS: TYPE TABLE.MOVE 'Z001' TO ITAB_NAME.ASSIGN (ITAB_NAME) TO .SELECT * FROM T005 INTO TABLE .MOVE 'Z002' TO ITAB_NAME.ASSIGN (ITAB_NAME) TO .SELECT * FROM T005 INTO TABLE .Note, Z001 .... can only be interanl tables WITHOUT header line,otherwise ASSIGN won't work. Is there a problem for you? I'm on 3.1H.Regards,J $B> L[a gmSiarheiNArB1(rBFPassing data between programsm $BDc [a gmPassing data between programsThere are two methods:Using SAP memory. User-specific memory retained for the duration of the session. Can only be used for simple field values.Using ABAP memory. Can be used to transfer data between internal modi. Can be used to transfer any ABAP/4 variables ( Fields, strings, internal tables, complex objects) SAP memoryYou use the SPA/GPA parameters to pass data. These paramters are saved globally in memory. The paramters are indetified by a three-character code. rBFh 1[a gmIn dialog programs you can SET and GET these parameters in the attribute window of the screen field, by marking the SET and GET fields and put the name of the parameter in the ParameterId field.In a program ( Dialog or Report ) you can use the GET PARAMETER and SET PARAMETER statements:set parameter id 'RV1' field get parameter id 'RV1' field Q D0G1A)0G HExiting a Select/ Endselect loopF HM hG[a gmExiting a Select/ Endselect loopUse the Exit statement.Example:Data: recnr type i.select * from ska1.recnr = recnr + 1if recnr > 10. exit.endif._.0GH1*HSAP's OPEN SQL, syntax of the SELECT statement HJR r[a gmSAP's OPEN SQL, syntax of the SELECT statementFrom SAP Fans homepage http://www.sapfans.com/Basic form: SELECT result FROM source [INTO target] [WHERE condition] [GROUP BY fields] [ORDER BY order]. SELECT clause Variants: 1. SELECT [SINGLE [FOR UPDATE] DISTINCT] * 2. SELECT [SINGLE [FOR UPDATE] DISTINCT] s1 ... sn 3. SELECT [SINGLE [FOR UPDATE] DISTINCT] (itab) FROM clause Variants: 1. ... FROM dbtab Additions: 1. ... CLIENT SPECIFIED LHLN j[a gm2. ... BYPASSING BUFFER 3. ... UP TO n ROWS 2. ... FROM (dbtabname) Additions: 1. ... CLIENT SPECIFIED 2. ... BYPASSING BUFFER 3. ... UP TO n ROWS INTO target (This form of the FROM clause works only in conjunction with the INTO clause.) INTO clause Variants: 1. ... INTO wa 2. ... INTO CORRESPONDING FIELDS OF wa 3. ... INTO (f1, ..., fn) 4. ... INTO TABLE itab 5. ... INTO CORRESPONDING FIELDS OF TABLE itab 6. ... APPENDING TABLE itab 7. ... APPENDING CORRESPONDING FIELDS OF TABLE itab /JON j[a gmWHERE clause Variants: 1. ... WHERE f op g 2. ... WHERE f [NOT] BETWEEN g1 AND g2 3. ... WHERE f [NOT] LIKE g 4. ... WHERE f [NOT] IN (g1, ..., gn) 5. ... WHERE f [NOT] IN itab 6. ... WHERE f IS [NOT] NULL 7. ... WHERE NOT cond 8. ... WHERE cond1 AND cond2 9. ... WHERE cond1 OR cond2 10. ... WHERE (itab) 11. ... WHERE cond AND (itab) 12. ... FOR ALL ENTRIES IN itab WHERE cond operator Meaning EQ or = equal to NE or <> not equal to LT or < less than v,LJ bY[a gmLE or <= less than or equal to GT or > greater than or equal to GE or >= greater than or euqal to GROUP-BY clause Variants: 1. ... GROUP BY fO H1 ... fn 2. ... GROUP BY (itab) ORDER-BY clause Variants: 1. ... ORDER BY PRIMARY KEY 2. ... ORDER BY f1 ... fn 3. ... ORDER BY (itab) ?Oڀ1;+ڀւForms - Syntaxmւ [a gmForms - SyntaxSyntax:perform test using a1a2changinga3a4.form test using value(p1) like a1 p2 like a2 changing value(p3) like a3p4 like a4. Call by value/Call by reference overviewCall by valueCall by referenceRead onlyusing value(p)using pChangingchanging value(p)changing p9ڀ1,qMessagesHւW Ѐ[a gmMessages1. General3. Syntax4. Setting the message class5. Types of messages6. Paramiterized messages1. GeneralMessages are texts that can be shown on the bottom of the screen. Messages belongs to a message class. There different type of messages indicated by the first letter of the message indetifier.2. MaintainingMessages are defined in table T100.You maintain messages and message classes using transaction SE91. u Ѐ;[a gm    3. SyntaxMessage xnnnx is the type of message ( See: Types of messages )nnn is the identifier of the message.Example: message e0014. Setting the message classYou set the message class for the whole program in the header of thje program: report my_report message-id . Setting the message class for a sigle message:Message ID type number GW~ ʀ[a gmExample: message id 'ZB' type 'W' number '004' with 'Test'.5. Types of messages IInfoPress ENTER to continue WWarningCorrection possible EErrorCorrection required AAbendTransaction terminated XExitTransaction terminated with short dump SSuccessMessage on next screen Yuq\ [a gm 6. Paramiterized messagesYou can paramiterize messages, so that you can insert your own text programmatically in messages. When you define the message use & for the parameters:This is a &1 messageWhen you call the message use the syntaxMessage e001 with 'bad'The resulting message: This is a bad message91;-Currencyq^ I[a gm8xي㑻ωCurrencyLanguage depending formattingConvert amount to/from stringWriting currency amount to string without thousands seperator Convert currenciesN1d.Convert amount to/from string.(Q p[a gmConvert amount to/from stringCALL FUNCTION 'HRCM_AMOUNT_TO_STRING_CONVERT' EXPORTING betrg = 3000 WAERS = 'DKK'* NEW_DECIMAL_SEPARATOR =* NEW_THOUSANDS_SEPARATOR = IMPORTING STRING = slam .CALL FUNCTION 'HRCM_STRING_TO_AMOUNT_CONVERT' EXPORTING string = slam2 DECIMAL_SEPARATOR = '.'* THOUSANDS_SEPARATOR =B RM[a gm WAERS = 'HUF' IMPORTING BETRG = b2* EXCEPTIONS* CONVERT_ERROR = 1* OTHERS ( = 2C(_1&/_BConvert currenciesBF Z;[a gmConvert currencies>Which function can I use to convert currencies ? >For example 100 BEF = ??? DEM, or 100 BEF = ??? EUR CONVERT_TO_LOCAL_CURRENCY n=_10*Writing currency amount to string without thousands seperatorQBW |[a gmWriting currency amount to string without thousands seperator This is usefull e.g. i connection with batch input/call transaction.* GI_OUTPUT-WRBTR: Field type Currency with amount* L_AMOUNT_STRING: Field type c with amount PERFORM AMOUNT_TO_STRING USING GI_OUTPUT-WRBTR CHANGING L_AMOUNT_STRING.FORM AMOUNT_TO_STRING USING P_AMOUNT CHANGING P_AMOUNT_STRING.CD\ [a gm DATA L_SEP(1) TYPE C. PERFORM GET_THOUSAND_SEPERATOR USING L_SEP. WRITE P_AMOUNT TO P_AMOUNT_STRING. REPLACE L_SEP WITH ' ' INTO P_AMOUNT_STRING. CONDENSE P_AMOUNT_STRING NO-GAPS. WRITE P_AMOUNT_STRING TO P_AMOUNT_STRING RIGHT-JUSTIFIED.ENDFORM. FORM GET_THOUSAND_SEPERATOR USING P_SEP. DATA: L_AMOUNT LIKE BSEG-DMBTR, L_AMOUNT_STRING(15) TYPE C.* Find 1000 seperator. If decimal seperator = . then* 1000 seperator = , else 1000 seperator = .*L f5[a gm L_AMOUNT = '1.00'. WRITE L_AMOUNT TO L_AMOUNT_STRING. IF L_AMOUNT_STRING CS ','. P_SEP = '.'. ELSE. P_SEP = ','. ENDIF.ENDFORM. 8Db181bCStringsC* i[a gm  Strings1. Replace and condense2. Concatenating3. Formatted Write and Move 4. Removing leading/trailing characters.5. Search for a string within a string6. Word wrapping/Split7. Using CA - Contains any (CO, CN, NA) 8. Splitting delimited string1. Replace and condenseReplace replaces characters within a string. If a character is substituted with a space, you can use Condense to remove the space.:bW |[a gmREPLACE '.' WITH ',' INTO w_tmpstrExample: w_matnr = '3617203-100' REPLACE '-' WITH '' INTO w_matnr. CONDENSE w_matnr NO-GAPS. w_matnr will now contain: 3617203100 2. Concatenating CONCATENATE f1 ... fn INTO g. Addition: ... SEPARATED BY h + _ [a gmExample: CONCATENATE 'Der er sket en fejl i opdateringen' ITAB-ID ITAB-HKONT ITAB-DMBTR INTO ERRTXT SEPARATED BY SPACE.SPACE is an ABAP keyword.3. Formatted Write and Move You can use either WRITE or MOVE. Using WRITE the format of the target field will be the same as when you write to a list. That means that the settings in the user's master record for decimal point and date are taking into account.0F] [a gmIf you use MOVE, the decimal point is always a periode.Syntax:move t1 + offset(length) to t2write t1 + offset(length) to t2Example:data: t1(10) type c, t2(10) type c.t1 = '0123456789'.move t1+3(5) to t2.t2 will contain 34567Instead of move you could have used write. In this example the result would have been the same.4. Removing leading/trailing characters.SHIFT myvar left delet F*ing leading '0'.SHIFT myvar right deleting trailing '0 L [ [a gm5. Search for a string within a stringString1 = 'This is a string'. SEARCH String1 for 'is'.If the search string is found SY-SUBRC = 0SY-FDPOS = 5 because the strinmg "is" starts at offset 5.You can also use the Relational Operators for Character-Like FieldsCO, CN, CA, NA .... see the ABAP documentation for further informat6. Word wrapping/SplitYou can use the fucntion module SWA_STRING_SPLIT to split a tring intosmaller strings or use function module SWA_STRING_SPLIT(FP n[a gm----->Does someone know how to word wrap fields from one internal table to >a field in another internal table, when the fields have a different >lengths ? >E.g. >Table 1 has a field with a line length of 50 characters, and I want >to place each line in table one in one or more lines in table 2 that >has a field length of 10: >table1-field1 = 'This is a very long line that should be wrapped' >should be >table2-Field1: >sy-tabix = 1: This is a "P n[a gm>sy-tabix = 2: very long >sy-tabix = 3: line that >sy-tabix = 4: should be >sy-tabix = 5: wrapped This example shows how to split the text in a field of one internal table and place it into a field in another internal table that hasa shorter sizeREPORT z_hfa_test .DATA:* Table containing texts that has to be split BEGIN OF it_longstrings OCCURS 0, line TYPE string, END OF it_longstrings,* Output table from function SWA_STRING_SPLIT, K d[a gm it_string_components LIKE swastrtab OCCURS 0 WITH HEADER LINE,* Table containg the resukting strings BEGIN OF it_shortstrings OCCURS 0, line(10) TYPE c, END OF it_shortstrings,start-of-selection.* Add some lines to it_longstringsit_longstrings-line = '123456789012345 Hallo this is a very long'.APPEND it_longstrings.it_longstrings-line = 'line, that has to be split.'.APPEND it_longstrings. it_longstrings-line = 'The line has to be split into lines of 10<D K d[a gm characters'.APPEND it_longstrings.* Split each line of it_longstrings into lines with length 10* The resuklting lines are palced in table it_string_componentsLOOP AT it_longstrings. CLEAR it_string_components. REFRESH it_string_components. CALL FUNCTION 'SWA_STRING_SPLIT' EXPORTING input_string = it_longstrings-line max_component_length = 10* TERMINATING_SEPARATORS =* OPENING_SEPARATORS =! e L f[a gm TABLES string_components = it_string_components* EXCEPTIONS* MAX_COMPONENT_LENGTH_INVALID = 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.* Add the lines to table LOOP AT it_string_components. it_shortstrings-line = it_string_components-str. APPEND it_shortstrings.9D i [a gm ENDLOOP.ENDLOOP.END-OF-SELECTION. LOOP AT it_shortstrings. WRITE: / it_shortstrings-line. ENDLOOP.7. Using CA - Contains any (CO, CN, NA) belob = '300120.00'. if belob CA '.'. l_pos = sy-fdpos. move mystring+l_pos to mydec. if mydec CO '.0'. move mystring+0(l_pos) to mystring2. endif. endif.8. Splitting delimited stringInstead of placing the substring ind l_output, it could be palced in an"e AP n[a gminternaltable usA*ing this syntax:SPLIT f AT g INTO TABLE itab. Each substring will be placed in its own table row. In the example below, the table would have 5 rows.Note that all output fields must be of type char or stringREPORT YDK8HENFR_TEST1 line-size 80.data: l_string(132) type c.data: begin of l_output, name(40) type c, age(10) type c, address(40) type c, city(40) type c, zipcode(4) type c,CQ p[a gm end of l_output.start-of-selection. l_string = 'John;28;My street;My city;3000'. split l_string at ';' into l_output-name l_output-age l_output-address l_output-city l_output-zipcode. write: / l_output-name. write: / l_output-age. write: / l_output-address. write: / l_output-city. write: / l_output-zipc: AD12DJPF-Status9CSFd [a gmPF-Status1. How to set pf-status2. How to set pf-status excluding/including single menu items3. How to set pf-status excluding/including several menu items4. Setting PF status to the (SAP) system default 5. How to check for pf-status6. Use of SY-PFKEY1. How to set pf-statusset pf-status 'ZZBILSTA'.2. How to set pf-status excluding/including single menu itemsYou can exclude menus by using exclude :set pf-status 'ZZBILSTA' excluding 'PST'.DnHc q[a gmNote: Can also be used with include instead of exclude3. How to set pf-status excluding/including several menu itemsYou have to use an internal table to store the status you wan't to ex- or include:DATA:BEGIN OF I_PF_STATUS_TAB OCCURS 10,FCODE(4),END OF I_PF_STATUS_TAB.FORM SET_PF_STATUS_POSTER. REFRESH I_PF_STATUS_TAB. MOVE 'PST' TO I_PF_STATUS_TAB. APPEND I_PF_STATUS_TAB. MOVE 'ART' TO I_PF_STATUS_TAB.OSFJg [a gm APPEND I_PF_STATUS_TAB. SET PF-STATUS 'ZZBILSTA' EXCLUDING I_PF_STATUS_TAB.ENDFORM.4. Setting PF status to the (SAP) system default set pf-status 'BASIC'.5. How to check for pf-statusAT USER-COMMAND. CASE SY-UCOMM. WHEN 'ART'. PERFORM STYR_ARTSKONTI. WHEN 'PST'. PERFORM STYR_POSTER. WHEN 'BIL'. PERFORM VIS_BILAG. ENDCASE.6. Use of SY-PFKEYYou can use the system variable sy-pfkey to retrieve the name of the current pf status?nHJ< H[a gm5J1K131KKCase^JKG ^[a gmCaseCASE SY-UCOMM. WHEN 'RW'. LEAVE PROGRAM. WHEN OTHERS. ENDCASE.61K L14 LCheckY KeNO l[a gmCheckDescription. CHECK evaluates the subsequent logical expression. If it is true, the processing continues with the next statement. In loop structures like DO ... ENDDO 6 LC T[a gm WHILE ... ENDWHILE LOOP ... ENDLOOP SELECT ... ENDSELECT CHECK with a negative outcome terminates the current loopeNK pass and goes back to the beginning of the loop to start the next pass, if there is one. 6eN݂C T[a gm In structures like FORM ... ENDFORM FUNCTION ... ENDFUNCTION MODULE ... ENDMODULE AT events pF \[a gm GET events Examplecheck pusnam = bkpf-usnam.9݂̃15̃`NEW-LINEJG \[a gmNEW-LINE Addition: 1. ... NO-SCROLLING 2. ... SCROLLING Generates a new line during list processing. =̃SC T[a gm Terminates the current list line and moves the cursor to the next list line. If there has been no output (with WRITE or SKIP) since the last NEW-LINE, the NEW-LINE is ignored, i.e. no new line is started. You can also generate a new line with WRITE AT /.... =C T[a gm The following key words implicitly generate a new line: NEW-PAGE, CALL SCREEN. ... NO-SCROLLING Flags the list line following the line feed as "not movable" (i.e. horizontal scrolling has no effect). This allows you to S`> J%[a gm keep title lines and indented comment lines or areas visible in 716vFormatV`v [a gm"FormatExample:format color col_total intensified. write : / 'Bilag ialt :',50 ialt_bilag. format color col_background intensified off. Resetting format: format reset.How to use variables in the FORMAT command. DATA COLORID TYPE I VALUE 4.FORMAT INTENSIFIED ON COLOR = COLORID. Colors617:WriteMv P n[a gmWriteExamples of syntax: DATA: WORD(16), VALUE '0123456789ABCDEF', COL TYPE I VALUE 5, LEN TYPE I VALUE 10. WRITE AT / WORD. "new line WRITE AT 5 WORD. "column 5 WRITE AT (10) WORD. "output length 10 WRITE AT /5(10) WORD. "new line, column 5, length 10  vGSX ~[a gmm9{Alj WRITE AT COL WORD. "column = contents of COL WRITE AT (LEN) WORD. "output length = contents of LEN WRITE AT /COL(LEN) WORD. "new line, column = contents of COL "output length = contents of LEN Example writing at column 50 with formats:write : / sy-uline. format color col_total intensified.  :Y [a gmwrite : / 'Bilag ialt :',50 ialt_bilag. format color col_background intensified off. write : / sy-uline. Example formatting a single field:write: / itop-blart color col_key, 5 itop-counter. Write underwrite at 1 text-049.write at 12 text-050.write g_input-hkont under text-049.write g_input-kostl under text-050.5So18oHideB:H `[a gmHidehide: itop-gjahr, itop-bukrs ,itop-blart ,itop-blart.Co<19<Move corresponding#__ [a gmMove correspondingHere move corresponding is used tio move indetical fields from a transparent table to an internal table.Name of transparent table: bkpfName of internal table : itobTYPES: BEGIN OF T_BTOP,CPUDT LIKE BKPF-CPUDT,BUKRS LIKE BKPF-BUKRS,GJAHR LIKE BKPF-GJAHR,BLART LIKE BKPF-BLART,END OF T_ITAB.data: itop type t_itop occurs 0 with header line.SELECT * FROM BKPF WHERE CPUDT = PCPUDT.><F \|[a gm MOVE-CORRESPONDING BKPF TO ITOP. ENDSELECT.B_%1:%Define parametersKA R[a gmDefine parametersparameters: pcpudt like bkpf-cpudt default sy-datum.I%1;Menubars and pushbuttons*$W |[a gmMenubars and pushbuttonsUse at uzser-command to detect when the user has pressed a button in the menu bar:AT USER-COMMAND. CASE SY-UCOMM. WHEN 'OK'. TMP_ANVISNR = ZANVIS-ZZANVISNR. LEAVE TO SCREEN 0. WHEN 'CANC'. LEAVE TO SCREEN 0. ENDCASE.Use the user_command module to detect when the user has pressed a pushbutton: MODULE USER_COMMAND_0100 INPUT. GEM_OKKODE = OKKODE. CLEAR OKKODE. CASE GEM_OKKODE. WHEN 'OPRT'.x:> Lt[a gm PERFORM OPRET. WHEN 'GEM'. PERFORM GEM.D$1<6Indhold - Reporting8 G[a gm0I—O+pҗeE!"-7c#)A͍[q\ReportingInteractive reporting (Drill down reporting ) - exampleStructure of a report - ExampleSelection-screen / Select-optionsEvents used in reportingControl level reportingPositioned writeCalling another report from your own reportPageheader with date, username e.t.c., exampleManaging outputDynamic sort Reading mulitiple selected lines in a listUsing a checkbox in a reportDh| ƀ[a gmK`鉂=[ 7d5==L3X0lCfChanging a line in a reportReturning to, and refreshing report data after call to dialog screenDisable parameterSubmitting a report using ranges for select-optionsAT-LINE-SELECTION does not work together with custom PF-STATUSGUI-Status - Default codes for standard buttonsValidation of selection screensConvert a report to ascii and save ith in an internal tableSubmitting a report in the background and send the list to spool8 M[a gmw${Alj剂Q^/{=щ8r?*#OveX5T+‰Submitting a report from ABAP with selection criteriasFormatNew-lineParameters - definingWriteAt line-selectionHow to call a dialog screen from a report and passing dataHow to write pageno of totalpagHow to check if a valid line is selected before drill down How to alternate grey and white linesHow to find the example reportsHow to use sy-lsind to determine the current list levelJh6L h[a gm㖪:{㗓How to set a scroll boundaryHow to clear selection screen inputAw1=w Positioned write76i [a gmPositioned writeWRITE UNDER.Syntax: WRITE under Field f is outputted under field Example:WRITE AT 10 text-001.WRITE AT 20 text-002.new-line.LOOP AT gi_rapport into g_rapport. WRITE g_rapport-field1 under text-001. WRITE g_rapport-field2 under text-002.ENDLOOP.RESERVE...BACKThe rapport should look like this:2030 John Dowe This is Myroad 12 a text Mytown for John Dowe4w] [a gmLOOP AT mytable. RESERVE 10 LINES. WRITE: / '2030'. WRITE: / 'John Dowe'. WRITE: / 'Myroad 12'. WRITE: / 'Mytown'.* Go back to the top BACK. WRITE: / 'This is'. WRITE: / 'a text'. WRITE: / 'for'. WRITE: / 'John Dowe'.ENDLOOP.Note: That you have to fill up with empty rows in the last column untill there is at least as many rows as in column 2 Horizontal and vertical positioningHorizontal position: POSITION  M h[a gmcol = Column no. Retrieve curretn column number witj SY-COLNOVertical positioning:SKIP TO LINE Retrieve the current linenumber with SY-LINNOExample:SKIP TO LINE 10.POSITION 20.WRITE 'Test'g6h 1 >h  Submitting a report from ABAP with selection criteriasH  N j[a gmSubmitting a report from ABAP with selection criterias TYPES: tt_selection TYPE STANDARD TABLE OF rsparams. DATA: l_iblnr TYPE st_iblnr,* Define internal table and work area for select-options l_selection TYPE rsparams, li_selection TYPE tt_selection.* Create selectIon table LOOP AT gi_iblnr INTO l_iblnr. CLEAR l_selection. l_selection-selname = 'IM_IBLNR'. "Option name l_selection-kind = 'S'. "S= select options P=Parameters^h  D V5[a gm l_selection-sign = 'I'. "Sign l_selection-option = 'EQ'. "Option l_selection-low = l_iblnr-iblnr. "Value APPEND l_selection TO li_selection. ENDLOOP.* Submit report SUBMIT rm07idif WITH SELECTION-TABLE li_selection AND RETURN.q@  1? @Submitting a report in the background and send the list to spool9 O l[a gmSubmitting a report in the background and send the list to spool* If the program is run in the background the * difference report is send to spool. SUBMIT rm07idif WITH SELECTION-TABLE li_selection EXPORTING LIST TO MEMORY AND RETURN. CALL FUNCTION 'LIST_FROM_MEMORY' TABLES listobject = li_listobject EXCEPTIONS not_found = 1 OTHERS = 2. CHECK sy-subrc = 0. CALL FUNCTION 'WRITE_LIST' @C TW[a gm @  TABLES listobject = li_listobject EXCEPTIONS empty_list = 1 OTHERS = 2. IF sy-subrc <> 0. ENDIF.l;A16@AGConvert a report to ascii and save it in an internal table%@CCM h[a gmConvert a report to ascii and save it in an internal tabledata: * Internal table for report in ascii format begin of i_ascii_list occurs 0, text(134) type c, end of i_ascii_list.* Internal table for report in ABAPLIST (Structure for InternalTable as List Container) format i_abaplist like abaplist occurs 0 with header line,End-of-selection. perform write_list. perform save_ascii_list.#AfEN j[a gmform write_list.* Write report to screen write: / .........endform.form save_ascii_list.*---------------------------------------------------------------------------* Save report in ascii format in table i_ascii_list *---------------------------------------------------------------------------* Save report as List container CALL FUNCTION 'SAVE_LIST'* EXPORTING* LIST_INDEX = '0' TABLES listobject = i_abaplistCCGM h[a gm EXCEPTIONS list_index_invalid = 1 OTHERS = 2. . IF sy-subrc <> 0. ENDIF.* Store report i ascii formt in table i_ascii_list CALL FUNCTION 'LIST_TO_ASCI'* EXPORTING* LIST_INDEX = -1 TABLES listasci = i_ascii_list listobject = i_abaplist EXCEPTIONS empty_list = 1 list_index_invalid = 2 OTHERS = 3.g(fEG? NP[a gm IF sy-subrc <> 0. ENDIF.endorm.PG8H1[A8HCNValidation of selection screens#G[JR r[a gmValidation of selection screensValidation of selection screen can be performed in the AT SELECTION SCREEN event.Example:************************************************************************* AT SELECTION SCREEN *************************************************************************at selection-screen. perform validate_selection_screen using g_returkode. if g_returkode = c_returkode_error.+8HLM h[a gm exit. endif.*&---------------------------------------------------------------------**& Form validate_selection_screen*&---------------------------------------------------------------------** Validation of selection screen*----------------------------------------------------------------------** -->P_G_RETURKODE text*----------------------------------------------------------------------*form validate_selection_screen using p_returkode.i[JCNT v[a gm if s_framd > 12 or s_framd < 1 or s_tilmd > 12 or s_tilmd < 1. message e998. p_returkode = c_returkode_error. exit. endif. if s_framd > s_tilmd. message e997. p_returkode = c_returkode_error. exit. endif. if s_fraaar < s_tilaar. message e996. p_returkode = c_returkode_error. exit. endif.ENDFORM.`/LN1EBNOGUI-Status - Default codes for standard buttonsCNOG \=[a gmGUI-Status - Default codes for standard buttonsIf you use the codes below, the buttons will work automatically:BACK = BACKExit = %EXCancel = RWo>N 1|C AT-LINE-SELECTION does not work together with custom PF-STATUSO O OD V[a gmAT-LINE-SELECTION does not work together with custom PF-STATUSTo make AT-LINE-SELECTION to work together with custom PF-STATUS, set F2 and F9 to PICK in the GUI Status under Function keys.d3 y1VDykSubmitting a report using ranges for select-optionsPɃK d [a gmSubmitting a report using ranges for select-options* Define range for ltak-tanumRANGES: r_tanum FOR ltak-tanum. * Read values from database tabel into the range* These values are later used for select-options in the reportSELECT * FROM ltak WHERE lgnum = w_lgnum AND "Warehouse number/complex vbeln = w_screen1000-io_vbeln. "Transfer order numberyD V[a gm MOVE ltak-tanum TO r_tanum-low. MOVE 'I' TO r_tanum-sign. MOVE 'EQ' TO r_tanum-option. APPEND r_tanum. ENDSELECT. * Submit report with range GɃk< H[a gmSUBMIT zmm00100 WITH p_tanum IN r_tanum. h7ӆ1xEӆInteractive reporting (Drill down reporting ) - example:k \ [a gmInteractive reporting (Drill down reporting ) - exampleIn this example you have a mainreport REPORT1. From REPORT1 you can drill down to REPORT2 and from REPORT2 you can drill downto REPORT3.Tip:Use hotspots to fire the AT LINE-SELECTION event.When the cursor is over the hotspot, it cganges to a hand,and you just have to click on the hostspot, instead ofdouble clicking.Note:To see how to recognize if the user has selected a valid line, take a look at*ӆ7 ̀W[a gm#OvHow to check if a valid line is selected before drill down.START-OF-SELECTION.* Read data for REPORT1 into itab1END-OF-SELECTION. PERFORM write_report1.TOP-OF-PAGE.* Write list header for REPORT1AT USER-COMMAND.* Respond when the user presses a function key CASE sy-ucomm. WHEN 'REPORT2'. PERFORM write_reprt2. WHEN 'REPORT3'. _  V z[a gm PERFORM write_reprt3. ENDCASE. AT LINE-SELECTION. * Istead of pressing a button can perform the same actions * as i AT USER-COMMAND, by double clicking a line * sy-lsind contains the list level.* Each time an interactive list event occurs, sy-lsind is* automatically increased by 1.* At REPORT1 sy-lsin = 0 CASE sy-lsind. WHEN 1. F7܏g [a gm PERFORM write_reprt2. WHEN 2. PERFORM write_reprt3. ENDCASE. TOP-OF-PAGE.* Write report header for report1 ( sy-lsind = 0 )TOP-OF-PAGE DURING LINE-SELECTION. * Write report header for sub reports CASE sy-lsind. WHEN 1. * Write report header for REPORT2.5z €w[܏ka gm WHEN 2. * Write report header for REPORT3. ENDCASE.FORM WRITE_REPORT1. LOOP at itab1.* write report1....... * Hide keyfields used for the select statement of* report2 HIDE: itab1_year, itab1_month. ENDLOOP. ENDFORM.FORM WRITE_REPORT2. SELECT * FROM databasetable2 into itab2 WHERE year = itab1_year AND7܏Ti [a gm month = itab1_month. LOOP at itab2.* write report2 ....... * Hide keyfields used for the select statement of* report3 HIDE: itab2_carrid. ENDLOOP. ENDFORM.FORM WRITE_REPORT3. SELECT * FROM databasetable3 into itab3 WHERE carrid = itab2_carrid. LOOP at itab3.* write report3 ....... * No need to hide keyfields, as further drill down is not~5I bj[a gm* possible ENDLOOP. ENDFORM. BT1|FNDisable parameter9MV z[a gmDisable parameterQ:Dear all,I have parameters in my ABAP/4 reporting program:parameters: date like sy-datum, division (1) type c.parameters: r1 radiobutton group rad1, r2 radiobutton group rad2.How to change below code into ABAP/4 languageif r1 ne space. division = invisible.elseif r2 ne space. divisio = visible.endif.thank youA:Try something like this in the even AT SELECTION-SCREEN or AT SELECTION-SCREENNT v[[a gmOUTPUT (whichever makes sense for what you are doing...)LOOP AT SCREEN. If screen-name = division. if r1 ne space. screen-invisible = 1. elseif r2 ne space. screen-invisible = 0. endif. modify screen. endif.ENDLOOP.You may also try adding a statement for screen-input and/or screen outputinstead. That way they are still visible, but you can't change them.Good luck!Eric BushmanBM1MGAt line-selection4NP n[a gmAt line-selectionQuestion:Hi Gang,I'm trying to display a sub total of an internal table field when theuser clicks onthat field using at line-selection. I'm using a dynamic field which iassign a value towith GET CURSOR FIELD (dynamic field ) which seems to work when ire-sortthe table and display, but what doesn't work is when i use AT NEW andAT END OF i seem to get a total on every line.e.gMy table is called DETAILS_TAB and I've declared the dynamic field as aa%P n#[a gmdata field and in my internal tableCode extraction :at line-selection. - whencursor double clicksget cursor field column. - captureinternal table field namesplit column at delimeter into name field. - this extracts theDETAILS_TAB fromthe table field namesort details_tab by (field) matnr. - new sortloop at details_tab. at new (field). new-page. -;lR r[a gmnew page endat.* write: (all internal table details)* at end of (field). sum. write: details_tab-labst. - totalwarehouse value from mard-labst endat.endloop.Any Ideas ??Answer 1:(field) needs to be the first field in structure DETAILS_TAB for this towork. Otherwise, AT NEW and AT END events are trig%lNgered when any fieldfrom the first field to the field in (field) in table DETAILS_TAB changes*%P n[a gmvalue.Answer 2: you're getting a total on every line because the internal table 'key' is changing on every line. The key is everything to the left of (field). For example, your table has the structure data: begin of itab occurs 100, k1(4), k2(4), k3(4), v1 type i, end of itab. Your data is 1 1 1 10 1 1 2 10 1 2 1 10 1 2 2 10/lM h[a gm 2 1 1 10 2 1 2 10 you assign 'K3' to variable field and sort itab by (field) and your data is 1 1 1 10 1 2 1 10 2 1 1 10 1 1 2 10 2 1 2 10 1 2 2 10 even though your at statement says at new k3, because k1 and k2 are to the left of k3 ABAP does the sum after every line. I think this is a horrible trick that SAP has played on us; the code#K d[a gm syntax checks OK but it doesn't do what you expect. You have 2 options; program the control break yourself, or create a field at the front of the internal table and move (field) to it on every line. The second option requires the use of a field symbol and might be something like field-symbols . data: begin of itab occurs 100, sort(12), k1(4), . . end of itab.@X ~[a gm . . . assign (field) to . loop at itab. move to itab-sort. endloop. sort itab. loop at itab. at new sort. . . . Hope this helps Daniel WanAnswer 3:Try using the ON CHANGE OF event instead.Regards,Graham HicksonuD1H2@Returning to, and refreshing report data after call to dialog screen X ~[a gmReturning to, and refreshing report data after call to dialog screenThe scenario:You have a report, and call a dialog screen where you modify data in the reports underlying table. After modifying the data you want to return to the report screen, and have it refreshed so that i displays the changes in the underlying table. report zrev03 no standard page heading.start-of-selection.* Initial display of report perform write_report.!2 f w[a gm* You have to display your own report headings that called from both the main report and the* sub report ( The second display )top-of-page. perform page_header.top-of-page during line-selection. perform page_header.case sy-ucomm. when 'CHG'.* Call dialog screen where data chenages are input. The code could be something like: set parameter id 'ZR1' field itab-zzrevomr. call transaction 'ZRE3'.A sc [a gm* After you return from the dialog screen you want to remove the old report so you* don't redisplay it when you use the back button sy-lsind = 0. * Write the report again with new data perform write_report.form write_report.*Here goes code that retrieves data for the report and write it, it could be something like: select * from zrevomr into table itab. loop at itab. write: / itab-zzrevomr, itab-zzrevomrtx.Z2 2@Y [a gm endloop.endform.form page_header.* ..s2@.. Code for page headerendform.Ls~@1LI~@~EChanging a line in a report-2@Bo }[a gmChanging a line in a reportYou can loop through the lines of a report and change the contents and formatting of single lines and/or single fields in a line. Example:data: lineno type i, new_contents(10) type c. clear lineno.new_contents = 'Changed'.do.* Count linenumberlineno = lineno + 1.* Make the line the current line read line lineno.*test for end of report _~@ Eb [a gmif sy-subrc ne 0. exit. endif.*Change the value of the field itab-zzrevomr in the current line to the value*of the variable new_contents modify current line field value itab-zzrevomr from new_contents.*Change format of the current line. In this example the firts field in the line is a checkbox,*and we want to prevent the user form changing the contents ( Input off )modify current line line format color col_negative intensified on t4B~E@ Ph[a gmfield format markfield input off. enddo.M EE1\JEJUsing a checkbox in a report@~E Hp [a gmUsing a checkbox in a reportIn a report you can use a checkbox to select one ore more records.* Define field for the checkbox data markfield(1) type c value space.* Define filed for counting line numbersdata lineno type i.* Writing the report with a checkbox write: / markfield as checkbox, i_ejitabel-zzbukrs, i_ejitabel-zzsaknr. * Reading the lines and cehcking if the line has been checkedCENJm [a gmlineno = 0.do.*Counting the line numberslineno = lineno + 1.* Read the value of markfieldread line lineno field value markfield.* Test for end of reportif sy-subrc ne 0. exit. endif.*If the value of the checkbox is X ( The checkbox is checked) the read*the rest of the fields of the report line into the internal table itab.if markfield = 'X'. read current line field valuei_ejitabel-zzbukrs into itab C HJI b[a gm i_ejitabel-zzsaknr into itab. endif.enddo.k:NJEK1KEKOHow to call a dialog screen from a report and passing data@JKA R[a gmHow to call a dialog screen from a report and passing dataIEKM ؀PTF!Aa1""""+"q"Make a reportAdd a pf-status with a botton to call the dialog screenMake the dialog screen. For every field in the dialog screen you want to pass to the report, mark the SET parameter checkbox, and apply a ParameterID in the attrubutes window of the screen.Create a transaction code for the dialog screenKO_ 5[a gmPlace the following code in the report:* p_rc is for receiving data from the dialog screendata: p_rc type i.at user-command.* Call the dialog screen. ZRE1 is the transaction code of the screen call transaction 'ZRE1'.* Get parameter from the dialog screen. ZRZ is the parameterID for the field in the dialog* screen you want to pass to the report. get parameter id 'ZRC' field p_rc.[*M 1L iReading mulitiple selected lines in a listO OVObh [a gmReading mulitiple selected lines in a listScenario: List with checkboxes. You want to read all lines in the list where the checkboxes are cheked into an internal table.* Define checkboxdata: markfield(1) type c value space. * Write listloop at itab. write: / markfield as checkbox, itab1-myfield.endloop.When you are ready to read the list igain:* Holds the number of the current line lineno type i. lineno = 0. 4 _ [a gm*Read the report line by line do. lineno = lineno + 1. * Read markfield read line lineno field value markfield. * Check that you haven't reached the end of the report if sy-subrc ne 0. exit. endif. * If markfield = X then read the report line again and append it to another internal7b͆N j[a gm* table if markfield = 'X'.* read the line igain to retrieve all fields of the line read current line field value itab1-myfield into itab2-myfield. append itab2. endif. ]i? N[a gm enddo. Example by Henrik FrankP͆1MHow to write pageno of totalpag iىR r[a gmHow to write pageno of totalpag>Dear Abapers,>I am working list processing.I have to output on bottom of every page>Page : 1 of totpage.>Thanx.>Back in June 1998, Leo J Selvaraj posted the code show below on this list. He says it works. I have nottried it.REPORT ZLTEST3 NO STANDARD PAGE HEADINGLINE-COUNT 65LINE-SIZE 80.DATA: NUM_PAGES_C(10) TYPE C.PERFORM WRITE.PERFORM GET_TOTAL_PAGENO.TOP-OF-PAGE.5J b[a gmWRITE:/(SY-LINCT) 'TEST - TEST' CENTERED.WRITE: / SY-DATUM, 60 SY-PAGNO,'of', '*****'.SKIP.*&---------------------------------------------------------------------**& Form WRITE*&---------------------------------------------------------------------** text **----------------------------------------------------------------------** --> p1 text* <-- p2 text*----------------------------------------------------------------------*FORM WRITE.DO 200 TIMES.WRITE:/ 'TEST', SY-LINNO.ى+I `[a gmENDDO.ENDFORM. " WRITE*&---------------------------------------------------------------------**& Form GET_TOTAL_PAGENO*&---------------------------------------------------------------------** text **----------------------------------------------------------------------** --> p1 text* <-- p2 text*----------------------------------------------------------------------*FORM GET_TOTAL_PAGENO.WRITE SY-PAGNO TO NUM_PAGES_C LEFT-JUSTIFIED.DO SY-PAGNO TIMES.E X/[a gmREAD LINE 2 OF PAGE SY-INDEX.REPLACE '*****' WITH NUM_PAGES_C INTO SY-LISEL.MODIFY LINE 2 OF PAGE SY-INDEX.ENDDO.ENDFORM. " GET_TOTAL_PAGENOT#+[1N[aHow to clear selection screen inputP n[a gmHow to clear selection screen input>> After executing a report, the green arrow [back key will takes usback to> the selection screen with the original input on it.>> However, my client would like to see the selection screen without any> previous input on it, so he could start entering new input without> deleting/overwriting the old ones. Is it possible to do that?>> Any hints will be greatly appreciated.>> Karen YimUse this part of code:[aR r[a gm----------------------DATA: EXECUTED TYPE N.your data definitions starts hereAT SELECTION-SCREEN OUTPUT. IF EXECUTED = 1. EXECUTED = 0. CLEAR: var1, var2, etc. REFRESH: selop1.here you have to clear all your parameters, select options etc. ENDIF.START-OF-SELECTION. EXECUTED = 1.your main coding starts here.END-OF-SELECTION.Kind regards, Ingo-Willy Raddatz.l;1OHow to check if a valid line is selected before drill down.Ca_ [a gmHow to check if a valid line is selected before drill down.There are several ways to do this. Below aere two examples:1. Clearing and testing for initial values of keyfields in the main report. 2. Using sy-lilli to check the number of the selected line1. Clearing and testing for initial values of keyfields in the main report. END-OF-SELECTION.* Clears the keyfields in the internal table of the main report, that are used to lookup data for the sub report. BRk [a gmCLEAR itab-blart.AT LINE-SELECTION.* Check if a valid line is selected CHECK NOT itab-blart IS INITIAL.* Write subreport PERFORM xxxx* Clear keyfield from the main report CLEAR itab-blart.2. Using sy-lilli to check the number of the selected lineSY-LILLI contains the absolute number of the line from which the event was triggered.If you know how many lines the heading of the reports use, it's easy to check if a valid line is selected.8V zq[a gmIn this example the report heading uses 4 lines. It's the possible to check if the number of the selected line is greater than 4:at line-selection. CHECK SY-LILLI > 4. PERFORM write_subreport.Note: This will not check if an invalid line selection have been made in the bottom of the report.= R1"PDynamic sort(EZ [a gmDynamic sort This example show how to perform dynamic sort in a list. You place the cursor on a column, pushes a button and the report is sorted in order of the selected column.Please also check the note from Mustafa Saribas after the example.* Call the sort routine when the pushbutton is pressedAT USER-COMMAND. CASE SY-UCOMM. WHEN 'SORT'. PERFORM SORT_POSTNIV_LISTE. ENDCASE.FORM SORT_POSTNIV_LISTE.DATA: FIELDNAME(20) TYPE C.ic [a gm* Get the name of the field where the cursor is placed GET CURSOR FIELD FIELDNAME.* Sort depending on which fieldname have been choosen CASE FIELDNAME. WHEN 'ITAB-BUKRS'. SORT ITAB BY BUKRS. WHEN 'ITAB-HKONT'. SORT ITAB BY HKONT. ENDCASE. * Call the the form (Whatever you name it) that writes the list again PERFORM WRITE_LIST.ENDFORM.Hi Henrik .. remember me ? I have just been reading your help file and got some better (?) solutions, here they are .. EL fW[a gm A different way of sorting internal table by a specified field could be : get cursor field cursorfield. check sy-subrc eq 0. sort itab by (cursorfield+5) ascending.please note that, cursorfield is a text variable and its length is : 20 .. I will go on to critise your help file, and if you want, i will send my comments to you.. Best regards. Mustafa Saribas M1QHow to set a scroll boundaryxT v[a gmHow to set a scroll boundaryREPORT ZZRNI001.TABLES: VBAP.SELECT-OPTIONS ZZVBELN FOR VBAP-VBELN. SELECT * FROM VBAP WHERE VBELN IN ZZVBELN. WRITE:/ VBAP-VBELN, VBAP-POSNR,VBAP-MATNR, VBAP-MATKL, VBAP-KWMENG, VBAP-ZIEME, VBAP-NETWR, VBAP-WAERK, VBAP-NTGEW, VBAP-GEWEI. ENDSELECT.TOP-OF-PAGE. SET LEFT SCROLL-BOUNDARY COLUMN 19.R!1uR-OSelection-screen / Select-options8T Ҁm[a gmSelection-screen / Select-optionsContents1. Using select options to select records 2. Select options with more than one default value or range3. Making a frame around groups of fields on the selection screen. 4. making a checkbox5. Making a radiobutton group6. How to add an option programmatically after the user has finished the selection screen7. Selection screen events8. Making an option invisible0 I[a gm9. Selection screen - Parameters on a single line 10. Setting the title text of a selection screen dynamically11. Using a custom toolbar in a selection screen12. Skip line on selection screen 1. Using select options to select recordsSELECT-OPTIONS:S_CPUDT FOR BKPF-CPUDT DEFAULT SY-DATUM,S_USNAM FOR BKPF-USNAM.SELECT * FROM BKPFWHERECPUDT IN S_CPUDT ANDUSNAM IN S_USNAM.-T T v[a gm2. Select options with more than one default value or rangeIf you want to use more than one default value or default range, you add the values to the internal table selection table. Note: You don't have to declare the table, it is created automatically. The table has the same name as the select variable ( In the example below s_hkont ).SELECT-OPTIONS: S_HKONT FOR ZTSAPSPEC-HKONT. INITIALIZATION. MOVE: 'I' to s_hkont-sign, H S t[a gm 'BT' TO S_HKONT-OPTION, '87111100' TO S_HKONT-LOW, '87111124' TO S_HKONT-HIGH. APPEND S_HKONT. MOVE: 'I' to s_hkont-sign, 'EQ' TO S_HKONT-OPTION, '87111300' TO S_HKONT-LOW, APPEND S_HKONT. 3. Making a frame around groups of fields on the selection screen.SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE TEXT-001.SELECT-OPTIONS: S_CPUDT FOR BKPF-CPUDT OBLIGATORY" w W[a gm     DEFAULT SY-DATUM.SELECTION-SCREEN END OF BLOCK 1.You can add further blocks (block2.......)4. making a checkboxparameters: x_afstem as checkbox default 'X'.5. Making a radiobutton groupPARAMETERS: RADIOBUTTON GROUP , RADIOBUTTON GROUP .Example:PARAMETERS: BUTTON1 RADIOBUTTON GROUP RAPT,K r@l [a gm BUTTON2 RADIOBUTTON GROUP RAPT.In the program you test for the radiobuttons like this:if button1 = 'X' then. < Here comes some code>elseif button2 = 'X' then. < Here comes some code>endif.5. How to add an option after the user has finished the selection screenUse the at selection-screen event to add options as showed above in er@xample 2. 7. Selection screen eventsInitializationBefore processing the selection screenIBu [a gm at selection-screen outputBefore the contents of selections screen is displayedat selection-screen on p/sProcessed after the suer has specified the Parameter por Select option sat selection-screenAfter the user has specified all selection criteria8. Making an option invisible If you don't want the user to be able to see the option you want to add, define it as No-DISPLAY. SELECT-OPTIONS:S_HKONT FOR ZTSAPSPEC-HKONT NO-DISPLAY,"r@Da [a gmS_BUKRS FOR ZTSAPSPEC-BUKRS,9. Selection screen - Parameters on a single line SELECTION-SCREEN BEGIN OF LINE. * The system does not output selection texts for parameters. * Set your own SELECTION-SCREEN COMMENT 1(15) text-001. * Parameters IB&GJ b[a gm PARAMETERS: p1(3) TYPE c, p2(5) TYPE c. SELECTION-SCREEN COMMENT 55(10) p_wmunit. SELECTION-SCREEN END OF LINE. INITIALIZATION. MOVE 'Unit' TO p_wmunit. >DdIM h[a gm 10. Setting the title text of a selection screen dynamicallyDefine GUI titles for the report. In this example the GUI titles COLLILABELand PALLETLABEL has been defined. In the INITIALIZATION event, dynamicallyset which GUI title to show with the SET TITELBAR statement. INITIALIZATION. IF p_colli = 'X'. SET TITLEBAR 'COLLILABEL'. G&GKO l[a gm ELSEIF p_pallet = 'X'. SET TITLEBAR 'PALLETLABEL'. ENDIF. 11. Using a custom toolbar in a selection screenWhen you use your own custom toolbar in a selection screen, the flow of thereport changes. Below is an example of how to use the events in such areport.Important! To be abel to submit your report, the submit button on the customtoolbar of the selection screen must be named 'ONLI' (= Execute) or 'PRIN' (= Execute and Print). 1dIMO l[a gmINITIALIZATION. * Your custom toolbar for the selection screen SET PF-STATUS '0002'. AT SELECTION-SCREEN. * Handle sy-ucomm from your custom toolbar on the selection screen. Notethat it is not necessary explicitly to handle 'ONLI' or 'PRIN' CASE sy-ucomm. WHEN 'GETDATA'. WHEN 'EXIT'. LEAVE PROGRAM. ENDCASE. START-OF-SELECTION. ..... retreieve data for the ereport.....QK-ON j[a gmEND-OF-SELECTION. * PF status for the report SET PF-STATUS '0001'. ..... write report ...... Henrik Frank12. Skip line on selection screen Selection-screen skip 1.@MmO1SmOManaging output3-Oi [a gmManaging outputThe NEW-PAGE PRINT ON smO-Otatement is used towill send the output to the spool.Use the PRINT OFF parameter to diasplay aoutput on the screen again.1. Sending a report directly to the printer2. Sending output to the spool1. Sending a report directly to the printerNEW-PAGE PRINT ON destination 'p190' COPIES 1 LIST NAME 'Test liste' COVER TEXT 'Cover text' SAP COVER PAGE 'X'mO\ )[a gm DATASET EXPIRATION 3 NO DIALOG.LOOP AT ITAB. WRITE: / ITAB-ZZREVLOGPR.ENDLOOP.NEW-PAGE PRINT OFF.2. Sending output to the spoolNEW-PAGE PRINT ON COPIES 1 LIST NAME 'Test liste' COVER TEXT 'zzspec01 Log for overfrsel af revlogdata fra host' SAP COVER PAGE ' ' IMMEDIATELY ' ' KEEP IN SPOOL 'X' DATASET EXPIRATION 3._.1TPageheader with date, username e.t.c., example/l _[a gmm9m9m9m9m9m9Pageheader with date, username e.t.c., exampleWRITE: SY-DATUM DD/MM/YYYY USING EDIT MASK '__/__-____', SY-UZEIT USING EDIT MASK '__:__:__', 55 SY-TITLE, 145 SY-UNAME, 160 SY-REPID, 181 'Side', (4) SY-PAGNO NO-SIGN.h71UzHow to use sy-lsind to determine the current list level|<z@ Px[a gmHow to use sy-lsind to determine the current list level\+ֆ1Vֆ=Calling another report from your own reportSz)\ [a gmCalling another report from your own report1. Calling a SAP standard report2. Calling one of your own reports1. Calling a SAP standard reportIn this example is used transaction FB03 for the standard report that should becalled.7ֆ`m PTF!Aa1" " " " Go into the standard report Place the cursor in the selection fields one by one and press F1Select Technical info for the fieldThe parameter-ID is the name of the parameter you can use2)N je[a gmFB03 has the parameters BLN, BUK and GJR. Call the transaction from your report using the following syntax ( We don't use the parameter GJR ): set parameter id 'BLN' field prttab-belnr. set parameter id 'BUK' field prttab-bukrs. call transaction 'FB03' and skip first screen. prttab is a filed from an internal table in your own report.2. Calling one of your own reportsYou call one of your own reports the same way as you call a SAP standard report, but you will have to define parameter IDs for the fields on the selection screen.]`=A P9[a gmTo do this you must edit the selection screen in the Object Browser. Select the screen and add a parameterId in the attributes screen for each field. Importent: If you later change your report and save it, the paramter ID's will be lost, and you will have to define them again.P1WώHow to find the example reportsB=ώY [a gmHow to find the example reportsExample reports:Object browserDevelopment class: SAB2Shows a list off example reports.Design guidline:Use transactioncode: LIBS to see demos of how the design of reports should be.P1)XEStructure of a report - Example?ώj\ [a gm Structure of a report - ExampleBy Henrik FrankBelow is an example of the structure of a report. I have commented out all the jώcode,so you can copy it into the ABAP editor, and use it as a template for your reports.REPORT ZRAPTEMP.* NO STANDARD PAGE HEADING* LINE-SIZE LINE-COUNT * MESSAGE-ID .************************************************************************ Description:** Log:** Date Init Description of change5U x[a gm* ------------------ ----- -----------------------------------------------------* dd-mm-yyyy xxxx*************************************************************************************************************************************** T A B L E S / S T R U C T U R E S / V I E W S**************************************************************** TABLES .**************************************************************** D A T A D E F I N I T I O N SCjX ~[a gm****************************************************************--------------------------------------------------------------* C O N S T A N T S*--------------------------------------------------------------* CONSTANTS: TYPE VALUE .*--------------------------------------------------------------* T Y P E S*--------------------------------------------------------------* TYPES: BEGIN OF ,* LIKE TYPE ,* END OF .*--------------------------------------------------------------* I N T E R N A L T A B E L S*--------------------------------------------------------------* DATA:* TYPE OCCURS WITH HEADER LINE,* BEGIN OF OCCURS ,* LIKE TYPE ,* END OF . T v[a gm*--------------------------------------------------------------* G L O B A L E V A R I A B L E S*--------------------------------------------------------------* DATA:* (1) TYPE <(C)>.**************************************************************** S E L E C T I O N S C R E E N****************************************************************SELECTION-SCREEN BEGIN OF BLOCK 1* WITH FRAME TITLE TEXT-XXX.@`N j[a gm** SELECT-OPTIONS: FOR * OBLIGATORY* DEFAULT .* PARAMETER: RADIOBUTTON GROUP DEFAULT 'X',* RADIOBUTTON GROUP ,* AS CHECKBOX DEFAULT 'X'.**SELECTION-SCREEN END OF BLOCK 1.**************************************************************** E V E N T S***************************************************************( M h[a gm*--------------------------------------------------------------* A T S E L E C T I O N - S C R E E N O U T P U T*--------------------------------------------------------------AT SELECTION-SCREEN OUTPUT. PERFORM ATSELOUT_MODIFY_SCREEN.*--------------------------------------------------------------* I N I T I A L I Z A T I O N* Executed before the selection screen is displayed.* Initialize fields on the selection screen,* variables and internal tables `R r[a gm*--------------------------------------------------------------INITIALIZATION. PERFORM INIT_VARIABLES.*--------------------------------------------------------------* S T A R T - O F - S E L E C T I O N*--------------------------------------------------------------START-OF-SELECTIώON.* SET PF-STATUS <'XXXX'>.* * CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'* EXPORTING* TEXT = T2Y [a gm* EXCEPTIONS* OTHERS = 1. PERFORM READ_DATA.*--------------------------------------------------------------* E N D - O F - S E L E C T I O N*--------------------------------------------------------------END-OF-SELECTION. PERFORM WRITE_REPORT.* CLEAR . "Used by interactive reports when drilling down*--------------------------------------------------------------* T O P - O F - P A G EU x[a gm*--------------------------------------------------------------TOP-OF-PAGE. PERFORM WRITE_REPORT_HEADER.*--------------------------------------------------------------* E N D - O F - P A G E*--------------------------------------------------------------END-OF-PAGE. PERFORM WRITE_REPORT_FOOTER.*--------------------------------------------------------------* A T U S E R - C O M M A N D * Fires when the user pushes a pushbuttonT v[a gm*--------------------------------------------------------------* AT USER-COMMAND.* CASE SY-UCOMM.* WHEN 'XXX'.* PERFORM .* WHEN 'YYY'.* PERFORM .* ENDCASE.*--------------------------------------------------------------* A T L I N E - S E L E C T I O N* Fires when user click on a line* in the report*--------------------------------------------------------------AT LINE-SELECTION.4: O l[a gm* CHECK NOT IS INITIAL.* PERFORM .* CLEAR .**************************************************************** F O R M S****************************************************************--------------------------------------------------------------* F O R M A T S E L O U T _ M O D I F Y _ S C R E E N* Modification of the selection screen*--------------------------------------------------------------FORM ATSELOUT_MODIFY_SCREEN.(b X ~[a gmENDFORM.*--------------------------------------------------------------* F O R M I N I T _ V A R I A B L E S* Initialisation of variables*--------------------------------------------------------------FORM INIT_VARIABLES.*Initialization of selection screen fields ( Select options fields )*DATA: year(4) TYPE c, * month(2) TYPE c, * day(2) TYPE c. * MOVE sy-datum+0(4) TO year. /:  P n[a gm* MOVE sy-datum+4(2) TO month. * MOVE: 'I' TO s_year-sign, * 'EQ' TO s_year-option, * year TO s_year-low. * APPEND s_year. * MOVE: 'I' TO s_month-sign, * 'EQ' TO s_month-option, * month TO s_month-low. *APPEND s_md. * Initialization of internal tables and variablesb T v[a gm* REFRESH .* CLEAR .ENDFORM.*--------------------------------------------------------------* F O R M R E A D _ D A T A* Read data from datbase table into* internal table*--------------------------------------------------------------FORM READ_DATA.* SELECT * FROM * WHERE IN AND* = SELFIELD2.* MOVE-CORRESPONDING TO .** COLLECT .= AU x[a gmAώ* ENDSELECT.* SORT BY FIELD1 FIELD2.ENDFORM.*--------------------------------------------------------------* F O R M W R I T E _ R E P O R T _ H E A D E R*--------------------------------------------------------------FORM WRITE_REPORT_HEADER.* FORMAT COLOR COL_HEADING.* WRITE AT (10) .* WRITE AT (25) .* ULINE.ENDFORM.*--------------------------------------------------------------* F O R M W R I T E _ R E P O R T _ F O O T E R)!DS t[a gm*--------------------------------------------------------------FORM WRITE_REPORT_FOOTER.* WRITE: / .ENDFORM.*--------------------------------------------------------------* F O R M W R I T E _ R A P P O R T* Udskrift af rapport*--------------------------------------------------------------FORM WRITE_RAPPORT.* LOOP AT .* WRITE : / AT 10 COLOR COL_KEY INTENSIFIED.* FORMAT RESET.* FORMAT COLOR COL_NORMAL.AEF Zq[a gm* WRITE : / AT 25 .* WRITE : / AT 40 .* HIDE . "Ved interaktive rapporter* NEW-LINE.* ENDLOOP.ENDFORM.V%!DuE1YuEGHow to alternate grey and white lines4EGg [a gmHow to alternate grey and white linesdata: line_check type i.LINE_CHECK = 0.LOOP AT I_BLARTNIV. * write keyfiled with keyfield color WRITE: I_BLARTNIV-BLART COLOR COL_KEY.* Swap colors for each line IF LINE_CHECK = 0. FORMAT COLOR COL_NORMAL INTENSIFIED ON. LINE_CHECK = 1. ELSE. FORMAT COLOR COL_NORMAL INTENSIFIED OFF. LINE_CHECK = 0. ENDIF.* Write line WRITE: / I_BLARTNIV-BILAGS_COUNTER.J uEG= J[a gm ENDLOOP.IG LINECOUNT. T1-TOP_LINE = LINECOUNT - LOOPLINES + 1. ENDIF. WHEN 'P++'. T1-TOP_LINE = LINECOUNT - LOOPLINES + 1.ENDCASE.ENDMODULE. " SCROLL INPUT Tom Quinn ESRI, Redlands, CA.+R r[a gmOR WHEN 'P--'. CLEAR SY-UCOMM. CTR1-TOP_LINE = 1. WHEN 'P-'. CLEAR SY-UCOMM. CTR1-TOP_LINE = CTR1-TOP_LINE - LINECOUNT1. IF CTR1-TOP_LINE < 1. CTR1-TOP_LINE = 1. ENDIF. WHEN 'P+'. DESCRIBE TABLE ITAB1 LINES N1. CTR1-TOP_LINE = CTR1-TOP_LINE + LINECOUNT1. IF CTR1-TOP_LINE > N1. CTR1-TOP_LINE = N1. ENDIF. CLEAR SY-UCOMM. WHEN 'P++'. DESCRIBE TABLE ITAB1 LINES N1.}:ۋC Vt[a gm CLEAR SY-UCOMM. CTR1-TOP_LINE = N1...Hˎ1^ˎsSorting a table control&N j[a gmSorting a table controlWhile were on the subject. You may need a sort routine in case the user selects a column and desires to sort on its contents. All you need is a sort icon on the applications toolbar of the screens GUIˎ to return the OK-codeof 'SORT'. You will need to copy this to the PAI of every screen and change the name of the module, and the actualitab for this screen MODULE SORT_screen100 INPUT. CASE SAVE_OK_CODE. WHEN 'SORT'.v-ˎsI `[[a gm LOOP AT T1-COLS INTO WA. IF WA-SELECTED = 'X' . SPLIT WA-SCREEN-NAME AT '-' INTO FILE FLD. SORT itab BY (FLD). ENDIF. ENDLOOP. ENDCASE.ENDMODULE. " SORT_screen100 INPUT Tom Quinn ESRI, Redlands, CA.W&1F_Other hints for using the table contro3se [a gmOther hints for using the table contro1. Setting the number of lines.2. Scrolling to a spcefic line.1. Setting the number of lines. tc1-lines = 500.> The problem is not in module scroll_code but rather the lack of module => LINE_COUNT in your PBO. I have found this very reliable and absolutely => necessary in getting the scrolling in table function to work. This module> => has the following code in it:>> module line_count output.tH `[a gm> describe table itab lines tc1-lines.> endmodule.2. Scrolling to a spcefic line.tc1-top_line = 500.],1 ` Using a Table control with an internal table,BK d[a gmUsing a Table control with an internal tableTable control : TC1Internal table : it_zsd00003In the attributes of the table control, select w/SelColumn to get a selectioncolumn on the table control, and give a name (In this example IT_ZSD00003-LINESEL).Remember to include the field IT_ZSD00003-LINESEL in the internal table ( linesel(1) type c, ).When used with an internal table, remember to programthe update functionality of the database tables. Update and #e[ [a gmvalidation can be done when leaving the screen or in PAI using controlname-current_line (E.g. TC1-current_line ) to indentify the entry in the internal table. process before output. module status_0100. loop at it_zsd00003 with control tc1 cursor tc1-current_line. module tc1_set_field_attr. "Optional endloop.module status_0100 output. set pf-status 'SCREEN0100'.* OPTIONAL: If it_zsd00003 hasn't allready been filled withBb s[a gm* data, you can do it the first time PBO is called module read_data.* Setting the number of lines of the table control describe table it_zsd00003 lines tc1-lines.* Optional: Place the cursor on line g_current_line e.g. after a* validation error has occured if not ( g_current_line is initial ). tc1-top_line = g_current_line. clear g_current_line. endif.endmodule. " STATUS_0100 OUTPUT0em [a gmmodule read_data. if flag is initial. perform read_data. flag = 1. endif.endmodule. module tc1_set_field_attr output.* Optional: Protect some of the columns on the* table control loop at screen. if screen-group1 = 'X'. screen-input = 0. modify screen. endif. endloop. endif.endmodule. " tc1_set_field_attr OUTPUT process after input. loop at it_zsd00003. l _[a gm module modify_tc1. endloop. module user_command_0100.module modify_tc1 input.* Modify an existing entry modify it_zsd00003 index tc1-current_line.* OR* Appending a new entry append it_zsd00003.endm odule. " modify_tc1 INPUTDeleting a single line selected with the selection column: form delete_record. loop at it_zsd00003. if it_zsd00003-linesel = 'X'. exit.9 K d[a gm endif. endloop. delete from zsd00003 where zdriftscenter = it_zsd00003-zdriftscenter ................................. endform. V% f 1)af How to Use a Context Menu in Programs  s I `[a gmHow to Use a Context Menu in ProgramsInitial remark: The way which will be presented here, has some peculiarities which appear not entirely logical. There are two explanations: 1.) The online-documentation about the subject of context menue" is both incomplete and misleading. Once again I had to conduct experiments in order to make the corresponding programme work. 2.) At one place commands of object-oriented language will be used. I want to show yet, that the context menue can also be used with conventional ABAP, however it is presumable that any solution entirely in object-oriented language would be more elegant. Anyway: the programme works when doing it the way which is prescribed here.f P T v[a gm"As an example I use a programme called SAPMZKONTMEN" which is located on the server deissv13", it is not bound to a client and it can be called with the transaction zkon". This programme has been developped only to test different ways of using a context menue. Apart from this purpose it contains nothing of interest.Funktionality: It has been possible before in SAP-Standard to get a menue inserted in the middle of the screen by pressing the right mouse-button. The respective functions can be carried out as usual with the cursor and the left mouse-button. New starting with release 4.6: also self-defined menue-items can be displayed with the right mouse-button. In order to demonstrate this, I am using words in the example which are not SAP-standard. (The screen-shot above features two functions which would not work on a computer - when clicking on them, there will be a message).<s G \y[a gmThe two functions help" and possible entries" appear automatically out of SAP-standard (even when no help-functions are considered in the programme). Important to know: The context menue is closely related with the functional keys. Thus when any text is placed on a functional key - either by SAP or by a programmer - the same text will appear in the context menue, and the sequence of texts follows the sequence of functional keys.How to proceedAccording to online-documentation, the context menue can be used in reports as well as in dialogue programmes. (In case of reporting an additional GUI-status needs to be defined). In dialogue-programming however, the benefit of context menues is more obvious, and that is why I confined myself to this subject. In the following parts, peculiar points need to be observed: P  F Z[a gmPrerequisite: The editor must be switched on Edit control mode". (Utilities Settings). Object-oriented commands would not work otherwise.TOP-Include: Data-definitions are needed as follows:DATA: zkontext TYPE cua_status, zname TYPE REF TO cl_ctmenu, cancel TYPE char01. In this point the online-documentation differs in the way that no data-definition is mentioned, however I experienced that without such data-definition persistent error-messages will be the result. About names: zkontext" and zname" can be freely chosen, yet they must be identical with other entries. ( Screens GUI-status). cancel" is a given parameter, and should be kept like this in order to avoid mistakes.S C O l C  [a gmPBO (Process before Output): Behind the definitions of status and title, the commands should look like this:CALL METHOD cl_ctmenu=>load_gui_status EXPORTING program = 'SAPMZKONTMEN' status = zkontext* DISABLE = menu = zname EXCEPTIONS read_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.Names of parameters: program" - indicate as literal the name of the programme where the context menue is to appear. zkontext" - depends on the GUI-status. zname" - depends on the screen. Another remark: In the beginning I put the command "CALL METHOD" into the TOP-Include. This works equally well. But in SAP-standard - an example would be the report-source SAPMSEUA - I found CALL METHOD" in PBO.H F L f[a gm"Screen: New on release 4.6: In the attributes of the screen there is another field called Contextmenu FORM ON CTMENU". Enter a freely chosable word into this field, this word then represents the parameter menu". (By reasons of caution I kept to the names-convention with y,z". It may be tested though what would happen otherwise.)Another hint: An input-field with the name Context Menu Form ON_CTMENU_" can also be found in the field-attributes on the screen-layout. This field existed already on release 4.0 but it had not been ready for input before. Now it is possible to enter menues here with the result that different context-menues can be used for different fields. (I didn't find the time to test it, but online-documentation says it works).6C I > J[a gmGUI-status: first of all you create an ordinary status the way you have done it before. Then you create another one whose name must be identical with the parameter status". When creating it, you have to mark the status-type context menu". In the display there will be two fields with the names code" and text". code" is for the ok-code, and text" is for the text which will appear on the screen. Entries are the same as in the ordinary status. When testing it I noticed something very peculiar:/F ;N = H [a gmAt first I used identical codes and texts in both statuses. In the context menue on screen I got the display correspondingly. Then - in the conventional status only - I changed the word create" into save". (In the status for context menue it still was create"). When carrying out the programme however, on the screen I read save" as it was written in the conventional status. Then I expanded both codes and texts in the conventional status. When carrying out the programme the context menue in display was expanded correspondingly. For the final display when the programme is running, quite obviously it is the conventional status which matters. This leads to the impression that the new status called context menu" might be superfluous. This is not so. When this additional status is omitted, the display looks the way to be expected, yet commands will not be carried out, or more precisely the ok-code will not be there. (I saw in the debugger that the variable okcode" was empty). Thus this second status called context menu" has something to do with transporting the okcode. It does not need to be complete though. Obviously it will do to enter just some ok-codes there, and then to continue by entering more codes and texts in the conventional status.B I ? L[a gmLimitations: ok-codes which are not connected with a functional key will appear in the ordinary menue (on top of the screen), but not in the context menue (to be displayed with the right mouse-button). Even though it is possible to enter icons in the context menue, such icons will not be displayed on the screen. Icons will be displayed only when being entered in the conventional status.;N  PAI (Process after Input): The corresponding module (user_command" or so) needs the following commands in the beginning:";N O l[a gm MODULE user_command_0100 INPUT.* PERFORM on_ct_menu_zname USING zkontext type ref to cl_ctmenu* CHANGING cancel type char01. PERFORM on_ct_menu_zname USING zkontext CHANGING cancel .ENDMODULE. " USER_COMMAND_0100 INPUT*&---------------------------------------------------------------------**& Form ON_CT_MENU_ZNAME*&---------------------------------------------------------------------*! ̄ Q p[a gm * text*----------------------------------------------------------------------** -->P_ZKONTEXT text* <--P_CANCEL text*----------------------------------------------------------------------*FORM on_ct_menu_zname USING p_zkontext CHANGING p_cancel . MOVE: schluessel TO zpers-schls, vornam TO zpers-vorna, nachnam TO zpers-nachn. CASE okcode. WHEN 'ANLG'.T @ N)[a gmAbout the passage which is deaktivated with asteriks: I found the commands like this in online-documentation. The way to combine data-declaration with the transfer of parameters in a subroutine is a new way of doing which may probably work in object-oriented language. In conventional ABAP though it does not work like this. In consequences I put data-declaration in its old place, and abbreviated the call of a subroutine correspondingly. Now it works.After this, you can proceed by programming the way you learned it before.{>̄ = J|[a gmIsmaning, August 25th 2000. Dr. O. Negendank (the author).b1 1b " Modifying attributes of screen fields at run time= : K d[a gmModifying attributes of screen fields at run timeTo modify the attributes of screen fields at run time you loop through thefields of the screen. When you find the name of a screen field you want tomodify, set attributes for the field and use MODIFY SCREEN to update theattribtes.You can find the attributes in the internal table SCREEN.This loop makes some of the screen fields invisible ind a selection screen:AT SELECTION-SCREEN OUTPUT. = w C T[a gm LOOP AT SCREEN. IF screen-name = 'P_VERAB' OR screen-name = 'P_STXT1' OR screen-name = 'P_STXT2' OR screen-name = '%_P_VERAB_%_APP_%-TEXT' OR screen-name = '%_P_STXT1_%_APP_%-TEXT' OR screen-name = '%_P_STXT2_%_APP_%-TEXT'. j: " A P[a gm screen-active = '0'. MODIFY SCREEN. ENDIF. ENDLOOP. ENDIF. a0w 1{c , Leaving dynpro allthough required entry not made*" P n[a gmLeaving dynpro allthough required entry not madeIn the menu painter - Function attributes for the button, set Functionaltype to E (Exit command)PROCESS AFTER INPUT.* Call module that leaves screen before User_Command_xxxx is executed MODULE ReturnExit AT EXIT-COMMAND. MODULE user_com " mand_1000.MODULE returnexit. CASE sy-ucomm. WHEN 'CANC'. "Or whatever you want to call it Clear w_screen. LEAVE TO SCREEN 0.s6 , = Jl[a gm ENDCASE. ENDMODULE. _. 1d Simple example of how to make a dialog program, a }[a gmSimple example of how to make a dialog programChecklist for simpe dialog programCreate the programCreate a new program in the repository browser (Transaction SE80) . Name standard for dialog programs is SAPMZIn the attributes window:- Module pool = M- Application = ZCreate the screenCreate a new screen.Add a pushbutton to the screenIn the attributes screen for the pushbutton, enter a function code6 Z [a gmin the FctCode field ( In this example: 0020 ).When you create a screen, SAP automathic creates a field with the type OK. The function code of the psuhbutton will be placed here when you push the button. However you have to supply the name of the OK field ( In this example: OK_CODE ).You must also create a global variable in the program, to store the value of the OK field ( See below ).Create global variablesDATA: *Global variable to store OK code ) q q[a gm ok_code(4), *Temporary store the value of the OK codesave_ok_code(4). Create code for the screenPROCESS BEFORE OUTPUT. MODULE status_0001. PROCESS AFTER INPUT. MODULE user_command_0001. MODULE status_0001 OUTPUT. SET PF-STATUS '0001'. SET TITLEBAR '001'. C L J b[a gm* Example of how deactivate a field on the screen* ZCOSTAFSTM-ZAFSTEMNR is the name of the screen field we want to* deactivate. LOOP AT SCREEN. CHECK screen-name = 'ZCOSTAFSTM-ZAFSTEMNR'.screen-input = '0'. MODIFY SCREEN. ENDLOOP. ENDIF. @ ] [a gmENDMODULE.MODULE user_command_0001 INPUT. * Here you can catch when user pushes a pushbutton* Save the OK code in save_ok_code and clear it save_ok_code = ok_code. CLEAR ok_code. 0L C T[a gm CASE save_ok_code. WHEN '0010'. * Afstemninger LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0. PERFORM my_list. WHEN '0020'. CALL TRANSACTION 'ZCO1'. c ] [a gm WHEN 'RETU'. LEAVE TO SCREEN '0000'. ENDCASE. ENDMODULE.AT USER-COMMAND.* Here you can catch when the user psuh a button on the menu , bar or presses a function key CASE sy-ucomm. WHEN 'OPRT'. PERFORM something. ENDCASE.O 1e ' Selected row in a screen table*  H ^[a gmSelected row in a screen table>Hi!>I have created a screen in full screen editor and added a screen table. I>have populated this table with data, but I don't know how to check wether a>row was selected or not. I know that I should perform check on this little>field (in table's field-list) that represents selection column ( 'X' ->selected, ' ' - not selected), but don't know how to transfer it's value>from the screen to a module in ABAP. Could someone please help me?9 : V z[a gm>TIATry this code ...Screen flow logic for screen having the screen table .****************PAI modulePROCESS AFTER INPUT.LOOP .FIELD CHK MODULE GET_DATA. "Chk is the Chk box in the screen tableENDLOOP.MODULE USER_COMMAND_0100.****Module get_data ****MODULE GET_DATA INPUT.IF CHK = 'X' . LINE = ITEM-CURRENT_LINE . "ITEM is the Table Control ******** ********ANY OTHER LOGIC AS REQUIRED ********ENDIF.ENDMODULE. " GET_DATA INPUT ' D VS[a gmNote thaat what i have mentioned above is for a module pool ( Dialogprogramming) .Let me know if you need any more details .Hiriemail:devaraya@hollandhitch.comJ: q 1fq B Select-Option in a Dynpro>'  ` [a gmSelect-Option in a Dynpro>Does Anybody know how could i simulate a "SELECT-OPTION" in a dynpro ????.1. CALL SELECTION-SCREEN scr.It may take a bit of lengthy coding to do this, an alternative would be touse:CALL SELECTION-SCREEN scr. and have all your select-option type parameters defined in a selectionscreen that you call.Let me know if you have any questions about the use of this command.Regards,Graham HicksonGraham2. COMPLEX_SELECTIONS_DIALOG)q O l[a gmHenrik,You might cut down the 'lengthy'-part by investigating Function moduleCOMPLEX_SELECTIONS_DIALOG to provide everything but the first _low and _highfield and the pushbutton. So maybe :)Graham,3. Export the selection to the memoryEverithing is programable, but in your case I would call a report with theselect-options that your users want then export the selection to the memory.Then return to the program as simple import the data in the memory. It isj) B A RR[a gmsimple ant it works fine.ByeNuno j9 1g B Tabel control, how to know the selected value on run-timeX B  K d[a gmTabel control, how to know the selected value on run-timeQ: Anyone who have idea on how to know the selected value on run-time?How can get the table control attribute selected value ? I try to read the value in debuger which is #(table_control-cols-selected). There is no difference on the other row which is not selected.A1:Take a look at program SAPMTCG1 - transaktion TCG1. It's a sample program.You have to add a field to your internal table and update the value of the field when a line is selected.y1 @ H ^c[a gmA2:Go to the table control properties (in screen painter), U have an option called coloum selection ,Find out the name and in run time check whether that field is 'X' .apsap.A3:Tom, the tc-cols-selected is for column selection only. For row selection you have two scenarios1. turn on the SelColumn attribute in screen painter, give it a name and declare an abap variable with the same name type C length 1. In your PAI lo @ B op at itab, when the selected row is processed the abap variable will = 'X'. At this point you can save the record or key.z1 B I `c[a gm2. you can determine which row the cursor is on in your table control as follows:DATA: LINE_SEL LIKE SY-STEPL, TABIX LIKE SY-TABIX GET CURSOR LINE LINE_SEL.TABIX = -TOP_LINE + LINE_SEL - 1.TABIX is now the index of the selected row.Hope this is helpful. Paul...a0@ dB 1hdB F Changing attributes of a screen field using codeiB D J b?[a gmChanging attributes of a screen field using codeSome attributes of screen fields can be changed when the program is running. To change the atrribute you perform a loop through all the screen fields, and test for the name of the screen field you want to change.To change the attribute you use the statement:SCREEN- = Attribute could f.x. be Input, Output, Intesified, Invisible (Se the manuals for a complete reference)Value can be either '0'or '1'. To activate an attribute use '1' and to deactivate it use '0'. dB F Q py[a gmUse Modify Screen to carry out the change.Example:You want to prevent input in the screen field ZREVOMR-ZZREVOMR: loop at screen. if screen-name = 'ZREVOMR-ZZREVOMR'. screen-input = '0'. modify screen. endif. endloop. ID #G 1Mi#G Validating screen fieldsPF sI _ [a gmValidating screen fieldsUsing Field and Chain statementThe fields zcostcheck-zaar and zcostcheck-zmaaned are validated i the module check_for _existence.If the values allready are found in the table zcostcheck, an Error message is displayed ( You can also use a Warning ), and module user_command_0051 will not be executed.Note: You sometimes want to execute module user_command before validation to give the user the possibillity to leave the screen by using the cancel button*#G K Q p[a gmNote: You only use the chain statement if you wan't to validate more than one field. Using the Chain statement validates the fields as a group.Process after input. Chain. field: zcostcheck-zaar, zcostcheck-zmaaned. module check_for _existence. * You could also place module user_command_0051 here to execute it everytime the fileds are* validated.2sI M L f[a gm endchain. module user_command_0051. module check_for _existence. data txt(40) type c. select single * from zcostcheck where zaar = zcostcheck-zaar and zmaaned = zcostcheck-zmaaned. if sy-subrc = 0. PK X ~[a gm concatenate 'Entry for ' zcostcheck-zaar '-' zcostcheck-zmaaned ' allready exist' into txt. message e000 with txt. endif. endmodule.Doing it without the field statementIn this example you want to validate that the value in the screen fieldM F zrevomr-zzrevomr exist in the table zzrevomr. If not an error message is shown, and the user can't leave the screen.GM ʂ e [a gmprocess after input.*Call the module that vaildates the screen fieldfield zrevomr-zzrevomr module valider_0901.*This module will only be called if the validtaion is okmodule user_command_0901.module valider_0901 input. select single * from zrevomr where zzrevomr = zrevomr-zzrevomr. if sy-subrc ne 0. ( b [a gm message id 'ZB' type 'E' number '004' with 'ZZREVOMR does not exist'. endif. endmodule. Conditional call ( If not initial )If you only want to call the validate module if the field has a non-initial value, you use the syntaxfield zrevomr-zzrevomr module valider_0901 on input. Chainʂ H ^e[a gmIf you want to valdidate more than one field, you should use the CHAIN statement:CHAIN: field: zrevomr-zzrevomr, zrevomr-zzinit. module validate_zrevomr.ENDCHAIN.O ; 1j; Calling a report from a dynpro> y _ [a gmCalling a report from a dynproThere are to ways to do this: Use leave to list-processing if you want to do it in your module pool. You will not be able to use selection-screens.Use the submit statement to start a seperate report from your dynpro.Leave to list-processingUse leave to list-processing to process a list from a dialog screen. You will then be able to use all the list commands. To return to dialog pocessing use one of the following commands:S; ̊ q [a gmIn the leave to list-processing comand add and return to screen xxxxLeave screenLeaves the current screen and processes the next screenLeave list-processingReturns from the listscreen to the return screen.Example:module init_0050 output.*Return to the calling screen after list porcesssingleave to list-processing and return to screen 0.set titlebar '50'. select * from zanvisline l y 8 b [a gm order by zanvisnr. write at 1(5) zanvisline-zanvisnr color col_key. format color col_normal. write: zanvisline-zzinit.endselect.leave screen.endmoduleSubmitTo call a report without returning to the calling transaction:submit ztestrapIf you wan't to return to the calling transaction:submit ztestrap and returnThese two way two call a report, does not display a selection screen. To display a selection screen:R̊ W |[a gmsubmit ztestrap via selection-screenSubmitting a report with parameters and return to calling program:Submit With = with
'.APPEND HTMLCODE. LOOP AT TEXTELEMENTETAB. TID = TEXTELEMENTETAB-ID.-H ^[a gm TKEY = TEXTELEMENTETAB-KEY. TENTRY = TEXTELEMENTETAB-ENTRY.* und HTML-Sonderzeichen ersetzen PERFORM SONDERZEICHEN CHANGING TID. PERFORM SONDERZEICHEN CHANGING TKEY. PERFORM SONDERZEICHEN CHANGING TENTRY. HTMLCODE-LINE = ''.APPEND HTMLCODE. CONCATENATE '' INTO HTMLCODE-LINE. APPEND HTMLCODE. CONCATENATE '' INTO HTMLCODE-LINE. APPEND HTMLCODE. CONCATENATE '' INTO HTMLCODE-LINE.$ B R[a gm APPEND HTMLCODE. HTMLCODE-LINE = ''.APPEND HTMLCODE. ENDLOOP. HTMLCODE-LINE = '
' TID '' TKEY '' TENTRY '
'.APPEND HTMLCODE. HTMLCODE-LINE = '

'.APPEND HTMLCODE.ENDFORM. " HTML_TEXTELEMENTEHQ1QValidating date entries8 S t[a gmValidating date entries >Does someone know of a function mdule that can be used for validation of date entries ?Hi Frank,try this (fast) module: data: date_intern type d, date_extern(10). date_extern = '28.03.2000'. CALL 'DATE_CONV_EXT_TO_INT' ID 'DATINT' FIELD date_intern " Intern Date ID 'DATEXT' FIELD date_extern. " Extern DateNow the field date_intern will have the value '20000328'.Check the sy-subrc for possible wrong input.L Q@ P[a gmJohn.?1# Random samples6J R r[a gmRandom samples>Say I have an internal table with one field (personnel number) populated with>many records.>Can anyone show me an algorithm that will take a random sample of these records>(but already knowing how many you want i.e. defined via a parameter) before>hand.DATA: MAX TYPE I, RND TYPE I.PARAMETERS: SAMPLE TYPE I.DESCRIBE TABLE ITAB LINES MAX.DO SAMPLE TIMES. CALL FUNCTION 'QF05_RANDOM_INTEGER' EXPORTING : N j[a gm RAN_INT_MAX = MAX RAN_INT_MIN = 1 IMPORTING RAN_INT = RND EXCEPTIONS INVALID_INPUT = 1 OTHERS = 2. READ TABLE ITAB INDEX RND. WRITE:/ ITAB-FIELD.ENDDO. --------Hi,In 3.1 you can find several function modules starting with RANDOM_* that canhelp you (function group F052).t6J  > Ll[a gmKind regards, Keld Gregersen, COREBIT A/S DenmarkN F 1F &BLong texts - How to read them1 wP n[a gmLong texts - How to read themREPORT ZHFRA_TEST .********************************************************** Shows how get long texts as for example Sales Text.** Note that it can be to some help to take a look at* table STXH.*********************************************************DATA: I_LINES LIKE TLINE OCCURS 0 WITH HEADER LINE.DATA: W_HEADER LIKE THEAD.START-OF-SELECTION.CALL FUNCTION 'READ_TEXT' EXPORTING* CLIENT = SY-MANDT!F @I `[a gm ID = '0001' LANGUAGE = 'E' NAME = '000000003515230010600000' OBJECT = 'MVKE'* ARCHIVE_HANDLE = 0 IMPORTING HEADER = W_HEADER TABLES LINES w@  = I_LINES EXCEPTIONS ID = 1 LANGUAGE = 2 NAME = 3:w&BH ^u[a gm NOT_FOUND = 4 OBJECT = 5 REFERENCE_CHECK = 6 WRONG_ACCESS_TO_ARCHIVE = 7 OTHERS = 8.END-OF-SELECTION.* i_lines will have an entry for every text lineLOOP AT I_LINES. WRITE:/ I_LINES-TDLINE.ENDLOOP.`/@B1BIHow to transport ABAP report selection variants&BDJ b[a gmHow to transport ABAP report selection variantsThe steps described below are used to transport a report variant. They can be initiated from transaction SE38 (\Tools\ABAP/4 workbench\Development\ABAP/4editor) or transaction SA38 (\System\Services\Reporting).1. Enter the name of the program the variant is to be transported for.2. Select menu path \Goto\Variants.3. Select menu path \Variants\Transport request.4. Click on the Excecute button (or PF8).TB8GC T[a gm5. You will be prompted with a list and a request to select the variant to be transported. Select the variant(s) to be transported and click on the'Continue' button.6. You will be presented with the 'Change Request Query' screen. If a Change Request has already been created for the variant transport skip to Step 8.7. If a Change Request must be created, select menu path \Request/task\Create. You will be prompted to select a "category" ---> click on the 'Customizing' button. You will be prompted for a description. Enter a description and click on the yellow folder or press 'Enter'.DVIC T[a gm8. Click on the folder icon to the left of the Change Request to display the related "Tasks". Double click on the "Task" to be used for the variant transport. You will receive the message "The desired entries have been included in D20K90xxxx". Press 'Enter' once you have read the message.9. When you are ready to release the variant, go to transaction SE10 and release the Change Request following the same steps as for any other Change Request.7-1-2000Knud PinholtO8GI< H&[a gmknudp@corebit.dkOVII1]IMFind the last day of the month'IL` [a gmFind the last day of the monthUsing function module LAST_DAY_IN_PERIOD_GET You can use the finction modules FIRST_DAY_IN_PERIOD_GET and LAST_DAY_IN_PERIOD_GET to find the first/last day of a periode. Doing it yourselfparameters: s_year(4) type n default '2000', s_per(2) type n default '01'.data: my_date like sy-datum.start-of-selection. if s_per = '12'. concatenate s_year s_per '31' into my_date.IME XE[a gm else. s_per = s_per + 1. concatenate s_year s_per '01' into my_date. my_date = my_date - 1. endif. write:/ s_aar, s_per. write:/ my_date.ALCM1 CM<Security on SE16eMON j/[a gmSecurity on SE16Q:Hi All,Is there an authorization to limit display access via SE16 by table? I havefound S_TABU_DIS which, if I am not mistaken, covers SM30 and SM31. But thisdoes not seem like it would cover SE16, since all tables do not have a tablemaintenance, and therefore do not have an authorization group assigned on themaintenance generator screen.A:Use transaction SU22. Type SE16 in the Transaction input field. Then click onthe Execute button. In the next screen, click on the Value list button. The-CML f[a gmlist will iOMndicate the authorization objects relevant to SE16. Look at the onesin the check/maintain category. These are the ones that are used for SE16security.Tony VankerIBM SAP Infrastructure ConsultantA:Hi Cintra,It seems that you want to give restriction on accessing objectbrowser. I have a bit suggesstion for you to make your ownauthorization and profile manually. The first you have to decidewhat kind of table/object/group in se16 do you want to give.T O5K d[a gmThen, using tcode su03 go to basis administration object class,select table maintenance, then create your own authorization aslike you decide before with your specific value of authorizationgroup or object.That's the point.Please let me know further, if you got stumped on this...I will explain more details until you assign/create specificprofile for this transaction.A:You can display/create table authorization groups using transactionSE54. Here you can see the auth. groups that exist and also check<E X[a gmby table to see what table auth. group is checked for a given tablevia authorization object S_TABU_DIS. Let me know if you have anyquestions.Regards,Alan Rosssap_security@hotmail.comj951lCPop up a dialog screen and allow user to pick a selection6<܇I `[a gmPop up a dialog screen and allow user to pick a selectionThis is a simple example of displaying possible choices for a user. The following code prompts the userfor a operating system/platform. Upon the user making a value request, a dialog screen pops up withpossible values listed. The user can then select from the dialog screen. Adjust to your own needs. Enjoy!REPORT ZYREC100 MESSAGE-ID ZF.TYPES: BEGIN OF T_PLATFORM, DOMVALUE_L LIKE DD07V-DOMVALUE_L,H ^[a gm SEPARATOR1(3), DDTEXT LIKE DD07V-DDTEXT, END OF T_PLATFORM. DATA: V_CHOICE LIKE SY-TABIX, V_LINES TYPE P, " Number of lines in an internal table. DESTROW TYPE P. DATA: I_PLATFORM TYPE T_PLATFORM OCCURS 0 WITH HEADER LINE. PARAMETERS: SRCPLAT(4) TYPE C LOWER CASE, " Source Platform*****************************************************܇H ^[a gm* POPUP Windows for custom dropdown boxes ******************************************************AT SELECTION-SCREEN ON VALUE-REQUEST FOR SRCPLAT. " Source Platform DESCRIBE TABLE I_SRCPLAT LINES V_LINES. DESTROW = V_LINES + 10. CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY' EXPORTING ENDPOS_COL = 40 ENDPOS_ROW = DESTROW STARTPOS_COL =10 STARTPOS_ROW = 10awN j'[a gm TITLETEXT = 'Select A Source Platform' IMPORTING CHOISE = V_CHOICE TABLES VALUETAB = I_SRCPLAT EXCEPTIONS BREAK_OFF = 1. IF SY-SUBRC = 1. MESSAGE I000. ENDIF. READ TABLE I_PLATFORM INDEX V_CHOICE. SRCPLAT = I_PLATFORM-DOMVALUE_L. INITIALIZATION. PERFORM F_CREATE_ITABS. *---------------------------------------------------------------------**G \[a gm* FORM F_CREATE_ITABS **---------------------------------------------------------------------** Create internal tables for popup windows **---------------------------------------------------------------------*FORM F_CREATE_ITABS. I_PLATFORM-DOMVALUE_L = 'mvs'. Iw<_PLATFORM-DDTEXT = 'MVS - Mainframe'. APPEND I_PLATFORM. I_PLATFORM-DOMVALUE_L = 'unx'. I_PLATFORM-DDTEXT = 'Unix platform'. APPEND I_PLATFORM.AwV z[a gmENDFORM.[Neer Razinzsky , posted to SAP listserver] Assign content to a field structure by Uwe Erdelhoff The problem: You want to assign a special content to every field of a structure. What is the easiest routine to do that?REPORT ZFTER910.DATA I_BLFA1 LIKE BLFA1.FIELD-SYMBOLS: .DO. ASSIGN COMPONENT SY-INDEX OF STRUCTURE I_BLFA1 TO . IF SY-SUBRC <> 0. EXIT. ENDIF. = '/'.ENDDO.A Simple F4 selection from an internal tables by Adi Kantipudi  N j[a gmThe problem: You want to select a value from an internal table within a popup like the F4-selection?DATA: FIELDTAB LIKE HELP_VALUE OCCURS 2 WITH HEADER LINE, VALUETAB(40) OCCURS 200 WITH HEADER LINE.FIELDTAB-TABNAME = 'AUSP'.FIELDTAB-FIELDNAME = 'ATWRT'.FIELDTAB-SELECTFLAG = 'X'.APPEND FIELDTAB.LOOP AT IT_TREE WHERE PPRICE NE SPACE. VALUETAB = IT_TREE-PPRICE. APPEND VALUETAB.ENDLOOP.CALL FUNCTION 'HELP_VALUES_GET_WITH_TABLE' EXPORTING9CI `[a gm TITEL = 'Allowed Values' IMPORTING SELECT_VALUE = PVAR TABLES FIELDS = FIELDTAB VALUETAB = VALUETAB EXCEPTIONS FIELD_NOT_IN_DDIC = 1 MORE_THEN_ONE_SELECTFIELD = 2 NO_SELECTFIELD = 3 OTHERS = 4. M 1,oShow a progress bar via ABAPCoS t[a gmShow a progress bar via ABAPThis process is very easy. You just code and use SAP's ready-made function,SAPGUI_PROGRESS_INDICATOR, at the appropriate points. Belowis a simple example:REPORT YPROGIND.DATA: A LIKE SY-UCOMM.DO 100 TIMES.DO 300 TIMES.GET TIME.ENDDO.A(3) = SY-INDEX.A+3 = '%'.CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'EXPORTINGPERCENTAGE = SY-INDEXTEXT = A.ENDDO.],1fHow do you create a transaction for a report oI `[a gmHow do you create a transaction for a report>How do you create a transaction for a report? Or do you make it>into a dialog program.Use transaction code SE93, enter a transaction code that starts with Zand three more characters, click create. Selected report.... and thenlink your program to the transaction code. You need to assign anauthorization group if you need to control the authorization. hope thisinformation will help you.],212Where are variant data stored for a program?GG \[a gmWhere are variant data stored for a program?> I need to search all variants for all programs to find if we are>using a particular account number. Similar to hard coding an account number>in a program the searching all of the source code to find that account>number.Try table TVARV, this has the LOW and HIGH values.[*21ABAP source code for screenpainter reports`I `[a gmABAP source code for screenpainter reports>Can somenone tell me if it's possible to find the ABAP source code for screenpainter reports. And if so, where I >can find it.Best is - run the report, keep a session open on SM50, refresh and checkthe program that is running after refresh. always works!!Thank you and best regardsKartik Iyengar~L1z3Parallel running of program7SS t[a gmParallel running of programFrom: "Mustafa Saribas" Hi all.This one is not a question. I tried to make a parallel runninSgprogram. Well, my report used to take long time and crashed. So itried this way :call function 'ZSI_SAT_SAS' in background task tables matnr1 = matnr werks1 = werks lifnr1 = lifnr ekgrp1 = ekgrp dispo1 = dispo.call function 'ID_OF_BACKGROUNDTASK'SR r[a gm importing tid = int_arfctid1 exceptions others = 1. commit work.call function 'ZSI_CROSS' in background task tables matnr1 = matnr werks1 = werks lifnr1 = lifnr ekgrp1 = ekgrp dispo1 = dispo.call function 'ID_OF_BACKGROUNDTASK' importing tid = int_arfctid2 exceptions others = 1. commit work.this makes the 2 functions run at the same time. And you can checkES3H ^[a gmwheather 1 of them is finished by int_arfctid1/2 tables.. thesefunctions dont work till the 'commit work' command. See call functionhelp for more details..PS: When i run 5 functions at the same time, system gets crowded withmy jobs. So do not run more than 3 functions at the same time :/Have FunMustafa Saribas\+1Calling Windows help file from ABAP program3T v[a gmCalling Windows help file from ABAP program>Does someone know if it's possible to call a Windows help file ( *.hlp )>from an ABAP program ?Use function module WS_EXECUTE.Example:CALL FUNCTION 'WS_EXECUTE' EXPORTING DOCUMENT = 'X' PROGRAM = 'location of help file'.That should do it. By specifying 'X' in document WS_EXECUTE launches theapplication associated with the file type. This worked for me.Regards,Graham HicksonC> L [a gmO<1< How to add months to the date.^  R r[a gmHow to add months to the date.>> Hi all,> Is there a function to add the months to a date, for eg: 24-02-99> +> 6 months = 24-08-99.>The date is normally in the format 19990224 and you can then usevariable+4(2) = variable+4(2) + 6.Otherwise you can use the function RP_CALC_DATE_IN_INTERVAL.call function 'RP_CALC_DATE_IN_INTERVAL' exporting date = datum "variable with you date before adding 6 month days = nul "variable with the value of 0A< G \[a gm months = halfyear "Variable with the value 6* SIGNUM = '+' years = nul importing calc_date = datum "the variable will now hold your new date exceptions others = 1.;  13 Field exit N jU[a gmField exit>> Could somebody guide me as to how to write a field exit for a> particular field on a particular screen.> Is there any documented help available on exits.> Any help would be appreciatedgo to transaction CMOD and select text enhancements/field exits.The extended help from here gives you some advice.Also the R/3 Library help is good but I cannot remember where to look,sorry._. m1 mKRanges - I need a function to get a unique key%@d [a gmRanges - I need a function to get a unique keyTables used for ranges:NRIV Number range intervals. Note: Field NRLEVEL Contains the last assignednumber. TNRO Definition of number range objectsRanges are maintained in transaction SNROQ:Just anothem@r chance to show my ignorance. Isn't there a function for returninga unique key and isn't there also a configuration method for describing the+mBM h[a gmrange of those objects. I know that there is something like that for EDI but Ican't identify it. I need to retrieve a key for a user defined field in IS-UCCS 1.2 for sap 4.0B.A:You can use a range object . You define ranges in transaction SNRO. The number in the ranges automatically increment ebvery time you use a new number.Use the function NUMBER_GET_NEXT to get the next number in the range: call function 'NUMBER_GET_NEXT' Y @"EO l[a gm exporting nr_range_nr= '01' object= 'ZCOSTA' quantity= '1' importing number= i_zcostafstm-zafstemnr * quantity= ' ' * RETURNCODE = exceptions Q BsGD V[a gm interval_not_found = 1 number_range_not_intern = 2 object_not_found = 3 quantity_is_0 = 4 quantity_is_not_1 = 5 interval_overflow = 6 others = 7. Y"EIK d[a gmExample finding an accounting document number: CALL FUNCTION 'NUMBER_GET_NEXT' EXPORTING nr_range_nr = p_blart "Document type object = 'RF_BELEG'* QUANTITY = '1' SUBOBJECT = p_bukrs "Comapny (Comapnydependent range)* TOYEAR = '2001'* IGNORE_BUFFER = ' ' IMPORTING number = p_belnr "ReturnedysGKJ b[a gmdocument number* QUANTITY =* RETURNCODE = EXCEPTIONS interval_not_found = 1 number_range_not_intern = 2 object_not_found = 3 quantity_is_0 = 4 quantity_is_not_1 = 5 interval_overflow = 6 OTHERS = 7Q IK1KLeading zeros - Placing/deletingRK2NP n[a gmLeading zeros - Placing/deletingDeleting leading zeros >I have a field (matnr)that containg leading zeros. I want to >eliminate all leading zeros for a fax and e-mail report. Does anyone >have any ideas? Maybe this could help. shift left deleting leading '0'. 'KeM h[a gmThis will get rid of the zeroes before you send it to a file or whatever. John Newman Placing leading zeros>How can I place leading zeroes in front of a number. Say I have a >field that is 14 characters long but I'm only reading in 10, how can>add 4 zeroes to the front of that? 2NeK You can use the function module 'CONVERSION_EXIT_ALPHA_INPUT' and pass the fiel$2NE X[a gm(or even part of the field) to be padded with zeroes. Or else, you can use WRITE field USING EDIT MASK '==ALPHA'. There is also a function module (conversion exit) ' 'CONVERSION_EXIT_ALPHA_OUTPUT' to do just the reverse. b1e1Preventing a program from running more than once+V z[a gmPreventing a program from running more than once>Is there anyway to prevent a program from being run more than once >simultaneously? Answer 1Create a lock object !Invoke SE11Put in field 'Object name': EZPROGRAMclick on radiobutton 'Lock objects'click on pushbutton 'Create'(Next screen)put in field 'Short text': Enqueue for programsput in field 'Primary table': TRDIRclick on pushbutton 'SAVE')?L f[a gmdo the normal stuff for a correction or local objectclick on pushbutton 'Lock arguments'click on pushbutton 'SAVE'press F3click on button 'Activate'In your ABAP use this code for instance:----------------------------------------IF D_LOCKED = C_FALSE. CALL FUNCTION 'ENQUEUE_EZPROGRAM' EXPORTING NAMEE = SY-REPID EXCEPTIONS FOREIGN_LOCK = 1 SYSTEM_FAILURE = 2. IF SY-SUBRC <> 0. MESSAGE ID SY-MSGID TYPE 'A':yQ p[a gm NUMBER SY-MSGNO WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF.ENDIF.----------------------------------------Kind regards, Ingo-Willy Raddatz.Answer 2Try to use TVARV. set up a parameter in TVARV and at the beginning of the program check if TVARV is set to X then discontinue to run, if not, set the parameter to X. At the end of your program (the last executed statement) should reset the parameter to space. ?D V[a gm Have fun Manfred K. Lorenz If you are interested contact me by email mlorenz@bigfoot.com Nyы1ы:Call unix command from ABAP/4T %H ^[a gmCall unix command from ABAP/4 Use transaction SM59. Click on TCP/IP-> SEVER_EXEC. Click on System information->Function list on the menubar. Now you get an describtion on the functionmodules available. Hope this will help you. Kim Ternstrxm ы:@ N[a gm Trevira Neckelmann A/S Silkeobrg - Denmark mailto:kim.ternstroem@neckelmann.dk W&%1h1Displaying Tree structures graphicallyH:U x[a gmDisplaying Tree structure:s graphically>> Hi All>> How do I display tree structures, similar to the ones you see in> transaction SE09? Are there standard function modules available forthis> or does one have to develop this?>> Thanks> Matthew Pillay> Comparex>Source: Imre KabaiTake a look at www.kabai.com/abaps/z51.htm: ** This program uses a tree structure to dispaly the * transports of a specified period. You can drill* down in a tree to display the transports by type,L f[a gm* number and date and to display the objects inside.*REPORT ZTRPLIST.TABLES: E070, E071.PARAMETERS: STRDAT TYPE D DEFAULT SY-DATUM, ENDDAT TYPE D DEFAULT SY-DATUM.DATA: BEGIN OF ITAB OCCURS 100, TRFUNCTION LIKE E070-TRFUNCTION, AS4DATE LIKE E070-AS4DATE, TRKORR LIKE E070-TRKORR, PGMID LIKE E071-PGMID, OBJECT LIKE E071-OBJECT, OBJ_NAME LIKE E071-OBJ_NAME,END OF ITAB.DATA: BEGIN OF SITAB OCCURS 100,=?J b[a gm TRFUNCTION LIKE E070-TRFUNCTION, AS4DATE LIKE E070-AS4DATE, TRKORR LIKE E070-TRKORR, PGMID LIKE E071-PGMID, OBJECT LIKE E071-OBJECT, OBJ_NAME LIKE E071-OBJ_NAME,END OF SITAB.DATA: C(3), TEXT1(50), TEXT2(50), COL1 TYPE I, COL2 TYPE I, LEVEL TYPE I, F15 TYPE C, LEN1 TYPE I, LEN2 TYPE I, COUNT TYPE I.DATA: BEGIN OF TREE OCCURS 100. INCLUDE STRUCTURE SNODETEXT.DATA: END OF TREE.SELECT-OPTIONS SRC_SYTS FOR C NO INTERVALS DEFAULT 'DEV'.ZN j[a gmSTART-OF-SELECTION. SET PF-STATUS 'LIBS1'. SELECT * FROM E070 WHERE AS4DATE >= STRDAT AND AS4DATE <= ENDDAT ORDER BY TRFUNCTION AS4DATE. SELECT * FROM E071 WHERE TRKORR = E070-TRKORR AND PGMID <> 'CORR'. MOVE-CORRESPONDING E070 TO ITAB. MOVE-CORRESPONDING E071 TO ITAB. APPEND ITAB. ENDSELECT. ENDSELECT. LOOP AT ITAB. SITAB = ITAB. APPEND SITAB. ENDLOOP.0?N j[a gm DATA: BEGIN OF STRUCC OCCURS 500. INCLUDE STRUCTURE SNODETEXT. DATA: END OF STRUCC. LOOP AT ITAB. AT FIRST.* write: / 'Transports between', strdat, 'and', enddat. TEXT1 = 'Transports between'. TEXT1+21 = STRDAT. TEXT1+31 = 'and'. TEXT1+35 = ENDDAT. CLEAR TEXT2. LEN1 = 50. LEN2 = 0. COL1 = 1. COL2 = 2. LEVEL = 1. PERFORM FILL_TREETAB. ENDAT. AT NEW TRFUNCTION.* write: / itab-trfunction color 3.6ZN j[a gm COUNT = 0. LOOP AT SITAB. IF ITAB-TRFUNCTION = SITAB-TRFUNCTION. COUNT = COUNT + 1. ENDIF. ENDLOOP. TEXT1 = ITAB-TRFUNCTION. TEXT1+3 = 'type transport'. TEXT2 = COUNT. CONDENSE TEXT2. LEN1 = 20. LEN2 = 16. COL1 = 3. COL2 = 7. LEVEL = 2. PERFORM FILL_TREETAB. ENDAT. AT NEW TRKORR.* write: / itab-trkorr color 4, itab-as4date color 4. TEXT1 = ITAB-TRKORR. TEXT2 = ITAB-AS4DATE.,O l[a gm LEN1 = 10. LEN2 = 10. COL1 = 4. COL2 = 4. LEVEL = 3. PERFORM FILL_TREETAB. ENDAT.* write: / itab-pgmid color 5, itab-object color 5, itab-obj_name(30) TEXT1 = ITAB-PGMID. TEXT1+4 = ITAB-OBJECT. TEXT1+10 = ITAB-OBJ_NAME(30). CLEAR TEXT2. LEN1 = 50. LEN2 = 0. COL1 = 5. COL2 = 5. LEVEL = 4. PERFORM FILL_TREETAB. ENDLOOP. CALL FUNCTION 'RS_TREE_CONSTRUCT' TABLES NODETAB = TREE EXCEPTIONS$H ^[a gm TREE_FAILURE = 1. SY-LSIND = 0. CALL FUNCTION 'RS_TREE_LIST_DISPLAY' EXPORTING CALLBACK_PROGRAM = 'ZTRPLIST' CALLBACK_USER_COMMAND = 'NODE_SELECT' : IMPORTING F15 = F15.*---------------------------------------------------------------------** FORM NODE_SELECT **---------------------------------------------------------------------*=YC T[a gm* ........ **---------------------------------------------------------------------** --> KNOTEN ** --> COMMAND ** --> EXIT ** --> LIST_REFRESH **---------------------------------------------------------------------*MJ b[a gmFORM NODE_SELECT TABLES KNOTEN STRUCTURE SEUCOMM USING COMMAND CHANGING EXIT LIST_REFRESH. EXIT = ' '. LIST_REFRESH = 'X'.ENDFORM.*---------------------------------------------------------------------** FORM FILL_TREETAB **---------------------------------------------------------------------** ........ **---------------------------------------------------------------------*>Y1M h}[a gmFORM FILL_TREETAB. TREE-NAME = TEXT1. TREE-COLOR = COL1. TREE-INTENSIV = '1'. TREE-TEXT = TEXT1. TREE-TLENGTH = LEN1. TREE-TLEVEL = LEVEL. TREE-TCOLOR = COL1. TREE-TINTENSIV = '1'. TREE-TEXT1 = TEXT2. TREE-TLENGTH1 = LEN2. TREE-TCOLOR1 = COL2. TREE-TINTENSIV = '0'. APPEND TREE.ENDFORM.Iz1zKUser Exit, Customer Exit=1 O l[a gmUser Exit, Customer ExitHi Alok,I have this program to create a report of user exit documentation from SAP.This report can be downloaded to PC. Let me know if you have any questions.By the way, the selection texts are, p_downld = 'Download to PC?' and s_name= 'Enhancement Name'.REPORT YVENKATESH_PRINT_SMOD_DOC NO STANDARD PAGE HEADING LINE-SIZE 80 LINE-COUNT 65 MESSAGE-ID ZM.*----------------------------------------------------------------------*.z D V[a gm* Tables/Views **----------------------------------------------------------------------*TABLES: MODSAP, "SAP Extensions DOKTL. "Documentation - text lines*----------------------------------------------------------------------** Data Statements for Internal Tables **----------------------------------------------------------------------*, E X[a gmDATA: ITAB_MOD LIKE MODSAP OCCURS 0 WITH HEADER LINE.DATA: ITAB_DOKTL LIKE DOKTL OCCURS 0 WITH HEADER LINE.*----------------------------------------------------------------------** Selection-screen **----------------------------------------------------------------------*SELECTION-SCREEN BEGIN OF BLOCK BLK1 WITH FRAME.SELECT-OPTIONS: S_NAME FOR MODSAP-NAME.PARAMETERS: P_DOWNLD AS CHECKBOX.L i@H ^ [a gmselection-screen end of block blk1.*----------------------------------------------------------------------** Initialization **----------------------------------------------------------------------*INITIALIZATION. REFRESH: ITAB_MOD.*----------------------------------------------------------------------** Start-of-selection i@1 **----------------------------------------------------------------------*(BP n[a gmSTART-OF-SELECTION.* Select the modifications into the internal table SELECT * INTO TABLE ITAB_MOD FROM MODSAP WHERE NAME IN S_NAME AND ( TYP = SPACE OR TYP = 'E' ).* Sort the internal table SORT ITAB_MOD.* For each of the modifications, get the documentation LOOP AT ITAB_MOD. AT NEW NAME. NEW-LINE. ULINE. WRITE: 'Enhancement:' COLOR 5 INVERSE, ITAB_MOD-NAME COLOR 5. WRITE AT 60 SY-PAGNO. ULINE.$i@DJ b[a gm SKIP. DOKTL-OBJECT = ITAB_MOD-NAME. PERFORM 1000_GET_DOCUMENTATION USING DOKTL-OBJECT. ENDAT. "AT NEW name. CHECK ITAB_MOD-MEMBER > SPACE. SKIP. NEW-LINE. WRITE: 'Enhancement:' COLOR 5 INVERSE, ITAB_MOD-NAME COLOR 5. WRITE: 'Component:' COLOR 4 INVERSE, ITAB_MOD-MEMBER COLOR 4. SKIP. DOKTL-OBJECT = ITAB_MOD-MEMBER. PERFORM 1000_GET_DOCUMENTATION USING DOKTL-OBJECT.9BFK d[a gm AT END OF NAME. SKIP 2. ENDAT. "AT END OF name. ENDLOOP. "LOOP AT itab_mod.* Download the list IF NOT P_DOWNLD IS INITIAL. CALL FUNCTION 'LIST_DOWNLOAD' EXPORTING LIST_INDEX = 0 METHOD = ' '. ENDIF. "IF NOT p_downld IS INITIAL.*&---------------------------------------------------------------------**& Form 1000_GET_DOCUMENTATION,DIK d[a gm*&---------------------------------------------------------------------** text*----------------------------------------------------------------------** -->P_DOKTL_OBJECT text*----------------------------------------------------------------------*FORM 1000_GET_DOCUMENTATION USING P_DOKTL_OBJECT.* Refresh the documentation table CLEAR ITAB_DOKTL. REFRESH ITAB_DOKTL.* Select the data SELECT * INTO TABLE ITAB_DOKTL FROM DOKTL WHERE ID = 'MO'+FEKK d[a gm AND OBJECT = P_DOKTL_OBJECT AND LANGU = SY-LANGU. IF SY-SUBRC = 0. LOOP AT ITAB_DOKTL. NEW-LINE. WRITE: ITAB_DOKTL-DOKTEXT. ENDLOOP. "LOOP AT itab_doktl. ELSE. "IF sy-subrc = 0. NEW-LINE. WRITE: 'No documentation exists' COLOR 6 INVERSE. ENDIF. "IF sy-subrc = 0.ENDFORM. " 1000_GET_DOCUMENTATIONWith best regardsXIKA R[a gmVenkatesh Nuthalapativnuthal@ssg.petsmart.comPhone: 602-587-2423www.petsmart.comf5EKDL1*DLSend an express mail (SAP-office) to another SAP user!KeNQ p[a gmSend an express mail (SAP-office) to another SAP userBased on example on the homepage of Imrehttp://www.geocities.com/CapeCanaveral/Lab/3836/DATA: BEGIN OF EMAIL_DATA. INCLUDE STRUCTURE SODOCCHGI1.DATA: END OF EMAIL_DATA.DATA: BEGIN OF EMAIL_SEND OCCURS 10. INCLUDE STRUCTURE SOMLRECI1.DATA: END OF EMAIL_SEND.TYPES: BEGIN OF T_ITAB, TEKST(255) TYPE C, END OF T_ITAB.DATA: ITAB TYPE T_ITAB OCCURS 20 WITH HEADER LINE.:DLO l[a gmITAB-TEKST = 'Hallo henrik'.APPEND ITAB.* Send an express mail PERFORM SEND_EXPERESS_MAIL.*---------------------------------------------------------------------** FORM SEND_EXPERESS_MAIL **---------------------------------------------------------------------*FORM SEND_EeNKXPERESS_MAIL. EMAIL_DATA-OBJ_NAME = 'MESSAGE'. EMAIL_DATA-OBJ_DESCR = 'TESTn FRA HFN'. EMAIL_DATA-OBJ_LANGU = 'E'. EMAIL_DATA-SENSITIVTY = 'P'.eNQ pS[a gm EMAIL_DATA-OBJ_PRIO = '1'. EMAIL_DATA-NO_CHANGE = 'X'. EMAIL_DATA-PRIORITY = '1'. EMAIL_SEND-RECEIVER = 'XKRM'. EMAIL_SEND-REC_TYPE = 'B'. EMAIL_SEND-EXPRESS = 'X'. APPEND EMAIL_SEND.CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'EXPORTING DOCUMENT_DATA = EMAIL_DATADOCUMENT_TYPE = 'RAW'PUT_IN_OUTBOX = 'X'TABLES OBJECT_CONTENT = ITAB RECEIVERS = EMAIL_SEND.ENDFORM.n=1)Running a program with a variant where date changes every day%8G \[a gmRunning a program with a variant where date changes every dayHi SAPpers, >I am trying to run a program with a variant. The program has a dat=>field as a parameter. Now this program has to be run everyday with=>different date (while all other parameters remain the same). >How can I create a variant in which the date field changes )@ Nc[a gm>everyday??? Change the attributes of the parameter to "variable" and set it to "curre= nt date" B8k1 k)Transaction codes0) *[a gmTransaction codesABAP WorkbenchS001 Abap WorkbenchSE09 Workbenche organizer (Transports)SE11 ABAP/4 DictionarySE16 Data browserSE24 Class builderSE30 ABAP Runtime analyzesSE36 Logical DatabasesSE37 Function builderSE38 ABAP/4 Editor SE80 ABAP/4 Object browserSE91 Message ClassesSE93 Maintain transaction SapScriptSE71 Form painter{k [a gmSE72 Style maintenanceSE78 SapScript Graphics ManagementSO10 Create standard text moduleWorkflowSWDM Workflow explorerSWDD Workflow builderSWUS Start workflow - Test enviromnentSWU0 Simulate eventSBWP Business workplacePFTC_INS Create Task/Task groupPFTC_CHG Change Task/Task groupSWUD DagnosisSWI1 Work item selectionBatch input. -[a gmSHDB Batch input recorderSM35 Monitor batch inputPPMD11 Create planned orderMD12 Change planned orderMD13 Display planned orderMD16 Planned orders overviewSystemSM04 User overview ( Possible to end sessions)SM12 Lock EntriesSM21 System log SM30 Maintain table viewsSM37 See job status SM50 See processesOtherABAPDOCU ABAP coding examples supplied by SAP # [a gmAL11 Look at t directories on the host system ( With drill down )CMOD EnhancementprojectsLSMW LSM WorkbenchOSS1 OSSSA38 Submit batch jobSE01/STMS Transport systemSLG1 View application logSLG2 Delete application logSPAD Output devicesSP01 See spoolSPRO CustomizingSPAM Support packet manageSU03 Maintain Authorizations: Object Classes)[ w[a gmSU51 Display Authorization Data (Can be called after failed authorization)SWEC Events for change documentsSW01 Business Object BuilderVOK2 Maint))ain OutputDeterminationAj1 jSystem variablesC) ܀y[a gm㨍System variablesThe names of the SY variables can be found in the table SYST.SY-DATUMSystem dateSY-ULINEHorizontal lines in listSY-VLINEVertical lines in a list ( You kan use | instead )SY-UCOMMReturns the code for the GUI status button pushed (Only only used in lists. In dialog programs use OKCODE)Example of usageSY-LSINDThis field contains the number of the current list in the list hierarchy ?j M[a gm+‰( Se also How to use sy-lsind to determine the current list level )SY-UNAMEBrugernavnSY-REPIDProgram navnSY-PAGENOSide nr.SY-TITLETitle of programSY-DYNNRDynpro number of active screenSY-PFKEYName of the current pf statusSY-LANGULogon languageSystem Fields for Secondary ListsWith each interactive event, the system automatically sets the following system fields:nz €[a gmSY-LSINDIndex of the list created during the current event (basic list = 0)SY-LISTIIndex of the list level from which the event was triggeredSY-LILLIAbsolute number of the line from which the event was triggeredSY-LISELContents of the line from which the event was triggeredSY-CUROWPosition of the line in the window from which the event was triggered (counting starts with 1)SY-CUCOLPosition of the column in the window from which the event was triggered (counting starts with 2))f [a gmSY-CPAGEPage number of the first displayed page of the list from which the event was triggeredSY-STARONumber of the first line of the first page displayed of the list from which the event was triggered (counting starts with 1). Possibly, a page header occupies this line.SY-STACONumber of the first column displayed in the list from which the event was triggered (counting starts with 1)SY-PFKEYStatus of the displayed list-nA P[a gmThe system fields SY-UCOMM and SY-PFKEY are important if you use self-defined list interfaces (see Defining Individual User Interfaces).You can use the information contained in the system fields listed above to structure the secondary lists. For more information and an example, see Passing Data Automatically.Neither this documentation nor any part of it may be copied or reproduced in any form or by any means or translated into another language, without the prior consent of SAP AG.R!1Find examples used on SAP coursesB R [a gmFind examples used on SAP coursesIn the ABAP/4 object browser select the Development class SAB* ( * = Identifier for course)[*71E7!Indhold - ABAP Objects/Control programming!Q p3[a gmhhABAP Objects/Control programmingObject Oriented programming in ABAP - Simple example 1Object Oriented programming in ABAP - Simple example 2g671D#AObject Oriented programming in ABAP - Simple example 1!T v[a gmObject Oriented programming in ABAP - Simple example 1REPORT ZHEF_ABAP_OBJECTS_EXAMPLE1.************************************************************************* Local classes Example 1** Define and implement DOG a class* Adding attributes, methods and events, raising an event.* C!reate a new dog from the dog class* Using the dog class*** Henrik Frank 19-01-2000************************************************************************G` [a gmCLASS DOG DEFINITION.********************************************************************** D E F I N I N G T H E C L A S S********************************************************************* PUBLIC SECTION.* Public section: Can be accessed by all clients of the class TYPES: TTYPE_OF_DOG(10) TYPE C.* Static attribute, applies to all instances CLASS-DATA: TYPE_OF_ANIMAL(10) TYPE C VALUE 'Dog'.* Instance attribut, can be different for each instance/%[ [a gm DATA: TYPE_OF_DOG TYPE TTYPE_OF_DOG VALUE 'Bulldog', DATE_OF_BIRTH TYPE D.* Methods with examples of Importing and Exporting parameters.* You could also have used a Changing parameter METHODS: BARK, EAT IMPORTING TYPE_OF_FOOD TYPE I, GET_AGE_OF_DOG RETURNING VALUE(AGE_OF_DOG) TYPE I.* Events EVENTS: NOT_A_BABY. PROTECTED SECTION.* Protected section: Can be accessed in the methods of the class andA[ [a gm* its subclasses CONSTANTS: TYPE_OF_FOOD_FISH TYPE I VALUE 1, TYPE_OF_FOOD_BONE TYPE I VALUE 2. PRIVATE SECTION.* Can only be accessed in the methods off the classENDCLASS.CLASS DOG IMPLEMENTATION.********************************************************************** I M P L E M E N T A T I O N O F T H E C L A S S********************************************************************* METHOD BARK.<%} X ~[a gm* A non parameterized method, that doesn't return a value WRITE: / 'Baauuu Waauu' COLOR COL_NEGATIVE INVERSE. ENDMETHOD. METHOD EAT.* A parameterized method, that doesn't return a value IF TYPE_OF_FOOD = TYPE_OF_FOOD_FISH. WRITE: / 'Bwadrrrrr' COLOR COL_NEGATIVE INVERSE. ELSE. WRITE: / 'Yahooo' COLOR COL_NEGATIVE INVERSE. ENDIF. ENDMETHOD. METHOD GET_AGE_OF_DOG.* A non parameterized method, that returns a value and A d y[a gm* uses an attribut AGE_OF_DOG = SY-DATUM - DATE_OF_BIRTH.* Raise an event IF AGE_OF_DOG > 100. RAISE EVENT NOT_A_BABY. ENDIF. ENDMETHOD.ENDCLASS.********************************************************************** U S I N G T H E C L A S S********************************************************************** Declare new dog of the dog classDATA: MY_DOG TYPE REF TO DOG, AGE TYPE I.#}  d [a gmSTART-OF-SELECTION.* Create the dog CREATE OBJECT: MY_DOG.*-------------------------------------------------------------------* Do something with the dog*-------------------------------------------------------------------* Setting an Instance attribut MY_DOG->DATE_OF_BIRTH = '19990701'.* Getting a Static attribute WRITE:/ 'What kind of animal are you ?'. WRITE: / MY_DOG->TYPE_OF_ANIMAL COLOR COL_NEGATIVE INVERSE.. ^ [a gm SKIP.* Getting an Instance attribut WRITE:/ 'What kind of dog are you ?'. WRITE: / MY_DOG->TYPE_OF_DOG COLOR COL_NEGATIVE INVERSE. SKIP.* Invoking af method of the dog class that returns a value WRITE: / 'How old are you'. AGE = MY_DOG->GET_AGE_OF_DOG( ). WRITE: / AGE COLOR COL_NEGATIVE INVERSE, 'days' COLOR COL_NEGATIVE INVERSE. SKIP.* Invoking a non parameterized method, that doesn't* return a value: #AM h[#A!a gm WRITE: / 'BARK !'. CALL METHOD MY_DOG->BARK. SKIP.* 2 examples of invoking a parameterized method WRITE: / 'Eat a fish !'. CALL METHOD MY_DOG->EAT( 1 ). SKIP. WRITE: / 'Eat a bone !'. CALL METHOD MY_DOG->EAT( 2 ).g6A1A[Object Oriented programming in ABAP - Simple example 2]#ACU x[a gmObject Oriented programming in ABAP - Simple example 2REPORT ZHEF_ABAP_OBJECTS_EXAMPLE2.************************************************************************* Local classes Example 2** Using enheritance* Raising and handling events*** Henrik Frank 19-01-2000************************************************************************************************************************************************* Super class Empolyee************************************************************************$A F] [a gmCLASS Employee DEFINITION. PUBLIC SECTION. * Instance attribut, can be different for each instance DATA: nEmployeeNo(4) type n, cEmployeeName(30) type c, iNoOfUnits type i, iPayPerUnit type i.* Methods for calculating and writing pay METHODS: CalculatePay RETURNING VALUE(iPay) TYPE i, WritePay IMPORTING VALUE(iPay) TYPE i.ENDCLASS.CLASS Employee IMPLEMENTATION. METHOD CalculatePay.3C>HQ p[a gm iPay = iNoOfUnits * iPayPerUnit. ENDMETHOD. METHOD WritePay. WRITE: / 'The pay for employee ', nEmployeeNo, cEmployeeName, ' is : ', iPay. ENDMETHOD.ENDCLASS.************************************************************************* Subclass Factory Worker** The class FactoryWorker is a subclass of the superclass Employee.* Note that the attribute iExtraNoUnits have been added and the* method CalculatePay has been redefined.6 FtJd [a gm*************************************************************************CLASS FactoryWorker DEFINITION INHERITING FROM Employee. PUBLIC SECTION.* Defining an event EVENTS: LazyEmployee. DATA: iExtraNoUnits type i. METHODS:* Redefinition af the CalculatePay method from the Superclass CalculatePay REDEFINITION.ENDCLASS.CLASS FactoryWorker IMPLEMENTATION. METHOD CalculatePay.* Redefined CalculatePay method;>HLW |[a gm iPay = ( iNoOfUnits * iPayPerUnit ) + ( iExtraNoUnits * iPayPerUnit * 2 ). * Raising the event LazyEmployee. IF iNoOfUnits < 100. raise event LazyEmployee. ENDIF. ENDMETHOD.ENDCLASS.************************************************************************* This class only to show how you can handle an event that have been* raised in another class************************************************************************"tJNQ p[a gmCLASS FireEmployee DEFINITION. PUBLIC SECTION.* Method for handling the event LazyEmployee in the FactoryWorker* subclass. METHODS YouAreFired FOR EVENT LazyEmployee OF FactoryWorker.ENDCLASS.CLASS FireEmployee IMPLEMENTATION. METHOD YouAreFired. WRITE:/ 'You lazy worker, you have produced less than 100 units.' color col_heading, 'YOU ARE FIRED !!!' color col_negative intensified.6LW |[a gm ENDMETHOD.ENDCLASS.************************************************************************* U S I N G T H E C L A S S E S************************************************************************DATA: N#AMyPay TYPE i.START-OF-SELECTION.*-----------------------------------------------------------------------* Using the superclass Employee*-----------------------------------------------------------------------* Declare new Employee from the EmployeeClass'N:M h[a gm DATA: SamSmith TYPE REF TO Employee. CREATE OBJECT: SamSmith. SamSmith->nEmployeeNo = 433. SamSmith->cEmployeeName = 'Sam Smith'. SamSmith->iNoOfUnits = 150. SamSmith->iPayPerUnit = 3. MyPay = SamSmith->CalculatePay( ). CALL METHOD SamSmith->WritePay( MyPay ). SKIP. *-----------------------------------------------------------------------* Using the subclass FactoryWorker*-----------------------------------------------------------------------QR r[a gm* Declare new FactoryWorker as subclass of the EmployeeClass DATA: JessicaJones TYPE REF TO FactoryWorker. CREATE OBJECT: JessicaJones. JessicaJones->nEmployeeNo = 1500. JessicaJones->cEmployeeName = 'Jessica Jones'. JessicaJones->iNoOfUnits = 300. JessicaJones->iExtraNoUnits = 500. JessicaJones->iPayPerUnit = 3. MyPay = JessicaJones->CalculatePay( ). CALL METHOD JessicaJones->WritePay( MyPay ). SKIP.*-----------------------------------------------------------------------,:R r[a gm* Using the subclass FactoryWorker with event*----------------------------------------------------------------------- DATA: LazyJohn TYPE REF TO FactoryWorker, FireHim TYPE REF TO FireEmployee. CREATE OBJECT: LazyJohn, FireHim. * The SET HANDLER statement, registers a runtime trigger.* It links a list of handler methods to corresponding event triggers * Each SET HANDLER statement creates an entry in an event handler table M[W |[a gm SET HANDLER FireHim->YouAreFired FOR LazyJohn. LazyJohn->nEmployeeNo = 1500. LazyJohn->cEmployeeName = 'Lazy John'. LazyJohn->iNoOfUnits = 90. LazyJohn->iExtraNoUnits = 500. LazyJohn->iPayPerUnit = 3. WRITE: / 'Lazy John has produced less than 100 units'. MyPay = LazyJohn->CalculatePay( ). L1iIndhold - Application areasV[il [a gmԼن44NJaApplication areasFI/COSDMMPurchasingWarehouse managementOtherJ13Application areas - FI/COi^ [a gmj&UtHMApplication areas - FI/COReading info about profitcenter hierarchyReading profitcenter hierarchyFinding open itemsTablesCߋ1WߋFinding open items1Q p[a gmFinding open items>Hi all,>I am trying to come up with a report which prints all the open> items of a customer, is there a flag set if a particular item has been> open or cleared. Any input will be appreciated.The following three fields are populated on clearing in BSEG(At least this is what I look at).AUGDT Clearing dateAUGCP Clearing entry dateAUGBL Document number of the clearing document.Paul RobertManitoba Telecom Services Inc.ߋB RC[a gmORWhen a given item is open , it remains in BSID table ( similar to BSEG ),and when it is cleared, it pass to BSAD . We make our reports over thistables.PC1&CReading profitcenter hierarchyKL f[a gmReading profitcenter hierarchyProfit Center hierarchy (NOTE: These tables are used generally forhierarchy'sC,not only for the profitcenter hierarchy) :SETHEADER This is information about the nodes in the hierarchySETNODE This is the relationship between the nodesSETLEAF This is the attachment of the object (Profit Center, CostCenter) to the bottom node of the hierarchy.Reading these tables is rather difficult. To build a hierarchy you haveto read SETNODE for each level of the hierarchyCN j[a gmand build the tree.For reading the Profit/Cost Center hierarchy these functions can beused: call function 'G_SET_GET_HIGHER_LEVEL' exporting index = indexl "set number levels = level1 "number of levels upwards importing header = head1 exceptions invalid_index = 01. call function 'G_SET_GET' exporting index = indx1 control_block = cb1N j[a gm level = setlevel replace_variables = space importing subrc = result header = head index = indx2. and call function 'G_OBJECT_GET' exporting index = index control_block = cb2 replace_variables = space importing subrc = result entry = entry.Z)!1` !'Reading info about profitcenter hierarchy,MX ~[a gmReading info about profitcenter hierarchyREPORT z_hfa_test .data:L_TKA01 like tka01,l_setid type setid,it_ud like FCINPCA002 occurs 0 with header line.*l_kokrs like tka01-kokrsstart-of-selection.CALL FUNCTION 'K_KOKRS_READ' EXPORTING* GJAHR = '0000' kokrs = '1000' IMPORTING* E_TKA00 = E_TKA01 = L_TKA01 EXCEPTIONS NOT_FOUND = 1 NOT_FOUND_GJAHR = 2'!tN j[a gm 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.CALL FUNCTION 'G_SET_ENCRYPT_SETID' EXPORTING setclass = '0106' shortname = l_tka01-khinr* KOKRS =* KTOPL =* LIB =* RNAME =* ECCS_DIMEN =MN j[a gm* ECCS_ITCLG =* ECCS_SITYP = IMPORTING SETID = l_setid* EXCEPTIONS* NO_CO_AREA_SPECIFIED = 1* ILLEGAL_SETCLASS = 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.CALL FUNCTION 'FC_PRCTR_HIERARCHY' EXPORTING e_kokrs = '1000'MtT v[a gm e_topnode = l_setid tables it_pca_hi = it_ud EXCEPTIONS INCORRECT_COAREA = 1 SET_NOT_FOUND = 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.END-OF-SELECTION. sort it_ud by setid. loop at it_ud where not ( DESCRIPT is initial ).* where setid = 'DEBITOR'. write: / it_ud-setid, it_ud-type, it_ud-DESCRIPT.I '< H[a gm endloop.S"z1z'Application areas - FI/CO - TablesD'` [a gmFI/CO - TablesProfit center hierz'archyCEPC Profit Center Master Data TableAccounting BSAD Accounting: Secondary index for customers (cleared items) BSID Accounting: Secondary index for customers BSIW Index table for customer bills of exchange used BSIX Index table for customer bills of exchange used BSAK Accounting: Secondary index for vendors (cleared items) BSIK Accounting: Secondary index for vendors BSIP Index for vendor validation of double documents %zV z[a gmBSAS Accounting: Secondary index for G/L accounts (cleared items) Accounting documentsBKPF Accounting document header BSEG Accounting document segment BSET Tax data document segment BSEC One-time account data document segment Logical databases: BRM Cost elements, centers, activitiesCSKA Cost elements (data dependent on chart of accounts) CSKB Cost elements (data dependent on controlling area) CSKS Cost center master CSKT Cost center texts 8'Q p[a gmCSKU Cost element texts CSLA Activity master CSLT Activity type texts CSSK Cost center /cost element CSSL Cost center / activity Logical databases: - General ledger accountsSKA1 G/L accounts master (chart of accounts) SKAS G/L account master (chart of accounts: key word list) SKAT G/L account master record (chart of accounts: description) SKB1 G/L account master (company code) SKM1 Sample G/L accounts SKMT Sample account names SKPF Header Data: Inventory Sampling Gn1nApplication areas - SDm%'H `J[a gm>ƉApplication areas - SDTablesPn+1+Application areas - SD - TablesIt R r[a gmSD - TablesCustomerKNA1 General Data in Customer Master KNAS Customer master (VAT registration numbers general section) KNB1 Customer master (company code) KNB4 Customer payment history KNB5 Customer master (dunning data) (aanmaangegevens) KNBK Customer master (bank details) KNC1 Customer master (transaction figures) KNC3 Customer master (special G/L transaction figures) KNKA Customer master credit management: Central data KNKK Customer master credit management: Control area data + H ^[a gmKNMT Customer-Material Info Record Data Table KNMTK Customer-Material Info Record Header Table KNVA Customer Master Loading Points KNVD Customer master record sales request form KNVI Customer Master Tax Indicator KNVK Customer Master Contact Partner KNVL Customer Master Licenses KNVP Customer Master Partner Functions KNVS Customer Master Shipping Data KNVT Customer Master Record Texts for Sales KNVV Customer Master Sales Data Logical databases: DDF *t  T v[a gmSales DocumentVBAK Header Data VBAP Item Data VBAG Release Data by Schedule Line in Sch.Agrmt. VBUK Header Status and Administrative Data VBUP Item Status VBRL SD Document: Invoice List VBPA partner VBKD Business Data VBKA Sales activities VBEP Schedule Line Data VBRK Billing: Header Data (invoice) VBRP Billing: Item Data (invoice) VBFA Sales Document Flow LIKP Delivery Header Data LIPS Delivery: Item data Logical databases: AAV, AKV, ARV, VFV H ^[a gmSales requirementsVBBE Sales Requirements: Individual Records VBBS Sales Requirement Totals Record Logical databases: J 1tApplication areas - Other[tN l[a gmNJS ɉApplication areas - OtherTables used for hierarchysTables for used for user dataj91DApplication areas - Other - Tables for used for user data+tBM hBt[a gmTables for used for user dataUSR01User master record (run-time data) USR02 Logon data USR03 User address data USR04 User master authorizations USR05 User Master Parameter ID USR06 Additional data per user USR07 Object/values of last failed authorization check USR08 Table for user menu entries USR09 Entries for user menus (work areas) USR10 User master authorization profiles USR11 User Master Texts for Profiles (USR10) USR12 User master authorization values BWDG \[a gmUSR13 Short Texts for Authorizations USR14 Surchargeable language versions per user USR15 External User Name USR20 Date of last user master reorganization USR30 Additional Information for User Menu USR40 Table for illegal passwords USR41 User master: Additional data USRCOBJ Object Filters for Exploding Product Structures USRM0 Material Master User Settings: User Screen Reference USRM1 Material Master User Settings: Organizational Levels USRM2 Material Master User Settings: Logical Screens d(BD< HP[a gmUSRMM User settings: material master g6WD"E1&"EFApplication areas - Other - Tables used for hierarchys`DF_ [a gm&UTables used for hierarchysSETHEADER This is information about the nodes in the hierarchySETNODE This is the relationship between the nodesSETLEAF This is the attachment of the object (Profit Center, Cost Center) to the bottom node of the hierarchy.See Reading profitcenter hierarchy for information on how to read these tables. G"E(G1N(G/HApplication areas - MMF/HV zc[a gm g0ى@T5Application areas - MMTablesSelecting the correct views on the material master, when using call transaction/batch input Converting ISO Unit to base unit of measure\+(GH1HIConverting ISO Unit to base unit of measuret(/HIL fQ[a gmConverting ISO Unit to base unit of measureCALL FUNCTION 'UNIT_OF_MEASURE_ISO_TO_SAP' EXPORTING ISO_CODE = BAPIPLAF_I1-BASE_UOM_ISO IMPORTING SAP_CODE = PLAF-MEINS EXCEPTIONS NOT_FOUND = 1 OTHERS = 2. PHOJ1OJNApplication areas - MM - Tables'IvLU x[a gmMM - TablesMaterialMARA Material Master: General Data MARC Material Master: C Segment MARD Material Master: Storage Location/Batch Segment MAKT Material Descriptions MAPL Allocation of task lists to materials MARV Material Control Record MARM Units of Measure MBEW Material Valuation MOFF Outstanding Material Master Records MSTA Material Master Status MVER Material consumption MVKE Material Master: Sales Data MAPR Material Index for Forecast %OJN\ [a gmPROP Forecast parameters Logical databases: MSM Material documentMKPF Header: Material Document MSEG Document Segment: Material BSIM Secondary Index, Documents for Material Bill Of MaterialMAST Material to BOM Link EQST Equipment to BOM Link STAS BOMs header STKO BOM header STPN BOM follow-Up control STPO BOM item STPU BOM sub-item STST Standard BOM link STVB Bills of material - Serialization of posting STZU Permanent BOM data AvLN= J[a gmON+O1+OOApplication areas - Purchasings,NOG ^X[a gm8zۉApplication areas - PurchasingTablesX'+O 1~ Application areas - Purchasing - TablesO O#O/Y [a gmPurchasing - TablesPurchasing documentEKAN Vendor Address: Purchasing Document EKBE History of Purchasing Document EKBZ History of Purchasing Document - Delivery Costs EKET Delivery Schedules EKKN Account Assignment in Purchasing Document EKKO Purchasing Document Header EKPO Purchasing Document Item EKPB "Material Provided" Item in Purchasing Document EKPV Shipping-Specific Data on Stock Tfr. for Purch. Doc. Item Purchase Requisition7 fP n[a gmPROJ Project definition PRPS WBS (Work Breakdown Structure) Element Master Data PRTE Scheduling Data for Project Item Logical databases: CNJ, PSJ, IMA Purchasing info recordEINA Purchasing Info Record - General Data EINE Purchasing Info Record - Purchasing Organization Data EIPA Order Price History, Info Record EIKP Export/import header data EIPO Export/Import Item Data KONH Conditions (Header) KONP Conditions (Item) KONM Conditions (1 Dimensional Quantity Scales) ^/O l[a gmKONW Conditions (1 Dimensional Value Scales) Logical databases: IFM, ILM Vendor masterLFA1 General section LFAS VAT registration numbers general section LFB1 Company code LFB5 Dunning data LFBK Bank details LFC1 Transaction figures LFC3 Special G/L transaction figures LFM1 Record purchasing organization data Logical databases: KDF Y(fl1lՆApplication areas - Warehouse managementi"ՆG ^D[a gmm鬔Warehouse managementTablesb1l71<7Application areas - Warehouse management - Tables8Նo] [a gmWarehouse management - TablesInventory documentIKPF Header: Physical Inventory Document ISEG Physical Inventory Document Items LINK Inventory document header in WM LINP Inventory document item in WM LINV Inventory data per quant Storage locations and stocksLAGP Storage bins LEIN Storage unit header records LQUA Quants LQUAB Total quant counts for certain strategies MEIK Make-to-Order Stock for Customer Order MSCA Sales Orders on Hand with Vendor T7N j[a gmMSKA Sales Order Stock MBPR Stock at Production Storage Bin MLGN Material Data per Warehouse Number MLGT Material Data per Storage Type SLGH Elements of Stock Population Logical databases: S1L, S2L WM transferLTAK WM transfer order header LTAP WM transfer order item LUBU Posting change document Logical databases: R0L, RTL ?oP1PƋUsefull tablesv/ƋG ^^[a gmUsefull tablesT006 Units of Measuremente4P+1+Indhold - Enhancements, modofications and user exitseƋU z[a gm2 4dw`Enhancements, modofications and user exitsField exitsUser Exit, Customer ExitField exit1+1 DHelv&*FFMS Sans Serif&*Arialu FGF~u$sjK ~hZ   [  g2 0 }kYlX Tҁ < !"#$v%χ&'() *+Q,-m./0123Á4;56c 7 8C 9} : ; < = > ?g @{ A B C D E F G H I J K L؇ M N  O- P Q} RSxTbUVWXYZ[h\]^_^ `-aobcdK e6fgnhOi1j kZlw mnopqrstuv wxRy3zw{|}~q|B !2!F!ȇ!u" " "J """""0"##P#e### #$!$$$%%[&w&'A'' 'j'((e(((1((,(](])),,,:,M,,--5--<--F... .|./@ /! /;001811116123V33b 33344 4V 4#4444\445515`55 ȇ!<  B#1(~0  hxÁ 1 { %(J "44|B !2!(x3 |Z χ xm- k  Zh0 #,(h0< B!#.  6;0q (n2 [&hj'Áh1u" "Áχ(.w0](J "3 1 . 0"M, B,($"0"#e# #$!$$$% J "J "   e(! / Á }}](F.} b 33#4e(wÁx<  0 }k< 44%(,(M,M,1|.w c  h-{ ", $$%[&w&' { m0m|ҁ (.0 ȇ!mc b .61}w&' "3Qb  -؇    ؇ x Á 0!$!$!$ 3bbbb 33/-x, . 2! g {   "w&'  1(w/1, $$ x1<-gg xnh - ](xZ0 ؇ #4#4#4(3 0} }^  bQhÁ(~g { Zk((11 111Á111 111 [[1O~0}Tk^ o e#$,#hh-5-81:,81! /j'hC  44@ /ҁu"81 (;0  1:,3F.C  ,(|./ & ;)i24DHelvE ABAP/4 memoryAccessAdding recordsAddress AmountAppend$Appending(Ascii,AT END OF4AT FIRST8AT LAST<At line-selection@AT NEWLat selection-screenPAT USER-COMMANDTAT-LINE-SELECTION\Attribute`BackdBackgroundhBackground joblBAPItBase unit of measurexBatch input |BatchjobBegin ofBitmapBlockBoundaryBoxBSEGCACall transactionCalling a report from a dynproChainChangingCheckCheckBoxClassClearClose CLOSE_FORMCOCollectColorCommand$Command line(Concatenating0Constants4Context8Control level<CONTROL_FORMDConversionHConvertLCopyPCorrespondingTCurrency\Data typespDatabasetDatabase tablexDateDefaultDefineDeleteDesignDialogDialog programDocumentationDownloadDrilldownDynamic language constructsDYNP_VALUES_READDynproEBCIDICEDIT MASKEditorEditor-callEmailEnd ofEND-OF-SELECTIONEND_FORMEventEventsExamples ExcelExcludeExit Export0Express mail4External8Extracting<F4@FIDFieldLField exitXField symbols\Field value`FieldsdFilehFIRST_DAY_IN_PERIOD_GETFormFormatFormattingFormsFunctionFunction modules FunctionkeyG/LGeneral LedgerGETGPA memoryGraphicsGUI StatusGUI-statusHashed tableHeaderHelpHide HierarchyHierarchysIconImport Include$INITIALIZATION,Insert0Interactive4Internal table8Internal tablesPIntoTISOX|bm10|Job\Key strokes`LanguagedLast day in the monthhLAST_DAY_IN_PERIOD_GETlLayoutpLeading zerostleave programxLevel|LineLine commandsLine selectionline-selectionLinesListLogical expressionsLong textsLoopMailMaterial masterMemoryMenuMessageMessage classMessagesModificationsModifyModify current lineModulus 10MonthMoveMove corresponding MsAccessMsgNEW-LINENew-pageNUMBER_GET_NEXT Objects$Occurs(Office,OLE4Open8Open items<Open SQL@OPEN_FORMLOutputPPageTPagebreakXPageheader\Pageno`Parallel running of programdParameterhParameterIDlParameterstPCPfPF-StatusPopupPOPUP_TO_CONFIRMPOPUP_TO_DISPLAY_TEXTPOPUP_TO_INFORMPositionPresentation serverPrintPrint offPrint onPrint programProfitcenterProgramProgress barPROTECTRadiobutton groupRandomRangesRead current lineRead lineRead valueRecordingRecordsRefreshReport Reporting4Reports8Reserve<Rounding@RSTXSCRPDRunningHRunning programLSamplesPSAP memoryTSAP OfficeXSapScript`SavetScreenxScreen tableScreenpainterScroll boundaryScrollingSearchSelectSelect-optionsSelected rowSELECTIONSelection screenSelection-screenSendingSeperatorSETSETHEADERSETLEAFSETNODEShiftSimulatingSizeSKIPSO_NEW_DOCUMENT_SEND_API1SortSorted tableSortingSPA memory SplitSpoolSQLStandard texts X|bm10ZHstart-of-selection$START_FORM,Status0String4Strings8Strokes<Structure@SubmitDSubstringTSUMXSummarizing\SWA_STRING_SPLIT`SY-BATCHdSY-BINPThSY-DATUMlSY-DYNNRtSY-LILLIxSY-LSINDSY-PAGENOSY-PFKEYSY-REPIDSY-TABIXSY-TITLESY-UCOMMSY-ULINESY-UNAMESY-VLINESymbolsSYST-TFILLSYST-TMAXLSystemTabelTableTable - InternalTable controlTable control exampleTablesTextTEXT_SPLIT TextsTimeTOP-OF-PAGETOP-OF-PAGE DURING LINE-SELECTION top_line(Totals,Transaction0Transaction codes8Transport<Tree structureLTriggerPTypesTUnder\UnikdUnit of measurehUnixlUNPROTECTtUpdatexUpload|Usefull transaction codesUser commandUser exitUsingValidateValidation of selection screensVariablesVariantsWindowWindows helpWordwrappingWriteWRITE_FORMZerostton groupRandomRangesRead current lineRead lineRead valueRecordingRecordsRefreshReport Reporting4Reports8Reserve<Rounding@RSTXSCRPDRunningHRunning programLSamplesPSAP memoryTSAP OfficeXSapScript`SavetScreenxScreen tableScreenpainterScroll boundaryScrollingSearchSelectSelect-optionsSelected rowSELECTIONSelection screenSelection-screenSendingSeperatorSETSETHEADERSETLEAFSETNODEShiftSimulatingSizeSKIPSO_NEW_DOCUMENT_SEND_API1SortSorted tableSortingSPA memory SplitSpoolSQLStandard texts X|bm10Jobstart-of-selection ҿxprintprograms_that_are_used_for_printing E:\RESOUR~1\ABAP\ABAPTI~1\ABAP.RTF 114 B81D95E SapScript_M_Using_graphics_in_SapScript 0 SapScript_M_Using_graphics_in_SapScript E:\RESOUR~1\ABAP\ABAPTI~1\ABAP.RTF 115 i 86072BB SapScript_M_Modifications 0 SapScript_M_Modifications E:\RESOUR~1\ABAP\ABAPTI~1\/0&0;)LzT{ F)?IndholdKAbout AbapTipsIndhold - New tips Indhold - Dictionary~Modifying structure of table containing data.Defining typeshData typesZDefining constantsIndhold - Internal tablesCopy an internal table to anoterh internal table[Difference between SYST-TMAXL and SYST-TFILLWorking with subtotals in internal tables using AT/ENDATgReading an entry from internal table using its key.2 Displaying the contents of an internal table ( editor-call )Deleting, Inserting, Modifying lines in an internal table0Read database tabels into internal table Loop over internal table}Defining internal tablekSummarizing data when read into internal tableYIndhold - Open SQLOpen SQL syntax exampleslDynamic where clauses in open SQLJOIN in ABAPXIndhold - Database tablesReading a file from the applikation serverTable transport BSEG table readingTWhat table stores the names of all the sap tables and fields.ҁUpdating a database tableExtracting records that don't exist in another tableDeleting records from a database table< Adding records to a database tableIndhold - Elements of the languageField symbolsUsing IN in logical expressions and sql statementsvIndhold - FormsχTerminating formsCalling a form with a table parameterAssign variable type at runtime and moreSELECT with VARIABLE Passing data between programsExiting a Select/ Endselect loopQSAP's OPEN SQL, syntax of the SELECT statementForms - SyntaxmMessagesCurrencyConvert amount to/from stringConvert currenciesWriting currency amount to string without thousands seperatorStringsÁPF-Status;CaseCheckc NEW-LINE FormatC Write} Hide Move corresponding Define parameters Menubars and pushbuttons Indhold - Reporting Positioned writeg Submitting a report from ABAP with selection criterias1/{ Submitting a report in the background and send the list to spool Convert a report to ascii and save it in an internal table Validation of selection screens GUI-Status - Default codes for standard buttonsY AT-LINE-SELECTION does not work together with custom PF-STATUS Submitting a report using ranges for select-options Interactive reporting (Drill down reporting ) - example Disable parameter At line-selection Returning to, and refreshing report data after call to dialog screen Changing a line in a report Using a checkbox in a report؇ How to call a dialog screen from a report and passing data Reading mulitiple selected lines in a list  How to write pageno of totalpag- How to clear selection screen input How to check if a valid line is selected before drill down.} Dynamic sortHow to set a scroll boundaryxSelection-screen / Select-optionsbManaging outputPageheader with date, username e.t.c., exampleHow to use sy-lsind to determine the current list levelCalling another report from your own reportHow to find the example reportsStructure of a report - ExampleHow to alternate grey and white lineshEvents used in reportingControl level reportingIndhold - Dialog programmingScrolling the table control^ Sorting a table control-Other hints for using the table controoUsing a Table control with an internal tableHow to Use a Context Menu in ProgramsModifying attributes of screen fields at run timeK Leaving dynpro allthough required entry not made6Simple example of how to make a dialog programSelected row in a screen tablenSelect-Option in a DynproOTabel control, how to know the selected value on run-time1Changing attributes of a screen field using code Validating screen fieldsZCalling a report from a dynprow Other usefull stuff for dialog programmingWorking with the table control - ExampleIndhold - Using the editor1Editor commands in command line modeLine commands in command line modeIndhold - SapScriptSapScript - Determine/change which forms and printprograms that are used for printingSapScript - Using graphics in SapScriptSapScript - ModificationsSapScript - Frames, lines and shading SapScript - Symbols and Control commandsSapScript - StylesRCalling a form from SapScript3Boxes/Lines/ShadingwImport/Export SapScript form from PC fileSapScript CommandsSapScript- Structure of a print programSapScript - WRITE FORM function moduleSapScript - CONTROL_FORM - Calling Commands Using a programSD - Finding the name of the print programIndhold - Working with files and up- and downloadingFile transfer to the application serverFile Transfer From Internal Table to Presentation Server FileABAP programs for ASCII and EBCIDIC conversionsTransport Unixfile to PCfilqDownloading program at a stretchDeleting a fileReading an external file into an internal tableIndhold - Call transaction and batch inputFormat amount for batch input|Getting messages from call transactionSelecting the correct views on the material master, when using call transaction/batch inputBFormatting Dates, Quantities and amounts for batch inputSubmitting batch input from ABAPCall transaction and Batch input - ExampleBatch input - Example 2 Upload transactions from Excel and book them ( FI ) Batch input - Example 1 Collective invoicing!What date format should be used in batch input?2!Batch input - RecordingF!Indhold - Integration with MsOfficeȇ!Update MSAccess table from SAPu"Upload Excel spread sheet "OLE to activate Excel specific cell "Indhold - RFC/BAPIJ "BAPI for G/L postings"Comitting a BAPI"VB Code to call Function Module"Indhold - Function modules"List functions0"File functions "Amount and currency functions#Date and time functionsditor 7P#Function to return literal for monthe#Text functions#Office integration#Getting information / Conversions #Other functions$Mail and office!$Pop-up screens$Long Text formatting function$Indhold - Mail - SAP office%Some examples of the use of SO_NEW_DOCUMENT_SEND_API1%Send mail from background job[&Sending email from SAPw&Attaching reports to Office mail messages'Sending Reports thro' SAPOfficeA'Indhold - Running programs and jobs'Submitting a job for background processing 'How to check if a previous job is complete from ABAP?j'How do I create and/or trigger events?(Detect if a report is submitted in backgorund(Indhold - Other topicse(Getting a list over all icons in SAP(Simulating key strokes in ABAP (Field exits1(Rounding an amount(Modulus 10,(Language depending formatting](F4 Help - Calling it from a program and limiting values])Downloading function groups with all modules)Convert ABAP Code to HTML,Validating date entries,Random samples,Long texts - How to read them:,How to transport ABAP report selection variantsM,Find the last day of the month,Security on SE16-Pop up a dialog screen and allow user to pick a selection-Show a progress bar via ABAP5-How do you create a transaction for a report-Where are variant data stored for a program?<-ABAP source code for screenpainter reports-Parallel running of programF.Calling Windows help file from ABAP program.How to add months to the date..Field exit .Ranges - I need a function to get a unique key|.Leading zeros - Placing/deleting/Preventing a program from running more than once@ /Call unix command from ABAP/4! /Displaying Tree structures graphically;0User Exit, Customer Exit0Send an express mail (SAP-office) to another SAP user1Running a program with a variant where date changes every day81Transaction codes1System variables1Find examples used on SAP courses=1Indhold - ABAP Objects/Control programming61Object Oriented programming in ABAP - Simple example 12Object Oriented programming in ABAP - Simple example 23Indhold - Application areasV3Application areas - FI/CO3Finding open itemsb 3Reading profitcenter hierarchy3Reading info about profitcenter hierarchy3Application areas - FI/CO - Tables4Application areas - SD4Application areas - SD - Tables 4Application areas - OtherV 4Application areas - Other - Tables for used for user data#4Application areas - Other - Tables used for hierarchys4Application areas - MM44Converting ISO Unit to base unit of measure\4Application areas - MM - Tables4Application areas - Purchasing'4Application areas - Purchasing - Tables5Application areas - Warehouse management15Application areas - Warehouse management - Tables`5Usefull tables5Indhold - Enhancements, modofications and user exits5nction groups with all modules)Convert ABAP Code to HTML,Validating date entries,Random samples,Long texts - How to read them:,How to transport ABAP report selection variantsM,Find the last day of the month,Security on SE16-Pop up a dialog screen and allow user to pick a selection-Show a progress bar via ABAP5-How do you create a transaction for a report-Where are variant data stored for a program?<-ABAP source code for screenpainter reports-Parallel running of programF.Calling Windows help file from ABAP program.How to add months to the date..Field exit .Ranges - I need a function to get a unique key|.Leading zeros - Placing/deleting/Preventing a program from running more than once@ /Call unix command from ABAP/4! /Displaying Tree structures graphically;0User Exit, Customer Exit0Send an express mail (SAP-office) to another SAP user1Running a program with a variant where date changes every day81Transaction codes1System variables1Find examples used on SAP courses{ P#1nd E:\RESOUR~1\ABAP\ABAPTI~1\ABAP.RTF 174 mC4F87552 Parallel_running_of_program 1 Parallel_running_of_program E:\RESOUR~1\ABAP\ABAPTI~1\ABAP.RTF 174 4073B5DB Running_a_program_with_a_variant_where_date_changes_every_day 1 Running_a_program_with_a_variant_where_date_changes_every_day E:\RESOUR~1\ABAP\ABAPTI~1\ABAP.RTF 174 516E11D7 Preventing__a_program_from_running_more_than_once 1 Preventing__a_program_from_running_more_than_once E:\RESOUR~1\ABAP\ABAPTI~1\ABAP.RTF 174 139D2513 Submitting_a_job_for_background_processing 0 Submitting_a_job_for_background_processing E:\RESOUR~1\ABAP\ABAPTI~1\ABAP.RTF 175 97C48077 How_to_check_if_a_previous_job_is_complete_from_ABAPU 0 How_to_check_if_a_previous_job_is_complete_from_ABAPU E:\RESOUR~1\ABAP\ABAPTI~1\ABAP.RTF 176 58F0DAA5 How_do_I_create_andOor_trigger_eventsU 0 How_do_I_create_andOor_trigger_eventsU E:\RESOUR~1\ABAP\ABAPTI~1\ABAP.RTF 177 46968356 Detect_if_a_report_is_submitted_in_backgorund 0 Detect_if_a_report_is_submitted_in_backgorund E:\RESOUR~1\ABAP\ABAPTI~1\ABAP.RTF 178 c87EFA4EC Indhold_M_Other_topics 0 Indhold_M_Other_topics E:\RESOUR~1\ABAP\ABAPTI~1\ABAP.RTF 179 BCF6656C Getting_a_list_over_all_icons_in_SAP 1 Getting_a_list_over_all_icons_in_SAP E:\RESOUR~1\ABAP\ABAPTI~1\ABAP.RTF 179 sB87311E4 Simulating_key_strokes_in_ABAP 1 Simulating_key_strokes_in_ABAP E:\RESOUR~1\ABAP\ABAPTI~1\ABAP.RTF 179 [93271E2F Rounding_an_amount 1 Rounding_an_amount E:\RESOUR~1\ABAP\ABAPTI~1\ABAP.RTF 179 AE7C1FD6 Getting_messages_from_call_transaction 1 Getting_messages_from_call_transaction E:\RESOUR~1\ABAP\ABAPTI~1\ABAP.RTF 179 K95C65863 Modulus_10 1 Modulus_10 E:\RESOUR~1\ABAP\ABAPTI~1\ABAP.RTF 179 8C0629AD F4_Help_M_Calling_it_from_a_program__and_limiting_values 1 F4_Help_M_Calling_it_from_a_program__and_limiting_values E:\RESOUR~1\ABAP\ABAPTI~1\ABAP.RTF 179 3B1BA7B3 Downloading_function_groups_with_all_modules 1 Downloading_function_groups_with_all_modules E:\RESOUR~1\ABAP\ABAPTI~1\ABAP.RTF 179 iA9F6BAF0 C/&;)L4/1a5 l (qv"xي)](cM U|.q/'1(җehShw m鬔154M@ /cXƕ(wė '0 髭"<⟍ 144ن44m91.lT^YOdz3Ǧ$K 樭K#[&( =#)8f{ ||풓`̲o}-!ӵd;0K+<-Q^ s(G{2 "G.u^ ԼV3_ܼK lee( 4,(cq .+[0"y]ù$5} #0Ķ,RuĜ-6y2`5>4jq{A _$1 V 45A'F:̮'-5Џ5=ѓ vr[g!χyK! /0ٙxX 8z5 6< LZIGORX3- "\ V! 1!$J "?hc QPȇ!ŽR` :3)-nF! 0? "p\ҁB~Y - 3vr;} +,|3:Xcj%ӒGu".#`+#/{C r`\ :,=[ ^ف \ ~ +'q #e#'c{%'KW)wh61h2 13y  j}&Ub 3{XZ8؇ %JV,eX)Áj3j !!E!O$kA$Bw$g h%%he&}#)r?*  c--.,@1P#^x1M,=7235-2 4(@T5447d5 [5"-7 X:;])== E"> ?Q۵s@1AbֈBXB0lC $E-juF~VF(;wyJ81NJ4NK9L6HM34nNI—OO!QnQ/NJS#4SF.5TUW"L3X Xj'[ [q\ "]2 m$^w&w`.i`;\a$d(c ch g\4lj[[m2!+pxp q+"q @nr0rt3Du!u8u#Ov xd! Q$J{FpFF\L$ J? {$n M| FFFƆ ʼ  IT{ FpFFA. 'b_QH   O{ FFF #g   c  S{FpFF- m     O`  OFFFB &/6* )(     D QŤzq F pFF 5i}Le   'D  NǸ{ F FF2Yy       `{D  !!$4b F pFFb   MdKC  uD  O F FFyK$  9  oĒv +{F>  8w F q FFl(  '{F 7U bqF>    _ F FFuc bFF "5FFD   tFqFF^ 4rFF1  8{FFD   j}FFFr6  6rF  kFD  'b: :FrFFq%  &YtF$  _ FD M{< +FFF  %6Rf~qF;  G KtF@  M}u} & FsFF[  JF  !, xFD  P¤ & FFF ̼XuF$ FD  MɸJ 5} FuFF* N mF3 LtFD '$  OtFFF3    ,qF    FD   yF uFF      vF  !~FA   $wF FFB    O}F;  OtFD  lFuFFA   F   F@   aFFFA  #htF*   &{FA  c}FuF F2  %UvF@  =F3 0Vvr FF F9$%/D^t FADVZV]FEAVWVZ^^r(FlFlFmh hlp|jʦǫԫϦ}ćf̙^aϖxxxf """)))UUUMMMBBB999|PP3f3333f333ff3fffff3f3f̙f3333f3333333333f3333333f3f33ff3f3f3f3333f3333333f3̙33333f333ff3ffffff3f33f3ff3f3f3ffff3fffffffff3fffffff3f̙ffff3ff333f3ff33fff33f3ff̙3f3f3333f333ff3fffff̙̙3̙f̙̙̙3f̙3f3f3333f333ff3fffff3f3f̙3fAAAv^~^v^~^v^~^v^~^v^~^v^~^v^~^v^~^PXX^pXX^pXX^ -  -  -   -   *   )   )   )   *   pXX^pXX^pXX^v^~^PXX^pXX^pXX^                          pXX^pXX^pXX^v^~^PXX^pXX^pXX^                          pXX^pXX^pXX^v^~^PXX ^pXX ^pXX ^ ;            ;                ;                 ;                 :                 9                 9                   9                  9             pXX ^pXX ^pXX ^v^~^PXX ^pXX ^pXX ^ )            -                -                 -                 -                 -                 -                   -                  -             pXX ^pXX ^pXX ^v^~^PXX ^pXX ^pXX ^ !            %                %                 %                 %                 %                 %                   %                  %             pXX ^pXX ^pXX ^v^~^PXX ^pXX ^pXX ^                                                                                                                                                   pXX ^pXX ^pXX ^v^~^S^~Xv^~Xv^~X                 v^~Xv^~Xv^~Xv^~^v^~^v^~^v^~^v^~^v^~^v^~^w__Av^~^v^~^v^~^v^~^v^~^v^~^v^~^v^~^pXxXpXxXpXxX E ! E % E % E % D " A % A %  S %  S !pXxXpXxXpXxXv^~^v^~^v^~^v^~^v^~^v^~^v^~^w__A==s j lp0vz]8SSSSSh)Z8MMMMMh#W! $JJ)  8h H 9$ oh@G2oh@G2B ]`   TZh H  !   ppOH   ppOH        _     h      ppOH  'ppOH  ' $    _   *h     pp_X pp_X       @    $    h        pp``    'pp``    '   $  @  @ hoh3'oh3' 3$ @   @-xh    *````??OO````Q'````??OO````Q'   3$ @ @  rhH <'JJ /  `0 @)hHW/JJJJJh#]8PPPPPh&zzoppϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿoppϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿoppϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϟϿoppϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿoppoppϿoppϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϟoppoppϿoppϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿoppϿoppϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿoppoppϿoppϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿoppϿoppϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿoppϿϿoppϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿϿ