ME57 report modification.....

Below i clearly mentioned the detials pls anyone tell the solution asap...
1. Copy the existing program (ME57) RM06BZ00 in a new program ZRM06BZ00.
2. Create a Role table, this would essentially be to enable us to find the role of a buyer based on either of Material group, Plant, acct assignment category, T# .The structure of the same would be as follows.
Plant Material Group Accnt Assign Cat Role T# Material type
3. Provide a transaction to maintain the Table entry.
4. Provide select option in the selection screen to choose the T# of a person responsible below the purchasing group field.
5. Create logic to select the documents relevant to the T# provided in input and where role assigned is PR to PO conversion. This would call the role table to identify the material group, plant and acct assignment for which the person having T# is responsible and has role of PR to PO conversion. Further logic of the reports would be same as original.
6. Provide T# in the Report output.
Report modifications
1. Select all Purchase Requisitions based on selection criteria into internal table ban.
2. Perform checks on selected entries.
3. For each entry in table ban do following.
Select T# from table ZBUYERROLE table
where plant = ban-plant
material grp = ban-material grp
Accnt Assign Cat = ban-Acct assign cat
And T# is in select option s_tuser.
If record found.
Display ban.
Display T# obtained.
Else.
Delete ban entry.
Endif.
End Do.
This is very very urgent ..correct solution will be reqwarded....
Thanks in advance.....

The problem may not be due to CALL TRANSACTION.
Before you click on the requisition, go into debug mode. After you get into the requisition program look at the SY structures. See if either the program name or transaction code is actually your custom development.
Rob

Similar Messages

  • Fuel Consumption Report Modification - 2

    Hi Experts
    I am working on fuel consumption modification. can anyone help me how to get max and min value for this program
    I am getting one row correct with equipment no is enter but when I enter the range of equipment no it is taking long time and the result is repeating for each row
    please correct my report
    Thnaks in advanced
    Piroz
    REPORT Z_FUEL2 LINE-SIZE  232 LINE-COUNT 75
             NO STANDARD PAGE HEADING.
    TABLES : equi,
             equz,
             imptt,
             imrg,
             eqkt,
             iloa.
    TYPES: BEGIN OF ty_equi," occurs 0,
           equnr type equi-equnr,
           END OF ty_equi.
    TYPES: BEGIN of ty_eqkt," occurs 0,
           equnr type eqkt-equnr,
           eqktx type eqkt-eqktx,
           END OF ty_eqkt.
    TYPES: BEGIN of ty_iloa ,"occurs 0,
           iloan type iloa-iloan,
           eqfnr type iloa-eqfnr,
           END OF ty_iloa.
    TYPES: BEGIN of ty_imptt," occurs 0,
           mpobj type imptt-mpobj,
           END of ty_imptt.
    TYPES: BEGIN of ty_imrg ,"occurs 0,
           idate type imrg-idate,
           recdv type imrg-recdv,
           recdu type imrg-recdu,
           END of ty_imrg.
    TYPES: BEGIN OF ty_data  ,
           equnr      type equnr,         " Euipment no
           eqktx      type eqkt-eqktx,    " Equipment Text
           eqfnr       type iloa-eqfnr,     " Equipment Sort field
           idate      type imrg-idate,    " Measuring Date
           recdu      type imrg-recdu,    " Unit of measuring ='KM','L','H'
           recdv      type imrg-recdv,    " Counter reading data
           END OF ty_data.
    TYPES: BEGIN OF ty_final,
           equnr           type equnr,            "  Equipment no
           eqktx           type eqkt-eqktx,       "  Equipment Text
           eqfnr           type iloa-eqfnr,       "  Equipment Sort field
           min_date        type imrg-idate,       "  Min Date
           min_km          type imrg-recdv,       "  Max Km
           max_date        type imrg-idate,       "  Max Date
           max_km          type imrg-recdv,       "  Min km
           t_max_min_km    type i,                "  Total min_km-max_km
           min_hr          type imrg-recdv,       "  Max hr
           max_hr          type imrg-recdv,       "  Min hr
           t_max_min_hr    type i,                "  Total min_hr-max_hr
           min_lit         type imrg-recdv,       "  Max lit
           max_lit         type imrg-recdv,       "  Min lit
           t_max_min_lit    type i,                "  Total min_lit-max_lit
           T_fuel_con        type p decimals 2,     "  Total_hrs / t_max_min_hr
           T_km_l            type p decimals 2,     "  km / L
           lit_per_hr      type i           ,     "  fuel comsumed / t_max_min_hr
           END OF ty_final.
    DATA: i_equi TYPE TABLE OF ty_equi,   "internal table
          wa_equi TYPE ty_equi, " work area
          i_eqkt TYPE TABLE OF ty_eqkt,   "internal table
          wa_eqkt TYPE ty_eqkt, " work area
          i_iloa TYPE TABLE of ty_iloa,   "internal table
          wa_iloa TYPE ty_iloa, " work area
          i_imptt TYPE TABLE of ty_imptt, "internal table
          wa_imptt TYPE ty_imptt,
          i_imrg  TYPE TABLE of ty_imrg,  "internal table
          wa_imrg TYPE ty_imrg,
          i_data TYPE TABLE OF ty_data,   "internal table
          wa_data TYPE ty_data, " work area
          i_final TYPE TABLE OF ty_final, " internal table
          wa_final TYPE ty_final. " work area
    DATA :  max_date type date ,
             min_date type date,
             max_km TYPE p DECIMALS 2,
             min_km TYPE p DECIMALS 2,
             max_hr TYPE p DECIMALS 2,
             min_hr TYPE p DECIMALS 2,
             max_lit TYPE p DECIMALS 2,
             min_lit TYPE p DECIMALS 2,
             t_max_min_km  TYPE p DECIMALS 2,
             t_max_min_hr TYPE p DECIMALS 2,
             t_max_min_lit TYPE p DECIMALS 2.
    SELECTION-SCREEN BEGIN OF BLOCK blk WITH FRAME.
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS: p_equnr FOR equi-equnr, "no-extension no intervals,
                    p_idate FOR imrg-idate.  "NO-EXTENSION NO INTERVALS OBLIGATORY,
                   " p_recdu FOR imrg-recdu." NO-EXTENSION NO INTERVALS ."default 'M3'" OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK blk1.
    SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002.
    SELECTION-SCREEN END OF BLOCK blk2.
    SELECTION-SCREEN END OF BLOCK blk.
    TOP-OF-PAGE.
      FORMAT INTENSIFIED ON.
      WRITE:/1(40) ' INVESTMENT LIMITED  '.
      WRITE:/50(40) ' FUEL CONSUMPTION REPORT ' CENTERED   ,
              2 'Page', sy-pagno.
      FORMAT INTENSIFIED OFF.
      WRITE:/50(40) '----
    ' CENTERED .
      FORMAT INTENSIFIED ON.
      WRITE:/2 sy-datum COLOR 3, sy-uzeit .
      "WRITE:/1 S903-SPMON ."p_yearf.
      ULINE.
      "CENTERED.
      write: /2 'Date From     :'.
      write: /2 'Equipment No  :'.
      write: /2 'Unit          :'.
      SKIP.
      ULINE.
      WRITE:/1 sy-vline,
        2   'EQUIP NO',              10 sy-vline,
        11  'NAME',                  40 sy-vline,
        41  'SORT',                  60 sy-vline,
        61  'MIN DATE',              74 sy-vline,
        75  'MIN KM',                87 sy-vline,
        88  'MAX DATE',              100 sy-vline,
        101 'MAX KM' ,               113 sy-vline,
        114 'TOTAL KM',              126 sy-vline COLOR 2,
        127 'MIN HR',                139 sy-vline,
        140 'MAX HR',                152 sy-vline,
        153 'TOTAL HR' ,             167 sy-vline COLOR 2,
        168 'MIN LIT',               180 sy-vline,
        181 'MAX LIT',               193 sy-vline,
        194 'FUEL CON',              206 sy-vline  COLOR 2,
        207 'KM L',                  219 sy-vline,
        220 'LIT PER HR',            232 sy-vline.
      FORMAT COLOR 3 ON.
      ULINE.
    END-OF-PAGE.
    START-OF-SELECTION.
    select a~equnr d~eqktx f~eqfnr e~idate e~recdu e~recdv
    into corresponding fields of table i_data
    from equi AS a
    inner join equz as b
    on a~equnr = b~equnr
    inner join iloa as f
    on b~iloan = f~iloan
    inner join imptt as c
    on a~objnr = c~mpobj
    inner join eqkt as d
    on a~equnr = d~equnr
    inner join imrg as e
    on e~point = c~point
    where a~equnr in p_equnr
    and
    e~idate in p_idate and
    e~recdu in ('KM','L','H').
    "e~recdu in p_recdu.
    equi
    *select equnr from equi into table i_equi
    *for all entries in I_DATA
    **where objnr = i_equnr-mpobj.
    *where equnr = i_data-equnr.
    *endselect.
    eqkt
    *select equnr eqktx into table I_eqkt
    *from eqkt
    *FOR ALL ENTRIES IN I_DATA
    *where equnr = i_data-Equnr.
    *endselect.
    iloa
    *select eqfnr into table I_iloa
    *from equz
    *FOR ALL ENTRIES IN I_DATA
    *on equziloan = iloailoan
    *where iloan = i_data-iloan .
    *endselect.
    imrg
    *select idate recdv recdu into table I_imrg
    *from imrg
    *FOR ALL ENTRIES IN I_DATA
    *where imrg~objnr = i_date-mpobj.
    *endselect.
    loop  at i_data into wa_data.
    CLEAR: wa_final.
      READ TABLE i_final into wa_final
               with key equnr = wa_data-equnr.
        if sy-subrc EQ 0.
         PERFORM prepare_get_equi.
         PERFORM prepare_get_eqkt.
         PERFORM prepare_get_iloa.
         PERFORM prepare_get_imptt.
         PERFORM prepare_get_imrg.
          PERFORM prepare_final_rec USING'M'. " Modify Existing Record
          ElSE.
          PERFORM prepare_final_rec USING'A'. " Append New Record.
        ENDIF.
        ENDLOOP.
        LOOP AT i_final into wa_final.
         SORT i_final by equnr  descending.
          at new equnr.
            read table i_final into wa_final index sy-tabix.
                WRITE:/1 sy-vline,
    2  wa_final-equnr                                                 , 10 sy-vline,
    11 wa_final-eqktx                                                 , 40 sy-vline,
    41 wa_final-eqfnr                                                 , 60 sy-vline,
    61 wa_final-min_date                                              , 74 sy-vline,
    75 wa_final-min_km EXPONENT 0 DECIMALS 2   LEFT-JUSTIFIED           , 87 sy-vline,
    88 wa_final-max_date EXPONENT 0 DECIMALS 2   LEFT-JUSTIFIED         , 100 sy-vline,
    101 wa_final-max_km EXPONENT 0 DECIMALS 2   LEFT-JUSTIFIED          , 113 sy-vline,
    114 wa_final-t_max_min_km EXPONENT 0 DECIMALS 2 color 3 LEFT-JUSTIFIED    , 126 sy-vline COLOR 2,
    127 wa_final-min_hr EXPONENT 0 DECIMALS 2   LEFT-JUSTIFIED          , 139 sy-vline,
    140 wa_final-max_hr EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED          , 152 sy-vline,
    153 wa_final-t_max_min_hr EXPONENT 0 DECIMALS 2 color 3 LEFT-JUSTIFIED   , 167 sy-vline COLOR 2,
    168 wa_final-min_lit EXPONENT 0 DECIMALS 2  LEFT-JUSTIFIED         , 180 sy-vline,
    181 wa_final-max_lit EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED         , 193 sy-vline,
    *194 wa_final-t_max_min_lit EXPONENT 0 DECIMALS 2 color 3 LEFT-JUSTIFIED   , 206 sy-vline COLOR 2,
    194 wa_final-T_fuel_con EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED        , 206 sy-vline,
    207 wa_final-t_km_l EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED            , 219 sy-vline,
    220 wa_final-lit_per_hr EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED      , 232 sy-vline.
    *168 wa_final-min_lit EXPONENT 0 DECIMALS 2  LEFT-JUSTIFIED         , 180 sy-vline,
    *194 wa_final-t_max_min_lit EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED   , 206 sy-vline COLOR 2,
    *207 wa_final-fuel_con EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED        , 219 sy-vline,
    *220 wa_final-km_l EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED            , 232 sy-vline,
    *233 wa_final-lit_per_hr EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED      , 246 sy-vline.
    *207 wa_final-T_fuel_con EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED        , 219 sy-vline,
    *220 wa_final-t_km_l EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED            , 232 sy-vline,
    *233 wa_final-lit_per_hr EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED      , 246 sy-vline.
    uline.
        "endat.
    *at end of equnr.
           read table i_final into wa_final index sy-tabix.
              WRITE:/1 sy-vline,
    *2  wa_final-equnr                                                 , 10 sy-vline,
    *11 wa_final-eqktx                                                 , 40 sy-vline,
    *41 wa_final-eqfnr                                                 , 60 sy-vline,
    *88 wa_final-max_date EXPONENT 0 DECIMALS 2   LEFT-JUSTIFIED         , 100 sy-vline,
    *101 wa_final-max_km EXPONENT 0 DECIMALS 2   LEFT-JUSTIFIED          , 113 sy-vline,
    *140 wa_final-max_hr EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED          , 152 sy-vline.
    **181 wa_final-max_lit EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED         , 193 sy-vline.
    *114 wa_final-t_max_min_km EXPONENT 0 DECIMALS 2   LEFT-JUSTIFIED    , 126 sy-vline COLOR 2,
    *140 wa_final-max_hr EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED          , 152 sy-vline.
    *153 wa_final-t_max_min_hr EXPONENT 0 DECIMALS 2  LEFT-JUSTIFIED   , 167 sy-vline COLOR 2,
    *181 wa_final-max_lit EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED         , 193 sy-vline,
    *194 wa_final-t_max_min_lit EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED   , 206 sy-vline COLOR 2,
    *207 wa_final-fuel_con EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED        , 219 sy-vline,
    *220 wa_final-km_l EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED            , 232 sy-vline,
    *233 wa_final-lit_per_hr EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED      , 246 sy-vline.
    uline .
       WRITE:/1 sy-vline,
    *2  wa_final-equnr                                                 , 10 sy-vline,
    *11 wa_final-eqktx                                                 , 40 sy-vline,
    *41 wa_final-eqfnr                                                 , 60 sy-vline,
    *61 wa_final-min_date                                              , 74 sy-vline,
    *75 wa_final-min_km EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED           , 87 sy-vline,
    *88 wa_final-max_date EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED         , 100 sy-vline,
    *101 wa_final-max_km EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED          , 113 sy-vline,
    *114 wa_final-t_max_min_km EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED    , 126 sy-vline COLOR 2,
    *127 wa_final-min_hr EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED          , 139 sy-vline,
    *140 wa_final-max_hr EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED          , 152 sy-vline,
    *153 wa_final-t_max_min_hr EXPONENT 0 DECIMALS 2  LEFT-JUSTIFIED   , 167 sy-vline COLOR 2,
    *168 wa_final-min_lit EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED         , 180 sy-vline,
    *181 wa_final-max_lit EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED         , 193 sy-vline,
    *194 wa_final-t_max_min_lit EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED   , 206 sy-vline COLOR 2,
    *207 wa_final-fuel_con EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED        , 219 sy-vline,
    *220 wa_final-km_l EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED            , 232 sy-vline,
    *233 wa_final-lit_per_hr EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED      , 246 sy-vline.
    *ULINE.
    endloop.
    FORM prepare_final_rec  USING    p_mode TYPE char1.
    KM
    select MAX( eidate ) Min( eidate ) MAX( erecdv ) MIN( erecdv )
    into  corresponding fields of (wa_final-max_date,wa_final-min_date, wa_final-max_km , wa_final-min_km)
    from equi AS a
    inner join equz as b
    on aequnr = bequnr
    inner join iloa as f
    on biloan = filoan
    inner join imptt as c
    on aobjnr = cmpobj
    inner join eqkt as d
    on aequnr = dequnr
    inner join imrg as e
    on epoint = cpoint
    where a~equnr in p_equnr
    and
    e~idate in p_idate and
    e~recdu =  'KM' .
    "group by aequnr deqktx feqfnr eidate erecdu erecdv.
    "endselect.
    HOUR
    select MAX( eidate ) Min( eidate ) MAX( erecdv ) MIN( erecdv )
    into corresponding fields of (wa_final-max_date, wa_final-min_date, wa_final-max_hr, wa_final-min_hr)
    from equi AS a
    inner join equz as b
    on aequnr = bequnr
    inner join iloa as f
    on biloan = filoan
    inner join imptt as c
    on aobjnr = cmpobj
    inner join eqkt as d
    on aequnr = dequnr
    inner join imrg as e
    on epoint = cpoint
    where a~equnr in p_equnr
    and
    e~idate in p_idate and
    e~recdu =  'H'.
    "group by aequnr deqktx feqfnr eidate erecdu erecdv.
    "endselect.
    LIT
    select MAX( eidate ) Min( eidate ) MAX( erecdv ) MIN( erecdv ) SUM( e~recdv )
    into (wa_final-max_date,wa_final-min_date, wa_final-max_lit, wa_final-min_lit ,  wa_final-t_max_min_lit )
    from equi AS a
    inner join equz as b
    on aequnr = bequnr
    inner join iloa as f
    on biloan = filoan
    inner join imptt as c
    on aobjnr = cmpobj
    inner join eqkt as d
    on aequnr = dequnr
    inner join imrg as e
    on epoint = cpoint
    where a~equnr in p_equnr
    and
    e~idate in p_idate and
    e~recdu =  'L' .
    "group by aequnr deqktx feqfnr eidate erecdu erecdv.
    "endselect.
            wa_final-max_date = wa_final-max_date + wa_data-idate .
            wa_final-min_date  = wa_final-min_date + wa_data-idate .
            wa_final-max_km  = wa_final-max_km + wa_data-recdv.
            wa_final-min_km  = wa_final-min_km + wa_data-recdv.
            wa_final-max_hR  = wa_final-max_hr + wa_data-recdv.
            wa_final-min_hR  = wa_final-min_hr + wa_data-recdv.
            wa_final-max_lit = wa_final-max_lit + wa_data-recdv.
             wa_final-t_max_min_km   = ( wa_final-max_km - wa_final-min_km ).
             wa_final-t_max_min_hr  =  ( wa_final-max_hr - wa_final-min_hr ).
             "wa_final-t_max_min_lit   = ( wa_final-max_lit - wa_final-min_lit ).
              wa_final-t_fuel_con = wa_final-t_max_min_lit.
              wa_final-t_km_l = wa_final-t_max_min_km / wa_final-t_max_min_lit.
              wa_final-lit_per_hr  = wa_final-t_max_min_lit / wa_final-t_max_min_hr .    "  fuel comsumed / t_max_min_hr
      IF p_mode = 'A'.
        wa_final-equnr = wa_data-equnr.
        wa_final-eqktx = wa_data-eqktx.
        wa_final-eqfnr = wa_data-eqfnr.
        APPEND wa_final TO i_final.
      ELSE.
        MODIFY i_final FROM wa_final
          TRANSPORTING
              max_date
              min_date
              max_km
              min_km
              max_hr
              min_hr
              max_lit
              min_lit
              t_max_min_km
              t_max_min_hr
              where equnr = wa_data-equnr.
      ENDIF.
    "endselect.
    ENDFORM.                    " PREPARE_FINAL_REC

    Hi Ankit,
    If your quantity depends on your material movement type, then you can create a condition in Calculated Keyfig / Formula.
    That means as per your situation if the material movement type is 101 then quantity is incoming(+) and if the material movement type is 120 then outgoing(-).This can be done if the material movement type is fixed.
    Correct the logic if it is not right.
    Rgs,
    I.R.K

  • Fuel Consumption Report Modification - 21

    Hi Experts
    I am working on fuel consumption modification. can anyone help me how to get max and min value for this program
    I am getting one row correct with equipment no is enter but when I enter the range of equipment no it is taking long time and the result is repeating for each row
    please correct my report
    Thnaks in advanced
    Piroz
    REPORT Z_ESLP_FUEL2 LINE-SIZE  250 LINE-COUNT 75
             NO STANDARD PAGE HEADING.
    TABLES : equi,
             equz,
             imptt,
             imrg,
             eqkt,
             iloa.
    TYPES: BEGIN OF ty_equi," occurs 0,
           equnr type equi-equnr,
           END OF ty_equi.
    TYPES: BEGIN of ty_eqkt," occurs 0,
           equnr type eqkt-equnr,
           eqktx type eqkt-eqktx,
           END OF ty_eqkt.
    TYPES: BEGIN of ty_iloa ,"occurs 0,
           iloan type iloa-iloan,
           eqfnr type iloa-eqfnr,
           END OF ty_iloa.
    TYPES: BEGIN of ty_imptt," occurs 0,
           mpobj type imptt-mpobj,
           END of ty_imptt.
    TYPES: BEGIN of ty_imrg ,"occurs 0,
           idate type imrg-idate,
           recdv type imrg-recdv,
           recdu type imrg-recdu,
           END of ty_imrg.
    TYPES: BEGIN OF ty_data  ,
           equnr      type equnr,         " Euipment no
           eqktx      type eqkt-eqktx,    " Equipment Text
           eqfnr       type iloa-eqfnr,     " Equipment Sort field
           idate      type imrg-idate,    " Measuring Date
           recdu      type imrg-recdu,    " Unit of measuring ='KM','L','H'
           recdv      type imrg-recdv,    " Counter reading data
           END OF ty_data.
    TYPES: BEGIN OF ty_final,
           equnr           type equnr,            "  Equipment no
           eqktx           type eqkt-eqktx,       "  Equipment Text
           eqfnr           type iloa-eqfnr,       "  Equipment Sort field
           min_date        type imrg-idate,       "  Min Date
           min_km          type imrg-recdv,       "  Max Km
           max_km          type imrg-recdv,       "  Min km
           t_max_min_km    type i,                "  Total min_km-max_km
           max_date        type imrg-idate,       "  Max Date
           min_hr          type imrg-recdv,       "  Max hr
           max_hr          type imrg-recdv,       "  Min hr
           t_max_min_hr    type i,                "  Total min_hr-max_hr
           min_lit         type imrg-recdv,       "  Max lit
           max_lit         type imrg-recdv,       "  Min lit
           t_max_min_lit    type i,                "  Total min_lit-max_lit
           fuel_con        type p decimals 2,     "  Total_hrs / t_max_min_hr
           km_l            type p decimals 2,     "  km / L
           lit_per_hr      type i           ,     "  fuel comsumed / t_max_min_hr
           END OF ty_final.
    DATA: i_equi TYPE TABLE OF ty_equi,   "internal table
          wa_equi TYPE ty_equi, " work area
          i_eqkt TYPE TABLE OF ty_eqkt,   "internal table
          wa_eqkt TYPE ty_eqkt, " work area
          i_iloa TYPE TABLE of ty_iloa,   "internal table
          wa_iloa TYPE ty_iloa, " work area
          i_imptt TYPE TABLE of ty_imptt, "internal table
          wa_imptt TYPE ty_imptt,
          i_imrg  TYPE TABLE of ty_imrg,  "internal table
          wa_imrg TYPE ty_imrg,
          i_data TYPE TABLE OF ty_data,   "internal table
          wa_data TYPE ty_data, " work area
          i_final TYPE TABLE OF ty_final, " internal table
          wa_final TYPE ty_final. " work area
    DATA :  max_date type date ,
             min_date type date,
             max_km TYPE p DECIMALS 2,
             min_km TYPE p DECIMALS 2,
             max_hr TYPE p DECIMALS 2,
             min_hr TYPE p DECIMALS 2,
             max_lit TYPE p DECIMALS 2,
             min_lit TYPE p DECIMALS 2,
             t_max_min_km  TYPE p DECIMALS 2,
             t_max_min_hr TYPE p DECIMALS 2,
             t_max_min_lit TYPE p DECIMALS 2.
    SELECTION-SCREEN BEGIN OF BLOCK blk WITH FRAME.
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS: p_equnr FOR equi-equnr, "no-extension no intervals,
                    p_idate FOR imrg-idate.  "NO-EXTENSION NO INTERVALS OBLIGATORY,
                   " p_recdu FOR imrg-recdu." NO-EXTENSION NO INTERVALS ."default 'M3'" OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK blk1.
    SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002.
    SELECTION-SCREEN END OF BLOCK blk2.
    SELECTION-SCREEN END OF BLOCK blk.
    TOP-OF-PAGE.
      FORMAT INTENSIFIED ON.
      WRITE:/1(40) ' INVESTMENT LIMITED  '.
      WRITE:/50(40) ' FUEL CONSUMPTION REPORT ' CENTERED   ,
              2 'Page', sy-pagno.
      FORMAT INTENSIFIED OFF.
      WRITE:/50(40) '----
    ' CENTERED .
      FORMAT INTENSIFIED ON.
      WRITE:/2 sy-datum COLOR 3, sy-uzeit .
      "WRITE:/1 S903-SPMON ."p_yearf.
      ULINE.
      "CENTERED.
      write: /2 'Date From     :'.
      write: /2 'Equipment No  :'.
      write: /2 'Unit          :'.
      SKIP.
      ULINE.
      WRITE:/1 sy-vline,
        2   'EQUIP NO',              10 sy-vline,
        11  'NAME',                  40 sy-vline,
        41  'SORT',                  60 sy-vline,
        61  'MIN DATE',              74 sy-vline,
        75  'MIN KM',                87 sy-vline,
        88  'MAX DATE',                100 sy-vline,
        101  'MAX KM' ,              113 sy-vline,
        114 'TOTAL MAX-MIN',                126 sy-vline,
        127  'MIN HR',               139 sy-vline,
        140 'MAX HR',                152 sy-vline,
        153 'TOTAL MAX-MIN' ,               167 sy-vline,
        168 'MIN LIT',               180 sy-vline,
        181 'MAX LIT',               193 sy-vline,
        194 'TOTAL LIT',             206 sy-vline,
        207 'FUEL CON',              219 sy-vline,
        220 'KM L',                  232 sy-vline,
        233 'LIT PER KM',            246 sy-vline.
      FORMAT COLOR 3 ON.
      ULINE.
    END-OF-PAGE.
    START-OF-SELECTION.
    select a~equnr d~eqktx f~eqfnr e~idate e~recdu e~recdv
    into corresponding fields of table i_data
    from equi AS a
    inner join equz as b
    on a~equnr = b~equnr
    inner join iloa as f
    on b~iloan = f~iloan
    inner join imptt as c
    on a~objnr = c~mpobj
    inner join eqkt as d
    on a~equnr = d~equnr
    inner join imrg as e
    on e~point = c~point
    where a~equnr in p_equnr
    and
    e~idate in p_idate and
    e~recdu in ('KM','L','H').
    "e~recdu in p_recdu.
    equi
    *select equnr from equi into table i_equi
    *for all entries in I_DATA
    **where objnr = i_equnr-mpobj.
    *where equnr = i_data-equnr.
    *endselect.
    eqkt
    *select equnr eqktx into table I_eqkt
    *from eqkt
    *FOR ALL ENTRIES IN I_DATA
    *where equnr = i_data-Equnr.
    *endselect.
    iloa
    *select eqfnr into table I_iloa
    *from equz
    *FOR ALL ENTRIES IN I_DATA
    *on equziloan = iloailoan
    *where iloan = i_data-iloan .
    *endselect.
    imrg
    *select idate recdv recdu into table I_imrg
    *from imrg
    *FOR ALL ENTRIES IN I_DATA
    *where imrg~objnr = i_date-mpobj.
    *endselect.
    loop  at i_data into wa_data.
    CLEAR: wa_final.
      READ TABLE i_final into wa_final
               with key equnr = wa_data-equnr.
        if sy-subrc EQ 0.
         PERFORM prepare_get_equi.
         PERFORM prepare_get_eqkt.
         PERFORM prepare_get_iloa.
         PERFORM prepare_get_imptt.
         PERFORM prepare_get_imrg.
          PERFORM prepare_final_rec USING'M'. " Modify Existing Record
          ElSE.
          PERFORM prepare_final_rec USING'A'. " Append New Record.
        ENDIF.
        ENDLOOP.
        LOOP AT i_final into wa_final.
          SORT i_final by equnr  descending.
        at new equnr.
        read table i_final into wa_final index sy-tabix.
    WRITE:/1 sy-vline,
    2  wa_final-equnr                                                 , 10 sy-vline,
    11 wa_final-eqktx                                                 , 40 sy-vline,
    41 wa_final-eqfnr                                                 , 60 sy-vline,
    61 wa_final-min_date                                              , 74 sy-vline,
    75 wa_final-min_km EXPONENT 0 DECIMALS 2   LEFT-JUSTIFIED           , 87 sy-vline,
    88 wa_final-max_date EXPONENT 0 DECIMALS 2   LEFT-JUSTIFIED         , 100 sy-vline,
    101 wa_final-max_km EXPONENT 0 DECIMALS 2   LEFT-JUSTIFIED          , 113 sy-vline,
    114 wa_final-t_max_min_km EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED    , 126 sy-vline COLOR 2,
    127 wa_final-min_hr EXPONENT 0 DECIMALS 2   LEFT-JUSTIFIED          , 139 sy-vline,
    140 wa_final-max_hr EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED          , 152 sy-vline,
    168 wa_final-min_lit EXPONENT 0 DECIMALS 2  LEFT-JUSTIFIED         , 180 sy-vline,
    181 wa_final-max_lit EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED         , 193 sy-vline,
    194 wa_final-t_max_min_lit EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED   , 206 sy-vline COLOR 2.
    *168 wa_final-min_lit EXPONENT 0 DECIMALS 2  LEFT-JUSTIFIED         , 180 sy-vline,
    *194 wa_final-t_max_min_lit EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED   , 206 sy-vline COLOR 2,
    *207 wa_final-fuel_con EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED        , 219 sy-vline,
    *220 wa_final-km_l EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED            , 232 sy-vline,
    *233 wa_final-lit_per_hr EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED      , 246 sy-vline.
    uline.
    uline .
    endloop.
    FORM prepare_final_rec  USING    p_mode TYPE char1.
    select MAX( eidate ) Min( eidate ) MAX( erecdv ) MIN( erecdv )
    into  corresponding fields of (wa_final-max_date,wa_final-min_date, wa_final-max_km , wa_final-min_km)
    from equi AS a
    inner join equz as b
    on aequnr = bequnr
    inner join iloa as f
    on biloan = filoan
    inner join imptt as c
    on aobjnr = cmpobj
    inner join eqkt as d
    on aequnr = dequnr
    inner join imrg as e
    on epoint = cpoint
    where a~equnr in p_equnr
    and
    e~idate in p_idate and
    e~recdu =  'KM' .
    "group by aequnr deqktx feqfnr eidate erecdu erecdv.
    "endselect.
    select MAX( eidate ) Min( eidate ) MAX( erecdv ) MIN( erecdv )
    into corresponding fields of (wa_final-max_date, wa_final-min_date, wa_final-max_hr, wa_final-min_hr)
    from equi AS a
    inner join equz as b
    on aequnr = bequnr
    inner join iloa as f
    on biloan = filoan
    inner join imptt as c
    on aobjnr = cmpobj
    inner join eqkt as d
    on aequnr = dequnr
    inner join imrg as e
    on epoint = cpoint
    where a~equnr in p_equnr
    and
    e~idate in p_idate and
    e~recdu =  'H'.
    "group by aequnr deqktx feqfnr eidate erecdu erecdv.
    "endselect.
    select MAX( eidate ) Min( eidate ) MAX( erecdv ) MIN( erecdv ) SUM( e~recdv )
    into (wa_final-max_date,wa_final-min_date, wa_final-max_lit, wa_final-min_lit ,  wa_final-t_max_min_lit )
    from equi AS a
    inner join equz as b
    on aequnr = bequnr
    inner join iloa as f
    on biloan = filoan
    inner join imptt as c
    on aobjnr = cmpobj
    inner join eqkt as d
    on aequnr = dequnr
    inner join imrg as e
    on epoint = cpoint
    where a~equnr in p_equnr
    and
    e~idate in p_idate and
    e~recdu =  'L' .
    "group by aequnr deqktx feqfnr eidate erecdu erecdv.
    "endselect.
             wa_final-t_max_min_km   = ( wa_final-max_km - wa_final-min_km ).
             wa_final-t_max_min_hr  =  ( wa_final-max_hr - wa_final-min_hr ).
             "wa_final-t_max_min_lit   = ( wa_final-max_lit - wa_final-min_lit ).
            wa_final-fuel_con =
            fuel_con        type p decimals 2,     "  Total_hrs / t_max_min_hr
            km_l            type p decimals 2,     "  km / L
            lit_per_hr      type i           ,     "  fuel comsumed / t_max_min_hr
      IF p_mode = 'A'.
        wa_final-equnr = wa_data-equnr.
        wa_final-eqktx = wa_data-eqktx.
        wa_final-eqfnr = wa_data-eqfnr.
        APPEND wa_final TO i_final.
      ELSE.
        MODIFY i_final FROM wa_final
          TRANSPORTING
              max_date
              min_date
              max_km
              min_km
              max_hr
              min_hr
              max_lit
              min_lit
              t_max_min_km
              t_max_min_hr
              where equnr = wa_data-equnr.
      ENDIF.
    "endselect.
    ENDFORM.                    " PREPARE_FINAL_REC

    Hi,
      I don't think so that there is such report which will give you operation wise consumption but you can make that fuel consumption as a activity type in ur standard value key and make some std value to put it in the routing, then if you go for operation wise confirmation then in that screen you will be able to put the consumption details in it.
    you can take a report of that also in COOIS.
    order wise consumption you can get from order report itself
    reward poits if you find it useful.

  • 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

  • CP6 internal server reporting modifications - Post Results - Continue button

    I have searched the forum for similar issues, and have posed one or two questions, but I am struggling to get a clear direction as to how to post quiz results to an internal server automatically (including user variables), without the name/email dialog screen appearing. In addtion, to CLOSE the browser, on the Quiz Results slide,I have tried multiple options with the continue button, including a javascript command of: 
    top.window.close();
    (courtesy of Colday213)
    But this did not work for me when I tried to enter the script into the quiz preferences area (can't directly edit the continue button on the quiz results slide).
    I have already been posting practice results to my website using the standard INTERNAL SERVER reporting method.
    BUT --- here is my wish list --- to modify the process
    1. Capture user variables (First name, Last name, student ID and student number) and post them with the quiz results. I have a slide setup to to do this.
    2. Post results AUTOMATICALLY to the internal server without showing the Quiz Results slide at all.
    3. Have the quiz exit the browser completely once the quiz has been taken.
    My quiz results slide has TWO renamed buttons: SEND EXAM (Post results) and EXIT (Continue). My preferences on either pass or fail are "Continue". I have even made the "score" tiny font, and invisible (black text on black background), so the reults page shows (and which I wish did not appear).
    Perhaps only a LMS is the method to allow the above, but I may not have an LMS option --- hence, the internal server method..

    I will investigate the google spreadsheet option as that may solve the first two issues.
    Regarding the last item, EXITING the quiz (closing the browser) --- since the user gets to an ending slide that asks them if they are satisfied with their user variables entered at the start, perhaps I can program the javascript "exit" command on that slide, once the use varifies the data is correct?  Currently, a "continue" button appears after user data is verified, and then the button advances to the RESULTS slide, so that the resuls can be posted, which invokes the standard name/email dialog.
    If the widget posts the quz results to the google spreadsheet after the last question has bee answered, then I can either HIDE (skip) the results slide, or choose "don't show" (uncheck) the quiz results box in the preferences, and have the verification slide appear. Then, I just need to make the browser close from there (probably with a button).
    I will experiment with this option.
    I was also wondering if I can edit the PHP file that collects the quiz results to include the user variables?

  • Std report modifications.......................can anybody help me

    Hi ,
    This is my first object of this type......
    Can any body guide me... how to start......
    Report i want to modify is RIIMR020 ( Tcode ik17 ).
    I want to add kostl Cost center field to output and i have to do sub totals and totals for cdiff field.
    Thnaks and Regards..

    Hi,
    You would have authorization to do that.
    To modify the app report you have options like insert, delete and modify in the application tool bar by wihch you can do this.
    rgds,
    madan.k

  • MB5B transaction report modification

    Dear SAP gurus,
    Can anybody help me to add material group and material type in MB5B transaction report .
    thanks and regards
    Amit

    Have you set the time in the Setup screen of the printer?
    Please mark my post as SOLVED if it has resolved your problem. It helps others with similar situations.

  • FI Report modification in report painter

    Hi,
    We have few reports created through reports painter.
    Now neeed to modify one of the report group to add in another account number for the P& L report.
    Pl advice on the steps.
    rgds
    neha

    Hi Neha
    As you have created Reports through reports painter , then add in the reports the account number feild  through Reports painter only. ( As you have created reports through reports painter )
    If you have configured the reports painter then just go to change mode and add the feild  or else take the help of the ABAP'er
    Regards
    Srinath

  • ALV Report - modifications.

    Hi gurus, iam doing a report program,
    iam using ALV display for this.
    'REUSE_ALV_GRID_DISPLAY'..
    Now i have small points to clarify:
    1.drill down for any field in the report
    2. color for SUB-TOTALS rows(different colors for different sub-total rows).
    3.* I have few fields of NUMC type. so while calculation if it is 0. The field is shown as blank in ALV. so can i show 0 instaed of blank for numc fields.*
    Hi please dont give any demo programs, i just need to clarify only the above points. please just tell me point wise which fields shud be set .
    Points will be rewarded.  Thanks in Advance.
    urs, Chaitu

    hi  i did checked the field with the type n ..it is showing a blank ..i hope there is nothing to do..see this example..
    REPORT  ztest_alv_perc_13317.
    TYPE-POOLS: slis.
    DATA: it_fieldcat TYPE slis_t_fieldcat_alv,
          wa_fieldcat TYPE slis_fieldcat_alv,
          it_events TYPE slis_t_event,
          wa_events TYPE slis_alv_event,
          it_sort TYPE slis_t_sortinfo_alv,
          wa_sort TYPE slis_sortinfo_alv,
          l_layout TYPE slis_layout_alv.
    TYPES: BEGIN OF ty_itab,
            field1(10),
            qty1 TYPE i,
            qty2 TYPE i,
            qty3 TYPE n,
          END OF ty_itab.
    DATA: itab TYPE STANDARD TABLE OF ty_itab WITH  HEADER LINE,
    itab1 TYPE ty_itab.
    START-OF-SELECTION.
      itab-field1 = 'FIRST'.
      itab-qty1 = 2.
      itab-qty2 = 1.
      itab-qty3 = 0.
      APPEND itab.
      itab-field1 = 'FIRST'.
      itab-qty1 = 2.
      itab-qty2 = 1.
      itab-qty3 = 5.
      APPEND itab.
      itab-field1 = 'FIRST'.
      itab-qty1 = 2.
      itab-qty2 = 1.
      itab-qty3 = 5.
      APPEND itab.
      wa_fieldcat-col_pos = 1.
      wa_fieldcat-fieldname = 'FIELD1'.
      wa_fieldcat-reptext_ddic = 'field1'.
      APPEND wa_fieldcat TO it_fieldcat.
      wa_fieldcat-col_pos = 2.
      wa_fieldcat-fieldname = 'QTY1'.
      wa_fieldcat-reptext_ddic = 'field2'.
      wa_fieldcat-do_sum = 'X'.
      APPEND wa_fieldcat TO it_fieldcat.
      wa_fieldcat-col_pos = 3.
      wa_fieldcat-fieldname = 'QTY2'.
      wa_fieldcat-reptext_ddic = 'field3'.
      wa_fieldcat-do_sum = 'X'.
      APPEND wa_fieldcat TO it_fieldcat.
      wa_fieldcat-col_pos = 4.
      wa_fieldcat-fieldname = 'QTY3'.
      wa_fieldcat-reptext_ddic = 'field4'.
      wa_fieldcat-do_sum = 'X'.
      APPEND wa_fieldcat TO it_fieldcat.
      l_layout-totals_text = 'total text'.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
         i_callback_program           = sy-repid
         it_fieldcat                    = it_fieldcat
        TABLES
          t_outtab                       = itab .

  • ESS Create Expense Report Modification

    Hi,
    we are using EP70, ERP2005 and BP 1.0 for ESS and MSS,
    We are using the Web Dynpro Application "Create Travel Expense Report"
    The first screen is a selection screen for "Travel Scheme"
    This screen is empty and you can select a travel scheme via drop down box.
    Is there a way to make one entry from the drop down box the default value rather than just "no" entry?
    P.S. We do NOT have NWDI in place right now
    thx
    hs
    PPS: Points guranteed

    Hi,
    I believe you need to change the source code in the webdynpro application to set one of the values as default value.
    You need to set up the JDI or NWDI to change the source code. Please have a look at this SAP Note if you want to set up JDI/NWDI to change the source code.
    Hope this helps.
    Cheers,
    Sunil
    PS: Reward points for helpful answers.

  • Account Analysis report (Modification adding Customer)

    Dear All,
    I just want to know is there any way to Modify Account Analysis Report (Subledger) modified by adding Supplier Name.
    Thanks
    Rehan

    Hi Rehan;
    Please check below which could be helpful for your issue:
    XLAAARPT: Account Analysis Report Errors with Warning: Due to High Volume Of Data Got Out Of Memory Exception Please Retry With Scalable Option Or Modify The Data Template To Run In Scalable Mode [ID 1304660.1]
    Regard
    Helios

  • Standard report output modification

    Dear,
    we have one requirement in Standard report modification that is i would like to add some fields columns in the output. For this i have added what ever fields i want in the final internal table but those are not displaying in the output so please guide me to do this.
    those fiedls i added are not coming in the field catalog also . standard program is from IA09 Transaction.
    Venkata Ramesh J

    hi venkata
    check this thread
    how to add new fields to standard reports
    hope it helps you.
    thanks
    SAchin

  • Report to XML HELP!

    I wrote a previous question about this, but perhaps I can
    clarify my problem. I need to run a report and output the
    results to an XML file. There is a template for the file that
    looks like the following:
    <forms>
    <form_551>
    <state>
    <value>Ohio</value>
    </state>
    <year>
    <value>1994</value>
    </year>
    </form_551>
    </forms>
    The data that the report outputs needs to be placed between the
    value tags. I've read in the documentation about how to use XML
    files to customize a reports output, but I'm not sure how to
    make the output a separate file. There are 208 tags in the XML
    template. I've tried changing the XML tags in the groups, and
    that sort of works, but some of the values are static and still
    need to have their own group (according the the template, every
    variable or field must have a separate group, i.e.
    <state>value</state>, <city>value</city>, etc).If anyone can
    help, I'd GREATLY appreciate it. This matter is fairly urgent.
    Andrew

    I opened a SR with Oracle support and their response was:
    The reason XML Publisher is failing while generating the output is because the parser is failing
    . This is because the XML document you used is not wellformed. XML elements cann
    ot use spaces in their definition without specifying this by an attibute.
    Please confirm once again that this is a seeded report and no customizations were appl
    ied to it - the XML output file is by default generated using <APPLICATIONS TEMP
    LATE REPORT> element. If this is true, the problem should be delt by product sup
    port team in order for the development team to generate correectly the output.
    Then the Product support team gave me the following response:
    For 11i, there is no time frame as they are not working on any new enhancements. And I cannot log an R12 enhancement because you a
    re not using R12 and the system wont let me log it for you at this time. And ev
    en if I could log it for R12, we do not have any idea of when DEV would release
    an enhancement.
    I guess the answer is another report modification :o(

  • Annual Operations Report Spain - new model for 2012

    Dear experts,
    there is a change in the reporting of the model known as 347 (model 347 tax office)  in Spain.
    In SAP we usually used report RFUSVS14 (S_PL0_09000158) and creating a file through RFUSVX11 (S_PL0_09000159)
    The structure has been changed for the annual reporting of operations from 2012 on - there should be a new report or a SAP Note that changes the actual structure to the new one.
    Does anybody know if there is a SAP Note for this issue?
    Thank you in advance.
    Daniel

    Thanks for your reply.               
    But the Note 1667296 related is only for SAP Business One Release 8.81 patch level 11               
    Meanwhile I found the correct messages for this issue :          
    FI-GL-GL-F1      1679094     Model 347:New Legal Change applicable from 2012      10.02.2012
    SBO-LOC-ES      1667315     ES - 347 Report Modification      10.02.2012
    FI-GL-GL-F1      1657669     RFIDESM340:New Legal Change applicable from January,2012      06.02.2012
    Daniel Simon

  • Financial Reports User Tracking

    Hi Guys
    Can any one tell me how to track the user login, report modification, creation and deletion kind of activities in FR--System 9.X??
    Appreciate your inputs..
    Thanks
    Jagan

    Thanks for your response.
    Can you explain how can we set up this user tracking for FR and WA reports. I think this usage tracking is only for IR reports.
    Really appreciate if you can share your experiance on this...
    Thanks
    Jagan

Maybe you are looking for

  • Error while updating software on iphone and it got wiped out, now what?

    I was updating my iphone software through iTunes, and there was an error.  Now my iPhone won't even show a screen, just an image of a USB cable pointing to an iTunes logo.  I rebooted both phone and computer. Nothing.  I uninstalled iTunes and all re

  • How can i buy an unlock iphone 5? Please help

    How I can buy an unlock iphone 5 in US?. I heard that Apple let people pre-ordered unlock iphone 5. But after 1 hour, they took it down. So what I see right now is only pre-order for the phone with contract

  • MacBook Pro 1.83GHz or 2GHz

    Just in general which one do you think is the better value and which would you prefer. The price diference as you know is around $500 plus tax. Do you think what you get with the upgraded version is worth the price (2Ghz, 1gig Ram, and 100GB Hard Dri

  • Running  a webApplication using struts

    Hi forum, I am using struts & in index.jsp I have used following lines of code <code> <html:form action="Lookup" name="lookupForm" type="Project.LookupForm" > <table width="45%" border="0"> <tr><td>Symbol:</td> <td><html:text property="symbol" /></td

  • Active table search

    I am trying to emulate the pop-up box in outlook for the global address list.  Some functionality I'm looking for is while the user begins to type in the last name, the table scrolls automatically up or down displaying the names accordingly.  I have