Using PO status checks in own program of CO11.

Hi everybody,
    I'm currently working on program and I'd like to use the standard status checks sap uses to check the status of a Purchase Order. If you look at the CO11 (confirmations of PO) and you enter a PO which is not released yet, you get an error message. This is one of the checks i'd like to use.
If I look at program SAPLCORU and specific to screen 100 and it's PAI, I see alot of modules that are used to check the status.
Question: is there an easy way to check the status of a PO like in CO11 or do you have to copy all the code that is executed in the mentioned screen/pai?
In case the answer is yes to the easy way, uhm, what IS the easy way then?
Cheers and thanks
Laurens

Hi Laurens,
in this particular example, there's an even simpler way to check whether a PO is or not released.
Access table EKKO and retrieve field FRGKE. This will give you the release status. If you want to check if this status means "released", access table T16FB with field FRGKE = EKKO-FRGKE. Now, if field T16FB-KZFRE is checked (with an 'X'), then your purchase order is released, and it's unreleased otherwise.
I hope it helps. BR,
Alvaro
PS: Oops, I think I'm mistaken. I thought PO meant "purchase order". Sorry guys!!
Message was edited by: Alvaro Vidal-Abarca

Similar Messages

  • How to use the catalog in our own Web Dynpro program?

    Hi Expert,
    How to access MDM catalog and bring the product data back to a our own Web Dynpro program?

    Hi  Masa,
    The Catalog Search UI of SRM that is referred to as UI as aforementioned is a page which is capable of the selection of catalog items is linked from the shopping cart creation.
    Our biz requirement content two scenarioes to processing the purchase requirement.
    A.  Create shopping cart via the catalog (PR) --> SRM PO Process --> SUS(PO and Invoice) 
    This is the standard SRM purchase scenario and we have already implemented that.
    B. Create a requirement document via the catalog (This document is same with the SC but very simple, and we create this function by the own web dynpro program) --> transfer the requirement document to other purchasing system(none SAP)  in our intranet.
    So the key problems we faced are below:
    1. How to connect to the catalog search UI from our own web dynpro program.
    ( If we connect the catalog via the MDM ABAP API, that will make the catalog serach UI could not be used;
    Also  it has been failed to simulate the function of SC's connection to the catalog;
    So we decide to link the catalog serach UI via the URL, the linkage is "http://<J2EEserver:J2EEport>/SRM-MDM/SRM_MDM?sap-locale=EN&HOOK_URL=&mask=&namedSearch=General&username=&password=&catalog=<Repository Name>&server=&datalanguage=EN". )
    2. How to transfer the catalog item data to our own web dynpro program.
    If we link the catalog search UI by URL, we can not find any good method to transfer the catalog item data to our own program.

  • How do i migrate files from a imac to macbook pro using an ethernet cable. the migration program asks for firewire and i don't own a fireWire.  I do own an ethernet cable though

    how do i migrate files from a imac to macbook pro using an ethernet cable. the migration program asks for firewire and i don't own a fireWire.  I do own an ethernet cable though

    A FW cable would be far faster & Easier, but with Ethernet you need a compatible version of Migration Assistant running on both Macs.

  • How to install/Configure/Use VT Hash Check to detect Malware/Unwanted programs in Windows?

    This just to share the below post with windows users.. 
    How to install/Configure/Use VT to detect Malware/Unwanted programs in Windows?
    http://www.windowstechinfo.com/2014/03/how-to-installconfigureuse-vt-to-detect_29.html
    Hetti Arachchige V Aravinda | Network & System Administrator (B.Sc, Microsoft Small Business Specialist, MCP, MCTS, MCSA, MCSE,MCITP, CCNA, CEH, MBCS)

    That is interesting. Normally a bootmgr error message means that the boot loader is corrupt and hard disk not "dead".. Replacing the hard drive is a quickie shotgun method of resolving the issue.
    Did you give up on the SSD?
    The  desktop ( w/ASUS Crossfire V Formula-Z  mobo) I am using to type this, has the same SSD that you asked about. I used the method I described in the earlier post to clone the OS to the SSD. The SSD is the boot drive.
    ****Please click on Accept As Solution if a suggestion solves your problem. It helps others facing the same problem to find a solution easily****
    2015 Microsoft MVP - Windows Experience Consumer

  • How to use pf-status u2018menuu2019  in ALV report ?

    Hi Friends,
    How to use pf-status u2018menuu2019  in ALV report ?
    I want to use back button ( F3). whenever press it should show
    another report.
    I used  subroutine
    form SUB_ERROR_OUTPUT USING RT_EXTAB TYPE SLIS_T_EXTAB .
    SET PF-STATUS 'ZMENU' EXCLUDING RT_EXTAB.  u201C( the button name is u201C back u201C)
    CASE SY-UCOMM.
    *WHEN '&F03'.
    WHEN 'BACK'
    ( my coding is there ).
    endcase.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_CALLBACK_PF_STATUS_SET          = 'SUB_ERROR_OUTPUT'
    but it is  executing, working the back button but not showing another report .
    any other procedure to use back button in alv report ?
    plz any idea .
    For correct answer  reword most.
    Thanking you.

    Purchase day Book .
    Data to be down loaded / printed for EDP dept. CGL.
    CGL - Requirement .
    WRITTEN  BY : ADI.****
    *CONSULTANT : SANJAY JAJOO..
    AS PER DP REQUIREMENT.
    -CHANGED BY    :    KRISHNA MOHAN  (15/01/2002)--
    -CHANGE REQ BY :    JAJU S--
    -DESCRIPTION   :    SUMMRY BY TAX CODE WISE & GL CODE WISE--
    ---MODIFIED LINES: -
    ---CHANGED BY    :    -
    ---CHANGE REQ BY :    -
    ---DESCRIPTION   :    -
    ---MODIFIED LINES: -
    *---changed by    :    sanjay jajoo on 23/08
    *---changed req by:    Ranka
    *---Description   :    Inserting Range of period as sel field
      changed by    :    krishna mohan
      func. consultant:  sanjay jajoo
    REPORT ZMMPURDB MESSAGE-ID 00
                    LINE-SIZE 255
                    LINE-COUNT 60
                    NO STANDARD PAGE HEADING .
    TABLES :   MKPF   ,  MSEG  ,SKAT,
               EKKO   ,  EKPO  , EKBE ,
               BSEG   ,  BKPF  , BSET ,
               T009B  ,  T001  , T007S ,
               T001W  ,  T001K ,LFA1.
    ******Table deactivated on 30/8/2000------jaju
    *tables : zcgltaxatn .
    DATA  : ZFILE1(65) VALUE '/DOWNLOAD/'.
    DATA  : ZFILE2(65) .
    DATA  : ZFILE(30) TYPE C VALUE '/DOWNLOAD/'.
    DATA   : ZMON(2).
    DATA : ZTOTAL(11) TYPE N.
    DATA: ZTOT1 TYPE P DECIMALS 2.
    DATA: ZTXT LIKE SKAT-TXT50.
    TYPES: BEGIN OF COMPANY ,
    HKONT LIKE BSEG-HKONT,
    TOTAL LIKE BSEG-DMBTR,
    END OF COMPANY.
    DATA: COMP TYPE COMPANY,
          COMPTAB TYPE HASHED TABLE OF COMPANY WITH UNIQUE KEY HKONT
          WITH HEADER LINE.
    DATA : NEXT LIKE BSEG-BUZEI.           "A.A. (28/03/2000)
    DATA : DOC LIKE BSEG-BELNR.            "A.A. (28/03/2000)
    DATA  S_GSBER.
    DATA: CTR TYPE I.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-B01.
    PARAMETERS : T_BUKRS LIKE T001-BUKRS OBLIGATORY MEMORY ID BUK .
    ***********CH--ID- ADI- 29 / 09 / 1999
    SELECT-OPTIONS : ZGL FOR BSEG-HKONT OBLIGATORY.
    ***********CH--ID- ADI- 29 / 09 / 1999
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(9) TEXT-C01 .
    PARAMETERS : POPER RADIOBUTTON GROUP RAD1 .
    SELECTION-SCREEN COMMENT 13(7) TEXT-C02 .
    PARAMETERS : MONTH RADIOBUTTON GROUP RAD1 .
    SELECTION-SCREEN COMMENT 23(8) TEXT-C03 .
    SELECTION-SCREEN POSITION 33 .
    commented on 22/08 sanjay jajoo
    *PARAMETERS :  T_MONAT LIKE BKPF-MONAT .
    SELECTION-SCREEN END OF LINE.
    PARAMETERS : T_GJAHR LIKE BKPF-GJAHR OBLIGATORY .
    SELECTION-SCREEN SKIP 1.
    SELECT-OPTIONS : S_DOCTYP FOR BKPF-BLART,
                     S_VENDOR FOR LFA1-LIFNR  MATCHCODE  OBJECT KRED,
                     S_MATNR FOR BSEG-MATNR NO-DISPLAY,
                    T_BUDAT FOR MKPF-BUDAT NO-EXTENSION MODIF ID DAT,
                    p_gsber FOR bseg-gsber  OBLIGATORY,
                     P_GSBER FOR BSEG-GSBER,
    mod starts for inserting range of period - sanjay jajoo
                     T_MONAT FOR BKPF-MONAT OBLIGATORY.
    mod ends
    *SELECT-OPTIONS: br_blart FOR mkpf-blart.
    *Select-options:  br_blart for bkpf-blart.
    SELECTION-SCREEN END OF BLOCK B1 .
    Start of Delete by B.Elan on 23/12/2005
    *PARAMETERS : errors AS CHECKBOX .
    *PARAMETERS : summary AS CHECKBOX .
    *PARAMETERS : nodetail AS CHECKBOX .
    **selection-screen skip 2.
    *SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-b03.   "<<<
    *Add
    *PARAMETER : stax_reg RADIOBUTTON GROUP rad2 .                   "<<<
    *Add
    *PARAMETER : pur_db RADIOBUTTON GROUP rad2 .                     "<<<
    *Add
    *SELECTION-SCREEN END OF BLOCK b3 .     "<<< Add
    *SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-b02.
    *PARAMETERS : display RADIOBUTTON GROUP grp1 ,
                dload RADIOBUTTON GROUP grp1.
    *PARAMETERS : fname1 LIKE rlgrap-filename .
    *DATA : zdoc LIKE bseg-belnr.
    *DATA : fname LIKE rlgrap-filename.
    *SELECTION-SCREEN END OF BLOCK b2 .
    End of Delete by B.Elan on 23/12/2005
    Start of Insert by B.Elan on 23/12/2005
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(5) TEXT-C01.
    PARAMETER : PUR_DB RADIOBUTTON GROUP RAD2.
    SELECTION-SCREEN COMMENT 10(25) TEXT-C06.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(5) TEXT-C01.
    PARAMETERS : MAT_SM RADIOBUTTON GROUP RAD2.
    SELECTION-SCREEN COMMENT 10(25) TEXT-C04.
    SELECTION-SCREEN COMMENT 35(5) TEXT-C01.
    PARAMETERS : VEN_SM RADIOBUTTON GROUP RAD2.
    SELECTION-SCREEN COMMENT 44(20) TEXT-C05.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(5) TEXT-C01.
    PARAMETERS : MAT_DT RADIOBUTTON GROUP RAD2.
    SELECTION-SCREEN COMMENT 10(25) TEXT-C07.
    SELECTION-SCREEN COMMENT 35(5) TEXT-C01.
    PARAMETERS : VEN_DT RADIOBUTTON GROUP RAD2.
    SELECTION-SCREEN COMMENT 44(20) TEXT-C08.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK B2.
    End of Insert by B.Elan on 23/12/2005
    Hard coded values used in the program
    added by krishna mohan on 09/02/02
    DATA : BEGIN OF IT_MSEG OCCURS 0,
            BELNR LIKE BSEG-BELNR,
            MBLNR LIKE MSEG-MBLNR,
            EBELN LIKE BSEG-EBELN,
            EBELP LIKE BSEG-EBELP,
          END OF IT_MSEG.
    mod ends
    Start of Insert by B.Elan on 23/12/2005
    *--vikky
    DATA : BEGIN OF IT_FINAL OCCURS 0,
             MATNR LIKE MARA-MATNR,
             BLART LIKE BKPF-BLART,         "  doctype
             BELNR LIKE BSEG-BELNR,         "sr - nO  10
             XBLNR LIKE BKPF-XBLNR ,        " Bill-no  16
             NAME1_VENDOR(25),
             "lfa1-name1,   " Vendor Name 35
             HKONT LIKE BSEG-HKONT ,        " Alloc-cd  10
             MWSKZ LIKE EKPO-MWSKZ ,        " St-cd     2
             BUDAT LIKE BKPF-BUDAT ,        " Bill-dt  10
             DUE_DATE LIKE BSEG-ZFBDT ,     " Due date 10
             PON    LIKE EKKO-EBELN ,                           " PON 10
             MAKTX LIKE MAKT-MAKTX,         "Material text 40
             MBLNR LIKE MSEG-MBLNR,
             QTY(8) TYPE P DECIMALS 2  ,                        "Qty 11
             RATE(9) TYPE P DECIMALS 2  ,                       "Rate11
             DISCOUNT(7) TYPE P DECIMALS 2,  "DISCOUNT 11
             PROD-AMT(9) TYPE P DECIMALS 2,
                                                                "AMOUNT 13
             EXCISE(8) TYPE P DECIMALS 2 ,   "eXCISE TAX 11
             SALES(5) TYPE P DECIMALS 2 ,    "SALES TAX   11
             FREIGHT(9) TYPE P DECIMALS 2,   "FREIGHT     11
             OTHERS(11) TYPE P DECIMALS 2,    " OTHERS     11
             TOTAL(9) TYPE P DECIMALS 2,     "TOTAL       17
           END OF IT_FINAL.
    *DATA : BEGIN OF IT_FINAL OCCURS 0,
            MATNR LIKE MARA-MATNR,
            BLART LIKE BKPF-BLART,         "  doctype
            BELNR LIKE BSEG-BELNR,         "sr - nO  10
            XBLNR LIKE BKPF-XBLNR ,        " Bill-no  16
            NAME1_VENDOR(25),
            "lfa1-name1,   " Vendor Name 35
            HKONT LIKE BSEG-HKONT ,        " Alloc-cd  10
            MWSKZ LIKE EKPO-MWSKZ ,        " St-cd     2
            BUDAT LIKE BKPF-BUDAT ,        " Bill-dt  10
            DUE_DATE LIKE BSEG-ZFBDT ,     " Due date 10
            PON    LIKE EKKO-EBELN ,                           " PON  10
            MAKTX LIKE MAKT-MAKTX,         "Material text 40
            MBLNR LIKE MSEG-MBLNR,
            QTY(13) TYPE P DECIMALS 2  ,                       "Qty 11
            RATE(13) TYPE P DECIMALS 2  ,                      "Rate 11
            DISCOUNT(13) TYPE P DECIMALS 2,  "DISCOUNT 11
            PROD-AMT(13) TYPE P DECIMALS 2,
                                                               "AMOUNT 13
            EXCISE(13) TYPE P DECIMALS 2 ,   "eXCISE TAX 11
            SALES(13) TYPE P DECIMALS 2 ,    "SALES TAX   11
            FREIGHT(13) TYPE P DECIMALS 2,   "FREIGHT     11
            OTHERS(13) TYPE P DECIMALS 2,    " OTHERS     11
            TOTAL(13) TYPE P DECIMALS 2,     "TOTAL       17
          END OF IT_FINAL.
    *--vikky
    DATA : BEGIN OF IT_FINAL_VN OCCURS 0,
               NAME1_VENDOR(25),
               "lfa1-name1,   " Vendor Name 35
               MATNR LIKE MARA-MATNR,
               BLART LIKE BKPF-BLART,         "  doctype
               BELNR LIKE BSEG-BELNR,         "sr - nO  10
               XBLNR LIKE BKPF-XBLNR ,        " Bill-no  16
               HKONT LIKE BSEG-HKONT ,        " Alloc-cd  10
               MWSKZ LIKE EKPO-MWSKZ ,        " St-cd     2
               BUDAT LIKE BKPF-BUDAT ,        " Bill-dt  10
               DUE_DATE LIKE BSEG-ZFBDT ,     " Due date 10
               PON    LIKE EKKO-EBELN ,                         " PON  10
               MAKTX LIKE MAKT-MAKTX,         "Material text 40
               MBLNR LIKE MSEG-MBLNR,
               QTY(8) TYPE P DECIMALS 2  ,                      "Qty 11
               RATE(9) TYPE P DECIMALS 2  ,                     "Rate 11
               DISCOUNT(7) TYPE P DECIMALS 2,  "DISCOUNT 11
               PROD-AMT(9) TYPE P DECIMALS 2,
                                                                "AMOUNT 13
               EXCISE(5) TYPE P DECIMALS 2 ,   "eXCISE TAX 11
               SALES(5) TYPE P DECIMALS 2 ,    "SALES TAX   11
               FREIGHT(5) TYPE P DECIMALS 2,   "FREIGHT     11
               OTHERS(9) TYPE P DECIMALS 2,    " OTHERS     11
               TOTAL(9) TYPE P DECIMALS 2,     "TOTAL       17
           END OF IT_FINAL_VN.
    End of Insert by B.Elan on 23/12/2005
    DATA: BEGIN OF ITAB_DISPLAY OCCURS 0,
            BLART LIKE BKPF-BLART,         "  doctype
            BELNR LIKE BSEG-BELNR,         "sr - nO  10
            XBLNR LIKE BKPF-XBLNR ,        " Bill-no  16
            NAME1_VENDOR(25),              "lfa1-name1,   " Vendor Name 35
            HKONT LIKE BSEG-HKONT ,        " Alloc-cd  10
            MWSKZ LIKE EKPO-MWSKZ ,        " St-cd     2
            BUDAT LIKE BKPF-BUDAT ,        " Bill-dt  10
            DUE_DATE LIKE BSEG-ZFBDT ,     " Due date 10
            PON    LIKE EKKO-EBELN ,                            " PON  10
            MAKTX LIKE MAKT-MAKTX,         "Material text 40
           QTY(8) TYPE P DECIMALS 2  ,                          "Qty 11
                                                                "qty 5
         RATE(5) TYPE P DECIMALS 2  ,                         "Rate 11
         mod starts on 21/08 for inc size to 7
           RATE(9) TYPE P DECIMALS 2  ,                         "Rate 11
                                                                "Rate 7
         mod ends -  sanjay jajoo 21/08
           DISCOUNT(7) TYPE P DECIMALS 2,  "DISCOUNT 11
           PROD-AMT(9) TYPE P DECIMALS 2,                       "AMOUNT 13
           EXCISE(5) TYPE P DECIMALS 2 ,   "eXCISE TAX 11
           SALES(5) TYPE P DECIMALS 2 ,    "SALES TAX   11
           FREIGHT(5) TYPE P DECIMALS 2,   "FREIGHT     11
           OTHERS(9) TYPE P DECIMALS 2,    " OTHERS     11 " added by vik on
    *21.08.2008
           TOTAL(9) TYPE P DECIMALS 2,     "TOTAL       17
           TOTAL1(9) TYPE P DECIMALS 2,
           MATNR LIKE MARA-MATNR,
           EBELN LIKE EKPO-EBELN,
           EBELP LIKE EKPO-EBELP,
        END OF ITAB_DISPLAY.
    DATA: BEGIN  OF ITAB_TOTAL1 OCCURS 0,
          HKONT LIKE BSEG-HKONT,
          TOTAL TYPE P DECIMALS 2,
          TXT50 LIKE SKAT-TXT50,
          END OF ITAB_TOTAL1.
    DATA: BEGIN  OF ITAB_KONV OCCURS 0,
            KNUMV LIKE KONV-KNUMV,
            KPOSN LIKE KONV-KPOSN,
            STUNR LIKE KONV-STUNR,
            ZAEHK LIKE KONV-ZAEHK,
            KSCHL LIKE KONV-KSCHL,
            KWERT LIKE KONV-KWERT,
          END OF ITAB_KONV.
    DATA:BEGIN OF ITAB_RATE_MODVAT OCCURS 0,
           EBELN LIKE EKPO-EBELN,
           EBELP LIKE EKPO-EBELP,
           MENGE LIKE EKPO-MENGE,
           BRTWR LIKE EKPO-BRTWR,
           KZWI5 LIKE EKPO-KZWI5,
           KNUMV LIKE EKKO-KNUMV,
           MATNR LIKE EKPO-MATNR,
           TXZ01 LIKE EKPO-TXZ01,
         END OF ITAB_RATE_MODVAT.
    DATA: BEGIN OF ITAB_PO OCCURS 0,
            EBELN LIKE EKPO-EBELN,
            EBELP LIKE EKPO-EBELP,
          END OF ITAB_PO.
    DATA: BEGIN OF ITAB_PO_ITEM OCCURS 0,
            BELNR LIKE BSEG-BELNR,
            EBELN LIKE BSEG-EBELN,
            BUZID LIKE BSEG-BUZID,
            XBLNR LIKE BKPF-XBLNR,
            MATNR LIKE BSEG-MATNR,
            EBELP LIKE BSEG-EBELP,
            MENGE LIKE BSEG-MENGE,
            WRBTR LIKE BSEG-WRBTR,
            EXCISE LIKE BSEG-DMBTR, " ADDED ON 21/01/02 FOR 27500 EXCISE
          SGTXT LIKE BSEG-SGTXT, " ADDED ON 24/01/02
            FLAG,
          END OF ITAB_PO_ITEM.
    DATA:BEGIN OF I_LFA1 OCCURS 0,
           LIFNR LIKE BSEG-LIFNR,
         END OF I_LFA1.
    DATA: BEGIN  OF I_VENDOR OCCURS 0,
            LIFNR LIKE LFA1-LIFNR,
            NAME1 LIKE LFA1-NAME1,
          END OF I_VENDOR.
    DATA: BEGIN OF ITAB_PO_OTHERS OCCURS  0,
            BELNR LIKE BSEG-BELNR,
            MATNR LIKE BSEG-MATNR,
            EBELN LIKE BSEG-EBELN,
            EBELP LIKE BSEG-EBELP,
            MENGE LIKE BSEG-MENGE,
            WRBTR LIKE BSEG-WRBTR,
          END OF ITAB_PO_OTHERS.
    DATA: BEGIN OF ITAB_FINAL OCCURS 0,
            BUKRS LIKE BSEG-BUKRS,
            BELNR LIKE BSEG-BELNR,
            GJAHR LIKE BSEG-GJAHR,
            BUZEI LIKE BSEG-BUZEI,
            BUZID LIKE BSEG-BUZID,
            SHKZG LIKE BSEG-SHKZG,
            EBELN LIKE BSEG-EBELN,
            EBELP LIKE BSEG-EBELP,
            MENGE LIKE BSEG-MENGE,
            WRBTR LIKE BSEG-WRBTR,
            MATNR LIKE BSEG-MATNR,
            HKONT LIKE BSEG-HKONT, " ADDED ON 21/01/02 FOR 27500 EXCISE
            SGTXT LIKE BSEG-SGTXT,         " ADDED ON 24/01/02 FOR SALES TAX
          END OF ITAB_FINAL.
    DATA : BEGIN OF ITAB OCCURS 100 ,
               MWSKZ LIKE EKPO-MWSKZ ,     " St-cd
               HKONT LIKE BSEG-HKONT ,     " Alloc-cd
               MBLNR LIKE MKPF-MBLNR ,     " Sr-No
               LIFNR LIKE LFA1-LIFNR ,     " Supp-cd
               XBLNR LIKE BKPF-XBLNR ,     " Bill-no
               BUDAT LIKE BKPF-BUDAT ,     " Bill-dt
               DUE_DATE LIKE BSEG-ZFBDT ,  " Due date
               PON    LIKE EKKO-EBELN ,    " PON
               BELNR LIKE BKPF-BELNR ,     " CCI no
               DMBTR LIKE BSEG-DMBTR ,     " Prod-amount
               EXCISE LIKE BSEG-DMBTR ,    " Excise / ModVAT
               ST_INV LIKE BSEG-DMBTR ,    " Sales Tax Loaded on Inv.
               ST_SET LIKE BSEG-DMBTR ,    " Sales Tax setoff .
               OCT_TOT LIKE BSEG-DMBTR ,   " A,A, (29/03/2000) Octroi chargs
               PT_PABLE LIKE BSEG-DMBTR ,  " Purchase tax payable
               ST_TOT LIKE BSEG-DMBTR ,    " Sales Tax total
               OTHR_CHRG LIKE BSEG-DMBTR , " Other chagres
               NEBTR LIKE BSEG-NEBTR,      " Total-amount
               NAME1_VENDOR LIKE LFA1-NAME1,   " Vendor Name
         END OF ITAB.
    DATA: BEGIN OF ITAB_DOC OCCURS 0,
            BELNR LIKE BKPF-BELNR,
            BLART LIKE BKPF-BLART,
          END OF ITAB_DOC.
    DATA : BEGIN OF DOCTAB OCCURS 100 ,
             MWSKZ LIKE BSEG-MWSKZ ,
             HKONT LIKE BSEG-HKONT ,
             BELNR LIKE BKPF-BELNR ,
    Changed By Pankaj              19.03.99
    Included field fiscal year
             GJAHR LIKE BKPF-GJAHR ,
             BUDAT LIKE BKPF-BUDAT ,
             XBLNR LIKE BKPF-XBLNR ,
             LIFNR LIKE LFA1-LIFNR ,
             ZTERM LIKE BSEG-ZTERM ,
             AMOUNT LIKE BSEG-DMBTR ,
             DMBTR  LIKE BSEG-DMBTR ,
             OTHR_CHRG LIKE BSEG-DMBTR ,
             MBLNR LIKE MKPF-MBLNR ,
             MJAHR LIKE MSEG-MJAHR ,
             DUE_DATE LIKE BSEG-ZFBDT ,
             PON    LIKE EKKO-EBELN ,
             JMO1  LIKE BSEG-DMBTR ,
             JMO2  LIKE BSEG-DMBTR ,
             JIP1  LIKE BSEG-DMBTR ,
             JIP2  LIKE BSEG-DMBTR ,
    ************CH-ID-ADI-START-28 / 09 / 1999
             JIP4 LIKE BSEG-DMBTR ,
             ZTUT LIKE BSEG-DMBTR ,
    *****************ABEY
             ZOCT LIKE BSEG-DMBTR ,
    *****************END
    ************CH-ID-ADI-START-28 / 09 / 1999
             ZSET  LIKE BSEG-DMBTR ,
             ZPTX  LIKE BSEG-DMBTR ,
             BLART LIKE BKPF-BLART ,
          END OF DOCTAB .
    Download for EDP    "EDP
    DATA : BEGIN OF DOWNLOAD OCCURS 100 ,
           SIGN1(1) ,
           TOT_VAL(11) TYPE N,
           SIGN2(1) ,
           TAXABLE(11) TYPE N ,
           SIGN3(1) ,
           TOT_TAX(11) TYPE N ,
           SIGN4(1) ,
           SURCHARG(9) TYPE N ,
           SIGN5(1) ,
           ST_AMT(9) TYPE N ,
           SIGN6(1) ,
           OTH_CHRG(9) TYPE N ,
    ******************************ch-adi-start-28 / 09 / 1999
           SIGN7(1),
           TOT(9) TYPE N,
    ******************************ch-adi-end-28 / 09 / 1999
           TYPE(1) TYPE N ,
           STKY1(1) TYPE N ,
           STBR(2) ,
           STDV(2) ,
           STCC(1) ,
           STKY(1) ,
           STDC(2) TYPE N ,
           STTYP(1) ,
           STCODE(2) ,
           STRATE(2) TYPE N ,
           STRTT(2) TYPE N ,
           SERIAL_NO(6) TYPE N ,
           STACP(9) ,
           BLANK1(3) ,
           STYRMN(6) ,
           BLANK2(7) TYPE C .
    DATA : END OF DOWNLOAD .
    DATA : BEGIN OF GLTAB OCCURS 5 ,
               MWSKZ LIKE BSEG-MWSKZ,      " << ADD A.A. (01.02.2000)
               HKONT LIKE BSEG-HKONT ,
               DMBTR LIKE BSEG-DMBTR ,     " Prod-amount
               EXCISE LIKE BSEG-DMBTR ,    " Excise / ModVAT
               ST_INV LIKE BSEG-DMBTR ,    " Sales Tax Loaded on Inv.
               ST_SET LIKE BSEG-DMBTR ,    " Sales Tax setoff .
               PT_PABLE LIKE BSEG-DMBTR ,  " Purchase tax payable
               ST_TOT LIKE BSEG-DMBTR ,    " Sales Tax total
               OTHR_CHRG LIKE BSEG-DMBTR , " Other Charges
               NEBTR LIKE BSEG-NEBTR.      " Total-amount
    DATA : END OF GLTAB .
    DATA : BEGIN OF ERRORTAB OCCURS 5 .
            INCLUDE STRUCTURE ITAB .
    DATA : END OF ERRORTAB .
    *- Start of change by Raj on 3-Spet-05
    DATA : V_TMPVAL TYPE P DECIMALS 2.
    *- End of change by Raj on 3-Spet-05
    DATA : STRING LIKE BKPF-AWKEY ,
           V_NO TYPE I,
           V_EBELN LIKE BSEG-EBELN,
           V_MATNR LIKE BSEG-MATNR. " ADDED ON 21/01/02 FOR BUZID = 'S'
    Start of Insert by B.Elan on 23/12/2005
    WORK AREA
    DATA : WA_DISPLAY LIKE ITAB_DISPLAY.
    DATA : V_UCOMM TYPE SY-UCOMM.
    CONSTANTS : C_X TYPE C VALUE 'X'.
    End of Insert by B.Elan on 23/12/2005
    AT SELECTION-SCREEN ON T_BUKRS.
      SELECT SINGLE * FROM T001 WHERE BUKRS = T_BUKRS .
      IF SY-SUBRC NE 0 .
        MESSAGE E368 WITH T_BUKRS TEXT-M01 .
      ENDIF .
    AT SELECTION-SCREEN ON T_MONAT.
    PERFORM check_period_year USING 'X'.   " COMMENTED
    AT SELECTION-SCREEN ON T_GJAHR.
    PERFORM check_period_year USING ' '.   "COMMENTED
    Start of Delete by B.Elan on 23/12/2005
    *AT SELECTION-SCREEN ON RADIOBUTTON GROUP grp1 .
    CLEAR fname .
    DATA : BEGIN OF xt247 OCCURS 12 .
             INCLUDE STRUCTURE t247 .
    DATA : END OF xt247 .
    CHECK dload EQ 'X' .
    REFRESH xt247 .
    IF poper EQ 'X' .
       MESSAGE e368 WITH text-m05 .
    ENDIF .
    CALL FUNCTION 'MONTH_NAMES_GET'
       TABLES
         month_names           = xt247
       EXCEPTIONS
         month_names_not_found = 1
         OTHERS                = 2.
    READ TABLE xt247 WITH KEY mnr = t_monat .
    CONCATENATE 'STAXSUMM.' xt247-ktx INTO fname .
    CONCATENATE  '
    DOWNLOAD\'   fname    INTO fname1.
    CONCATENATE  zfile1   fname    INTO   zfile2.
    CONDENSE fname1 NO-GAPS.
    CONDENSE zfile2 NO-GAPS.
    CONCATENATE 'STAXSUMM.' xt247-ktx INTO fname .
    End of Delete by B.Elan on 23/12/2005
    AT SELECTION-SCREEN OUTPUT .
      LOOP AT SCREEN .
        IF SCREEN-NAME EQ 'FNAME' .
          SCREEN-INPUT = 0.
          MODIFY SCREEN .
        ENDIF .
        IF SCREEN-GROUP2 EQ 'DBS' .
          SCREEN-ACTIVE = 0 .
          MODIFY SCREEN .
          IF SCREEN-NAME EQ 'BR_BLART-LOW' .
    Form the select option for the LDB .
            CLEAR BR_BLART . REFRESH BR_BLART .
            BR_BLART-SIGN = 'I' .
            BR_BLART-OPTION = 'EQ' .
            BR_BLART-LOW = 'RE' .
            APPEND BR_BLART .
            BR_BLART-SIGN = 'I' .
            BR_BLART-OPTION = 'EQ' .
            BR_BLART-LOW = 'SR' .
            APPEND BR_BLART .
            BR_BLART-SIGN = 'I' .
            BR_BLART-OPTION = 'EQ' .
            BR_BLART-LOW = 'SP' .
            APPEND BR_BLART .       " ADD ON 11122003 JAJ
            BR_BLART-SIGN = 'I' .
            BR_BLART-OPTION = 'EQ' .
           br_blart-low = 'VI' .
            BR_BLART-LOW = 'ST'.
            APPEND BR_BLART .
            BR_BLART-LOW = 'S1'.
            APPEND BR_BLART .
            BR_BLART-LOW = 'P1'.
            APPEND BR_BLART .
            BR_BLART-LOW = 'PM'.
            APPEND BR_BLART .
            BR_BLART-LOW = 'R1'.
            APPEND BR_BLART .
            BR_BLART-SIGN = 'I' .
            BR_BLART-OPTION = 'EQ' .
            BR_BLART-LOW = 'KR' .
            APPEND BR_BLART .
            BR_BLART-SIGN = 'I' .
            BR_BLART-OPTION = 'EQ' .
    *************CH-ID-ADI---30 / 09 / 1999.
            BR_BLART-LOW = 'RA'.
            APPEND BR_BLART .
            BR_BLART-SIGN = 'I' .
            BR_BLART-OPTION = 'EQ' .
            BR_BLART-LOW = 'EM'.
            APPEND BR_BLART .
            BR_BLART-SIGN = 'I' .
            BR_BLART-OPTION = 'EQ' .
            BR_BLART-LOW = 'EI' .
            APPEND BR_BLART .
          ENDIF .
        ENDIF .
        CHECK SCREEN-GROUP1 EQ 'DAT' .
        SCREEN-INPUT = 0.
        MODIFY SCREEN .
      ENDLOOP .
    START-OF-SELECTION .
    Block 1 - Selection of accounting documents in the posting period
    is done through the LDB
    GET BKPF .
    commented on 22/08
    CHECK BKPF-MONAT = T_MONAT.
      CHECK BKPF-MONAT IN T_MONAT.
      CHECK BKPF-GJAHR = T_GJAHR.
      CHECK BKPF-STBLG IS INITIAL .        "<<<< Reversed
    *CHECK bkpf-budat IN t_budat .
      CHECK BKPF-BUKRS EQ T_BUKRS .
      CHECK BKPF-BUKRS EQ T_BUKRS .
      CHECK BKPF-BSTAT EQ SPACE .          "<<< Sample docs
      CHECK BKPF-BLART EQ 'RE'             "MM-IV
        OR  BKPF-BLART EQ 'KR'             "FI-IV
      OR  bkpf-blart EQ 'VI'          "FI-IV Direct
    *************CH-ID-ADI-30 / 09  / 1999
      OR  bkpf-blart EQ 'RA'           "CASH CCI
      OR  bkpf-blart EQ 'EM'           "MAINTAINANCE
      OR  bkpf-blart EQ 'EI' .        "IDT
        OR BKPF-BLART EQ  'P1'
        OR BKPF-BLART EQ 'PM'
        OR  BKPF-BLART EQ 'R1'
        OR  BKPF-BLART EQ 'S1'
        OR  BKPF-BLART EQ 'ST'
        OR  BKPF-BLART EQ 'SR'      " ADD ON 101203 JAJ
        OR  BKPF-BLART EQ 'SP'.
    *************CH-ID-ADI-30 / 09  / 1999
      CLEAR DOCTAB .
      DOCTAB-BLART = BKPF-BLART .
      DOCTAB-BELNR = BKPF-BELNR .
      DOCTAB-BUDAT = BKPF-BUDAT .
      DOCTAB-XBLNR = BKPF-XBLNR .
    Added By Pankaj                   19.03.99
    Initializing fiscal year for document table
      DOCTAB-GJAHR = BKPF-GJAHR .
      APPEND DOCTAB.
    Tax details
    GET BSET .   " Commented because LDB gives wrong BSET entries
      " for some documents
      CASE BSET-KSCHL .
        WHEN 'JMO1' .
          DOCTAB-JMO1 = DOCTAB-JMO1 + BSET-HWSTE .
        WHEN 'JMO2' .
          DOCTAB-JMO2 = DOCTAB-JMO2 + BSET-HWSTE .
        WHEN 'JIP1' .
          DOCTAB-JIP1 = DOCTAB-JIP1 + BSET-HWSTE .
        WHEN 'JIP2' .
          DOCTAB-JIP2 = DOCTAB-JIP2 + BSET-HWSTE .
        WHEN 'ZSET' .
         break deven .
          DOCTAB-ZSET = DOCTAB-ZSET + BSET-HWSTE .
        WHEN 'ZPTX' .
          DOCTAB-ZPTX = DOCTAB-ZPTX + BSET-HWSTE .
      ENDCASE .
      DOCTAB-MWSKZ = BSET-MWSKZ.
      MODIFY DOCTAB INDEX SY-TABIX.
    Item details
    *changed by srinivas yerra.
    GET BSEG .
      IF BSEG-KOART = 'K' .              "<<< Vendor Line
    IF BSEG-KOART = 'K' .
    *end of chnages by srinivas yerra.
        DOCTAB-LIFNR = BSEG-LIFNR .
        IF NOT BSEG-ZTERM IS INITIAL .
          DOCTAB-ZTERM = BSEG-ZTERM .
          DOCTAB-DUE_DATE = BSEG-ZFBDT + BSEG-ZBD1T .
        ENDIF .
        IF BSEG-SHKZG EQ 'H' .             "<< Add credits
          DOCTAB-AMOUNT = DOCTAB-AMOUNT + BSEG-DMBTR .
        ELSE .                             "<< Subtr debits
          DOCTAB-AMOUNT = DOCTAB-AMOUNT - BSEG-DMBTR .
        ENDIF .
      ENDIF .
      CASE BSEG-KTOSL .
        WHEN 'WRX' .
          DOCTAB-PON = BSEG-EBELN .
          IF DOCTAB-MWSKZ IS INITIAL .
            DOCTAB-MWSKZ = BSEG-MWSKZ .
          ENDIF .
        WHEN 'BSX' .
    ***********ABEY
          IF NEXT = BSEG-BUZEI
             AND
             DOC = BSEG-BELNR
             AND
             ( BSEG-BUZID = 'M'
               OR
               BSEG-HKONT = 50765 ).
            DOCTAB-ZOCT = DOCTAB-ZOCT + BSEG-DMBTR.
            IF BSEG-SHKZG EQ 'H' .         "<< Subtr credits
              DOCTAB-OTHR_CHRG = DOCTAB-OTHR_CHRG - BSEG-DMBTR .
            ELSE .                         "<< Add debits
              DOCTAB-OTHR_CHRG = DOCTAB-OTHR_CHRG + BSEG-DMBTR .
            ENDIF .
          ENDIF .
    ************END
          IF BSEG-SHKZG EQ 'S' .
            DOCTAB-DMBTR = DOCTAB-DMBTR + BSEG-DMBTR .
          ELSE .
            DOCTAB-DMBTR = DOCTAB-DMBTR - BSEG-DMBTR .
          ENDIF .
        WHEN 'OCT' OR 'FRE' OR 'FR1' OR SPACE .
    *****CH-ID-ADI-30 / 09 /1999.
          IF ( ( BKPF-BLART = 'EM'  OR  BKPF-BLART = 'RA'  OR  BKPF-BLART =
          'EI')
           AND BSEG-KTOSL = SPACE ) OR  BSEG-MWSKZ = '9W' OR BSEG-MWSKZ =
           'K9' OR
                                                                BSEG-MWSKZ =
                                                                'X9'.
            DOCTAB-OTHR_CHRG = 0.
          ELSE.
    *********CH-ID-ADI--01 / 10 / 1999
         Other Charges only for accounts other than vendor acc.
            CHECK BSEG-BUZID NE 'T' .
            CHECK BSEG-BUZID NE 'P' .
            IF BSEG-KOART NE 'K' .
    *********ABEY (25/02/2000), (21/02/2000)
              IF BSEG-BUZID = 'F'
               OR BSEG-HKONT = 75461.
                NEXT = BSEG-BUZEI + 1.
                DOC = BSEG-BELNR.
                DOCTAB-ZOCT = DOCTAB-ZOCT + BSEG-DMBTR.
              ENDIF.
              IF BSEG-BUZEI = NEXT
                 AND
                 ( BSEG-BUZID = 'M'
                   OR
                   BSEG-HKONT = 50765 ).
                DOCTAB-ZOCT = DOCTAB-ZOCT + BSEG-DMBTR.
              ENDIF.
    *********END
              IF BSEG-SHKZG EQ 'H' .       "<< Subtr credits
                DOCTAB-OTHR_CHRG = DOCTAB-OTHR_CHRG - BSEG-DMBTR .
              ELSE .                       "<< Add debits
                DOCTAB-OTHR_CHRG = DOCTAB-OTHR_CHRG + BSEG-DMBTR .
              ENDIF .
            ENDIF .
    *****NEXT-LINE ADDED BY ADI
          ENDIF .
    *************END.
      ENDCASE .
    *CHANGED BY SRINIVAS YERRA
    *MODIFY DOCTAB INDEX SY-TABIX.
      APPEND DOCTAB.
    *END OF CHANGES.
    PO History
    GET EKBE .
      CHECK DOCTAB-BELNR EQ EKBE-BELNR .
      DOCTAB-MBLNR = EKBE-LFBNR .
      DOCTAB-MJAHR = EKBE-LFGJA .
      MODIFY DOCTAB INDEX SY-TABIX .
    PERFORM show_indicator USING text-m02 .
    *PERFORM convert_data.
    END-OF-SELECTION .
    Data read from LDB is converted into printable format.
      PERFORM SHOW_INDICATOR USING TEXT-M04 .
      PERFORM CONVERT_DATA .
    Start of Delete by B.Elan on 23/12/2005
    IF stax_reg EQ 'X' .                 "<<< Add
       SORT itab BY mwskz hkont belnr .
    ELSE .                               "<<< Add
       SORT itab BY belnr .               "<<< Add
        SORT itab BY pon.
    ENDIF .                              "<<< Add
    Perform further operation based on user input
    IF display EQ 'X' .
       PERFORM write_itab.
       PERFORM write_data .
    ELSE .
      PERFORM download_data .
    ENDIF .
    End of Delete by B.Elan on 23/12/2005
    Start of Insert by B.Elan on 23/12/2005
      SORT ITAB BY BELNR.
      PERFORM WRITE_DATA.
      IF MAT_SM = C_X.
        PERFORM WRITE_MATERIAL_SUMMARY.
      ELSEIF MAT_DT = C_X.
        PERFORM WRITE_MATERIAL_DETAILS.
      ELSEIF VEN_SM = C_X.
        PERFORM WRITE_VENDOR_SUMMARY.
      ELSEIF VEN_DT = C_X.
        PERFORM WRITE_VENDOR_DETAILS.
      ENDIF.
    End of Insert by B.Elan on 23/12/2005
    Start of Insert by B.Elan on 23/12/2005
    AT USER-COMMAND.
      V_UCOMM = SY-UCOMM.
      CASE V_UCOMM.
        WHEN 'DETLS'.
          NEW-PAGE.
          PUR_DB = C_X.
          PERFORM CLEAR_DETAILS.
          PERFORM WRITE_DATA.
        WHEN 'MSUMRY'.
          PERFORM WRITE_MATERIAL_SUMMARY.
        WHEN 'MDETL'.
          PERFORM WRITE_MATERIAL_DETAILS.
        WHEN 'VSUMRY'.
          PERFORM WRITE_VENDOR_SUMMARY.
        WHEN 'VDETL'.
          PERFORM WRITE_VENDOR_DETAILS.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
      ENDCASE.
    End of Insert by B.Elan on 23/12/2005
    *- - - - - - - - - End Of Execution .- - - - - - - - - - - - - - - - - -
    TOP-OF-PAGE .
      IF PUR_DB = C_X.
        PERFORM TOP_OF_PAGE.
        PERFORM TOP_OF_PAGE_PUR_DB.
      ELSEIF MAT_SM = C_X.
        PERFORM TOP_OF_PAGE.
        PERFORM TOP_OF_PAGE_MAT_SM.
      ELSEIF MAT_DT = C_X.
        PERFORM TOP_OF_PAGE.
        PERFORM TOP_OF_PAGE_MAT_DT.
      ELSEIF VEN_SM = C_X.
        PERFORM TOP_OF_PAGE.
        PERFORM TOP_OF_PAGE_VEN_SM.
      ELSEIF VEN_DT = C_X.
        PERFORM TOP_OF_PAGE.
        PERFORM TOP_OF_PAGE_VEN_DT.
      ENDIF.
    TOP-OF-PAGE DURING LINE-SELECTION.
      CASE V_UCOMM.
        WHEN 'DETLS'.
          PERFORM TOP_OF_PAGE.
          PERFORM TOP_OF_PAGE_PUR_DB.
        WHEN 'MSUMRY'.
          PERFORM TOP_OF_PAGE.
          PERFORM TOP_OF_PAGE_MAT_SM.
        WHEN 'MDETL'.
          PERFORM TOP_OF_PAGE.
          PERFORM TOP_OF_PAGE_MAT_DT.
        WHEN 'VSUMRY'.
          PERFORM TOP_OF_PAGE.
          PERFORM TOP_OF_PAGE_VEN_SM.
        WHEN 'VDETL'.
          PERFORM TOP_OF_PAGE.
          PERFORM TOP_OF_PAGE_VEN_DT.
      ENDCASE.
    *&      Form  WRITE_DATA
          text                                                           *
    FORM WRITE_DATA.
      DATA:     V_SALES LIKE ITAB_DISPLAY-SALES,
                V_RATE LIKE ITAB_DISPLAY-RATE,
                V_DISCOUNT LIKE ITAB_DISPLAY-DISCOUNT,
                V_PROD-AMT LIKE ITAB_DISPLAY-PROD-AMT,
                V_EXCISE1 LIKE ITAB_DISPLAY-EXCISE,
                V_EXCISE LIKE ITAB_DISPLAY-EXCISE,
                V_PON LIKE ITAB_DISPLAY-PON,
                V_OTHERS LIKE ITAB_DISPLAY-OTHERS,
                V_FREIGHT LIKE ITAB_DISPLAY-FREIGHT.
      CLEAR ITAB .
    Write the correct data i.e. tax code and G/L code both available .
      LOOP AT ITAB .
    *************CH-ID-ADI-30 / 09 / 1999
        IF ( ITAB-MWSKZ = '9W' OR ITAB-MWSKZ = 'K9' OR ITAB-MWSKZ = 'X9' )
                                                   AND ITAB-OTHR_CHRG NE 0 .
          ITAB-DMBTR = ITAB-OTHR_CHRG.
          ITAB-OTHR_CHRG = 0.
          MODIFY ITAB.
        ENDIF.
      ENDLOOP.
      LOOP AT ITAB.
        I_LFA1-LIFNR = ITAB-LIFNR.
        APPEND I_LFA1.
        CLEAR I_LFA1.
      ENDLOOP.
      SORT I_LFA1.
      DELETE ADJACENT DUPLICATES FROM I_LFA1 COMPARING ALL FIELDS.
      SELECT LIFNR
             NAME1
        FROM LFA1 INTO TABLE I_VENDOR
        FOR ALL ENTRIES IN I_LFA1 WHERE
                                       LIFNR = I_LFA1-LIFNR.
      FREE I_LFA1.
      LOOP AT ITAB.
        READ TABLE I_VENDOR WITH KEY LIFNR = ITAB-LIFNR .
        IF SY-SUBRC EQ 0.
          ITAB-NAME1_VENDOR = I_VENDOR-NAME1.
          MODIFY ITAB  TRANSPORTING NAME1_VENDOR.
        ENDIF.
      ENDLOOP.
      LOOP AT ITAB.
        IF NOT  ITAB-LIFNR IN S_VENDOR.
          DELETE ITAB.
        ENDIF.
      ENDLOOP.
      SELECT BUKRS  BELNR GJAHR BUZEI BUZID SHKZG EBELN EBELP ERFMG WRBTR
       MATNR HKONT SGTXT " ERFMG for MENGE,HKONT,SGTXT Added by KrishnaMohan
             INTO TABLE ITAB_FINAL
            FROM BSEG FOR ALL ENTRIES IN ITAB
            WHERE BUKRS = T_BUKRS AND                           "'1000' AND
                  BELNR = ITAB-BELNR AND
    *added by srinivas
                 hkont in zgl and
    *end
                  GJAHR = T_GJAHR AND
    *- Start of change by Raj on 030905
                 buzid IN ('W', 'M', 'K', 'S', 'F' , 'P' ) AND
                   BUZID IN ('W', 'M', 'K', 'S', 'F' , 'P' , 'T', ' ') AND
                   " ADD T 090206  JAJ
                   KOART <> 'K'   AND    " mod by vik on 21.08.2008" sjaj si
    *- End of change by Raj on 030905
    BUZID = P Added on 21/01/02 by Krishna Mohan
                  GSBER IN P_GSBER AND
                 gsber IN p_gsber OR gsber = ' ' AND
                  MATNR IN S_MATNR.
      SELECT BELNR BLART INTO TABLE ITAB_DOC FROM BKPF
                FOR ALL ENTRIES IN ITAB_FINAL WHERE
                           BUKRS = T_BUKRS AND                  "'1000' AND
                           BELNR  = ITAB_FINAL-BELNR AND
                           GJAHR = T_GJAHR AND
                           BLART NOT IN ('WA' , 'WE').
      SORT ITAB_DOC BY BELNR BLART.
      LOOP AT ITAB_DOC.
        IF NOT ITAB_DOC-BLART IN S_DOCTYP .
          DELETE ITAB_DOC.
        ENDIF.
      ENDLOOP.
      LOOP AT ITAB_FINAL.
        READ TABLE ITAB_DOC WITH KEY BELNR = ITAB_FINAL-BELNR BINARY SEARCH.
        IF SY-SUBRC NE 0.
          DELETE ITAB_FINAL.
        ENDIF.
      ENDLOOP.
      DELETE ITAB_FINAL WHERE BUZID = 'K' AND BUZEI = '1'.
      LOOP AT ITAB_FINAL WHERE SHKZG = 'H'.
        ITAB_FINAL-WRBTR = ITAB_FINAL-WRBTR * ( -1 ).
        MODIFY ITAB_FINAL TRANSPORTING WRBTR.
      ENDLOOP.
      LOOP AT ITAB_FINAL WHERE BUZID = 'M'.
        IF ITAB_FINAL-SGTXT NE ' '.
          TRANSLATE ITAB_FINAL-SGTXT TO UPPER CASE.
          MODIFY ITAB_FINAL.
        ENDIF.
      ENDLOOP.
      LOOP AT ITAB_FINAL .
        IF ITAB_FINAL-BUZID = 'W'.
          CLEAR V_MATNR.
          V_EBELN = ITAB_FINAL-EBELN.
          V_MATNR = ITAB_FINAL-MATNR.
          ITAB_PO_ITEM-BELNR = ITAB_FINAL-BELNR.
          ITAB_PO_ITEM-BUZID = ITAB_FINAL-BUZID.
          ITAB_PO_ITEM-MATNR = ITAB_FINAL-MATNR.
          ITAB_PO_ITEM-EBELN = ITAB_FINAL-EBELN.
          ITAB_PO_ITEM-EBELP = ITAB_FINAL-EBELP.
          ITAB_PO_ITEM-MENGE = ITAB_FINAL-MENGE.
          ITAB_PO_ITEM-WRBTR = ITAB_FINAL-WRBTR.
          COLLECT ITAB_PO_ITEM.
          CLEAR ITAB_PO_ITEM.
        ELSEIF ITAB_FINAL-BUZID = 'M' OR ITAB_FINAL-BUZID = 'K' OR
                                          ITAB_FINAL-BUZID = 'S' OR
            ITAB_FINAL-BUZID = 'P' OR      " ADDED ON 21/01/02
    *- Start of change by Raj on 030905
            ITAB_FINAL-BUZID = ' ' OR
             ITAB_FINAL-BUZID = 'T' OR   " ADD BY JAJ ON 090206
    *- End of change by Raj on 030905
                                          ITAB_FINAL-BUZID = 'F'.
          IF ITAB_FINAL-MATNR IS INITIAL.
            ITAB_FINAL-MATNR = V_MATNR.
          ENDIF.
        CLEAR V_MATNR.
          ITAB_PO_OTHERS-BELNR = ITAB_FINAL-BELNR.
         ITAB_PO_OTHERS-MATNR = ITAB_FINAL-MATNR.
         ITAB_PO_OTHERS-EBELN = ITAB_FINAL-EBELN.
         ITAB_PO_OTHERS-EBELP = ITAB_FINAL-EBELP.
         ITAB_PO_OTHERS-MENGE = ITAB_FINAL-MENGE.
          ITAB_PO_OTHERS-WRBTR = ITAB_FINAL-WRBTR.
    IF CONDITION,ADDED ON 21/01/02 FOR GETTING EXCISE WHEN CONDITION MEETS
    ie TOTAL AMOUNT = EXCISE WHEN BUZID = S AND HKONT = 27500
    *IF itab_final-buzid = 'S' AND ( itab_final-hkont = '0000027500' OR  "
    *COMM BY JAJ ON 090206
          IF ITAB_FINAL-BUZID = 'S' OR ITAB_FINAL-BUZID = 'T' AND (
          ITAB_FINAL-HKONT = '0000027500' OR
                                        ITAB_FINAL-HKONT = '0000027515'
            OR  ITAB_FINAL-HKONT = '0000027550'       " jaj on 090206
           OR  ITAB_FINAL-HKONT = '0000027507' OR
            ITAB_FINAL-HKONT = '0000027508').  "Added on 050905 - Raj
            ITAB_FINAL-EBELN = V_EBELN.
    to get ebeln value into header so that when there are 2 po's
    and 2 W's excise can go into only one po which is v_ebeln
    Start of insert by B.Elan on 10/02/2006
            READ TABLE ITAB_PO_ITEM WITH KEY BELNR = ITAB_FINAL-BELNR
                                             EBELN = ITAB_FINAL-EBELN
                                             MATNR = ITAB_FINAL-MATNR.
            ITAB_PO_ITEM-EXCISE = ITAB_PO_ITEM-EXCISE + ITAB_FINAL-WRBTR.
    End of insert by B.Elan on 10/02/2006
    Start of delete by B.Elan on 10/02/2006
          itab_po_item-excise = itab_final-wrbtr.
    End of delete by B.Elan on 10/02/2006
            MODIFY ITAB_PO_ITEM TRANSPORTING EXCISE
                  WHERE BELNR EQ ITAB_FINAL-BELNR AND
                        EBELN EQ ITAB_FINAL-EBELN.
            CLEAR ITAB_PO_ITEM.
          ELSE.
            COLLECT ITAB_PO_OTHERS.
          ENDIF.
          CLEAR ITAB_PO_OTHERS.
        ENDIF.
      ENDLOOP.
    sateesh
      SORT ITAB_PO_ITEM BY BELNR EBELN.
      LOOP AT ITAB_PO_ITEM.
       AT NEW BELNR.
        AT NEW EBELN.
          READ TABLE ITAB_PO_ITEM INDEX SY-TABIX.
          ITAB_PO_ITEM-FLAG = 'X'.
          MODIFY ITAB_PO_ITEM INDEX SY-TABIX.
        ENDAT.
       ENDAT.
      ENDLOOP.
      LOOP AT ITAB_PO_ITEM.
        ITAB_PO_ITEM-EXCISE = 0.
        MODIFY ITAB_PO_ITEM TRANSPORTING EXCISE
         WHERE EXCISE > 0
           AND FLAG = SPACE.
      ENDLOOP.
    end
      LOOP AT ITAB_PO_ITEM.
        ITAB_PO-EBELN = ITAB_PO_ITEM-EBELN.
        ITAB_PO-EBELP = ITAB_PO_ITEM-EBELP.
        APPEND ITAB_PO.
        CLEAR ITAB_PO.
      ENDLOOP.
      LOOP AT ITAB_PO_OTHERS.
        ITAB_PO-EBELN = ITAB_PO_OTHERS-EBELN.
        ITAB_PO-EBELP = ITAB_PO_OTHERS-EBELP.
        APPEND ITAB_PO.
        CLEAR ITAB_PO.
      ENDLOOP.
      SORT ITAB_PO.
      DELETE ADJACENT DUPLICATES FROM  ITAB_PO COMPARING ALL FIELDS.
      SELECT EKPO~EBELN
             EBELP
             MENGE
             BRTWR
             KZWI5
             EKKO~KNUMV
             EKPO~MATNR
             EKPO~TXZ01
             INTO TABLE ITAB_RATE_MODVAT
             FROM EKPO INNER JOIN EKKO
                 ON EKPO~EBELN = EKKO~EBELN
        FOR ALL ENTRIES IN ITAB_PO WHERE
                        EKPO~EBELN = ITAB_PO-EBELN AND
                        EBELP = ITAB_PO-EBELP.
      SELECT KNUMV KPOSN STUNR ZAEHK KSCHL KWERT
        INTO TABLE ITAB_KONV
        FROM KONV
        FOR ALL ENTRIES IN ITAB_RATE_MODVAT
            WHERE KNUMV = ITAB_RATE_MODVAT-KNUMV AND
      KSCHL IN ('YT02', 'YF07', 'YOTH', 'YPF1', 'YD01', 'YD02', 'YD03' ) .
      SORT ITAB_KONV BY KNUMV KSCHL.
      SORT ITAB BY BELNR.
      SORT ITAB_RATE_MODVAT BY EBELN EBELP.
      SORT ITAB_PO_OTHERS BY BELNR MATNR.
      LOOP AT ITAB_PO_ITEM.
        ITAB_DISPLAY-BELNR = ITAB_PO_ITEM-BELNR.
        READ TABLE ITAB_DOC WITH KEY BELNR = ITAB_PO_ITEM-BELNR BINARY
        SEARCH.
        IF SY-SUBRC EQ 0.
          ITAB_DISPLAY-BLART = ITAB_DOC-BLART.
        ENDIF.
        READ TABLE ITAB WITH KEY BELNR = ITAB_PO_ITEM-BELNR BINARY SEARCH.
        IF SY-SUBRC EQ 0.
          ITAB_DISPLAY-XBLNR = ITAB-XBLNR.
          ITAB_PO_ITEM-XBLNR = ITAB-XBLNR.
          ITAB_DISPLAY-NAME1_VENDOR = ITAB-NAME1_VENDOR.
          ITAB_DISPLAY-HKONT = ITAB-HKONT.
          ITAB_DISPLAY-MWSKZ = ITAB-MWSKZ.
          ITAB_DISPLAY-BUDAT = ITAB-BUDAT.
          ITAB_DISPLAY-DUE_DATE   = ITAB-DUE_DATE.
         ITAB_DISPLAY-PON    =  ITAB_PO_ITEM-EBELN.
        ENDIF.
        ITAB_DISPLAY-QTY  =    ITAB_PO_ITEM-MENGE.
        READ TABLE ITAB_RATE_MODVAT WITH KEY EBELN = ITAB_PO_ITEM-EBELN
                                             EBELP = ITAB_PO_ITEM-EBELP
                                             BINARY SEARCH.
        IF SY-SUBRC EQ 0.
          ITAB_DISPLAY-PON    =  ITAB_PO_ITEM-EBELN.
          ITAB_DISPLAY-MATNR = ITAB_RATE_MODVAT-MATNR.
          ITAB_DISPLAY-MAKTX  =  ITAB_RATE_MODVAT-TXZ01.
          ITAB_DISPLAY-RATE = ITAB_RATE_MODVAT-BRTWR /
          ITAB_RATE_MODVAT-MENGE.
          ITAB_DISPLAY-PROD-AMT = ITAB_DISPLAY-RATE * ITAB_PO_ITEM-MENGE.
          IF ITAB_PO_ITEM-EXCISE NE 0.
            ITAB_DISPLAY-EXCISE = ITAB_PO_ITEM-EXCISE.
        ELSE.
    *ITAB_DISPLAY-EXCISE = ( ITAB_PO_ITEM-MENGE * ITAB_RATE_MODVAT-KZWI5 ) /
                                      ITAB_RATE_MODVAT-MENGE.
    *commentedon 210102 to get excise directly from BSEG - IV
          ENDIF.
        ENDIF.
        READ TABLE ITAB_KONV WITH KEY KNUMV = ITAB_RATE_MODVAT-KNUMV
                                      KPOSN = ITAB_RATE_MODVAT-EBELP
                                      KSCHL = 'YT02' .
        IF SY-SUBRC EQ 0.
          ITAB_DISPLAY-SALES  = ( ITAB_PO_ITEM-MENGE * ITAB_KONV-KWERT ) /
                                 ITAB_RATE_MODVAT-MENGE.
          READ TABLE ITAB_FINAL WITH KEY BELNR = ITAB_PO_ITEM-BELNR
                                         BUZID = 'M'
                                        SGTXT(9) = 'SALES TAX'.
          IF SY-SUBRC EQ 0.
          IF ITAB_FINAL-SGTXT(9) EQ 'SALES TAX'
             OR ITAB_FINAL-SGTXT(9) EQ 'sales tax'.
            ITAB_DISPLAY-SALES = ITAB_DISPLAY-SALES + ITAB_FINAL-WRBTR.
          ENDIF.
          ENDIF.
        ENDIF.
        READ TABLE ITAB_KONV WITH KEY KNUMV = ITAB_RATE_MODVAT-KNUMV
                                      KPOSN = ITAB_RATE_MODVAT-EBELP
                                      KSCHL = 'YF07'.
        IF SY-SUBRC EQ 0.
          ITAB_DISPLAY-FREIGHT = ( ITAB_PO_ITEM-MENGE * ITAB_KONV-KWERT ) /
                                  ITAB_RATE_MODVAT-MENGE.
        ENDIF.
        READ TABLE ITAB_KONV WITH KEY KNUMV = ITAB_RATE_MODVAT-KNUMV
                                      KPOSN = ITAB_RATE_MODVAT-EBELP
                                      KSCHL = 'YD01' .
        IF SY-SUBRC EQ 0.
         ITAB_DISPLAY-DISCOUNT = ( ITAB_PO_ITEM-MENGE * ITAB_KONV-KWERT ) /
                                              ITAB_RATE_MODVAT-MENGE.
        ELSE.
          READ TABLE ITAB_KONV WITH KEY KNUMV = ITAB_RATE_MODVAT-KNUMV
                                        KPOSN = ITAB_RATE_MODVAT-EBELP
                                      KSCHL = 'YD02' .
          IF SY-SUBRC EQ 0.
           ITAB_DISPLAY-DISCOUNT = ( ITAB_PO_ITEM-MENGE * ITAB_KONV-KWERT )
    ITAB_RATE_MODVAT-MENGE.
          ELSE.
            READ TABLE ITAB_KONV WITH KEY KNUMV = ITAB_RATE_MODVAT-KNUMV
                                          KPOSN = ITAB_RATE_MODVAT-EBELP
                                          KSCHL = 'YD03' .
            IF SY-SUBRC EQ 0.
             ITAB_DISPLAY-DISCOUNT = ( ITAB_PO_ITEM-MENGE * ITAB_KONV-KWERT
    ITAB_RATE_MODVAT-MENGE.
            ENDIF.
          ENDIF.
        ENDIF.
        LOOP AT ITAB_KONV WHERE KNUMV = ITAB_RATE_MODVAT-KNUMV AND KPOSN =
                                 ITAB_RATE_MODVAT-EBELP AND
                       (  KSCHL = 'YPF1' OR KSCHL = 'YOTH' ) .
          ITAB_KONV-KWERT = ( ITAB_PO_ITEM-MENGE * ITAB_KONV-KWERT ) /
                                   ITAB_RATE_MODVAT-MENGE.
          ITAB_DISPLAY-OTHERS = ITAB_DISPLAY-OTHERS + ITAB_KONV-KWERT.
        ENDLOOP.
        READ TABLE ITAB_PO_OTHERS WITH KEY BELNR = ITAB_PO_ITEM-BELNR.
                                          EBELN = ITAB_PO_ITEM-EBELN.
                                          BINARY SEARCH.
    sateesh as on 10092003
        IF SY-SUBRC NE 0. CLEAR ITAB_PO_OTHERS. ENDIF.
    end
        IF NOT ITAB_PO_OTHERS-EBELN IS INITIAL.
          READ TABLE ITAB_PO_OTHERS WITH KEY EBELN = ITAB_PO_ITEM-EBELN
                                             EB

  • What is the use of "#ec *  in a abap program

    Hi,
    i want to know that is the use of "#ec *  in an abap program.
    i heard that it is used to supress the warning messages which we get when we do extended syntax check.
    fist of all i want to know is it true r false and if its true then i want to know more about it.
    regards,
    maqsood

    Hi
    Yes it's true.
    If you put "#ec * at the end of a abap code row, you can suppress the warnining messages of extended program check.
    Every kind of warning has own sign, you find out them while running extended check.
    It's a way to clear the useless messages.
    For example, you have created an include where you have defined several routines you have to use in several programs, but every program don't use all routines of that include, or you dynamically call those routines, so if you run the extend check for a certain program you can get a warning like that:
    FORM PLUTO not called directly
    Now you can't delete the routine from the include, because it can be used by other program, but you can hide that message by "#ec CALLED:
    FORM <MY_FORM>. "#EC CALLED
    ENDFORM.
    Max

  • Checking wether a program(s) follows stds/naming convenions in new program

    Hi,
    We are developing a new program what it does is it need to check all the naming standards/conventions which we follow in our project are in new program (or) not.
    In New program we are taking Program Name/Transport request as input.
    Once we run this program by giving Existing Program Name (or) transport request we have check wether all the includes/program as per input follows naming standards (or) not.
    We need to give message(s) in the output for each Naming convention/standard wether it is successfully implemented that convention/standard one after other.
    Now my issue is how can we implement the same.
    Is there any standard transaction in SAP where we can add our own naming convention/standard so that once we run that transaction it will take care of all the standards.
    If not as per our development first we are takng all the lines in program into one internal table there we are removing all the commented & blank lines and processing other lines.
    Now using those remaining lines we need to process to see wether they all following naming conventions and standards.
    Ex standards and conventions that need to be followed:
    <b>1. The names of components in classes, that is attributes, methods and events, must consist of the characters "A-Z", "0-9" and "_". They should not begin with a number.</b>
    <b>Error message in ABAP Objects if the following syntax is used:</b>
    DATA: field-name TYPE ...,
          1name TYPE ...
    <b>Correct syntax:</b>
    DATA: field_name TYPE ...,
          name1 TYPE ...
    <b>2. No LIKE reference to Dictionary types</b>
    <b>Error message in ABAP Objects if the following syntax is used:</b>
    DATA f LIKE dbtab.
    <b>Correct syntax:</b>
    DATA f TYPE dbtab.
    <b>3. No implicit specification of type, length and decimal places</b>
    In the statement TYPES, the type must be specified explicitly with type C, the length with types C, N, P, and X, and the number of decimal places with type P in ABAP Objects.
    <b>Error message in ABAP Objects if the following syntax is used:</b>
    TYPES: t1,
           t2 TYPE p.
    <b>Correct syntax:</b>
    TYPES: t1(1) TYPE c,
           t2(8) TYPE p DECIMALS 0.
    <b>4. Incorrect logical operators</b>
    The logical operators >< , =< and => are not allowed in ABAP Objects.
    <b>Error message in ABAP Objects if the following syntax is used:</b>
    ... >< ... =< ... => ...
    <b>Correct syntax:</b>
    ... <> ... <= ... >= ...
    There are lots of checks as mentioned above we need to implement all of those.
    Likewise we need to check wether the program is implementing all the standards & naming conventions.
    How can we add all such things[Checks] in my program.
    Can anybody help me in this regard.
    If anybody who has done such programs please pass on those ideas.
    Thanks in advance.
    Thanks and Regards,
    Deep.

    Hi,
    These things i am aware of.
    But here we will not be able to add our own standards/conventions.
    Is there any provision in SAP to include/provide our own checks along with SAP's own checks!
    Because it is not possible to add our own checks we are developing new program to implement our own checks.
    Thanks for your reply.
    Thanks,
    Deep.

  • XML Publisher Bursting - FTP Status Check

    "XML Publisher Report Bursting Program" completes successfully even if EMAIL or FTP fails in the bursting process.
    See the output file below, last FTP fails but the program completed fine.
    Is there a way to check the Status and mark the program error so that we know it's not FTP'ed correctly.
    OUTPUT FILE_
    - <DOCUMENT_STATUS>
    <KEY />
    <OUTPUT_TYPE>excel</OUTPUT_TYPE>
    <DELIVERY>email</DELIVERY>
    <OUTPUT>/u01/autosys/MRP_20130322090315.xls</OUTPUT>
    <STATUS>success</STATUS>
    <LOG />
    </DOCUMENT_STATUS>
    - <DOCUMENT_STATUS>
    <KEY />
    <OUTPUT_TYPE>excel</OUTPUT_TYPE>
    <DELIVERY>ftp</DELIVERY>
    <OUTPUT>/p05/oracle/tmp/032213_095834975/XX_BURSTING_12.xls</OUTPUT>
    <STATUS>success</STATUS>
    <LOG />
    </DOCUMENT_STATUS>
    - <DOCUMENT_STATUS>
    <KEY />
    <OUTPUT_TYPE>excel</OUTPUT_TYPE>
    <DELIVERY>ftp</DELIVERY>
    <OUTPUT>/p05/oracle/tmp/032213_095834975/XX_BURSTING_19.xls</OUTPUT>
    *<STATUS>fail</STATUS>*
    *<LOG>Error!! Could not deliver the output for Delivery channel:null . Please check the Log for error details..</LOG>*
    </DOCUMENT_STATUS>

    Hi Manu,
    Please check below MOS ids and your issue may be resolved.
    Bursting Programs Are Failing With Error "Could not deliver the output for Delivery channel:null" [ID 1241535.1]
    Email Bursting Error 'Could Not Deliver The Output ...' [ID 1354542.1]
    "Error!! Could not deliver the output for Delivery channel:null" - BI Publisher Bursting Error [ID 1272488.1]
    mark if this helps you.
    Regards,
    Kishore

  • How to use PF status in Table Control?

    I have made 1 table control. Now I need to use three buttons like SELECT, DESELECT, DELETE the rows of table control using PF STATUS.  Can you plz help with the Code.

    Hi.
    Refer this code.
    The following example processes a table control with LOOP with parallel loop using an internal table. By using function codes you can sort columns and delete rows from the internal table. The ready for input status of the table control fields is controlled using a function code.
    REPORT demo_dynpro_tabcont_loop_at.
    CONTROLS flights TYPE TABLEVIEW USING SCREEN 100.
    DATA: cols LIKE LINE OF flights-cols,
          lines TYPE i.
    DATA: ok_code TYPE sy-ucomm,
          save_ok TYPE sy-ucomm.
    DATA: itab TYPE TABLE OF demo_conn.
          TABLES demo_conn.
    SELECT * FROM spfli INTO CORRESPONDING FIELDS OF TABLE itab.
    LOOP AT flights-cols INTO cols WHERE index GT 2.
      cols-screen-input = '0'.
      MODIFY flights-cols FROM cols INDEX sy-tabix.
    ENDLOOP.
    CALL SCREEN 100.
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
      DESCRIBE TABLE itab LINES lines.
      flights-lines = lines.
    ENDMODULE.
    MODULE cancel INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE read_table_control INPUT.
      MODIFY itab FROM demo_conn INDEX flights-current_line.
    ENDMODULE.
    MODULE user_command_0100 INPUT.
      save_ok = ok_code.
      CLEAR ok_code.
      CASE save_ok.
        WHEN 'TOGGLE'.
          LOOP AT flights-cols INTO cols WHERE index GT 2.
            IF  cols-screen-input = '0'.
              cols-screen-input = '1'.
            ELSEIF  cols-screen-input = '1'.
              cols-screen-input = '0'.
            ENDIF.
            MODIFY flights-cols FROM cols INDEX sy-tabix.
          ENDLOOP.
        WHEN 'SORT_UP'.
          READ TABLE flights-cols INTO cols WITH KEY selected = 'X'.
          IF sy-subrc = 0.
            SORT itab STABLE BY (cols-screen-name+10) ASCENDING.
            cols-selected = ' '.
            MODIFY flights-cols FROM cols INDEX sy-tabix.
          ENDIF.
        WHEN 'SORT_DOWN'.
          READ TABLE flights-cols INTO cols WITH KEY selected = 'X'.
          IF sy-subrc = 0.
            SORT itab STABLE BY (cols-screen-name+10) DESCENDING.
            cols-selected = ' '.
            MODIFY flights-cols FROM cols INDEX sy-tabix.
          ENDIF.
        WHEN 'DELETE'.
          READ TABLE flights-cols INTO cols
                                  WITH KEY screen-input = '1'.
          IF sy-subrc = 0.
            LOOP AT itab INTO demo_conn WHERE mark = 'X'.
              DELETE itab.
            ENDLOOP.
          ENDIF.
      ENDCASE.
    ENDMODULE.
    Reward all helpfull answers.
    Regards.
    Jay

  • How to use shared variables with native c programs

    Hello
    What is the way to use shared variables with native c programs?
    I have a c/c++ program that uses the NIDAQmx C-API to perform measurements. Now I want to communicate to a LabVIEW program via shared variables.
    Is there a C-API for shared variables as there is for the NIDAQmx functionality? Where can I find further documentation? The document "Using the LabVIEW Shared Variable" mentions that one "can read and write to shared variables in ANSI C", but there are no hints about how and where to look.
    Thanks in Advance

    Hi user42,
    with CVI 8.0, you cannot create or configure shared variables. However, you can read or write to an already configured LabVIEW 8.x shared variable from CVI using the DataSocket API.
    In order to do this you need to have and DataSocket 4.3 or higher installed.
    Here's a forum post about using the DataSocket functions a LabVIEW Shared Variables:
    http://forums.ni.com/ni/board/message?board.id=180&message.id=24569&requireLogin=False
    With CVI 8.1 and Measurement Studio 8.1 it's possible to use Shared Variables via the Network Varaiable Library (check out the end of the "Network-Published Shared Variable" section within the "Using the LabVIEW Shared Variable" documentation and the following link).
    Datasocket with LabWindows/CVI and LabVIEW Real-Time:
    http://digital.ni.com/public.nsf/allkb/CC4343488413A2F586256E6200099638?OpenDocument
    Daniel
    NIG

  • TS3899 "cannot get mail" in iphone5 suddenly. been using iphone to check 2 email accounts for months now, one is gmail and not troubled. the other is thunderbird and i get this error message now. no settings have been changed or anything! ideas?

    hey all, I have been getting the "cannot get mail" error message on my iphone5 suddenly.
    ive been using iphone to check two email accounts for months now, one is gmail and not troubled. the other is mail from thunderbird and i get this error message now saying it is not responding. no settings have been changed or anything, it just suddenly stopped receiving mail on my device as of Tuesday afternoon.
    Does anyone have iny ideas about why? i have yet to update to the new OS7 yet, could that be it?

    'The installer has insufficient privileges to modify this file C:\Program Files (x86)\Common Files\Apple\Apple Application Support\Web kit.resources\inspector\Images\Spinner Inactive Selected.gif.'
    That one's consistent with disk/file damage. The first thing I'd try with that is running a disk check (chkdsk) over your C drive.
    XP instructions in the following document: How to perform disk error checking in Windows XP
    Vista instructions in the following document: Check your hard disk for errors
    Windows 7 instructions in the following document: How to use CHKDSK (Check Disk)
    Select both Automatically fix file system errors and Scan for and attempt recovery of bad sectors, or use chkdsk /r (depending on which way you decide to go about doing this). You'll almost certainly have to schedule the chkdsk to run on startup. The scan should take quite a while ... if it quits after a few minutes or seconds, something's interfering with the scan.
    Does the chkdsk find/repair any damage? If so, can you get an install to go through properly afterwards?

  • "Always Use Selected Format" check box in line items report

    Hi Experts,
    I have an issue in ECC 6.0.
    From the transaction code FBL1N (Vendor Line Items) I am trying to export the report to spreadsheet by selecting the option  List> Export>Spreadsheet  then I have selected "Always Use Selected Format" check box.  But if I execute the same report again I am not getting this option "Always Use Selected Format". Please let me how can we retrieve that option. Is there any possibility to get that option again either functionally or technically. I would like to know all the possible ways to get this option again.
    Please do the needful.

    Hello,
    In one my thread Mr. Frank has replied as follows. I believe he has solved this.
    Hope this may be really helpful.
    The problem with the spreadsheet download is at one point, users have selected their default file type.
    That said, SAPGUI is working as it should. (gui710)
    Question though is how do we reset the values so they get the ?Select Spreadsheet Format? popup again.
    The following steps should be performed :
    - Call transaction SE38, enter program SALV_BS_ADMIN_MAINTAIN, and press F8.
    - Follow the parameters below :
    - Select ?DELETE? on the Actions Group
    - Select ?DETAILED SELECTION? on the General Data :
    - On Client - your number
    - User : <user name>
    -Hit EXECUTE.
    -Press ENTER on the POPUP
    - If there is an entry in the report that will need to be deleted. Also, make sure that the entry you will delete (for the user) has a value of GUI_ALV_XML_VER on field ?Parameter? .
    - Select the line and hit the DELETE icon .
    - Press ?Y? to continue delete. Press ENTER on the popup.
    - Then EXIT all the way out of the program.
    NOTE : When you run program SALV_BS_ADMIN_MAINTAIN, make sure they are out of any program that they are using for download.
    Re: "Always Use Selected Format" check box in line items report
    Regards,
    Ravi
    Edited by: Ravi Sankar Venna on May 15, 2009 2:31 PM

  • Printing checks from payment program F110 with smartforms

    Hi! I am working in ECC 5.0 and I want to print checks from the payment program with a smartform, I created a non standard smartform but when I try to link the smartform with the program by transaction FBZP the available options are SAPScripts only. Is possible to do it?
    Thanks in advance

    Hi! Even I am working in ECC 5.0 and I want to print checks from the payment program with a SAP SCRIPT Form, but the issue is that we hav the standard print program for printing the form and this form is being used by some other custom program....I want to customize the standard print program in the transaction F110 so that It successfully calls that form which is now called by some other program. I've the option of customizing the standard print program as per the program which is calling that Form but I'm not able to understand the flow of either of the print programs. Can anybody guide me here on how to understand the flow of the print and go for the customizing of the standard print program for the payment process?
    Also, the current print program and Form which is being used by some other custom print program is already customized in the transaction FBZP.
    Thanks in advance
    Shamim

  • How to use the AUTHORITY-CHECK in ABAP

    I am a security guy but am trying to understand how the AUTHORITY-CHECK works. I have read the help on it but it doesn't answer to my understanding. I want a check in a report so that no matter what the user selects the program goes out and checks the authorization in the users master record and only displays what he has access to. I am sure this is basic but I am not a programmer.
    Thanks

    Hi Greg,
      Basically a AUTHORITY-CHECK is a programmatic way to check a auth object a user has.  This is only as good as the person writing the code makes is.
    Here is a basic example of how it could work.  Lets say you have auth objects for users that limit them to see company code. User A can see cc 10, User B can see cc 20 and user C can see both.
    In the code the programmer would have to first do the authcheck to see what CC the user has access to.  Then they would have to limit his reporting based on the results of the authority check.  So they might do it by saying SELECT * FROM XYZTAB WHERE COMPANY CODE = AUTHCC
    This is what I think you are looking for.  There are other ways to use the auth check.  You can do a check and end the program with a message if they don't have authorization. 
    If you need more info, let me know
    John

  • How to change the attributes of GUI CONTROLS in my own program.

    hi all,
    i just want to change the attributes of GUI CONTROLS in my own program.
    for example `
    How to set an ICON on my GUI BUTTON in the program?
    so what's the mapping between CONTROL in the SCREEN PAINTER and variable in the program?

    Hi Chao Liu,
    Ya , u first find out the PF-STATUS of the screen and goto that status and now u can modify the ICON u want .
    Finding the GUI status of the screen
    Goto that  TRANSACTION CODE or SCREEN
    On the Standard Menu bar Goto ( Menu path) System --> Status
    Now u get a pop-up System :status in that in SAP Data block u can find GUI Status. Now Double Click on that Status. It takes u to the Status of that screen.
    Now click on the Display --> Change Button on the application tool bar.
    If it is a standard GUI-status then it asks for the ACCESS KEY.
    if it is a custom defined GUI Status  then u can change the status .
    reward if helpful
    raam

Maybe you are looking for

  • PO to SO creation in same client

    Hello Friends!                     Is there any standard configuration by which i can create Purchase order and then against that PO i can create sales order in the same client? i dont want to do it by programs,,,want a standard configuration like ID

  • Having issues with starting Reports Server on RHEL5 after installation

    Hi, I installed Oracle Application Server 10.1.2 on RHEL, ran the patches to move it up to 10.1.2.3. I've also put a couple patches in addition. When I go to my application server console, I noticed everything is started up but my Reports Server. I'v

  • In Design to quit unexpectedly

    Hello. In Design quits each time a warning message appears, for example when I suppress pages, or when I try to export as pdf. It's been so since I reinstalled Creative suite CS5.5 on a new Mac yesterday, with OS X Lion. Thank you for your help.

  • Only plays part of first song.

    i have everything updated and everything but after the first part of a song it goes back to home screan

  • Sned mail problem

    i written simple code to send mail .. when i run it sometime it send me mail but in most cases i am not able to get email my debug info say following Sending mail to [email protected] DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,