Document changes report

Create a new report to display contract document changes
I got an assignment to create a new report which must show the document changes in Functional Areas SD
Requirements are
1. create customised report that will allow them to list the changes made in contract documents with more
ranges options on the report selection parameters
Basically this customised report will retrive all the changes made in sales contract documents within a plant,date ranges and other selection parameters.
Testing scenarios
Test 1 : create a new contract document. Make changes to the contract line item information such as order qty, add in a new line item , apply rejection code, etc.
The report layout must shows
Sales offcie from __________ to __________
contract document number from ______________ to ______________
change Date from _______________ to __________________
change by < username >
Contract Doument Number
DATE                     Changes (Header Item)               old value          new value        user
<sales Office code >     < Sales_office_Description>
+ 400000600
  08/10/2007             Customer purchase order date         00/00/0000        08/10/2007         user01
  09/10/2007             10 Item credit price                 330.00            323.40             user02
  09/10/2007             30 Reason for rejection of
                         quotations and sales order                                                     
+ 400000601    
  08/10/2007             Customer Purchase order              XYZ-111           ABC-123            USER03
  08/10/2007             10 Item credit price                 100.00            95.50 AUD          USER03
Like above whoever made changes for the document the report must display as above
can anyone help me or give idea how to proceed with the codes
regards
Piroz

Hey Ashish
Below is the report for document changes for 2 tables CDPOS, CDHDR
I need some modification for how to add the ranges
Plant from ________ to ___________
Udate from __________ to ___________-
Document No from ________ to __________
Change date from ____________ to _____________
username by __________
If i don't enter anything the it should display all the records esle the ranges defined.
I even want to add plant code from and to but not getting idea from which table it has to be taken? I want this to be display in ALV Gride format too.
Please could anyone help me in modification please urgent.........v urgent
REPORT ZCHGDOC.
TABLES: CDHDR,
         CDPOS.
DATA: BEGIN OF itab occurs 0,
UDATE TYPE sy-datum,
end of itab.
SELECT-OPTIONS udate for sy-datum .
SELECTION-SCREEN BEGIN OF BLOCK DOCUMENT WITH FRAME TITLE TEXT-701.
PARAMETER: CHANGENR LIKE CDHDR-CHANGENR.
SELECTION-SCREEN END OF BLOCK DOCUMENT.
END-OF-SELECTION.
   DATA: BEGIN OF IT_CDHDR OCCURS 0,
           OBJECTCLAS LIKE CDHDR-OBJECTCLAS,
           OBJECTID LIKE CDHDR-OBJECTID,
           CHANGENR LIKE CDHDR-CHANGENR,
           USERNAME LIKE CDHDR-USERNAME,
           UDATE LIKE CDHDR-UDATE,
           UTIME LIKE CDHDR-UTIME,
           VALUE_NEW LIKE CDPOS-VALUE_NEW,
           VALUE_OLD LIKE CDPOS-VALUE_OLD,
   END OF IT_CDHDR.
   DATA: WA LIKE LINE OF IT_CDHDR.
DATA: WA LIKE LINE OF IT_CDPOS.
   DATA: BEGIN OF IT_CDPOS OCCURS 0,
           OBJECTCLAS LIKE CDHDR-OBJECTCLAS,
           OBJECTID LIKE CDHDR-OBJECTID,
           CHANGENR LIKE CDHDR-CHANGENR,
           TABNAME LIKE CDPOS-TABNAME,
           FNAME LIKE CDPOS-FNAME,
           VALUE_NEW LIKE CDPOS-VALUE_NEW,
           VALUE_OLD LIKE CDPOS-VALUE_OLD,
   END OF IT_CDPOS.
SELECT OBJECTCLAS
        OBJECTID
        CHANGENR
        USERNAME
        UDATE
        UTIME INTO CORRESPONDING FIELDS OF TABLE IT_CDHDR
        FROM CDHDR
        WHERE OBJECTCLAS = 'VERKBELEG'.
        IF IT_CDHDR[] IS NOT INITIAL.
   SELECT OBJECTCLAS
          OBJECTID
          CHANGENR
          VALUE_NEW
          VALUE_OLD
          FNAME
          TABNAME
          INTO CORRESPONDING FIELDS OF TABLE IT_CDPOS FROM CDPOS
          FOR ALL ENTRIES IN IT_CDHDR
          WHERE
          OBJECTCLAS = IT_CDHDR-OBJECTCLAS
          AND OBJECTID = IT_CDHDR-OBJECTID
          AND CHANGENR = IT_CDHDR-CHANGENR.
   SORT IT_CDPOS BY OBJECTCLAS OBJECTID CHANGENR.
ENDIF.
Add tables CDPOS DATA TO CDHDR.
DATA: INDEX TYPE i.
LOOP AT IT_CDHDR.
INDEX = SY-TABIX.
READ TABLE IT_CDPOS WITH KEY OBJECTCLAS = IT_CDHDR-OBJECTCLAS
OBJECTID = IT_CDHDR-OBJECTID
CHANGENR = IT_CDHDR-CHANGENR BINARY SEARCH.
IF SY-SUBRC = 0.
IT_CDHDR-VALUE_NEW = IT_CDPOS-VALUE_NEW.
IT_CDHDR-VALUE_OLD = IT_CDPOS-VALUE_OLD.
MODIFY IT_CDHDR INDEX index TRANSPORTING value_new value_old.
ENDIF.
LOOP AT IT_CDHDR INTO WA.
     WRITE:  WA-OBJECTID.
     WRITE:  / WA-UDATE,WA-CHANGENR,WA-USERNAME,WA-VALUE_NEW,WA-VALUE_OLD.
WRITE: / WA-CHANGENR,WA-VALUE_NEW,WA-VALUE_OLD.
ENDLOOP.
ENDLOOP.

Similar Messages

  • Joining vbak to cdhdr table for document changes

    Hi Expert
    I am hanging for a week in this project please need some advice
    I want to join vbak table with cdhdr and select
    vbak.vkbur (plant) and want to show that vkbur in the internal table of it_cdhdr
    so as to select only those plant belong to vkbur so how can I join base on the below coding................
    REPORT ZCHGDOC
    NO STANDARD PAGE HEADING LINE-SIZE 120.
    WRITE: sy-title, 40 'Page', sy-pagno.
    ULINE.
    TABLES: CDHDR,
             CDPOS,
             t001w,
             "VKBUR,
             "VBELN,
             VBAK,
             VBAP.
    SELECTION-SCREEN BEGIN OF BLOCK DOCUMENT WITH FRAME TITLE TEXT-701.
    SELECTION-SCREEN END OF BLOCK DOCUMENT.
    SELECT-OPTIONS:
                     V1 FOR VBAK-VKBUR,
                     S_WERKS for T001W-werks,
                     objectid for  cdhdr-objectid,
                     udate for cdhdr-udate.
    PARAMETER: USERNAME LIKE CDHDR-USERNAME.
    DATA: BEGIN OF IT_VBAP OCCURS 0,
             OBJECTCLAS LIKE CDHDR-OBJECTCLAS,
             OBJECTID LIKE CDHDR-OBJECTID,
             VBELN LIKE VBAP-VBELN,
              END OF IT_VBAP.
    DATA: BEGIN OF IT_CDHDR OCCURS 0,
             OBJECTCLAS LIKE CDHDR-OBJECTCLAS,
             OBJECTID LIKE CDHDR-OBJECTID,
             CHANGENR LIKE CDHDR-CHANGENR,
             USERNAME LIKE CDHDR-USERNAME,
             UDATE LIKE CDHDR-UDATE,
             UTIME LIKE CDHDR-UTIME,
             FNAME LIKE CDPOS-FNAME,
             TABNAME LIKE CDPOS-TABNAME,
             TABKEY LIKE CDPOS-TABKEY,
             VALUE_NEW LIKE CDPOS-VALUE_NEW,
             VALUE_OLD LIKE CDPOS-VALUE_OLD,
    END OF IT_CDHDR.
    DATA: WA LIKE LINE OF IT_CDHDR.
    DATA: WA LIKE LINE OF IT_CDPOS.
    DATA: BEGIN OF IT_CDPOS OCCURS 0,
             OBJECTCLAS LIKE CDHDR-OBJECTCLAS,
             OBJECTID LIKE CDHDR-OBJECTID,
             CHANGENR LIKE CDHDR-CHANGENR,
             TABNAME LIKE CDPOS-TABNAME,
             TABKEY LIKE CDPOS-TABKEY,
             FNAME LIKE CDPOS-FNAME,
             VALUE_NEW LIKE CDPOS-VALUE_NEW,
             VALUE_OLD LIKE CDPOS-VALUE_OLD,
    END OF IT_CDPOS.
    Move-corresponding it_cdhdr to wa.
    Move-corresponding it_cdpos to wa.
    SELECT OBJECTCLAS
            OBJECTID
            CHANGENR
            USERNAME
            UDATE
            UTIME FROM CDHDR
            INTO CORRESPONDING FIELDS OF TABLE IT_CDHDR
    WHERE OBJECTCLAS = 'VERKBELEG' or
          objectclas = 'BETRIEB'
          ORDER BY UDATE.
    WHERE OBJECTCLAS = 'VERKBELEG'
    OR OBJECTCLAS = 'BETRIEB' ORDER BY UDATE.
    Filter data based upon Plant selection criteria.
    IF NOT S_WERKS[] IS INITIAL.
    DELETE IT_CDHDR WHERE NOT OBJECTID IN S_WERKS.
    ENDIF.
    IF IT_CDHDR[] IS NOT INITIAL.
       SELECT OBJECTCLAS
              OBJECTID
              CHANGENR
              VALUE_NEW
              VALUE_OLD
              FNAME
              TABNAME
              TABKEY
              FROM CDPOS
              INTO CORRESPONDING FIELDS OF TABLE IT_CDPOS
              FOR ALL ENTRIES IN IT_CDHDR
              WHERE
              OBJECTCLAS = IT_CDHDR-OBJECTCLAS
              AND OBJECTID = IT_CDHDR-OBJECTID
              AND CHANGENR = IT_CDHDR-CHANGENR.
              "or tabname = 'VBAP'.
       SORT IT_CDPOS BY OBJECTCLAS OBJECTID CHANGENR.
    ENDIF.
    Add tables CDPOS DATA TO CDHDR.
    DATA: INDEX TYPE i.
    LOOP AT IT_CDHDR.
       INDEX = SY-TABIX.
       READ TABLE IT_CDPOS WITH KEY OBJECTCLAS = IT_CDHDR-OBJECTCLAS
       OBJECTID = IT_CDHDR-OBJECTID
       CHANGENR = IT_CDHDR-CHANGENR BINARY SEARCH.
       IF SY-SUBRC = 0.
         IT_CDHDR-VALUE_NEW = IT_CDPOS-VALUE_NEW.
         IT_CDHDR-VALUE_OLD = IT_CDPOS-VALUE_OLD.
         MODIFY IT_CDHDR INDEX index TRANSPORTING value_new value_old.
       ENDIF.
       WRITE:/ SY-DATUM,SY-UZEIT,
              50 'DOCUMENT CHANGE REPORT',
             80 'Page', SY-PAGNO,
    "  WRITE: / SY-REPID
              50 'DETAIL REPORT BY PLANT '.
       SKIP.
       ULINE.
    *& T O P - O F - P A G E *
    WRITE:/ 'UDATE:' ,SY-DATUM.
    FORMAT COLOR 4 INTENSIFIED on.
    Write: /35                           ' DOCUMENT CHANGES REPORT '.
       WRITE: /5 'DOCUMENT-NO'.
    20 'TABNAME', 30 'TEXT_CASE', 50 'FNAME'.
       WRITE: /5 'DATE',  20 'FNAME', 45 'CHANGE-NO',65 'OLD-VALUE',80 'NEW-VALUE',95 'USER-NAME'.
       ULINE.
       LOOP AT IT_CDHDR INTO WA.
       on change of wa-objectid.
       Write: / wa-objectid UNDER'DOCUMENT-NO' ."color col_key.
       ENDON.
    ULINE.
         " CDPOS-tabname UNDER'TABNAME', CDPOS-TEXT_CASE UNDER'TEXT_CASE',CDPOS-fname UNDER'FNAME'. "color col_key ,
         write: / wa-udate dd/mm/yyyy under'DATE' NO-GAP,wa-fname under'FNAME' NO-GAP,wa-changenr under 'CHANGE-NO',
         wa-value_old under'OLD-VALUE' LEFT-JUSTIFIED NO-GAP,
         wa-value_new under'NEW-VALUE' LEFT-JUSTIFIED NO-GAP ,wa-username under'USER-NAME' NO-GAP.
    ENDON.
    Move-corresponding it_cdhdr to wa.
    *Write: / wa-objectid UNDER'DOCUMENT-NO' "color col_key.
    *" CDPOS-tabname UNDER'TABNAME', CDPOS-TEXT_CASE UNDER'TEXT_CASE',CDPOS-fname UNDER'FNAME'. "color col_key ,
    *write: / wa-udate dd/mm/yyyy under'DATE' NO-GAP,wa-utime under'TIME' NO-GAP,wa-changenr under 'CHANGE-NO',
    ltrim(wa-value_old) under'OLD-VALUE' NO-GAP,
    *wa-value_new under'NEW-VALUE' NO-GAP ,wa-username under'USER-NAME' NO-GAP.
       ENDLOOP.
    ENDLOOP.

    Hai everybody.
    I am new to this forum. i got a job in abap recently. The below is my requirement.I want solution for this one. Anybody plz help me.
    The change logs were captured in DBTABLOG for table ZWPRFRUND (in transaction ZWPG).
    The only report which is currently used to get the change logs is RSVTPROT
    Now my requirement is,
    we need to display the change logs in the form of ALV.
    We should divert the changes to CDHDR table instead of DBTABLOG, then we can use the RSSCD100 to display change logs.
    The Important items for the change LOG needed in case of changes to table in “ZWPG” are,DATE ,TIME,USER,FIRST NAME,FILED NAME,OLD VALUE,NEW VALUE
    The above fields need to be displayed in the grid. In the above list “FIELD NAME” denotes any field of the table in the transaction in “ZWPG”
    Thanks & Regards,
    Sujatha.T.

  • Sales changes report modification

    Hi Gurus
    I have created this report for sales document and it is working fine in ALV , I want to make this report to change from ALV to a Printable format and the Header Note and Internal note are displaying very length, I want this to be in display in readable format for the management.
    Is there any way to modify this report please
    Thanks in advanced
    report z_order_changes no standard page heading
                              line-size 132.
    type-pools:
      slis.                     " ALV types
    tables:
      cdhdr,                    " Change documents: Header
      cdpos,                    " Change documents: Items
      vbak,                     " Sales order: Header
      vbap.                     " Sales order: Items
    types:
      begin of ty_cdhdr,
        objectclas like cdhdr-objectclas,     " Object class
        objectid   like cdhdr-objectid,       " Object value
        changenr   like cdhdr-changenr,       " Document change number
        username   like cdhdr-username,       " Changed by
        udate      like cdhdr-udate,          " Changed on
        utime      like cdhdr-utime,          " Changed at
        tcode      like cdhdr-tcode,          " Transaction code
      end of ty_cdhdr,
      ty_it_cdhdr type ty_cdhdr occurs 0,
      begin of ty_cdpos,
        objectclas like cdpos-objectclas,     " Object class
        objectid   like cdpos-objectid,       " Object value
        changenr   like cdpos-changenr,       " Document change number
        tabname    like cdpos-tabname,        " Table name
        tabkey     like cdpos-tabkey,         " Table key
        fname      like cdpos-fname,          " Field name
        chngind    like cdpos-chngind,        " Change indicator
        value_new  like cdpos-value_new,      " New value of field
        value_old  like cdpos-value_old,      " Old value of field
      end of ty_cdpos,
      ty_it_cdpos type ty_cdpos occurs 0,
      begin of ty_dd03l,
        tabname   like dd03l-tabname,
        fieldname like dd03l-fieldname,
        as4local  like dd03l-as4local,
        as4vers   like dd03l-as4vers,
        rollname  like dd03l-rollname,
      end of ty_dd03l,
      ty_it_dd03l type ty_dd03l occurs 0,
      begin of ty_dd04t,
        rollname   like dd04t-rollname,
        ddlanguage like dd04t-ddlanguage,
        as4local   like dd04t-as4local,
        as4vers    like dd04t-as4vers,
        scrtext_l  like dd04t-scrtext_l,
      end of ty_dd04t,
      ty_it_dd04t type ty_dd04t occurs 0,
      begin of ty_kna1,
        kunnr like kna1-kunnr,                 " Customer number
        name1 like kna1-name1,                 " Customer name
      end of ty_kna1,
      ty_it_kna1 type ty_kna1 occurs 0,
      ty_text(500) type c,
      ty_lines type tline,
      ty_it_lines type ty_lines occurs 0,
      begin of ty_merged,
        vbeln     like vbak-vbeln,            " Sales order number
        erdat     like vbak-erdat,            " Created on
        auart     like vbak-auart,            " Order type
        faksk     like vbak-faksk,            " Billing block in SD document
        netwr     like vbak-netwr,            " Net value
        waerk     like vbak-waerk,            " Currency
        vkorg     like vbak-vkorg,            " Sales organisation
        vtweg     like vbak-vtweg,            " Distribution channel
        vkbur     like vbak-vkbur,            " Sales office
        fkara     like vbak-fkara,            " Proposed billing type
        kunnr     like vbak-kunnr,            " Sold-to party
        xblnr     like vbak-xblnr,            " Reference
        fbuda     like vbkd-fbuda,            " Date services rendered
        username  like cdhdr-username,        " Changed by
        udate     like cdhdr-udate,           " Changed on
        utime     like cdhdr-utime,           " Changed at
        tcode     like cdhdr-tcode,           " Transaction code
        tabname   like cdpos-tabname,         " Table name
        tabkey    like cdpos-tabkey,          " Table key
        fname     like cdpos-fname,           " Field name
        chngind   like cdpos-chngind,         " Change indicator
        value_new like cdpos-value_new,       " New value of field
        value_old like cdpos-value_old,       " Old value of field
        scrtext_l like dd04t-scrtext_l,       " Description of field
        intnote   type ty_text,               " Internal note
        hdrnote   type ty_text,               " Header note
        name1     like adrc-name1,            " Sold-to party name
      end of ty_merged,
      ty_it_merged type ty_merged occurs 0,
      begin of ty_vbak,
        vbeln    like vbak-vbeln,             " Sales order number
        erdat    like vbak-erdat,             " Created on
        auart    like vbak-auart,             " Order type
        faksk    like vbak-faksk,             " Billing block in SD document
        netwr    like vbak-netwr,             " Net value
        waerk    like vbak-waerk,             " Currency
        vkorg    like vbak-vkorg,             " Sales organisation
        vtweg    like vbak-vtweg,             " Distribution channel
        vkbur    like vbak-vkbur,             " Sales office
        fkara    like vbak-fkara,             " Proposed billing type
        kunnr    like vbak-kunnr,             " Sold-to party
        xblnr    like vbak-xblnr,             " Reference
        objectid like cdhdr-objectid,         " Change document object
      end of ty_vbak,
      ty_it_vbak type ty_vbak occurs 0,
      begin of ty_vbkd,
        vbeln like vbkd-vbeln,                " Sales order number
        posnr like vbkd-posnr,                " Sales order item
        fbuda like vbkd-fbuda,                " Date services rendered
      end of ty_vbkd,
      ty_it_vbkd type ty_vbkd occurs 0.
    Internal tables
    data:
    Internal table to store change document header details from CDHDR
      it_cdhdr    type ty_it_cdhdr,
    Internal table to store change document details from CDPOS
      it_cdpos    type ty_it_cdpos,
    Internal table to store field catalog for report function
      it_fieldcat type slis_t_fieldcat_alv,
    Internal table to store customer details from KNA1
      it_kna1     type ty_it_kna1,
    Internal table to store merged data for report output
      it_merged   type ty_it_merged,
    Internal table to store sales order header details from VBAK
      it_vbak     type ty_it_vbak,
    Internal table to store sales order business data from VBKD
      it_vbkd     type ty_it_vbkd.
    Work areas
    data:
      wa_vbak  type ty_vbak.
    Structures
    data:
    Display variant structures
      st_tvariant  like disvariant,
      st_variant   like disvariant.
    Constants
    constants:
      co_as4local_a           like dd03l-as4local     " Active version
                              value 'A',
      co_objectclas_verkbeleg like cdhdr-objectclas
                              value 'VERKBELEG',
      co_posnr_initial        like vbkd-posnr         " Initial item number
                              value is initial,
      co_save_u               type c                  " User display variant
                              value 'U',              " saving allowed.
      co_trvog_0              like vbak-trvog         " Sales order
                              value '0'.
    Variables
    data:
      va_exit                 type c,                 " ALV display
      va_tabix                like sy-tabix.
    Selection screen definition
    selection-screen: begin of block b1 with frame title text-001.
    select-options:
      s_vbeln  for vbak-vbeln,            " Sales order number
      s_erdat  for vbak-erdat,            " Created on
      s_auart  for vbak-auart,            " Order type
      s_vkorg  for vbak-vkorg,            " Sales organisation
      s_vtweg  for vbak-vtweg,            " Distribution channel
      s_vkbur  for vbak-vkbur,            " Sales office
      s_kunnr  for vbak-kunnr,            " Sold-to party
      s_usrnme for cdhdr-username,        " Changed by
      s_udate  for cdhdr-udate.           " Changed on
    selection-screen: end of block b1,
                      begin of block b2 with frame title text-002.
    parameters:
      p_varint like disvariant-variant.   " Display variant.
    selection-screen: end of block b2.
    Initialization
    initialization.
    Load display variant.
      if not p_varint is initial.
        move st_variant to st_tvariant.
        move p_varint to st_tvariant-variant.
        call function 'REUSE_ALV_VARIANT_EXISTENCE'
             exporting
                  i_save     = co_save_u
             changing
                  cs_variant = st_tvariant.
        st_variant = st_tvariant.
      else.
        clear st_variant.
        st_variant-report = sy-repid.
      endif.
    at selection-screen on value-request for p_varint.
    Provide display variant list for this program.
      call function 'REUSE_ALV_VARIANT_F4'
           exporting
                is_variant = st_variant
                i_save     = co_save_u
           importing
                e_exit     = va_exit
                es_variant = st_tvariant
           exceptions
                not_found  = 2.
      if sy-subrc eq 2.
        message id sy-msgid type 'S'
                number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      else.
        if va_exit eq space.
          st_variant = st_tvariant.
          p_varint = st_tvariant-variant.
        endif.
      endif.
    At selection screen
    at selection-screen.
    Load display variant.
      if not p_varint is initial.
        move st_variant to st_tvariant.
        move p_varint to st_tvariant-variant.
        call function 'REUSE_ALV_VARIANT_EXISTENCE'
             exporting
                  i_save     = co_save_u
             changing
                  cs_variant = st_tvariant.
        st_variant = st_tvariant.
      else.
        clear st_variant.
        st_variant-report = sy-repid.
      endif.
    Start of selection
    start-of-selection.
    Extract order details from VBAK
      select vbeln erdat auart faksk netwr waerk vkorg vtweg vkbur fkara
             kunnr xblnr
             from  vbak
             into  table it_vbak
             where vbeln in s_vbeln
             and   erdat in s_erdat
             and   auart in s_auart
             and   vkorg in s_vkorg
             and   vtweg in s_vtweg
             and   vkbur in s_vkbur
             and   kunnr in s_kunnr
             and   trvog eq co_trvog_0.
      if sy-subrc ne 0.
      No data found for selection
        message s001(zgen).
        exit.
      endif.
      loop at it_vbak into wa_vbak.
        va_tabix = sy-tabix.
        wa_vbak-objectid = wa_vbak-vbeln.
        modify it_vbak from wa_vbak
                       index va_tabix
                       transporting objectid.
      endloop.
    Extract change document header details from CDHDR
      select objectclas objectid changenr username udate utime tcode
             from  cdhdr
             into  table it_cdhdr
             for   all entries in it_vbak
             where objectclas eq co_objectclas_verkbeleg
             and   objectid   eq it_vbak-objectid
             and   username   in s_usrnme
             and   udate      in s_udate.
      if sy-subrc eq 0.
      Extract change document details from CDPOS
        select objectclas objectid changenr tabname tabkey fname chngind
               value_new value_old
               from  cdpos
               into  table it_cdpos
               for   all entries in it_cdhdr
               where objectclas eq it_cdhdr-objectclas
               and   objectid   eq it_cdhdr-objectid
               and   changenr   eq it_cdhdr-changenr.
      endif.
    Extract sales order business data from VBKD
      select vbeln posnr fbuda
             from  vbkd
             into  table it_vbkd
             for   all entries in it_vbak
             where vbeln eq it_vbak-vbeln
             and   posnr eq co_posnr_initial.
    Extract customer details from KNA1
      select kunnr name1
             from  kna1
             into  table it_kna1
             for   all entries in it_vbak
             where kunnr eq it_vbak-kunnr.
    Merge data for report output
      perform merge_data tables it_cdhdr
                                it_cdpos
                                it_kna1
                                it_merged
                                it_vbak
                                it_vbkd.
      if it_merged[] is initial.
      No data found for selection
        message s001(zgen).
        exit.
      endif.
    Release memory no longer required.
      free: it_cdhdr,
            it_cdpos,
            it_kna1,
            it_vbak,
            it_vbkd.
    Build field catalog for call to report function
      perform build_field_catalog tables it_fieldcat.
    Output report.
      perform output_report tables it_fieldcat
                                   it_merged.
    *&      Form  merge_data
          text
    form merge_data  tables   pa_it_cdhdr  type ty_it_cdhdr
                              pa_it_cdpos  type ty_it_cdpos
                              pa_it_kna1   type ty_it_kna1
                              pa_it_merged type ty_it_merged
                              pa_it_vbak   type ty_it_vbak
                              pa_it_vbkd   type ty_it_vbkd.
    Local internal tables
    data:
      lit_dd03l type ty_it_dd03l,
      lit_dd04t type ty_it_dd04t.
    Local work areas
    data:
      lwa_cdhdr  type ty_cdhdr,
      lwa_cdpos  type ty_cdpos,
      lwa_dd03l  type ty_dd03l,
      lwa_dd04t  type ty_dd04t,
      lwa_kna1   type ty_kna1,
      lwa_merged type ty_merged,
      lwa_vbak   type ty_vbak,
      lwa_vbkd   type ty_vbkd.
    Local variables
    data:
      lva_dd03l_tabix like sy-tabix,
      lva_dd04t_tabix like sy-tabix.
      sort pa_it_cdhdr by objectid changenr.
      sort pa_it_cdpos by objectid changenr tabname tabkey fname.
      sort pa_it_kna1  by kunnr.
      sort pa_it_vbak  by vbeln.
      sort pa_it_vbkd  by vbeln.
      loop at pa_it_vbak into lwa_vbak.
        clear lwa_merged.
      Assign sales order fields to reporting work area
        lwa_merged-vbeln = lwa_vbak-vbeln.
        lwa_merged-erdat = lwa_vbak-erdat.
        lwa_merged-auart = lwa_vbak-auart.
        lwa_merged-faksk = lwa_vbak-faksk.
        lwa_merged-netwr = lwa_vbak-netwr.
        lwa_merged-waerk = lwa_vbak-waerk.
        lwa_merged-vkorg = lwa_vbak-vkorg.
        lwa_merged-vtweg = lwa_vbak-vtweg.
        lwa_merged-vkbur = lwa_vbak-vkbur.
        lwa_merged-fkara = lwa_vbak-fkara.
        lwa_merged-kunnr = lwa_vbak-kunnr.
        lwa_merged-xblnr = lwa_vbak-xblnr.
      Get name of sold-to party from PA_IT_KNA1
        clear lwa_kna1.
        read table pa_it_kna1 into lwa_kna1
                              with key kunnr = lwa_vbak-kunnr
                              binary search.
        lwa_merged-name1 = lwa_kna1-name1.
      Get business data from PA_IT_VBKD.
        clear lwa_vbkd.
        read table pa_it_vbkd into lwa_vbkd
                              with key vbeln = lwa_vbak-vbeln
                              binary search.
        lwa_merged-fbuda = lwa_vbkd-fbuda.
      Get internal note text for sales order
        perform read_text using '0002'
                                '1'
                                lwa_merged-vbeln
                                'VBBK'
                                lwa_merged-intnote.
      Get header note 1 text for sales order
        perform read_text using 'Z002'
                                '1'
                                lwa_merged-vbeln
                                'VBBK'
                                lwa_merged-hdrnote.
      Determine if change documents exist for sales order.
        clear lwa_cdhdr.
        read table pa_it_cdhdr into lwa_cdhdr
                               with key objectid = lwa_vbak-objectid.
        if sy-subrc ne 0.
          continue.
        endif.
        loop at pa_it_cdhdr into lwa_cdhdr
                            from sy-tabix.
          lwa_merged-username = lwa_cdhdr-username.
          lwa_merged-udate    = lwa_cdhdr-udate.
          lwa_merged-utime    = lwa_cdhdr-utime.
          lwa_merged-tcode    = lwa_cdhdr-tcode.
          clear lwa_cdpos.
          read table pa_it_cdpos into lwa_cdpos
                                 with key objectid = lwa_cdhdr-objectid
                                          changenr = lwa_cdhdr-changenr
                                 binary search.
          loop at pa_it_cdpos into lwa_cdpos
                              from sy-tabix.
            lwa_merged-tabname   = lwa_cdpos-tabname.
            lwa_merged-tabkey    = lwa_cdpos-tabkey.
            lwa_merged-fname     = lwa_cdpos-fname.
            lwa_merged-chngind   = lwa_cdpos-chngind.
            lwa_merged-value_new = lwa_cdpos-value_new.
            lwa_merged-value_old = lwa_cdpos-value_old.
          Get description for field - determine date element
            clear lwa_dd03l.
            read table lit_dd03l into lwa_dd03l
                                 with key tabname   = lwa_cdpos-tabname
                                          fieldname = lwa_cdpos-fname
                                 binary search.
            lva_dd03l_tabix = sy-tabix.
            if sy-subrc ne 0.
              select single tabname fieldname as4local as4vers rollname
                     from   dd03l
                     into   lwa_dd03l
                     where  tabname   eq lwa_cdpos-tabname
                     and    fieldname eq lwa_cdpos-fname
                     and    as4local  eq co_as4local_a.
              if sy-subrc eq 0.
                insert lwa_dd03l into lit_dd03l
                                 index lva_dd03l_tabix.
              endif.
            endif.
          If data element was found, get description
            if not lwa_dd03l is initial.
              clear lwa_dd04t.
              read table lit_dd04t into lwa_dd04t
                                   with key rollname   = lwa_dd03l-rollname
                                            ddlanguage = sy-langu
                                   binary search.
              lva_dd04t_tabix = sy-tabix.
              if sy-subrc ne 0.
                select single rollname ddlanguage as4local as4vers scrtext_l
                       from  dd04t
                       into  lwa_dd04t
                       where rollname   eq lwa_dd03l-rollname
                       and   ddlanguage eq sy-langu.
                if sy-subrc eq 0.
                  insert lwa_dd04t into lit_dd04t
                                   index lva_dd04t_tabix.
                else.
                  lwa_dd04t-scrtext_l = 'Description for field not found'.
                endif.
              endif.
            endif.
            lwa_merged-scrtext_l = lwa_dd04t-scrtext_l.
            append lwa_merged to pa_it_merged.
            at end of changenr.
            Only process field changes for this change document.
              exit.
            endat.
          endloop.
          at end of objectid.
          Initialise work area so we know change document for order has
          been processed.
            clear lwa_merged.
          Only process change documents for this sales order.
            exit.
          endat.
        endloop.
      endloop.
    endform.                    " merge_data
    *&      Form  build_field_catalog
          text
    form build_field_catalog tables pa_it_fieldcat type slis_t_fieldcat_alv.
    data:
    Local variable
      lva_col_pos   type slis_fieldcat_alv-col_pos,
    Local structure
      st_fieldcat   type slis_fieldcat_alv.
      lva_col_pos = 0.
      clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'VBELN'.
      st_fieldcat-ref_tabname   = 'VBAK'.
      st_fieldcat-ref_fieldname = 'VBELN'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-col_pos       = lva_col_pos.
      append st_fieldcat to pa_it_fieldcat.
      clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'ERDAT'.
      st_fieldcat-ref_tabname   = 'VBAK'.
      st_fieldcat-ref_fieldname = 'ERDAT'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-col_pos       = lva_col_pos..
      append st_fieldcat to pa_it_fieldcat.
      clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'AUART'.
      st_fieldcat-ref_tabname   = 'VBAK'.
      st_fieldcat-ref_fieldname = 'AUART'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-col_pos       = lva_col_pos.
      append st_fieldcat to pa_it_fieldcat.
      clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'FAKSK'.
      st_fieldcat-ref_tabname   = 'VBAK'.
      st_fieldcat-ref_fieldname = 'FAKSK'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-col_pos       = lva_col_pos.
      append st_fieldcat to pa_it_fieldcat.
      clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'NETWR'.
      st_fieldcat-ref_tabname   = 'VBAK'.
      st_fieldcat-ref_fieldname = 'NETWR'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-col_pos       = lva_col_pos.
      append st_fieldcat to pa_it_fieldcat.
      clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'WAERK'.
      st_fieldcat-ref_tabname   = 'VBAK'.
      st_fieldcat-ref_fieldname = 'WAERK'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-col_pos       = lva_col_pos..
      append st_fieldcat to pa_it_fieldcat.
      clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'VKORG'.
      st_fieldcat-ref_tabname   = 'VBAK'.
      st_fieldcat-ref_fieldname = 'VKORG'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-col_pos       = lva_col_pos.
      append st_fieldcat to pa_it_fieldcat.
      clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'VTWEG'.
      st_fieldcat-ref_tabname   = 'VBAK'.
      st_fieldcat-ref_fieldname = 'VTWEG'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-col_pos       = lva_col_pos.
      append st_fieldcat to pa_it_fieldcat.
      clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'VKBUR'.
      st_fieldcat-ref_tabname   = 'VBAK'.
      st_fieldcat-ref_fieldname = 'VKBUR'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-col_pos       = lva_col_pos.
      append st_fieldcat to pa_it_fieldcat.
      clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'FKARA'.
      st_fieldcat-ref_tabname   = 'VBAK'.
      st_fieldcat-ref_fieldname = 'FKARA'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-col_pos       = lva_col_pos.
      append st_fieldcat to pa_it_fieldcat.
      clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'KUNNR'.
      st_fieldcat-ref_tabname   = 'VBAK'.
      st_fieldcat-ref_fieldname = 'KUNNR'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-col_pos       = lva_col_pos.
      append st_fieldcat to pa_it_fieldcat.
      clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'XBLNR'.
      st_fieldcat-ref_tabname   = 'VBAK'.
      st_fieldcat-ref_fieldname = 'XBLNR'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-col_pos       = lva_col_pos.
      append st_fieldcat to pa_it_fieldcat.
      clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'FBUDA'.
      st_fieldcat-ref_tabname   = 'VBKD'.
      st_fieldcat-ref_fieldname = 'FBUDA'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-col_pos       = lva_col_pos.
      append st_fieldcat to pa_it_fieldcat.
      clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'USERNAME'.
      st_fieldcat-ref_tabname   = 'CDHDR'.
      st_fieldcat-ref_fieldname = 'USERNAME'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-col_pos       = lva_col_pos.
      append st_fieldcat to pa_it_fieldcat.
      clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'UDATE'.
      st_fieldcat-ref_tabname   = 'CDHDR'.
      st_fieldcat-ref_fieldname = 'UDATE'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-col_pos       = lva_col_pos.
      append st_fieldcat to pa_it_fieldcat.
      clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'UTIME'.
      st_fieldcat-ref_tabname   = 'CDHDR'.
      st_fieldcat-ref_fieldname = 'UTIME'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-col_pos       = lva_col_pos.
      append st_fieldcat to pa_it_fieldcat.
      clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'TCODE'.
      st_fieldcat-ref_tabname   = 'CDPOS'.
      st_fieldcat-ref_fieldname = 'TCODE'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-col_pos       = lva_col_pos.
      append st_fieldcat to pa_it_fieldcat.
      clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'TABNAME'.
      st_fieldcat-ref_tabname   = 'CDPOS'.
      st_fieldcat-ref_fieldname = 'TABNAME'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-col_pos       = lva_col_pos.
      append st_fieldcat to pa_it_fieldcat.
      clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'TABKEY'.
      st_fieldcat-ref_tabname   = 'CDPOS'.
      st_fieldcat-ref_fieldname = 'TABKEY'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-col_pos       = lva_col_pos.
      append st_fieldcat to pa_it_fieldcat.
      clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'FNAME'.
      st_fieldcat-ref_tabname   = 'CDPOS'.
      st_fieldcat-ref_fieldname = 'FNAME'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-col_pos       = lva_col_pos.
      append st_fieldcat to pa_it_fieldcat.
      clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'CHNGIND'.
      st_fieldcat-ref_tabname   = 'CDPOS'.
      st_fieldcat-ref_fieldname = 'CHNGIND'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-col_pos       = lva_col_pos.
      append st_fieldcat to pa_it_fieldcat.
      clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'VALUE_NEW'.
      st_fieldcat-ref_tabname   = 'CDPOS'.
      st_fieldcat-ref_fieldname = 'VALUE_NEW'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-col_pos       = lva_col_pos.
      append st_fieldcat to pa_it_fieldcat.
      clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'VALUE_OLD'.
      st_fieldcat-ref_tabname   = 'CDPOS'.
      st_fieldcat-ref_fieldname = 'VALUE_OLD'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-col_pos       = lva_col_pos.
      append st_fieldcat to pa_it_fieldcat.
      clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'SCRTEXT_L'.
      st_fieldcat-ref_tabname   = 'DD04T'.
      st_fieldcat-ref_fieldname = 'SCRTEXT_L'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-col_pos       = lva_col_pos.
      append st_fieldcat to pa_it_fieldcat.
      clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'INTNOTE'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-col_pos       = lva_col_pos.
      st_fieldcat-seltext_s     = 'Int Note'.
      st_fieldcat-seltext_m     = 'Internal Note'.
      st_fieldcat-seltext_l     = 'Internal Note'.
      st_fieldcat-ddictxt       = 'L'.
      append st_fieldcat to pa_it_fieldcat.
      clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'HDRNOTE'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-col_pos       = lva_col_pos.
      st_fieldcat-seltext_s     = 'Hdr Note'.
      st_fieldcat-seltext_m     = 'Header Note'.
      st_fieldcat-seltext_l     = 'Header Note'.
      st_fieldcat-ddictxt       = 'L'.
      append st_fieldcat to pa_it_fieldcat.
      clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'NAME1'.
      st_fieldcat-ref_tabname   = 'KNA1'.
      st_fieldcat-ref_fieldname = 'NAME1'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-col_pos       = lva_col_pos.
      append st_fieldcat to pa_it_fieldcat.
    endform.                    " build_field_catalog
    *&      Form  output_report
          text
    form output_report tables pa_it_fieldcat type slis_t_fieldcat_alv
                              pa_it_merged   type ty_it_merged.
    Local variables
    data:
      lva_formname type slis_formname,
      lva_repid    like sy-repid.
      lva_repid = sy-repid.
      lva_formname = 'ALV_USER_COMMAND'.
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_callback_program = lva_repid
          i_callback_user_command = lva_formname
          i_save             = 'A'
          is_variant         = st_variant
          it_fieldcat        = pa_it_fieldcat[]
        tables
          t_outtab           = pa_it_merged
        exceptions
          program_error      = 1
          others             = 2.
    endform.                    " output_report
    *&      Form  alv_user_command
          text
    form alv_user_command using pa_ucomm    like sy-ucomm
                                pa_selfield type slis_selfield.
    Local work areas
    data:
      lwa_merged type ty_merged.
      clear lwa_merged.
      read table it_merged into lwa_merged
                           index pa_selfield-tabindex.
      case pa_selfield-fieldname.
        when 'VBELN'.
        Sales order number
          set parameter id 'AUN' field lwa_merged-vbeln.
          call transaction 'VA03' and skip first screen.
        when 'KUNNR'.
        Customer number
          set parameter id 'KUN' field lwa_merged-kunnr.
          set parameter id 'VKO' field space.
          set parameter id 'VTW' field space.
          set parameter id 'SPA' field space.
          call transaction 'XD03' and skip first screen.
      endcase.
    endform.                    " alv_user_command
    *&      Form  read_text
          text
    form read_text  using    pa_id
                             pa_inline_count
                             pa_name
                             pa_object
                             pa_text.
    Local internal tables
    data:
      lit_inlines type ty_it_lines,
      lit_lines   type ty_it_lines.
    Local work areas
    data:
      lwa_lines   type ty_lines.
    Local variables
    data:
      lva_tdname    like thead-tdname.
      refresh: lit_inlines,
               lit_lines.
      lva_tdname = pa_name.
      call function 'READ_TEXT_INLINE'
        exporting
          id                    = pa_id
          inline_count          = pa_inline_count
          language              = sy-langu
          name                  = lva_tdname
          object                = pa_object
        tables
          inlines               = lit_inlines
          lines                 = lit_lines
        exceptions
          id                    = 1
          language              = 2
          name                  = 3
          not_found             = 4
          object                = 5
          reference_check       = 6
          others                = 7.
      loop at lit_lines into lwa_lines.
        concatenate pa_text
                    lwa_lines-tdline
                    into pa_text separated by space.
      endloop.
    endform.                    " read_text

    Hi George!
    In general this question is very complex. In Retail it's a whole module and handled by a program with more than 20 000 lines of coding - not just selecting some conditions with a starting date range.
    Do you have conditions on several levels? E.g. customer specific and on sales organization - what should happen, if a customer specific condition ends?
    Regards,
    Christian

  • Document or report for assessment and reversed assessment?

    Hi guyz,
    Is there any document or report for assessment and reversed assessment?
    I need to find documentation as a proof for any execution and reversal of assessment, such as journal entry or report line items that is showing debit or credit for the expenses..
    Currently, I can only see actual cost document which shows execution of assessment and an assessment cost element debit and credit in the Cost Center Actual/Plan/Variance report.
    However, when I do reversal at KSU5, in the Cost Center A/P/V report is showing that assessment cost element is still exist (no more debit and credit showing as the result of the reversal), only that the value is now zero.
    Need your answer asap...Thanking you..

    Dear Meila,
    Use tcode KSB1 Cost Center Actual Line Itens, execute then report and change the Layout, insert the field Business Transaction in the report.
    Regards

  • How to track document changes

    We are trying to work on a group report through Workspace and wanted to check if the administrator can get real time updates on document changes within the Workspace. I can be reached at [email protected] Thank you.

    Hi Mr. Modi,
                       Can you clarify your scenario properly that I can analyse it to give you proper solution....I am confuse with your requirement and  example which you have given...
    Cheers,
    Sagun Desai....

  • Change Report Owner

    In a previous thread titled [Change Report Owner|Change Report Owner; by [Roy King|http://forums.sdn.sap.com/profile.jspa?userID=4028889] he was asking how to change the owner of a report.
    Since the post went unanswered, I thought I would post the solution that worked for me:
    If you are using ASP.Net like I did, you can follow the post from [Pinchii.com: How to Change Owner for a Crystal Reports Server Report|http://pinchii.com/home/2011/01/how-to-change-owner-for-a-crystal-reports-server-report/]
    The code on this page is a complete .NET project ready to use
    If you are using Java, you can use the code from [ Forumtopics.com's BoB LoblaW: Re: Change Report Owner|http://www.forumtopics.com/busobj/viewtopic.php?p=699058#699058].  Bob's code is only the bit you need to change the owner, but you still have to code the rest
    The key to change the owner is to change SI_OWNERID
    and the fix for Roy Kings Code:
    Replace the line oSourceUserObject.save();
    sourceUser = (IInfoObjects) iStore.query("select * from ci_infoobjects where si_id=" + repID);
    for ( int i = 0; i < sourceUser.getResultSize(); i++ ) {
    oSourceUserObject = (IInfoObject)sourceUser.get(i);
    //oSourceUserObject.properties().setProperty("SI_OWNERID",ownerID); //set new Name/ID
    oSourceUserObject.properties().setProperty(CePropertyID.SI_OWNERID,ownerID); //set new Name/ID
    //oSourceUserObject.save();
    oSourceUserObject.save();
    with
    iStore.commit(sourceUser);
    The above code is not complete, you need to declare an instance of the infoStore service which is represented above by iStore

    I would open a support ticket, since you appear to have an interesting case.
    As background, there's some things that can trigger change in ownership to Administrator, where the main culprit is that the original owner User is either deleted or disappears.  When the owner is gone, then documents are transferred to the Administrator. 
    For example, if you have AD or LDAP authentication based Users, and the connection to the authentication server dies, then a refresh update can remove those users (unless you generate Enterprise auth aliases for each User).
    Sincerely,
    Ted Ueda

  • Document Drafts Report Indirect Delivery:  understading

    Hello Experts,
    In Sales - A/R > Sales Reports > Document Drafts Report >> there are few things I wanted to ask:
    In selection criteria I selected full Sales - A/R area:
    In Document Drafts Report, there is a columns about which I want to ask
    1. Approval (Column) >> Values: a. Indirect Delivery and b. Direct Delivery
    Can you please tell me about Indirect Delivery and Direct Delivery ?
    Help Required..
    Kind Regards
    Edited by: Shazad Nazir on Dec 31, 2008 12:46 PM

    Hi,
    The 'Direct/indirect delivery' is only meaningful for orders. It changes along with the setting under Order-logistic tab-approved check box.
    Regards,
    Jitin
    SAP Business One Forum Team

  • Document Drafts Report, Draft Open & Close: understading

    Hello Experts,
    In Sales - A/R > Sales Reports > Document Drafts Report >>
    In selection criteria I selected full Sales - A/R area:
    In Document Drafts Report, there is a column about which I want to ask
    Status >> Values: a. Open b. closed
    Can you please tell me when system close the Document and when system keeps it open ?
    Help Required..
    Kind Regards

    Hi,
    First of all Happy new year!
    The closed status in the document draft indicates that you have added the document from the draft into to original.
    You can manually rt.click the draft and can change it to closed status and vice versa by selecting restore.
    Once you have posted the draft to original you need to delete the draft document inorder to avoid duplication.

  • Document changes history table

    Hi,
    Is there any table which is having document changes history (Old and new).
    Thanks in advance for your help.

    Hi,
    If you succeed to see the changes via FB03 transactions and cannot view them in the tables, then your selection parameters are incorrect. To see the right parameters, you can activate the trace (via ST05) and view changes via FB03 for one document. Then, by checking the trace you will see what you enter wrong when you select data from the table.
    Alternatively, use S_ALR_87012293 report for mass view of changed documents.
    Regards,
    Eli

  • How can i see the document change for project in CN60

    Dear all,
    i want to see the project change in the report.
    i know i can see it using cn60
    but now, the system states that there is no data.
    i have ticked document change in the project profile.
    it seems useless.
    could anyone tell me how i can see the change documents?
    is there anything else i shall config?
    thanks a lot.
    Judy

    Hiu2026.
    Regardingu2026.cn60
    Tick change documents in the project profile on the right side.
    Not in the under status management. Section.
    Run transaction CJEN for project
    And check in cn60.
    Regarding checking changes in cj20n.
    Cj20nu2026.click on the WBS/Activity(which one u want to see).
    Editmenuu2026.status.....systemstatus/userstatus.
    Go to extramenuu2026..change documentsu2026.all.
    Check in Allchangesu2026.and history.
    I hope it will reach your req.
    Experts....plz correct me if im wrong.
    Regards
    Chandra

  • When I share a pages document as a PDF (via e-mail) all the pictures change from the original document, most are missing with just a few of them repeated in the spots where others had been.  How do I do this without the document changing?

    When I share a pages document as a PDF (via e-mail) all the pictures change from the original document, most are missing with just a few of them repeated in the spots where others had been.  How do I do this without the document changing?
    I need to be able to send it to a PC in order to print it.

    Hard to say what is happening without examining the file.
    If you like click on my blue name and email me both the .pages file and the the .pdf you have made from it.
    Peter
    ps It would help to say what version of Pages you are using and on what you are running it. iOS or Mac and what version.

  • How to link PDF document in Report Layout??

    I need to display the contents of PDF document after the form letter report. I tried OLE object but at the runtime it does not display the content. Does any one knows how to attach PDF document in reports layout?
    Thanks
    Ravindra

    you will have to concatinate your report output with the static PDF document. in reprots 10g you can create a cusotm destination that could implement this functionality.
    out of the box, reports does not provide the ability to add static content in PDF to reports' generated PDF output.
    thanks,
    philipp

  • Purchase order price change report

    Hello
    How to retieve the purchase order price change report ? do we have any standard report for it or any table which gives these data?
    kindl

    HI
    Have you activate version management at your end for PO,i think this will help you to track changes of PO for qty,price etc.
    [http://wiki.sdn.sap.com/wiki/display/ERPLO/Version+Management]
    Regards
    Kailas Ugale

  • Change report S_ALR_87012168 - 0SAPDUEAN-01

    I am in FDI2 for changing report 0SAPDUEAN-01-Due Date Analysis for Open Items. I would like to add one more characteristic in the list available in the right hand side. Currently there are only 26 characteristics available for selection

    Hi Suma,
    In my last project I worked a lot on that to add new characteristic but I didn't get in clue.  If you get any idea that would be great.
    Best of luck
    Sreenivas

  • How to change report displayname at runtime when run from the report server?

    hi all,
    with the reportviewer widget in a winforms app, i'm able to change report displayname at runtime by handling thesubmittingparametervalues event like so:
            private void reportViewer1_SubmittingParameterValues(object sender, ReportParametersEventArgs e)
                string po = e.Parameters["Order"].Values[0];
                this.reportViewer1.ServerReport.DisplayName = "Load Out - " + po + " - " + DateTime.Now.ToShortDateString();
    question: how do i achieve the same thing when the report is run via the ssrs reportserver website?
    thanks for any tips,
    sff

    Hi sherifffruitfly2,
    According to your description, you want to change the display name of report in Report Manager. Right?
    In Reporting Services, we can't make the report file name dynamically. But we have Build-in Fields to show report name and execution time in a report. We can add a textbox and put in the expression below:
    ="Load on- "+Globals!ReportName+" "+Globals!ExecutionTime
    It will show the report name with execution time when we run the report:
    Reference:
    Built-in Collections in Expressions (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

Maybe you are looking for

  • VA05 - SAPMV75A Adding new fields in the list

    hi, I want to add 2 new fields in VA05 -SAPMV75A list.In the open Sales order report I need to add 2 fields from table (KONV) -KBETR and KWERT.I found a note 350068..Is this correct one Any body worked ... Thanks, fractal.

  • How to find out the mac address of T61

    Is there any way to find out the mac address of a T61, without physically accessing the machine. I have the machine type as well as the serial number.  Man deals and God stacks the decks

  • Nano not playing downloadeds from itunes music

    Help! I downloaded a song (for the first time) from ITunes music into my library. However, when i go to play the song on my Ipod it lists the song and the album cover but quickly goes back to the menu screen. I am unable to play the song on my ipod N

  • Print Output in Smart forms

    Hi, There is a Strange issue I am facing now that is print output is getting changed according to the printer settings. Even though I specified the output_options-tdprinter = 'ZPDFUC',and output_options-tddest = 'LP01' while calling smart form FM the

  • Macbook Pro power cables

    Hi I bought I macbook pro in the summer of 2009 and then in 2010 I dropped it on the floor and this summer got a replacement. I'm pretty sure the new MBP I have has some sort of different power going to it than my old MBP - I believe the new MBP func