WEIframe function-Report is displaying in a small box-webelements

Hi ALL
I have used WEViewer function to show the new report in crystal reports.
          WEIFrame ("quadrantA", defaultreportA,2000,2000, "NO")
But the report is showing in a small message box with scroll bars after clicking on the submit button by selecting the parameters..
How to resolve this?
Thanks
Edited by: MUFIZA on Oct 26, 2009 2:27 PM

hi Mufiza,
if you are using crystal reports 2008 the look and feel of the viewer is completely different from the previous versions.
for the iframe, you will have a gray colour border around the iframe due to the configuration of the new viewer. this border cannot be removed.
as for the scroll bars, you have to make sure that the report will fit inside the iframe or the scrollbars will appear. for example, if you have a report that is 1200 x 1200 and your iframe is 1000 x 1000, the scrollbars will appear. for this example you would want to make sure that your iframe is 1210 x 1210 where the size is bigger than the report.
cheers,
jamie

Similar Messages

  • Function module to display the time and date in the report-sy-udate And s

    Hi.
    wish to have a function module which can display the system time and date through function module.
    the format that this function module should display should be like this:
    if its today-date and time then:
    05-Jan-08 01.25.57 PM
    please note that i want them to be in one single row in the top-of page
    kinldy help on this.
    thanks!

    hi,
    check this.
    https://forums.sdn.sap.com/click.jspa?searchID=19175181&messageID=4628668
    Thanks

  • How to make a report to display next 18 months of data with when user select a particular month from the filter in power pivot tabular model.

    Hi,
    i have a  dimension table  with month_key having values (201201,201202,201203.......202011,202012) and month name ( Jan 12, feb 12,......NOV 20, Dec 20)  and a fact  table with columns (month_key ,measure_types, Amount)
    My requirement is to create a power pivot report  in which when a user select a month from the filter, the report should display the (selected month+18 ) month's data against each type . when JAN 12 is selected ,the jan 2012 +18 = june 2013
    , month name should be populated with months till june 2013 only .
    i tried creating calculated column"END DATE " in the fact table with  dax expression to calculate the 18th monh from the current month  as below 
    month_key END DATE
    201201       201306    
    201202       201307      
    and thought of filtering the table with month key <= ENDDATE but it is not working as expected. could you please guide me on this ? Is there any time intelligence function that serve the purpose . Iam using  excel 2010
    ..hence could not do any calculation on the report side also. please suggest .
    Thanks in advance                                                                                                                                               

    Do you need to show the measure calculated for those 18 months as a total on 1 row, or do you need to select a single month and then display on row filters 18 distinct rows?
    The first is trivial as driezl has suggested.
    The second will require a second calendar table.
    I created this example workbook for a coworker who had a similar problem. You will have to use the disconnected table as your filter and pull your related table onto the rows.
    Finally, the easiest way to deal with the sort of date arithmetic you need to do is to restructure your date table to have a series of "Sequential" fields. These fields should be the number of units of time since the beginning of your calendar.
    For example, consider a calendar starting on January 1, 2010. For January - December 2010, [MonthSequential] = 1, 2, ..., 12. For January - December 2011, [MonthSequential] = 13, 14, ..., 24, and so on, incrementing by 1 for each sequential month in time.
    Assuming you have this set up in your date tables (one related to your model - DimDate - and one disconnected - DisconDimDate) your measure would look like this:
    18 Month Measure:=
    CALCULATE( [Measure]
    , FILTER( DimDate
    , DimDate[MonthSequential] >= MAX( DisconDimDate[MonthSequential] )
    && DimDate[MonthSequential] <= MAX( DisconDimDate[MonthSequential] ) + 18
    Please review this example along with the workbook I have linked above.

  • How 2 creat report for displaying the details of a Delivery Document using

    how to create report for displaying the details of a Delivery Document using the tables LIKP, LIPS
    thank you
    regards,
    jagrut bharatkumar shukla
    points will be rewarded

    HI
    I AM GIVING YOU MY DELIVERY DOCUMENT CODE...MODIFY IT ACCORDING TO YOUR REQUIREMENT
    *& Report  ZDELIVERY                                *
    report  zdelivery  message-id z9bhu          .
    types: begin of t_likp,
               vbeln type likp-vbeln,      "Delivery
               erdat type likp-erdat,      "Date for rec creation
    *           LFDAT TYPE LIKP-LFDAT,      "Delevery Date
    *           WAERK TYPE LIKP-WAERK,      "Currency
               kunnr type likp-kunnr,      "Ship-To Party
               kunag type likp-kunag,      "Sold-to party
               traty type likp-traty,      "Means-of-Transport
           end of t_likp.
    types: begin of t_lips,
               vbeln type lips-vbeln,      "Delivery
               posnr type lips-posnr,      "Delivery item
               matnr type lips-matnr,      "Material Number
               arktx type lips-arktx,      "Short Text for Sales Order Item
               lfimg type lips-lfimg,      "Actual quantity delivered
               netpr type lips-netpr,
    *           MEINS TYPE LIPS-MEINS,      "Base Unit of Measure
               vgbel type lips-vgbel,      "Doc no of the reference document
            end of t_lips.
    types: begin of t_vbpa,
               vbeln type vbpa-vbeln,      "SD DocumenT Number
               posnr type vbpa-posnr,      "Item number
               parvw type vbpa-parvw,      "Partner function
               kunnrb type vbpa-kunnr,      "Customer Number 1
           end of t_vbpa.
    types: begin of t_kna1,
               kunnr type kna1-kunnr,      "Customer Number 1
               name1 type kna1-name1,      "Name 1
               ort01 type kna1-ort01,      "City
               adrnr type kna1-adrnr,      "Address
           end of t_kna1.
    types: begin of t_li_vbpa,
               vbeln type likp-vbeln,      "Delivery
               erdat type likp-erdat,      "Date for rec creation
    *           LFDAT TYPE LIKP-LFDAT,      "Delevery Date
    *           WAERK TYPE LIKP-WAERK,      "Currency
               kunnr type likp-kunnr,      "Ship-To Party
               kunag type likp-kunag,      "Sold-to party
               traty type likp-traty,      "Means-of-Transport
               vbeln1 type lips-vbeln,      "Delivery
               posnr type lips-posnr,      "Delivery item
               matnr type lips-matnr,      "Material Number
               arktx type lips-arktx,      "Short Text for Sales Order Item
               lfimg type lips-lfimg,      "Actual quantity delivered
               netpr type lips-netpr,      "Net Price
    *           MEINS TYPE LIPS-MEINS,      "Base Unit of Measure
               vgbel type lips-vgbel,      "Doc no of the reference document
               vbeln3 type vbpa-vbeln,     "SD DocumenT Number
               parvw type vbpa-parvw,      "Partner function
               kunnrb type vbpa-kunnr,      "Customer Number 1
           end of t_li_vbpa.
    types: begin of t_final,
               vbeln type likp-vbeln,      "Delivery
               erdat type likp-erdat,      "Date for rec creation
               kunnr type likp-kunnr,      "Ship-To Party
               kunag type likp-kunag,      "Sold-to party
               traty type likp-traty,      "Means-of-Transport
               vbeln1 type lips-vbeln,      "Delivery
               posnr type lips-posnr,      "Delivery item
               matnr type lips-matnr,      "Material Number
               arktx type lips-arktx,      "Short Text for Sales Order Item
               lfimg type lips-lfimg,      "Actual quantity delivered
               netpr type lips-netpr,      "Net Price
               vgbel type lips-vgbel,      "Doc no of the reference document
               vbeln3 type vbpa-vbeln,     "SD DocumenT Number
               parvw type vbpa-parvw,      "Partner function
               kunnrb type vbpa-kunnr,     "Customer Number 1
               name1 type kna1-name1,      "Name 1
               ort01 type kna1-ort01,      "City
               adrnr1 type kna1-adrnr,     "Address
               name2 type kna1-name1,      "Name 1
               ort02 type kna1-ort01,      "City
               adrnr2 type kna1-adrnr,     "Address
               name3 type kna1-name1,      "Name 1
               ort03 type kna1-ort01,      "City
               adrnr3 type kna1-adrnr,     "Address
           end of t_final.
    *            D A T A  D E C L A R A T I O N
    *&*********Internal Table Declaration****************&*
    data: it_likp type standard table of t_likp.
    data: it_lips type standard table of t_lips.
    data: it_vbpa type standard table of t_vbpa.
    data: it_kna1 type standard table of t_kna1.
    data: it_li_vbpa type standard table of t_li_vbpa.
    data: it_li_vbpa_temp type standard table of t_li_vbpa.
    data: it_final type standard table of t_final.
    *&*********Work Area Declaration********************&*
    data: wa_likp type t_likp.
    data: wa_lips type t_lips.
    data: wa_vbpa type t_vbpa.
    data: wa_kna1 type t_kna1.
    data: wa_li_vbpa type t_li_vbpa.
    data: wa_li_vbpa_temp type t_li_vbpa.
    data: wa_final type t_final.
    *&*********Data Declaration************************&*
    data: d_vbeln type likp-vbeln.
    data: flag type i value 0.
    *           S E L E C T I O N  S C R E E N   D E C L A R A T I O N
    selection-screen begin of block block2 with frame title text-001.
    select-options: s_vbeln for d_vbeln obligatory.    "Delivery no
    selection-screen end of block block2.
    *            A T  S E L E C T I O N - S C R E E N   E V E N T S
    *AT SELECTION-SCREEN.
    *PERFORM VALIDATE_DATA.
    *            S T A R T   O F  S E L E C T I O N     E V E N T S
    start-of-selection.
    perform fetch_data.
    perform merge_data_kna1.
    *INCLUDE Z9BT_SH_***4_FORMS.
    call function 'OPEN_FORM'
    exporting
    *   APPLICATION                       = 'TX'
    *   ARCHIVE_INDEX                     =
    *   ARCHIVE_PARAMS                    =
        device                            = 'PRINTER'
    *   DIALOG                            = 'X'
    *   FORM                              = ' '
       language                          = sy-langu
    *   OPTIONS                           =
    *   MAIL_SENDER                       =
    *   MAIL_RECIPIENT                    =
    *   MAIL_APPL_OBJECT                  =
    *   RAW_DATA_INTERFACE                = '*'
    *   SPONUMIV                          =
    * IMPORTING
    *   LANGUAGE                          =
    *   NEW_ARCHIVE_PARAMS                =
    *   RESULT                            =
    exceptions
       canceled                          = 1
       device                            = 2
       form                              = 3
       options                           = 4
       unclosed                          = 5
       mail_options                      = 6
       archive_error                     = 7
       invalid_fax_number                = 8
       more_params_needed_in_batch       = 9
       spool_error                       = 10
       codepage                          = 11
       others                            = 12
    if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    sort it_final by vbeln.
    loop at it_final into wa_final.
    call function 'START_FORM'
    exporting
    *   ARCHIVE_INDEX          =
       form                   = 'Z9BT_DELIVERY'
       language               = sy-langu
    *   STARTPAGE              = ' '
    *   PROGRAM                = ' '
    *   MAIL_APPL_OBJECT       =
    * IMPORTING
    *   LANGUAGE               =
    exceptions
       form                   = 1
       format                 = 2
       unended                = 3
       unopened               = 4
       unused                 = 5
       spool_error            = 6
       codepage               = 7
       others                 = 8
    if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    call function 'WRITE_FORM'
    exporting
       element                        = 'ITEM_LIST'
       function                       = 'SET'
       type                           = 'BODY'
       window                         = 'MAIN'
    * IMPORTING
    *   PENDING_LINES                  =
    * EXCEPTIONS
    *   ELEMENT                        = 1
    *   FUNCTION                       = 2
    *   TYPE                           = 3
    *   UNOPENED                       = 4
    *   UNSTARTED                      = 5
    *   WINDOW                         = 6
    *   BAD_PAGEFORMAT_FOR_PRINT       = 7
    *   SPOOL_ERROR                    = 8
    *   CODEPAGE                       = 9
    *   OTHERS                         = 10
    if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    call function 'END_FORM'
    * IMPORTING
    *   RESULT                         =
    exceptions
       unopened                       = 1
       bad_pageformat_for_print       = 2
       spool_error                    = 3
       codepage                       = 4
       others                         = 5
    if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    endloop.
    call function 'CLOSE_FORM'
    * IMPORTING
    *   RESULT                         =
    *   RDI_RESULT                     =
    * TABLES
    *   OTFDATA                        =
    exceptions
       unopened                       = 1
       bad_pageformat_for_print       = 2
       send_error                     = 3
       spool_error                    = 4
       codepage                       = 5
       others                         = 6
    if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    *&      Form  VALIDATE_DATA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form validate_data .
    select single vbeln into wa_likp-vbeln
                        from likp where vbeln in s_vbeln.
    append wa_likp to it_likp.
    if sy-subrc <> 0.
    flag = 1.
    endif.
    endform.                    " VALIDATE_DATA
    *&      Form  FETCH_DATA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form fetch_data .
    select a~vbeln
           a~erdat
           a~kunnr
           a~kunag
           a~traty
           b~vbeln
           b~posnr
           b~matnr
           b~arktx
           b~lfimg
           b~netpr
           b~vgbel
           c~vbeln
           c~parvw
           c~kunnr
             into table it_li_vbpa
                    from likp as a
                    left outer join lips as b on a~vbeln = b~vbeln
                    inner join vbpa as c on b~vgbel = c~vbeln
                    where a~vbeln in s_vbeln and
                    c~parvw = 'RE'.
    endform.                    " FETCH_DATA
    *&      Form  MERGE_DATA_KNA1
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form merge_data_kna1 .
    if it_li_vbpa[] is not initial.
    it_li_vbpa_temp[] = it_li_vbpa[].
    sort it_li_vbpa_temp by kunnr.
    delete adjacent duplicates from it_li_vbpa_temp comparing kunnr.
    loop at it_li_vbpa into wa_li_vbpa.
    read table it_li_vbpa_temp into wa_li_vbpa_temp with key kunnr =
    wa_li_vbpa-kunag.
    if sy-subrc <> 0.
    wa_li_vbpa_temp = wa_li_vbpa.
    append wa_li_vbpa_temp to it_li_vbpa_temp.
    endif.
    read table it_li_vbpa_temp into wa_li_vbpa_temp with key kunnr =
    wa_li_vbpa-kunnrb.
    if sy-subrc <> 0.
    wa_li_vbpa_temp = wa_li_vbpa.
    append wa_li_vbpa_temp to it_li_vbpa_temp.
    endif.
    endloop.
    endif.
    if it_li_vbpa_temp[] is not initial.
    select  kunnr
            name1
            ort01
            adrnr into table it_kna1 from kna1
                        for all entries in it_li_vbpa_temp
                        where kunnr = it_li_vbpa_temp-kunnr.
    endif.
    loop at it_li_vbpa into wa_li_vbpa .
    wa_final-vbeln = wa_li_vbpa-vbeln.
    wa_final-erdat = wa_li_vbpa-erdat.
    *it_final-LFART = it_li_vbpa-LFART.
    wa_final-kunnr = wa_li_vbpa-kunnr.
    wa_final-kunag = wa_li_vbpa-kunag.
    *it_final-VSTEL = it_li_vbpa-VSTEL.
    wa_final-traty = wa_li_vbpa-traty.
    wa_final-vbeln1 = wa_li_vbpa-vbeln.
    wa_final-posnr = wa_li_vbpa-posnr.
    wa_final-matnr = wa_li_vbpa-matnr.
    wa_final-arktx = wa_li_vbpa-arktx.
    wa_final-lfimg = wa_li_vbpa-lfimg.
    wa_final-netpr = wa_li_vbpa-netpr.
    *wa_final-GEWEI = it_li_vbpa-GEWEI.
    *it_final-VOLUM = it_li_vbpa-VOLUM.
    *it_final-VOLEH = it_li_vbpa-VOLEH.
    wa_final-vgbel = wa_li_vbpa-vgbel.
    wa_final-vbeln3 = wa_li_vbpa-vbeln.
    *wa_final-PARVW = wa_li_vbpa-PARVW.
    wa_final-kunnrb = wa_li_vbpa-kunnrb.
    read table it_kna1 into wa_kna1 with key kunnr = wa_li_vbpa-kunnr.
    if sy-subrc = 0.
    wa_final-name1 = wa_kna1-name1.
    wa_final-ort01 = wa_kna1-ort01.
    wa_final-adrnr1 = wa_kna1-adrnr.
    endif.
    read table it_kna1 into wa_kna1 with key kunnr = wa_li_vbpa-kunag.
    if sy-subrc = 0.
    wa_final-name2 = wa_kna1-name1.
    wa_final-ort02 = wa_kna1-ort01.
    wa_final-adrnr2 = wa_kna1-adrnr.
    endif.
    read table it_kna1 into wa_kna1 with key kunnr = wa_li_vbpa-kunnrb.
    if sy-subrc = 0.
    wa_final-name3 = wa_kna1-name1.
    wa_final-ort03 = wa_kna1-ort01.
    wa_final-adrnr3 = wa_kna1-adrnr.
    endif.
    append wa_final to it_final.
    clear wa_final.
    endloop.
    endform.

  • I Need Interactive Report for displaying vendor information. Based on the s

    Interactive Report for displaying vendor information. Based on the selection made by the corresponding Vendor Bank Details are listed such that the line selected in the basic list was visible along with the secondary list.

    hi
    Hi
    Use the Table LFA1 and LFB1 in the basic list
    and LFBK table details in the secondary list
    see the sample code related to customer Sales orders
    modify it with the Vendor tables
    REPORT ZTEJ_INTAB1 LINE-SIZE 103 LINE-COUNT 35(5) NO STANDARD PAGE
    HEADING.
    *TABLES DECLARATION
    TABLES : KNA1, VBAK, VBAP.
    *SELECT OPTIONS
    SELECT-OPTIONS: CUST_NO FOR KNA1-KUNNR.
    *INITIALIZATION
    INITIALIZATION.
    CUST_NO-LOW = '01'.
    CUST_NO-HIGH = '5000'.
    CUST_NO-SIGN = 'I'.
    CUST_NO-OPTION = 'BT'.
    APPEND CUST_NO.
    *SELECTION SCREEN VALIDATION
    AT SELECTION-SCREEN ON CUST_NO.
    LOOP AT SCREEN.
    IF CUST_NO-LOW < 1 OR CUST_NO-HIGH > 5000.
    MESSAGE E001(ZTJ1).
    ENDIF.
    ENDLOOP.
    *BASIC LIST SELECTION
    START-OF-SELECTION.
    SELECT KUNNR NAME1 ORT01 LAND1 INTO
    (KNA1-KUNNR, KNA1-NAME1,KNA1-ORT01,KNA1-LAND1)
    FROM KNA1
    WHERE KUNNR IN CUST_NO.
    WRITE:/1 SY-VLINE,
    KNA1-KUNNR UNDER 'CUSTOMER NO.' HOTSPOT ON,
    16 SY-VLINE,
    KNA1-NAME1 UNDER 'NAME',
    61 SY-VLINE,
    KNA1-ORT01 UNDER 'CITY',
    86 SY-VLINE,
    KNA1-LAND1 UNDER 'COUNTRY',
    103 SY-VLINE.
    HIDE: KNA1-KUNNR.
    ENDSELECT.
    ULINE.
    *SECONDARY LIST ACCESS
    AT user-command.
    IF SY-UCOMM = 'IONE'.
    PERFORM SALES_ORD.
    ENDIF.
    IF SY-UCOMM = 'ITWO'.
    PERFORM ITEM_DET.
    ENDIF.
    *TOP OF PAGE
    TOP-OF-PAGE.
    FORMAT COLOR 1.
    WRITE : 'CUSTOMER DETAILS'.
    FORMAT COLOR 1 OFF.
    ULINE.
    FORMAT COLOR 3.
    WRITE : 1 SY-VLINE,
    3 'CUSTOMER NO.',
    16 SY-VLINE,
    18 'NAME',
    61 SY-VLINE,
    63 'CITY',
    86 SY-VLINE,
    88 'COUNTRY',
    103 SY-VLINE.
    ULINE.
    FORMAT COLOR 3 OFF.
    *TOP OF PAGE FOR SECONDARY LISTS
    TOP-OF-PAGE DURING LINE-SELECTION.
    *TOP OF PAGE FOR 1ST SECONDARY LIST
    IF SY-UCOMM = 'IONE'.
    ULINE.
    FORMAT COLOR 1.
    WRITE : 'SALES ORDER DETAILS'.
    ULINE.
    FORMAT COLOR 1 OFF.
    FORMAT COLOR 3.
    WRITE : 1 SY-VLINE,
    3 'CUSTOMER NO.',
    16 SY-VLINE,
    18 'SALES ORDER NO.',
    40 SY-VLINE,
    42 'DATE',
    60 SY-VLINE,
    62 'CREATOR',
    85 SY-VLINE,
    87 'DOC DATE',
    103 SY-VLINE.
    ULINE.
    ENDIF.
    FORMAT COLOR 3 OFF.
    *TOP OF PAGE FOR 2ND SECONDARY LIST
    IF SY-UCOMM = 'ITWO'.
    ULINE.
    FORMAT COLOR 1.
    WRITE : 'ITEM DETAILS'.
    ULINE.
    FORMAT COLOR 1 OFF.
    FORMAT COLOR 3.
    WRITE : 1 SY-VLINE,
    3 'SALES ORDER NO.',
    40 SY-VLINE,
    42 'SALES ITEM NO.',
    60 SY-VLINE,
    62 'ORDER QUANTITY',
    103 SY-VLINE.
    ULINE.
    ENDIF.
    FORMAT COLOR 3 OFF.
    *END OF PAGE
    END-OF-PAGE.
    ULINE.
    WRITE :'USER :',SY-UNAME,/,'DATE :', SY-DATUM, 85 'END OF PAGE:',
    SY-PAGNO.
    SKIP.
    *& Form SALES_ORD
    *& FIRST SECONDARY LIST FORM
    FORM SALES_ORD .
    SELECT KUNNR VBELN ERDAT ERNAM AUDAT INTO
    (VBAK-KUNNR, VBAK-VBELN, VBAK-ERDAT, VBAK-ERNAM, VBAK-AUDAT)
    FROM VBAK
    WHERE KUNNR = KNA1-KUNNR.
    WRITE:/1 SY-VLINE,
    VBAK-KUNNR UNDER 'CUSTOMER NO.' HOTSPOT ON,
    16 SY-VLINE,
    VBAK-VBELN UNDER 'SALES ORDER NO.' HOTSPOT ON,
    40 SY-VLINE,
    VBAK-ERDAT UNDER 'DATE',
    60 SY-VLINE,
    VBAK-ERNAM UNDER 'CREATOR',
    85 SY-VLINE,
    VBAK-AUDAT UNDER 'DOC DATE',
    103 SY-VLINE.
    HIDE : VBAK-VBELN.
    ENDSELECT.
    ULINE.
    ENDFORM. " SALES_ORD
    *& Form ITEM_DET
    *& SECOND SECONDARY LIST FORM
    FORM ITEM_DET .
    SELECT VBELN POSNR KWMENG INTO
    (VBAP-VBELN, VBAP-POSNR, VBAP-KWMENG)
    FROM VBAP
    WHERE VBELN = VBAK-VBELN.
    WRITE : /1 SY-VLINE,
    VBAP-VBELN UNDER 'SALES ORDER NO.',
    40 SY-VLINE,
    VBAP-POSNR UNDER 'SALES ITEM NO.',
    60 SY-VLINE,
    VBAP-KWMENG UNDER 'ORDER QUANTITY',
    103 SY-VLINE.
    ENDSELECT.
    ULINE.
    ENDFORM. " ITEM_DET
    REPORT demo_list_at_pf.
    START-OF-SELECTION.
    WRITE 'Basic List, Press PF5, PF6, PF7, or PF8'.
    AT pf5.
    PERFORM out.
    AT pf6.
    PERFORM out.
    AT pf7.
    PERFORM out.
    AT pf8.
    PERFORM out.
    FORM out.
    WRITE: 'Secondary List by PF-Key Selection',
    / 'SY-LSIND =', sy-lsind,
    / 'SY-UCOMM =', sy-ucomm.
    ENDFORM.
    After executing the program, the system displays the basic list. The user can press the function keys F5 , F6 , F7 , and F8 to create secondary lists. If, for example, the 14th key the user presses is F6 , the output on the displayed secondary list looks as follows:
    Secondary List by PF-Key Selection
    SY-LSIND = 14
    SY-UCOMM = PF06
    Example for AT USER-COMMAND.
    REPORT demo_list_at_user_command NO STANDARD PAGE HEADING.
    START-OF-SELECTION.
    WRITE: 'Basic List',
    / 'SY-LSIND:', sy-lsind.
    TOP-OF-PAGE.
    WRITE 'Top-of-Page'.
    ULINE.
    TOP-OF-PAGE DURING LINE-SELECTION.
    CASE sy-pfkey.
    WHEN 'TEST'.
    WRITE 'Self-defined GUI for Function Codes'.
    ULINE.
    ENDCASE.
    AT LINE-SELECTION.
    SET PF-STATUS 'TEST' EXCLUDING 'PICK'.
    PERFORM out.
    sy-lsind = sy-lsind - 1.
    AT USER-COMMAND.
    CASE sy-ucomm.
    WHEN 'FC1'.
    PERFORM out.
    WRITE / 'Button FUN 1 was pressed'.
    WHEN 'FC2'.
    PERFORM out.
    WRITE / 'Button FUN 2 was pressed'.
    WHEN 'FC3'.
    PERFORM out.
    WRITE / 'Button FUN 3 was pressed'.
    WHEN 'FC4'.
    PERFORM out.
    WRITE / 'Button FUN 4 was pressed'.
    WHEN 'FC5'.
    PERFORM out.
    WRITE / 'Button FUN 5 was pressed'.
    ENDCASE.
    sy-lsind = sy-lsind - 1.
    FORM out.
    WRITE: 'Secondary List',
    / 'SY-LSIND:', sy-lsind,
    / 'SY-PFKEY:', sy-pfkey.
    ENDFORM.
    <b>Vendor performance report</b>
    See this sample code
    *"Table declarations...................................................
    TABLES:
    EKKO, " Purchasing Document Header
    CDHDR, " Change document header
    SSCRFIELDS. " Fields on selection screens
    *"Selection screen elements............................................
    SELECT-OPTIONS:
    S_EBELN FOR EKKO-EBELN, " Purchasing Document Number
    S_LIFNR FOR EKKO-LIFNR, " Vendor's account number
    S_EKGRP FOR EKKO-EKGRP, " Purchasing group
    S_BEDAT FOR EKKO-BEDAT, " Purchasing Document Date
    S_UDATE FOR CDHDR-UDATE. " Creation date of the change
    " document
    *" Data declarations...................................................
    Field String to hold Purchase Document Number *
    DATA:
    BEGIN OF FS_EBELN,
    EBELN(90) TYPE C, " Purchase Document Number
    ERNAM TYPE EKKO-ERNAM, " Name of Person who Created
    " the Object
    LIFNR TYPE EKKO-LIFNR, " Vendor's account number
    EKGRP TYPE EKKO-EKGRP, " Purchasing group
    BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
    END OF FS_EBELN,
    Field String to hold Purchase Document Header *
    BEGIN OF FS_EKKO,
    EBELN TYPE EKKO-EBELN, " Purchasing Document Number
    ERNAM TYPE EKKO-ERNAM, " Name of Person who Created the
    " Object
    LIFNR TYPE EKKO-LIFNR, " Vendor's account number
    EKGRP TYPE EKKO-EKGRP, " Purchasing group
    BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
    END OF FS_EKKO,
    Field String to hold Account Number and name of the Vendor *
    BEGIN OF FS_LFA1,
    LIFNR TYPE LFA1-LIFNR, " Account Number of Vendor
    NAME1 TYPE LFA1-NAME1, " Name1
    END OF FS_LFA1,
    Field String to hold Change date and the name of the user *
    BEGIN OF FS_CDHDR,
    OBJECTCLAS TYPE CDHDR-OBJECTCLAS, " Object Class
    OBJECTID TYPE CDHDR-OBJECTID, " Object value
    CHANGENR TYPE CDHDR-CHANGENR, " Document change number
    USERNAME TYPE CDHDR-USERNAME, " User name
    UDATE TYPE CDHDR-UDATE, " Creation date of the change
    " document
    END OF FS_CDHDR,
    Field String to hold Change document items *
    BEGIN OF FS_CDPOS,
    OBJECTCLAS TYPE CDPOS-OBJECTCLAS," Object class
    OBJECTID(10) TYPE C, " Object Value
    CHANGENR TYPE CDPOS-CHANGENR, " Document change number
    TABNAME TYPE CDPOS-TABNAME, " Table Name
    FNAME TYPE CDPOS-FNAME, " Field Name
    VALUE_NEW TYPE CDPOS-VALUE_NEW, " New contents of changed field
    VALUE_OLD TYPE CDPOS-VALUE_OLD, " Old contents of changed field
    END OF FS_CDPOS,
    Field String to hold Date Element Name *
    BEGIN OF FS_DATAELE,
    TABNAME TYPE DD03L-TABNAME, " Table Name
    FIELDNAME TYPE DD03L-FIELDNAME, " Field Name
    ROLLNAME TYPE DD03L-ROLLNAME, " Data element (semantic domain)
    END OF FS_DATAELE,
    Field String to hold Short Text of the Date Element *
    BEGIN OF FS_TEXT,
    ROLLNAME TYPE DD04T-ROLLNAME, " Data element (semantic domain)
    DDTEXT TYPE DD04T-DDTEXT, " Short Text Describing R/3
    " Repository Objects
    END OF FS_TEXT,
    Field String to hold data to be displayed on the ALV grid *
    BEGIN OF FS_OUTTAB,
    EBELN TYPE EKKO-EBELN, " Purchasing Document Number
    ERNAM TYPE EKKO-ERNAM, " Name of Person who Created the
    " Object
    LIFNR TYPE EKKO-LIFNR, " Vendor's account number
    EKGRP TYPE EKKO-EKGRP, " Purchasing group
    BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
    WERKS TYPE LFA1-WERKS, " Plant
    NAME1 TYPE LFA1-NAME1, " Name1
    USERNAME TYPE CDHDR-USERNAME, " User name
    UDATE TYPE CDHDR-UDATE, " Creation date of the change
    " document
    DDTEXT TYPE DD04T-DDTEXT, " Short Text Describing R/3
    " Repository Objects
    VALUE_NEW TYPE CDPOS-VALUE_NEW, " New contents of changed field
    VALUE_OLD TYPE CDPOS-VALUE_OLD, " Old contents of changed field
    END OF FS_OUTTAB,
    Internal table to hold Purchase Document Number *
    T_EBELN LIKE STANDARD TABLE
    OF FS_EBELN,
    Internal table to hold Purchase Document Header *
    T_EKKO LIKE STANDARD TABLE
    OF FS_EKKO,
    Temp Internal table to hold Purchase Document Header *
    T_EKKO_TEMP LIKE STANDARD TABLE
    OF FS_EKKO,
    Internal table to hold Account number and Name of the Vendor *
    T_LFA1 LIKE STANDARD TABLE
    OF FS_LFA1,
    Internal Table to hold Change date and the name of the user *
    T_CDHDR LIKE STANDARD TABLE
    OF FS_CDHDR,
    Internal Table to hold Change document items *
    T_CDPOS LIKE STANDARD TABLE
    OF FS_CDPOS,
    Temp. Internal Table to hold Change document items *
    T_CDPOS_TEMP LIKE STANDARD TABLE
    OF FS_CDPOS,
    Internal Table to hold Data Element Name *
    T_DATAELE LIKE STANDARD TABLE
    OF FS_DATAELE,
    Temp. Internal Table to hold Data Element Name *
    T_DATAELE_TEMP LIKE STANDARD TABLE
    OF FS_DATAELE,
    Internal Table to hold Short Text of the Date Element *
    T_TEXT LIKE STANDARD TABLE
    OF FS_TEXT,
    Internal Table to hold data to be displayed on the ALV grid *
    T_OUTTAB LIKE STANDARD TABLE
    OF FS_OUTTAB.
    C L A S S D E F I N I T I O N *
    CLASS LCL_EVENT_HANDLER DEFINITION DEFERRED.
    *" Data declarations...................................................
    Work variables *
    DATA:
    W_EBELN TYPE EKKO-EBELN, " Purchasing Document Number
    W_LIFNR TYPE EKKO-LIFNR, " Vendor's account number
    W_EKGRP TYPE EKKO-EKGRP, " Purchasing group
    W_VALUE TYPE EKKO-EBELN, " Reflected Value
    W_SPACE VALUE ' ', " Space
    W_FLAG TYPE I, " Flag Variable
    W_VARIANT TYPE DISVARIANT, " Variant
    *--- ALV Grid
    W_GRID TYPE REF TO CL_GUI_ALV_GRID,
    *--- Event Handler
    W_EVENT_CLICK TYPE REF TO LCL_EVENT_HANDLER,
    *--- Field catalog table
    T_FIELDCAT TYPE LVC_T_FCAT.
    AT SELECTION-SCREEN EVENT *
    AT SELECTION-SCREEN ON S_EBELN.
    Subroutine to validate Purchase Document Number.
    PERFORM VALIDATE_PD_NUM.
    AT SELECTION-SCREEN ON S_LIFNR.
    Subroutine to validate Vendor Number.
    PERFORM VALIDATE_VEN_NUM.
    AT SELECTION-SCREEN ON S_EKGRP.
    Subroutine to validate Purchase Group.
    PERFORM VALIDATE_PUR_GRP.
    START-OF-SELECTION EVENT *
    START-OF-SELECTION.
    Subroutine to select all Purchase orders.
    PERFORM SELECT_PO.
    CHECK W_FLAG EQ 0.
    Subroutine to select Object values.
    PERFORM SELECT_OBJ_ID.
    CHECK W_FLAG EQ 0.
    Subroutine to select Changed values.
    PERFORM SELECT_CHANGED_VALUE.
    CHECK W_FLAG EQ 0.
    Subroutine to Select Purchase Orders.
    PERFORM SELECT_PUR_DOC.
    Subroutine to select Vendor Details.
    PERFORM SELECT_VENDOR.
    Subroutine to select Text for the Changed values.
    PERFORM DESCRIPTION.
    END-OF-SELECTION EVENT *
    END-OF-SELECTION.
    IF NOT T_EKKO IS INITIAL.
    Subroutine to populate the Output Table.
    PERFORM FILL_OUTTAB.
    Subroutine to build Field Catalog.
    PERFORM PREPARE_FIELD_CATALOG CHANGING T_FIELDCAT.
    CALL SCREEN 100.
    ENDIF. " IF NOT T_EKKO...
    CLASS LCL_EVENT_HANDLER DEFINITION
    Defining Class which handles events
    CLASS LCL_EVENT_HANDLER DEFINITION .
    PUBLIC SECTION .
    METHODS:
    HANDLE_HOTSPOT_CLICK
    FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID
    IMPORTING E_ROW_ID E_COLUMN_ID.
    ENDCLASS. " LCL_EVENT_HANDLER DEFINITION
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION
    Implementing the Class which can handle events
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION .
    *---Handle Double Click
    METHOD HANDLE_HOTSPOT_CLICK .
    Subroutine to get the HotSpot Cell information.
    PERFORM GET_CELL_INFO.
    SET PARAMETER ID 'BES' FIELD W_VALUE.
    CALL TRANSACTION 'ME23N'.
    ENDMETHOD. " HANDLE_HOTSPOT_CLICK
    ENDCLASS. " LCL_EVENT_HANDLER
    *& Module STATUS_0100 OUTPUT
    PBO Event
    MODULE STATUS_0100 OUTPUT.
    SET PF-STATUS 'OOPS'.
    SET TITLEBAR 'TIT'.
    Subroutine to fill the Variant Structure
    PERFORM FILL_VARIANT.
    IF W_GRID IS INITIAL.
    CREATE OBJECT W_GRID
    EXPORTING
    I_SHELLSTYLE = 0
    I_LIFETIME =
    I_PARENT = CL_GUI_CONTAINER=>SCREEN0
    I_APPL_EVENTS =
    I_PARENTDBG =
    I_APPLOGPARENT =
    I_GRAPHICSPARENT =
    I_NAME =
    I_FCAT_COMPLETE = SPACE
    EXCEPTIONS
    ERROR_CNTL_CREATE = 1
    ERROR_CNTL_INIT = 2
    ERROR_CNTL_LINK = 3
    ERROR_DP_CREATE = 4
    OTHERS = 5.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF. " IF SY-SUBRC <> 0
    CALL METHOD W_GRID->SET_TABLE_FOR_FIRST_DISPLAY
    EXPORTING
    I_BUFFER_ACTIVE =
    I_BYPASSING_BUFFER =
    I_CONSISTENCY_CHECK =
    I_STRUCTURE_NAME =
    IS_VARIANT = W_VARIANT
    I_SAVE = 'A'
    I_DEFAULT = 'X'
    IS_LAYOUT =
    IS_PRINT =
    IT_SPECIAL_GROUPS =
    IT_TOOLBAR_EXCLUDING =
    IT_HYPERLINK =
    IT_ALV_GRAPHICS =
    IT_EXCEPT_QINFO =
    IR_SALV_ADAPTER =
    CHANGING
    IT_OUTTAB = T_OUTTAB
    IT_FIELDCATALOG = T_FIELDCAT
    IT_SORT =
    IT_FILTER =
    EXCEPTIONS
    INVALID_PARAMETER_COMBINATION = 1
    PROGRAM_ERROR = 2
    TOO_MANY_LINES = 3
    OTHERS = 4
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF. " IF SY-SUBRC <> 0.
    ENDIF. " IF W_GRID IS INITIAL
    CREATE OBJECT W_EVENT_CLICK.
    SET HANDLER W_EVENT_CLICK->HANDLE_HOTSPOT_CLICK FOR W_GRID.
    ENDMODULE. " STATUS_0100 OUTPUT
    *& Module USER_COMMAND_0100 INPUT
    PAI Event
    MODULE USER_COMMAND_0100 INPUT.
    CASE SY-UCOMM.
    WHEN 'BACK'.
    LEAVE TO SCREEN 0.
    WHEN 'EXIT'.
    LEAVE PROGRAM.
    WHEN 'CANCEL'.
    LEAVE TO SCREEN 0.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_0100 INPUT
    *& Form PREPARE_FIELD_CATALOG
    Subroutine to build the Field catalog
    <--P_T_FIELDCAT Field Catalog Table
    FORM PREPARE_FIELD_CATALOG CHANGING PT_FIELDCAT TYPE LVC_T_FCAT .
    DATA LS_FCAT TYPE LVC_S_FCAT.
    Purchasing group...
    LS_FCAT-FIELDNAME = 'EKGRP'.
    LS_FCAT-REF_TABLE = 'EKKO'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Purchasing Document Number...
    LS_FCAT-FIELDNAME = 'EBELN'.
    LS_FCAT-REF_TABLE = 'EKKO' .
    LS_FCAT-EMPHASIZE = 'C411'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    LS_FCAT-HOTSPOT = 'X'.
    APPEND LS_FCAT TO PT_FIELDCAT .
    CLEAR LS_FCAT .
    Name of Person who Created the Object...
    LS_FCAT-FIELDNAME = 'ERNAM'.
    LS_FCAT-REF_TABLE = 'EKKO'.
    LS_FCAT-OUTPUTLEN = '15' .
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Purchasing Document Date...
    LS_FCAT-FIELDNAME = 'BEDAT'.
    LS_FCAT-REF_TABLE = 'EKKO'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Vendor's account number...
    LS_FCAT-FIELDNAME = 'LIFNR'.
    LS_FCAT-REF_TABLE = 'EKKO'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Account Number of Vendor or Creditor...
    LS_FCAT-FIELDNAME = 'NAME1'.
    LS_FCAT-REF_TABLE = 'LFA1'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    LS_FCAT-COLTEXT = 'Vendor Name'(001).
    LS_FCAT-SELTEXT = 'Vendor Name'(001).
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Creation date of the change document...
    LS_FCAT-FIELDNAME = 'UDATE'.
    LS_FCAT-REF_TABLE = 'CDHDR'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    LS_FCAT-COLTEXT = 'Change Date'(002).
    LS_FCAT-SELTEXT = 'Change Date'(002).
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    User name of the person responsible in change document...
    LS_FCAT-FIELDNAME = 'USERNAME'.
    LS_FCAT-REF_TABLE = 'CDHDR'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    LS_FCAT-COLTEXT = 'Modified by'(003).
    LS_FCAT-SELTEXT = 'Modified by'(003).
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Short Text Describing R/3 Repository Objects...
    LS_FCAT-FIELDNAME = 'DDTEXT'.
    LS_FCAT-REF_TABLE = 'DD04T'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '15'.
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Old contents of changed field...
    LS_FCAT-FIELDNAME = 'VALUE_OLD'.
    LS_FCAT-REF_TABLE = 'CDPOS'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '12'.
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    New contents of changed field...
    LS_FCAT-FIELDNAME = 'VALUE_NEW'.
    LS_FCAT-REF_TABLE = 'CDPOS'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '12'.
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    ENDFORM. " PREPARE_FIELD_CATALOG
    *& Form SELECT_PO
    Subroutine to select all the Purchase Orders
    There are no interface parameters to be passed to this subroutine.
    FORM SELECT_PO .
    SELECT EBELN " Purchasing Document Number
    ERNAM " Name of Person who Created
    " the Object
    LIFNR " Vendor's account number
    EKGRP " Purchasing group
    BEDAT " Purchasing Document Date
    FROM EKKO
    PACKAGE SIZE 10000
    APPENDING TABLE T_EBELN
    WHERE EBELN IN S_EBELN
    AND BEDAT IN S_BEDAT.
    ENDSELECT.
    IF SY-SUBRC NE 0.
    W_FLAG = 1.
    MESSAGE S401(M8).
    ENDIF. " IF SY-SUBRC NE 0
    ENDFORM. " SELECT_PO
    *& Form SELECT_OBJ_ID
    Subroutine to select Object ID
    There are no interface parameters to be passed to this subroutine.
    FORM SELECT_OBJ_ID .
    IF NOT T_EBELN IS INITIAL.
    SELECT OBJECTCLAS " Object Class
    OBJECTID " Object value
    CHANGENR " Document change number
    USERNAME " User name
    UDATE " Creation date
    FROM CDHDR
    INTO TABLE T_CDHDR
    FOR ALL ENTRIES IN T_EBELN
    WHERE OBJECTID EQ T_EBELN-EBELN
    AND UDATE IN S_UDATE
    AND TCODE IN ('ME21N','ME22N','ME23N').
    ENDSELECT.
    IF SY-SUBRC NE 0.
    W_FLAG = 1.
    MESSAGE S833(M8) WITH 'Header Not Found'(031).
    ENDIF. " IF SY-SUBRC NE 0.
    ENDIF. " IF NOT T_EBELN IS INITIAL
    ENDFORM. " SELECT_OBJ_ID
    *& Form SELECT_CHANGED_VALUE
    Subroutine to select Changed Values
    There are no interface parameters to be passed to this subroutine.
    FORM SELECT_CHANGED_VALUE .
    IF NOT T_CDHDR IS INITIAL.
    SELECT OBJECTCLAS " Object class
    OBJECTID " Object value
    CHANGENR " Document change number
    TABNAME " Table Name
    FNAME " Field Name
    VALUE_NEW " New contents of changed field
    VALUE_OLD " Old contents of changed field
    FROM CDPOS
    PACKAGE SIZE 10000
    APPENDING TABLE T_CDPOS
    FOR ALL ENTRIES IN T_CDHDR
    WHERE OBJECTCLAS EQ T_CDHDR-OBJECTCLAS
    AND OBJECTID EQ T_CDHDR-OBJECTID
    AND CHANGENR EQ T_CDHDR-CHANGENR.
    ENDSELECT.
    IF SY-SUBRC NE 0.
    W_FLAG = 1.
    MESSAGE S833(M8) WITH 'Item Not Found'(032).
    ENDIF. " IF SY-SUBRC NE 0.
    ENDIF. " IF NOT T_CDHDR IS INITIAL
    T_CDPOS_TEMP[] = T_CDPOS[].
    ENDFORM. " SELECT_CHANGED_VALUE
    *& Form SELECT_PUR_DOC
    Subroutine to select Purchase Order Details
    There are no interface parameters to be passed to this subroutine.
    FORM SELECT_PUR_DOC .
    IF NOT T_CDPOS IS INITIAL.
    SORT T_EBELN BY EBELN.
    LOOP AT T_CDPOS INTO FS_CDPOS.
    READ TABLE T_EBELN INTO FS_EBELN WITH KEY EBELN =
    FS_CDPOS-OBJECTID BINARY SEARCH.
    IF SY-SUBRC NE 0.
    DELETE TABLE T_EBELN FROM FS_EBELN.
    ENDIF. " IF SY-SUBRC NE 0.
    ENDLOOP. " LOOP AT T_CDPOS...
    LOOP AT T_EBELN INTO FS_EBELN.
    MOVE FS_EBELN-EBELN TO FS_EKKO-EBELN.
    MOVE FS_EBELN-ERNAM TO FS_EKKO-ERNAM.
    MOVE FS_EBELN-LIFNR TO FS_EKKO-LIFNR.
    MOVE FS_EBELN-EKGRP TO FS_EKKO-EKGRP.
    MOVE FS_EBELN-BEDAT TO FS_EKKO-BEDAT.
    APPEND FS_EKKO TO T_EKKO.
    ENDLOOP. " LOOP AT T_EBELN...
    T_EKKO_TEMP[] = T_EKKO[].
    ENDIF. " IF NOT T_CDPOS IS INITIAL
    ENDFORM. " SELECT_PUR_DOC
    *& Form SELECT_VENDOR
    Subroutine to select Vendor details
    There are no interface parameters to be passed to this subroutine.
    FORM SELECT_VENDOR .
    IF NOT T_EKKO IS INITIAL.
    SORT T_EKKO_TEMP BY LIFNR.
    DELETE ADJACENT DUPLICATES FROM T_EKKO_TEMP COMPARING LIFNR.
    SELECT LIFNR " Account Number of Vendor or
    " Creditor
    NAME1 " Name 1
    FROM LFA1
    INTO TABLE T_LFA1
    FOR ALL ENTRIES IN T_EKKO_TEMP
    WHERE LIFNR EQ T_EKKO_TEMP-LIFNR.
    IF SY-SUBRC NE 0.
    MESSAGE S002(M8) WITH 'Master Details'(033).
    ENDIF. " IF SY-SUBRC NE 0.
    ENDIF. " IF NOT T_EKKO IS INITIAL
    ENDFORM. " SELECT_VENDOR
    *& Form DESCRIPTION
    Subroutine to get the description
    There are no interface parameters to be passed to this subroutine.
    FORM DESCRIPTION .
    IF NOT T_CDPOS IS INITIAL.
    SORT T_CDPOS_TEMP BY TABNAME FNAME.
    DELETE ADJACENT DUPLICATES FROM T_CDPOS_TEMP COMPARING TABNAME FNAME
    SELECT TABNAME " Table Name
    FIELDNAME " Field Name
    ROLLNAME " Data element
    FROM DD03L
    INTO TABLE T_DATAELE
    FOR ALL ENTRIES IN T_CDPOS_TEMP
    WHERE TABNAME EQ T_CDPOS_TEMP-TABNAME
    AND FIELDNAME EQ T_CDPOS_TEMP-FNAME.
    IF NOT T_DATAELE IS INITIAL.
    T_DATAELE_TEMP[] = T_DATAELE[].
    SORT T_DATAELE_TEMP BY ROLLNAME.
    DELETE ADJACENT DUPLICATES FROM T_DATAELE_TEMP COMPARING ROLLNAME.
    SELECT ROLLNAME " Data element
    DDTEXT " Short Text Describing R/3
    " Repository Objects
    FROM DD04T
    INTO TABLE T_TEXT
    FOR ALL ENTRIES IN T_DATAELE_TEMP
    WHERE ROLLNAME EQ T_DATAELE_TEMP-ROLLNAME
    AND DDLANGUAGE EQ SY-LANGU.
    IF SY-SUBRC NE 0.
    EXIT.
    ENDIF. " IF SY-SUBRC NE 0.
    ENDIF. " IF NOT T_DATAELE IS INITIAL.
    ENDIF. " IF NOT T_CDPOS IS INITIAL.
    ENDFORM. " DESCRIPTION
    *& Form FILL_OUTTAB
    Subroutine to populate the Outtab
    There are no interface parameters to be passed to this subroutine.
    FORM FILL_OUTTAB .
    SORT T_CDHDR BY OBJECTCLAS OBJECTID CHANGENR.
    SORT T_EKKO BY EBELN.
    SORT T_LFA1 BY LIFNR.
    SORT T_DATAELE BY TABNAME FIELDNAME.
    SORT T_TEXT BY ROLLNAME.
    LOOP AT T_CDPOS INTO FS_CDPOS.
    READ TABLE T_CDHDR INTO FS_CDHDR WITH KEY
    OBJECTCLAS = FS_CDPOS-OBJECTCLAS
    OBJECTID = FS_CDPOS-OBJECTID
    CHANGENR = FS_CDPOS-CHANGENR
    BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    MOVE FS_CDHDR-USERNAME TO FS_OUTTAB-USERNAME.
    MOVE FS_CDHDR-UDATE TO FS_OUTTAB-UDATE.
    READ TABLE T_EKKO INTO FS_EKKO WITH KEY
    EBELN = FS_CDHDR-OBJECTID
    BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    MOVE FS_EKKO-EBELN TO FS_OUTTAB-EBELN.
    MOVE FS_EKKO-ERNAM TO FS_OUTTAB-ERNAM.
    MOVE FS_EKKO-LIFNR TO FS_OUTTAB-LIFNR.
    MOVE FS_EKKO-EKGRP TO FS_OUTTAB-EKGRP.
    MOVE FS_EKKO-BEDAT TO FS_OUTTAB-BEDAT.
    READ TABLE T_LFA1 INTO FS_LFA1 WITH KEY
    LIFNR = FS_EKKO-LIFNR
    BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    MOVE FS_LFA1-NAME1 TO FS_OUTTAB-NAME1.
    ENDIF. " IF SY-SUBRC EQ 0.
    ENDIF. " IF SY-SUBRC EQ 0.
    ENDIF. " IF SY-SUBRC EQ 0.
    MOVE FS_CDPOS-VALUE_NEW TO FS_OUTTAB-VALUE_NEW.
    MOVE FS_CDPOS-VALUE_OLD TO FS_OUTTAB-VALUE_OLD.
    READ TABLE T_DATAELE INTO FS_DATAELE WITH KEY
    TABNAME = FS_CDPOS-TABNAME
    FIELDNAME = FS_CDPOS-FNAME
    BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    READ TABLE T_TEXT INTO FS_TEXT WITH KEY
    ROLLNAME = FS_DATAELE-ROLLNAME
    BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    MOVE FS_TEXT-DDTEXT TO FS_OUTTAB-DDTEXT.
    ENDIF. " IF SY-SUBRC EQ 0.
    ENDIF. " IF SY-SUBRC EQ 0.
    APPEND FS_OUTTAB TO T_OUTTAB.
    CLEAR FS_OUTTAB.
    ENDLOOP.
    ENDFORM. " FILL_OUTTAB
    *& Form GET_CELL_INFO
    Subroutine to get the Cell Information
    --> W_VALUE Holds the value of Hotspot clicked
    FORM GET_CELL_INFO .
    CALL METHOD W_GRID->GET_CURRENT_CELL
    IMPORTING
    E_ROW =
    E_VALUE = W_VALUE
    E_COL =
    ES_ROW_ID =
    ES_COL_ID =
    ES_ROW_NO =
    ENDFORM. " GET_CELL_INFO
    *& Form VALIDATE_PD_NUM
    Subroutine to validate Purchase Document Number
    There are no interface parameters to be passed to this subroutine.
    FORM VALIDATE_PD_NUM .
    IF NOT S_EBELN[] IS INITIAL.
    SELECT EBELN " Purchase Document Number
    FROM EKKO
    INTO W_EBELN
    UP TO 1 ROWS
    WHERE EBELN IN S_EBELN.
    ENDSELECT.
    IF SY-SUBRC NE 0.
    CLEAR SSCRFIELDS-UCOMM.
    MESSAGE E717(M8).
    ENDIF. " IF SY-SUBRC NE 0
    ENDIF. " IF NOT S_EBELN[]...
    ENDFORM. " VALIDATE_PD_NUM
    *& Form VALIDATE_VEN_NUM
    Subroutine to validate Vendor Number
    There are no interface parameters to be passed to this subroutine.
    FORM VALIDATE_VEN_NUM .
    IF NOT S_LIFNR[] IS INITIAL.
    SELECT LIFNR " Vendor Number
    FROM LFA1
    INTO W_LIFNR
    UP TO 1 ROWS
    WHERE LIFNR IN S_LIFNR.
    ENDSELECT.
    IF SY-SUBRC NE 0.
    CLEAR SSCRFIELDS-UCOMM.
    MESSAGE E002(M8) WITH W_SPACE.
    ENDIF. " IF SY-SUBRC NE 0
    ENDIF. " IF NOT S_LIFNR[]...
    ENDFORM. " VALIDATE_VEN_NUM
    *& Form VALIDATE_PUR_GRP
    Subroutine to validate the Purchase Group
    There are no interface parameters to be passed to this subroutine.
    FORM VALIDATE_PUR_GRP .
    IF NOT S_EKGRP[] IS INITIAL.
    SELECT EKGRP " Purchase Group
    FROM T024
    INTO W_EKGRP
    UP TO 1 ROWS
    WHERE EKGRP IN S_EKGRP.
    ENDSELECT.
    IF SY-SUBRC NE 0.
    CLEAR SSCRFIELDS-UCOMM.
    MESSAGE E622(M8) WITH W_SPACE.
    ENDIF. " IF SY-SUBRC NE 0
    ENDIF. " IF NOT S_EKFRP[]...
    ENDFORM. " VALIDATE_PUR_GRP
    *& Form FILL_VARIANT
    Subroutine to fill the Variant Structure
    There are no interface parameters to be passed to this subroutine
    FORM FILL_VARIANT .
    Filling the Variant structure
    W_VARIANT-REPORT = SY-REPID.
    W_VARIANT-USERNAME = SY-UNAME.
    ENDFORM. " FILL_VARIANT
    <b>Reward if usefull</b>

  • Update SAP tables after ALV report is displayed

    Hi All,
    I have to display a ALV report using function module REUSE_ALV_GRID_DISPLAY.
    After the report is displayed, user can edit some of the flds in the report, and the fields need to updated in the table. How do I proceed to accomplish this.
    Is it possible to use FM 'REUSE_ALV_DRID_DISPLAY' to do this or we need to use OOPS ALV to do this. 
    I searched for this in this forum, but couldnt get.
    Thanks in advance,
    Ananth

    You can use the REUSE_ALV_GRID_DISPLAY. and can make it a changable. You can specify the column to be changable. Once the user enters data into that coloumn the interna table automatically gets populated with the values.
    I have done a similar program. However you might need to copy some standard GUI status based on your requirements.
    Whats ur mail ID. I can send you the program I have developed.
    Shreekant

  • Report to display PO details and download details in an excel fil

    Hi,
    I have been asked to develop a report for "Develop report to display PO details and download details in an excel file".
    Could any one guide me technically what are the different tables i need to take to generate the report. Treat this is very urgent. Pls provide sample code too....
    Thanks in advance....

    Purchase Order PO
    Tcode for creation ME21,ME22,ME23. tables EKKO,EKPO.
    refer this program
    REPORT ZPOCHANGE.
    This is a subroutine perform in the Purchase order Layout sets.
    Description :  To retreive the details of changed remarks in PO output and to capture the retrival date
                         Additional features with the previous changed appearing.  e.g. from .... to
    Note        :  If the latest modification details required
    Please Uncomment the lines mentioned under  'Last Modified Remarks only'
    Information
    /: PERFORM CHDATE IN PROGRAM ZPOCHANGE
    /:               USING &EKKO-EBELN&
    /:               CHANGING &RVDATE2&
    /: ENDPERFORM.
    /: IF &RVDATE2& EQ ' '.
    /  Revision Date: NIL
    /: ELSE.
    /  Revision Date: &RVDATE2&
    /: ENDIF.
    Main Window
    /E CHANGE_REMARKS
    /: PERFORM CHDET IN PROGRAM ZPOCHANGE
    /:            USING &EKPO-EBELP&
    /:            USING &EKKO-EBELN&
    /:            USING &T166T-CHTXT&
    /:            USING &T166T-CTXNR&
    /:            CHANGING &ITAB1-F_NEW&
    /:            CHANGING &ITAB1-F_OLD&
    /:ENDPERFORM.
    /:IF &ITAB1-F_NEW& NE ' '
    =  &ITAB1-F_OLD(C)& CHANGED TO &ITAB1-F_NEW(C)&
    /:ENDIF
    You might need to apply Note 373524 - Message determination and printing
    TABLES : CDSHW , "Change documents, formatting table
             CDHDR , "Change document header
             EKPO  , "Purchasing Document Item
             EKKO  , "Purchasing Document Header
             T166C . "Print-Relevant Purchasing Document Changes
    DATA   : ITAB1 LIKE CDSHW OCCURS 100 WITH HEADER LINE.
    DATA   : ITAB2 LIKE EKPO  OCCURS 100 WITH HEADER LINE.
    DATA   : DOCUM LIKE EKKO OCCURS 100 WITH HEADER LINE.
    DATA   : TABKEY LIKE CDSHW-TABKEY.
    data    : begin of ctab occurs 10,
              tname like t166c-tname,
              fname like t166c-fname,
              TABKEY LIKE CDSHW-TABKEY,
              FLAG(3),
              end of ctab.
    DATA   : VAL1(15), VAL2(15).
    DATA : M1(20), M2(10), M3(10),M4(5).
    DATA : RVDATE(10),RVDATE2(10) , EBELN LIKE EKKO-EBELN, COUNT TYPE I.
    Text number for change text(CTXNR), CHANGE TEXT(CHTXT), Purchase order
    Number and item number are passed from Layoutset
          FORM CHDET                                                    *
    -->  ITAB                                                          *
    -->  OTAB                                                          *
    FORM CHDET TABLES ITAB STRUCTURE  ITCSY
                      OTAB STRUCTURE  ITCSY.
      LOOP AT ITAB.
        CASE ITAB-NAME.
          WHEN 'T166T-CHTXT'.
            MOVE ITAB-VALUE TO M1.
          WHEN 'T166T-CTXNR'.
            MOVE ITAB-VALUE TO M2.
          WHEN 'EKKO-EBELN'.
            MOVE ITAB-VALUE TO M3.
          WHEN 'EKPO-EBELP'.
            MOVE ITAB-VALUE TO M4.
        ENDCASE.
      ENDLOOP.
    Throught this function change details are retrived into itab1.
      CALL FUNCTION 'ME_CHANGES_READ'
           EXPORTING
                DOCUMENT_CATEGORY = 'F'
                DOCUMENT_NUMBER   = M3
           TABLES
                XCDSHW            = itab1.
      SELECT SINGLE * FROM T166C WHERE CTXNR = M2.
      IF SY-SUBRC = 0.
        CONCATENATE M3 M4  INTO TABKEY.
    ********Last Modified Remarks only**********************
       read table ctab with key  tname  = T166C-TNAME
                                         tabkey  = tabkey
                                         fname   = T166C-FNAME.
       if sy-subrc ne 0.
        LOOP AT ITAB1 WHERE TABNAME = T166C-TNAME
                                      AND   TABKEY+3(15) = TABKEY
                                      AND   FNAME = T166C-FNAME.
    *********Last Modified Remarks only**********************
           ctab-tname  = t166c-tname.
           ctab-fname  = t166c-fname.
           ctab-tabkey = tabkey.
           append ctab.
          delete itab1.
          exit.
        endloop.
    Captured details are exported to Layoutset
        LOOP AT OTAB.
          CASE OTAB-NAME.
            WHEN 'ITAB1-F_OLD'.
              OTAB-VALUE = ITAB1-F_OLD.
              MODIFY OTAB.
              CLEAR : ITAB1-F_OLD.
            WHEN 'ITAB1-F_NEW'.
              OTAB-VALUE = ITAB1-F_NEW.
              MODIFY OTAB.
              CLEAR : ITAB1-F_NEW.
          ENDCASE.
        endloop.
      endif.
    ******Last Modified Remarks only****************
    ENDIF.
      clear ctab.
    ENDFORM.
          FORM CHDATE                                                   *
    -->  ITAB                                                          *
    -->  OTAB                                                          *
    Form for revision date retrival. PO no. is passed from layoutset
    and in the change document header latest modified date is captured
    and passed to revision date field in Layoutset.
    FORM CHDATE TABLES ITAB STRUCTURE  ITCSY
                      OTAB STRUCTURE  ITCSY.
      CLEAR : RVDATE, EBELN.
      LOOP AT ITAB.
        CASE ITAB-NAME.
          WHEN 'EKKO-EBELN'.
            MOVE ITAB-VALUE TO EBELN.
        ENDCASE.
      ENDLOOP.
    SELECT UDATE INTO CDHDR-UDATE FROM CDHDR WHERE OBJECTCLAS = 'EINKBELEG'
                                                       AND OBJECTID = EBELN.
        IF RVDATE < CDHDR-UDATE.
          RVDATE = CDHDR-UDATE.
        ENDIF.
        COUNT = COUNT + 1.
      ENDSELECT.
      LOOP AT OTAB.
        CASE OTAB-NAME.
          WHEN 'RVDATE2'.
         CONCATENATE RVDATE6(2) '.' RVDATE4(2) '.' RVDATE(4) INTO RVDATE2.
            IF COUNT = 1.
              RVDATE2 = ''.
            ENDIF.
            MOVE RVDATE2 TO OTAB-VALUE.
            MODIFY OTAB.
        ENDCASE.
      ENDLOOP.
    CLEAR : COUNT.
    ENDFORM.
    Message was edited by:
            Karthikeyan Pandurangan

  • Report to display Average time taken for processing payments".

    Hi,
    I have been asked to develop a report for "Report to display Average time taken for processing payments".
    Could any one guide me technically what are the different tables i need to take to generate the report. Treat this is very urgent. Pls provide sample code too....
    Thanks in advance....

    Given below is the set up for credit card payment processing:
    Set Up Credit Control Areas:
    Define Credit Control Area
    Transaction: OB45 
    Tables: T014
    Action: Define a credit control area and its associated currency.  The Update Group should be ‘00012’.  This entry is required so the sales order will calculate the value to authorize
    Assign Company Code to Credit Control Area
    Transaction: OB38
    Tables: T001
    Action: Assign a default credit control area for each company code
    Define Permitted Credit Control Area for a Company
    Code
    Transaction: 
    Tables: T001CM
    Action: For each company code enter every credit control area that can be used
    Identify Credit Price
    Transaction: V/08
    Tables: T683S
    Action: Towards the end of the pricing procedure, after all pricing and tax determination, create a subtotal line to store the value of the price plus any sales tax.  Make the following entries:
    Sub to:  “A”
    Reqt:  “2”
    AltCTy:  “4”
    Automatic Credit Checking
    Transaction: OVA8
    Tables: T691F
    Action: Select each combination of credit control areas, risk categories and document types for which credit checking should be bypassed.  You need to mark the field “no Credit Check” with the valid number for sales documents.
    Set Up Payment Guarantees
    Define Forms of Payment Guarantee
    Transaction: OVFD
    Tables: T691K
    Action: R/3 is delivered with form “02” defined for payment cards.  Other than the descriptor, the only other entry should be “3” in the column labeled “PymtGuaCat”
    Define Payment Guarantee Procedure
    Transaction: 
    Tables: T691M/T691O
    Action: Define a procedure and a description. 
    Forms of Payment Guarantee and make the following entries Sequential Number  “1” 
    Payment Guarantee Form “02”
    Routine Number   “0”    Routine Number can be used to validate payment card presence.
    Define Customer Payment Guarantee Flag
    Transaction: 
    Tables: T691P
    Action: Define a flag to be stored in table. 
    Create Customer Payment Guarantee = “Payment Card Payment Cards (All Customers can use Payment Cards)”.
    Define Sales Document Payment Guarantee Flag
    Transaction: 
    Tables: T691R
    Action: Define the flag that will be associated with sales document types that are relevant for payment cards
    Assign Sales Document Payment Guarantee Flag
    Transaction: 
    Tables: TVAK
    Action: Assign the document flag type the sales documents types that are relevant for payment cards.
    Determine Payment Guarantee Procedure
    Transaction: OVFJ
    Tables: T691U
    Action: Combine the Customer flag and the sales document flag to derive the payment guarantee procedure
    Payment Card Configuration
    Define Card Types
    Transaction: 
    Tables: TVCIN
    Action: Create the different card types plus the routine that validates the card for length and prefix (etc…) 
    Visa , Mastercard, American Express, and Discover 
    Create the following entries for each payment card 
    AMEX  American Express ZCCARD_CHECK_AMEX Month
    DC  Discover Card  ZCCARD_CHECK_DC  Month*****
    MC  Mastercard  ZCCARD_CHECK_MC  Month
    VISA  Visa   ZCCARD_CHECK_VISA  Month
    The Routines can be created based on the original routines delivered by SAP. 
    *****SAP does not deliver a card check for Discover Card. We created our own routine.
    Define Card Categories
    Transaction: 
    Tables: TVCTY
    Action: Define the card category to determine if a
    payment card is a credit card or a procurement card.
    Create the following two entries
    Cat Description  One Card  Additional Data
    CC Credit Cards  No-check  No-check
    PC Procurement Cards No-check  Check
    Determine Card Categories
    Transaction: 
    Tables: TVCTD
    Action: For each card category map the account number range to a card category.  Multiple ranges are possible for each card category or a masking technique can be used.  Get the card number ranges from user community.  Below is just a sample of what I am aware are the different types of cards. 
    Visa Credit  Expires in 7 days. 
        400000   405500
        405505   405549
        405555   415927
        415929   424603
        424606   427532
        427534   428799
        428900   471699
        471700   499999
    Visa Procurement  Expires in 7 days.
        405501   405504
        405550   405554
        415928   415928
        424604   424605
        427533   427533
        428800   428899
    Mastercard Credit Expires in 30 days
        500000   540499
        540600   554999
        557000   599999
    Mastercard Procurement Expires in 30 days
        540500   540599
        555000   556999
    American Express Credit Expires in 30 days
        340000   349999
        370000   379999
    Discover Card Credit Expires in 30 days
        601100   601199
    Set Sales Documents to accept Payment Card Information Transaction: 
    Tables: TVAK
    Action: Review the listing of Sales Document types and enter “03” in the column labeled “PT” for each type which can accept a payment card
    Configuration for Authorization Request
    Maintain Authorization Requirements
    Transaction: OV9A
    Tables: TFRM
    Action: Define and activate the abap requirement that determines when an authorization is sent.  Note that the following tables are available to be used in the abap requirement (VBAK, VBAP, VBKD, VBUK, and VBUP).
    Define Checking Group
    Transaction: 
    Tables: CCPGA
    Action: Define a checking group and enter the
    description.  Then follow the below guidelines for the remaining fields to be filled.
    AuthReq Routine 901 is set here.
    PreAu  If checked R/3 will request an authorization for a .01 and the authorization will be flagged as such. (Insight does not use pre-authorization check).
    A horizon This is the days in the future SAP will use to determine the value to authorize
    (Insight does not use auth horizon period).
    Valid  You will get warning message if the payment card is expiring within 30 days of order entry date. 
    Assign Checking Group to Sales Document
    Transaction: 
    Tables: TVAK
    Action: Assign the checking group to the sales order types relevant for payment cards
    Define Authorization Validity Periods
    Transaction: 
    Tables: TVCIN
    Action: For each card type enter the authorization validity period in days.
    AMEX American Express 30
    DC Discover card  30
    MC Master card  30
    VISA Visa   7
    Configuration for clearing houses
    Create new General Ledger Accounts
    Transaction: FS01
    Tables: 
    Action: Two General Ledger accounts need to be created for each payment card type.  One for A/R reconciliation purposes and one for credit card clearing.
    Maintain Condition Types
    Transaction: OV85
    Tables: T685
    Action: Define a condition type for account determination and assign it to access sequence “A001”
    Define account determination procedure
    Transaction: OV86
    Tables: T683 / T683S
    Action: Define procedure name and select the procedure for control.  Enter the condition type defined in the previous step.
    Assign account determination procedure
    Transaction: 
    Tables:
    Action: Determine which billing type we are using for payment card process.
    Authorization and Settlement Control
    Transaction: 
    Tables: TCCAA
    Action: Define the general ledger accounts for reconciliation and clearing and assign the function modules for authorization and settlement along with the proper RFC destinations for each.
    Enter Merchant ID’s
    Transaction: 
    Tables: TCCM
    Action: Create the merchant id’s that the company uses to process payment cards
    Assign merchant id’s
    Transaction: 
    Tables: TCCAA
    Action: Enter the merchant id’s with each clearinghouse account

  • ALV Report to display the status of the requests raised through ESS

    Hi All,
    We have to develop a ALV report to display the status of the requests raised through ESS
    for Leave, Travel & Event Management, Travel and Appraisal workflows.
    ESS Travel, ESS TEM, ESS Apraisal workflows are associted with SAP Business Objects.
    we are using the function module SWI_WORKITEMS_OF_OBJTYPE_GET to get
    the top level work item id's by passing the object type like PDRELA_025, BUS2089.
    By using SWP_WORKFLOW_LOG_READ function we are getting the workflow log
    by passing top level work item id's as imort parameter. 
    The report output should have the following fields
    Initiator, Initiator Personal No, Request Type( Leave, Travel etc.. )
    Date of application of the request, Status ( Approved by RM, Rejected etc )
    Name of the Approver, Approved / Rejected Date.
    The logic should be work for all the above ESS workflows and should be generalized.
    Can any one please let me know the procedure to get the required information from the workflow log.
    It would be great if any one suggest on the same how to proceed further to get the information as mentioned above.
    Thanks & Regards,
    Jagadeeswara Rao Balla.

    Hello,
    You can get most of that information from fm SAP_WAPI_GET_HEADER, input is workitem_id.
    regards
    Rick Bakker
    Hanabi Technology

  • How to generate Inventory Report to display all details at end of mon/yr?

    Hi Guys..
    I would like to know how we can generate a
    Inventory report to display all inventory details at the end of every
    month or year?
    Also, another question.How can we create a PO past delivery date report?
    Any help is appreciated.
    Thanks,
    Sri Harsha;

    Hi,
    Pls the code here-
    TYPES :
            BEGIN OF ty_mard,
              matnr TYPE matnr,
              werks TYPE werks_d,
              lgort TYPE lgort_d,
              labst TYPE labst,
              retme TYPE retme,
              umlme TYPE umlme,
            END OF ty_mard.
    TYPES :
           BEGIN OF ty_mska,
              matnr TYPE matnr,
              kalab TYPE labst,
              vbeln TYPE vbeln,
              posnr TYPE posnr,
            END OF ty_mska.
    TYPES :
            BEGIN OF ty_vbap,
              matnr TYPE matnr,
              kwmeng TYPE kwmeng,
              pstyv TYPE pstyv,
            END OF ty_vbap.
    TYPES :
            BEGIN OF ty_mbew,
              matnr TYPE matnr,
              salk3 TYPE salk3,
              stprs TYPE stprs,
            END OF ty_mbew.
    TYPES :
            BEGIN OF ty_mchb,
              matnr TYPE matnr,
              charg TYPE charg_d,
            END OF ty_mchb.
    TYPES :
            BEGIN OF ty_mara,
              matnr TYPE matnr,
              mfrpn TYPE mfrpn,
            END OF ty_mara.
    TYPES :
           BEGIN OF ty_makt,
             matnr TYPE matnr,
             maktx TYPE maktx,
           END OF ty_makt.
    TYPES :
            BEGIN OF ty_ekpo,
             matnr TYPE matnr,
             netpr TYPE bprei,
             meins TYPE bstme,
            END OF ty_ekpo.
    DATA :
           BEGIN OF final OCCURS 0,
            matnr LIKE mard-matnr,
            maktx LIKE makt-maktx,
            werks LIKE mard-werks,
            lgort LIKE mard-lgort,
            mfrpn LIKE mara-mfrpn,
            usp LIKE mbew-stprs,
            labst LIKE mard-labst,
            salk3 LIKE mbew-salk3,
            kalab LIKE mska-kalab,
            vbeln LIKE mska-vbeln,
            sov LIKE ekpo-netpr,
            uom LIKE ekpo-meins,
            posnr LIKE mska-posnr,
            pstyv LIKE vbap-pstyv,
            kwmeng LIKE vbap-kwmeng,
            retme LIKE mard-retme,
            umlme LIKE mard-umlme,
           END OF final.
    DATA :
          BEGIN OF itab OCCURS 0,
            matnr LIKE mard-matnr,
            werks LIKE mard-werks,
            lgort LIKE mard-lgort,
            labst LIKE mard-labst,
            retme LIKE mard-retme,
            umlme LIKE mard-umlme,
            charg LIKE mchb-charg,
          END OF itab.
    DATA :
           i_mard TYPE STANDARD TABLE OF ty_mard,
           i_mbew TYPE STANDARD TABLE OF ty_mbew,
           i_mchb TYPE STANDARD TABLE OF ty_mchb,
           i_mara TYPE STANDARD TABLE OF ty_mara,
           i_vbap TYPE STANDARD TABLE OF ty_vbap,
           i_mska TYPE STANDARD TABLE OF ty_mska,
           i_makt TYPE STANDARD TABLE OF ty_makt,
           i_ekpo TYPE STANDARD TABLE OF ty_ekpo.
    DATA :
           wa_mard TYPE ty_mard,
           wa_mbew TYPE ty_mbew,
           wa_mchb TYPE ty_mchb,
           wa_mara TYPE ty_mara,
           wa_vbap TYPE ty_vbap,
           wa_mska TYPE ty_mska,
           wa_makt TYPE ty_makt,
           wa_ekpo TYPE ty_ekpo.
    DATA :
           sov_total TYPE currency,
           urestrict_total type currency.
    *Select options:
    SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE text-001.
    SELECT-OPTIONS : s_matnr FOR gf_matnr, " Material No.
                     s_werks FOR gf_werks, " Plant
                     s_lgort FOR gf_lgort, " Storage Location
                     s_charg FOR gf_charg. " Batch No.
    SELECTION-SCREEN END OF BLOCK a.
    *Validation of Selection Fields
    AT SELECTION-SCREEN.
      IF     s_matnr IS INITIAL
         AND s_werks IS INITIAL
         AND s_lgort IS INITIAL
         AND s_charg IS INITIAL.
        MESSAGE e001(zcir).
      ENDIF.
    *Function Module for Checking the inputs
      CALL FUNCTION 'MMIM_ENTRYCHECK_MAIN'
        TABLES
          it_matnr = s_matnr
          it_werks = s_werks
          it_lgort = s_lgort.
    *Checking of input values for S_CHARG
      IF NOT s_charg-low IS INITIAL OR NOT s_charg-high IS INITIAL.
        SELECT charg FROM mchb into table LT_charg WHERE charg IN s_charg.
        IF sy-subrc NE 0.
          MESSAGE e002(zcir).
        ENDIF.
        clear wa_mchb.
      ENDIF.
    *TOP OF PAGE
    TOP-OF-PAGE.
      FORMAT COLOR COL_HEADING.
      WRITE sy-uline(105).
      WRITE :/ '|',2 text-101, "MATERIAL NO:
             16 text-102,    "MATERIAL DESCRIPTION
             52 text-103,    "PLANT
             60 text-104,    "STORAGE LOCATION.
             74 text-105,    "MANUFACTURE PARTNER NO.
             88 text-106,    "VALUATED STOCK.
             95 text-107.    "STANDARD PRICE.
            105 '|'.
      FORMAT COLOR COL_GROUP.
      WRITE :/ '|',2 text-108, " UNRESTRCTED STOCK
              16 text-109,     " SALES DOCUMENT NO:
              20 text-110,     " ITEM NO:
              27 text-111,     " UNIT
              32 text-112,     " NET VALUE
              39 text-113,     " ITEM CATEGRY
              50 text-114,     " QUANTITY
              60 text-115,     " BLOCKED STOCK
              79 text-116,     " TOTAL STOCK
              95 text-117.     " STOCK TRANSFER
             87 '|'.
      FORMAT COLOR OFF.
      WRITE sy-uline(105).
    *START OF SELECTION
    START-OF-SELECTION.
      IF NOT s_matnr IS INITIAL
        OR NOT s_werks IS INITIAL
        OR NOT s_lgort IS INITIAL.
        PERFORM select1.
      ELSEIF NOT s_charg IS INITIAL.
        PERFORM select2.
      ELSEIF NOT s_matnr IS INITIAL
        OR NOT s_werks IS INITIAL
        OR NOT s_lgort IS INITIAL
        AND NOT s_charg IS INITIAL.
        PERFORM select3.
      ENDIF.
      PERFORM final1.
      PERFORM collect.
    *END OF SELECTION
    END-OF-SELECTION.
      LOOP AT LT_FINAL.
        FORMAT COLOR COL_KEY.
        WRITE :/2 LT_FINAL-matnr,
               14 LT_FINAL-maktx,
               52 LT_FINAL-werks,
               58 LT_FINAL-lgort,
               69 LT_FINAL-mfrpn,
               73 LT_FINAL-labst,
               87 LT_FINAL-usp.
        FORMAT COLOR OFF.
        FORMAT COLOR COL_NORMAL.
        WRITE :/2 LT_FINAL-kalab,
                14 LT_FINAL-vbeln,
                17 LT_FINAL-posnr,
                24 LT_FINAL-uom,
                28 LT_FINAL-sov,
                36 LT_FINAL-pstyv,
                46 LT_FINAL-kwmeng,
                57 LT_FINAL-retme,
                65 LT_FINAL-salk3,
                75 LT_FINAL-umlme.
      ENDLOOP.
      FORMAT COLOR COL_TOTAL.
      WRITE :/2 text-119,     " TOTAL VALUE
              28 V_sov_total,
              87 V_urestrict_total.
      FORMAT COLOR OFF.
    Form Name: select1
    text: Population of internal table LT_MARD and using LT_MARD populating
          the internal table LT_MCHB
    FORM select1.
      SELECT matnr
             werks
             lgort
             labst
             retme
             umlme
             FROM mard
             INTO TABLE LT_mard
             WHERE matnr IN s_matnr
             AND werks IN s_werks
             AND lgort IN s_lgort.
      SELECT matnr
             charg
             FROM mchb
             INTO TABLE LT_mchb
             FOR ALL ENTRIES IN LT_mard
             WHERE matnr EQ LT_mard-matnr.
    ENDFORM.                                                    "select1
    Form Name: select2
    text:Population of internal table LT_MCHB and using LT_MCHB populating
         LT_MARD
    FORM select2.
      SELECT matnr
             charg
             FROM mchb
             INTO TABLE LT_mchb
             WHERE charg IN s_charg.
      SELECT matnr
             werks
             lgort
             labst
             retme
             umlme
             FROM mard
             INTO TABLE LT_mard
             FOR ALL ENTRIES IN LT_mchb
             WHERE matnr EQ LT_mchb-matnr.
    ENDFORM.                                                    "select2
    Form Name: select3
    text: Population of internal table LT_TAB using inner join and then
          populating internal tables LT_MARD and LT_MCHB
    FORM select3.
      SELECT a~matnr
             a~werks
             a~lgort
             a~labst
             a~retme
             a~umlme
             b~charg
             INTO CORRESPONDING FIELDS OF TABLE LT_TAB
             FROM mard AS a
             INNER JOIN mchb AS b ON bmatnr = amatnr
             WHERE a~matnr IN s_matnr
             OR a~werks IN s_werks
             OR a~lgort IN s_lgort
             AND b~charg IN s_charg.
      LOOP AT LT_TAB.
        MOVE: LT_TAB-matnr TO wa_mard-matnr,
              LT_TAB-werks TO wa_mard-werks,
              LT_TAB-lgort TO wa_mard-lgort,
              LT_TAB-labst TO wa_mard-labst,
              LT_TAB-retme TO wa_mard-retme,
              LT_TAB-umlme TO wa_mard-umlme,
              LT_TAB-matnr TO wa_mchb-matnr,
              LT_TAB-charg TO wa_mchb-charg.
        APPEND wa_mard TO LT_mard.
        APPEND wa_mchb TO LT_mchb.
      ENDLOOP.
    ENDFORM.                                                    "select3
    Form Name:collect
    text:population of LT_FINAL internal table-LT_FINAL using other internal
          tables
    FORM collect.
      LOOP AT LT_mard INTO wa_mard.
        MOVE : wa_mard-matnr TO LT_FINAL-matnr,
               wa_mard-werks TO LT_FINAL-werks,
               wa_mard-lgort TO LT_FINAL-lgort,
               wa_mard-labst TO LT_FINAL-labst,
               wa_mard-retme TO LT_FINAL-retme,
               wa_mard-umlme TO LT_FINAL-umlme.
        READ TABLE LT_makt INTO wa_makt WITH KEY matnr = wa_mard-matnr.
        MOVE wa_makt-maktx TO LT_FINAL-maktx.
        READ TABLE LT_mska INTO wa_mska WITH KEY matnr = wa_mard-matnr.
        MOVE: wa_mska-kalab TO LT_FINAL-kalab,
              wa_mska-vbeln TO LT_FINAL-vbeln,
              wa_mska-posnr TO LT_FINAL-posnr.
        READ TABLE LT_vbap INTO wa_vbap WITH KEY matnr = wa_mard-matnr.
        MOVE: wa_vbap-kwmeng TO LT_FINAL-kwmeng.
        READ TABLE LT_mara INTO wa_mara WITH KEY matnr = wa_mard-matnr.
        MOVE : wa_mara-mfrpn TO LT_FINAL-mfrpn.
        READ TABLE LT_mbew INTO wa_mbew WITH KEY matnr = wa_mard-matnr.
      Calculation of Unrestricted value
        LT_FINAL-usp = wa_mard-labst * wa_mbew-stprs.
        V_urestrict_total = V_urestrict_total + ( wa_mard-labst * wa_mbew-stprs ).
       CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
         EXPORTING
           input         = V_urestrict_total
        IMPORTING
          OUTPUT        = V_urestrict_total
        MOVE wa_mbew-salk3 TO LT_FINAL-salk3.
        READ TABLE LT_ekpo INTO wa_ekpo WITH KEY matnr = wa_mard-matnr.
        MOVE wa_ekpo-meins TO LT_FINAL-uom.
      Calculation of Sales Order Value
        LT_FINAL-sov = wa_mska-kalab * wa_ekpo-netpr.
        V_sov_total = V_sov_total + ( wa_mska-kalab * wa_ekpo-netpr ).
        APPEND LT_FINAL.
      ENDLOOP.
    ENDFORM.                    "collect
    *Form Name:FINAL1
    *Population of all the internal tables
    FORM FINAL1.
      SELECT matnr
             kalab
             vbeln
             posnr
             FROM mska
             INTO TABLE LT_mska
             FOR ALL ENTRIES IN LT_mard
             WHERE matnr EQ LT_mard-matnr.
      SELECT matnr
             kwmeng
             pstyv
             FROM vbap
             INTO TABLE LT_vbap
             FOR ALL ENTRIES IN LT_mard
             WHERE matnr EQ LT_mard-matnr.
      SELECT matnr
             salk3
             stprs
             FROM mbew
             INTO TABLE LT_mbew
             FOR ALL ENTRIES IN LT_mard
             WHERE matnr EQ LT_mard-matnr.
      SELECT matnr
             mfrpn
             FROM mara
             INTO TABLE LT_mara
             FOR ALL ENTRIES IN LT_mard
             WHERE matnr EQ LT_mard-matnr.
      SELECT matnr
             maktx
             FROM makt
             INTO TABLE LT_makt
             FOR ALL ENTRIES IN LT_mard
             WHERE matnr EQ LT_mard-matnr.
      SELECT matnr
             netpr
             FROM ekpo
             INTO TABLE LT_ekpo
             FOR ALL ENTRIES IN LT_mard
             WHERE matnr EQ LT_mard-matnr.
    ENDFORM.                                                    "final1
    Reward if helpful.
    Chandralekha

  • Function Module to display Campaign

    Dear SAPiens,
    I need a Function Modul, which displays the campaign.
    In my Report I have the GUID or the Object ID of the campaign.
    Regards,
    Ahmet

    The solution
        DATA lv_cpg       TYPE REF TO cl_crm_mktpl_application.
          CREATE OBJECT lv_cpg.
          CALL METHOD lv_cpg->start_application
            EXPORTING
              im_select_object = l_f_guid
              IM_MODE          = 'D'.

  • Diplay Functional,Reporting and Local currency

    Hi,
    I've a requirement to display Transactions in functional,Reporting as well as in Local currency.Do I need to setup Oracle 11i Env in MRC for that?If so how to get the transactions displayed in Local cuirrency ?Do I need to Covert them or I've to create new set of books for the same like we create one for reporting currency?
    This requirement is for 11.5.10.2 as well as R12
    Thanks,
    Mahender
    Edited by: user518071 on Jul 30, 2010 6:20 AM

    Hi
    You need to do the following
    In 11i
    1. You need to set up Reporting Set of Books to get the transactions and reports in Reporting currency for Local Currency, Functional Currency.
    2. If your Functional Currency is USD, Reporting Currency is EUR and Local Currency is AED, then you need to set Main SOB in USD and Reporting SOB in EUR and AED.
    In R12
    1. You can set Reporting currency if you need the transactions and reports in Reporting currency provided Chart of Accounts, Calendar and Convention is same.
    If your Functional Currency is USD, Reporting Currency is EUR and Local Currency is AED, then you need to set Main SOB in USD and Reporting SOB in EUR and AED.
    2. If the requirement is not only currency but you need for a different Calendar or COA or Accounting convention, then you need to set a Secondary Ledger
    Hope this helps
    Regards
    Sivakumar

  • Bold font in report output display

    Dear All,
    Will any one let me know how to set BOLD font in the report output display?
    Thanks,
    Ranjan

    <b>u cannot use this in 4.7</b>
    REPORT ZFONT NO STANDARD PAGE HEADING LINE-SIZE 80 LINE-COUNT 65.
    Start of print-control
    NEW-PAGE PRINT ON.
    PRINT-CONTROL FUNCTION 'SF000'.
    WRITE: / 'This is CPI 20'.
    SKIP.
    PRINT-CONTROL FUNCTION 'SF020'.
    WRITE: / 'This is CPI 6'.
    SKIP.
    PRINT-CONTROL FUNCTION 'SF008'.
    WRITE: / 'This is CPI 12'.
    Depending on your SAP printer device, this may also work
    PRINT-CONTROL FONT 1 LPI 6.
    you can try to change font and LPI numbers
    WRITE: / 'font 1 lpi 6'.
    PRINT-CONTROL FONT 2 LPI 6.
    WRITE: / 'font 2 lpi 6'.
    PRINT-CONTROL FONT 3 LPI 6.
    WRITE: / 'font 3 lpi 6'.
    End of print-control
    NEW-PAGE PRINT OFF.
    *--- End of Program

  • Oracle BAM report to display N number of records

    hello,
    We have configured a BAM report which displays data from a DB view. now since my view has 100's of records and we would like to show only first 100 records on report page.
    I understand this can be achieved by changing my query by adding  rownum <= 100 but here we dont want to change the query.
    I have checked on BAM report property and dont see any such setting...
    is this achievable from BAM DO or other property setting. ?

    resolved this issue by using FlowN functionality available in BAM

  • Crystal Reports XI - Display multiple reports in the same viewer window

    Post Author: crystal_dev
    CA Forum: General
    Hello,
    We recently upgraded from CR 8 to CR XI. In CR 8, we were able to display multiple RPT files in the same run time viewe window and the reports would display in different tabs. However, we are not able to accomplish the same in the CR XI version of the crviewer.dll. Each report comes up in a different viewer windows which can be quite annoying to the user.
    Any way to do this in CR XI?
    Thanks.

    Hi Smitha,
    Wow - complicated reporting structure!   What the business wants can be done by creating direct reporting relationships between the positions - using the "005" relationship.  However, this is complicated and is difficult to maintain as there are probably frequent changes to this structure.  Also difficult to control if there are three chiefs in one org - who would approve vacations, pay raises or expense reports in Org Unit 1?  Per this structure any of the three could without consulting the others (all chiefs are equal). 
    Recommended:  Five separate Org Units - One for each Chief.  Org 1 has Position S1; Org unit 2 has position S2 as Chief and and position S5.  Org unit 3 has S3 as chief and S7 and S8 reporting to him; Org Unit 4 has S4 as chief; Org Unit 5 reports to Org Unit 4 and has S5 as Chief with S6 and S7 reporting to him.  You have S7 and S5 reporting to two different chiefs.  You may have a "dotted line" relationship for functional reports, but again recommend that there be only one individual who can grant pay increases, approve vacations, etc.  The dotted line or functional relationship can be handled via a "Matrix" relationship. 
    You and the business will have to sit down and decide the real "reporting" structure of this organization.  "Who reports to whom" and then build the structure around that.  You should not reproduce the structure as it has been just because many years ago with another system someone created a bunch of boxes.  SAP is flexible enough to handle any reporting structure, but for ease of maintenance, understandabilty, adaptability to Workflow and flexibility, please try to use the standard structure of Org Units with one chief and separate Org Units reporting to that one each with its own chief. 
    Paul

Maybe you are looking for

  • Help with a runtime error

    hey guys im getting a runtime error that i can't figure out. this is my code import java.io.*; public class InputOutput      public static void main(String[] args) throws IOException           int charCount=0,                wordCount=0,             

  • Mail Session configuration with embedded oc4j in jdeveloper 10g 10.1.3.1

    Hello all: I'd tried to use javamail in a j2ee application. I´d defined an resource reference with the EJB Module Editor but when i run the application it throws: java.lang.InstantiationException: Error initializing ejb-modules: No Mail Session confi

  • Help to convert into SWF or Mp4

    I'm doing a website for a client who has an instructional video that needs to be cut into parts and saved as SWFs The dvd came as 3 files, 1 is the audio(mp3) the other is the video (Pal Version MPEG2-DVD.m2v)?????? and the other seems to be the file

  • I forgot security confimation

    I forgot security confimation

  • Best technical document about patch management

    HI, Every month Microsoft patches are deployed to about 5000+ desktops with Windows 7 32 Bit Enterprise Edition. There is only 90% desktops are getting the patches are installed. Please let me know how do i troubleshoot remaining 10% desktops which a