Replace 'raise' with message

Hello!
Replace 'raise' with message is the warning which I get. What has to be
done ?
Regards
sas
  CALL FUNCTION '/BMW/STD_IFF_SNR_ZU_AG'
       EXPORTING
            werk       = iff_daten-werk
            sachnummer = iff_daten-sachnummer
            ai         = iff_daten-ai
       IMPORTING
            snr_zu_ag  = ila_iff_snr_ls
       EXCEPTIONS
            not_found  = 1
            OTHERS     = 2.
  IF sy-subrc = 0.
    snr_zu_ag_lf = 'X'.
  ELSE.
    snr_zu_ag_lf = ' '.
  ENDIF.
* Wurde keine Zuordnung gefunden, lesen Kunde aus zfs5zwv_abst
  IF snr_zu_ag_lf = ' '.
    SELECT SINGLE debitor
      FROM /BMW/STD_ZFS5ZWV
      INTO lv_kunnr_lf
     WHERE bmwwerk = iff_daten-werk.
    IF sy-subrc <> 0.
      RAISE kunnr_not_found.
      EXIT.
    ENDIF.
  ELSE.
    lv_kunnr_lf = ila_iff_snr_ls-auftraggeber.
  ENDIF.
  IF lv_kunnr_lf IS INITIAL.
    RAISE kunnr_not_found.
    EXIT.
  ENDIF.

Hi
Based on the Program Create a Message class ZA using SE91 (not for fun module) and
add/create a message 000 with  4 Place holders in it like &&&& and
then write
IF snr_zu_ag_lf = ' '.
    SELECT SINGLE debitor
      FROM /BMW/STD_ZFS5ZWV
      INTO lv_kunnr_lf
     WHERE bmwwerk = iff_daten-werk.
    IF sy-subrc <> 0.
   <b>       message i000(za) with 'Customer Not found'.</b>
      EXIT.
    ENDIF.
  ELSE.
    lv_kunnr_lf = ila_iff_snr_ls-auftraggeber.
  ENDIF.
  IF lv_kunnr_lf IS INITIAL.
    <b>message i000(za) with 'Customer Not found'.</b>
    EXIT.
  ENDIF.
Reward points for useful Answers
Regards
Anji
Message was edited by:
        Anji Reddy Vangala

Similar Messages

  • My 5th gen. ipod died and they replaced it with a new one, but I'm having problems getting the music. An error message says that its not authorized on this computer. The ipod is synced but it wont let me add what music I want.

    My 5th gen ipod died and apple replaced it with a new one. I synced it up to the itunes that I already have on my computer but an error message keeps coming up telling me that its not authorized on this computer. What do I do?

    About iTunes Store authorization and deauthorization
    iPod: Troubleshooting songs and audiobooks that won't play
    iPod does not play content purchased from the iTunes Store

  • Tried to download 16.0.1 but got following message: A newer version named Firfox.app (15.0) already exists in this location. Do you want to replace it with the

    I have a MacBook 10.5.8 OS. I have been getting an auto update notice for updating my current version 15.0 to 16.0.1. Tried to download version16.0.1 from Firefox web but got following message: A newer version named Firfox.app (15.0) already exists in this location. Do you want to replace it with the one you are moving? How can this be if the current version on my mac is 15.0?

    Have you tried just using the built in updater to update firefox? [[Update Firefox to the latest version]]

  • HT4061 How do you change your phone number than is in your iPad and replace it with right one to receive and send messages?

    How do you change your phone number in your iPad messages and replace it with another number. In order to send and receive messages to the correct phone number?

    It's best to use an email address on the iPad.
    Using FaceTime http://support.apple.com/kb/ht4319
    Troubleshooting FaceTime http://support.apple.com/kb/TS3367
    The Complete Guide to FaceTime + iMessage: Setup, Use, and Troubleshooting
    http://tinyurl.com/a7odey8
    Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/TS4268
    iOS: FaceTime is 'Unable to verify email because it is in use'
    http://support.apple.com/kb/TS3510
    Using FaceTime and iMessage behind a firewall
    http://support.apple.com/kb/HT4245
    iOS: About Messages
    http://support.apple.com/kb/HT3529
    Set up iMessage
    http://www.apple.com/ca/ios/messages/
    iOS 6 and OS X Mountain Lion: Link your phone number and Apple ID for use with FaceTime and iMessage
    http://support.apple.com/kb/HT5538
    How to Set Up & Use iMessage on iPhone, iPad, & iPod touch with iOS
    http://osxdaily.com/2011/10/18/set-up-imessage-on-iphone-ipad-ipod-touch-with-io s-5/
    Troubleshooting Messages
    http://support.apple.com/kb/TS2755
    Troubleshooting iMessage Issues: Some Useful Tips You Should Try
    http://www.igeeksblog.com/troubleshooting-imessage-issues/
    Setting Up Multiple iOS Devices for iMessage and Facetime
    http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l
    FaceTime and iMessage not accepting Apple ID password
    http://www.ilounge.com/index.php/articles/comments/facetime-and-imessage-not-acc epting-apple-id-password/
    FaceTime, Game Center, Messages: Troubleshooting sign in issues
    http://support.apple.com/kb/TS3970
    Unable to use FaceTime and iMessage with my apple ID
    https://discussions.apple.com/thread/4649373?tstart=90
    How to Block Someone on FaceTime
    http://www.ehow.com/how_10033185_block-someone-facetime.html
    My Facetime Doesn't Ring
    https://discussions.apple.com/message/19087457
    Send an iMessage as a Text Message Instead with a Quick Tap & Hold
    http://osxdaily.com/2012/11/18/send-imessage-as-text-message/
    To send messages to non-Apple devices, check out the TextFree app https://itunes.apple.com/us/app/text-free-textfree-sms-real/id399355755?mt=8
    How to Send SMS from iPad
    http://www.iskysoft.com/apple-ipad/send-sms-from-ipad.html
    You can check the status of the FaceTime/iMessage servers at this link.
    http://www.apple.com/support/systemstatus/
     Cheers, Tom

  • Raising Customer Messages with SAP OSS on BCS issues

    Hi guys,
    I'd be keen to know everyone's opinion on raising customer messages with SAP OSS, in particular on BCS.
    Often I find that my colleagues are hesitant to raise a note with SAP because they think it either takes too long or they don't get a satisfactory answer.
    Whereas as soon as I see something fishy, that I cannot explain I will check my logic once more, check on SDN, check existing OSS notes, then raise a Customer Message immediately (while I continue to investigate/test).
    This is partly due to my experience that half the time I feel like a guinea pig in BCS, perhaps because BCS is not as widespread as other modules and i may be the first to try something so may be first to experience the problem.
    The first line response (often from Shanghai) usually tries to send the message straight back but I find with a little persistence, clear (and irrefutable) documentation , you soon get through to the experts in Germany (or is it Czech Rep?) who actually understand the issue.
    The client has paid a lot of money for the service through their SAP licensing and maintenance fees, so I have no qualms about 'reporting a product error' when I see one.
    Also, I find a lot of BCS documentation is out of date, not updated as new releases/EHPs come out, eg I recently relied on the contents of OSS note 936590, which was wrong for BCS 604. So I raised a customer message and requested that they update it, which has now been done - this is too late for me but might help someone else.
    Raising a Customer Message with OSS is not an excuse to avoid doing your job, but where there is a genuine error in BCS, I encourage others to raise OSS notes and persis with them until a satisfatcory response is received.

    Concur with TheScotsman.
    The situation is almost the same: the 1st line support (India) very often beat back the costomer message without going deep into the problem. However, if we persist and provide additional details (or when the message was made very professionally and bypassed the 1st line) the message was rerouted to consultants from Czeck Rep.). In this case the progress was significant. Since the client do not provide access to the system, in a couple of times we made a remote session: the support guy gave directions what to do in the system and where to look for some details. The problems were solved in a half an hour.

  • Replace Listbox with Textbox

    Hi ,
    I am facing a problem.Kindly reply me soon if anyone has solution to this problem.I have a form in which previously there was listbox.As the listbox has the "label" and "value" property,such property is not available in textbox.Earlier in my prj the form had listbox So the some value was displayed to user ,but in the backend the value of label was saved.In the Cr which i have got I have to replace the listbox with textbox.Also I have to autopopulate the value in the listbox autopopluated based on primary key value.So if we want to replace it with textbox ,how can we get the solution.I know that the list item can be replaced by 2 textbox ,one for diplaying the value of label and another for the value which would be saved in database.I am able to populate the value of label and the data saved in database.However the problem comes when we query the data to see old record. The data is populated but the value of label is not populated as this record is not saved in database.So without saving the information of label in database.How can we achieve the result as we get in listbox.kinly reply soon.
    thanks

    Not very clear about your problem.
    From where were you populating the list item previously?I think
    its a static list item populated at the design time.
    I am trying to reproduce your scenario.If any mistakes please inform..
    I created a table TT
    sql>desc tt;
    Name Null? Type 
    ID     NUMBER 
    C1     VARCHAR2(10) 
    STATUS     VARCHAR2(1) 
    Here status column can take values 'C','O','N' or Null
    implying 'Open','Closed','Not Available','Unknown' respectively.
    Now in the form, Status field is not displayed.Instead,
    created a 'dummy' field as char(15), which is displayed
    Triggers:
    Post-Query(Block-Level TT):
    :dummy := case :status when 'C' then 'Closed'
                             when 'O' then 'Open'
                  when 'N' then 'Not Available'
                                 else 'Unknown' end;
    Pre-Insert     
    :status := case :dummy when 'Closed' then 'C'
               when 'Open' then 'O'
               when 'Not Available' then 'N'
               else null end;
    You can also Validate th item 'dummy' using when-validate-trigger
    if :dummy is not null and :dummy not in ('Closed','Open','Not Available')  then
         message('Invalid Value');
         raise form_trigger_failure;
    end if;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Middleware problem -Outbound queue is stuck in SAP R/3 system with message

    Hi Middleware gurus ,
    We are stuck with a serious issue . We are trying to download Business partners from SAP R/3 4.6c system to SAP CRM 5.2 system using CRM Middleware
    Previously we did a successful Initial download of 2 Business partners from SAP R/3 to CRM . Their BP numbers in CRM are 001 and 002 . The Delta load is working fine for the both the BPs which are already downloaded
    Now , the real problem is when we are trying to download a new Business partner . When we set the Filter ( BP no 003 ) in MW adaptor object CUSTOMER_MAIN and start the Initial load again , we see that the Outbound queue is getting stuck with message “STOP” .
    There are two queues generated in SAP R/3 system with names “MASS_CRM_CUSTOME” and “R3AD_CUSTOME” . The status for both the queues is “STOP” and when go for details it mentions “sapsuck ..SAPMSSY1 “ -Message no. SR 053.
    Even we checked the txn SMW01, the Bdocs message is "Recived ( Intermediate state) " for Bdoc type BUPA_MAIN.
    We really don’t as to why the Initial load worked fine with 2 BPs  and later when want to do more BP Initial Load the Outbound queue is getting stuck
    Also , by unlocking the 2nd queue “R3AD_CUSTOME” we are able to release it , but the first queue “MASS_CRM_CUSTOME*” is stuck
    Please help us urgently
    Regards
    Dinesh and Ritvij
    Email : [email protected]
    Mobile -+91=9704933315

    Hi Praveen and other Middleware gurus,
    We checked on this . Actually the RFC is used for connecting to SAP R/3 system.
    We also raised an OSS message on this and found a reply that in transaction CRMM_BUPA_MAP, we can map the required BP . But the SAP support guy recived an error received the error:
    An RFC link is not maintained in the Middleware
    Message no. CRM_BUPA_MAPPING051
    We have set the RFC link , but still the problem continues!!!
    Please help further..
    Regards
    Dinesh and Ritvij

  • Required replace BSEG with BSAK BSIK BSIS BSAS for report performance

    Hi Experts
    i m optimizing a report in which data is extracting from BSEG , 5 time so i reduses the performance of report
    so i want replace BSEG with BSAK BSIK BSIS BSAS for the same data what I am getting now . this is report of Purchase of item. code is here.
    REPORT  zmm_pur_reg_kanhe LINE-SIZE 1023.
    *& Des         :Purchase Tax Register Report for KANHE
    *& Created on  :12-07-07
    *& Suggested by:Paresh Saini(MM)
    *& Changes By: Lailu Philip
    *& Changed On: 24.09.2007
    *& Changes: New columns for G/L Code Description,VAT Amt,VAT Perc,CST Perc
    *&                         ,SHCESS Amounts,WCT G/L Acc., WCT Amt,Tax Code
    *&                          for Purchase Order,WCT tax code & Percentage.
    *& Request No:  S6DK921577
    Data Declaration
    *& changes: by Vincy on 12.01.2007
    *& changes: display purchase order with vendor type zpsr(get_zpsr)
    *& Request No:  S6DK930821
    TABLES:ekbe, lfa1, faglflexa.",j_1iexcdtl,lfa1,bkpf,bseg.
    TYPE-POOLS: slis.                                 "ALV Declarations
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
           gd_layout    TYPE slis_layout_alv,
           gd_repid     LIKE sy-repid.
    DATA: it_sortcat   TYPE slis_sortinfo_alv OCCURS 1,
           col_pos LIKE fieldcatalog-col_pos .
    TYPES :BEGIN OF wa1_ekbe,
            belnr         TYPE ekbe-belnr,
            budat         TYPE ekbe-budat,
            menge         TYPE ekbe-menge,
            matnr         TYPE ekbe-matnr,
            ebelp         TYPE j_1iexcdtl-ritem1,
            ebeln         TYPE ekbe-ebeln,
            gjahr         TYPE ekbe-gjahr,
            lfbnr         TYPE ekbe-lfbnr,
            lfpos         TYPE ekbe-lfpos,
            bldat         TYPE ekbe-bldat,
            REEWR         TYPE REEWR,
            END OF wa1_ekbe.
    TYPES :BEGIN OF wa2_ekbe,
            belnr         TYPE ekbe-belnr,
            budat         TYPE ekbe-budat,
            menge         TYPE ekbe-menge,
            ebelp         TYPE ekbe-ebelp,
            ebeln         TYPE ekbe-ebeln,
            gjahr         TYPE ekbe-gjahr,
            lfbnr         TYPE ekbe-lfbnr,
            lfpos         TYPE ekbe-lfpos,
            bldat         TYPE ekbe-bldat,
            REEWR         TYPE REEWR,
            awkey(20)         TYPE c,
            MATNR         TYPE MATNR,
            MWSKZ         TYPE EKBE-MWSKZ,
            END OF wa2_ekbe.
    TYPES :BEGIN OF wa1_j_1iexcdtl,
            exnum         TYPE j_1iexcdtl-exnum,
            exdat         TYPE j_1iexcdtl-exdat,
            lifnr         TYPE j_1iexcdtl-lifnr,
            matnr         TYPE j_1iexcdtl-matnr ,
          maktx         TYPE j_1iexcdtl-maktx ,
          capind      TYPE j_1iexcdtl-capind,
            exbas         TYPE j_1iexcdtl-exbas,
            exbed             TYPE j_1iexcdtl-exbed,
            ecs            TYPE j_1iexcdtl-ecs,
            werks             TYPE j_1iexcdtl-werks,
            ritem1        TYPE j_1iexcdtl-ritem1,
            rdoc1             TYPE j_1iexcdtl-rdoc1,
            docyr         TYPE j_1iexcdtl-docyr,
            bedinv        type J_1IBEDINV,
            ecsinv        type J_1IECSINV,
            EXADDINV1     type J_1IEXADDINV1,
            exaddtax1    TYPE j_1iexcdtl-exaddtax1,
            rdoc2         TYPE j_1iexcdtl-rdoc2,
            ritem2        TYPE j_1iexcdtl-ritem2,
            menge         TYPE j_1iexcdtl-menge,
    ADDED FOR RUDRAPUR ON 08.03.2008 BY ASHOK.CH
    *ENDED ON 08.02.2008
            END OF wa1_j_1iexcdtl.
    TYPES :BEGIN OF wa1_lfa1,
            name1         TYPE lfa1-name1,
            ktokk         TYPE lfa1-ktokk,
            werks         TYPE lfa1-werks,
            lifnr         TYPE lfa1-lifnr,
            END OF wa1_lfa1.
    TYPES :BEGIN OF wa1_ekexclf,
            belnr         TYPE ekbe-belnr,
            budat         TYPE ekbe-budat,
            menge         TYPE ekbe-menge,
            ebelp         TYPE ekbe-ebelp,
            ebeln         TYPE ekbe-ebeln,
            gjahr         TYPE ekbe-gjahr,
            awkey(20)     TYPE c,
            exnum         TYPE j_1iexcdtl-exnum,
            exdat         TYPE j_1iexcdtl-exdat,
            lifnr         TYPE j_1iexcdtl-lifnr,
            matnr         TYPE j_1iexcdtl-matnr ,
          maktx         TYPE j_1iexcdtl-maktx ,
          capind      TYPE j_1iexcdtl-capind,
            exbas         TYPE j_1iexcdtl-exbas,
            exbed             TYPE j_1iexcdtl-exbed,
            ecs            TYPE j_1iexcdtl-ecs,
            werks             TYPE j_1iexcdtl-werks,
            ritem1        TYPE j_1iexcdtl-ritem1,
            rdoc1             TYPE j_1iexcdtl-rdoc1,
            docyr         TYPE j_1iexcdtl-docyr,
            name1         TYPE lfa1-name1,
            ktokk         TYPE lfa1-ktokk,
            exaddtax1     TYPE j_1iexcdtl-exaddtax1,
    added for rudrapur on 08.03.2008 by ASHOK.CH
            bedinv        type J_1IBEDINV,
            ecsinv        type J_1IECSINV,
            EXADDINV1     type J_1IEXADDINV1,
    END OF MODIFICATION ON 08.02.2008
            END OF  wa1_ekexclf.
    TYPES :BEGIN OF wa1_bkpf,
            bukrs TYPE bkpf-bukrs,
            belnr TYPE bkpf-belnr,
            gjahr TYPE bkpf-gjahr,
            budat TYPE bkpf-budat,
            tcode TYPE bkpf-tcode,
            awkey TYPE bkpf-awkey,
            END OF wa1_bkpf.
    TYPES :BEGIN OF wa1_bseg,
            bukrs     TYPE bseg-bukrs,
            belnr     TYPE bseg-belnr,     
            gjahr         TYPE bseg-gjahr,
            buzei     TYPE bseg-buzei,
            bschl     TYPE bseg-bschl,
            fwbas     TYPE bseg-fwbas ,     
            pswbt         TYPE bseg-pswbt,
            hkont         TYPE bseg-hkont,
            wrbtr     TYPE bseg-wrbtr,
            ktosl     TYPE bseg-ktosl,
            koart     TYPE bseg-koart,
            shkzg     TYPE bseg-shkzg,
            mwskz     TYPE bseg-mwskz,
            qsskz     TYPE bsis-qsskz,
            dmbtr     TYPE bseg-dmbtr,
            lifnr     TYPE bseg-lifnr,
            matnr     TYPE bseg-matnr,
            flag      TYPE C,
            flag_21   TYPE C,
            END OF wa1_bseg.
    TYPES :BEGIN OF wa1_tax,
            belnr         TYPE bseg-belnr,
            fi_docno      TYPE bseg-belnr,
            gjahr             TYPE bseg-gjahr,
            bukrs         TYPE bseg-bukrs,
            awkey         TYPE bkpf-awkey,
            fwbas         TYPE bseg-fwbas ,
            cst_amt       TYPE bseg-pswbt,
            vat_amt       TYPE bseg-pswbt,
            shcess_amt    TYPE bseg-pswbt,
            gl_accnt      TYPE bseg-hkont,
            gl_desc       TYPE skat-txt50,
            wctglacc      TYPE bseg-hkont,
            wctamt        TYPE bseg-dmbtr,
            taxcode       TYPE t059z-wt_withcd,
            taxperc       TYPE t059z-qsatz,
            total_value   TYPE bseg-wrbtr,
            set_off       TYPE bseg-wrbtr,
            cond_type     TYPE konv-kschl,
            description(20)   TYPE c,
            service_tax       TYPE bseg-wrbtr,
            service_ecess     TYPE bseg-wrbtr,
            service_shcess     TYPE bseg-wrbtr,      "vincy on 31.01.08
            ebelp         TYPE ekbe-ebelp,           "      on 15.04.08
            flag          TYPE c,
            mwskz     TYPE bseg-mwskz,
            END OF wa1_tax.
    DATA:BEGIN OF itab_skat,
           saknr TYPE skat-saknr,
           spras TYPE skat-spras,
           txt50 TYPE skat-txt50,
           END OF itab_skat.
    DATA: iskat LIKE itab_skat OCCURS 0,
           wa_skat LIKE itab_skat.
    DATA : BEGIN OF zbsis OCCURS 0,
             bukrs TYPE bsis-bukrs,
             hkont TYPE bsis-hkont,
             augdt TYPE bsis-augdt,
             augbl TYPE bsis-augbl,
             zuonr TYPE bsis-zuonr,
             gjahr TYPE bsis-gjahr,
             belnr TYPE bsis-belnr,
             buzei TYPE bsis-buzei,
             budat TYPE bsis-budat,
             qsskz TYPE bsis-qsskz,
            END OF zbsis.
    DATA: BEGIN OF zt059z OCCURS 0,
           land1 TYPE t059z-land1,
           witht TYPE t059z-witht,
           wt_withcd TYPE t059z-wt_withcd,
           qscod TYPE t059z-qscod,
           qsatz TYPE t059z-qsatz,
           hkont TYPE bsis-hkont,
           belnr TYPE bsis-belnr,
           END OF zt059z.
    DATA: BEGIN OF it_faglflexa OCCURS 0,      "added by vincy
          ryear TYPE faglflexa-ryear,
          docnr TYPE faglflexa-docnr,
          rldnr TYPE faglflexa-rldnr,
          rbukrs TYPE faglflexa-rbukrs,
          docln TYPE faglflexa-docln,
          prctr TYPE faglflexa-prctr,
          END OF it_faglflexa.
    Final Table***
    TYPES :BEGIN OF wa1_final,
             belnr         TYPE ekbe-belnr,
             fi_docno      TYPE bseg-belnr,
             budat         TYPE ekbe-budat,
             menge         TYPE ekbe-menge,
             rate          TYPE konv-kbetr,
             ebelp         TYPE ekbe-ebelp,
             ebeln         TYPE ekbe-ebeln,
             mwskz         TYPE bseg-mwskz,
             gjahr         TYPE ekbe-gjahr,
             awkey(20)     TYPE c,
             exnum         TYPE j_1iexcdtl-exnum,
             exdat         TYPE j_1iexcdtl-exdat,
             lifnr         TYPE j_1iexcdtl-lifnr,
             matnr         TYPE j_1iexcdtl-matnr ,
           maktx         TYPE j_1iexcdtl-maktx ,
             capind       TYPE string,
             exbas         TYPE j_1iexcdtl-exbas,
             exbed       TYPE j_1iexcdtl-exbed,
             ecs             TYPE j_1iexcdtl-ecs,
             werks       TYPE j_1iexcdtl-werks,
             ritem1        TYPE j_1iexcdtl-ritem1,
             rdoc1       TYPE j_1iexcdtl-rdoc1,
             docyr         TYPE j_1iexcdtl-docyr,
             name1         TYPE lfa1-name1,
             ktokk         TYPE lfa1-ktokk,
             fwbas         TYPE bseg-fwbas ,
             vat_per       TYPE konv-kbetr,
             vat_amt       TYPE bseg-pswbt,
             cst_per       TYPE konv-kbetr,
             cst_amt       TYPE bseg-pswbt,
             shcess_amt    TYPE bseg-pswbt,
             gl_accnt      TYPE bseg-hkont,
             gl_desc       TYPE skat-txt50,
             wctglacc      TYPE bseg-hkont,
             wctamt        TYPE bseg-dmbtr,
             taxcode       TYPE t059z-wt_withcd,
             taxperc       TYPE t059z-qsatz,
             total_value   TYPE bseg-wrbtr,
             total_value1 TYPE bseg-wrbtr,
             excise_tax    TYPE bseg-wrbtr,
             excise  TYPE bseg-wrbtr,
             set_off       TYPE bseg-wrbtr,
             inventorised  TYPE konv-kawrt,
             cond_type     TYPE konv-kschl,
             cond_type2    TYPE konv-kschl,
             description(20)   TYPE c,
             service_tax       TYPE bseg-wrbtr,
             service_ecess     TYPE bseg-wrbtr,
             service_shcess    TYPE bseg-wrbtr,            "vincy on 31.01.08
            END OF wa1_final.
    DATA :it2_ekbe        TYPE TABLE OF wa1_ekbe WITH HEADER LINE,
           it_ekbe        TYPE TABLE OF wa1_ekbe WITH HEADER LINE,
           it1_ekbe       TYPE TABLE OF wa2_ekbe WITH HEADER LINE WITH KEY ebelp ebeln,
           it_j_1iexcdtl  TYPE TABLE OF wa1_j_1iexcdtl WITH HEADER LINE WITH KEY rdoc1 ritem1,
           it_lfa1        TYPE TABLE OF wa1_lfa1 WITH HEADER LINE WITH KEY lifnr,
           it_lfa2        TYPE TABLE OF wa1_lfa1 WITH HEADER LINE WITH KEY lifnr,
           it_bkpf        TYPE TABLE OF wa1_bkpf WITH HEADER LINE,
           it_bseg        TYPE TABLE OF wa1_bseg WITH HEADER LINE WITH  KEY
                                        bukrs belnr gjahr ktosl shkzg koart,
           it1_bseg        TYPE TABLE OF wa1_bseg WITH HEADER LINE WITH  KEY
                                        bukrs belnr gjahr ktosl shkzg koart,
           it_tax         TYPE TABLE OF wa1_tax WITH HEADER LINE WITH KEY awkey ,
           it_ekexclf     TYPE TABLE OF wa1_ekexclf WITH HEADER LINE,
           it_final       TYPE TABLE OF wa1_final WITH HEADER LINE,
           it_final1      TYPE TABLE OF wa1_final WITH HEADER LINE,         "vincy
           wa_ekbe       TYPE wa1_ekbe,
           wa1_ekbe      TYPE wa2_ekbe,
           wa_j_1iexcdtl TYPE wa1_j_1iexcdtl,
           wa_lfa1       TYPE wa1_lfa1,
           wa_lfa2       TYPE wa1_lfa1,
           wa_bkpf       TYPE wa1_bkpf,
           wa_bseg       TYPE wa1_bseg,
           wa_tax        TYPE wa1_tax,
           wa_ekexclf    TYPE wa1_ekexclf,
           PLANT TYPE WERKS_D,
           wa_final      TYPE wa1_final.
    DATA: it_konv TYPE konv OCCURS 0 WITH HEADER LINE ,
           wa_konv TYPE konv,
           invent TYPE p DECIMALS 4,
           invent1 TYPE konv-kawrt.
    DATA:d1 TYPE konv-kposn,
          d2 TYPE ekbe-ebelp.
    DATA: v_belnr TYPE ekbe-belnr,
           v_gjahr TYPE ekbe-gjahr,
           v_awkey(20) TYPE c,
           idx TYPE sy-tabix.
    **********by vincy on 12.01.07***********
    DATA: BEGIN  OF it_ekko OCCURS 0,
           ebeln LIKE ekko-ebeln,
           bukrs LIKE ekko-bukrs,
           bsart LIKE ekko-bsart,
           lifnr LIKE ekko-lifnr,
           belnr LIKE ekbe-belnr,
           END OF it_ekko.
    DATA: BEGIN  OF it_ekpo OCCURS 0,
           ebeln LIKE ekpo-ebeln,
           ebelp LIKE ekpo-ebelp,
           txz01 LIKE ekpo-txz01,
           END OF it_ekpo.
    DATA: BEGIN  OF it_lfa1v OCCURS 0,
           lifnr LIKE lfa1-lifnr,
           name1 LIKE lfa1-name1,
           END OF it_lfa1v.
    DATA: BEGIN  OF s_prctr OCCURS 0,
           low LIKE faglflexa-prctr,
           END OF s_prctr.
    DATA: it_bsegv TYPE TABLE OF wa1_bseg WITH HEADER LINE.
    DATA: it_konv1 LIKE konv OCCURS 0 WITH HEADER LINE.
    DATA:cnt TYPE i,
          awkey1(250).
    DATA: LIFNR TYPE LIFNR,
          NAME TYPE NAME1_GP,
          MTART TYPE MARA-MTART,
          MAKTX TYPE MAKTX,
          TAX_TOT TYPE KWERT.
    ***********end of changes by vincy ************
    Selection Screen
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS: s_werks1 FOR ekbe-werks,
                     s_budat1 FOR ekbe-budat,
                     s_fiscal FOR  ekbe-gjahr,
                     s_lifnr FOR lfa1-lifnr.
    SELECTION-SCREEN END OF BLOCK b1.
    **"changes being by nahid on 16.04.2008
    PARAMETERS : excel AS CHECKBOX DEFAULT 'X'.
    PARAMETERS: infile LIKE rlgrap-filename.
    DATA : zfile TYPE string.
    **"changes ended by nahid on 16.04.2008
    AT SELECTION-SCREEN.
       IF s_werks1 IS INITIAL.
         MESSAGE 'Please Enter Plant details' TYPE 'E'.
       ENDIF.
       IF s_budat1 IS INITIAL.
         MESSAGE 'Please Enter Posting date' TYPE 'E'.
       ENDIF.
       IF s_fiscal IS INITIAL.
         MESSAGE 'Please Enter Fiscal Year' TYPE 'E'.
       ENDIF.
    *start change by nahid on 16.4.08
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR infile.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
        CHANGING
          file_name     = infile
        EXCEPTIONS
          mask_too_long = 1
          OTHERS        = 2.
    zfile = infile.
    *end change by nahid on 16.4.08
    START-OF-SELECTION.
    plant = s_werks1-low.
    MODIFIED FOR RUDRAPUR BY ASHOK.CH ON 13.03.2008
    IF PLANT NE 'RD01'.
       PERFORM get_data.
       PERFORM get_zpsr.                        "vincy
    ENDIF.
    IF PLANT EQ 'RD01'.
        PERFORM get_data1.
    ENDIF.
    *END OF MODIFICATION ON 13.03.2008
       PERFORM build_fieldcatalog.
       PERFORM build_layout.
       PERFORM display_alv_report.
    *start chng by nahid on 16.4.08
    IF excel = 'X'.
        IF NOT infile IS INITIAL.
          PERFORM excel_data.
        ELSE.
          MESSAGE e000(0) WITH 'Please Enter the File Path'.
        ENDIF.
      ENDIF.
    *end by nahid on 16.4.08
    *&      Form  get_data
    FORM get_data .
       SELECT belnr budat menge matnr ebelp ebeln gjahr lfbnr lfpos bldat  REEWR FROM ekbe INTO
       TABLE it_ekbe
       WHERE werks IN s_werks1 AND
            (bewtp EQ 'Q' OR bewtp EQ 'N')     AND
             bewtp IN ('Q' , 'N') AND                 "added N  by vincy on 6.07.2008
             budat IN s_budat1 AND
             gjahr IN s_fiscal .
       IF sy-subrc = 0.               "for 1st ekbe
         IF it_ekbe[] IS NOT INITIAL.
         SELECT exnum exdat lifnr matnr maktx capind exbas exbed ecs werks
         ritem1 rdoc1 docyr bedinv ecsinv EXADDINV1 exaddtax1  rdoc2 ritem2 menge
                FROM j_1iexcdtl INTO TABLE it_j_1iexcdtl FOR ALL ENTRIES IN it_ekbe
                WHERE rdoc1  = it_ekbe-ebeln
                AND ritem1 =  it_ekbe-ebelp AND
                lifnr IN s_lifnr.
         ENDIF.
           IF it_j_1iexcdtl[] IS NOT INITIAL.
           SELECT name1 ktokk werks lifnr FROM lfa1 INTO
                            TABLE it_lfa1 FOR ALL ENTRIES IN it_j_1iexcdtl
                             WHERE lifnr = it_j_1iexcdtl-lifnr.
          ENDIF.
           LOOP AT it_ekbe INTO wa_ekbe.
             wa1_ekbe-belnr        = wa_ekbe-belnr.
             wa1_ekbe-budat        = wa_ekbe-budat.
             wa1_ekbe-menge        = wa_ekbe-menge.
             wa1_ekbe-ebelp        = wa_ekbe-ebelp.
             wa1_ekbe-ebeln        = wa_ekbe-ebeln.
             wa1_ekbe-gjahr        = wa_ekbe-gjahr.
             wa1_ekbe-matnr        = wa_ekbe-matnr.
             wa1_ekbe-lfbnr        = wa_ekbe-lfbnr.
             wa1_ekbe-lfpos        = wa_ekbe-lfpos.
             wa1_ekbe-bldat        = wa_ekbe-bldat.
             v_belnr = wa_ekbe-belnr.
             v_gjahr = wa_ekbe-gjahr.
             CONCATENATE v_belnr v_gjahr INTO v_awkey.
             wa1_ekbe-awkey        = v_awkey.
             APPEND wa1_ekbe TO it1_ekbe.
             CLEAR :wa_ekbe.
           ENDLOOP.
    ************changes by vincy on 29.05.08 for 'FB08' and 'FB60'**************
           LOOP AT s_werks1.
             IF s_werks1-low = 'KN01'.
                s_prctr-low  = 'MUKNHSTM'.
             ELSEIF
              s_werks1-low = 'NS01'.
                s_prctr-low  = 'MUNSKSTM'.
             ELSEIF
              s_werks1-low = 'RD01'.
                s_prctr-low  = 'MURDPSTM'.
             ENDIF.
             APPEND s_prctr.
           ENDLOOP.
           SELECT bukrs belnr gjahr budat tcode awkey FROM bkpf INTO TABLE it_bkpf
                          WHERE bukrs = 'MU51'    AND
                          gjahr IN s_fiscal       AND
                          budat IN s_budat1       AND
                          ( tcode = 'FB60' OR  tcode = 'FB08' ).
          IF it_bkpf[] IS NOT INITIAL.
          SELECT ryear docnr rldnr rbukrs docln prctr FROM faglflexa INTO TABLE it_faglflexa
          FOR ALL ENTRIES IN it_bkpf WHERE rbukrs = 'MU51'   AND
                                           ryear  = it_bkpf-gjahr AND
                                           docnr  = it_bkpf-belnr.
          ENDIF.
          LOOP AT it_faglflexa.
            READ TABLE s_prctr WITH KEY low = it_faglflexa-prctr.
            IF sy-subrc <> 0.
            DELETE it_faglflexa.
            ENDIF.
            CLEAR: it_faglflexa, s_prctr.
          ENDLOOP.
    **************************end of change*************************************
           IF it1_ekbe[] IS NOT INITIAL.
           SELECT bukrs belnr gjahr budat tcode awkey FROM bkpf APPENDING
           TABLE it_bkpf FOR ALL ENTRIES IN it1_ekbe
                          WHERE bukrs = 'MU51'    AND
                          gjahr IN s_fiscal AND
                          awkey = it1_ekbe-awkey.
           ENDIF.
           IF sy-subrc = 0.       "bkpf
             IF it_bkpf[] IS NOT INITIAL.
             SELECT bukrs belnr gjahr buzei bschl fwbas pswbt hkont wrbtr  ktosl koart shkzg mwskz qsskz dmbtr lifnr matnr
                          FROM bseg INTO TABLE it1_bseg FOR ALL ENTRIES IN it_bkpf
                           WHERE belnr = it_bkpf-belnr AND
                                 gjahr = it_bkpf-gjahr AND
                                 bukrs = it_bkpf-bukrs AND
                                 ( bschl = '21' ) AND
                                 lifnr IN s_lifnr.                      "added 21 for miro cancelation
              IF it1_bseg[] IS NOT INITIAL.
              SELECT bukrs belnr gjahr buzei bschl fwbas pswbt hkont wrbtr  ktosl koart shkzg mwskz qsskz dmbtr lifnr matnr
                          FROM bseg INTO TABLE it_bseg FOR ALL ENTRIES IN it1_bseg
                           WHERE belnr = it1_bseg-belnr AND
                                 gjahr = it1_bseg-gjahr AND                    "changed it_bkpf to it1_bseg
                                 bukrs = it1_bseg-bukrs .
              LOOP AT it_bseg.
              it_bseg-wrbtr = it_bseg-wrbtr * -1.
              it_bseg-fwbas = it_bseg-fwbas * -1.
              it_bseg-pswbt = it_bseg-pswbt * -1.
              it_bseg-flag_21 = 'X'.
              MODIFY it_bseg.
              CLEAR it_bseg.
              ENDLOOP.
             SELECT name1 ktokk werks lifnr FROM lfa1 INTO
             TABLE it_lfa2 FOR ALL ENTRIES IN it1_bseg
                          WHERE lifnr = it1_bseg-lifnr.
             ENDIF.
             REFRESH it1_bseg.
             SELECT bukrs belnr gjahr buzei bschl fwbas pswbt hkont wrbtr  ktosl koart shkzg mwskz qsskz dmbtr lifnr matnr
                          FROM bseg INTO TABLE it1_bseg FOR ALL ENTRIES IN it_bkpf
                           WHERE belnr = it_bkpf-belnr AND
                                 gjahr = it_bkpf-gjahr AND
                                 bukrs = it_bkpf-bukrs AND
                                 ( bschl = '31' ) AND                      "added bschl and lifnr by vincy
                                 lifnr IN s_lifnr.
             IF it1_bseg[] IS NOT INITIAL.
             SELECT name1 ktokk werks lifnr FROM lfa1 APPENDING
             TABLE it_lfa2 FOR ALL ENTRIES IN it1_bseg
                          WHERE lifnr = it1_bseg-lifnr.
             SELECT bukrs belnr gjahr buzei bschl fwbas pswbt hkont wrbtr  ktosl koart shkzg mwskz qsskz dmbtr lifnr matnr
                          FROM bseg APPENDING TABLE it_bseg FOR ALL ENTRIES IN it1_bseg
                           WHERE belnr = it1_bseg-belnr AND
                                 gjahr = it1_bseg-gjahr AND                    "changed it_bkpf to it1_bseg
                                 bukrs = it1_bseg-bukrs AND
                                 bschl <> '35'.                                "added bschl to avoid vendor paymnt
            ENDIF.
            SELECT bukrs belnr gjahr buzei bschl fwbas pswbt hkont wrbtr  ktosl koart shkzg  mwskz qsskz dmbtr lifnr
                          FROM bseg APPENDING CORRESPONDING FIELDS OF TABLE it_bseg
                          FOR ALL ENTRIES IN it_bkpf
                          WHERE belnr = it_bkpf-belnr AND
                          gjahr = it_bkpf-gjahr AND
                          lifnr IN s_lifnr AND
                          bukrs = it_bkpf-bukrs AND qsskz IN ('WI', 'WJ').
            ENDIF.
          ENDIF.
           SORT it_bseg BY belnr buzei.
           IF NOT it_bseg[] IS INITIAL.
             SELECT saknr spras txt50 FROM skat
                              INTO TABLE iskat
                              FOR ALL ENTRIES IN it_bseg
                              WHERE saknr = it_bseg-hkont AND spras = 'EN'.
             SELECT  bukrs hkont augdt augbl zuonr gjahr belnr buzei budat qsskz FROM bsis
                               INTO TABLE zbsis
                               FOR ALL ENTRIES IN it_bseg
                               WHERE bukrs = 'MU51' AND hkont = it_bseg-hkont
                               AND belnr = it_bseg-belnr AND gjahr = s_fiscal
                               AND budat IN s_budat1.
           ENDIF.
           LOOP AT it_bseg.
             READ TABLE zbsis WITH KEY hkont = it_bseg-hkont.
             IF sy-subrc = 0.
               it_bseg-qsskz = zbsis-qsskz.
               MODIFY it_bseg.
             ENDIF.
             CLEAR: it_bseg,zbsis.
           ENDLOOP.
           LOOP AT zt059z.
             LOOP AT it_bseg WHERE qsskz = zt059z-wt_withcd.
               zt059z-hkont = it_bseg-hkont.
               zt059z-belnr = it_bseg-belnr.
               MODIFY zt059z.
               CLEAR: it_bseg,zt059z.
             ENDLOOP.
           ENDLOOP.
           CLEAR: wa_bkpf.
    *******Filling Wa.
          LOOP AT it_bkpf INTO wa_bkpf.                     "changes by vincy on 14.04.2008
            LOOP AT it1_ekbe INTO wa1_ekbe .
            READ TABLE it_bkpf INTO wa_bkpf
            WITH KEY awkey = wa1_ekbe-awkey.
             wa_tax-belnr     =    wa_bkpf-belnr.
             wa_tax-gjahr     =    wa_bkpf-gjahr.     
             wa_tax-bukrs     =    wa_bkpf-bukrs.
             wa_tax-awkey     =    wa_bkpf-awkey.
             wa_tax-ebelp     =    wa1_ekbe-ebelp.
             CLEAR: wa_bseg,wa_skat.
             READ TABLE it_bseg WITH KEY bukrs = wa_bkpf-bukrs
                                         belnr = wa_bkpf-belnr
                                         gjahr = wa_bkpf-gjahr  INTO wa_bseg.
             IF sy-subrc = 0.
               wa_tax-fi_docno  =    wa_bseg-belnr.
               wa_tax-mwskz     =    wa_bseg-mwskz.
             CLEAR: wa_bseg.
             READ TABLE it_bseg WITH KEY bukrs = wa_bkpf-bukrs
                                           belnr = wa_bkpf-belnr
                                           gjahr = wa_bkpf-gjahr
                                           flag = ''
                                           ktosl = 'JP4' INTO wa_bseg.
             IF sy-subrc = 0.
               wa_bseg-flag = 'X'.
               MODIFY it_bseg INDEX sy-tabix FROM wa_bseg.
               wa_tax-gl_accnt    =  wa_bseg-hkont.
               READ TABLE iskat INTO wa_skat WITH KEY saknr = wa_bseg-hkont.
               IF sy-subrc = 0.
                 wa_tax-gl_desc = wa_skat-txt50.
               ENDIF.
               wa_tax-set_off     =  wa_bseg-wrbtr.
               wa_tax-fwbas       =  wa_bseg-fwbas.
               wa_tax-cst_amt     =  wa_bseg-pswbt.
               wa_tax-description = 'CST CG Sett off'.
               wa_tax-cond_type   =  'JVCS'.
             ENDIF.
             READ TABLE it_bseg WITH KEY bukrs = wa_bkpf-bukrs
                                           belnr = wa_bkpf-belnr
                                           gjahr = wa_bkpf-gjahr
                                           flag = ''
                                           ktosl = 'VS1' INTO wa_bseg.
             IF sy-subrc = 0.
               wa_bseg-flag = 'X'.
               MODIFY it_bseg INDEX sy-tabix FROM wa_bseg.
               wa_tax-fwbas       =  wa_bseg-fwbas.
             ENDIF.
             READ TABLE it_bseg WITH KEY bukrs = wa_bkpf-bukrs
                                            belnr = wa_bkpf-belnr
                                            gjahr = wa_bkpf-gjahr
                                            flag = ''
                                            ktosl = 'JP7' INTO wa_bseg.
             IF sy-subrc = 0.
               wa_bseg-flag = 'X'.
               MODIFY it_bseg INDEX sy-tabix FROM wa_bseg.
               wa_tax-gl_accnt    =  wa_bseg-hkont.
               READ TABLE iskat INTO wa_skat WITH KEY saknr = wa_bseg-hkont.
               IF sy-subrc = 0.
                 wa_tax-gl_desc = wa_skat-txt50.
               ENDIF.
               wa_tax-set_off     =  wa_bseg-wrbtr.
               wa_tax-fwbas       =  wa_bseg-fwbas.
               wa_tax-vat_amt     =  wa_bseg-pswbt.
               wa_tax-description = 'VAT CG Sett off'.
               wa_tax-cond_type   =  'JVCD'.
             ENDIF.
             CLEAR wa_bseg.
            READ TABLE it_bseg WITH KEY bukrs = wa_bkpf-bukrs
                                       belnr = wa_bkpf-belnr
                                       gjahr = wa_bkpf-gjahr
                                       flag = ''
                                       ktosl = 'JP5' INTO wa_bseg.
              READ TABLE it_bseg WITH KEY bukrs = wa_bkpf-bukrs
                                        belnr = wa_bkpf-belnr
                                        gjahr = wa_bkpf-gjahr
                                        hkont = '0002868001' INTO     wa_bseg.       "vat changed for V0 tax code
             IF sy-subrc = 0.
               wa_bseg-flag = 'X'.
               MODIFY it_bseg INDEX sy-tabix FROM wa_bseg.
               wa_tax-gl_accnt  =  wa_bseg-hkont.
               READ TABLE iskat INTO wa_skat WITH KEY saknr = wa_bseg-hkont.
               IF sy-subrc = 0.
                 wa_tax-gl_desc = wa_skat-txt50.
               ENDIF.
               wa_tax-vat_amt   =  wa_bseg-pswbt.
               wa_tax-set_off   =  wa_bseg-wrbtr.
               wa_tax-cond_type =  'JVRD'.
               wa_tax-fwbas     =  wa_bseg-fwbas.
               wa_tax-description        = 'VAT RM Set off'.
             ENDIF.
             CLEAR: wa_bseg,wa_skat.
             READ TABLE it_bseg WITH KEY     bukrs = wa_bkpf-bukrs
                                             belnr = wa_bkpf-belnr
                                             gjahr = wa_bkpf-gjahr
                                             shkzg = 'H'
                                             koart = 'K'
                                             INTO     wa_bseg.
             IF sy-subrc = 0.
               wa_tax-total_value =  wa_bseg-wrbtr.
             ENDIF.
          START OF MODIFICATION BY ASHOK.CH ON 08.02.2008
            service_tax
             CLEAR wa_bseg.
             READ TABLE it_bseg WITH KEY bukrs = wa_bkpf-bukrs
                                        belnr = wa_bkpf-belnr
                                        gjahr = wa_bkpf-gjahr
                                        flag = ''
                                        ktosl = 'VS8'  INTO     wa_bseg.
             IF sy-subrc = 0.
               wa_bseg-flag = 'X'.
               MODIFY it_bseg INDEX sy-tabix FROM wa_bseg.
               wa_tax-gl_accnt  =    wa_bseg-hkont.
               READ TABLE iskat INTO wa_skat WITH KEY saknr = wa_bseg-hkont.
               IF sy-subrc = 0.
                 wa_tax-gl_desc = wa_skat-txt50.
               ENDIF.
               wa_tax-service_tax =  wa_bseg-wrbtr.
               wa_tax-description = 'Service Tax'.
               wa_tax-cond_type =  'JSRT'.
             ENDIF.
         service_ecess
             CLEAR: wa_bseg,wa_skat.
             READ TABLE it_bseg WITH KEY bukrs = wa_bkpf-bukrs
                                        belnr = wa_bkpf-belnr
                                        gjahr = wa_bkpf-gjahr
                                        flag = ''
                                        ktosl = 'VS9'  INTO  wa_bseg.
             IF sy-subrc = 0.
               wa_bseg-flag = 'X'.
               MODIFY it_bseg INDEX sy-tabix FROM wa_bseg.
               wa_tax-service_ecess =  wa_bseg-wrbtr.
             ENDIF.
    **********changes by vincy on 31.01.08*********************
        service_shcess
             CLEAR: wa_bseg.
             READ TABLE it_bseg WITH KEY bukrs = wa_bkpf-bukrs
                                        belnr = wa_bkpf-belnr
                                        gjahr = wa_bkpf-gjahr
                                        flag = ''
                                        ktosl = 'VSE'  INTO  wa_bseg.
             IF sy-subrc = 0.
               wa_bseg-flag = 'X'.
               MODIFY it_bseg INDEX sy-tabix FROM wa_bseg.
               wa_tax-service_shcess =  wa_bseg-wrbtr.
             ENDIF.
    *************************end of changes***********************
    END OF MODIFICATION ON 08.02.2008
             APPEND wa_tax TO it_tax.
             ENDIF.
             CLEAR :wa_tax,wa_bseg,wa_bkpf,wa_skat.
           ENDLOOP.
           CLEAR wa1_ekbe.
           LOOP AT it1_ekbe INTO wa1_ekbe.
            READ TABLE it_j_1iexcdtl INTO wa_j_1iexcdtl
                                    WITH KEY  rdoc1  = wa1_ekbe-ebeln
                                    ritem1 = wa1_ekbe-ebelp.
    *New query added by Nilesh
            READ TABLE it_j_1iexcdtl INTO wa_j_1iexcdtl
                                    WITH KEY  rdoc1  = wa1_ekbe-lfbnr
                                    ritem2 = wa1_ekbe-lfpos.
             READ TABLE it_bkpf INTO wa_bkpf
             WITH KEY awkey = wa1_ekbe-awkey.
             IF sy-subrc = 0.
             READ TABLE it_bseg WITH KEY bukrs = wa_bkpf-bukrs
                                        belnr = wa_bkpf-belnr
                                        gjahr = wa_bkpf-gjahr.
              IF sy-subrc = 0.
               wa_ekexclf-belnr  =       wa1_ekbe-belnr.
               wa_ekexclf-budat  =       wa1_ekbe-budat.
               wa_ekexclf-menge  =       wa1_ekbe-menge.
               wa_ekexclf-ebelp  =       wa1_ekbe-ebelp.
               wa_ekexclf-ebeln  =       wa1_ekbe-ebeln.
               wa_ekexclf-gjahr  =       wa1_ekbe-gjahr.
               wa_ekexclf-awkey  =       wa1_ekbe-awkey.
               wa_ekexclf-lifnr  =       it_bseg-lifnr.
               wa_ekexclf-matnr  =       it_bseg-matnr .
            READ TABLE it_j_1iexcdtl INTO wa_j_1iexcdtl                 "for records for which either rdoc1 or matnr
                                    WITH KEY  rdoc2  = wa1_ekbe-lfbnr   "not maintained in ekbe by vincy on 16.06.08
                                              menge  = wa1_ekbe-menge.
            IF sy-subrc <> 0 .
            READ TABLE it_j_1iexcdtl INTO wa_j_1iexcdtl
                                    WITH KEY  rdoc1  = wa1_ekbe-ebeln
                                              exdat  = wa1_ekbe-bldat
                                              matnr  = wa1_ekbe-matnr
                                              menge  = wa1_ekbe-menge.
            ENDIF.
             READ TABLE it_j_1iexcdtl INTO wa_j_1iexcdtl
                                     WITH KEY  rdoc1  = wa1_ekbe-ebeln
                                               ritem1 = wa1_ekbe-ebelp.
             IF sy-subrc = 0.
              wa_ekexclf-belnr  =       wa1_ekbe-belnr.
              wa_ekexclf-budat  =       wa1_ekbe-budat.
              wa_ekexclf-menge  =       wa1_ekbe-menge.
              wa_ekexclf-ebelp  =       wa1_ekbe-ebelp.
              wa_ekexclf-ebeln  =       wa1_ekbe-ebeln.
              wa_ekexclf-gjahr  =       wa1_ekbe-gjahr.
              wa_ekexclf-awkey  =       wa1_ekbe-awkey.
               wa_ekexclf-exnum  =       wa_j_1iexcdtl-exnum.
               wa_ekexclf-exdat  =       wa_j_1iexcdtl-exdat.
               wa_ekexclf-lifnr  =       wa_j_1iexcdtl-lifnr.
               wa_ekexclf-matnr  =       wa_j_1iexcdtl-matnr .
               wa_ekexclf-maktx  =       wa_j_1iexcdtl-maktx .
               wa_ekexclf-capind =        wa_j_1iexcdtl-capind.
               wa_ekexclf-exbas  =        wa_j_1iexcdtl-exbas.
              wa_ekexclf-exbed  =        wa_j_1iexcdtl-exbed.
              wa_ekexclf-ecs    =        wa_j_1iexcdtl-ecs.
               wa_ekexclf-werks  =        wa_j_1iexcdtl-werks.
               wa_ekexclf-ritem1 =       wa_j_1iexcdtl-ritem1.
               wa_ekexclf-rdoc1  =         wa_j_1iexcdtl-rdoc1.
               wa_ekexclf-docyr  =       wa_j_1iexcdtl-docyr.
              wa_ekexclf-exaddtax1  = wa_j_1iexcdtl-exaddtax1.
               IF it_bseg-flag_21 = 'X'.
               wa_ekexclf-exbas  = wa_ekexclf-exbas * -1.
               ENDIF.
    MODIFIED BY ASHOK.CH ON 08.03.2008
          IF wa_j_1iexcdtl-WERKS NE 'RD01' .
               wa_ekexclf-exbed  =        wa_j_1iexcdtl-exbed.
               wa_ekexclf-ecs    =        wa_j_1iexcdtl-ecs.
               wa_ekexclf-exaddtax1  = wa_j_1iexcdtl-exaddtax1.
               IF it_bseg-flag_21 = 'X'.
                 wa_ekexclf-exbed  =        wa_ekexclf-exbed * -1.
                 wa_ekexclf-ecs    =        wa_ekexclf-ecs * -1.
                 wa_ekexclf-exaddtax1  = wa_ekexclf-exaddtax1 * -1.
               ENDIF.
         ELSE.
               wa_ekexclf-exbed  =        wa_j_1iexcdtl-BEDINV.
               wa_ekexclf-ecs    =        wa_j_1iexcdtl-ecsINV.
               wa_ekexclf-exaddtax1  = wa_j_1iexcdtl-exaddINV1.
         ENDIF.
    END IF MODIFICATION ON 08.03.2008
              APPEND wa_ekexclf TO it_ekexclf.
              CLEAR :wa_lfa1,wa_j_1iexcdtl,wa1_ekbe.
             ENDIF.
               READ TABLE it_lfa2 INTO wa_lfa2
               WITH KEY lifnr = wa_ekexclf-lifnr.
               IF sy-subrc = 0.
                 wa_ekexclf-name1  =        wa_lfa2-name1.
                 wa_ekexclf-ktokk  =        wa_lfa2-ktokk.
               ENDIF.
               APPEND wa_ekexclf TO it_ekexclf.
             ENDIF.
             ENDIF.
               CLEAR :wa_lfa1,wa_j_1iexcdtl,wa1_ekbe,wa_lfa2,wa_ekexclf.
           ENDLOOP.
           CLEAR wa_ekexclf.
           LOOP AT it_ekexclf INTO wa_ekexclf.
             wa_final-belnr     =       wa_ekexclf-belnr.
             wa_final-budat     =       wa_ekexclf-budat.
             wa_final-menge     =       wa_ekexclf-menge.
             wa_final-ebelp     =       wa_ekexclf-ebelp.
             wa_final-ebeln     =       wa_ekexclf-ebeln.
             wa_final-gjahr     =       wa_ekexclf-gjahr.
             wa_final-awkey     =       wa_ekexclf-awkey.
             wa_final-exnum     =       wa_ekexclf-exnum.
             wa_final-exdat     =       wa_ekexclf-exdat.
             wa_final-lifnr     =       wa_ekexclf-lifnr.
             wa_final-matnr     =       wa_ekexclf-matnr .
             wa_final-maktx     =       wa_ekexclf-maktx .
             wa_final-shcess_amt = wa_ekexclf-exaddtax1.
             IF  wa_ekexclf-capind = 'C'.
               wa_final-capind    =  'Consumables'.
             ENDIF.
             IF  wa_ekexclf-capind = 'A'.
               wa_final-capind    =  'Assets'.
             ENDIF.
             IF  wa_ekexclf-capind = 'T'.
               wa_final-capind    =   'Tools'.
             ENDIF.
             IF  wa_ekexclf-capind = ''.
               wa_final-capind    =   'Raw Material'.
             ENDIF.
             IF  wa_ekexclf-capind = 'N'.
               wa_final-capind    =  'Non Cenvatable'.
             ENDIF.
             IF  wa_ekexclf-capind NE 'C' AND wa_ekexclf-capind NE 'A' AND
                 wa_ekexclf-capind NE '' AND wa_ekexclf-capind NE 'N'.
               wa_final-capind    = wa_ekexclf-capind.
             ENDIF.
             wa_final-exbas     =       wa_ekexclf-exbas.
             wa_final-exbed     =       wa_ekexclf-exbed.
             wa_final-ecs       =       wa_ekexclf-ecs.
             wa_final-werks     =       wa_ekexclf-werks.
             wa_final-ritem1    =       wa_ekexclf-ritem1.
             wa_final-rdoc1     =       wa_ekexclf-rdoc1.
             wa_final-docyr     =       wa_ekexclf-docyr.
             wa_final-name1     =       wa_ekexclf-name1.
             wa_final-ktokk     =       wa_ekexclf-ktokk.
             wa_final-excise    =       wa_final-exbas + wa_final-exbed + wa_final-ecs + wa_final-shcess_amt.
             CLEAR :wa_tax.

    Hi ,
    I think you are using the redundant selects to fetch the data from BSEG.
    First select all the data into an internal table based on  bkpf.
    Now you can distribute the data into whatever tables you want using the loop,read-binary search and append statements..
    Loop at it_bseg.
    read it_bseg where
                        xxxxx
                        xxxxx
                        binary search.
    append wa to it2_bseg.
    endloop              
    This avoid several database fetches..
    Thank you..

  • How to raise error message from PAI of oops ALV report

    Hi All,
    I have a requirement to raise error message form editable oops alv . After entering the data and then press SAVE button .
    Please help.
    Thanks in Advance

    HI SK,
    Write a Local class (Event Handeler) to handel the events. In Editable ALV once the user enter a value, CL_GUI_ALV_GRID will raise an event called DATA_CHANGED.
    1. Define and Implement a local class to handle that event.
    In the implementation of this class you need to get data from imported object to an internal table, then compare the same with the ALV output table.
    * Local Class to handler the events raised from the ALV Grid
    CLASS LCL_EVENT_HANDLER DEFINITION.
    PUBLIC SECTION.
    * Method to handel EDIT event, DATA_CHANGED of CL_GUI_ALV_GRID
      METHODS : ON_DATA_CHANGE FOR EVENT DATA_CHANGED OF CL_GUI_ALV_GRID
                           IMPORTING ER_DATA_CHANGED.
    ENDCLASS.
    * Event handler class Implementation
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
      METHOD ON_DATA_CHANGE.
        DATA : LT_MODIFY TYPE LVC_T_MODI,
                   LS_MODIFY TYPE LVC_S_MODI.
    * Copying changed data into intenal table from Object
        LT_MODIFY = ER_DATA_CHANGED->MT_MOD_CELLS.
    * Modifying the ouptut table with the changed values
        IF LT_MODIFY[] IS NOT INITIAL.
              *Compare the ALV Output table with LT_MODIFY
        ENDIF.
      ENDMETHOD.
    ENDCLASS.
    Then raise  a message on required condition in the same method.
    Note: To trigger the above method, you need to set event handler before displaying ALV (before calling method SET_TABLE_FOR_FIRST_DISPLAY)
    * Creating object for the Local event handler class
      CREATE OBJECT GR_HANDLER.
    * Set handler (call method of Event_handler) to handler Edit event
      SET HANDLER GR_HANDLER->ON_DATA_CHANGE FOR  GR_GRID.
    Regards,
    Vijay

  • How can I delete an Apple ID from one device and replace it with a different ID on that same device?

    How can I delete an Apple ID from one device and replace it with a different ID on that same device?

    Tthe brute force method: start with Settings > iCloud and turn off Find My (you will need the password), then change the iCloud ID, then go to the apps such as Messages, FaceTime, etc, and delete the Apple ID and enter the new one.

  • Error 513 while raising the message from satellite system

    Hello All,
    When I try to send message(Service desk) from satellite system, i get following message
    "Because of error 513, no message was creat
    Support Desk System"
    I gusses there is some problem with authorisation.
    please guide how can I fix this issue.
    Regards,
    Shyam.

    Hi Gurus,
    I have assigned customized action profile to SLFN transaction.
    When I try to send message(Service desk) from satellite system, I get following message
    "Because of error 513, no message was created
    Support Desk System"
    But when we check in crm_dno_monitor , the message is created at the backend,but without assigning external number range.
    Whenever I am making any modification in action profile, it is creating the first messgae after restart
    of SAP Solman System, but for next message, Error 513 message is raised and message is created at backend without assigning external number to it
    I think there is some problem in number range or buffer in number range
    Can some one help me in this
    regards
    Swati

  • Hi, I've been trying for days to download Windows support software via Bootcamp assistant, but it always failed with message 'Can't install Windows Support Software because it is not currently available from the Software update server.' Any advice welcome

    Hi,
    I've been trying for days to download Windows support software via Bootcamp assistant but it always fails with message 'Can't install windows software because it is not currently available from the software update server.'
    Anyone else had problems or success with this?
    Thanks in advance.

    9thdoc wrote:
    I'm getting a similar but distinct error message in snow leopard: Download could not continue. "The windows support software is not available" and have no original snow leopard instal disc with me.
    Your issue is completely different. You are running Snow Leopard. There is no download for Windows Support software for Snow Leopard, hence the error you see. Snow Leopard Windows Support software is on the Snow Leopard installation disk.
    You need the Snow Leopard installation disk or a replacement for it.

  • Mac Pro 3,1 - did my hard drive die? And what should I replace it with?

    Hi,
    I inherited my late husband's 2008 Mac Pro (3,1 model) which had 2 x 500GB hard drives in it and 6GB of RAM. I filled the remaining hard drive bays with 1TB drives (I take a lot of video so needed the extra space). The boot drive was partitioned 50/50 in Boot Camp. I've upgraded the RAM to 10GB and I am currently running Lion.
    Today, while doing something as innocuous as scrolling down a web page, the bottom half of my screen went black and the top half began flashing wildly. When it  stopped after several seconds, the mouse would not respond and I could not click on anything. If flashed a bit more, and then I had mouse control back but could not click on anything - web links, applications, finder. After waiting patiently but getting nowhere, I powered the machine down manually, and when I re-started it, it failed to boot. The chime sounded, the apple appeared, and the little revolving wheel, but at the point where the screen would normally go blue then display the desktop, it just went white. The fans spin, but otherwise it's very silent.
    I tested with a second display, got the same issue. I tried booting to recovery mode but it went back to the white screen. I could start in target mode, and there were no issues with flickering screen, so I don't think it's the graphics card. Then I tried browsing to the hard drive over the network, but it wasn't showing on the PC network page, nor could I connect to it via the home theater system, which I can normally do as the streaming app launches on start-up. I am assuming this means the drive has failed? It's the original, and we bought the machine when they were new to the market, so is a good 5 years old. It contains not only the boot drive but my documents, photos, websites, selected videos, all of which are backed up on the Time Capsule, and I was in the process of uploading to cloud backup as well (although not very far along, due to data cap and slow international upload speeds). I had no warning it was about to do this, but then I guess sometimes you don't!
    Assuming I need to replace the drive, would it be worth replacing it with an OWC Mercury Electra 480GB SSD in an Icy Dock sled? Or would that be overkill for such an old machine? Would getting a standard 7200 WD Caviar HDD or similar give me enough of a speed boost? Obviously I am rather enamoured with the idea of a blazing fast SSD but I'd have to import it (not available locally) so I don't want to shell out all that money unless it's really going to make a massive difference.
    Is there anything else I would need to know about using an SSD over a HDD? I assume I would fire it up the normal way - install it, boot from my Snow Leopard install disc (I downloaded Lion from the App Store) format it, clean install SL, then re-update to Lion, then restore my Time Machine backup? Am I likely to experience any weird issues due to it being an SSD? I see talk online of firmware problems and something called TRIM that I don't know anything about. If it's most likely that I can install it and rock on as normal, then I'm pretty keen, but if there's a reasonable probability of it being temperamental, I probably wouldn't be willing to deal with that (and therefore go the HDD route instead). Therefore I am very keen to hear people's opinions and experiences.
    Sorry for the terribly long ramble. The more I have researched this, the more questions it raises! All advice gratefully accepted. Thanks!

    more than likely it is your video card. If it is ATI 2600XT, tell it bye-bye. The card is barely used at all in TDM or Safe Boot Mode. The 2600 and Lion and the issues with that card, even if it seems okay, is not.
    Depending on Windows OS as to how it mounts and sees your Lion HFSX (there is a nice HFSX driver from Paragon, and an NTFS driver for Lion too)
    480GB SSD is overkill for any system unless you are pushing CS6 2-3GB images and then for scratch. All you need for a boot drive is about 100GB.
    If you have an SSD now, then 1) you need to do a full image backup and restore (regularly as maintenance), and 2) TRIM Enabler
    Save Lion and you can always do a clean Lion install w/o going back to SL - but you might want to keep SL (dual boot) and handy if you run into anything you still need that required PowerPC/Rosetta
    FBDIMM RAM dies, Amazon has $32 kits of 4GB. And having all 8 DIMM slots filled improves things. If you need or want to and feel 16GB isn't overkill.
    SSD and issues are always possible. you should not just go along. not without a clone image. And you should have another drive w/ TRIM Enabler so that you can do a repair and "trim" what is needed.
    Clone a system with CCC regularly. Bootable. And can also be used by Setup Assistant.
    Install Lion over a heavily used SL system and there are likely remnants of old things that get in the way and left in there and not removed.

  • Replacement order with vendor

    Hi experts
    I have a question on if SAP supports an replacement order with vendor.
    The scenario is the client could do a return PO with their vendor and then create another replacement order just to exchange the physical goods, there is no cost incurred for the replacement.
    The thing is if we handle such scenario with one return PO + new PO, there would definitely by financial impact as in invoice creation, LIV, etc.
    Therefore, would like to see if there is any SAP best practice / standard functions that we can make use of.
    Thanks and BR
    Dom

    hi,
    Could anyone please tell me why PO with vendor unknown is needed ?
    > Its mostly required when you wanna raise the procurement in any urgency or if the person entering the PO donot have a right to directly send the PO to the vendor or in case the vendor is required to be decided when the PO is being made...
    And what is the difference between PR and PO with vendor unknown ( If vendor is unknown , to whom should we send the PO then ) ?
    > When you save such PO, it is indirectly saved as PR only(internally), so there is no such difference physically....It not send to any of the vendor untill the PO is entered with the required vendor and send and saved as PO...
    What is the process cycle if we use a PO with vendor unknown . I know the process cycle with Vendor known .
    When you make such PO the system will ask you while saving with the tab " Save as PR" or PO with no vendor defined.....you need to click on it and save the PO as PR...
    Regards
    Priyanka.P

  • MacBook pro will not boot up. Blank screen with message File is possibly corrupted. Checksum does not match etc

    MacBook Pro suddenly will not boot up. Blank screen with message File is possibly corrupt. Header checksum does not match, etc

    Hi s.cheslik,
    It seems your MacBook Pro will not boot properly and it displaying an error message. Based on the information you have provided, it appears your MacBook Pro needs to be serviced. The following link should help you get started with the process and has links with additional information on topics such as warranty and service pricing, battery replacement, and express replacement service.
    Apple - Support - Service Answer Center
    Thank you for contributing to Apple Support Communities.
    Take care,
    Bobby_D

Maybe you are looking for

  • CRB Integration: CRM-ISU

    Since there seem to be a new post every day for basic setup of ISU integration with CRM, here is one thread which provides links to the documents in the service marketplace and elsewhere. Most of these documents are directly available at the Utilitie

  • Need help in ALV

    Hi folks, I have a requirement in ALV format where the workcenters should be displayed in the first row.. and the corresponding Procurement & setup should be displayed under that corresponding workcenter.                        WOrk Center           

  • HTML Post method.

    HI Experts, Here my scenario is Proxy to HTTP. My Receiver system need HTML Post method in place of XML file. Normally PI will send the XML but receiver system is expecting HTML POST method. For this i have to do in configuration. Receiver is expecti

  • How to Display Catalog in JSP ?

    Hi All I created one custom catalog but I am unable to display in jsp level. I ran the basic catalog maintenance service in dyn admin. Are there any other Configurations required ? Could anybody provide the solution ASAP . Thanks in Advance, user8729

  • Recommended alternative to truecrypt for containers on Linux?

    I read about truecrypt being abandoned and possible backdoors in the current version. I like to have an encrypted container for private files on my laptop. I do not want to have an entire encrypted partition there. What is a recommended alternative t