Y r there 3 documents being genrated in bdc

I have written code for bdc that works if plant is kf* and allows only non ware house storage locations.
Till then its working fine....
but user asked y r there 3 documents being genrated in bdc???when the consumption is on 1 process order nly
i would like to club all the materials that are listed fora particular order in the same material document.
User also wanted format download facility also.
Please let me know what all the changes to be done

my code is like this, now let me know what are the changes i have to do in detail.
if not  it_data1 is initial.
SELECT *  into table iT_320 FROM  T320
  for all entries in it_data1
where WERKS = it_data1-werks and
           LGORT  = it_data1-lgort.
endif.
  LOOP AT IT_DATA1 .
  read table iT_320 INTO wa_320 with key werks = it_data1-werks
                                          lgort = it_data1-lgort.
if sy-subrc = 0 .
  delete it_data1 index sy-tabix.
  ENDIF.
endloop.
clear : it_data1.
LOOP AT IT_DATA1 .
  DATA LV_DATE(10) TYPE C.
WRITE SY-DATUM TO LV_DATE.
    perform bdc_dynpro      using 'SAPMM07M' '0400'.
perform bdc_field       using 'BDC_CURSOR'
                              'RM07M-WERKS'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'MKPF-BLDAT' LV_DATE  .
perform bdc_field       using 'MKPF-BUDAT' LV_DATE.
perform bdc_field       using 'RM07M-BWARTWA' '261'.
perform bdc_field       using 'RM07M-WERKS' IT_DATA1-WERKS.
perform bdc_dynpro      using 'SAPMM07M' '0421'.
perform bdc_field       using 'BDC_CURSOR'
                              'MSEG-WERKS(03)'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
CLEAR : FLAG1.
W_FLAG = W_FLAG + 1.
CONCATENATE 'MSEG-MATNR' '(' W_FLAG ')' INTO W_MATNR_C.
perform bdc_field       using  W_MATNR_C
                               IT_DATA1-MATNR.
CLEAR : QTY.
QTY = IT_DATA1-ERFMG.
SHIFT  QTY LEFT DELETING LEADING SPACE.
CONCATENATE 'MSEG-ERFMG' '(' W_FLAG ')' INTO W_ERFMG. "QUANTITY
perform bdc_field       using W_ERFMG  QTY.
CONCATENATE 'MSEG-ERFME' '(' W_FLAG ')' INTO W_ERFME. "Batch
perform bdc_field       using W_ERFME IT_DATA1-ERFME.
CONCATENATE 'MSEG-LGORT' '(' W_FLAG ')' INTO W_LGORT. "Batch
perform bdc_field       using W_LGORT IT_DATA1-LGORT.
CONCATENATE 'MSEG-CHARG' '(' W_FLAG ')' INTO W_CHARG. "Batch
perform bdc_field       using W_CHARG
                              IT_DATA1-CHARG.
CONCATENATE 'MSEG-WERKS' '(' W_FLAG ')' INTO W_WERKS. "Batch
perform bdc_field       using W_WERKS
                              IT_DATA1-WERKS.
perform bdc_dynpro      using 'SAPLKACB' '0002'.
perform bdc_field       using 'BDC_OKCODE'
                              '/EENTE'.
perform bdc_field       using 'BDC_CURSOR'
                              'COBL-AUFNR'.
perform bdc_field       using 'COBL-AUFNR' IT_DATA1-AUFNR.
perform bdc_dynpro      using 'SAPLKACB' '0002'.
perform bdc_field       using 'BDC_OKCODE'
                              '/EENTE'.
perform bdc_field       using 'BDC_CURSOR'
                              'COBL-KOSTL'.
perform bdc_dynpro      using 'SAPLKACB' '0002'.
perform bdc_field       using 'BDC_OKCODE'
                              '/EENTE'.
perform bdc_field       using 'BDC_CURSOR'
                              'COBL-KOSTL'.
perform bdc_dynpro      using 'SAPLKACB' '0002'.
perform bdc_field       using 'BDC_OKCODE'
                              '/EENTE'.
perform bdc_field       using 'BDC_CURSOR'
                              'COBL-KOSTL'.
perform bdc_dynpro      using 'SAPMM07M' '0421'.
perform bdc_field       using 'BDC_CURSOR'
                              'MSEG-ERFMG(01)'.
perform bdc_field       using 'BDC_OKCODE'
                              '=BU'.
perform bdc_dynpro      using 'SAPLKACB' '0002'.
perform bdc_field       using 'BDC_OKCODE' '=UPDA'.
CALL TRANSACTION 'MB1A' USING IT_BDCDATA MODE 'A'.
CLEAR: IT_BDCDATA.
    REFRESH: IT_BDCDATA.
ENDLOOP.

Similar Messages

  • Document being distributed no changes not possible and btadminh could not be locked

    Hi All,
    I am getting ERROR: "document being distributed no changes not possible" & WARNING:"BTadminH could not be locked" in CRM WEBUI while trying to edit the order.
    I checked all the BDOCs and smq1, smq2 ,smw01 here are no queues stuck here.
    I also run distribution check FM, whenever i run it will be unlocked and able to edit. but this is not the solution for me because this error and warning getting to every new order (transaction) .
    thanks,
    Vinnu.

    Hi,
    Check the initial status settings, there should not be any distribution lock maintained.
    Award point if it is helpful
    Regards,
    D Singh

  • Content Server - get content of document being checked in

    Hi,
    Is is possible to get the content of the document being checked-in via Java? Assuming I want to have a component which performs some action on the document being checked in, before this document is checked in. Is there some way to read the content of the document?

    Hi Jiri,
    Thanks again for pointing me in the right direction. From what I understand I just need to get the path to the document and then open it via Java. I believe sth like this does the trick:
    String docPath = binder.get("primaryFile:path");
    From my understanding there is this "vault" folder which holds the content server's files, revisions, temp files etc... Using the above code should work ok, but I understood that the CS can be told to save its files into some data base instead of the "vault" folder, in which case the above code won't be useful...
    I assume in this case reading the document is done in some other way...
    So, should I conclude that there is no general/abstract way of reading the document being checked-in which doesn't take into consideration the underlying structure which keeps the CS's files(vault or DB)?
    Thanks,
    V

  • Problem with multiple versions of documents being published with 001, 002, etc.

    I am using Contribute CS3. I am having a problem with multiple versions of documents being published on the sever with 001, 002, etc in the name. So that I end up with 2 or 3 versions of a document on the server. Does anyone know why / how Contribute  is doing this? Thanks for any help you can give.

    Your Web site administrator will need to update your key to allow you to delete files you are able to edit.

  • Every time I open a document on my Apple Mac a copy is saved to My Documents which I don't want. How do I stop the documents being saved automatically all the time??

    Every time I open a document on my Apple Mac a copy is saved to My Documents which I don't want. How do I stop the documents being saved automatically all the time??

    OS X Lion- About Auto Save and Versions
    You cannot disable this.

  • 1000 folders called (A Document Being Saved By Illustrator) in my trash

    upon restarting my mac, i found a "Recovered Files" folder in the trash. in it were 1000 folders called (A Document Being Saved By Illustrator). all were empty, save one that had two folders w/in it. is this anything to worry about? i'm on 10.10.1 and the most recent version of AI.
    i work in a networked office, used to use smb to connect to the servers, we had many kernel panics. we now use CIFS to connect and that seems better.

    These will occasionally show up when updating a system and repairing a drive in Disk Utility. You can remove it safely if it doesn't contain anything familiar to you.

  • Document being overwritten (ContRep: ASR_DB_01, DocId ****** )

    Hi experts
    By creating a requisition request  (FPM Forms) through MSS in manager e-Recruiting role, get the following message
    Document being overwritten (ContRep: ASR_DB_01, DocId **********)
    (You want to create a document with document ID ********** in content repository ASR_DB_01, but this document already exists)
    The message is a succesfully green icon but is not created the record HRP5125 infotype
    Any help you can provide would be greatly appreciated.
    Thanks.

    I'm using task TS33700034 (method SAVE_FORM_DATA_TO_DB_WD), but the fields from FPM form are not saved in hrp5125 after step APPROVE.

  • Question about document being inaccessible after saving this may be long!

    for some reason when i save a document i am not always able to re-access it. i have a number of documents "saved" to the desktop (i don't know how they got there), i can't delete them ( i don't have
    "sufficient privileges") and when I go to open them to either attach to an e-mail or just re-read they are greyed out! I can no longer download documents from the internet because I don't have enough disk space but I just emptyed the trash bin (whew!) I am EXTREMELY frustrated and am overjoyed that i finally figured out how to get to this forum. please help me!

    Thanks to all of our valued community members for your suggestions.  Adding to what was stated, the upgrading of a phone for says on that same line that did the upgrade under a new two year agreement. The contracts do not swap when doing a phone swap. You can switch phones after the upgrade as desired. The backing up of all the contacts is suggested on both phones. You may want to process the upgrade in the store; whereby they could request and be assisted with doing a phone book transfer on each line. Please make sure your Husband's Mom phone is with you to the store with her phone available, and that you are authorize the upgrade by being an account manger.
    Also giving your Husband's Mom your Fascinate phone, she would need the $29.99 data plan to activate the Fascinate phone on her line. Please inform her before doing the upgrade and the swapping of the phones.
    Thanks,
    edw@vzwsupport

  • Problem in posting multiple documents in FB70 through BDC...

    Hi,
       I am facing a problem while posting multiple documents from a flat file in FB70 thourgh BDC batch input by using session method. However, the session is getting terminated after posting the first document. Please clarify my problem.
    Below is a sample of the data in my flat file -
    Customer,Invoice Date,Posting Date,Amount,G/L Account,Amount in doc. Curr.
    34,03.06.2009,03.06.2009,100,211000,100
    34,03.06.2009,03.06.2009,200,211000,200
    34,03.06.2009,03.06.2009,300,211000,300
    And below is the sample code of my program.
    REPORT ZANI2_BDC_FB70
           NO STANDARD PAGE HEADING LINE-SIZE 255.
    TYPES: BEGIN OF TY_STR_FB70,
             ACCNT(20)      TYPE C,     "Customer
             BLDAT(20)      TYPE C,     "Invoice Date
             BUDAT(20)      TYPE C,     "Posting Date
             WRBTR(20)      TYPE C,     "Basic Data - Amount
             HKONT(20)      TYPE C,     "G/L Account
             ITEM_WRBTR(20) TYPE C,
             "Line Item Amount In Document Currency
           END OF TY_STR_FB70,
          BEGIN OF TY_STR_FILEDATA,
             FIELDS TYPE STRING,
          END OF TY_STR_FILEDATA.
    *   data definition
    *       Batchinputdata of single transaction
    DATA:   BDCDATA LIKE BDCDATA    OCCURS 0 WITH HEADER LINE,
    *       messages of call transaction
            MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    DATA: IT_STR_FILEDATA TYPE STANDARD TABLE OF TY_STR_FILEDATA,
          WA_STR_FILEDATA TYPE TY_STR_FILEDATA,
          IT_STR_FB70 TYPE STANDARD TABLE OF TY_STR_FB70,
          WA_STR_FB70 TYPE TY_STR_FB70,
          G_STR_FILENAME TYPE STRING,
          G_FLG_ERROR TYPE I,
          G_INDEX TYPE I,
          G_STR_INDEX TYPE STRING,
          G_STR_FIELDNAME TYPE STRING.
    SELECTION-SCREEN BEGIN OF BLOCK INPUT.
    PARAMETERS: P_FILE TYPE IBIPPARMS-PATH,
                P_SES  TYPE APQI-GROUPID.
    SELECTION-SCREEN END OF BLOCK INPUT.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          PROGRAM_NAME  = SYST-CPROG
          DYNPRO_NUMBER = SYST-DYNNR
          FIELD_NAME    = 'P_FILE'
        IMPORTING
          FILE_NAME     = P_FILE.
    Continued in the next thread..

    ...Continued from the previous thread.
    PERFORM OPEN_GROUP.
        G_INDEX = 1.  
        LOOP AT IT_STR_FB70 INTO WA_STR_FB70.
           PERFORM BDC_DYNPRO      USING 'SAPMF05A' '1200'.
          PERFORM BDC_FIELD       USING 'RF05A-BUSCS'
                                         'R'.
         "Customer
          PERFORM BDC_FIELD       USING 'INVFO-ACCNT'
                                         WA_STR_FB70-ACCNT.  
          "Invoice Date
          PERFORM BDC_FIELD       USING 'INVFO-BLDAT'
                                        WA_STR_FB70-BLDAT.                               
          "Posting Date
          PERFORM BDC_FIELD       USING 'INVFO-BUDAT'
                                        WA_STR_FB70-BUDAT.                                
         "Basic data - Amount
          PERFORM BDC_FIELD       USING 'INVFO-WRBTR'
                                        WA_STR_FB70-WRBTR.     
          PERFORM BDC_FIELD       USING 'INVFO-WAERS'
                                        'EUR'.
          G_STR_INDEX = G_INDEX.
          IF G_INDEX < 10.
            CONCATENATE '0' G_STR_INDEX INTO G_STR_INDEX.
          ENDIF.
          CONDENSE G_STR_INDEX NO-GAPS.
          CLEAR G_STR_FIELDNAME.
          CONCATENATE  'ACGL_ITEM-WRBTR(' G_STR_INDEX ')' INTO
          G_STR_FIELDNAME.
          PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                        G_STR_FIELDNAME.
                                        "'ACGL_ITEM-WRBTR(01)'.
          "G/L Acct
          CONCATENATE  'ACGL_ITEM-HKONT(' G_STR_INDEX ')' INTO
          G_STR_FIELDNAME.
          PERFORM BDC_FIELD       USING  G_STR_FIELDNAME       
                                         WA_STR_FB70-HKONT.    
            "Amount .
          CONCATENATE  'ACGL_ITEM-WRBTR(' G_STR_INDEX ')' INTO
          G_STR_FIELDNAME.
          PERFORM BDC_FIELD       USING G_STR_FIELDNAME   
                                        WA_STR_FB70-ITEM_WRBTR.
          "PERFORM BDC_DYNPRO      USING 'SAPMF05A' '1200'.
          PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                        '=BU'.
          CLEAR WA_STR_FB70.
        ENDLOOP.
        IF G_FLG_ERROR IS INITIAL.
          PERFORM BDC_TRANSACTION USING 'FB70'.
        ENDIF.
        IF G_FLG_ERROR IS INITIAL.
          PERFORM CLOSE_GROUP.
          MESSAGE 'Session created successfully.' TYPE 'I'.
        ENDIF.
      ENDIF.
    Continued in the next thread..

  • Absurdity of Pages documents being 'too old'

    I understand the need for obsolescence -- whether planned or necessary -- and I'm even willing to buy again new versions of software that were perfectly good the way they were. Progress and all.
    But to have my brand-new, beautiful iMac tell me that my Pages documents from 2011 are 'too old' and can't be read anymore by the iMac's Pages is simply absurd.
    And the solutions offered -- OSX 9.2 users should open the 'too old' documents in Preview and cut-and-paste; or save them in Pages 9 first (although Pages 9 can't be found or downloaded anymore); or buy from a third party vendor a copy of Pages 9!! -- just seem ludicrous and unacceptable workarounds.
    This isn't even treated like a 'known issue.'  At which Cupertino meeting did someone say 'but the new Pages won't recognize old Pages documents,' and someone higher up responded, 'that will be fine.'  Really??
    Again, I understand we don't live in an eight-track world anymore and the roads must roll, but for all the games and gestures, the fact remains that words, text and writing remain fundamental to the computing experience.  To think that long manuscripts, detailed memos, form letters, and all manners of written history on Pages can no longer be accessed because they are 'too old' is completely unacceptable.
    Sadly, programmers too often treat text like an 'object' -- something to be picked up and moved, rather than a living, breathing piece of digital 'code' that can be shaped and reshaped by the writer within the object itself.
    Apple is not the only culprit: The new Microsoft Office can't read Pages either, as this insane format and upgrade war rages on.
    So yes, I know there are ways around this ridiculous situation, but how does it exist to begin with?  How can Apple's Support Forum staff reply with the suggestion we go to Amazon and buy Pages 9 there??
    Yes, upgrading to a new computer or operating system often means discarding older, comfortable programs. (I will miss the older 'Power PC' software, but progress is progress).  But text -- the written word -- is the most basic software that is. How could a new version of Pages not 'recognize' older versions of Pages?
    It is ridiculous and an affront to millions of Apple users who stick with the company -- this is my fifth major Apple computer, not counting our iPads, iPhones and such -- but the trust I've built up with the company has never been so shaken.  How could this not be fixed, or even recognized as a problem?
    david

    How can Apple's Support Forum staff reply with the suggestion
    Did you contact Apple support directly? Just as an FYI, these forums are user to user only - we're just fellow users volunteering our time here.
    As for Pages: when I installed the new Pages version, my older version remained intact. I have two separate versions installed; I found that the default was to open anything with the new version which I changed in the Ger Info window (back to the old one). I also found that the new version lacks several functionalities, so I am ignoring it. I will keep using the older version. Unfortunately, if you have a brand new Mac, you do not have the older version installed - how about using your iWork install DVD from your previous Mac to install the older version?

  • Can a document being protected from editing in a Sharepoint document library?

    Hi everyone,
    I have a document library in Sharepoint 2010 where users may upload documents.
    The goal is that users may see the documents but not edit them.
    How can i get the doc library so that users may upload documents, but can't edit any of the documents?
    Is there a way out of the box?
    Kind regards.
    Wim

    Applying information rights management might help you achieve this. Have a look at the following link
    Apply Information Rights Management to a list or library
    Thanks & Regards
    ShivaPrasad Pola
    SharePoint Developer 

  • Urgent:Documents being deleted in the Casemanagement

    Hello all,
      when any end user reports a case along with the attachment in a word or the excel sheet for the reference to the Case, these documents are being deleted(All by themselves without anybody doing it) within a span of 2-3 days.
    Please suggest as this is urgent and important.
    Regards,
    Ravi

    Hi rishabh,
    In  ekpo table,
    enter the Po containing both deleted and non deleted items,
    see the LOEKZ  Field in that you can field the difference ( one will be blank and other will be filled with 'X').
    in Program.
    after getting values from internal table
    sort itab by loekz.
    delete itab where LOEKZ EQ 'X' ( deleted po entries content in the ekpo  table)
    Regards,
    Venkat.

  • Images cut from Microsoft Word document being picked up in the file size by Acrobat distiller

    Hello All;
    I have a large MS Word document (book manuscript) with almost 400 images (all grayscale) and found that the tiff images needed to be replaced with jpegs to reduce the file size. I created the jpegs, cut the tiff images from the document, and inserted the replacement jpeg image for each tiff image cut. It reduce the file size in Word from 595 Mb to 210Mb. However, when I ran the distiller, it is somehow picking up the file sizes of the tiff files as it still gives roughly the same output (595 Mb) for the Acrobat document. Is there a way I strip out the tiff image overhead from the pdf or a way I can cleanse it from the MS Word document? Thanks in advance.

    Acrobat automatically compresses images when a PDF is made, usually doing something equivalent to JPEG (it's your choice, check the creation options).
    So, changing from TIFF to JPEG in the original file will usually make not a bit of difference to the original file size. 
    There is no simple 1 to 1 connection between the size of a Word document and a PDF. Some things are bigger, some are smaller.
    You can experiment with Save as ... optimized PDF settings. Also, use Audit Space Usage in that dialog to see what is using the space.

  • Scanned document being saved at large size...

    I am scanning a normal 8.5 X 11 in document into a pdf.  But when I open the document it looks normal till I notice the visible percentage window value, it says 22.7% and its set to 'Fit Visible'.  It seems to be saving it at the size of '35.42 X 48.71' inches.  I guess my questions are:
    Where do I need to look to scan it 'normally'
    and
    Is there a way to re-size a 'gigantic' pdf down to a size of 8.5 X 11 inches?
    Jason

    I would start by looking at the scanner settings directly, not at Acrobat. From the scan screen in Acrobat you should also have a settings tab that might give you further information. You likely have a default set some place that is causing the problem.

  • CS6 free trial ends and stops any pdf document being opened ...

    Brilliant Adobe and thanks for stopping me, a small self-employed business, from being able to work.  I downloaded a free trial of CS6 and it proved unsuitable to my newlsetter needs.  Now it has ended, I cannot open ANY pdf document as it wants me to spend loads of cash on something I don't want.  See you in court Adobe ...

    What has any CS6 product to do with Acrobat/ Adobe Reader? You're making zero sense. Simply uninstall the CS6 products and reinstall Adobe Reader or your previous versions of whatever you used. Run the Creative Suite Cleaner Tool and Acrobat Cleaner Tool if need be. And to be blunt: Forget that "court" comment. Read the EULA for the conditions under which the software is provided "as is".
    Mylenium

Maybe you are looking for