Trouble while retrieving last material entry per invoice

Hello experts,
I am having a big trouble to select invoices (FI tables J_1BNFDOC & J_1BNFLIN) related to the most recent entry of a given material number inside another invoice (J_1BNFLIN-MATNR). My report is dumping with a memory overflow when I execute it for a full month's worth of invoices.
Basically, I'm doing the following:
1. Selecting invoice items with an INNER JOIN to also get header information:
SELECT lmatnr ldocnum lmenge lnetpr lnetoth ddocdat dmodel dseries dnfnum dparid
INTO TABLE it_ult_e_aux
FROM j_1bnflin AS l
INNER JOIN j_1bnfdoc AS d
ON ldocnum = ddocnum
FOR ALL ENTRIES IN it_ult_e
WHERE l~matnr  = it_ult_e-matnr
AND d~doctyp = '1'
AND d~direct = '1'
AND d~docdat > '20030101'
AND d~cancel = ' '.
In this case, IT_ULT_E and IT_ULT_E_AUX have both the same structure, and IT_ULT_E is already populated with all the MATNRs I want to search. The structure for both tables is as follows:
TYPES: BEGIN OF ty_ult_e,
         matnr  LIKE j_1bnflin-matnr,
         docnum LIKE j_1bnflin-docnum,
         menge  LIKE j_1bnflin-menge,
         netpr  LIKE j_1bnflin-netpr,
         netoth LIKE j_1bnflin-netoth,
         docdat LIKE j_1bnfdoc-docdat,
         model  LIKE j_1bnfdoc-model,
         series LIKE j_1bnfdoc-series,
         nfnum  LIKE j_1bnfdoc-nfnum,
         parid  LIKE j_1bnfdoc-parid,
END OF ty_ult_e.
2. After this, the table is sorted by DOCDAT to get the most recent entries, some move logic is applied and IT_ULT_E ends up with the information I want.
But then, the report dumps with TSV_TNEW_BLOCKS_NO_ROLL_MEMORY, right on the SELECT statement. Am I doing the best selection? Or maybe I'm missing something (maybe a standard FM...)
Any help is appreciated.
Thanks,
Leonardo

Hi,
This dump is related to memory allocation to internal table.
may be you can try this:
Open cursor with hold l_cursor for
select (ur select) into table itab .
do.
fetch next cursor where (ur clause) PACKAGE SIZE 50000.
if sy-subrc eq 0.
processing here,,
refresh internal table.
else.
exit.
endif.
enddo.

Similar Messages

  • BED is Getting Double in MIGO while creating of RG23D entry

    Hello,
    While we have procuring some material to DEPOT directly from vendor. As per government rule we are maintaining the ZMRP and ZABT condition types in Pricing procedure
    In Pricing procedure
    10 ZMRP Step from 0 to 0
    20 ZABT Step from 10 to 0
    30 Sub total from   10 to 20
    ZED% is calculted from this step "Amount for ED Calculation"
    means the BED is calculted on MRP-38%Abartment charge.
    means BED=ZMRP-ZABT%*14%
    We have assigned Subtotal 5 against the ZED% condition in our pricing
    procedure.We understand that subtotal 5 should not be used for non
    deductible BED as it is used only for Deductible BED.But we are
    procuring the same material in manufacturing plant as well therefore we
    are using Subtotal 5 in the pricing procedure.
    If we use ED setoff tax code then BED is taking correct value from JMO1
    condition
    In DEPOT the ZED% 14% from Pricing procedure and JMO2 from Tax procedure it is adding in MIGO Excise tab  while creating the RG23D  entry .why it is behaving like this
    Please let us know Why it is behaving erraticaly in DEPOT?
    Regards
    Mahesh Naik

    Please check ur setting of maintainexsice defaults.
    BED condition type should be properly maintained.
    regards,
    Sujit

  • Accounting Entries when Invoice Verification takes place before GR

    Hello All,
    I have some difficulty in understanding the accounting entries when Invoice Verification takes place before Goods Receipt.
    The scenario is as below: - (It is taken from one of the SAP documentation - AC530 - Actual Costing & Material Ledger- pg.No.2-8)
    1) Stock of material available u2013 50 units / Value Rs.125 /Moving average price in the material master Rs.2.50 per unit
    2) Invoice receipt takes place before goods receipt u2013 100 pc @ Rs.4.00 pc
    3) System does internal stock coverage check. As per SAP document, the stock shortage is 50 pieces.
    4) So the price difference arise i.e.Rs.100 (How this amount is arrived at? u2013 Not understood)
    5) The price difference of Rs.100 is only partially debited to the material (Rs.50). The rest is posted to price difference account (Rs.50)
    The accounting entry u2013
    GRIR A/c Dr                      300
    Inventory A/c Dr.                 50
    Price Diff. A/c Dr.                50
    To Vendor A/c                   400
    Question u2013
    -     I have not understood how Rs.100 is calculated & on what Moving average price the calculation takes place.
    -     As per the calculation in the document, the moving average price of the opening stock is Rs.2.50.the stock is 50  units. (50*2.50=125)
    -     The Invoice receipt happens at 100 pcs @ Rs.4.00 (100*4=400)
    -     So the new moving average price will be Rs.3.50 (Rs.125 + {100*4=400})=Rs.525. Rs.525/(100+50)pcs = Rs.3.50
    -     So how the price difference & posting to Stock account is calculated in the accounting entry?
    Please help,
    Thanks & Regards,
    Gov

    Hi,
    Check below mentioned thread to understand posting to price difference account..
    Logic of price difference  posting
    you missed one aspect of this and that is PO qty and PO price.
    GR/IR will get debit at IR Qty * PO Price.
    rest all calculations are in the link provided..
    - So the new moving average price will be Rs.3.50 (Rs.125 + {100*4=400})=Rs.525. Rs.525/(100+50)pcs = Rs.3.50
    Moving avg. will be calculated on stock value / qty in stock. new MAP will be stock value = (125 +50) = 175 and stock qty = 50 units so MAP will be 175/50 = 3.5.
    Since, GRN has not been done yet stock value (100*4) will not be there..
    Regards,
    Sayujya

  • Pronlem in LOP while retrieving the employee details

    Hi,
    I am new to HR for ABAP developing,
    I have a Pronlem in a report for LOP (loss of pay) while retrieving the employee details.
    (i.e) while retrieving employee details by individual it shows the correct details.
    But, in the group of 10 employess out of 9 doesn't have the LOP and the 1 is having LOP. While retrieving this it shows all the
    10 members have LOP.  It shows some amount for that 1 person also.
    Kindly i need ur help for the above issues.
    Waiting for ur valuable replies.

    Hi swarna,
             Herewith i attached my code, would u please suggest me wer shud i make changes.
    Rgds,
    Karthik
    START-OF-SELECTION.
      IF P_1 = 'X'.
        W_EXT = '.csv'.
      ELSE.
        W_EXT = 'err.csv'.
        PR_PATH = '/obrm/in/asset/'.
      ENDIF.
      CLEAR:W_PR_FNAME,
            W_STR,
            W_PATH1,
            W_LEN,
            W_F6_TMP.
      CLEAR:WA_MESSTAB,WA_UP_SUCC,WA_FINAL,WA_FILE.
      REFRESH:IT_FINAL, IT_MESSTAB,IT_UP_ERROR,IT_UP_SUCC,ITFILE,ITFILE1 .
      W_GO = 'X'.
      CALL FUNCTION 'SUBST_GET_FILE_LIST'
        EXPORTING
          DIRNAME      = PR_PATH
          FILENM       = '*'
        TABLES
          FILE_LIST    = ITFILE
        EXCEPTIONS
          ACCESS_ERROR = 1
          OTHERS       = 2.
      IF SY-SUBRC <> 0.
        MESSAGE TEXT-102 TYPE C_I.
        EXIT.
      ENDIF.
      LOOP AT ITFILE INTO WA_FILE.
        IF WA_FILE-NAME CS W_EXT.
          APPEND  WA_FILE TO ITFILE1.
          CLEAR WA_FILE.
        ENDIF.
      ENDLOOP.
      LOOP AT ITFILE1 INTO WA_FILE.
        IF SY-TABIX > 1.
          CLEAR IT_FINAL[].
        ENDIF.
        CONCATENATE PR_PATH WA_FILE-NAME INTO W_PR_FNAME.
        OPEN DATASET W_PR_FNAME FOR INPUT IN TEXT MODE ENCODING DEFAULT.
        CLEAR : IT_SOURCE[].
        DO.
          READ DATASET W_PR_FNAME INTO W_STR.
          IF SY-SUBRC NE 0.
            EXIT.
          ENDIF.
          SPLIT W_STR AT ';' INTO
                WA_FINAL-F1
                WA_FINAL-F2
            WA_FINAL-F3.
          CLEAR WA_SOURCE.
          WA_SOURCE-F1 = WA_FINAL-F1.
          WA_SOURCE-F2 = WA_FINAL-F2.
          WA_SOURCE-F3 = WA_FINAL-F3.
          SO_SER-LOW = WA_FINAL-F1.
          SO_SER-SIGN = 'I'.
          SO_SER-OPTION = 'EQ'.
          APPEND SO_SER.
          APPEND WA_SOURCE TO IT_SOURCE.
          APPEND WA_FINAL TO IT_FINAL.
        ENDDO.
        CLOSE DATASET W_PR_FNAME.
        IF IT_FINAL[] IS INITIAL.
          MESSAGE TEXT-E01 TYPE C_I.
          EXIT.
        ENDIF.
        PERFORM MATERIAL_DOCS_GET.
        IF SY-SUBRC NE 0.
          MESSAGE TEXT-M01 TYPE 'S'.
          RETURN.
        ENDIF.
        DELETE IT_MDOCS WHERE BWART = '102'.
        LOOP AT IT_MDOCS INTO WA_MDOCS.
          WA_AMT_SUM-EBELN = WA_MDOCS-EBELN.
          WA_AMT_SUM-SHKZG = WA_MDOCS-SHKZG.
          WA_AMT_SUM-DMBTR = WA_MDOCS-DMBTR.
          COLLECT WA_AMT_SUM INTO IT_AMT_SUM.
        ENDLOOP.
        PERFORM SERIAL_NUMBERS_GET.
        IF IT_SRNO[] IS INITIAL.
          RETURN.
        ENDIF.
      ENDLOOP.
      CALL SCREEN 100.
    END-OF-SELECTION.
      IF PR_TEST NE 'X'.
        PERFORM DISPLAY_LOG.
      ENDIF.
    FORM MATERIAL_DOCS_GET .
      SELECT MATNR
             FROM MARA INTO TABLE IT_MATNR
             WHERE MATKL in ('DTH_STB','DTH_STBSC') AND
                   MTART EQ 'UNBW'    AND
                   LVORM EQ ' '.
      IF IT_MATNR IS NOT INITIAL.
        LOOP AT IT_MATNR INTO WA_MATNR.
          SO_MATNR-SIGN   = 'I'.
          SO_MATNR-OPTION = 'EQ'.
          SO_MATNR-LOW    =  WA_MATNR-MATNR.
          APPEND SO_MATNR.
        ENDLOOP.
      ELSE.
        MESSAGE TEXT-M06 TYPE 'S'.
        RETURN.
      ENDIF.
      SELECT A~OBKNR A~SERNR A~MATNR B~OBKNR B~MBLNR B~MJAHR B~BWART
             FROM OBJK AS A INNER JOIN SER03 AS B ON A~OBKNR = B~OBKNR
             INTO CORRESPONDING FIELDS OF TABLE IT_SER03
             WHERE A~SERNR IN SO_SER AND
                   A~MATNR IN SO_MATNR AND
                   B~BWART IN ('101','102','122') and
                   B~LIEFERANT <> ' '.
      IF IT_SER03 IS NOT INITIAL.
        SELECT MBLNR MJAHR ZEILE EBELN EBELP LFBNR LFBJA LFPOS SJAHR SMBLN SMBLP BWART SHKZG WAERS MENGE MEINS KUNNR
               FROM MSEG INTO CORRESPONDING FIELDS OF TABLE IT_MSEG
               FOR ALL ENTRIES IN IT_SER03
               WHERE MBLNR = IT_SER03-MBLNR       AND
                     MJAHR = IT_SER03-MJAHR       AND
                     BWART IN ('101','102','122') AND
                     MATNR IN SO_MATNR            AND
                     DMBTR > 0 .
      ENDIF.
      IF IT_MSEG IS NOT INITIAL.
        SELECT * FROM ZPOVAL_ASSET INTO CORRESPONDING FIELDS OF TABLE IT_PO
                 FOR ALL ENTRIES IN IT_MSEG
                 WHERE EBELN = IT_MSEG-EBELN.
        SELECT KUNNR REGIO
               FROM KNA1 INTO CORRESPONDING FIELDS OF TABLE IT_KNA1
               FOR ALL ENTRIES IN IT_MSEG
               WHERE KUNNR = IT_MSEG-KUNNR.
      ENDIF.
      DELETE IT_MSEG WHERE EBELN = '6100000124'.
      LOOP AT IT_SER03 INTO WA_SER03.
        WA_MDOCS-SERNR = WA_SER03-SERNR.
        WA_MDOCS-MATNR = WA_SER03-MATNR.
        READ TABLE IT_MSEG INTO WA_MSEG1 WITH KEY MBLNR = WA_SER03-MBLNR.
        IF SY-SUBRC = 0.
          MOVE-CORRESPONDING WA_MSEG1 TO WA_MDOCS.
          READ TABLE IT_PO INTO WA_PO WITH KEY EBELN = WA_MSEG1-EBELN.
          IF SY-SUBRC = 0.
            WA_MDOCS-DMBTR = WA_PO-DMBTR.
          ENDIF.
          READ TABLE IT_KNA1 INTO WA_KNA1 WITH KEY KUNNR = WA_MSEG1-KUNNR.
          IF SY-SUBRC = 0.
            WA_MDOCS-KUNNR = WA_KNA1-KUNNR.
            WA_MDOCS-REGIO = WA_KNA1-REGIO.
          ENDIF.
          APPEND WA_MDOCS TO IT_MDOCS.
        ENDIF.
      ENDLOOP.
      SORT IT_MDOCS BY SERNR MJAHR MBLNR DESCENDING.
      DELETE ADJACENT DUPLICATES FROM IT_MDOCS COMPARING SERNR.
      IF SY-SUBRC EQ 0.
        LOOP AT IT_ZFT_POSTED_MDOCS1 INTO WA_ZFT_POSTED_MDOCS1.
          CONCATENATE TEXT-M09 WA_ZFT_POSTED_MDOCS1-MBLNR TEXT-M10 INTO WA_LOG-MSG SEPARATED BY SPACE.
          WRITE: /5 WA_LOG-MSG.
          DELETE IT_MDOCS WHERE MBLNR EQ WA_ZFT_POSTED_MDOCS1-MBLNR.
        ENDLOOP.
      ENDIF.
      CLEAR WA_LOG.
      REFRESH IT_LOG[].
      IF IT_MDOCS[] IS INITIAL.
        SY-SUBRC = 4.
        RETURN.
      ENDIF.
    *copy material docs for dumping in ZFT_POSTED_ASSET
      IT_ZFT_POSTED_ASSET[] = IT_MDOCS[].
    ENDFORM.                    " material_docs_get
    FORM DISPLAY_LOG .
      IF IT_LOG[] IS INITIAL.
        RETURN.
      ENDIF.
      LOOP AT IT_LOG INTO WA_LOG.
        WRITE: /5 WA_LOG-MSG.
      ENDLOOP.
    ENDFORM.                    " display_log
    FORM SERIAL_NUMBERS_GET.
      DATA: WA_SRNO1 TYPE TY_SRNO.
      SELECT MBLNR MJAHR BUDAT
             FROM MKPF INTO CORRESPONDING FIELDS OF TABLE IT_MKPF
             FOR ALL ENTRIES IN IT_MDOCS
             WHERE MBLNR = IT_MDOCS-MBLNR AND
                   MJAHR = IT_MDOCS-MJAHR.
      LOOP AT IT_MDOCS INTO WA_MDOCS.
        MOVE-CORRESPONDING WA_MDOCS TO WA_SRNO.
        READ TABLE IT_MKPF INTO WA_MKPF WITH KEY MBLNR = WA_MDOCS-MBLNR MJAHR = WA_MDOCS-MJAHR.
        IF SY-SUBRC = 0.
          WA_SRNO-BUDAT = WA_MKPF-BUDAT.
        ENDIF.
        APPEND WA_SRNO TO IT_SRNO.
      ENDLOOP.
      LOOP AT IT_SRNO INTO WA_SRNO WHERE BWART EQ '101'.
        READ TABLE IT_SRNO INTO WA_SRNO1 WITH KEY SERNR = WA_SRNO-SERNR
                                                  BWART = '122'.
        IF SY-SUBRC EQ 0 AND WA_SRNO-MBLNR LT WA_SRNO1-MBLNR.
          DELETE IT_SRNO.
        ENDIF.
      ENDLOOP.
      DELETE IT_SRNO WHERE BWART = '122'.
      DESCRIBE TABLE IT_SRNO LINES W_COUNT.
      SORT IT_MDOCS BY SERNR.
      SORT IT_SRNO BY SERNR.
      SORT IT_FINAL BY F1.
      LOOP AT IT_SRNO.
        READ TABLE IT_MDOCS WITH KEY SERNR = IT_SRNO-SERNR.
        IF SY-SUBRC = 0 .
          IT_SRNO-VALUE = IT_MDOCS-DMBTR.
          IT_SRNO-EBELN = IT_MDOCS-EBELN.
          READ TABLE IT_FINAL WITH KEY F1 = IT_SRNO-SERNR.
          IT_SRNO-CAPDT = IT_FINAL-F2.
          CONCATENATE     IT_FINAL-F26(4) IT_FINAL-F20(2) IT_FINAL-F2+3(2)   INTO IT_SRNO-CAPDT.
          CLEAR KNA1.
          SELECT SINGLE * FROM KNA1 WHERE KUNNR = IT_FINAL-F3.
          IF SY-SUBRC = 0 .
            IT_SRNO-KUNNR = IT_FINAL-F2.
            IT_SRNO-REGIO = KNA1-REGIO.
          ENDIF.
          SELECT SINGLE * FROM ZFT_100_ASSET WHERE SERNR = IT_SRNO-SERNR.
          IF SY-SUBRC = 0.
            IT_SRNO-VALUE = 0 .
          ENDIF.
          MODIFY IT_SRNO.
          MOVE-CORRESPONDING IT_SRNO TO IT_ASSET  .
          IT_ASSET-ASSET_ACT_DT = IT_SRNO-CAPDT.
          CONCATENATE 'A' W_FREENUM2  INTO IT_ASSET-ASSET_ID.
          COLLECT IT_ASSET.
          MOVE-CORRESPONDING IT_ASSET TO IT_ASSET_POST.
          COLLECT IT_ASSET_POST.
        ENDIF.
      ENDLOOP .
      SORT IT_ASSET_POST BY ASSET_ID ASSET_ACT_DT REGIO.
      IF PR_TEST NE 'X'.
        LOOP AT IT_ASSET_POST.
          CLEAR W_FREENUM2.
          SELECT SINGLE * FROM ZFT_STATE_COST WHERE REGIO = IT_ASSET_POST-REGIO AND TYPE  = 'E' .
          IF SY-SUBRC <> 0 .
            MESSAGE X899(FI) WITH 'No cost center for the region'.
          ENDIF.
          CALL FUNCTION 'NUMBER_GET_NEXT'
            EXPORTING
              NR_RANGE_NR             = '01'
              OBJECT                  = C_NRANGE1
            IMPORTING
              NUMBER                  = W_FREENUM2
            EXCEPTIONS
              INTERVAL_NOT_FOUND      = 1
              NUMBER_RANGE_NOT_INTERN = 2
              OBJECT_NOT_FOUND        = 3
              QUANTITY_IS_0           = 4
              QUANTITY_IS_NOT_1       = 5
              INTERVAL_OVERFLOW       = 6
              BUFFER_OVERFLOW         = 7
              OTHERS                  = 8.
          IF SY-SUBRC = 0.
          ENDIF.
          CONCATENATE 'A' W_FREENUM2  INTO IT_ASSET_POST-ASSET_ID.
          IT_ASSET_POST-KOSTL = ZFT_STATE_COST-KOSTL.
          MODIFY IT_ASSET_POST.
        CLEAR ZFT_100_ASSET.
        ENDLOOP.
      ENDIF.
      SORT IT_ASSET_POST BY ASSET_ACT_DT REGIO.
      SORT IT_ASSET BY ASSET_ACT_DT REGIO.
      LOOP AT IT_ASSET.
        READ TABLE IT_ASSET_POST WITH KEY ASSET_ACT_DT =  IT_ASSET-ASSET_ACT_DT REGIO = IT_ASSET-REGIO MATNR = IT_ASSET-MATNR.
        IF SY-SUBRC = 0 .
          IT_ASSET-ASSET_ID =  IT_ASSET_POST-ASSET_ID .
          IF IT_ASSET-VALUE = 0.
            IT_ASSET-TEXT = 'Asset Already Created'.
          ELSE.
          ENDIF.
          MODIFY IT_ASSET.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " serial_numbers_get
    FORM ASSET_CREATE .
      DATA :LW_CNT TYPE I.
      LOOP AT IT_ASSET_POST WHERE VALUE > 0.
        CLEAR: IT_ASSET1[],LW_CNT.
        IT_ASSET1[] = IT_ASSET[].
        DELETE IT_ASSET1 WHERE ASSET_ID <> IT_ASSET_POST-ASSET_ID.
        DESCRIBE TABLE IT_ASSET1 LINES LW_CNT.
        MOVE IT_ASSET_POST-ASSET_ID TO WA_ANLA-ANLN1.
        CALL FUNCTION 'ASSET_EXISTENCE_CHECK'
          EXPORTING
            I_ANLN1          = WA_ANLA-ANLN1
            I_BUKRS          = '5100'
          EXCEPTIONS
            ANLAGE_DEAKTIV   = 1
            ANLAGE_GELOESCHT = 2
            ANLAGE_GESPERRT  = 3
            ANLAGE_NOT_FOUND = 4
            ANLAGE_IST_INVM  = 5
            OTHERS           = 6.
        IF SY-SUBRC EQ 0.
          CONCATENATE TEXT-M02 IT_ASSET_POST-ASSET_ID TEXT-M05 INTO W_MSG SEPARATED BY SPACE.
          WA_LOG-MSG = W_MSG.
          APPEND WA_LOG TO IT_LOG.
          CLEAR: WA_LOG, W_MSG.
          CONTINUE.
        ENDIF.
        IF SY-SUBRC <> 0.
        ENDIF.
        WA_ANLA-BUKRS = '5100'.  "company code
        IF IT_ASSET_POST-MATNR = '000000000030000452'.
          WA_ANLA-ANLKL = '00009021'.  "asset class for STB
        ELSEIF IT_ASSET_POST-MATNR = '000000000030000700'.
          WA_ANLA-ANLKL = '00009033'.  "asset class for HD STB Box
        ENDIF.
        WA_ANLA-ANLN1 = IT_ASSET_POST-ASSET_ID. "wa_srno-sernr.
        CONCATENATE 'STB - ' IT_ASSET_POST-ASSET_ID INTO WA_ANLA-TXT50 SEPARATED BY SPACE.
        WA_ANLA-AKTIV = IT_ASSET_POST-ASSET_ACT_DT.
        WA_ANLZ-KOSTL =  IT_ASSET_POST-KOSTL .                  "'1711121'.
        WA_ANLA-MENGE = LW_CNT.
        WA_ANLA-MEINS = 'EA'.
        CALL FUNCTION 'CREATE_ASSET'
          EXPORTING
            I_ANLA                     = WA_ANLA
      I_ANLV                           =
            I_ANLZ                     = WA_ANLZ
           I_DARK                      = 'X'
           I_NASSETS_FIX               = ' '
           I_CALLED_BY_PURCHASE_ORDER  = ' '
          TABLES
            T_ASSETS                   = IT_ASSETS
         EXCEPTIONS
           MISSING_COMPANY_CODE        = 1
           MISSING_ASSET_CLASS         = 2
           MISSING_ASSET_MAINNUMBER    = 3
           INTERNAL_ERROR              = 4
           OTHERS                      = 5
        IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        IF SY-SUBRC EQ 0.
          COMMIT WORK.
          SELECT SINGLE * FROM ANLB WHERE BUKRS = '5100' AND ANLN1 = WA_ANLA-ANLN1 AND AFASL = 'Z001'.
          IF SY-SUBRC = 0 .
            ANLB-AFABG = '20071201'.
            MODIFY ANLB.
            COMMIT WORK.
          ENDIF.
          SELECT SINGLE * FROM ANLB WHERE BUKRS = '5100' AND ANLN1 = WA_ANLA-ANLN1 AND AFASL = 'IN14'.
          IF SY-SUBRC = 0 .
            ANLB-AFABG = '20071201'.
            MODIFY ANLB.
            COMMIT WORK.
          ENDIF.

  • Material ledger mixed invoices not possible

    Hey Masters !
    I'm a vendor and I have been getting the below error's message every time that I try to submit/upload an invoice via the customer's supplier portal :
    " material ledger mixed invoices not possible "
    Actually , for every purchased item in a PO/Service Order there a SES # (Service Entry Sheet) is generated .So, would anyone kindly advise ?! .
    Respects,
    Fares

    Hello,
    I have got solution.
    While performing MIRO, I had taken items in PO belonging to 2 different plant. For one plant material ledger was activated, and for another plant it was not activated. I have posted 2 different invoices to solve this.
    Thanks
    Ram

  • Error while retrieving a password for credential

    Hi All,
    I am getting following error while deploying ADS application.
    Please help me to resolve it.
    NWDS 04s.
    Adobe Version 7.02
    error:
      com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentRuntimeException: ADS Render Exception occured. Append "sap-wd-errorPdf=true" to the URL and access the application once again. This time you will get an error PDF. Save the error PDF on the file system. This is a helpful attachment in case of an OSS message. com.adobe.ProcessingError: Error while retrieving a password for credential: ReaderRights: java.lang.Exception: Could not retrieve a password for credential: ReaderRights Exception Stack Trace: com.adobe.ProcessingError: Error while retrieving a password for credential: ReaderRights: java.lang.Exception: Could not retrieve a password for credential: ReaderRights at com.adobe.ads.request.UsageRights.execute(UsageRights.java:202) at com.adobe.BaseADSRequest.doWork(BaseADSRequest.java:111) at com.adobe.AdobeDocumentServicesWorker.execute(AdobeDocumentServicesWorker.java:758) at com.adobe.AdobeDocumentServicesEJB.processRequest(AdobeDocumentServicesEJB.java:130) at com.adobe.AdobeDocumentServicesEJB.rpData(AdobeDocumentServicesEJB.java:108) at com.adobe.AdobeDocumentServicesLocalLocalObjectImpl0.rpData(AdobeDocumentServicesLocalLocalObjectImpl0.java:120) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.engine.services.webservices.runtime.EJBImplementationContainer.invokeMethod(EJBImplementationContainer.java:126) at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:157) at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:79) at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:92) at SoapServlet.doPost(SoapServlet.java:51) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325) at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887) at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241) at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92) at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at

    Hi,
    did you provide your credential during the Adobe installation process (as far as I know, you have to install the Adobe Document and not only deploy these).
    You have to provide the credential and enter a password during the process, or it does not work.
    The last info I have is that you get credentials by entering a customer request at SAP, component BC-SRV-FP, but that might have changed...
    Kind regards,
    Carl

  • Error (Short Dump) while posting any Material document

    Hello All Experts,
    I am facing an error (short dump) while doing all material document related transactions (for example MIGO,MB1A etc) . I am getting the below message:-
    Short text of error message:
    Document number 1000 5000000000 2009 was already assigned
    Earlier, I had posted some material documents using the same transactions.
    Kindly help
    Regards,
    Atul

    Hi Atul,
    Please use T-code OMBT to check the number range status of material document. You can click on the 'Intervals' button to check the 'Current number', the last material document number the system was created so far. Try to change the 'Current number' to a number greater than 5000000001, save the change, and post material document again.
    Hope it can solve your issue.
    Cheers

  • Error while cancelling the material document.

    HI,
    while cancellation of material document thru MIGO screen getting error
    Deficit of PU IR quantity 20.000 EA
    Message no. M7021
    Diagnosis
    Shortfall below the specified stock level or quantity amounting to 20.000 EA.
    Diagnosis
    Shortfall below the specified stock level or quantity amounting to 20.000 EA.
    The invoice of material document has been process thru ERS.....so no way we can cancel the invoice.
    waht is  the exact process to cancel this document which furher use ERS for invoice verification.
    thanks.....

    Hi Ayaan,
    You need to set the indicator against the movement type 102 under the following path :
    SPRO>Materials Management>Inventory Management and Physical Inventory>Goods Receipt>For GR-Based IV, Reversal of GR Despite Invoice
    Once set , try reversing the material document . This will work .
    Regards
    Ramesh Ch

  • Budget exceed error while unreleasing the service entry.

    Hi experts,
    My problem is the systm generating budget exceed error while unreleasing the entry sheet in current fiscal year.
    Entry sheet is released in privious fiscal year. User want to reverse this in current year. All budget(actual/commitment) are carryforwarded to current year. While unreleasing the entry sheet, system throwing the budget exceed error. There is suficent budget in current fiscal year.
    Request you to pl suggest what might be the cause of problem.
    Regards
    shrikant

    Hi
    Thanks for reply
    For WBS element A-101.01
    For year 2009
    current budget is  100000
    Distrubutable budget is 100000
    Assigned budget is  100000
    For year 2010
    current budget is  300000
    Distrubutable budget is 300000
    Assigned budget is  200000
    Service PO created in 2009 year for amount 20000/-. Service Entry sheet created  and released in 2009 .Vendor invoice has not be generated. Error budget exceed is raised for year 2009 while reversing the service entry sheet in current posting date.(privious posting period /year closed).

  • Problem while returning Excise material

    Dear Experts,
    While Returning a material through MIGO return Delivery . I am getting th following error.
    "Qty balances are not sufficient in the register".
    Regards,
    Kapil.

    Hello ,
    while returning first time u have used capture and post excise invoice option.
    dats why qty and valu debited from rgisters.
    while cancelling return delivery document,u might not reverse the excise qty and value.
    please check whether 123 movt type (reversal of 122) i updated for exccise.
    check in SPRO -Log gen-tax on goods movt-india - bussiness transaction - incoming excise invoice -specify movt type
    regards,
    sujit

  • Service entry sheet - invoice posted on SES

    Dear all,
    Does anybody knows if it is possible to see on Service entry sheet (SES) level if there was already an invoice (via MIRO) posted on it?
    Either a full or partial invoice?
    I have the tables ESSR, ESLL, ESLH, but I can't seem to find if there was already an invoice posted on a specific SES...
    Many thanks!
    Best regards.

    Venu,
    Thanks!
    Do you have any idea in which tables I can retrieve these values (Settled value/Invoiced qty)?
    Table: ESSR = Service Entry sheet header (contains Package number & SES no)
    Table: ESLL = Service entry line item, but not settled value (contains Package no, not SES no).
    What is the indicator (green, yellow or red light) next to the Settled value in the ME2S report?
    Many thanks!
    Best regards.

  • Activate the FIELD Cost Center while issuing the Material to Order by 261

    Dear All,
    How to activate the FIELD Cost Center while issuing the material againest Order IN MB1A?
    Thanks and regards,
    Satyajit

    Hi all,
    I'm having problems with activating the cost center field too. I've already checked OMBW and OMJJ. For OMJJ, cost center field was required. For OMBW, Cost Center field was Supressed. However, when I checked the Change Logs, no changes were performed since last year. The user who raised this issue had the cost center field activated until December 1, 2008 but now it's deactiavted. So I don't think it's OMBW responsible for this since there was no change since last year.
    Please share your knowledge on this.
    Thanks!

  • An error occurred while retrieving policy for this computer 0x80072F78

    SCCM 2007 SP2 MIXED MODE
    OSD task sequence fails in client machines belongs to a particular MP with error
    "An error occurred while retrieving policy for this computer 0x80072F78'
    when checked MPctrl.log.....don't see anything as problem, below is the log entry
    Successfully performed Management Point availability check against local computer. SMS_MP_CONTROL_MANAGER 1/13/2015 12:41:27 PM 174452 (0x2A974)
    Beginning periodic tasks. SMS_MP_CONTROL_MANAGER 1/13/2015 12:46:09 PM 174452 (0x2A974)
    RetryWINSOperationIfNecessary: No need to retry. Returning. SMS_MP_CONTROL_MANAGER 1/13/2015 12:46:09 PM 174452 (0x2A974)
    RetryDNSPublishingIfNecessary: No need to retry. Returning. SMS_MP_CONTROL_MANAGER 1/13/2015 12:46:09 PM 174452 (0x2A974)
    Completed periodic tasks. SMS_MP_CONTROL_MANAGER 1/13/2015 12:46:09 PM 174452 (0x2A974)
    Call to HttpSendRequestSync succeeded for port 80 with status code 200, text: OK SMS_MP_CONTROL_MANAGER 1/13/2015 12:46:27 PM 174452 (0x2A974)
    Http test request succeeded. SMS_MP_CONTROL_MANAGER 1/13/2015 12:46:27 PM 174452 (0x2A974)
    Successfully performed Management Point availability check against local computer. SMS_MP_CONTROL_MANAGER 1/13/2015 12:46:27 PM 174452 (0x2A974)

    Hi,
    Thank you for the reply, have fixed the issue, the client machine which was getting policy from proxy MP was failing and when checked the proxy MP there was no issue however the issue was with the main MP in primary server, Primary server ran out of
    memory(RAM memory was fully utilized) due to which
    IIS was refused connections request and MP was throwing error:
    Call to HttpSendRequestSync failed for port 80 with an error code.
    Http test request failed, error code is 12030
    For this server we had to increase RAM size but we couldn't hence just as workaround just rebooted the server :), now able to complete the OSD TS....

  • ERROR_NOT_FOUND: there is no credentials associated with the given resource name. + WCF Service while Retrieving WindowsCredentials

    Hi guys,
    I am struck with a problem while retrieving the Windows Credentials from WCF service.
    1. I have used WSHttpBinding.
    2. I have configured the Website and App pool to run under a specific user who is an Administrator for the server.
    3. I have created the windows Credential of Generic type using Credential manager with the same user.
    4. I configured the Website to allow only Anonymous and Windows Authentication in IIS (IIS Version: 8.5).
    5. I tried the same code in the same server by logging into server with same user and debug the service. The service is returning the windows Credential requested.
    6. But i am unable to retrieve the Windows Credentials from the same code when published in IIS in the same server.
    i configure the Security in Server and client as below:
       <bindings>
          <wsHttpBinding>
            <binding name="wsHttpEndpointBinding">
              <security mode="Transport" >
                <transport clientCredentialType="Windows"/>            
              </security>
            </binding>
          </wsHttpBinding>
        </bindings>
    7. I tried to read the error code generated by Credential Manager API from  my code and it returned the below error when i am accessing the deployed service.
    ERROR_NOT_FOUND: there is no credentials associated with the given resource name.
    8. I have also checked this with other environments out side my virtual machine with the same code and config file. All environments it is working fine except my environment. Can any body help me out on this...

    Hi pavan kumar,
        As per this case, I have shared the details below :
    1.where you got stuck & receive error message whether in service side or client side ?
    2.if its in service side, then I suggest you to enable tracing on wcf service for debugging purpose to findout the root cause.
    3.For configure tracing refer here "https://msdn.microsoft.com/en-us/library/ms733025.aspx"
    4.To know about WCF Extensibility – System.Diagnostic Tracing ,then refer the below link
    http://blogs.msdn.com/b/carlosfigueira/archive/2011/08/02/wcf-extensibility-system-diagnostic-tracing.aspx
    5.If its in Client side, Please make sure that the client is in the same or trust domain as service. 

  • Addon disconnected while retrieving huge data using orecordset on client

    Hi,
    My addon is using orecordset to retrieve about 11000 records on client pc and the addon disconnected while processing half way. When I trace the error, it seems like when the server fetches the records back to client pc, the addon disconnected. However, it's run perfectly on the server.
    This addon has another function that fetches a small records using orecordset and it's working fine on the client pc.
    Is there a limitation of using orecordset to fetch huge volume of data?
    Appreciate if anyone could help.
    Regards,
    Cherine

    Hi,
    My sdk is used to do GL Consolidation. What it does is to extract journal entries from other company and do some calculation and store the data in UDT. This sdk is installed on the holding company. I use ocompany.connect to connect to other company and once it is connected I will execute a query to extract the journal entries from this company back to my holding company and store the data in UDT.
    The addon stop half way while retrieving journal entries due to large volume of data.
    The connection to other company is as below:-
    With oSubCompany
            .Server = oCompany.Server
            .CompanyDB = DbName
            .UseTrusted = False
            .UserName = Login
            .Password = Password
            .DbUserName = DBLogin
            .DbPassword = DBPwd
            If SQLVer = "MSSQL2005" Then
                 .DbServerType = SAPbobsCOM.BoDataServerTypes.dst_MSSQL2005
            Else
                 .DbServerType = SAPbobsCOM.BoDataServerTypes.dst_MSSQL
            End If
            If .Connect <> 0 Then
               .GetLastError(ErrCode, ErrMsg)
                Throw New ApplicationException("Failed to connect to Source Company: " )
            End If
    End With
    The query is as below:-
    select j.transid, j.transtype, j1.baseref, j.memo, j.refdate, j.number, n1.seriesname, j1.line_id, j1.account, j1.debit, j1.credit, j1.profitcode, a.acctname, a.formatcode, a.u_acquisition,
    Replace((Case When a.U_ConsolAcct = '*' Then a.FormatCode Else a.U_ConsolAcct End),'-','') As 'ConsolAcct', (Case When a.groupmask < 4 Then 'BS' Else 'PL' End) As 'AcctTyp'
    from OJDT j left join JDT1 j1 on j.transid = j1.transid
    left join nnm1 n1 on n1.objectcode = 30 and n1.series = j.series
    left join oact a on a.acctcode = j1.account
    where j.refdate >= oSubRecordset1.Fields.Item("f_refdate").Value
    and j.refdate <= oSubRecordset1.Fields.Item("t_refdate").Value
    and isnull(a.u_acquisition,'') <> 'Y'"
    oSubRecordset.DoQuery(sQuery)
    I just wander whether is it disconnected due to the connection to other company got disconnected or oRecordset disconnected after sometimes.
    For 2005A SP20, do we still use com object? How and where to set the time out value?
    Regards,
    Cherine

Maybe you are looking for

  • Formatting a field in the repetitive area of the Print Layout Design

    Our quantity fields in the repetitive area print out with a decimal point and 3 spaces after the decimal point (i.e. 10.000). How can I change the format of these fields so that there are no decimals included (i.e. 10) when we print an order? Thanks.

  • Problem with printing through SAP

    Hi All, We have problem with printing, only one person through SAP can only print the documents successfully and the remaining are getting incomplete print output. This is happening only for transactions GD23 and FB03 (FI related transactions). We ha

  • How To Compile Several Reports 6i At Once

    Hi Allz I want to know how to convert reports 6i rdf to rep at once not one by one.Plz dont give me any link cause i have viewed alls the solution but unable to understand yet.Moreever plz tell me specifically how will i know coversion is completed a

  • Active Directory and userWorkstations constraint

    Could anybody help me? I need to bind to Active Directory with user that has named workstations which can connect from (userWorkstations attribute). When I try to connect the AD returns the following error even from the workstation listed in the attr

  • Display as Date Picker (DD-MON-YYYY)

    Hi everyone, can you please help me: I want to change an item as Display as Date Picker (DD.MM.YYYY). I cannot find this mask. Can you help me to change or can you tell me, where i could find an example? Tahnk you and best regards Siegwin