MB5T background schedule ouput in alv format

Hi all,
Please help me to get MB5T report ouput of background schedule in ALV.
I have put that report in bacground scheduling & the output of the same in BEST format but my client want the output in AlV format.
Please suggest.
Regards,
Anant

Output of MB5T can't be in ALV format in background. In foreground also this is done in two steps., In first system display in BEST format..this can be changed to ALV manually in second step.

Similar Messages

  • Send ALV report as email attachment but in background scheduling mode

    Hi All,
           I have ALV report which runs fine in  the foreground.
    But i need to display it in the spool that is by scheduling in the background.
    can i send an excel attachement as e-mail in the background scheduling?  my report contains
    10 columns and i need them in proper format on excel sheet attachment? plz help me out?if possible
    give me abap code..

    HI,
    Use the below link
    Sending Mail to the schedular of Background Job
    Thanks

  • ABAP Custom Report (ALV Format) in Background Processing

    Hi
    I am not the hardcore ABAP Person. But want to know about the detail fact of the ABAP Custome Reports. The question is can we do the background processing for the ABAP Custome Report in ALV Format.
    If Yes ..do we require to have any additional Function/code to get the spool in ALV Format. I saw the comments that the output will look like the mess.
    Please share your comment or any useful documenation on this. We are in ECC 6.0
    Thanks in advance..and yes it will be rewared by points.
    Navin

    You can use alv's in background using docking containers, but the display wont be interactive. If you search the forum you will see tons of threads which talk about running ALV's in background.
    For the output to be interactive, you can run the report in foreground and do the data processing in background.
    Refer this link:
    Displaying ALV Grid in Background Job

  • Default ALV format for MB5T Report

    Dear Experts ,
    I want to have a defalut selection of ALV format for MB5T report .
    How can I do this .
    Regards
    Anis

    Hi Chakrapani ,
    Please suggest if there is any other way to tackle it without the intervention of ABAPer .
    Regards
    Anis

  • Failed to schedule report in Excel format

    We have successfully scheduled report in PDF format, however, we go the error message "Error in File D:\Business Objects\BusinessObjects Enterprise 11.5\Data\procSched\eagnmnsx2c5.reportjobserver\~tmp2ee063064fe000e.rpt: The request could not be submitted for background processing" if we select excel as schedule format.
    Anyone has any idea why it's happened?
    Thank you very much for your help.

    If you are using BOE Java SDK please refer to the following link for the code:
    http://wiki.sdn.sap.com/wiki/display/BOBJ/JavaBusinessObjectsEnterpriseSDKSamples
    Select Scheduling option to get quick access to the code.
    Also see if you can schedule the report to excel format through CMC or not.
    Regards,
    Anuj

  • Background Scheduling Z Report

    Hi,
    I have developed one report , it can output its result in alv report and excel file, So my requirement is to schedule the report and in background only email the report to the specified email id's. How can I achieve functionality of background scheduling and automatic email.
    I know we can do background scheduling with SA38 or SM36/SM37 but upon scheduling it is not saving my excel file at desired location.
    Ankesh

    You should search forums about this....
    You will need to save to the SAP Application server (in a folder which has write permission for SAP jobs) and possibly FTP to some shared drive within the network.  Local PC, local MS network, like C:\, D:\, etc. is not visible to a background job, since there is NO GUI/PRESENTATION server involved in a background job.  Outside of MS Office, an .XLS file is an unknown file type, probably....  how do you think you're creating a .XLS file in a background SAP job?

  • Classical List to ALV format in sap abap report

    Hi All,
    I have a requirement to change the existing abap report in which teh output is dispalyed in classical list format.
    I want to convert this list report output into ALV format.
    COuld anyone please help me how to convert this from Classical list to ALV format?
    Thanks,
    Komal.
    Moderator message: sorry, this not the place to teach the basics, please search for available information. If you understand the classical list and how to use ALV, then you can also do the transfer yourself.
    Edited by: Thomas Zloch on Aug 12, 2011 4:44 PM

    This will be very difficult for you.....
    Since you are getting a time out error....it looks like, you are runnning this report in foreground....................
    Try running it in background it will work...
    ELSE....you have to fetch in small chunks....but the question is how will you do it. Since the USR02 only has BNAME as primary key...
    Either put the BNAME as part of selection screen and fetch the data.....it will solve your problem....
    Only fetch for those BNAME which is entered in the selection screen...
    Hope it helps!

  • Modification in report into ALV Format

    Hi Experts
    How can I modify this report in ALV Format with Top of page and Parameters should be display on runtime.
    Can anyone modify my program please
    Thanks in advanced.
    REPORT FZEL LINE-SIZE  220 LINE-COUNT 75
             NO STANDARD PAGE HEADING.
    TABLES : equi,
             equz,
             imptt,
             imrg,
             eqkt,
             iloa.
    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
             cancl       type imrg-cancl,
           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
             idate               type imrg-idate,       "  Measuring Date
             min_date_km     type imrg-idate,       "  Min Date
             min_km          type imrg-recdv,       "  Max Km
             max_date_km     type imrg-idate,
             max_km          type imrg-recdv,       "  Min km
             t_max_min_km    type imrg-recdv,       "  Total min_km-max_km
             min_date_hr     type imrg-idate,       "  Max Date
             min_hr          type imrg-recdv,       "  Max hr
             max_date_hr     type imrg-idate,
             max_hr          type imrg-recdv,       "  Min hr
             t_max_min_hr    type imrg-recdv,                "  Total min_hr-max_hr
             min_date_lit    type imrg-idate,
             min_lit         type imrg-recdv,       "  Min lit
             max_date_lit    type imrg-idate,
             max_lit         type imrg-recdv,       "  Max lit
             fuel_con        type imrg-recdv,       "  Total_hrs / t_max_min_hr
             fuel_con2       type imrg-recdv,       "  Total_hrs / t_max_min_hr
             km_l            type imrg-recdv,       "  t max_min_km / t_max_min_lit
             l_p             type imrg-recdv ,          "  t_max_min_lit / t_max_min_hr
             l_p2            type imrg-recdv ,
           END OF ty_final.
    DATA: 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
    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 OBLIGATORY, "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:/55(40) ' WAGNERS INVESTMENT LIMITED  '.
      WRITE:/50(40) ' VEHICLE 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 'Equipment No :'left-justified,p_equnr-low  color 2 , '  to   '  , p_equnr-high color 2.
    write: /2 'Date From    :', p_idate-low color 2 ,  ' to  '  , p_idate-high color 2.
    "write: /2 'Sort Field:'left-justified,p_eqfnr-low  color 2 , '  to   '  , p_eqfnr-high color 2.
    SKIP.
      ULINE.
    WRITE:/1 sy-vline,
        2   ' EQUIP#',                10 sy-vline ,
        11  ' NAME',                  40 sy-vline,
        41  ' SORT',                  60 sy-vline,
        61  ' START DATE',            74 sy-vline,
        75  ' END DATE',               87 sy-vline,
        88  ' START KM',              100 sy-vline,
        101 ' END KM' ,               113 sy-vline,
        114 ' TOTAL KM',              126 sy-vline,
        127 ' START HR',              139 sy-vline,
        140 ' END HR',                152 sy-vline,
        153 ' TOTAL HR',              167 sy-vline,
        168 ' FUEL CON ',             180 sy-vline,
        181 ' KM L',                  193 sy-vline,
        194 ' LIT PER HR ',           206 sy-vline,
        207 ' EQUIP NO',              220 sy-vline,
        223 'KM L',                  232 sy-vline,
        233 'LIT PER KM',            245 sy-vline,
        246 'TOTAL L/HR',            258 sy-vline.
      FORMAT COLOR 3 ON.
      ULINE.
    END-OF-PAGE.
    START-OF-SELECTION.
    select aequnr deqktx feqfnr eidate erecdu erecdv
    into table i_data
    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~cancl ne 'X'.
    loop  at i_data into wa_data.
    CLEAR: wa_final.
      READ TABLE i_final into wa_final
               with key equnr = wa_data-equnr." BINARY SEARCH.
        if sy-subrc EQ 0.
          PERFORM F_GET_MAX_DATA.
          PERFORM F_GET_MAX_HOURS.
          PERFORM F_GET_MAX_LIT.
          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.
    on change of wa_final-equnr.
    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_km  color 2                                        , 74 sy-vline,
    75 wa_final-max_date_km  color 2 LEFT-JUSTIFIED                         , 87 sy-vline,
    88 wa_final-min_km EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED   color 3       , 100 sy-vline,
    101 wa_final-max_km EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED   color 3      , 113 sy-vline,
    114 wa_final-t_max_min_km EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED          , 126 sy-vline,
    127 wa_final-min_hr EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED color 4        , 139 sy-vline,
    140 wa_final-max_hr EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED color 4        , 152 sy-vline,
    153 wa_final-t_max_min_hr EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED          , 167 sy-vline,
    168 wa_final-fuel_con2 EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED             , 180 sy-vline,
    181 wa_final-km_l EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED            ,193 sy-vline,
    194 wa_final-l_p2 EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED  color  2        , 206 sy-vline,
    207 wa_final-equnr                                                      ,220 sy-vline.
    endon.
    endloop.
    refresh i_final.
    clear i_final.
    FORM F_GET_MAX_DATA.
    select single MAX( eidate ) Min( eidate ) MAX( erecdv ) MIN( erecdv )
    into  corresponding fields of (wa_final-max_date_km,wa_final-min_date_km,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~cancl ne 'X' and
    e~recdu =  'KM'
    AND a~equnr = wa_data-equnr.
    ENDFORM.
    FORM F_GET_MAX_HOURS.
    select single MAX( erecdv ) MIN( erecdv )
    into corresponding fields of (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~cancl ne  'X' and
    e~recdu =  'H'
    AND a~equnr = wa_data-equnr  .
    ENDFORM.
    FORM F_GET_MAX_LIT.
    select SUM( e~recdv )
    into corresponding fields of (wa_final-fuel_con2)
    from equi AS a
    inner join eqkt as b
    on bequnr = aequnr
    inner join imptt as c
    on cmpobj = aobjnr
    inner join imrg as e
    on epoint = cpoint
    where a~equnr in p_equnr
    and
    e~idate in p_idate
    and
    e~cancl ne  'X' and
    e~recdu =  'L'
    AND a~equnr = wa_data-equnr.
    ENDFORM.
    FORM prepare_final_rec  USING    p_mode TYPE char1.
    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.
    if  wa_final-t_max_min_km <> 0 .
    wa_final-km_l =  ( wa_final-max_km - wa_final-min_km )  /  ( wa_final-fuel_con2 ) .
    ELSE.
    wa_final-km_l = 0.
    endif.
    if  wa_final-t_max_min_hr <> 0  .
    wa_final-l_p2 = ( wa_final-fuel_con2 ) / (  wa_final-t_max_min_hr ) .
    ELSE.
    wa_final-l_p2 = 0.
    endif.
      IF p_mode = 'A'.
        wa_final-equnr = wa_data-equnr.
        wa_final-eqktx = wa_data-eqktx.
        wa_final-eqfnr = wa_data-eqfnr.
        wa_final-t_max_min_km = wa_final-min_km - wa_final-max_km .
        wa_final-t_max_min_hr = wa_final-max_hr - wa_final-min_hr.
        wa_final-km_l =  ( wa_final-max_km - wa_final-min_km ) /  ( wa_final-fuel_con2 ).
        wa_final-l_p2 = ( wa_final-fuel_con2 ) / (  wa_final-t_max_min_hr ) .
        APPEND wa_final TO i_final  .
      ELSE.
        MODIFY i_final FROM wa_final
          TRANSPORTING
              eqfnr
              max_date_km
              min_date_km
              max_date_lit
              min_date_lit
              max_date_hr
              min_date_hr
              max_km
              min_km
              max_hr
              min_hr
              t_max_min_km
              t_max_min_hr
              fuel_con2
              km_l
              l_p2
              where equnr = wa_data-equnr.
      ENDIF.
    ENDFORM.                    " PREPARE_FINAL_REC

    Hi Guys
    Thanks for your reply, I know how to implement the FM for ALV but little confused where to call , See my correction below it is displaying the result in different way that ie...first displaying Equipment no, name,.correctly but the other values such as km,L,HR all are displaying zero first, when I press back then it is displying the value twice thrise........keep on displaying duplicate records continuesly when back back is press can anyone correct this please
    REPORT  XYZ LINE-SIZE  220 LINE-COUNT 75
             NO STANDARD PAGE HEADING.
    TABLES : equi,
             equz,
             imptt,
             imrg,
             eqkt,
             iloa.
    type-pools: slis.                                 "ALV Declarations
    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
             cancl       type imrg-cancl,
           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
             idate               type imrg-idate,       "  Measuring Date
             min_date_km     type imrg-idate,       "  Min Date
             min_km          type P DECIMALS 2,       "  Max Km
             max_date_km     type imrg-idate,
             max_km          type P DECIMALS 2,       "  Min km
             t_max_min_km    type P DECIMALS 2,       "  Total min_km-max_km
             min_date_hr     type imrg-idate,       "  Max Date
             min_hr          type P DECIMALS 2,       "  Max hr
             max_date_hr     type imrg-idate,
             max_hr          type P DECIMALS 2,       "  Min hr
             t_max_min_hr    type P DECIMALS 2,                "  Total min_hr-max_hr
             min_date_lit    type imrg-idate,
             min_lit         type P DECIMALS 2,       "  Min lit
             max_date_lit    type imrg-idate,
             max_lit         type P DECIMALS 2,       "  Max lit
             fuel_con        type P DECIMALS 2,       "  Total_hrs / t_max_min_hr
             fuel_con2       type P DECIMALS 2,       "  Total_hrs / t_max_min_hr
             km_l            type P DECIMALS 2,       "  t max_min_km / t_max_min_lit
             l_p             type P DECIMALS 2 ,      "  t_max_min_lit / t_max_min_hr
             l_p2            type P DECIMALS 2 ,
           END OF ty_final.
    *ALV data declarations
    data: fieldcatalog type slis_t_fieldcat_alv with header line,
          gd_tab_group type slis_t_sp_group_alv,
          gd_layout    type slis_layout_alv,
          gd_repid     like sy-repid.
    DATA: 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
    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 OBLIGATORY, "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:/55(40) ' WAGNERS INVESTMENT LIMITED  '.
      WRITE:/50(40) ' VEHICLE 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 'Equipment No :'left-justified,p_equnr-low  color 2 , '  to   '  , p_equnr-high color 2.
    write: /2 'Date From    :', p_idate-low color 2 ,  ' to  '  , p_idate-high color 2.
    END-OF-PAGE.
    START-OF-SELECTION.
    select aequnr deqktx feqfnr eidate erecdu erecdv
    into table i_data
    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~cancl ne 'X'.
    loop  at i_data into wa_data.
    CLEAR: wa_final.
      READ TABLE i_final into wa_final
               with key equnr = wa_data-equnr." BINARY SEARCH.
        if sy-subrc EQ 0.
          PERFORM F_GET_MAX_DATA.
          PERFORM F_GET_MAX_HOURS.
          PERFORM F_GET_MAX_LIT.
          PERFORM prepare_final_rec USING'M'. " Modify Existing Record
         ElSE.
          PERFORM prepare_final_rec USING'A'. " Append New Record.
          perform build_fieldcatalog.
          perform build_layout.
          perform display_alv_report.
        ENDIF.
       ENDLOOP.
    refresh i_final.
    clear i_final.
    FORM F_GET_MAX_DATA.
    select single MAX( eidate ) Min( eidate ) MAX( erecdv ) MIN( erecdv )
    into   corresponding fields of (wa_final-max_date_km,wa_final-min_date_km,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~cancl ne 'X' and
    e~recdu =  'KM'
    AND a~equnr = wa_data-equnr.
    ENDFORM.
    FORM F_GET_MAX_HOURS.
    select single MAX( erecdv ) MIN( erecdv )
    into corresponding fields of (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~cancl ne  'X' and
    e~recdu =  'H'
    AND a~equnr = wa_data-equnr  .
    ENDFORM.
    FORM F_GET_MAX_LIT.
    select SUM( e~recdv )
    into corresponding fields of (wa_final-fuel_con2)
    from equi AS a
    inner join eqkt as b
    on bequnr = aequnr
    inner join imptt as c
    on cmpobj = aobjnr
    inner join imrg as e
    on epoint = cpoint
    where a~equnr in p_equnr
    and
    e~idate in p_idate
    and
    e~cancl ne  'X' and
    e~recdu =  'L'
    AND a~equnr = wa_data-equnr.
    ENDFORM.
    FORM prepare_final_rec  USING    p_mode TYPE char1.
    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.
    if  wa_final-t_max_min_km <> 0 .
    wa_final-km_l =  ( wa_final-max_km - wa_final-min_km )  /  ( wa_final-fuel_con2 ) .
    ELSE.
    wa_final-km_l = 0.
    endif.
    if  wa_final-t_max_min_hr <> 0  .
    wa_final-l_p2 = ( wa_final-fuel_con2 ) / (  wa_final-t_max_min_hr ) .
    ELSE.
    wa_final-l_p2 = 0.
    endif.
      IF p_mode = 'A'.
        wa_final-equnr = wa_data-equnr.
        wa_final-eqktx = wa_data-eqktx.
        wa_final-eqfnr = wa_data-eqfnr.
        wa_final-t_max_min_km = wa_final-min_km - wa_final-max_km .
        wa_final-t_max_min_hr = wa_final-max_hr - wa_final-min_hr.
        wa_final-km_l =  ( wa_final-max_km - wa_final-min_km ) /  ( wa_final-fuel_con2 ).
      gd_repid = sy-repid.
        wa_final-l_p2 = ( wa_final-fuel_con2 ) / (  wa_final-t_max_min_hr ) .
        APPEND wa_final TO i_final  .
      ELSE.
        MODIFY i_final FROM wa_final
          TRANSPORTING
              eqfnr
              max_date_km
              min_date_km
              max_date_lit
              min_date_lit
              max_date_hr
              min_date_hr
              max_km
              min_km
              max_hr
              min_hr
              t_max_min_km
              t_max_min_hr
              fuel_con2
              km_l
              l_p2
              where equnr = wa_data-equnr.
      ENDIF.
    ENDFORM.                    " PREPARE_FINAL_REC
    *&      Form  BUILD_FIELDCATALOG
          Build Fieldcatalog for ALV Report
    form build_fieldcatalog.
                  I.e. Field type may be required in-order for
                       the 'TOTAL' function to work.
      fieldcatalog-fieldname   = 'EQUNR'.
      fieldcatalog-seltext_m   = 'Equip no'.
      fieldcatalog-tabname     =  'i_final'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      fieldcatalog-key         = 'X'.
    fieldcatalog-do_sum      = 'X'.
    fieldcatalog-no_zero     = 'X'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'EQKTX'.
      fieldcatalog-seltext_m   = 'Description'.
        fieldcatalog-tabname     =  'i_final'.
      fieldcatalog-col_pos     = 1.
    append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'EQFNR'.
      fieldcatalog-seltext_m   = 'Sortfield'.
        fieldcatalog-tabname     =  'i_final'.
      fieldcatalog-col_pos     = 2.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MIN_DATE_KM'.
      fieldcatalog-seltext_m   = 'Min Date'.
        fieldcatalog-tabname     =  'i_final'.
      fieldcatalog-col_pos     = 3.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MAX_DATE_KM'.
      fieldcatalog-seltext_m   = 'Max Date'.
        fieldcatalog-tabname     =  'i_final'.
      fieldcatalog-col_pos     = 4.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MIN_KM' .
      fieldcatalog-seltext_m   = 'Min KM'.
        fieldcatalog-tabname     =  'i_final'.
      fieldcatalog-col_pos     = 5.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MAX_KM' .
      fieldcatalog-seltext_m   = 'Max KM'.
        fieldcatalog-tabname     =  'i_final'.
      fieldcatalog-col_pos     = 6.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'T_MAX_MIN_KM' .
        fieldcatalog-tabname     =  'i_final'.
      fieldcatalog-seltext_m   = 'Total KM'.
      fieldcatalog-col_pos     = 7.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    fieldcatalog-fieldname   = 'MIN_HR' .
      fieldcatalog-seltext_m   = 'Min Hr'.
        fieldcatalog-tabname     =  'i_final'.
      fieldcatalog-col_pos     = 8.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MAX_HR' .
      fieldcatalog-seltext_m   = 'Max Hr'.
        fieldcatalog-tabname     =  'i_final'.
      fieldcatalog-col_pos     = 9.
    append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'T_MAX_MIN_HR' .
      fieldcatalog-seltext_m   = 'Total HR'.
        fieldcatalog-tabname     =  'i_final'.
      fieldcatalog-col_pos     = 10.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'FUEL_CON2' .
      fieldcatalog-seltext_m   = 'Km/L'.
        fieldcatalog-tabname     =  'i_final'.
      fieldcatalog-col_pos     = 11.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'L_P2' .
      fieldcatalog-seltext_m   = 'Lit/HR'.
        fieldcatalog-tabname     =  'i_final'.
      fieldcatalog-col_pos     = 12.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    endform.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
          Build layout for ALV grid report
    form build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
    gd_layout-totals_only        = 'X'.
    gd_layout-f2code            = 'DISP'.  "Sets fcode for when double
                                            "click(press f2)
    gd_layout-zebra             = 'X'.
    gd_layout-group_change_edit = 'X'.
    gd_layout-header_text       = 'helllllo'.
    endform.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
          Display report using ALV grid
    form display_alv_report.
      gd_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
               i_callback_top_of_page   = 'TOP-OF-PAGE'  "see FORM
               i_callback_user_command = 'USER_COMMAND'
               i_grid_title           = outtext
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
               it_special_groups       = gd_tabgroup
               IT_EVENTS                = GT_XEVENTS
                i_save                  = 'X'
               is_variant              = z_template
           tables
                t_outtab                = i_final
                exceptions
                program_error           = 1
                others                  = 2.
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    endform.                    " DISPLAY_ALV_REPORT

  • Gui_download Function module is not working in Background Scheduling

    Hi Experts,
    Function modules like GUI_DOWNLOAD are not working in background scheduled jobs, It is raising an exception. Though it is working fine in foreground execution.
    Please provide me solution for this challenging task.
    you could be rated well for this question.
    Thanks,
    Rama Krishna.

    Hello,
    work with open dataset and close dataset...
    just loop over itab and transfer itab field for field into a string field separated by ;
    Here is an extract of coding:
    OPEN DATASET p_dath FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
      LOOP AT itab_pos.
        CLEAR satz.
        MOVE itab_pos-vbeln TO satz-vbeln.
        MOVE ';' TO satz-fill1.
        MOVE itab_pos-kunnr TO satz-kunnr.
        MOVE ';' TO satz-fill2.
        MOVE itab_pos-ktgrd TO satz-ktgrd.
        MOVE ';' TO satz-fill3.
        MOVE itab_pos-fkdat TO satz-fkdat.
        MOVE ';' TO satz-fill4.
        MOVE itab_pos-budat TO satz-budat.
        MOVE ';' TO satz-fill5.
        MOVE itab_pos-cpudt TO satz-cpudt.
        MOVE ';' TO satz-fill6.
        MOVE itab_pos-fkimg TO satz-fkimg.
        MOVE ';' TO satz-fill7.
        MOVE itab_pos-netwr TO satz-netwr.
        MOVE ';' TO satz-fill8.
        MOVE itab_pos-vrkme TO satz-vrkme.
        MOVE ';' TO satz-fill9.
        MOVE itab_pos-ktgrm TO satz-ktgrm.
        MOVE ';' TO satz-fill10.
        MOVE itab_pos-matnr TO satz-matnr.
        MOVE ';' TO satz-fill11.
        MOVE itab_pos-mattxt TO satz-mattxt.
        MOVE ';' TO satz-fill12.
        MOVE itab_pos-gewei TO satz-gewei.
        MOVE ';' TO satz-fill13.
        MOVE itab_pos-brgew TO satz-brgew.
        TRANSFER satz TO p_dath.
      ENDLOOP.
      CLOSE DATASET p_dath.
    It is not so comfortable as it is with GUI_DOWNLOAD but it works in background!

  • Email background schedule report to gmail or yahoo mail

    Dear Expert,
    My self Nayan Lad having 1 year exp in SAP ABAP.
    Now my request is How can I send mail the background schedule report to some person's personal mail id through SAP.
    Please guide me so I can explore my knowledge.
    Thanks & regards,
    Nayan Lad
    Moderator Message: Please search for available information.
    Edited by: kishan P on Nov 11, 2010 11:03 AM

    hai ,
    please go through this example bcs_example8.
    thankyou,
    anji.

  • MC75 - background schedule option not available

    Hi
    i got a requirement to schedule the tcode MC75 in background mode.  But SAP has not given the option in the menu bar -> execute in background option like the tcode MD74. 
    Even the save button is disabled in the tcode MC75 hence not possible to save like a variant.
    I found a SAP notes relevant to that. The note no is 381061. But i am not able to implement the note in my system. I tried to customize the program by copying to zprogram using the code correction given In sap notes 381061. But could not find relevant to background scheduling.
    Can any one tell me how to customize the tcode for background scheduling.
    Regards
    Rajani Yeluri

    Hi Rajani,
    Could you please let me know how did you solve this issue? I am also looking for the same.
    I appreciate your response.
    Thank you.
    Murali

  • Background Schedule - Hardcore Input data

    Hi Experts
             I am developing a BDC, now i want to schedule the program into background.
            So i want to hardcore the input data like
             Select Method (Genrate session/Call transaction)
             Processing Mode
             Update Mode
             Nodata Indicator.
    These data i need to hardcore in the program itself for further processing of background schedule.
              How to do it, pls advise me on this.
    Thanks in advance.
    Regards
    Rajaram

    Hi Rajaram,
    As of my understanding do you want to put the following on your selection screen?
    Select Method (Genrate session/Call transaction)
    Processing Mode
    Update Mode
    Nodata Indicator
    then do so.
    There is a structure for call transaction parameters, which you can use for setting of selection screen and can set the default values as wellin initialization event.
    Structure name : CTU_PARAMS
    Reward pointsif useful.
    Thanks & Regards
    Rajini Rajuladevi
    Edited by: Rajini R M on Jun 4, 2008 8:44 AM

  • Background schedule process

    Hi
    I am new to Oracle 9iAS. Can someone tell me if there is any
    better way to implement a background scheduled process ?
    Currently, I am doing it via AT command. Just wondering if
    Oracle9iAS has any scheduler that I can make use of.
    Thanks
    CT

    You can set up the different step while schedule the back ground job. Each step will have the program name, variant.
    You can do his using transaction SM36 -> JOB WIZARD.
    Thanks,
    Srinivas

  • Show Schedule Lines in Week format when created via MRP

    Hello ...
    I need to know if it is possible to show the Schedule Lines of the schedule agreements in Week format.
    Currently when the MRP runs it create the schedule lines in Day format.
    What I need to do when the MRP runs the Schedule lines can be created in Week format.
    I know that I can do it when I enter manually and add a schedule line in Week or Month format.,... but we need to have Week format automaticaaly when MRP creates the schedule lines.
    Thanks in advance.

    Looks like is not possible doit automatically via MRP.
    It must be manually in ME38.

  • Background Scheduling - Deadline Monitoring

    Hi Experts,
    I have created new maintenance plan , its around 250 for Mechanical and 250 for Electrical
    Maintenance plan having strategy like every two month , every three month , every six month etc..
    Scheduling period is 3 year
    Now scheduling will be done through IP10 one time , but after first call object scheduling will get hold.
    I want to make it background scheduling - Deadline Monitoring
    Now the requirement is , For Example :
    Maintenance plan X have PM plan date is 21.07.2014
    Maintenance plan Y have PM plan date is 24.07.2014
    Maintenance plan Z have PM plan date is 29.07.2014
    As per above example each equipment will have different plan date , background scheduling can be done through IP30 but by the date is concern how can make it possible ?
    Please advise each maintenance plan has to be run as per their plan date.
    Thanks,
    Abhishek

    Hi Mr.Jogeshwara,
    Nice Document , Its really useful
    But my query is each equipment have different plan date , as explained in above example
    If Maintenance plan have Cycle Unit 60 day and Plan X date is on 21.07.2014 then 21.07.2014+60day , same as if maintenance plan Y date is 25.07.2014 then 25.07.2014 +60day
    Like that
    background scheduling needs to be done as per cycle unit
    If i will do background scheduling together of both the above maintenance plan X and Y then scheduling will be run exactly after 60 day and order will be generated in advance for Maintenance plan Y.
    Hope you understand my query.
    Thanks,
    Abhishek

Maybe you are looking for

  • Wireless PRO Keyboard - no longer works on G4 10.4.11 but does on iMac 10.6

    Wireless Pro keyboard will no longer pair with my wireless mouse. My G4 w/dongle, will recognize my wife's new iMac keyboard in another room. The Pro board works fine on the iMac, which confuses the dickens out of me? Tried deleting pref files for Bl

  • Problem about using GOS to store business document!

    Hi Everyone,     I am using Generic Object services toolbar to archive document.    When I attach thru Create Attachment button and display by clicking on the attachments list, it is showing Creator name and the real name of document .But If I attach

  • [HELP] Changing LCD screens on a S55 B5280 Laptop for a higher resolution one

    Hi! I was wondering if there's any LCD screen that i can buy to replace the one that comes with the Toshiba  S55 B5280, that can provide a higher resolution. It would be the first time that i've changed a LCD screen for one capable of more resolution

  • Dyanamic Report Creation

    Hi , i have created a report using some terminal id's. terminal id's like 1,2,3,4.. now my report displays like 1 2 3 4 i used the filter condition thru terminal id's.now my requirement is withuout using that filter condition have to display the repo

  • Microphone won't work for 4s only in videos?

    If I take any sort of video on my 4s the microphone won't work at all. It'll work when talking, with Siri, even in voice memos. But if I do a vine or Instagram video or regular video it won't have sound???