SDN Community Contribution

Size: px
Start display at page:

Download "SDN Community Contribution"

Transcription

1 SDN Community Contribution (This is not an official SAP document.) Disclaimer & Liability Notice This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade. SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk. SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document. 1

2 Applies To: WAS 4.6 Summary Refactoring and By: Jayanta Narayan Choudhiri Company: Software Solutions and services Date: 29 Nov 205 Table of Contents SDN Community Contribution...1 (This is not an official SAP document.)...1 Disclaimer & Liability Notice...1 Applies To:...2 Summary...2 Table of Contents...2 Code...4 Author Bio...44 " Any fool can write code that a computer can understand. Good programmers write code that humans can understand. " --- Martin Fowler, Refactoring: Improving the Design of Existing Code ABAP pretty printer is good for code but not supportive for data declarations. 2

3 As a result ABAP code often tends to need more labour to maintain. I therefore wrote 3 Clipboard utilities. These are in a ZIP file and are available as a download. 1. YClipJNC based on but improved to include table~column half-line commenting. Take any ABAP code (should have survived syntax check) including that "." DOT terminator. Copy to Clipboard & F8 on YClipJNC will create the beautiful version in clipboard ready for pasting back. The big advantage is that you can send for beautification only portions of code - this is vital in maintaining someone else's badly written code. 2. YClip2JNC is for Internal Table declarations only, with existing comments Aligns everything nicely. 3. YClip3JNC is to create a Commented CALL FUNCTION Pattern. Try with "CS_BOM_EXPL_MAT_V2" The pattern is ready in clipboard for pasting appropriately. 3

4 These 3 utilities should give a big boost to good clean commented ABAP code. No excuses for not half-line commenting! Code *& * *& Beautify ABAP Code Via Clip * *& * * based on ideas from * * Author Jayanta Narayan Choudhuri * Flat 302 * 395 Jodhpur Park * Kolkata * sss@cal.vsnl.net.in * URL: * * This program takes ABAP code in ClipBoard, and does the following: * - Attempts to move comments to the end of the line * - Adds comments (table name) for the tables listed after a TABLES * statement if the line has not been commented already. * - Adds comments (field name) for data elements, parameters, and 4

5 * select-options that are defined using the LIKE or FOR statement * - For ENDLOOP/ENDSELECT adds comment identify the LOOP/SELECT * that is being closed * - For FORM/ENDFORM adds comment identify the FORM that is being * closed * - Calls function PRETTY_PRINTER to do the SAP standard pretty print * after the custom comments have been created * Returns Modified Code Via ClipBoard * REPORT yclipjnc.. TABLES: e071, tadir, trdir, dd02t. " Change & Transport System: Object Entries of Requests/Tasks " Directory of Repository Objects " Generated Table for View TRDIR " R/3 DD: SAP table texts DATA: BEGIN OF mtab_old_prog OCCURS 0, line(172) TYPE c, END OF mtab_old_prog. DATA: BEGIN OF mtab_new_prog OCCURS 0, line(172) TYPE c, 5

6 END OF mtab_new_prog. DATA: BEGIN OF mtab_jnc_prog OCCURS 0, line(172) TYPE c, END OF mtab_jnc_prog. DATA: * Hold an entire statement, even if it spans multiple lines BEGIN OF mtab_long_line OCCURS 0, start TYPE i, end TYPE i, code(9999) TYPE c, "For type "C", a maximum length specification of is allowed. END OF mtab_long_line. DATA: BEGIN OF mtab_tabname OCCURS 0, tabname LIKE dd02t-tabname, " Table name tabdesc LIKE dd02t-ddtext, " Short text describing ABAP/4 Dictio END OF mtab_tabname. * Queue to hold list of internal table names for commenting the ENDLOOP * line DATA: BEGIN OF mtab_itab_names OCCURS 0, tabname(40) TYPE c, END OF mtab_itab_names. 6

7 * Queue to hold list of table names for commenting the ENDSELECT line DATA: BEGIN OF mtab_tab_names OCCURS 0, tabname(40) TYPE c, END OF mtab_tab_names. DATA: BEGIN OF mtab_form_names OCCURS 0, tabname(40) TYPE c, END OF mtab_form_names. DATA: mylength TYPE i, myrc TYPE i. CONSTANTS: myhats(40) VALUE '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^'. * START of EXECUTION * Read the program code in ClipBoard into an internal table CALL METHOD cl_gui_frontend_services=>clipboard_import IMPORTING data = mtab_old_prog[] length = mylength. IF sy-subrc NE 0. 7

8 WRITE: / `Unable to read ClipBoard`. WRITE: / `Exiting program`. PERFORM create_condensed_table TABLES mtab_old_prog mtab_long_line. PERFORM format_program. CALL FUNCTION `PRETTY_PRINTER` EXPORTING inctoo = space TABLES ntext otext = mtab_jnc_prog = mtab_new_prog EXCEPTIONS enqueue_table_full = 1 include_enqueued = 2 include_readerror = 3 include_writeerror = 4 OTHERS = 5. * Write the beautiful program code to ClipBoard from internal table CALL METHOD cl_gui_frontend_services=>clipboard_export IMPORTING 8

9 data = mtab_jnc_prog[] CHANGING rc = myrc. LOOP AT mtab_jnc_prog. IF mtab_jnc_prog = space. SKIP 1. WRITE: / mtab_jnc_prog. ENDLOOP. " LOOP AT MTAB_JNC_PROG * FORM CREATE_CONDENSED_TABLE * * Create a table that has all statements condensed onto 1 line * FORM create_condensed_table TABLES ftab_old_prog STRUCTURE mtab_old_prog ftab_long_line STRUCTURE mtab_long_line. DATA: * Structure to hold program code/comment BEGIN OF fstr_line, 9

10 code(172) TYPE c, " Program Code comment(172) TYPE c, " Inline comments END OF fstr_line. LOOP AT ftab_old_prog. IF ftab_long_line-start = 0. ftab_long_line-start = ftab_long_line-end + 1. CLEAR ftab_long_line-end. * Strip off any inline comments so they do not get in the way * If comments are not separated, then words in the comments could * look like keywords, and cause problems SPLIT ftab_old_prog-line AT `"` INTO fstr_line-code fstr_line-comment. * Align all statements to be left justified SHIFT fstr_line-code LEFT DELETING LEADING space. * Put all lines that make up a single statement into one field * This will make it easier to isolate key words. For example, if you * want to process a TABLES statement, but exclude the TABLES part of a * function call, or a subroutine call. CONCATENATE ftab_long_line-code fstr_line-code 10

11 INTO ftab_long_line-code SEPARATED BY space. IF fstr_line-code CA `.` OR fstr_line-code(1) = `*` OR fstr_line-code CO space. " Period means end of statement " Comment Line " Blank Line * Keep track of the table index that the statement ends on ftab_long_line-end = sy-tabix. * Remove delimiter from concatenation of fields SHIFT ftab_long_line-code LEFT BY 1 PLACES. APPEND ftab_long_line. CLEAR: ftab_long_line-code, ftab_long_line-start. * Don`t clear out fstr_long_line-end yet. It is used to calc * fstr_long_line-start. ENDLOOP. ENDFORM. " LOOP AT FTAB_OLD_PROG " FORM CREATE_CONDENSED_TABLE * FORM FORMAT_PROGRAM * 11

12 FORM format_program. DATA: lstr_old_prog LIKE LINE OF mtab_old_prog. LOOP AT mtab_long_line. TRANSLATE mtab_long_line-code TO UPPER CASE. IF mtab_long_line-code(1) EQ `*`. " Do not modify Comment Lines LOOP AT mtab_old_prog FROM mtab_long_line-start TO mtab_long_line-end. mtab_new_prog-line = mtab_old_prog-line. APPEND mtab_new_prog. ENDLOOP. " LOOP AT MTAB_OLD_PROG ELSEIF mtab_long_line-code(6) EQ `TABLES`. * Reformat any TABLES statements. Will only reformat when TABLES * is at the start of the statement. Will not try to get table * descriptions for CALL FUNCTIONS or FORM/PERFORMs 12

13 * Get the table names from mstr_long_line. PERFORM get_table_names_from_statement TABLES mtab_tabname USING mtab_long_line-code. * Find the descriptions for each table PERFORM get_table_descriptions TABLES mtab_tabname. * create the new statement PERFORM build_new_tables_statement USING mtab_long_line. ELSE. " All other modifications to the code handled here LOOP AT mtab_old_prog FROM mtab_long_line-start TO mtab_long_line-end. * Remove extra spaces from line for comparisons lstr_old_prog-line = mtab_old_prog-line. CONDENSE lstr_old_prog-line. TRANSLATE lstr_old_prog-line TO UPPER CASE. IF lstr_old_prog-line CS `"`. " Comments mtab_new_prog-line = mtab_old_prog-line. ELSE. IF lstr_old_prog-line CS ` LIKE ` OR 13

14 lstr_old_prog-line CS ` TYPE ` OR lstr_old_prog-line CS ` FOR ` OR lstr_old_prog-line CS `~`. "jnc OpenSQL table~column PERFORM get_for_like_comment USING mtab_old_prog CHANGING mtab_new_prog. ELSEIF lstr_old_prog-line(8) = 'LOOP AT'. * save table name into a queue PERFORM enqueue_itab_name USING mtab_long_line-code. mtab_new_prog-line = mtab_old_prog-line. ELSEIF lstr_old_prog-line(7) = `ENDLOOP`. * get name off of queue and add it as a comment to the ENDLOOP line PERFORM add_comment_to_endloop USING mtab_old_prog-line CHANGING mtab_new_prog-line. ELSEIF lstr_old_prog-line(7) EQ 'SELECT' AND lstr_old_prog-line(13) NE 'SELECT SINGLE'. * save table name into a queue 14

15 PERFORM enqueue_tab_name USING mtab_old_prog-line. mtab_new_prog-line = mtab_old_prog-line. ELSEIF lstr_old_prog-line(9) = `ENDSELECT`. * get name off of queue and add it as a comment to the ENDSELECT PERFORM add_comment_to_select USING mtab_old_prog-line CHANGING mtab_new_prog-line. ELSEIF lstr_old_prog-line(5) = 'FORM'. * save form name into a queue PERFORM enqueue_form_name USING mtab_old_prog-line. mtab_new_prog-line = mtab_old_prog-line. ELSEIF lstr_old_prog-line(7) = `ENDFORM`. * get name off of queue and add it as a comment to the ENDFORM PERFORM add_comment_to_endform USING mtab_old_prog-line CHANGING mtab_new_prog-line. ELSE. " Any other lines mtab_new_prog-line = mtab_old_prog-line. 15

16 APPEND mtab_new_prog. ENDLOOP. " LOOP AT MTAB_OLD_PROG ENDLOOP. " LOOP AT MTAB_LONG_LINE ENDFORM. " FORM FORMAT_PROGRAM * FORM GET_TABLE_NAMES_FROM_STATEMENT * FORM get_table_names_from_statement TABLES ftab_tabname STRUCTURE mtab_tabname USING fc_statement. CLEAR ftab_tabname. REFRESH ftab_tabname. REPLACE `TABLES` WITH space INTO fc_statement. TRANSLATE fc_statement USING `. `. " Replace periods TRANSLATE fc_statement USING `, `. " Replace commas TRANSLATE fc_statement USING `: `. " Replace colons 16

17 CONDENSE fc_statement. " Remove all extra spaces SPLIT fc_statement AT space INTO TABLE ftab_tabname. ENDFORM. " FORM GET_TABLE_NAMES_FROM_STATEMENT * FORM GET_TABLE_DESCRIPTIONS * FORM get_table_descriptions TABLES ftab_tabname STRUCTURE mtab_tabname. LOOP AT ftab_tabname. SELECT SINGLE * FROM dd02t WHERE tabname = ftab_tabname-tabname AND ddlanguage = sy-langu. IF sy-subrc = 0. ftab_tabname-tabdesc = dd02t-ddtext. MODIFY ftab_tabname. ENDLOOP. ENDFORM. " LOOP AT FTAB_TABNAME " FORM GET_TABLE_DESCRIPTIONS 17

18 * FORM BUILD_NEW_TABLES_STATEMENT * FORM build_new_tables_statement USING fstr_long_line LIKE mtab_long_line. DATA: lc_sep(1) TYPE c, li_rows TYPE i, wordlen TYPE i. DESCRIBE TABLE mtab_tabname LINES li_rows. mtab_new_prog-line = `TABLES:`. APPEND mtab_new_prog. LOOP AT mtab_tabname. IF sy-tabix = li_rows. lc_sep = `.`. ELSE. lc_sep = `,`. wordlen = STRLEN( mtab_tabname-tabname ). 18

19 IF wordlen < 12. wordlen = 12 - wordlen. ELSE. wordlen = 1. CONCATENATE `^^` mtab_tabname-tabname lc_sep myhats+0(wordlen) ` " ` mtab_tabname-tabdesc INTO mtab_new_prog. TRANSLATE mtab_new_prog USING `^ `. APPEND mtab_new_prog. ENDLOOP. " LOOP AT MTAB_TABNAME ENDFORM. " FORM GET_TABLE_DESCRIPTIONS * FORM GET_FOR/LIKE_COMMENT * FORM get_for_like_comment USING value(f_old_prog) LIKE mtab_old_prog 19

20 CHANGING f_new_prog LIKE mtab_new_prog. DATA: lc_dummy(1) TYPE c, lc_tabname(40) TYPE c, wordlen TYPE i, ltab_nametab LIKE dntab OCCURS 0 WITH HEADER LINE, lstr_old_prog LIKE LINE OF mtab_old_prog, BEGIN OF lstr_field, tabname fldname LIKE dd02t-tabname, " Table name LIKE dd02t-tabname, " Table name END OF lstr_field. lstr_old_prog-line = f_old_prog. " SAVE input TRANSLATE f_old_prog TO UPPER CASE. CONDENSE f_old_prog. IF f_old_prog-line CA `"` OR " Line already commented f_old_prog-line(1) = `*`. f_new_prog = f_old_prog. RETURN. 20

21 ELSEIF f_old_prog CS ` LIKE `. SPLIT f_old_prog AT ` LIKE ` INTO lc_dummy lc_tabname. ELSEIF f_old_prog CS ` TYPE `. SPLIT f_old_prog AT ` TYPE ` INTO lc_dummy lc_tabname. ELSEIF f_old_prog CS ` FOR `. SPLIT f_old_prog AT ` FOR ` INTO lc_dummy lc_tabname. ELSEIF f_old_prog CS `~`. MOVE f_old_prog TO lc_tabname. CONDENSE lc_tabname. SPLIT lc_tabname AT `~` INTO lstr_field-tabname lstr_field-fldname. ELSE. f_new_prog = lstr_old_prog-line. RETURN. * If there is anything following the table-field in a LIKE or FOR clause * it will be removed so that only the table-field remains IF NOT f_old_prog CS `~`. CONDENSE lc_tabname. 21

22 TRANSLATE lc_tabname USING `. `. TRANSLATE lc_tabname USING `, `. " Remove periods " Remove commas CONDENSE lc_tabname. " Remove extra white space SPLIT lc_tabname AT `-` INTO lstr_field-tabname lstr_field-fldname. * The system variables are actually defined in DDIC structure SYST IF lstr_field-tabname = `SY`. lstr_field-tabname = `SYST`. TRANSLATE lstr_field-tabname TO UPPER CASE. TRANSLATE lstr_field-fldname TO UPPER CASE. CALL FUNCTION 'NAMETAB_GET' EXPORTING tabname = lstr_field-tabname TABLES nametab = ltab_nametab EXCEPTIONS internal_error = 1 table_has_no_fields = 2 22

23 table_not_activ = 3 no_texts_found = 4 OTHERS = 5. IF sy-subrc <> 0. * MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno * WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. READ TABLE ltab_nametab WITH KEY tabname = lstr_field-tabname fieldname = lstr_field-fldname. IF sy-subrc = 0. wordlen = STRLEN( lstr_old_prog-line ). IF wordlen < 45. wordlen = 45 - wordlen. ELSE. wordlen = 1. CONCATENATE lstr_old_prog-line myhats+0(wordlen) ` " ` ltab_nametab-fieldtext 23

24 INTO f_new_prog. TRANSLATE mtab_new_prog USING `^ `. ELSE. f_new_prog = lstr_old_prog-line. ENDFORM. " FORM GET_TABLE_DESCRIPTIONS * FORM ENQUEUE_ITAB_NAME * FORM enqueue_itab_name USING value(f_line) LIKE mtab_long_line-code. DATA: lc_dummy(1) TYPE c, lc_itab(40) TYPE c. TRANSLATE f_line TO UPPER CASE. SPLIT f_line AT `LOOP AT ` INTO lc_dummy lc_itab. SPLIT lc_itab AT space INTO lc_itab lc_dummy. 24

25 TRANSLATE lc_itab USING `. `. CONDENSE lc_itab. mtab_itab_names = lc_itab. * Always have the most recent LOOP AT table as the first entry in the * queue INSERT mtab_itab_names INDEX 1. ENDFORM. " FORM GET_TABLE_DESCRIPTIONS * FORM ADD_COMMENT_TO_ENDLOOP * FORM add_comment_to_endloop USING fstr_long_line LIKE mtab_old_prog-line CHANGING f_prog_line LIKE mtab_new_prog-line. IF mtab_old_prog-line NA `"`. " No comments * Get the internal table from the queue READ TABLE mtab_itab_names INDEX 1. CONCATENATE mtab_old_prog-line ` "` `LOOP AT` mtab_itab_names-tabname 25

26 INTO f_prog_line SEPARATED BY space. * Dequeue the itab name DELETE mtab_itab_names INDEX 1. ELSE. f_prog_line = mtab_old_prog-line. ENDFORM. " FORM GET_TABLE_DESCRIPTIONS * FORM ENQUEUE_TAB_NAME * FORM enqueue_tab_name USING f_line LIKE mtab_old_prog-line. DATA: lc_dummy(1) TYPE c, lc_tab(40) TYPE c. TRANSLATE f_line TO UPPER CASE. SPLIT f_line AT ` FROM ` INTO lc_dummy lc_tab. CONDENSE lc_tab. " Remove leading/trailing extra spaces 26

27 SPLIT lc_tab AT space INTO lc_tab lc_dummy. TRANSLATE lc_tab USING `. `. CONDENSE lc_tab. mtab_tab_names = lc_tab. * Always have the most recent LOOP AT table as the first entry in the * queue INSERT mtab_tab_names INDEX 1. ENDFORM. " FORM GET_TABLE_DESCRIPTIONS * FORM ADD_COMMENT_TO_SELECT * FORM add_comment_to_select USING fstr_long_line LIKE mtab_old_prog-line CHANGING f_prog_line. IF mtab_old_prog-line NA `"`. " No comments * Get the table from the queue READ TABLE mtab_tab_names INDEX 1. 27

28 CONCATENATE mtab_old_prog-line ` "` `SELECT FROM` mtab_tab_names-tabname INTO f_prog_line SEPARATED BY space. * Dequeue the tab name DELETE mtab_tab_names INDEX 1. ELSE. f_prog_line = mtab_old_prog-line. ENDFORM. " FORM GET_TABLE_DESCRIPTIONS * FORM ADD_COMMENT_TO_ENDFORM * FORM add_comment_to_endform USING fstr_long_line LIKE mtab_old_prog-line CHANGING f_prog_line. IF mtab_old_prog-line NA `"`. " No comments * Get the table from the queue READ TABLE mtab_form_names INDEX 1. CONCATENATE mtab_old_prog-line ` "` `FORM` mtab_form_names-tabname INTO f_prog_line SEPARATED BY space. 28

29 * Dequeue the form name DELETE mtab_form_names INDEX 1. ELSE. f_prog_line = mtab_old_prog-line. ENDFORM. " FORM GET_TABLE_DESCRIPTIONS * FORM ENQUEUE_FORM_NAME * FORM enqueue_form_name USING f_line. DATA: lc_dummy(1) TYPE c, lc_tab(40) TYPE c. TRANSLATE f_line TO UPPER CASE. SPLIT f_line AT `FORM ` INTO lc_dummy lc_tab. CONDENSE lc_tab. " Remove leading/trailing extra spaces 29

30 SPLIT lc_tab AT space INTO lc_tab lc_dummy. TRANSLATE lc_tab USING `. `. CONDENSE lc_tab. mtab_form_names = lc_tab. * Always have the most recent LOOP AT table as the first entry in the * queue INSERT mtab_form_names INDEX 1. ENDFORM. " FORM ENQUEUE_FORM_NAME *& * *& Beautify ABAP Code Via Clip * *& * * Author Jayanta Narayan Choudhuri * Flat 302 * 395 Jodhpur Park * Kolkata * sss@cal.vsnl.net.in 30

31 * URL: * * This program takes Structure & internal table declarations in ClipBoard, * and does prefect alignment as possible * Returns Modified Code Via ClipBoard * REPORT yclip2jnc. DATA: BEGIN OF mtab_old_prog OCCURS 0, line(172) TYPE c, END OF mtab_old_prog. DATA: BEGIN OF mtab_new_prog OCCURS 0, line(172) TYPE c, END OF mtab_new_prog. DATA: BEGIN OF i_words OCCURS 0, word(172) TYPE c, END OF i_words. DATA: wordlen TYPE i, saveix TYPE i, 31

32 maxlen1 TYPE i, maxlen2 TYPE i, maxlen3 TYPE i, wordoff TYPE i, colnum TYPE i, mylength TYPE i, diff TYPE i, myrc TYPE i, workline(172). CONSTANTS: myhats(40) VALUE '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^'. * Read the program code in ClipBoard into an internal table CALL METHOD cl_gui_frontend_services=>clipboard_import IMPORTING data = mtab_old_prog[] length = mylength. IF sy-subrc NE 0. WRITE: / `Unable to read ClipBoard`. WRITE: / `Exiting program`. * SAP pads non-displayable characters in last few lines 32

33 LOOP AT mtab_old_prog. MOVE sy-tabix TO saveix. CONDENSE mtab_old_prog-line. REPLACE ALL OCCURRENCES OF ',' IN mtab_old_prog-line WITH ','. SPLIT mtab_old_prog-line AT space INTO TABLE i_words. LOOP AT i_words. wordlen = STRLEN( i_words-word ). IF wordlen > 60 OR i_words-word+0(1) < space OR i_words-word+0(1) > '~'. DELETE mtab_old_prog INDEX saveix. EXIT. ENDLOOP. ENDLOOP. LOOP AT mtab_old_prog. CONDENSE mtab_old_prog-line. REPLACE ALL OCCURRENCES OF ',' IN mtab_old_prog-line WITH ','. SPLIT mtab_old_prog-line AT space INTO TABLE i_words. 33

34 MOVE 1 TO colnum. LOOP AT i_words. wordlen = STRLEN( i_words-word ). CASE colnum. WHEN 1. IF wordlen > maxlen1. MOVE wordlen TO maxlen1. WHEN 2. IF wordlen > maxlen2. MOVE wordlen TO maxlen2. WHEN 3. IF wordlen > maxlen3. MOVE wordlen TO maxlen3. ENDCASE. ADD 1 TO colnum. ENDLOOP. ENDLOOP. LOOP AT mtab_old_prog. 34

35 workline = mtab_old_prog-line. CONDENSE workline. REPLACE ALL OCCURRENCES OF ',' IN mtab_old_prog-line WITH ','. SPLIT workline AT space INTO TABLE i_words. LOOP AT i_words. FIND i_words-word IN mtab_old_prog-line MATCH OFFSET wordoff. EXIT. ENDLOOP. EXIT. ENDLOOP. LOOP AT mtab_old_prog. CONDENSE mtab_old_prog-line. REPLACE ALL OCCURRENCES OF ',' IN mtab_old_prog-line WITH ','. SPLIT mtab_old_prog-line AT space INTO TABLE i_words. MOVE 1 TO colnum. LOOP AT i_words. wordlen = STRLEN( i_words-word ). CASE colnum. WHEN 1. 35

36 PERFORM f_diff_calc USING maxlen1 wordlen CHANGING diff. CONCATENATE myhats+0(wordoff) i_words-word myhats+0(diff) INTO mtab_new_prog-line. WHEN 2. PERFORM f_diff_calc USING maxlen2 wordlen CHANGING diff. CONCATENATE mtab_new_prog-line i_words-word myhats+0(diff) INTO mtab_new_prog-line. WHEN 3. PERFORM f_diff_calc USING maxlen3 wordlen CHANGING diff. CONCATENATE mtab_new_prog-line i_words-word myhats+0(diff) INTO mtab_new_prog-line. WHEN OTHERS. CONCATENATE mtab_new_prog-line ` ` i_words-word INTO mtab_new_prog-line. ENDCASE. ADD 1 TO colnum. ENDLOOP. TRANSLATE mtab_new_prog-line USING `^ `. APPEND mtab_new_prog. ENDLOOP. * Write the beautiful program code to ClipBoard from internal table CALL METHOD cl_gui_frontend_services=>clipboard_export 36

37 IMPORTING data = mtab_new_prog[] CHANGING rc = myrc. LOOP AT mtab_new_prog. IF mtab_new_prog = space. SKIP 1. WRITE: / mtab_new_prog. ENDLOOP. " LOOP AT MTAB_NEW_PROG *& * *& Form f_diff_calc *& * FORM f_diff_calc USING value(maxlen) TYPE i value(wordlen) TYPE i CHANGING diff TYPE i. COMPUTE diff = maxlen - wordlen + 4. IF diff > 40. diff = 40. ENDFORM. "f_diff_calc 37

38 *& * *& Beautiful Function Module Call via clipboard * *& * * Author Jayanta Narayan Choudhuri * Flat 302 * 395 Jodhpur Park * Kolkata * sss@cal.vsnl.net.in * URL: * * This program takes a parameter as a Function Module Name * and does a documented "pattern paste" * Returns pattern Code Via ClipBoard * PROGRAM yclip3jnc. PARAMETERS: p_func LIKE fupararef-funcname. " Name of Function Module DATA : BEGIN OF i_tab OCCURS 0, 38

39 funcname LIKE fupararef-funcname, " Name of Function Module paramtype LIKE fupararef-paramtype, " Parameter type pposition LIKE fupararef-pposition, " Internal Table, Current Line Index optional LIKE fupararef-optional, " Optional parameters parameter LIKE fupararef-parameter, " Parameter name defaultval LIKE fupararef-defaultval, " Default value for import parameter structure LIKE fupararef-structure, " Associated Type of an Interface Parameter stext LIKE funct-stext, " Short text END OF i_tab. DATA: BEGIN OF mtab_new_prog OCCURS 0, line(172) TYPE c, END OF mtab_new_prog. DATA: funcdesc LIKE tftit-stext, " Short text for function module mylen TYPE i, myrc TYPE i. CONSTANTS: myhats(40) VALUE '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^'. TRANSLATE p_func TO UPPER CASE. SELECT SINGLE 39

40 tftit~stext " Short text for function module INTO funcdesc FROM tftit WHERE tftit~funcname = p_func AND tftit~spras = sy-langu. TRANSLATE p_func TO LOWER CASE. CONCATENATE `CALL FUNCTION ` p_func ` " ` funcdesc INTO mtab_new_prog-line. APPEND mtab_new_prog. TRANSLATE p_func TO UPPER CASE. SELECT fupararef~funcname fupararef~paramtype fupararef~pposition fupararef~optional fupararef~parameter fupararef~defaultval fupararef~structure " Name of Function Module " Parameter type " Internal Table, Current Line Index " Optional parameters " Parameter name " Default value for import parameter " Associated Type of an Interface Parameter funct~stext " Short text INTO TABLE i_tab FROM fupararef 40

41 INNER JOIN funct ON fupararef~funcname = funct~funcname AND fupararef~parameter = funct~parameter AND funct~spras = sy-langu WHERE fupararef~funcname = p_func AND fupararef~r3state = 'A' ORDER BY fupararef~paramtype fupararef~pposition. LOOP AT i_tab. AT NEW paramtype. CASE i_tab-paramtype. WHEN 'C'. MOVE ' CHANGING' TO mtab_new_prog-line. WHEN 'E'. MOVE ' IMPORTING' TO mtab_new_prog-line. WHEN 'I'. MOVE ' EXPORTING' TO mtab_new_prog-line. WHEN 'T'. MOVE ' TABLES' TO mtab_new_prog-line. WHEN 'X'. MOVE ' EXCEPTIONS' TO mtab_new_prog-line. ENDCASE. 41

42 APPEND mtab_new_prog. ENDAT. IF i_tab-optional = 'X'. mtab_new_prog-line = `*^^^`. ELSE. mtab_new_prog-line = `^^^^`. IF i_tab-paramtype = 'X'. MOVE i_tab-pposition TO i_tab-defaultval. CONDENSE i_tab-defaultval. ELSE. TRANSLATE i_tab-parameter TO LOWER CASE. CONCATENATE mtab_new_prog-line i_tab-parameter '^=^' INTO mtab_new_prog-line. IF i_tab-defaultval IS NOT INITIAL. CONCATENATE mtab_new_prog-line i_tab-defaultval INTO mtab_new_prog-line. mylen = STRLEN( mtab_new_prog-line ). 42

43 IF mylen < 31. COMPUTE mylen = 31 - mylen. ELSE. MOVE 1 TO mylen. TRANSLATE i_tab-structure TO LOWER CASE. CONCATENATE mtab_new_prog-line myhats+0(mylen) ` " ` i_tab-structure INTO mtab_new_prog-line. mylen = STRLEN( mtab_new_prog-line ). IF mylen < 47. COMPUTE mylen = 47 - mylen. ELSE. MOVE 1 TO mylen. CONCATENATE mtab_new_prog-line myhats+0(mylen) ` ` i_tab-stext INTO mtab_new_prog-line. APPEND mtab_new_prog. ENDLOOP. " LOOP AT I_TAB 43

44 CONCATENATE `. " ` p_func INTO mtab_new_prog-line. APPEND mtab_new_prog. LOOP AT mtab_new_prog. TRANSLATE mtab_new_prog-line USING `^ `. MODIFY mtab_new_prog. IF mtab_new_prog = space. SKIP 1. WRITE: / mtab_new_prog. ENDLOOP. " LOOP AT MTAB_NEW_PROG * Write the beautiful program code to ClipBoard from internal table CALL METHOD cl_gui_frontend_services=>clipboard_export IMPORTING data = mtab_new_prog[] CHANGING rc = myrc. Author Bio Jayanta Narayan Choudhiri is a 54 year old Bengali ABAPer in Kolkata! 44

SDN Community Contribution

SDN Community Contribution SDN Community Contribution (This is not an official SAP document.) Disclaimer & Liability Notice This document may discuss sample coding or other information that does not include SAP official interfaces

More information

A Simple search program for Dictionary objects

A Simple search program for Dictionary objects A Simple search program for Dictionary objects Applies To: ABAP Programming Article Summary This Code sample is a simple search utility for the dictionary objects. This has three kinds of search functionality

More information

Triggering the Process Chains at Particular Date using Events

Triggering the Process Chains at Particular Date using Events Triggering the Process Chains at Particular Date using Events Applies to: SAP BW 3.5, Will also work on SAP BI 7 For more information, visit the Business Intelligence homepage Summary This document discusses

More information

How to Copy Test Data Set from One Function Module to Another (Comes Handy While Renaming Functions)

How to Copy Test Data Set from One Function Module to Another (Comes Handy While Renaming Functions) SDN Contribution How to Copy Test Data Set from One Function Module to Another (Comes Handy While Renaming Functions) Applies to: SAP R/3 Release 4.6 onwards (might work for earlier versions as well, but

More information

Routines in SAP BI 7.0 Transformations

Routines in SAP BI 7.0 Transformations Routines in SAP BI 7.0 Transformations Applies to: SAP BI 7.0. For more information, visit the Business Intelligence homepage. Summary This paper gives an overview about the different routines available

More information

Creation of Sets in SAP-ABAP, How to Read them INI SAP-ABAP Reports

Creation of Sets in SAP-ABAP, How to Read them INI SAP-ABAP Reports Creation of Sets in SAP-ABAP, How to Read them INI SAP-ABAP Reports Applies to: This Article is intended for all those ABAPers who are interested in creating SAP-SETS and use them in ABAP. For more information,

More information

Easy Lookup in Process Integration 7.1

Easy Lookup in Process Integration 7.1 Easy Lookup in Process Integration 7.1 Applies to: SAP NetWeaver Process Integration 7.1 For more information, visit the SOA Management homepage. Summary Unlike previous version of PI (7.0) / XI (3.0,

More information

Program to Find Where used List of a Query for Web Template (3.5), Work Books and RRI

Program to Find Where used List of a Query for Web Template (3.5), Work Books and RRI Program to Find Where used List of a Query for Web Template (3.5), Work Books and RRI Applies to: SAP BW (3.5) / SAP BI(7.0) For more information, visit Business Intelligence Homepage. Summary This article

More information

Reporting Duplicate Entries

Reporting Duplicate Entries Applies to: SAP BI 7.0 and above. For more information, visit the Business Intelligence Homepage. Summary It is a common reporting requirement to display duplicate entries based on a characteristic. This

More information

Selection-Screen Design

Selection-Screen Design Applies To: SAP R/3, ABAP/4 Summary This program illustrates some of the selection-screen design features, simple use of field symbols and the various events associated with a report program. And one good

More information

SAP BW Copy Existing DTP for Data Targets

SAP BW Copy Existing DTP for Data Targets SAP BW Copy Existing DTP for Data Targets Applies to: SAP BI Consultants with ABAP Knowledge. For more information, visit the EDW HomePage. Summary Copy existing DTP to a new one in not possible in SAP

More information

To Check the Files/Reports in Application Server and Trigger Mail Alerts

To Check the Files/Reports in Application Server and Trigger Mail Alerts To Check the Files/Reports in Application Server and Trigger Mail Alerts Applies to: SAP BW 3.0b, SAP BW 3.5, Will also work on SAP BI 7 For more information, visit the Business Intelligence homepage Summary

More information

Applies To:...1. Summary...1. Table of Contents...1. Procedure..2. Code... Error! Bookmark not defined.0

Applies To:...1. Summary...1. Table of Contents...1. Procedure..2. Code... Error! Bookmark not defined.0 Applies To: Usage of Table Control in ABAP Summary Normally we use wizard if we are working with table control. This document helps us how to create a table control without using a wizard and how to manipulate

More information

SDN Community Contribution

SDN Community Contribution SDN Community Contribution (This is not an official SAP document.) Disclaimer & Liability Notice This document may discuss sample coding or other information that does not include SAP official interfaces

More information

Step by Step Guide to Creating a Process Type to Close an Open Request in a Cube in BI 7.0

Step by Step Guide to Creating a Process Type to Close an Open Request in a Cube in BI 7.0 Step by Step Guide to Creating a Process Type to Close an Open Request in a Cube in BI 7.0 Applies to: SAP BI 7.0. For more information, visit the Business Intelligence homepage. Summary You want to create

More information

SDN Community Contribution

SDN Community Contribution SDN Community Contribution (This is not an official SAP document.) Disclaimer & Liability Notice This document may discuss sample coding or other information that does not include SAP official interfaces

More information

Using Customer Exit Variables in BW/BI Reports: Part - 4

Using Customer Exit Variables in BW/BI Reports: Part - 4 Using Customer Exit Variables in BW/BI Reports: Part - 4 Applies to: SAP NetWeaver Business Warehouse (Formerly BI), Will also work on SAP BI 3.5. Business Intelligence homepage. Summary This article gives

More information

Procedure to Trigger Events in Remote System Using an ABAP Program

Procedure to Trigger Events in Remote System Using an ABAP Program Procedure to Trigger Events in Remote System Using an ABAP Program Applies to: SAP BW 3.x, SAP BI 7.x, SAP ECC, APO Systems. Summary This document gives the procedure to trigger events in a Remote System

More information

POWL: Infoset Generation with Web Dynpro ABAP

POWL: Infoset Generation with Web Dynpro ABAP POWL: Infoset Generation with Web Dynpro ABAP Applies to: WebDynpro ABAP Developer. For more information, visit the Web Dynpro ABAP homepage. Summary: This document explains how to create an Infoset, generate

More information

Customizing Characteristic Relationships in BW-BPS with Function Modules

Customizing Characteristic Relationships in BW-BPS with Function Modules Customizing Characteristic Relationships in BW-BPS with Function Modules Applies to: BW-BPS (Ver. 3.5 and BI 7.0) SEM-BPS (Ver 3.2 onwards) Summary This paper discusses the definition of a exit type characteristic

More information

Using Customer Exit Variables in BW/BI Reports: Part - 14

Using Customer Exit Variables in BW/BI Reports: Part - 14 Using Customer Exit Variables in BW/BI Reports: Part - 14 Applies to: SAP NetWeaver Business Warehouse (Formerly BI), Will also work on SAP BI 3.5. EDW homepage. Summary This article gives clear picture

More information

Integration of Web Dynpro for ABAP Application in Microsoft Share Point Portal

Integration of Web Dynpro for ABAP Application in Microsoft Share Point Portal Integration of Web Dynpro for ABAP Application in Microsoft Share Point Portal Applies to: Web Dynpro ABAP. Summary This tutorial explains how to display Web Dynpro ABAP Application in Microsoft Share

More information

Dynamically Enable / Disable Fields in Table Maintenance Generator

Dynamically Enable / Disable Fields in Table Maintenance Generator Dynamically Enable / Disable Fields in Table Maintenance Generator Applies to: SAP ABAP. For more information, visit the ABAP homepage. Summary This article demonstrates on how to Enable / Disable fields

More information

Linking Documents with Web Templates

Linking Documents with Web Templates Linking Documents with Web Templates Summary This article explains certain ways to link documents with our Web-Templates which is a useful way of attaching information with a query. When the enduser runs

More information

Easy Application Integration: How to use the Records Management Call Handler Framework

Easy Application Integration: How to use the Records Management Call Handler Framework Easy Application Integration: How to use the Records Management Call Handler Framework Applies to: SAP NetWeaver > 7.0 For more information, visit the Data Management and Integration homepage. Summary

More information

SAP BW - PSA/Change Log Deletion Governance

SAP BW - PSA/Change Log Deletion Governance SAP BW - PSA/Change Log Deletion Governance Applies to: SAP Net Weaver 2004s BI 7.0 Ehp1 SP 05. For more information, visit EDW homepage Summary This article suggests importance of PSA/Change log deletion

More information

Step by Step Guide to Enhance a Data Source

Step by Step Guide to Enhance a Data Source Step by Step Guide to Enhance a Data Source Applies to: SAP BI 7.0. For more information, visit the Business Intelligence homepage Summary This article provides a step by step guide to enhance a Standard

More information

Function Module to Create Logo

Function Module to Create Logo Applies To: SAP 4.0-4.7 Summary Utilities Function Module to create a Logo on a Custom Control Container. By: Arpit Nigam Company and Title: Hexaware Tech. Ltd., SAP Consultant Date: 26 Sep 2005 Table

More information

MDM Syndicator: Custom Items Tab

MDM Syndicator: Custom Items Tab MDM Syndicator: Custom Items Tab Applies to: SAP NetWeaver Master Data Management (MDM) SP04, SP05 and SP06. For more information, visit the Master Data Management homepage. Summary This article provides

More information

Download SAP Query Output to Local/ Network Folders in Background

Download SAP Query Output to Local/ Network Folders in Background Download SAP Query Output to Local/ Network Folders in Background Applies to: SAP release where SQUE0001 enhancement (SMOD) available For more information, visit the ABAP homepage. Summary This article

More information

Using Radio Buttons in Web Template

Using Radio Buttons in Web Template Using Radio Buttons in Web Template Applies to: SAP BW 3.5. For more information, visit the Business Intelligence homepage. Summary One of the ideal requirements in the BW Web Reporting is the user wants

More information

SDN Community Contribution

SDN Community Contribution SDN Community Contribution (This is not an official SAP document.) Disclaimer & Liability Notice This document may discuss sample coding or other information that does not include SAP official interfaces

More information

ABAP Code - Recipients (Specific Format) SAP BW Process Chain

ABAP Code -  Recipients (Specific Format) SAP BW Process Chain ABAP Code - Email Recipients (Specific Format) SAP BW Process Chain Applies to: This article is applicable to all the SAP BI consultants who are accustomed with SAP ABAP skills. For more information, visit

More information

Graphical Mapping Technique in SAP NetWeaver Process Integration

Graphical Mapping Technique in SAP NetWeaver Process Integration Graphical Mapping Technique in SAP NetWeaver Process Integration Applies to: SAP NetWeaver XI/PI mappings. For more information, visit the Repository-based Modeling and Design homepage. Summary This guide

More information

Offsetting Account Description in FBL3N & FAGLL03 GL Line Item Display Reports

Offsetting Account Description in FBL3N & FAGLL03 GL Line Item Display Reports Offsetting Account Description in FBL3N & FAGLL03 GL Line Item Display Reports Applies to: Organizations using SAP which need an additional field to be displayed in FBL3N & FAGLL03 reports. Below configuration

More information

About ITAB Duplicate_Key (SAP lrsaods) Runtime Error

About ITAB Duplicate_Key (SAP lrsaods) Runtime Error About ITAB Duplicate_Key (SAP lrsaods) Runtime Error Applies to: SAP NetWeaver BW 3.x.For more information, visit the Business Intelligence homepage. Summary This article explains about the Runtime Error

More information

SMT (Service Mapping Tool)

SMT (Service Mapping Tool) Applies to: This document applies to SAP versions ECC 6.0. For more information, visit the ABAP homepage. Summary This article contains the guidelines for using the SMT (Service mapping Tool) Mapping.

More information

ABAP Program to Read/Populate Selection Screen Parameters Dynamically

ABAP Program to Read/Populate Selection Screen Parameters Dynamically ABAP Program to Read/Populate Selection Screen Parameters Dynamically Applies to: SAP 4.6c Summary The main purpose of this article is to focus on dynamic read and dynamic population of selection screen

More information

Custom Process types Remote Trigger and End Time

Custom Process types Remote Trigger and End Time SDN Contribution Custom Process types Remote Trigger and End Time Applies to: SAP BW 3.1C and Above. Summary Development 1: We sometimes have loads in our process chains whose status and runtime don t

More information

Exposing the XI monitoring functionality as a Web Service

Exposing the XI monitoring functionality as a Web Service Exposing the XI monitoring functionality as a Web Service Applies to: SAP Exchange Infrastructure (SAP NetWeaver Process Integration 7.0) Summary The document shows you a way to fetch the XI monitoring

More information

Combining Multiple Smartform Outputs Into One PDF File

Combining Multiple Smartform Outputs Into One PDF File SDN Contribution Combining Multiple Smartform Outputs Into One PDF File Applies to: SAP R/3 46C ABAP / SMARTFORMS Summary This program code would help those who want to combine multiple smartform outputs

More information

DB Connect with Delta Mechanism

DB Connect with Delta Mechanism Applies to: SAP BI/BW. For more information, visit the EDW homepage Summary This Article demonstrates the steps for handling Delta mechanism with Relational Database Management System (RDBMS) like SQL,

More information

ABAP Code Sample to Report IDOCs in Error

ABAP Code Sample to Report IDOCs in Error Applies To: SAP 4.6 C and SAP 4.7 Enterprise Edition Summary This report displays all the error IDOCs for both INBOUND and OUTBOUND based on message type, it also having a provision to drill down the number

More information

Implementing a BAdI in an Enhancement Project (CMOD)

Implementing a BAdI in an Enhancement Project (CMOD) Applies To: SAP R3 v4.70, however can be adapted for other releases, including Netweaver 2004 v7. Summary This tutorial explains how to implement a Business Add In (BAdI), in a Customer Modification CMOD,

More information

SDN Community Contribution

SDN Community Contribution SDN Community Contribution (This is not an official SAP document.) Disclaimer & Liability Notice This document may discuss sample coding or other information that does not include SAP official interfaces

More information

This article explains the steps to create a Move-in letter using Print Workbench and SAPScripts.

This article explains the steps to create a Move-in letter using Print Workbench and SAPScripts. Applies to: SAP IS-Utilities 4.6 and above. Summary This article explains the steps to create a Move-in letter using Print Workbench and SAPScripts. Author: Company: Hiral M Dedhia L & T Infotech Ltd.

More information

Transfer Material Attributes (Material Type) from R/3 to SAP GRC Global Trade Services (GTS)

Transfer Material Attributes (Material Type) from R/3 to SAP GRC Global Trade Services (GTS) Transfer Material Attributes (Material Type) from R/3 to SAP GRC Global Trade Services (GTS) Applies to: This article and examples applies to ECC 6 and Global Trade System - SLL 7.0 and 7.1 Versions. For

More information

ABAP Code Sample to Attach F1 and F4 Help Fields in ALV Grid

ABAP Code Sample to Attach F1 and F4 Help Fields in ALV Grid ABAP Code Sample to Attach F1 and F4 Help Fields in ALV Grid Code samples are intended for educational use only, not deployment They are untested and unsupported by SAP SAP disclaims all liability to any

More information

Material Listing and Exclusion

Material Listing and Exclusion Material Listing and Exclusion Applies to: Applies to ECC 6.0. For more information, visit the Enterprise Resource Planning homepage Summary This document briefly explains how to restrict customers from

More information

Implementing Customer Exit Reporting Variables as Methods

Implementing Customer Exit Reporting Variables as Methods Implementing Customer Exit Reporting Variables as Methods Applies to: SAP BI 7.0 For more information, visit the Business Intelligence homepage. Summary This article describes how we can implement customer

More information

Freely Programmed Help- Web Dynpro

Freely Programmed Help- Web Dynpro Freely Programmed Help- Web Dynpro Applies to: SAP ABAP Workbench that supports Web dynpro development. For more information, visit the Web Dynpro ABAP homepage. Summary In addition to the Dictionary Search

More information

A Step-by-Step Guide on IDoc-ALE between Two SAP Servers

A Step-by-Step Guide on IDoc-ALE between Two SAP Servers A Step-by-Step Guide on IDoc-ALE between Two SAP Servers Applies to: All modules of SAP where data need to transfer from one SAP System to another SAP System using ALE IDoc Methodology. For more information,

More information

Extractor for Multi Value Class Characteristic Values using Function Module

Extractor for Multi Value Class Characteristic Values using Function Module Extractor for Multi Value Class Characteristic Values using Function Module Applies to: SAP BI 7.0, BW 3.5. For more information, visit the EDW homepage. Summary This article explains how to develop generic

More information

How to Create and Schedule Publications from Crystal Reports

How to Create and Schedule Publications from Crystal Reports How to Create and Schedule Publications from Crystal Reports Applies to: SAP BusinessObjects Enterprise. For more information, visit the Business Objects homepage. Summary This white paper describes how

More information

Working with Dynamic Tables in Interactive Adobe Forms and WebDynpro ABAP

Working with Dynamic Tables in Interactive Adobe Forms and WebDynpro ABAP Working with Dynamic Tables in Interactive Adobe Forms and WebDynpro ABAP Applies to: Adobe Live Cycle Designer 8.0- Web Dynpro ABAP Summary This article would help ABAP developers, who are faced with

More information

Material Master Extension for New Plant

Material Master Extension for New Plant Material Master Extension for New Plant Applies to: SAP ECC 6.0. For more information, visit the ABAP homepage. Summary There is a need of extending the material of an existing plant in a company code

More information

Developing Crystal Reports on SAP BW

Developing Crystal Reports on SAP BW Developing Crystal Reports on SAP BW Applies to: SAP BusinessObjects Crystal Reports. Summary This white paper explores various methods of accessing SAP BW data through Crystal Reports. Author: Arka Roy

More information

MDM Import Manager - Taxonomy Data (Attribute Text Values) Part 3

MDM Import Manager - Taxonomy Data (Attribute Text Values) Part 3 MDM Import Manager - Taxonomy Data (Attribute Text Values) Part 3 Applies to: SAP NetWeaver Master Data Management (MDM) SP3, SP4, SP5. Summary This article provides a step-by-step procedure for manually

More information

Open Text DocuLink Configuration - To Access Documents which are Archived using SAP

Open Text DocuLink Configuration - To Access Documents which are Archived using SAP Open Text DocuLink Configuration - To Access Documents which are Archived using SAP Applies to: Open Text DocuLink for SAP Solutions 9.6.2. For more information, visit http://www.opentext.com Summary Open

More information

Validity Table in SAP BW/BI

Validity Table in SAP BW/BI Applies to: Applicable for SAP BI 3.x and above Summary To maintain the cubes non cumulative Key figures. Author: Om Ambulker Company: Cognizant, Pune Created on: 15 July 2011 Author Bio Om Ambulker is

More information

How to Create and Execute Dynamic Operating System Scripts With XI

How to Create and Execute Dynamic Operating System Scripts With XI Applies To: SAP Exchange Infrastructure 3.0, SP 15, Integration Repository and Directory Summary This document describes how to create, store and execute a non static operating command script. In this

More information

Exception Handling in Web Services exposed from an R/3 System

Exception Handling in Web Services exposed from an R/3 System Exception Handling in Web Services exposed from an R/3 System Applies to: SAP WAS 6.2 onwards Summary We expose an RFC enabled function module as web service in R/3. While creating the function module,

More information

SDN Community Contribution

SDN Community Contribution SDN Community Contribution (This is not an official SAP document.) Disclaimer & Liability Notice This document may discuss sample coding or other information that does not include SAP official interfaces

More information

Creating, Configuring and Testing a Web Service Based on a Function Module

Creating, Configuring and Testing a Web Service Based on a Function Module Creating, Configuring and Testing a Web Service Based on a Function Module Applies to: SAP EC6 6.0/7.0. For more information, visit the Web Services homepage. Summary The article describes how to create

More information

Open Hub Destination - Make use of Navigational Attributes

Open Hub Destination - Make use of Navigational Attributes Open Hub Destination - Make use of Navigational Attributes Applies to: SAP BI 7.0. For more information visit the Enterprise Data Warehousing Summary This paper tells about usage of Open Hub Destination

More information

Recreating BIA Indexes to Address the Growth of Fact Index Table

Recreating BIA Indexes to Address the Growth of Fact Index Table Recreating BIA Indexes to Address the Growth of Fact Index Table Applies to: Software Component: SAP_BW.Release: 700 BIA version: 53 Summary In this article we would learn the application of recreating

More information

How to Attach Documents to Any Custom Program Using Generic Object Services

How to Attach Documents to Any Custom Program Using Generic Object Services SDN Contribution How to Attach Documents to Any Custom Program Using Generic Object Services Applies to: SAP R/3 4.6C Summary This sample code describes the steps needed to easily add file attachment feature

More information

Customized Transaction to Trigger Process Chain from Failed Step

Customized Transaction to Trigger Process Chain from Failed Step Customized Transaction to Trigger Process Chain from Failed Step Applies to: SAP BW 3.x & SAP BI NetWeaver 2004s. For more information, visit the Business Intelligence homepage. Summary There are multiple

More information

Tracking Zero Record Loads

Tracking Zero Record Loads Applies To: SAP BW 3.0 and Above. Summary Sometimes when we extract data from source systems such as R3, flat files, or databases, we see the load finish successfully but deliver no new records to BW.

More information

Custom BADI Using Function Module UJQ_RUN_AXIS_QUERY

Custom BADI Using Function Module UJQ_RUN_AXIS_QUERY Custom BADI Using Function Module UJQ_RUN_AXIS_QUERY Applies to: SAP Business Planning and Consolidation for NetWeaver 7.0. Summary This Guide covers how to use Custom BADI and the functionality of the

More information

Step by Step Procedure for DSO Creation

Step by Step Procedure for DSO Creation Step by Step Procedure for DSO Creation Applies to: SAP BI 7.0. For more information, visit the EDW homepage. Summary This article discusses about the step by step procedure for creating a DSO. Author:

More information

How to use Boolean Operations in the Formula as Subsidiary for IF Condition

How to use Boolean Operations in the Formula as Subsidiary for IF Condition How to use Boolean Operations in the Formula as Subsidiary for IF Condition Applies to: SAP BW 3.5 & BI 7.0. For more information, visit the EDW homepage. Summary This paper will explain you how to use

More information

Restricting F4 (Input Help) Values While Running a SAP BW Query

Restricting F4 (Input Help) Values While Running a SAP BW Query Restricting F4 (Input Help) Values While Running a SAP BW Query Applies to: SAP BI 7.01 Summary This article briefs out the way to restrict F4 values (Input help values) while running a SAP BW query with

More information

Using Drop Down By Index in Table UI Element in WebDynpro ABAP

Using Drop Down By Index in Table UI Element in WebDynpro ABAP Using Drop Down By Index in Table UI Element in WebDynpro ABAP Applies to: Enterprise portal, ECC 6.0, Web Dynpro ABAP. For more information, visit the Web Dynpro ABAP homepage. Summary This article would

More information

A Simple Web Dynpro Application to Locate Employee s Location into Google Map

A Simple Web Dynpro Application to Locate Employee s Location into Google Map A Simple Web Dynpro Application to Locate Employee s Location into Google Map Applies to: SAP Net Weaver 7.0, ABAP. For more information, visit the Web Dynpro ABAP homepage. For more information, visit

More information

Explore to the Update Tab of Data Transfer Process in SAP BI 7.0

Explore to the Update Tab of Data Transfer Process in SAP BI 7.0 Explore to the Update Tab of Data Transfer Process in SAP BI 7.0 Applies to: SAP BI 2004s or SAP BI 7.x. For more information visit the Enterprise Data Warehousing. Summary This article will explain about

More information

Standalone BW System Refresh

Standalone BW System Refresh Applies to: Software Component: SAP_BW. For more information, visit the EDW homepage Summary BW relevant steps/scenarios during refresh of an existing non-productive BW system from productive BW system

More information

How to Default Variant Created for Report Developed In Report Painter/Writer

How to Default Variant Created for Report Developed In Report Painter/Writer How to Default Variant Created for Report Developed In Report Painter/Writer Applies to: Any business organization having reports developed using Report Painter/Report Writer. This is applicable from R/3

More information

SAP BI Global Report Variable user exit modularization

SAP BI Global Report Variable user exit modularization SAP BI Global Report Variable user exit modularization Applies to: SAP BI 7 Summary When designing a report, some requirements have certain complexity that lead to the creation of custom exit code global

More information

Add /Remove Links on ESS Home Page in Business Package 1.5

Add /Remove Links on ESS Home Page in Business Package 1.5 Add /Remove Links on ESS Home Page in Business Package 1.5 Applies to: SAP ECC EHP5. For more information, visit the Enterprise Resource Planning homepage. Summary Customizing links on ESS Overview page

More information

Displaying SAP Transaction as Internet Application in Portal

Displaying SAP Transaction as Internet Application in Portal Displaying SAP Transaction as Internet Application in Portal Summary This article explains how we can display SAP transaction as Internet Application Components (IAC) in portal to make it simpler for the

More information

Step By Step: the Process of Selective Deletion from a DSO

Step By Step: the Process of Selective Deletion from a DSO Step By Step: the Process of Selective Deletion from a DSO Applies to: SAP NetWeaver BW. For more information, visit the EDW homepage. Summary Selective deletion from DSO refers to deleting specific values

More information

Data Extraction & DS Enhancement in SAP BI Step by Step

Data Extraction & DS Enhancement in SAP BI Step by Step Data Extraction & DS Enhancement in SAP BI Step by Step Applies to: SAP BI 7.0, SAP ABAP, For more information, visit the Business Intelligence homepage. Summary The objective of the article is to outline

More information

Limitation in BAPI Scheduling Agreement (SA) Create or Change

Limitation in BAPI Scheduling Agreement (SA) Create or Change Limitation in BAPI Scheduling Agreement (SA) Create or Change Applies to: SAP ECC 6.0.For more information, visit the ABAP homepage. Summary The article describes the limitations in standard SAP BAPIs

More information

Data Source Replication and Activation of Transfer Structures

Data Source Replication and Activation of Transfer Structures Data Source Replication and Activation of Transfer Structures Applies to: SAP Net Weaver BW. For more information, visit the EDW homepage Summary Detailed Documentation and practical implementation of

More information

MDM Syndication and Importing Configurations and Automation

MDM Syndication and Importing Configurations and Automation MDM Syndication and Importing Configurations and Automation Applies to: SAP MDM SP 05 Summary This document was written primarily for syndication and import of records into SAP NetWeaver MDM from different

More information

Complete Guide for Events in Workflows in SAP ECC 6.0

Complete Guide for Events in Workflows in SAP ECC 6.0 Complete Guide for Events in Workflows in SAP ECC 6.0 Applies to: SAP ECC 6.0 and upwards Summary This tutorial covers the basics of events and their properties. It also covers adding events to Business

More information

Adding Custom Fields to Contract Account Screen

Adding Custom Fields to Contract Account Screen Adding Custom Fields to Contract Account Screen Applies to: This article applies to ISU-FICA & ABAP. For more information, visit the ABAP homepage. Summary This article explains how to add custom fields

More information

Reading Enhanced DataSource fields for the Remote Cube

Reading Enhanced DataSource fields for the Remote Cube Reading Enhanced DataSource fields for the Remote Cube Applies to: SAP BI 7.0. For more information, visit the EDW homepage. Summary SAP Remote Cube does not display the enhanced fields in the data source.

More information

How to Display Result Row in One Line While Reporting On Multiproviderer

How to Display Result Row in One Line While Reporting On Multiproviderer How to Display Result Row in One Line While Reporting On Multiproviderer Applies to: SAP BW 3.x, BI 7.0 developers and Reporting Users. For more information, visit the Business Intelligence home page Summary

More information

qwertyuiopasdfghjklzxcvbnmqwertyui opasdfghjklzxcvbnmqwertyuiopasdfgh jklzxcvbnmqwertyuiopasdfghjklzxcvb nmqwertyuiopasdfghjklzxcvbnmqwer

qwertyuiopasdfghjklzxcvbnmqwertyui opasdfghjklzxcvbnmqwertyuiopasdfgh jklzxcvbnmqwertyuiopasdfghjklzxcvb nmqwertyuiopasdfghjklzxcvbnmqwer qwertyuiopasdfghjklzxcvbnmqwertyui opasdfghjklzxcvbnmqwertyuiopasdfgh jklzxcvbnmqwertyuiopasdfghjklzxcvb nmqwertyuiopasdfghjklzxcvbnmqwer ABAP Interview Questions & Answers Set 4 tyuiopasdfghjklzxcvbnmqwertyuiopas

More information

How to Write Inverse Routine with Expert Routine

How to Write Inverse Routine with Expert Routine How to Write Inverse Routine with Expert Routine Applies to: Development and support based on SAP BI 7.0 For more information, visit the Business Intelligence homepage. Summary The article shows the example

More information

Table Row Popup in Web Dynpro Component

Table Row Popup in Web Dynpro Component Table Row Popup in Web Dynpro Component Applies to Web Dynpro for ABAP, NW 7.0. For more information, visit the Web Dynpro ABAP homepage. Summary This document helps to create Table Rowpopin in a Web Dynpro

More information

Step by Step Guide for PI Server Start and Stop Procedure

Step by Step Guide for PI Server Start and Stop Procedure Step by Step Guide for PI Server Start and Stop Procedure Applies to: This document applies to PI 7.0 and 7.1 and above. For more information, visit the Application Management homepage. Summary This document

More information

How to Create Top of List and End of List of the ALV Output in Web Dynpro for ABAP

How to Create Top of List and End of List of the ALV Output in Web Dynpro for ABAP How to Create Top of List and End of List of the ALV Output in Web Dynpro for ABAP Applies to: SAP Netweaver 2004S: Web Dynpro for ABAP. For more information, visit the User Interface Technology homepage.

More information

Working with Tabstrip in Webdynpro for ABAP

Working with Tabstrip in Webdynpro for ABAP Working with Tabstrip in Webdynpro for ABAP Applies to: SAP ECC 6.0 (Release 700, SP 12). For more information, visit the Web Dynpro ABAP homepage.. Summary This tutorial explains about Step-By-Step procedure

More information

SDN Community Contribution

SDN Community Contribution SDN Community Contribution (This is not an official SAP document.) Disclaimer & Liability Notice This document may discuss sample coding or other information that does not include SAP official interfaces

More information

Extraction of Hierarchy into Flat File from R/3 and Loading in BW System

Extraction of Hierarchy into Flat File from R/3 and Loading in BW System Extraction of Hierarchy into Flat File from R/3 and Loading in BW System Applies to: This article applies to SAP R/3 (any version) and SAP B/W (any version).for more information, visit the Business Intelligence

More information

E-Sourcing System Copy [System refresh from Production to existing Development]

E-Sourcing System Copy [System refresh from Production to existing Development] E-Sourcing System Copy [System refresh from Production to existing Development] Applies to: SAP Netweaver 7.0 and E-Sourcing 5.1/CLM 2.0 Summary This document discusses about the steps to do an E-Sourcing

More information

Maintaining Roles and Authorizations in BI7.0 - RSECADMIN

Maintaining Roles and Authorizations in BI7.0 - RSECADMIN Maintaining Roles and Authorizations in BI7.0 - RSECADMIN Applies to: SAP Business Intelligence 7.0. For more information, visit the Business Intelligence homepage. Summary This paper will take you through

More information