Need help in the Report Program!!!

Hi,
This is SAI KUMAR.
<b>Selection Screen</b>
Sales Org: <b>VKORG</b>
Distribution Channel: <b>VTWEG</b>
Division: <b>SPART</b>
Billing Type: <b>FKART</b>
Plant: <b>WERKS</b>
Payment Terms: <b>ZTERM</b>
Sold-to Party: <b>KUNAG</b>
Billing Date: <b>FKDAT</b>
Now Using the above Selection screen inputs, I want to generate the following fields in the output.
<b>Output Screen</b>
Invoice No: <b>VBELN</b>
Invoice Date: <b>FKDAT</b>
Customer Number: <b>KUNNR</b>
Customer Name: <b>NAME1</b>
Material Description: <b>MAKTX</b>
Payment Terms: <b>ZTERM</b>
Net Value: <b>NETWR</b>
Ship-to City: <b>ORT01</b>
Sold-to party: <b>KUNAG</b>
Ship-to party: <b>KUNNR</b>
<u><b>Tables Used: </b></u>
Delivery: <b>LIKP, LIPS</b>
Invoice:<b>VBRK, VBRP</b>
Customer: <b>KNA1</b>
Material: <b>MARA</b>
Material Description: <b>MAKT</b>
<b>
Now the Problem what I got is....How to link between these tables...ie., what common fields can be used between these tables so that I can use FOR ALL ENTRIES and retrieve the above output fields.</b>
Can anyone please help me out in giving a REPORT program or a pseudo code for the above data.
Thanks & Regards,
SAI KUMAR
<b>ID: [email protected]</b>

See the below code :
REPORT zjpvrom323 NO STANDARD PAGE HEADING LINE-SIZE 200 LINE-COUNT 35
MESSAGE-ID zjpv001 .
*& Development ID:   OM_DD_323_LJP                                    *
*& Report        :   ZJPVROM323                                       *
*& This application is used to Develop a new billing document that    *
*& fulfills  the  NPKK  Requirement That does not exist in JSP        *
*& functionality.according to the delivery date it displays Monthly   *
sales notes report                                                *
*& Change Log:                                                        *
*&  Init.        Who             Date         Text                    *
*& MALIKDH1     Seshu Reddy     2003/07/20   Initial Development      *
          Constants
CONSTANTS :c_vkorg(4) VALUE 'JP20', " Sale Organization
           c_vtweg(2) VALUE 'TR',   " Distribution Channel
           c_rfbsk VALUE 'C',       " Status for transfer to accounting
           c_spart(2) VALUE '01',   " Division
           c_kvgr2(3) VALUE 'Z51',  " Customer Group 2
           c_fkart(4) TYPE c VALUE 'ZJPW', " Billing Type
           c_waerk(5) TYPE c VALUE 'JPY',  " SD document currency
           c_kschl(4) TYPE c VALUE 'ZJPC', " Condition type
           c_no_of_lines TYPE i VALUE '35',
           C_CONS_5(1) TYPE C VALUE '5',
           C_CONS_8(1) TYPE C VALUE '8',
           C_CONS_10(2) TYPE C VALUE '10',
           c_konwa(5) TYPE c VALUE 'JPY'. " Rate unit (currency or
"            percentage)
          DB-Tables                                                *
*TABLES : vbrk,           " Billing : Header Data
        vbrp,           " Billing : Item Data
        kna1,           " Customer master : General data
        knvv,           " Customer master : sales data
        likp,           " Delivery : Header data
        konv,           " Condition : Transaction data
        konp,           " Condition : items
        zjpv_torihiki,  " Add on table:Business transaction category
        zjpv_rebate.    " Add on table : rebate table
           Variables/Internal table                                 *
DATA :g_date(2) TYPE n,           " Date
      g_month(2) TYPE n,          " Month
      g_year(4) TYPE n ,          " Year
      g_bill_low(10) TYPE n,       " From date
      g_bill_high(10) TYPE n,      " To date
      g_month1(2) TYPE n,         " Month
      g_year1(4) TYPE n,          " Year
      g_date1(2) TYPE n,          " Date
      g_year2(4) TYPE n,          " Year
      g_datum LIKE sy-datum,      " System date
      g_skip(4) TYPE c ,          " Line break
      g_ctax(8) TYPE c,           " Consumption tax
      g_ctax1(10) TYPE c,         " Consumption tax
      g_ctax2(16) TYPE c,         " Consumption tax
      g_vol(6) TYPE c,            " Volume
      g_vol1(6) TYPE c,           " Volume
      g_vol2(7) TYPE c,           " Volume
      g_tamt(10) TYPE c,          " Total amount
      g_tamt1(13) TYPE c,         " Total amount
      g_tamt2(16) TYPE c,         " Total amount
      g_gtotal(10) TYPE c,        " Net total
      g_gtotal1(13) TYPE c,       " Net total
      g_gtotal2(16) TYPE c,       " Net total
      g_uprice(8)  TYPE c,        " Unit Price
      g_uprice1(10)  TYPE c,      " Unit Price
      g_uprice2(11)  TYPE c,      " Unit Price
      g_amount(10) TYPE c,        " Amount
      g_amount1(13) TYPE c,       " Amount
      g_amount2(14) TYPE c,       " Amount
      g_fctax(16) TYPE c,      " Consumption Tax (Total)
      g_ftamnt(16) TYPE c,     " Total amount (Total)
      g_ftotal(16) TYPE c,     " net total (Total)
      g_fctax1(8) TYPE c,      " Totals with Comma (Consumption tax)
      g_fctax2(10) TYPE c,     " Totals with Comma (Consumption tax)
      g_fctax3(11) TYPE c,     " Totals with Comma (Consumption tax)
      g_ftamt1(10) TYPE c,     " Totals with comma (Total amount)
      g_grand_total(16),
      g_grand_total1(14),
      g_net_total(16),
      g_net_total1(14),
      g_middle_val(16),
      g_middle_val1(11),
      g_ftamt2(13) TYPE c,     " Totals with Comma(Total amount)
      g_ftamt3(14) TYPE c,     " Totals with comma(Total amount)
      g_ftotal1(10) TYPE c,    " Totals with comma(Net total)
      g_ftotal2(13) TYPE c,    " Totals with comma(Net total)
      g_ftotal3(14) TYPE c.    " Totals with comma(Net total)
*Internal table for billing document header
DATA : BEGIN OF t_vbrk OCCURS 0,
       vbeln LIKE vbrk-vbeln,      " Billing Doc number
       vbtyp LIKE vbrk-vbtyp,      " Document Category
       kunag LIKE vbrk-kunag,      " sold-to-party
       vkorg LIKE vbrk-vkorg,      " sales organization
       vtweg LIKE vbrk-vtweg,      " Distribution Channel
       kunrg LIKE vbrk-kunrg,      " Payer
       fkart_rl LIKE vbrk-fkart_rl," Billing Type
       fkdat LIKE vbrk-fkdat,      " Billing date
       mwsbk LIKE vbrk-mwsbk,      " Tax amount in document currency
       netwr LIKE vbrk-netwr,      " Net value in document currency
       waerk LIKE vbrk-waerk,      " SD document currency
       knumv LIKE vbrk-knumv,      " Number of the document condition
       END OF t_vbrk.
internal table for Output formatting
DATA : BEGIN OF t_oput OCCURS 0,
       rbcode(4) TYPE c,                     " Regulating Branch Code
       tpcode(10)  TYPE c,                   " trading partner code
       bdgrp(3) TYPE c,                      " Billing Document Group
       zjd_torihikikubn(3) TYPE c,           "   business transaction
                                              "category
       tpname1(35) TYPE c,                   " trading partner name 1
       tpname2(35) TYPE c,                   " trading partner name 2
       bdgnm(10) TYPE c,                     " Billing Doc Group Name
       dcode(10) TYPE c,                     " destination code
       dname(35),                            " destination name
       fkdat(10) TYPE c,                     " Date of Issue
       vbeln(10) TYPE c,                     " Billing Doc No
       zzjp_remarks(30) TYPE c,              " Remarks
       ctax(16) TYPE c,                      " Consumption Tax
       tamnt(16) TYPE c,                    " Total Amount
       gtotal(16) TYPE c,                    " Grand total,
       pcode(9) TYPE n,                      " Product Code
       pname(40) TYPE c,                     " Product name
       volume(16) TYPE p decimals 3,          " volume
       volume1 type i,
       volume2(16) type c,
       uprice(13) TYPE c,                    " Unit Price
       amount(16) TYPE c,                    " Amount
       posnr(6) TYPE n,                      " Billing Item
       END OF t_oput.
*Internal table for Customer Master Sales Data
DATA : BEGIN OF t_knvv OCCURS 0,
       kunnr LIKE knvv-kunnr, " Customer Number
       vkorg LIKE knvv-vkorg, " Sales Organization
       vtweg LIKE knvv-vtweg, " Distribution Channel
       spart LIKE knvv-spart, " Division
       kvgr2 LIKE knvv-kvgr2, " Customer Group 2
       vkbur LIKE knvv-vkbur, " sales office
       END OF t_knvv.
*Internal table for Customer Master Data
DATA : BEGIN OF t_kna1 OCCURS 0,
       kunnr LIKE kna1-kunnr,   " Customer number
       name1 LIKE kna1-name1,   " Customer Name 1
       name2 LIKE kna1-name2,   " Customer Name 2
       END OF t_kna1.
Internal table used for billing document items
DATA : BEGIN OF t_vbrp OCCURS 0,
       vbeln LIKE vbrp-vbeln,                       " Billing Document
       posnr LIKE vbrp-posnr,        " Billing item
       zjd_torihikikubn LIKE vbrp-zjd_torihikikubn, " Business
                                                  " Transaction Category
       vgbel LIKE vbrp-vgbel,                   " Document number of the
                                                "   reference  document
       vgtyp LIKE vbrp-vgtyp,                   " Document category of
                                                " preceding SD document
       zzjp_remarks LIKE vbrp-zzjp_remarks,     " Remarks
       zjd_kanamei LIKE vbrp-zjd_kanamei,
       fkimg LIKE vbrp-fkimg,                   " Actual billed quantity
       netwr LIKE vbrp-netwr,        " Net value of the
                                     " billing item in document currency
       zjd_touitsumatnr LIKE vbrp-zjd_touitsumatnr,
       END OF t_vbrp.
Internal table used for Rebate Table
DATA : BEGIN OF t_zjpv_rebate OCCURS 0,
       fkart LIKE zjpv_rebate-fkart,              " Billing type
       rebate_code LIKE zjpv_rebate-rebate_code,  " Rebate Code
       rebate_name LIKE zjpv_rebate-rebate_name,  " Rebate Name
       END OF t_zjpv_rebate.
*Internal table used for Delivery Header
DATA : BEGIN OF t_likp OCCURS 0,
       vbeln LIKE likp-vbeln,    " Delivery  No
       kunnr LIKE likp-kunnr,    " Ship-to party
       END OF t_likp.
*Internal table for conditions (Transaction Data)
DATA : BEGIN OF t_konv OCCURS 0,
       knumv LIKE konv-knumv,      " Number of the document condition
       kposn LIKE konv-kposn,      " Condition item number
       kschl LIKE konv-kschl,      " Condition type
       knumh LIKE konv-knumh,      " Condition type
       END OF t_konv.
Internal table for conditions (Item)
DATA : BEGIN OF t_konp OCCURS 0,
       knumh LIKE konp-knumh,      " Number of the document condition
       kbetr LIKE konp-kbetr,      " Rate (condition amount or
                                   " percentage) where no scale exists
       konwa LIKE konp-konwa,      " Rate unit (currency or percentage)
       END OF t_konp.
Internal table for table Torihiki Kubun
DATA : BEGIN OF t_zjpv_torihiki OCCURS 0,
       kubun LIKE zjpv_torihiki-kubun,      " Condition type
       rep_grp LIKE zjpv_torihiki-rep_grp,   " Shikiri Report Group
       rep_grp_name LIKE zjpv_torihiki-rep_grp_name, " Shikiri Report
                                                     " Group NAME
       END OF t_zjpv_torihiki.
DATA:  l_tpname1(35) TYPE c,                   " trading partner name 1
       l_tpname2(35) TYPE c,                   " trading partner name 2
       l_bdgnm(10) TYPE c,                     " Billing Doc Group Name
       G_FLG(1)    type c,
       G_FLG1(1)    type c.
          Selection screen                                           *
SELECTION-SCREEN : BEGIN OF BLOCK zjpv WITH FRAME TITLE text-001.
PARAMETER : p_date LIKE sy-datum OBLIGATORY. " Delivery date
SELECTION-SCREEN : END OF BLOCK zjpv.
RANGES : r_bdate  FOR vbrk-fkdat.             " Billing date
       Initialization                                                *
INITIALIZATION.
  p_date = sy-datum.
           MAIN PROCESSING                                           *
START-OF-SELECTION.
This Perform is used for getting Billing date  According to Delivery
Date(Output date)
  PERFORM f_bill_date_move.
Selecting the data from tables VBRK,VBRP,KNVV,KNA1,KONV,KONP,LIKP,
ZJPV_TORIHIKI and ZJPV_REBATE
  PERFORM f_get_data.
Passing the data from the internal tables (T_VBRK,T_VBRP,T_KNVV,
T_KNA1,T_KONV,T_KONP,T_LIKP, T_ZJPV_TORIHIKI and T_ZJPV_REBATE)
to out put Internal table(T_OPUT)
  PERFORM f_process_data.
          END OF SELECTION                                          *
END-OF-SELECTION.
Out put formatting
  PERFORM f_output_data.
*&      Form  F_Bill_DATE_MOVE
This Perform is used for getting Billing date  According to Delivery *
Date(Output date)                                                    *
FORM f_bill_date_move.
  g_datum = p_date + 10.
  g_month = g_datum+4(2).
  g_year = g_datum+0(4).
  IF g_month = 1.
    g_year = g_year - 1.
    g_month = 12.
    g_date = 1.
  ELSE.
    g_month = g_month - 1.
    g_date = 1.
  ENDIF.
Passing the date to billing date-low
  CONCATENATE  g_year g_month g_date  INTO g_bill_low.
  r_bdate-low = g_bill_low.
  r_bdate-sign = 'I'.
  r_bdate-option = 'BT'.
  g_month1 = g_datum+4(2).
  g_year1 = g_datum+0(4).
  IF g_month1 = 1.
    g_year1 = g_year1 - 1.
    g_month1 = 12.
  ELSE.
    g_month1 = g_month1 - 1.
  ENDIF.
  CASE g_month1.
    WHEN 1.g_date1 = '31'.
    WHEN 3.g_date1 = '31'.
    WHEN 4.g_date1 = '30'.
    WHEN 5.g_date1 =  '31'.
    WHEN 6.g_date1 = '30'.
    WHEN 7.g_date1 = '31'.
    WHEN 8.g_date1 = '31'.
    WHEN 9.g_date1 = '30'.
    WHEN 10.g_date1 = '31'.
    WHEN 11.g_date1 = '30'.
    WHEN 12.g_date1 = '31'.
  ENDCASE.
  g_year2 = g_year1.
  IF g_month1 = 2.
    g_year2 = g_year2 MOD 4 .
    IF g_year2 = 0.
      g_date1 = 29.
    ELSE.
      g_date1 = 28.
    ENDIF.
  ENDIF.
Passing the date to billing date-high
  CONCATENATE  g_year1  g_month1  g_date1 INTO g_bill_high.
  r_bdate-high = g_bill_high.
  APPEND r_bdate.
ENDFORM.                    " F_Bill_DATE_MOVE
*&      Form  f_get_data
Selecting the data from tables VBRK,VBRP,KNVV,KNA1,KONV,KONP,LIKP,   *
ZJPV_TORIHIKI and ZJPV_REBATE                                        *
FORM f_get_data.
Selecting the data from VBRK into internal table T_VBRK.
  SELECT   vbeln
           vbtyp
           kunag
           vkorg
           vtweg
           kunrg
           fkart_rl
           fkdat
           mwsbk
           netwr
           waerk
           knumv
           FROM vbrk
           INTO TABLE t_vbrk
           WHERE fkdat BETWEEN r_bdate-low and r_bdate-high
                 and RFBSK = C_RFBSK
                 AND  vbtyp IN ('N' , 'S' , 'M' , 'O' , 'P')
                 AND vkorg = c_vkorg
                 AND vtweg = c_vtweg
                 AND netwr <> 0.
  IF sy-subrc Eq 0.
    sort t_vbrk.
  ENDIF.
Selecting the data from KNVV into internal table T_KNVV.
  SELECT kunnr
         vkorg
         vtweg
         spart
         kvgr2
         vkbur
         FROM knvv
         INTO TABLE t_knvv
         FOR ALL ENTRIES IN t_vbrk WHERE ( kunnr = t_vbrk-kunag
                                   OR    kunnr = t_vbrk-kunrg )
                                   AND   vkorg = t_vbrk-vkorg
                                   AND   vtweg = t_vbrk-vtweg
                                   AND   spart = c_spart
                                   AND   kvgr2 = c_kvgr2.
Selecting the data from VBRP into internal table T_VBRP.
  SELECT vbeln
         posnr
         zjd_torihikikubn
         vgbel
         vgtyp
         zzjp_remarks
         zjd_kanamei
         fkimg
         netwr
         zjd_touitsumatnr
         FROM vbrp
         INTO TABLE  t_vbrp
         FOR ALL ENTRIES IN t_vbrk
         WHERE vbeln = t_vbrk-vbeln.
Selecting the data from ZJPV_REBATE into internal table T_ZJPV_REBATE.
  SELECT fkart
         rebate_code
         rebate_name
         FROM zjpv_rebate
         INTO TABLE t_zjpv_rebate
         FOR ALL ENTRIES IN t_vbrk
         WHERE fkart = t_vbrk-fkart_rl.
Selecting the data from KNA1 into internal table T_KNA1.
  SELECT kunnr
         name1
         name2
         FROM kna1
         INTO TABLE t_kna1
         FOR ALL ENTRIES IN t_knvv
         WHERE kunnr = t_knvv-kunnr.
  IF NOT t_vbrp[] IS INITIAL.
Selecting the data from LIKP into internal table T_LIKP.
    SELECT vbeln
           kunnr
           FROM likp
           INTO TABLE t_likp
           FOR ALL ENTRIES IN t_vbrp
           WHERE vbeln = t_vbrp-vgbel.
  ENDIF.
Selecting the data from KONV into internal table T_KONV.
  SELECT knumv
         kposn
         kschl
         knumh
         FROM konv
         INTO TABLE t_konv
         FOR ALL ENTRIES IN t_vbrk
         WHERE knumv = t_vbrk-knumv
         AND   kschl = c_kschl.
Selecting the data from KONP into internal table T_KONP.
  SELECT knumh
         kbetr
         konwa
         FROM konp
         INTO TABLE t_konp
         FOR ALL ENTRIES IN t_konv
         WHERE knumh = t_konv-knumh.
Selecting the data from ZJPV_TORIHIKI into internal table
T_ZJPV_TORIHIKI.
  SELECT kubun
         rep_grp
         rep_grp_name
         FROM zjpv_torihiki
         INTO TABLE t_zjpv_torihiki
         FOR ALL ENTRIES IN t_vbrp
         WHERE kubun = t_vbrp-zjd_torihikikubn.
ENDFORM.                    " f_get_data
*&      Form  f_process_data
Reading The Data from Internal tables (T_VBRK,T_VBRP,T_KNVV,T_KNA1,  *
T_LIKP,T_KONV,T_KONP,T_ZJPV_REBATE and T_ZJP_TORIHIKI)               *
FORM f_process_data.
Sorting the internal table t_kna1, t_vbrk, t_vbrp ,t_knvv,t_kna1,
t_likp and t_zjpv_rebate
  SORT: t_kna1 BY kunnr,
        t_vbrk BY vbeln,
        t_vbrp BY vbeln,
        t_knvv BY kunnr,
        t_zjpv_rebate BY fkart,
        t_knvv BY kunnr vkorg vtweg spart,
        t_likp BY vbeln.
  LOOP AT t_vbrk.
Reading the data from internal table t_knvv
    READ TABLE t_knvv WITH KEY kunnr = t_vbrk-kunag
                                 vkorg = t_vbrk-vkorg
                                 vtweg = t_vbrk-vtweg
                                 spart = c_spart
                                 kvgr2 = c_kvgr2.
    IF sy-subrc NE 0.
      g_flg = 'X'.
    ENDIF.
Reading the data from internal table t_knvv
    READ TABLE t_knvv WITH KEY kunnr = t_vbrk-kunrg
                                vkorg = t_vbrk-vkorg
                                vtweg = t_vbrk-vtweg
                                spart = c_spart
                                kvgr2 = c_kvgr2.
    IF sy-subrc NE 0.
      G_FLG1 = 'X'.
    ENDIF.
    IF G_FLG = 'X' AND G_FLG1 = 'X'.
      DELETE T_VBRK.
      CLEAR: G_FLG, G_FLG1.
      CONTINUE.
    ENDIF.
  ENDLOOP.
  DATA :  l_sign(1) TYPE c VALUE '-',
          l_ctax(15) TYPE n ,
          l_tamnt(15) TYPE n ,
          l_volume(16) TYPE c,
          l_gtotal(15) TYPE n,
          l_amnt(15) TYPE n.
  SORT t_konv BY knumv kposn kschl.
  SORT t_konp BY knumh.
  LOOP AT t_vbrp.
    READ TABLE t_vbrk WITH KEY vbeln = t_vbrp-vbeln.
    IF sy-subrc <> 0.
      DELETE t_vbrp.
      CONTINUE.
    ENDIF.
Reading the data from Internal table T_zjpv_rebate(Rebate table)
    READ TABLE t_zjpv_rebate WITH KEY
                        fkart = t_vbrk-fkart_rl
                        BINARY SEARCH.
    IF sy-subrc NE 0 OR t_vbrk-fkart_rl EQ c_fkart.
      MOVE t_vbrk-kunag TO t_oput-tpcode.
    ELSE .
      IF t_vbrk-fkart_rl NE c_fkart.
        MOVE t_vbrk-kunrg TO t_oput-tpcode.
      ENDIF.
    ENDIF.
    READ TABLE t_zjpv_rebate WITH KEY
                        fkart = t_vbrk-fkart_rl
                        BINARY SEARCH.
    IF sy-subrc NE 0.
Passing the last 6 values of ZJD_TOUITSUMANTR into product code.
      MOVE t_vbrp-zjd_touitsumatnr+3(6) TO t_oput-pcode.
      MOVE t_vbrp-zjd_kanamei TO t_oput-pname.
    ELSE.
      MOVE t_zjpv_rebate-rebate_code+3(6) TO t_oput-pcode.
      MOVE t_zjpv_rebate-rebate_name TO t_oput-pname.
    ENDIF.
Reading the data from Internal table T_KNA1(Customer Master)
    READ TABLE t_kna1 WITH KEY
                 kunnr = t_oput-tpcode BINARY SEARCH.
    IF sy-subrc = 0.
      MOVE t_kna1-name1 TO t_oput-tpname1.
      MOVE t_kna1-name2 TO t_oput-tpname2.
    ENDIF.
Reading the data from Internal table T_vbrp(Billing Documnet: Item)
    MOVE t_vbrp-zjd_torihikikubn TO t_oput-zjd_torihikikubn.
Reading the data from Internal table T_KNVV
    READ TABLE t_knvv WITH KEY kunnr = t_vbrk-kunrg
                               vkorg = c_vkorg
                               vtweg = c_vtweg
                               spart = c_spart
                               BINARY SEARCH.
    IF sy-subrc EQ 0.
      MOVE t_knvv-vkbur TO t_oput-rbcode.
    ENDIF.
Reading the data from Internal table T_LIKP (Delivery : Header)
    IF  t_vbrp-vgtyp =  'J' OR t_vbrp-vgtyp = 'T'.
      READ TABLE t_likp WITH KEY
                    vbeln = t_vbrp-vgbel
                    BINARY SEARCH.
      IF sy-subrc = 0.
        MOVE t_likp-kunnr TO t_oput-dcode.
      ENDIF.
    ENDIF.
Reading the data from Internal table T_KNA1.
    READ TABLE t_kna1 WITH KEY kunnr = t_likp-kunnr BINARY SEARCH.
    IF sy-subrc = 0 AND NOT t_oput-dcode IS INITIAL.
      MOVE t_kna1-name2 TO t_oput-dname.
    ENDIF.
*Passing the values from internal table t_vbrk and t_vbrp to
*out put internal table.
    MOVE t_vbrk-fkdat TO t_oput-fkdat.
    CONCATENATE t_oput-fkdat0(4) '.' t_oput-fkdat4(2) '.'
        t_oput-fkdat+6(2) INTO t_oput-fkdat.
    MOVE t_vbrk-vbeln TO t_oput-vbeln.
    MOVE t_vbrp-posnr TO t_oput-posnr.
    MOVE t_vbrp-zzjp_remarks TO t_oput-zzjp_remarks.
*Checking for billing document category.
    IF t_vbrk-vbtyp = 'M' OR t_vbrk-vbtyp = 'P' OR t_vbrk-vbtyp = 'S'.
      IF t_vbrk-waerk = c_waerk.
        t_oput-ctax = t_vbrk-mwsbk * 100.
        t_oput-tamnt = t_vbrk-netwr * 100.
        t_oput-gtotal = t_oput-ctax + t_oput-tamnt.
      ELSE.
        t_oput-ctax = t_vbrk-mwsbk .
        t_oput-tamnt = t_vbrk-netwr.
        t_oput-gtotal = t_oput-ctax + t_oput-tamnt.
      ENDIF.
    ENDIF.
    IF t_vbrk-vbtyp = 'O' OR  t_vbrk-vbtyp = 'N' .
      IF t_vbrk-waerk = c_waerk.
        l_ctax = ( t_vbrk-mwsbk * 100 ) .
*The contents of the consumption tax are converted to display format.
        PERFORM F_ALPHA_CONV USING L_CTAX.
        CONCATENATE l_sign l_ctax INTO t_oput-ctax.
        CONDENSE t_oput-ctax.
        l_tamnt  = ( t_vbrk-netwr * 100 ).
*The contents of the total amount are converted to display format.
        PERFORM F_ALPHA_CONV USING L_TAMNT.
        CONCATENATE l_sign l_tamnt INTO t_oput-tamnt.
        CONDENSE t_oput-tamnt.
        l_gtotal = t_oput-ctax + t_oput-tamnt.
*The contents of the grand total are converted to display format.
        PERFORM F_ALPHA_CONV USING L_GTOTAL.
        CONCATENATE l_sign l_gtotal INTO t_oput-gtotal.
      ELSE.
        l_ctax = t_vbrk-mwsbk.
*The contents of the consumption tax are converted to display format.
        PERFORM F_ALPHA_CONV USING L_CTAX.
        CONCATENATE l_sign l_ctax INTO t_oput-ctax.
        l_tamnt = ( t_vbrk-netwr ).
*The contents of the total amount are converted to display format.
        PERFORM F_ALPHA_CONV USING L_TAMNT.
        CONCATENATE l_sign l_tamnt INTO t_oput-tamnt.
        l_gtotal =  ( t_oput-ctax + t_oput-tamnt ).
*The contents of the grand total are converted to display format.
        PERFORM F_ALPHA_CONV USING L_GTOTAL.
        CONCATENATE l_sign l_gtotal INTO t_oput-gtotal.
      ENDIF.
    ENDIF.
Comparing the volume with given conditions.
    IF t_vbrp-fkimg EQ 0.
      t_oput-volume = space.
    ELSEIF t_vbrp-fkimg NE 0.
     IF t_vbrk-vbtyp = 'M' OR  t_vbrk-vbtyp = 'P' OR t_vbrk-vbtyp = 'S'.
        t_oput-volume = t_vbrp-fkimg.
        CALL FUNCTION 'ROUND'
             EXPORTING
                  DECIMALS      = 3
                  input         = t_oput-volume
                  SIGN          = ' '
             IMPORTING
                  OUTPUT        = t_oput-volume1
             EXCEPTIONS
                  INPUT_INVALID = 1
                  OVERFLOW      = 2
                  TYPE_INVALID  = 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.
        move t_oput-volume1 to t_oput-volume2.
        condense t_oput-volume2 no-gaps.
      ELSEIF t_vbrk-vbtyp = 'O' OR  t_vbrk-vbtyp = 'N'.
        t_oput-volume = t_vbrp-fkimg.
        CALL FUNCTION 'ROUND'
             EXPORTING
                  DECIMALS      = 3
                  input         = t_oput-volume
                  SIGN          = ' '
             IMPORTING
                  OUTPUT        = t_oput-volume1
             EXCEPTIONS
                  INPUT_INVALID = 1
                  OVERFLOW      = 2
                  TYPE_INVALID  = 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.
        l_volume = t_oput-volume1.
*The contents of the volume are converted to display format.
        PERFORM F_ALPHA_CONV USING L_VOLUME.
        CONCATENATE l_sign l_volume INTO t_oput-volume2.
        condense t_oput-volume2 no-gaps.
      ENDIF.
    ENDIF.
*Unit price
    IF t_vbrp-fkimg EQ 0.
      t_oput-uprice = space.
    ELSE.
Reading The data from Internal Table T_KONV(Condition :Transactional)
      READ TABLE t_konv WITH KEY   knumv = t_vbrk-knumv
                                   kposn = t_vbrp-posnr
                                   kschl = c_kschl
                                   BINARY SEARCH.
      IF sy-subrc = 0.
Reading The data from Internal Table T_KONP(Condition : Items)
        READ TABLE t_konp WITH KEY
                knumh = t_konv-knumh
                BINARY SEARCH.
        IF sy-subrc = 0.
          IF t_konp-konwa = c_konwa.
            t_oput-uprice = 100 * t_konp-kbetr.
          ELSE.
            t_oput-uprice = t_konp-kbetr.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDIF.
Caluculating the amount with given conditions
    IF t_zjpv_rebate-fkart = t_vbrk-fkart_rl.
      t_oput-amount = t_vbrk-netwr.
    ELSE.
      t_oput-amount = t_vbrp-netwr.
    ENDIF.
    IF t_vbrk-waerk EQ c_waerk.
      t_oput-amount =  100 * t_oput-amount.
    ENDIF.
    IF t_vbrk-vbtyp ='M' OR t_vbrk-vbtyp = 'P' OR
                           t_vbrk-vbtyp  = 'S'.
    ELSE.
      IF t_vbrk-vbtyp  = 'O' OR t_vbrk-vbtyp = 'N'.
        IF t_oput-amount+15(1) = l_sign.
          l_amnt = t_oput-amount+0(15).
          PERFORM F_ALPHA_CONV USING L_AMNT.
          CONCATENATE l_sign l_amnt INTO t_oput-amount.
        ELSE.
          l_amnt = t_oput-amount.
          PERFORM F_ALPHA_CONV USING L_AMNT.
          CONCATENATE l_sign l_amnt INTO t_oput-amount.
        ENDIF.
      ENDIF.
    ENDIF.
Reading the data from Internal Table T_ZPV_TORIHIKI
    READ TABLE t_zjpv_torihiki WITH KEY
               kubun = t_vbrp-zjd_torihikikubn
               BINARY SEARCH.
    IF sy-subrc = 0.
      t_oput-bdgrp = t_zjpv_torihiki-rep_grp.
      t_oput-bdgnm = t_zjpv_torihiki-rep_grp_name.
    ENDIF.
    APPEND t_oput.
Clearing the memory of the internal tables.
    CLEAR: t_oput,
           t_vbrp,
           t_vbrk,
           t_kna1,
           t_knvv,
           t_zjpv_rebate,
           t_zjpv_torihiki,
           t_likp,
           t_konv,
           t_konp.
  ENDLOOP.
ENDFORM.                    " f_process_data
*&      Form  f_output_data
      Output formatting
FORM f_output_data.
SORT t_oput BY rbcode
                tpcode
                bdgrp
                fkdat
                zjd_torihikikubn
                vbeln
                posnr.
  DATA : l_volume(5) TYPE c,
         l_ctax(8) TYPE c.
  MOVE t_oput-volume TO l_volume.
  MOVE t_oput-ctax TO l_ctax.
  DATA : l_ctax1(16) ,
         l_ctax2(16),
         l_vol1(14) ,
         l_vol3(8),
         l_vol2(14),
         l_tamt1(16),
         l_tamt2(16),
         l_gtotal1(16),
         l_gtotal2(16),
         l_uprice1(16),
         l_uprice2(16),
         l_amount1(16) TYPE c,
         l_amount2(16) TYPE c,
         l_fctax1(16) TYPE c,
         l_fctax2(16) TYPE c,
         l_ftamt1(16) TYPE c,
         l_ftamt2(16) TYPE c,
         l_ftotal1(16) TYPE c,
         l_ftotal2(16) TYPE c,
         l_sign(1) TYPE c VALUE '-'.
  CONSTANTS c_minus VALUE '-'.
  SORT t_konv BY knumv kposn kschl.
  SORT t_oput BY zjd_torihikikubn vbeln posnr.
Printing Final Values.
  LOOP AT t_oput.
Perform F_FORMAT_SUBTOTAL is used to align the value with the commas
for display purpose.
    L_CTAX2 = T_OPUT-CTAX.
    G_CTAX2 = T_OPUT-CTAX.
    PERFORM F_FORMAT_SUBTOTAL USING G_CTAX2
                                    C_CONS_8.
    CONDENSE T_OPUT-CTAX.
Perform F_FORMAT_SUBTOTAL is used to align the value with the commas
for display purpose.
    L_TAMT2 = T_OPUT-TAMNT.
    G_TAMT2 = T_OPUT-TAMNT.
    PERFORM F_FORMAT_SUBTOTAL USING G_TAMT2
                                    C_CONS_10.
    CONDENSE T_OPUT-TAMNT.
Perform F_FORMAT_SUBTOTAL is used to align the value with the commas
for display purpose.
    L_GTOTAL2 = T_OPUT-GTOTAL.
    G_GTOTAL2 = T_OPUT-GTOTAL.
    PERFORM F_FORMAT_SUBTOTAL USING G_GTOTAL2
                                    C_CONS_10.
    CONDENSE T_OPUT-GTOTAL.
Perform F_FORMAT_SUBTOTAL is used to align the value with the commas
for display purpose.
*Volume
    IF t_oput-volume >= 99999 OR t_oput-volume <= -99999.
      t_oput-volume = space.
    ELSE.
      l_vol1 = t_oput-volume.
      l_vol2 = t_oput-volume.
      CONDENSE l_vol1.
      CONDENSE l_vol2.
      IF  l_vol1+0(1) EQ '-'.
        REPLACE '-' WITH space INTO  l_vol1.
      ENDIF.
      CONDENSE l_vol1.
      WRITE l_vol1 TO g_vol RIGHT-JUSTIFIED.
      REPLACE '.' WITH ',' INTO l_vol1.
write :85 l_vol1.
      IF NOT g_vol+0(2) IS  INITIAL.
        g_vol10(2) = g_vol0(2).
        g_vol1+2(1) = ','.
      ENDIF.
      IF NOT g_vol+2(3) IS  INITIAL.
        g_vol13(3) = g_vol2(3).
      ENDIF.
replace '.' with ',' into t_oput-volume.
      l_vol2 = t_oput-volume.
      IF  l_vol2+0(1) EQ '-'.
        g_vol2 = g_vol1 .
        CONDENSE g_vol2.
        CONCATENATE c_minus g_vol2 INTO g_vol2.
      ELSE.
        g_vol2 = g_vol1 .
        CONDENSE g_vol2.
      ENDIF.
    ENDIF.
L_VOL1 = T_OPUT-VOLUME.
PERFORM F_FORMAT_SUBTOTAL USING L_VOL1
                                 C_CONS_5.
CONDENSE L_VOL1.
Unit Price
    IF t_oput-uprice >= 99999999 OR t_oput-uprice <= -99999999.
      t_oput-uprice = space.
    ELSE.
      l_uprice1 = t_oput-uprice .
      l_uprice2 = t_oput-uprice.
      CONDENSE l_uprice1.
      CONDENSE l_uprice2.
      IF  l_uprice1+0(1) EQ '-'.
        REPLACE '-' WITH space INTO  l_uprice1.
      ENDIF.
      CONDENSE l_uprice1.
      WRITE l_uprice1 TO g_uprice RIGHT-JUSTIFIED.
      IF NOT g_uprice+0(2) IS  INITIAL.
        g_uprice10(2) = g_uprice0(2).
        g_uprice1+2(1) = ','.
      ENDIF.
      IF NOT g_uprice+2(3) IS  INITIAL.
        g_uprice13(3) = g_uprice2(3).
        g_uprice1+6(1) = ','.
      ENDIF.
      IF NOT g_uprice+5(3) IS  INITIAL.
        g_uprice17(3) = g_uprice5(3).
      ENDIF.
      IF  l_uprice2+0(1) EQ '-'.
        g_uprice2 = g_uprice1 .
        CONDENSE g_uprice2.
        CONCATENATE c_minus g_uprice2 INTO g_uprice2.
      ELSE.
        g_uprice2 = g_uprice1 .
        CONDENSE g_uprice2.
      ENDIF.
    ENDIF.
Amount
    IF t_oput-amount >= 99999999 OR t_oput-amount <= -99999999 .
      t_oput-amount = space.
    ELSE.
      l_amount1 = t_oput-amount.
      l_amount2 = t_oput-amount.
      CONDENSE l_amount1.
      CONDENSE l_amount2.
      IF  l_amount1+0(1) EQ '-'.
        REPLACE '-' WITH space INTO  l_amount1.
      ENDIF.
      CONDENSE l_amount1.
      WRITE l_amount1 TO g_amount RIGHT-JUSTIFIED.
      IF NOT g_amount+0(1) IS  INITIAL.
        g_amount0(1) = g_amount0(1).
        g_amount1+1(1) = ','.
      ENDIF.
      IF NOT g_amount+1(3) IS  INITIAL.
        g_amount12(3) = g_amount1(3).
        g_amount1+5(1) = ','.
      ENDIF.
      IF NOT g_amount+4(3) IS  INITIAL.
        g_amount16(3) = g_amount4(3).
        g_amount1+9(1) = ','.
      ENDIF.
      IF NOT g_amount+7(3) IS  INITIAL.
        g_amount110(3) = g_amount7(3).
      ENDIF.
      IF  l_amount2+0(1) EQ '-'.
        g_amount2 = g_amount1 .
        CONDENSE g_amount2.
        CONCATENATE c_minus g_amount2 INTO g_amount2.
      ELSE.
        g_amount2 = g_amount1 .
        CONDENSE g_amount2.
      ENDIF.
    ENDIF.
   NEW-PAGE.
    MOVE t_oput-tpname1 TO l_tpname1.
    MOVE t_oput-tpname2 TO l_tpname2.
    MOVE t_oput-bdgnm   TO l_bdgnm.
    AT NEW bdgrp.
      IF t_oput-rbcode CO '*'.
        t_oput-rbcode = space.
      ENDIF.
      IF t_oput-tpcode CO '*'.
        t_oput-tpcode = space.
      ENDIF.
      IF t_oput-tpname1 CO '*'.
        t_oput-tpname1 = space.
      ENDIF.
      IF t_oput-tpname2 CO '*'.
        t_oput-tpname2 = space.
      ENDIF.
      IF t_oput-bdgnm CO '*'.
        t_oput-bdgnm = space.
      ENDIF.
      PERFORM f_write_heading.
    ENDAT.
    AT NEW vbeln.
      IF sy-linno = 35 OR sy-linno = 1.
        NEW-PAGE.
        PERFORM f_write_heading.
        WRITE:/6 t_oput-fkdat , 18 t_oput-dcode+3(7) ,
               28 t_oput-vbeln+2(8) ,
               37 t_oput-dname+0(20) .
      ELSE.
        WRITE:/6 t_oput-fkdat , 18 t_oput-dcode+3(7) ,
               28 t_oput-vbeln+2(8) ,
               37 t_oput-dname+0(20) .
      ENDIF.
    ENDAT.
   WRITE:/6 t_oput-fkdat, 18 t_oput-dcode+3(7),
          28 t_oput-vbeln+2(8),
          37 t_oput-dname+0(20).
    IF sy-linno = 35 OR sy-linno = 1.
      NEW-PAGE.
      PERFORM f_write_heading.
         CONDENSE L_VOL1 NO-GAPS.
      MOVE l_vol1 TO l_vol3.
      WRITE:/6 t_oput-fkdat , 18 t_oput-dcode+3(7) ,
             28 t_oput-vbeln+2(8) ,
             37 t_oput-dname+0(20) .
      WRITE:/39 t_oput-pcode+3(6) ,
             50 t_oput-pname+0(25) ,
             79 t_oput-zjd_torihikikubn ,
             85 t_oput-volu

Similar Messages

  • I need help with The Elvis program

    I am currently working from a java book "Teach yourself java in 24hrs" and i am stuck on a program, The Elvis Program. I have typed out everything exactly checked it hundreds of times but can not find the fault. Any ideas the code is below
    class Elvis {
    public static void main(String[] arguments) {
    int weight = 250;
    System.out.println("Elvis weighs " + weight);
    System.out.println ("Elvis visits all- you- can- eat rib joint.");
    System.out println ("Elvis throws Thanksgiving luau.") ;
    weight = weight + 10;
    System.out println ("Elvis now weighs " + weight);
    System.out.println ("Elvis discovers aerobics.");
    weight = weight - 15;
    System.out.prinln ("Elvis now weighs " + weight);
    System.out.println ("Elvis falls into washing machine during "
    + "shrink cycle.");
    weight = weight / 3;
    System.out.println("Elvis now weighs " + weight);
    System.out.println ("Oops! Elvis clones herself 12 times.");
    weight = weight +(weight * 12);
    System.out.println ("The 13 Elvii now weigh " + weight);
    Cheers

    Have you tried to compile this? Your compiler would tell you that you've left out a "." on lines 6 and 8, and misspelled println on line 11.

  • Need Help Using the Report Painter

    Hi experts,
    i'm using report painter GRR1, how can i resize the Lead Column? i need it to increase its length, i had already maintained the texts(short middle and long texts).
    Thanks for the help,
    zryxel

    Go to FORMATTING > COLUMNS > Select the Format Group and Edit Column Width.
    Reward points if useful.
    Salamat!
    AJ

  • ZCM10.3.1 - need help in the Report

    How to find all devices which contacted the ZCM-server for the last 7 days ?
    Please, help me.
    Serg

    Originally Posted by amaltsev1
    Which one field use for search ??
    Serg
    True, I just tried it and it doesn't seem possible.. I thought this would have been possible, sry.
    Goto http://www.novell.com/rms and make a request for this feature.
    Thomas

  • Call CR XI from C++ routine, need to run the report without display and send the resulting report to the printer

    <table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%" id="HB_Mail_Container"><tbody><tr width="100%" height="100%"></tr><tr><td height="1" style="font-size: 1pt"></td></tr></tbody></table><blockquote><table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%" id="HB_Mail_Container"><tbody><tr width="100%" height="100%"><td id="HB_Focus_Element" width="100%" height="250" valign="top"><p>I initiate a CR XI from a C++ routine using  ShellExecute command, the report file is opened and the C++ program continues to execute, this is working fine, now I need the following two things:</p><p>1. When the report is invoked I would like it to run and print the result either to a printer or to a file.</p><p>2. I need to send the report parameters since it will not prompt for it if it runs automatically.</p><p>Thanks in advance for your help.</p></td></tr><tr></tr></tbody></table><blockquote><table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%" id="HB_Mail_Container"><tbody><tr width="100%" height="100%"><td id="HB_Focus_Element" width="100%" height="250" valign="top"><p>&#160;</p></td></tr></tbody></table></blockquote></blockquote>

    Please re-post if this is still an issue to the Legacy Application Development SDKs Forum or purchase a case and have a dedicated support engineer work with you directly

  • Need help on classical report

    hi friends i need help on classical reports,
    sold-party,
    material
    sales and distrubitutation channel ,division,
    incoming orders,order number,invoice ,credit,
    i need sub totals and final total of invoice and each customer should display in new page .

    Hi
    Use the Tables KNA1,VBAk,VBAP,VBRK and VBRP and design the report
    see the sample report using KNA1,VBAK and VBAP.
    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.
    When you run the program, the system displays the following basic list with a the page header defined in the program:
    You can trigger the AT LINE-SELECTION event by double-clicking a line. The system sets the status TEST and deactivates the function code PICK. The status TEST contains function codes FC1 to FC5. These are assigned to pushbuttons in the application toolbar. The page header of the detail list depends on the status.
    Here, double-clicking a line no longer triggers an event. However, there is now an application toolbar containing five user-defined pushbuttons. You can use these to trigger the AT USER-COMMAND event. The CASE statement contains a different reaction for each pushbutton.
    For each interactive event, the system decreases the SY-LSIND system field by one, thus canceling out the automatic increase. All detail lists now have the same level as the basic list and thus overwrite it. While the detail list is being created, SY-LSIND still has the value 1.
    Reward points for useful Answers
    Regards
    Anji

  • Need help accessing the router web page.  I have been tol...

    Need help accessing the router web page.  I have been told my router is acting like a switch and the IP address is not in the proper range.  I have tried reseting the router (hold for 30 sec and unplug for 5 mins).  Didn't work.
    thanks

    What router are you using?  Almost all Linksys routers use 192.168.1.1 as the default local IP address, but there is at least one that uses 192.168.16.1 , namely the WTR54GS  (not the WRT54GS).
    You need to try again to reset the router to factory defaults.
    To reset your router to factory defaults, use the following procedure:
    1) Power down all computers, the router, and the modem, and unplug them from the wall.
    2) Disconnect all wires from the router.
    3) Power up the router and allow it to fully boot (1-2 minutes).
    4) Press and hold the reset button for 30 seconds, then release it, then let the router reset and reboot (2-3 minutes).
    5) Power down the router.
    6) Connect one computer by wire to port 1 on the router (NOT to the internet port).
    7) Power up the router and allow it to fully boot (1-2 minutes).
    8) Power up the computer (if the computer has a wireless card, make sure it is off).
    9) Try to ping the router. To do this, click the "Start" button > All Programs > Accessories > Command Prompt. A black DOS box will appear. Enter the following: "ping 192.168.1.1" (no quotes), and hit the Enter key. You will see 3 or 4 lines that start either with "Reply from ... " or "Request timed out." If you see "Reply from ...", your computer has found your router.
    10) Open your browser and point it to 192.168.1.1. This will take you to your router's login page. Leave the user name blank (note: a few Linksys routers have a default user name of "admin" (with no quotes)), and in the password field, enter "admin" (with no quotes). This will take you to your router setup page. Note the version number of your firmware (usually listed near upper right corner of screen). Exit your browser.
    If you get this far without problems, try the setup disk (or setup the router manually, if you prefer), and see if you can get your router setup and working.
    If you cannot get "Reply from ..." in step 9 above, your router is dead.
    If you get a reply in step 9, but cannot complete step 10, then either your router is dead or the firmware is corrupt. In this case, use the Linksys tftp.exe program to try to reload your router with the latest firmware. After reloading the firmware, repeat the above procedure starting with step 1.
    If you need additional help, please state your ISP, the make and model of your modem, your router's firmware version, and the results of steps 9 and 10. Also, if you get any error messages, copy them exactly and report back.
    Please let me know how things turn out for you.
    Message Edited by toomanydonuts on 01-21-2008 04:40 AM

  • Getting the variant name when the report program is run in background

    Hi All,
    How to get the variant name for the report program when run in background? My requirement is to create an email attachement with the name 'variant.XLS', where variant = selection screen variant, when the report program is run in background. The system field SY-SLSET holds the variant name only when run online.
    Any pointers to this will be highly appreciated.
    Thanks and regards,
    Nilesh.

    Hello Nilesh,
    Please find the algo:
    1. Call the FM: GET_JOB_RUNTIME_INFO to get the background job details.
    2. Select data from TBTCP using these details:
    DATA:
    FP_EVENTID   TYPE BTCEVENTID
    FP_EVTPARM   TYPE BTCEVTPARM
    FP_ACTIVE    TYPE BTCXPGFLAG
    FP_JOBCNT    TYPE BTCJOBCNT
    FP_JOBNM     TYPE BTCJOB
    FP_STEPCNT   TYPE BTCSTEPCNT.
      CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
        IMPORTING
          EVENTID                 = FP_EVENTID
          EVENTPARM               = FP_EVTPARM
          EXTERNAL_PROGRAM_ACTIVE = FP_ACTIVE
          JOBCOUNT                = FP_JOBCNT
          JOBNAME                 = FP_JOBNM
          STEPCOUNT               = FP_STEPCNT
        EXCEPTIONS
          NO_RUNTIME_INFO         = 1
          OTHERS                  = 2.
      IF SY-SUBRC <> 0.
    *   Error calling FM: GET_JOB_RUNTIME_INFO
      ENDIF.
    DATA: FP_VARIANT TYPE BTCVARIANT.
      SELECT JOBNAME JOBCOUNT STEPCOUNT VARIANT
      FROM   TBTCP
      INTO TABLE L_IT_TBTCP
      WHERE  JOBNAME   = FP_JOBNM
      AND    JOBCOUNT  = FP_JOBCNT
      AND    STEPCOUNT = FP_STEPCNT.
      IF SY-SUBRC = 0.
        SORT L_IT_TBTCP BY JOBNM JOBCNT STEPCNT.
        READ TABLE L_IT_TBTCP INTO L_WA_TBTCP INDEX 1.
        IF SY-SUBRC = 0.
          FP_VARIANT = L_WA_TBTCP-VARIANT.
        ENDIF.
      ENDIF.
    Hope this helps.
    BR,
    Suhas

  • Need help for writing extract program

    hi
    i need help for writing extract program to retriew data from legacy system.
    i already developed bdc programs for me31k and me21.
    my requirement is to write extract program s for those t.codes.
    to retriew data from legacy system and stored in flat file.

    i need help with a java program. it is a program that allows the user to enter a student's GPA, number of extracurricular activities, and number of service activities. The user can not enter a gpa above 4.0 or below 0. The user can not enter a negative number for the number of both activities. If the student meets the following criteria: 1) GPA of 3.8 or above and at least one extracurricular activity and one service activity, 2) GPA below 3.8 but at least 3.4 and a total of at least three extracurricular and service activities, 3) GPA below 3.4 but at least 3.0 and at least two extracurricular activities and three service activities, the message "Scholarship candidate" should display. If the student does not meet the criteria above, then the message"not a candidate" should display. Can you help me, please?
    You haven't posted ANY 'java program' for us to help with.
    The forum is NOT a coding service. It is to help you with YOUR code.
    Post the code you have written and SHOW us (don't just tell us) how you compile it and execute it and the results you get. Then we can help you with any problems you are are having.
    If you need help understanding just what the program should be doing you need to ask your instructor to clarify the assignment.

  • Need help for the $200 promo rebate for trade-in of I Phone 4

    Need help for the $200 promo rebate for trade-in of I Phone 4.  Unable to preregister when I ordered the new 6  in September.  Now can not contact VZW recycle program regarding.

    When I ordered my phone on Sept. 13th in a Verizon store, I had to ask the salesman how I went about getting the $200 rebate. He said shipping materials would come with the new phones. When I received the confirmation e-mail of my order, it contained a link for the rebate. Fortunately I clicked on the link, filled out the form online, and received the packing materials to send my phone in shortly after. My phones came in on Oct. 14th and I sent 3 of them back. So far I have received a gift card for $200 for 2 of the phones; the other is showing not received. I don't know what your situation is, but I think the promotion ended Oct. 15th. If I had listened to the salesman I think I would be out of luck as well. I hope I am wrong for your sake.

  • I need help with the photo stream. Everytime I try to open it on my PC it says photo stream is unable and I have tried everuthing to enable it but it doesn't work. Any help, please?

    I need help with the photo stream. Everytime I try to open it on my PC it says photo stream is unable and I have tried everuthing to enable it but it doesn't work. Any help, please?

    Freezing, or crashing?
    ID on the Mac can produce reports that may (or may not) prove helpful in diagnosing the problem. I suspect this is something not directly related to InDesign, and maybe not to any of the Adobe apps directly since you seem to be having a problem in more than one. That often inidcates a problem at the system level.
    Nevertheless, it won't hurt to try to gather the reports. You'll find driections for how to generate them, and to post them on Pastebin.com (then put a link to them here) so we can see what's going on at Adobe Forums: InDesign CS5.5 Not Responding
    Do you happen to run a font manager? If so, which one, and waht version?

  • Need to send the report output in email body.

    Hi Friends,
    I need to send the report output in body of the email but not as an attachment.
    Requesting your suggestions. Please elaborated answers are expected.
    Thanks & Regards,
    S.Suresh Babu.

    If you are looking for same output to be available in the email body, i think this is not possible.
    If you are just concentrated on the data, then you can do as below.
    1. In your custom program, submit the actual report program via spool and by making use of that spool, read the spool content (We have function modules which can download the content from spool to the internal table), and by making use of this internal table, build the actual internal table as required which will be passed to email function module lets say SO_OBJECT_SEND etc..
    2. You can make use of even LIST_TO_MEMORY and LIST_FROM_MEMORY function modules as well instead of spool, if you have data in the final internal table.
    I am not sure, how can we handle in terms of logos if any.....or the data in the top of page related things......

  • Need help with the session state value items.

    I need help with the session state value items.
    Trigger is created (on After delete, insert action) on table A.
    When insert in table B at least one row, then trigger update value to 'Y'
    in table A.
    When delete all rows from a table B,, then trigger update value to 'N'
    in table A.
    In detail report changes are visible, but the trigger replacement value is not set in session value.
    How can I implement this?

    You'll have to create a process which runs after your database update process that does a query and loads the result into your page item.
    For example
    SELECT YN_COLUMN
    FROM My_TABLE
    INTO My_Page_Item
    WHERE Key_value = My_Page_Item_Holding_Key_ValueThe DML process will only return key values after updating, such as an ID primary key updated by a sequence in a trigger.
    If the value is showing in a report, make sure the report refreshes on reload of the page.
    Edited by: Bob37 on Dec 6, 2011 10:36 AM

  • Need help on Oracle Report format

    Hi,
    I need help on Oracle Reports. I am generating a report in excel sheet. I have a column which is 13 digit number (In database it is CHAR datatype). In excel sheet it showing some thing like 9.78381E+12. I want to show complete number like 9783805591331.
    Also sometimes leading zero's are not showing when my column values is something like 0098794859583. I need to show the leading zero's as well in excel without losing them.
    Below are the parameters i am using for the report
    DESFORMAT=SPREADSHEET AND DESTYPE=FILE
    My Oracle 9i developer version.
    Any help on this would be much appreciated.
    Thanks
    Kishore

    An additional quote string ' character with the number field will solve this problem but if u want to display this field in report then it will look ugly
    '''||yourfield from table; check ur regional settings also
    plz mark it helpful correct if it is

  • The Problem is about Standard Back Button Function in the Report Program.

    The Problem is about Standard Back Button Function in the Report Program.
    In the Report,First call screen Then Using "write" output some information,That is ok. but In the GUI When I press back button that is standard button,it exit screen to program.
    My question is how can i do When i press back button,the screen can be back forward first screen instand of exit screen to program. Thanks .

    Hi,
    You can define your own PF-STATUS and in that assign the function code for BACK button anything except 'BACK'.
    The code would somewhat look like this:
    SET PF-STATUS 'TEST'.
    write : itab-col1,
               itab-col2.
    in the PF-STATUS 'TEST', assign the function code to BACK button as 'BCK'.
    Now in your program you can use the event AT USER-COMMAND.
    In this you can handle the functionality of BACK button.
    Hope this helps.
    Regards,
    Himanshu

Maybe you are looking for

  • Can I use CC on more than one device?

    Hey guys, Looking to find out if I can use CC on both my Macbook Pro and iMac or do I need to purchase an additional membership?

  • How do I get songs on iTunes to stop skipping?

    I've had no trouble with iTunes up until recently, when my music began to skip. Songs will just randomly start to skip, and even if I press the pause button and try to restart them they still skip. I've also tried shutting down and retarting iTunes,

  • Pro*c program causing core dump in 11g

    hello every one, I am trying to debug a pro*c program which is resulting in a core dump. It used to work fine in with Oracle 10g precompiler but is causing a core dump with 11g. When I run dbx here is what I get. dbx wreg309 Type 'help' for help. [us

  • Flash page won't load in Safari

    I have an IMac G5 (not intel based). I created a flash page for my website (www.oh-sad-she.com). The page will not load in Safari. All I get is a shockwave macromedia icon. Then, when I pull down the activity menu in safari, I get this message: http:

  • Workflow Customizing Error: "Workflow: No workflow definition found"

    Hi experts, I am currently configuring Workflow on our newly installed ECC 6.0 using the Automatic Workflow Customizing (SWU3). I was able successfully executed all necessary items including the RFC destination but when i choose the 'Start Verificati