6
Hicron /// Technical Supremacy Change Document Display

Change document display

Embed Size (px)

Citation preview

Page 1: Change document display

Hicron /// Technical Supremacy

Change Document Display

Page 2: Change document display

Hicron /// Technical Supremacy

Change Document DisplayNote that:

• Selection is not narrowed

• At the root tree is „Unassigned Attribute”

• Item ID’s are a set of numbers

• There’s no label of documents on output list

Page 3: Change document display

Hicron /// Technical Supremacy

Change Documents Display: CustomizingConfiguration allows to display object keys (and more) in the user-friendly way

Customizing (SM34): • Basic Definition

VC_TBANK_CD_LP (IMG act. _GTF_CHD_RANGE_ATTR)• Change Document Tool: Settings by the Application Developer

VC_TBANK_CD_DV (IMG act. _GTF_CHD_DEFINE_OBJ)

IMG activities: • Contain documentation• Can be used in own customizing tree

Page 4: Change document display

Hicron /// Technical Supremacy

Developer Customizing: Sales Document

1. Define FM to create text for current object ID

Hint: code tempate for generic text in SCN blog

Start developer customizing: SM34 VC_TBANK_CD_DV

2. Define FM to create text for object keyHint: code template for generic parsing of object key (e.g. 8000000014384000030 Sales Document 14384 Item 30)

3. Advanced optionsReplace Field Texts, Group Fields, etc.Not needed in most applications.

Page 5: Change document display

Hicron /// Technical Supremacy

Example: How to useTo run Change Document Display:

  CALL FUNCTION 'BANK_API_CHDOC_DISPLAY'    EXPORTING      i_tab_objectid                =  lt_objectid      i_applicationid               =  sy-repid    EXCEPTIONS      not_qualified                 = 1      no_change_document_found      = 2      internal_error                = 3      system_error                  = 4      OTHERS                        = 5    .  IF sy-subrc <> 0.*   Handle exception  ENDIF. And… that’s all

   APPEND INITIAL LINE TO lt_objectid ASSIGNING <ls_objectid>.   <ls_objectid>-objectclas = 'VERKBELEG'.   <ls_objectid>-objectid = <lv_vbeln>.

Page 6: Change document display

Hicron /// Technical Supremacy

Thank you

Radosław [email protected]