Report to Display Pack Code

hi,
We need a report for the Stock Transfer Advice Value Particulars based on the Packing Code from MARC table, Plant, Material, Distribution Channel, Sales Org almost from 5 tables like MARC, LIKP, LIPS, A820, KONP basing on the delivery date between the start and end dates of price in a820.
The format Should be as Below:
PACKINDCODE- BASIC VALUE - No of C/S - TOTAL BASIC VALUE - Material Requirement Planning .
Please Provide an Idea and Steps to Proceed further.
Thanx in Advance,
Regards,
KAMAL KP

Hi satish,
Check this code,
data: BEGIN OF itab OCCURS 0,
       name(30) TYPE c,
       id(02)   TYPE c,
       des(30)  TYPE c,
       Ini(01)  TYPE c,
      END OF itab,
      wa LIKE LINE OF itab.
START-OF-SELECTION.
wa-name = 'Ram'.
wa-id   = 'z7'.
wa-des = 'Others'.
APPEND wa to itab. CLEAR wa.
wa-name = 'Ram'.
wa-id   = 'z2'.
wa-des = 'Diploma'.
APPEND wa to itab. CLEAR wa.
wa-name = 'Ram'.
wa-id   = 'z4'.
wa-des = 'PG'.
APPEND wa to itab. CLEAR wa.
wa-name = 'Ram'.
wa-id   = 'z8'.
wa-des = 'Graduation'.
APPEND wa to itab. CLEAR wa.
loop at itab INTO wa.
wa-ini = wa-des(01).
if wa-ini EQ 'O'.
wa-ini = 'A'.
ENDIF.
MODIFY itab FROM wa.
ENDLOOP.
sort itab by name ini DESCENDING.
READ TABLE itab INTO wa INDEX 1.
   write:/ wa-name,
           wa-des.
Regards,
Venkat.

Similar Messages

  • Generate report for displaying transaction codes role wise

    hi,
    i want to generate a consolidated report in which all transactions codes are displayed role wise.In TR SUIM the report is generated using one role at a time.i want an option where i can fill the require roles and get the consolidated reports.is it possible.please help..
    thanx,

    Hi,
    Your question is not about SOA.
    You should ask you question in an appropriate forum (Security ?) where you will have more chances to get a useful answer.
    Regards,
    Olivier

  • XML report output displays xml code instead of pdf

    Hi,
    My Release is R12.1.1, An xml report whose output is set as pdf. when running this report output is coming as xml code instead of pdf
    another xml report ouput is coming in word instead of pdf
    is there any additional settings required to display in pdf format
    eventhough i configured pasta.csg & ixlib.cfg files
    Thanks,
    Alig
    Edited by: user12257829 on Jun 2, 2010 11:41 PM
    Edited by: user12257829 on Jun 2, 2010 11:41 PM

    Hi,
    Helios
    Even i tried both MOS documents u have referenced, as both reports compeleting normally without any error
    one thing i want to know can application use the same pasta.cfg file for pdf and text format
    as i have a single pasta.cfg configured
    Thanks
    Alig
    Edited by: user12257829 on Jun 3, 2010 1:18 AM
    Edited by: user12257829 on Jun 3, 2010 1:18 AM

  • Create a Crystal report to display the sum of G/L account code within a specific period

    Hi,
    Just wonder is it possible to create a crystal report to display the total of a G/L account code within a specific period?
    How to write the query to get the sum within a specific period?
    For example:
    Period: 2014-06-01-2014-06-10
    Account code A: USD "TOTAL"
    Account code B: USD "TOTAL"
    Thanks

    Hi Olga,
    Please check below Query.
    SELECT T1.[Account], T1.[ShortName], SUM (T1.[Debit]) as Debit, SUM (T1.[Credit]) As Credit, SUM (T1.[FCDebit]) As FCDebit, SUM (T1.[FCCredit]) As FCCredit, SUM (T1.[SYSDeb]) As SysDebit , SUM (T1.[SYSCred]) As SysCredit  FROM OJDT T0  INNER JOIN JDT1 T1 ON T0.[TransId] = T1.[TransId] WHERE T1.[RefDate] >=[%3]  AND   T1.[RefDate] <=[%4]
    Hope this Help
    Regards::::
    Atul Chakraborty

  • Report that displays 'z'program,t-codes,user-ids,list of clients

    Hi everyone
    i have a requirement.
    i need a report that displays all t-codes,all zee programs,all the user-ids,all the clients logins available and status of hotpack application i.e. ABAP,SD,FI/CO,MM and others.
    i know that all t-codes are in table TSTC  and user-ids in USH02, USH04, USR01, USR02, USR03.
    for the rest do suggest me the tables.
    if anyone know the answer pls do reply.
    Regards
    Venkat
    will reward with points and thanks in advance.

    hi,
    the table that store all zprograms with their user id's is TRDIR.
    in the selection screen if u specify the zprogram name and  user id.
    if u specify user id u will get the list of programs that were done by the particular user.
    please reward me if helpful.
    thanks,
    gupta.

  • How to display BAR-CODE through ABAP report

    Hi,
    Could you please help me, how to display BAR-CODE through the ABAP report.
    I am writing below code, but BAR-CODE is not displaying on report.
               PRINT-CONTROL FUNCTION 'SBP01'.
                WRITE: 20  BAR_CODE1 NO-GAP.
               PRINT-CONTROL FUNCTION 'SBS01'.
    Regards,
    SSRAJU.

    Hi RAJU,
    you can see this forum link and its sub-links, here it is clear about it.
    Re: Barcode printing on report
    Thanks & Regards,
    Dileep .C

  • Packaged CCE 9.03 - Display Reason Code Text in CUIC report

    The (Stock) Agent Team Real Time report includes a Reason Code field, but not the descriptive Reason Code Text (or Name).  Is there any way to present the descriptive text  or name in the report?
    Please note that we have CUIC standard.
    Thanks!
    Jackie

    Comparing Handled on an Agent report to Answered on a Call Type report is tricky, since depending on your call flows the two values can be vastly different. If you're looking at Answered and Handled on the same report (Call Type Historical All Fields should have both), there are opportunities for either value to be higher than the other within any given interval or across multiple intervals.
    Generally, if Answered is higher than Handled in one interval, then Handled is going to be higher than Answered in one of the intervals after that (though not necessarily the one right after - depends on call length). In the database, Answered is incremented in the interval when the call is answered, Handled is incremented in the interval when the wrap-up completes. So a very basic example would be with a single call - Say the Agent picks up an inbound call at 8:56am, and hangs up and completes wrap-up at 9:07am... The 8:30am interval would show 1 call Answered and 0 Handled, while the 9:00am interval would show 0 calls Answered and 1 Handled.
    -Jameson

  • Report title displaying for the secondary list

    Hi All,
    I have done a report interactive.The basic list is ALV and the secondary list is normal report.The problem in secondary list is it is diplaying the title "Dynamic list display" I am not getting from where this text is picking up and displaying .The code is as shown below.
    LEAVE TO LIST-PROCESSING.
    write:/ 'converting spool to pdf'.
    The output is displaying as shown below.
    dynamic list display.
    converting spool to pdf.
    I dont want to display dynamic list display in the output.How to suppress this?I even observed in debug mode after leave to list-prcoessing it is going to next line converting spool to pdf.
    Regards
    Mahesh

    use
    TOP-OF-PAGE DURING LINE-SELECTION.
    when ur SY-LSIND
    trigger this event with whtever heading u want in secondary list

  • 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>

  • Interactive report for displaying customer information

    hi,
        how to create an   interactive report for displaying customer information based on selection smade ,and corresponding bank details.

    pls check the sample code
    Use the tables Kna1 and knbk to get the customer details.
    ***extract the data into internal table
    select * from dbtab into itab.
    *In the loop hide the field you want to trigger the interactive list.
    loop at itab.
    write: / itab-kunnr, itab-name1.
    Hide itab-kunnr.
    endloop.
    use at line selecton to get desired output based on the condition
    at line-selection.
    select * fro dbab into itab where field = itab-kunnr.
    awards points if help ful.

  • Report to display purchase orders

    Hi I am Venkat
    can any one send me report to display a list of Purchase orders open for period more than one year. I need the following output fields to be dispayed are Vendor, Period, Purchasing organization, PO number, Document date, GR status, check box

    i think this code will help u.
    REPORT  Z_PURCHASEU.
    tables :  ekko,vbrk,mara,rseg,lfa1,makt,konv,bseg,vbap,j_1iexhead.
    data: begin of itab occurs 0,
         qty   like rseg-menge,           "qty
         bed   like rseg-wrbtr,           "bed(basic excise duty)
         mwskz like rseg-mwskz,           "tax code
         cess  like rseg-wrbtr,           "cess
         sum   like rseg-wrbtr,
         unit  like rseg-bstme,           "unit
         belnr like rseg-belnr,           "document number
      lst_cst  like rseg-wrbtr ,          "CST amount
        amount like rseg-wrbtr,           "amount
         aedat like ekko-aedat,           "po date
         ebeln like ekko-ebeln,           "po number
         lifnr like ekko-lifnr,           "vendor code
        matnr like mara-matnr,           "material code
        maktx like mara-maktx,           "material description
        mtart like mara-mtart,           "material type
        vbeln like vbrk-vbeln,           "bill number
        fkdat like vbrk-fkdat,           "bill date
        name1 like lfa1-name1,           "vendor name
        kzwi1 like vbap-kzwi1,           "basic value
         end of itab.
         select-options:
    vendrcod for ekko-lifnr,
    date for vbrk-fkdat,
    matrtype for mara-mtart,
    taxcode for rseg-mwskz.
    select egmenge egwrbtr egmwskz egwrbtr egwrbtr egbstme eg~belnr
    egwrbtr egwrbtr
              koaedat koebeln ko~lifnr
              into corresponding fields of table itab
              from rseg as eg inner join ekko as ko on egebeln = koebeln
    where
    ko~lifnr in vendrcod And
    eg~mwskz in taxcode.
    *select-options:
    vendrcod for ekko-lifnr,
    date for vbrk-fkdat,
    matrtype for mara-mtart,
    taxcode for rseg-mwskz.
    select abelnr amwskz amenge awrbtr  into
    *corresponding
    *fields of table itab
    *from rseg as a inner join bseg as b on
    *awrbtr = bwrbtr where
    *a~belnr in docment number and
    *a~mwskz in tax code and
    *a~menge in qty.
    loop at itab.
    write:/1 sy-vline,
           2   itab-name1    ,  18 sy-vline,
            19  itab-lifnr    ,  30 sy-vline,
            31  itab-aedat    ,  46 sy-vline,
            47  itab-ebeln    ,  60 sy-vline,
            61  itab-belnr    ,  80 sy-vline.
            uline.
            endloop.
    write  :   /1 sy-vline,
              2  'vendor name'  ,     18 sy-vline,
              19  'vendor code' ,     30 sy-vline,
              31  'po date'      ,    46 sy-vline,
              47  'po number '     ,  60 sy-vline,
              61  'document number',  80 sy-vline.
    give points if useful.

  • 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

  • Query Report - To display additional column in list selection box.

    Hi,
    There is query report where i want to display the additional column in list selection.
    Below is the system query report, where parameter passed is card code.
    When the cardcode - list selection is clicked system displays 2 columns i.e. Customer Code & No. of Records.
    Now in the same list selection; is it possible to display the customer name along with cardcode only for reference.
    SELECT T0.DocDate, T1.SlpName, T2.Name, T0.DocDueDate, T0.DocNum,    (CASE WHEN T0.DocStatus = 'O' THEN 'Open' ELSE 'Closed' END) AS Status,    T0.DocTotal FROM OQUT T0 LEFT JOIN OSLP T1    ON T0.SlpCode = T1.SlpCode LEFT JOIN OCPR T2 ON T0.CntctCode = T2.CntctCode WHERE T0.CardCode = N'[%0]'    ORDER BY T0.DocNum DESC
    Kindly let me know the details.
    Thanks & Regards,
    Yogesh Jadav

    Hi Yogesh Jadav,
    The answer is NO.  You may only display either code or name but not both.
    Thanks,
    Gordon

Maybe you are looking for

  • I have multiple itunes accounts and now want to consolidate into 1 account?

    I have got multiple itune accounts due to multiple devices, ie ipod, iphone, 2 x ipads. I dont want them all synced.. I want to get all my purchases into 1 account so i can use icloud Thanks

  • Distortion in Audition 3.0.1 and Win7 64 bit

    On board audio on my mobo took a dump, I don't like on board anyway. I added a Diamond PCI 7.1 (I am not spending $200 on a big time card, this one meets my needs). I have 2 hard drives with OS. One is XP sp3, the other Win7 sp1. I can't get ASIO wor

  • System using a big percentage of CPU

    My mac is very slow. I launched safari but the system is using more tham 60% percent of CPU, while the user it shows using 30%. How can I make it get better and faster? I have already cleaned safari cache and history. What I have to do to get down th

  • 802.1X and per user vlan

    hi all, I would like to know if i can assign one user in a vlan with 802.1X in a wireless environment ? if yes,Do i need a particular radius server or is this feature "basic" on ias,acs,meetinghouse funk.. Can i have a vlan authentication policy (i.e

  • Tabbed canvas on a tabbed canvas

    Is it possible within 10g forms to place a tabbed canvas on the tab page of another tabbed canvas? I am not seeing a way to do it, but I if someone else has an idea about this, it would be much appreciated. Thanks, c