How to use 'BAPI_GOODSMVT_CREATE'  for more then one row selected ???

Hi,
I am using bapi , BAPI_GOODSMVT_CREATE  ,  my requirement is that first perform ALV display with check boxes & then user can selsct any number of rows  & then on clicking execute button  this bapi is triggered , now my ques is that  if i am selecting rows one by one & executing , then am able to post data successfully, but if am selecting  more then one row at a time then its giving me error
" exactly one serial no must be selected  (instead of more then two / three ) ."
plz help me .
this is how i am filling data in BAPi & bapi call
FORM FILL_BAPIDATA .
  wa_GOODSMVT_HEADER-PSTNG_DATE = sy-datum.
  wa_GOODSMVT_HEADER-doc_DATE = sy-datum.
  wa_goodsmvt_code-gm_code = c_gmcode.
  LOOP AT it_final INTO wa_final.
    wa_GOODSMVT_ITEM-MOVE_TYPE = c_movtype.                 " '313'.
    wa_GOODSMVT_ITEM-material =  WA_final-MATNR.
    wa_GOODSMVT_ITEM-ENTRY_QNT = wa_final-verme.
    wa_GOODSMVT_ITEM-plant =  WA_final-WERKS.               "'DB10'.
    wa_GOODSMVT_ITEM-STGE_LOC =  WA_final-LGORT.
    wa_GOODSMVT_ITEM-BATCH = WA_final-CHARG.
wa_GOODSMVT_ITEM-BATCH = l_charg.
    append wa_GOODSMVT_ITEM to IT_GOODSMVT_ITEM.
    clear: wa_GOODSMVT_ITEM.
  ENDLOOP.
  LOOP AT it_final INTO wa_final.
    wa_serialnumber-SERIALNO = wa_final-sernr.
    APPEND wa_serialnumber to it_serialnumber.
    CLEAR wa_serialnumber.
  ENDLOOP.
  LOOP AT it_position2 INTO wa_position2.
    wa_serialnumber-MATDOC_ITM = wa_position2-wepos .
    MODIFY it_serialnumber INDEX sy-tabix from wa_serialnumber TRANSPORTING MATDOC_ITM .
  ENDLOOP.,
data: begin of mthead.
        include structure bapi2017_gm_head_ret.
data: end of mthead.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
    EXPORTING
      GOODSMVT_HEADER               = wa_GOODSMVT_HEADER
      GOODSMVT_CODE                 = wa_GOODSMVT_CODE
   IMPORTING
      GOODSMVT_HEADRET              = mthead
    MATERIALDOCUMENT              = w_MATERIALDOCUMENT
    MATDOCUMENTYEAR               = w_MATDOCUMENTYEAR
    TABLES
      GOODSMVT_ITEM                 = IT_GOODSMVT_ITEM
      GOODSMVT_SERIALNUMBER         = IT_SERIALNUMBER
      RETURN                        = IT_RETURN
  GOODSMVT_SERV_PART_DATA       =
  EXTENSIONIN                   =
APPEND w_MATERIALDOCUMENT to it_GOODSMVT1 .
IF sy-subrc = 0 .
  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
*MESSAGE text-016 TYPE 'I'.
PERFORM msg_log  .
ENDIF.

Hi,
Did u check the serial numbers table before calling the BAPI. Might be the case tht same serial number is assigned for all items, in this case the goods movement may be possible with same serial number for all items.
Reagrds,
Aditya
Edited by: aditya on Aug 11, 2009 11:46 AM

Similar Messages

  • How to use LIKE for more than one condition

    I want to get list of usernames starting with A,B, and C....can any one provide the query using LIKE

    You would need to use something more like one of these:
    SELECT username FROM table
    WHERE username LIKE ('AB%') or
          username LIKE ('AC%') or
          username LIKE ('AD%');
    SELECT username FROM table
    WHERE SUBSTR(username, 1, 2) IN ('AB', 'AC', 'AD')
    SELECT username FROM table
    WHERE REGEXP_LIKE (username, '^AB|^AC|^AD')The regexp_like version is only available on 10g or higher.
    John

  • How to create a service call for more then one item

    Hi All,
            How to create a service call for more then one item. i.e. the service call should be logged for more then one item

    As you noticed this is not possible by design.
    Maybe you could have a dummy item for that purpose and register the real items to be handled in a UDT...
    HTH

  • How to create Criterian For more than one table

    Hi,
    I have one problem how to create criteria for more than one table in that using one criteria hot to get the values from database in that more than onetable for getting these values .Please send me the exampke code.
    reagrds,
    raghu

    Hi,
    I don't think its possible to create fieldcatalog for different tables,
    but if you want to do so create a dummy table which has all the fields which you want in fieldcatalog.
    populate the data from different table to that dummy table
    then create fieldcatalog for that table and pass it in the function module...
    Regards,
    Siddarth

  • How to handle bdc for more than one transaction?

    how to handle bdc for more than one transaction?

    Hi srk,
    I am providing you with some references below. Hope this prove to be helpful to you.
    Method 1:
    Use one BDC_OPEN_GROUP
    Multiple BDC_INSERT 
    One BDC_CLOSE_GROUP.
    Call function BDC_OPENGROUP.
    Build BDC data and call lBDC_INSERT for transaction 1
    Build BDC data and call lBDC_INSERT for transaction 2
    Build BDC data and call lBDC_INSERT for transaction 3
    paas the tcodes to bdc_insert.
    call function BDC_CLOSE_GROUP.
    Also check this out:
    Here we need to record 2 transactions (shdb).
    Once completion of the recording. Populate the data into input internal table .
    Loop the internal table and process the 2 transactions
    like
    1. BDC_OPEN_GROUP
    2. LOOP AT ITAB
    a. Populate first transaction recording data
    and pass transaction to the BDC_INSERT_GROUP.
    BDC_INSERT_GROUP.
    b. Populate second transaction recording data
    and pass transaction to the BDC_INSERT_GROUP.
    BDC_INSERT_GROUP.
    ENDLOOP.
    3. BDC_CLOSE_GROUP
    the above info can be found at : How to use 2 transactions in BDC?
    Also check this out:
    Suppose u have created recordings for transactions 'MM01' 'XK01' and 'VA01'.
    Then do this:
    bdc_open_group.
    after this we have to fill the bdcdata structure for one transaction.here 'MM01'.
    bdc_insert.
    refresh bdcdata.
    after this we have to fill the bdcdata structure for one transaction.here 'xk01'.
    bdc_insert .
    refresh bdcdata.
    after this we have to fill the bdcdata structure for one transaction.here 'va01'.
    bdc_insert.
    bdc_close_group.
    Hope these are useful to you.
    Please reward if any of the above are useful.
    Regards,
    Kalyan

  • Printing salesinvoices, is it possible to do it for more then one invoice?

    Is there a method to use VF03 with a selection for more then one sales invoices?
    I want to print them as pdf file, so I have to fill in the field billingdocument, but I need it for more then one invoice at the same time.
    I tried but it seems not to work. Is it not possible? Or is there another solution to print more then one invoices at the same time?

    Hi,
    check in the Commnication method of your Output type whether In the NUMBER OF MESSAGES field was maintained as 4
    No of messages field will control the Number of invocies to print
    check this and revert
    thanks
    santosh

  • How can I see if my program is for more than one user? We think we have bought in design for more users, but can not find out how to get in for more than one?

    How can I see if my program is for more than one user? We think we have bought in design for more users, but can not find out how to get in for more than one?

    If you bought a CC for team, you can log in at http://adobe.com and insert the e-mail that you gave at the moment at the purchase and than you can manage and see you product/plan/team.
    If I was not clear you can use the following link to help you solving your issue:
    Creative Cloud Help | Manage your Creative Cloud for teams membership
    If your not clear about this situation, contact with an agent of Adobe, by chat or phone. Use the following link to see the type of support you have on this matter:
    http://adobe.com/getsupport
    I think this will help you.
    Regards

  • Purchase, licensing, payment Why after i paid $150 for the product do i have to buy a serial number to use lightroom for more then 30 days?

    Purchase, licensing, payment Why after i paid $150 for the product do i have to buy a serial number to use lightroom for more then 30 days? Why doesn't a serial number come with my online purchase? should people have to register a product they bought from the same website? why wouldn't this all be tied together with your purchase? total headache.... also i downloaded the free trial for 30 days and when my trial was up i went to buy the product and found it nearly impossible to find without joining something that has a monthly fee. Is this the standard for buying things online these days?

    When you purchased Lightroom you should have received an e-mail with your serial number. Better go back and check your e-mails that you received from Adobe. I think one of them should be a receipt, and should have the serial number printed on it.

  • Is it possible to retrieve report for more then one record at Bi Pub

    is it possible to retrieve report for more then one record at a time using BI Publisher on siebel Application

    Hi Sudhir,
    We have tried this.
    I think currently you can query for records you want on UI and run report , then you can see the result set of query in report.
    But i think in future releases of BIP the feature to run a report for selected & Multiple Selected records will be provided.
    Thanks,
    Vamsi

  • How do people register for more than one person on a form?

    We had a lot of complaints last year from organizations who sent several employees to our training.  It took a long time for them to process these one at a time.  How do people register for more than one person on a form?

    Hi thearcca,
    This entirely depends on the form you create, you can add multiple choice button and ask for the no. of employees the organization wants to register.
    Also, you can add corresponding text field for the names.
    Thanks,
    Vikrantt Singh

  • How can I talk with more then one person at a time?

    How can I talk with more then one person at a time? With Faxe time? Is thier software needed to do this or can it be done with the basic package?

    You can get the drop down list by either right-clicking on the back/forward buttons, or holding down the left button until the list appears.
    If you want the drop-down arrow you can add it with the Back/forward dropmarker add-on - https://addons.mozilla.org/firefox/addon/backforward-dropmarker

  • Select more then one row in value help (multi selecting)

    Hi Everybody,
    how is it possible to configure a value help, so that the user can choose more then one row?
    regards
    Sid
    Edited by: sid_mopo on Mar 6, 2009 11:54 AM

    Hi Lekha,
    i have a textedit UI-Field with a value help on it. After clicking on the value help there appears a value help table. At this point the user shold have the possibility to choose/mark more then one row. How can i give the user the possibilty to choose more then one row.
    At this time only one row can be selected by a user.
    regards,
    Sid

  • How to make changes in more then one file

    Hi All,
    M new and dont have deep idea about dreamwheaver.Actually i want to make changes in more then one file at the same time, how to do this. Is there any option available there. ?

    If you you build your new site with SSIs (server-side includes), changes to include files will populate to all pages on the remote server.  This is a huge time saver for maintaining common page elements on large sites.
    Example code might look like this:
    <body>
    header goes here
    <!--#include virtual="header.html"-->
    <p>some text</p>
    menu goes here
    <!--#include virtual="menu.html"-->
    <p>some text</p>
    footer goes here
    <!--#include virtual="footer.html"-->
    </body>
    </html>
    Pages with includes on them need to be saved as .shtm or .shtml.  If you use server-side scripts on your site, save as .asp or .php to match your script type.
    http://www.smartwebby.com/web_site_design/server_side_includes.asp
    Nancy O.

  • Is there a way to Search (List search) for more then one field text from a column for Bulk uploading?

    I've been trying to find more information on this and I apologies if this has already been answered. I just don't know the correct way to ask this. We have a SharePoint List at the company that we have people input information into different columns. The
    problem is most of those information are very repetitive. Is there a way for me to search more then one field text in the column and just input that same information in?
    ex:
    Column 1
    Column 2
    Date:
    883851
    MidWest
    User input 
    8831518
    MidWest
    User input
    On the search field in the SharePoint List, I would need to search for 883851, 8831518 etc,  would view those requested numbers, then I would click edit and change dates to those rows. Does that make sense? I'm sorry I'm fairly new at sharepoint.

    I think what you're asking is about having repetitive options in a list, show up easily for new items being created.
    This can be done by setting the columns that contain repetitive information to Choice fields.  In the configuration of the Choice field, check the box for "Allow custom values".  Now as users are entering data into the list, the dropdown of options
    for a given field grows and users can quickly see and select previously entered and thus repetitive values for the given fields.
    I trust that answers your question...
    Thanks
    C
    |
    RSS |
    http://crayveon.com/blog |
    SharePoint Scripts | Twitter |
    Google+ | LinkedIn |
    Facebook | Quix Utilities for SharePoint

  • How to use iTunes with more than one Ipod

    I would like to know whether is possible to use iTunes with more that one ipod, because I need to have 2 differents libraries, one for my 30GB ipod and my son's ipod nano.
    Thanks, Felipe

    Try this http://docs.info.apple.com/article.html?artnum=300432

Maybe you are looking for

  • EDI for creation of Sales Order and sending copy of Invoice

    Hello Experts, I am working on EDI. We have a scenario, where the purchase order created in the 3rd party system has to be converted into a sales order in our SAP system. Then, the regular flow would follow uptil delivery and creation of invoice in S

  • If you unplug the headphones ipod does not stop the music. How do I fix this?

    If you unplug the headphones ipod does not stop the music. How do I fix this? При отключении наушников ipod не останавливает музыку. Как это исправить?

  • Issue in Query..

    Hi, I am getting a strange problem in my query for profit_ctr and cost_ctr hierarchies. The text in selection screen for the variables is in short text but when I execute the query it shows the middle text. Please help.

  • Problem overriding default JSF conversion error messages

    Hello ! I have a problem to override default JSF conversation error message. I have an inputText which is binded to BigDecimal attribute, so when I enter a character in that field I get this error message: "- Conversion failed." I think I need to reg

  • MacBook Pro and SSID Broadcast

    Hi All, New MacBook Pro and I am having some strange issues. By default I disable SSID Broadcast on my Netgear, and all of the other wireless devices work fine. Including my 15inch Powerbook. They only way I can connect with the MacBook Pro is to ena