Creating Sales order texts while using BDC session method is not working

Hi All,
I have an existing program which creates sales order using BDC session method.( Actual program uses BAPI to create sales order and in case if any error occurs during creation of sales order BDC session is generated so that user can process it later and i am facing issues in this part of code where it uses BDC)
I wanted to modify this BDC sesion  to update the sales order text also. I tried recording VA01 for creationg sales order text unfortunatly it is not capturing the data i am entering in the text fields.
Please suggest if there is any way to create sales order using BDC.
Regards
Sheeba

Hi Madhu,
'=TP_CREATE' is the OK code i am getting for creating TEXTS. But the text entered are not captured in BDC.
Part of BDC program generated for cretaing sales order texts.
perform bdc_dynpro      using 'SAPMV45A' '4003'.
perform bdc_field       using 'BDC_OKCODE'
                              '=%_GC 128 22'.
perform bdc_field       using 'LV70T-SPRAS'
                              'EN'.
perform bdc_dynpro      using 'SAPMV45A' '4003'.
perform bdc_field       using 'BDC_OKCODE'
                              '=TP_CREATE'.
perform bdc_field       using 'LV70T-SPRAS'
                              'EN'.
perform bdc_dynpro      using 'SAPMV45A' '4003'.
perform bdc_field       using 'BDC_OKCODE'
                              '=%_GC 128 22'.
perform bdc_field       using 'LV70T-SPRAS'
                              'EN'.
perform bdc_dynpro      using 'SAPMV45A' '4003'.
perform bdc_field       using 'BDC_OKCODE'
                              '=TP_CREATE'.
perform bdc_field       using 'LV70T-SPRAS'
                              'EN'.
perform bdc_dynpro      using 'SAPMV45A' '4003'.
perform bdc_field       using 'BDC_OKCODE'
                              '/EBACK'.
perform bdc_field       using 'LV70T-SPRAS'
                              'EN'.
perform bdc_dynpro      using 'SAPMV45A' '4001'.
perform bdc_field       using 'BDC_OKCODE'
                              '=SICH'.
Regards,
Sheeba

Similar Messages

  • Error while creating sales order with ref using SD_SALESDOCUMENT_CREATE

    Hi
    I am creating sales order with reference using function module SD_SALESDOCUMENT_CREATE , while creating i am getting error
    Document doesn't have document category even thougth i am passing document category in header as well as item lavel.
    In VBUK table there is no value for VGTYP.
    Can you please help me how to resolve it.
    Thanks & regards
    kiran

    Problem resolved by passing   REFDOC_CAT in the FM along with  SD_DOC_CAT.
    Thanks

  • Creation of Material using BDC Session method & global class

    Hi
    Creation of Material using BDC Session method & global class by using oops.
    can anyone plz help me out

    Hi,
    it looks like it's not possible to call this BAPI wihtout material number. Here is a quote from BAPI documentation.
    When creating material master data, you must transfer the material
    number, the material type, and the industry sector to the method. You
    must also enter a material description and its language.
    Cheers

  • Problem with BOM Quant while creating Sales order with reference using BAPI

    Dear All,
    I am facing problem with creating a slaes order with reference to other sales order by using BAPI_SALESORDER_CREATEFROMDAT2 .
    Sales order is getting created but
    1. It exploding the BOM means the line items which are not there in the reference SO also coming in the new SO ( all BOM items are coming )
    2. Schedule line for BOM header item is getting copied to all sub items of BOM.
    Can any one help me out to prevent the above deviations in creating Sales order with reference by using BAPI_SALESORDER_CREATEFROMDAT2.
    Note: while passing the parameters to BAPI_SALESORDER_CREATEFROMDAT2
    all the data related to items is exactly the same as in the original Sales Order.
    Thanks in advnace.
    Regards,
    John

    Hi All,
    Can any one help me !!!!!!!!!!
    please

  • Unable to create sales Order/Inquiry object using SAP JCo

    Hi All,
    Pls can you help me.
    I am using BAPI_INQUIRY_CREATEFROMDATA2 and BAPI_Trancation_commit to create Inquiry object.From my Client JCo code there is no error.I debugged the BAPI_Trasaction_commit, there is no error,  return code is 0.  But th system is not creating Inquiry object. When I try the same from SAP GUI client with exactly the same input parameters it works.
    Do I need to set any option/value to commit the Inquiry to the SAP database? How to maintain the same session between the different BAPI's. Is there any issue with Session maintainance? I would appreciate if you can provide me any sample SAP JCo code for creating a Sales Order/Inquiry.
    Thanks
    mars

    Can you put the part of your code that fill the ORDER_PARTNERS table, also you could compare your coding with [Sales order creation using BAPI|http://wiki.sdn.sap.com/wiki/display/Snippets/SalesordercreationusingBAPI] in [Community Code Gallery |http://wiki.sdn.sap.com/wiki/display/Snippets/CommunityCodeGallery] (don't forget that there is a conversion exit on the partner role, so use internal codes "AG" and "WE")
    Regards,
    Raymond

  • Upload Purchase order text tab using BDC

    Is it possible to upload Purchase order text tab in material master (tcode mm01) using a BDC.
    If so pls tell me how to upload the same, what is the field name of the box.
    Regards,
    Senthil

    u need to use READ_TEXT or SAVE_TEXT or WRITE_TEXT or COMMIT_TEXT to upload text into SAP.

  • To output only sales order no while using BAPI CRM_BUPA_READ_ORDER_OBJECTS

    I am using the BAPI CRM_BUPA_READ_ORDER_OBJECTS to display the sales orders against a business partner in CRM.
    My requirement is to only get the sales orders for the business partner that I input, but in the table ET_SEARCH_RESULT along with the sales order number it is also displaying couple of data like PROC, T, DESCRIPTION, POSTING_DA, CHANGED_AT, CHANGED_BY, CREATED_AT, CONCATSTAT, CONCATUSER, PROCESS_TYPE_TXT, CREATED_BY, KURZTEXT, ACT_TEXT, NET_VALUE_MAN, SALES_EMPL. PERSON_RES, CONTACT_PE, SALES_PARTN, PLANNING_A, SALES_EMPLOYEE_LIST, PERSON_RESP_LIST, PERSON_RESP_NAME, CONTACT_PERSON_LIST, OBJECT_TYPE_TXT etc.
    But I donu2019t need all these information. I need only the list of sales orders and the date created.
    So I am trying to declare a structure only with sales order number and posting date and trying to move the fields of IT_ET_SEARCH_RESULT to that internal table. But the program throws me a syntax  error saying ET_SEARCH_RESULT  is a flat structure
    This is my code.
    CALL FUNCTION 'CRM_BUPA_READ_ORDER_OBJECTS'
      EXPORTING
        IV_BU_PARTNER              =  it_IV_BU_PARTNER
    IMPORTING
        ET_SEARCH_RESULT           =  IT_ET_SEARCH_RESULT.
    What should I do so that I donu2019t see all the data from  ET_SEARCH_RESULT. I want only couple of data of my choice like sales order number and posting date. What should I do?

    how is IT_ET_SEARCH_RESULT defined in your code? it has to match exactly like ET_SEARCH_RESULT is expecting

  • Problem in Uploading sales order text data using LSMW

    Hi All,
    I am facing Problem in uploading open sales order data from legacy to SAP using LSMW.
    We are trying to upload sales order data using LSMW Standard Batch/Direct input using program name RVINVB10 and program type D. We are not able to upload item text but have no problem in uploading remaining data.
    the details we are passing to BTEXHKOM structure are......
    BTEXHKOM-OLDNR = IHEADER-OLDORD_NO.
    BTEXHKOM-LAISO = 'EN'.
    BTEXHKOM-TDID = 'Z009'.
    and the for structure BTEXLKOM
    BTEXLKOM-OLDNR = IHEADER-OLDORD_NO.
    BTEXLKOM-TXPARGRAPH = '/'.
    CONCATENATE LITEM-DEPTID LITEM-DEPTNAME
    INTO BTEXLKOM-TXLINE SEPARATED BY ' '.
    we have three input source structures.
    IHEADER Header structure
    LITEM Line item structure ( Material data )
    IPARTN Partners structure
    The structure relationships are
    BTEXHKOM <<< IHEADER.
    BTEXLKOM <<< IHEADER.
    Please let me know if I am doing some thing wrong or some thing else need to be done.
    Thanks,
    Chindam.

    you can pass below values also
    OLDNR         :  order number and item nuber
    TXPARGRAPH  : VBBK
    TXLINE        : your text.....

  • TEXTS in Sales Order - Text types used or not ?

    Hi experts,
    We have 8 text types in sales orders line items. Some of them are used to enter text and some are not. Is there a table from where we can find out if for all orders any particular text type is used or not ?
    In STXH and STXL, how can we find out if a particular order # has an entry of texts in it or not.
    How can we get a text i.d. from the sales order. OR find a link between sales Order and tables STXH/STXL........ how can we search these tables ?
    I really need some help on this mysterious Text storage strategy of SAP.
    Thanks a LOT
    Ron

    Yes I am aware of the fact that text is accessed thru read_text FM .....
    My question is what parameters/ field values can we plug in STXH/STXL to get info that a particular "text" entry exists in this table. I have a sales order which has few texts, I want to know if they have an entry in STXH and STXL about their text i.d.s....
    Let me put it this way - What ever entry exists in STXH for this sales Order I want to see that. What parameters of this sales order do I pass in this Table STXH to see that entry ??
    I hope this is clear now

  • Creation Dynamic session name using BDC session Method

    Hi All,
    I have one typical BDC problem. If the number of records in file are crossing 80,my bdc is giving problem .So I need to split total records into sets of 80 and submit them. So I need to create the session name dynamically, pass the data dynamically. IF you have example code  or know the procedure as how to proceed kindly inform me
    Regards
    Praveen

    Hi Rob,
    Please find my code below..
    Part of the variables are in Polish since the original developer is a polish guy..
    Praveen
    Code.
    *& Report  ZCO_I025_WSKAZNIKI_STAT_DEV                                 *
    *& Interfejs wczytywania wska&#378;ników statystycznych                     *
    REPORT  zco_i025_wskazniki_stat_dev                                 .
    TYPES:
      BEGIN OF l_tab_dane,
        indic LIKE rk23f-stagr,
        quant LIKE rk23f-mbgbtr,
        mpk LIKE rk23f-ekostl,
        order LIKE rk23f-eaufnr,
        text LIKE rk23f-sgtxt,
      END OF l_tab_dane.
    DATA:
      it_excel TYPE TABLE OF alsmex_tabline,
      wa_excel TYPE alsmex_tabline,
      it_data TYPE TABLE OF l_tab_dane,
      wa_data TYPE l_tab_dane,
      error  TYPE C,
      msg TYPE string.
    DATA:
      iv_pole TYPE string,
      ddatum(10),
      kdatum(10),
    *Inserted By satyam Developer
       filelist    TYPE filetable,
            rc          TYPE i.
    DATA: BEGIN OF bdctab OCCURS 5.
            INCLUDE STRUCTURE bdcdata.
    DATA: END OF bdctab.
    SELECTION-SCREEN BEGIN OF BLOCK p1 WITH FRAME TITLE text-001.
    PARAMETERS:
      p_zakla LIKE tka01-kokrs DEFAULT '1000',
      p_ddate LIKE sy-datum DEFAULT sy-datum,
      p_kdate LIKE sy-datum DEFAULT sy-datum.
    SELECTION-SCREEN ULINE.
    PARAMETERS:
      p_fname LIKE rlgrap-filename.  " DEFAULT 'd:dane.xls'.
    SELECTION-SCREEN END OF BLOCK p1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        EXPORTING
          file_filter       = cl_gui_frontend_services=>filetype_excel
         multiselection    = 'X'
        CHANGING
          file_table        = filelist
          rc                = rc.
      IF LINES( filelist ) IS INITIAL.
        EXIT.
      ENDIF.
      READ TABLE filelist INDEX 1 INTO p_fname.
    START-OF-SELECTION.
    AUTHORITY-CHECK OBJECT 'TKA01'
      ID 'KOKRS' FIELD p_zakla.
    CONCATENATE p_ddate6(2) '.' p_ddate4(2) '.' p_ddate(4) INTO ddatum.
    CONCATENATE p_kdate6(2) '.' p_kdate4(2) '.' p_kdate(4) INTO kdatum.
    error = '0'.
    PERFORM wczytaj_dane.
    IF error = '0'.
      PERFORM utworz_sesje.
      PERFORM wprowadz_dane.
       PERFORM zamknij_sesje.   "comment by prav
    ENDIF.
      PERFORM zamknij_sesje.        "add by prav
    IF error = '1'.
      WRITE: msg, /.
    ENDIF.
    WRITE: 'Wykonano', /.
    *&      Form  wczytaj_dane
          text
    FORM wczytaj_dane.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          filename                = p_fname
          i_begin_col             = 1
          i_begin_row             = 1
          i_end_col               = 8
          i_end_row               = 65000
        TABLES
          intern                  = it_excel
        EXCEPTIONS
          inconsistent_parameters = 1
          upload_ole              = 2
          OTHERS                  = 3.
      IF sy-subrc <> 0.
        WRITE: / 'B&#322;ad importu pliku wejsciowego: ', p_fname, ' - ',
        sy-subrc.
      ELSE.
        SORT it_excel BY row col.
        LOOP AT it_excel INTO wa_excel.
          IF wa_excel-row = 1.
            CONTINUE.
          ENDIF.
          iv_pole = wa_excel-value.
          CASE wa_excel-col.
            WHEN 1. wa_data-indic = iv_pole.
            WHEN 2.
              REPLACE ',' WITH '.' INTO iv_pole.
              wa_data-quant = iv_pole.
            WHEN 3. wa_data-mpk = iv_pole.
            WHEN 4. wa_data-order = iv_pole.
            WHEN 5. wa_data-text = iv_pole.
          ENDCASE.
          AT END OF row.
            IF wa_data-mpk IS INITIAL AND wa_data-order IS INITIAL.
              error = '1'.
              WRITE:
    'Musi by&#263; podane Stanowisko kosztów lub Zlecenie wewn&#281;trzne. Rekord: ',
              wa_excel-row, /.
              EXIT.
            ENDIF.
            IF wa_data-mpk IS NOT INITIAL AND wa_data-order IS NOT INITIAL.
              error = '1'.
              WRITE:
    'Musi by&#263; podane Stanowisko kosztów lub Zlecenie wewn&#281;trzne. Rekord: ',
              wa_excel-row, /.
              EXIT.
            ENDIF.
            IF wa_data-indic IS INITIAL.
              error = '1'.
              WRITE: 'Brak identyfikatora wska&#378;nika. Rekord: ', wa_excel-row
              EXIT.
            ENDIF.
            IF wa_data-quant IS INITIAL.
              error = '1'.
              WRITE: 'Brak informacji o ilo&#347;ci. Rekord: ', wa_excel-row, /.
              EXIT.
            ENDIF.
            APPEND wa_data TO it_data.
            CLEAR wa_data.
          ENDAT.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    "wczytaj_dane
    *&      Form  wprowadz_dane
          text
    FORM wprowadz_dane.
      DATA:
        licznik TYPE i,
        l_txt TYPE string,
        pole(30) TYPE c,
        liczba(15) TYPE c.
      LOOP AT it_data into wa_data.
      PERFORM bdc_dynpro      USING 'SAPLSPO4' '0300'.
      PERFORM bdc_field       USING 'BDC_CURSOR' 'SVALD-VALUE(01)'.
      PERFORM bdc_field       USING 'BDC_OKCODE' '=FURT'.
      PERFORM bdc_field       USING 'SVALD-VALUE(01)' p_zakla.
      PERFORM bdc_dynpro      USING 'SAPLK23F1' '1200'.
      PERFORM bdc_field       USING 'BDC_OKCODE' '/00'.
      PERFORM bdc_field       USING 'COHEADER-SEND_REC_REL' '03SAP'.
      PERFORM bdc_field       USING 'RK23F-STATUS' 'L'.
      PERFORM bdc_field       USING 'COHEADER-BLDAT' ddatum.
      PERFORM bdc_field       USING 'COHEADER-BUDAT' kdatum.
      PERFORM bdc_field       USING 'BDC_CURSOR' 'EKOSTL(1)'.
      licznik = 0.
    LOOP AT it_data into wa_data.
        ADD 1 TO licznik.
        l_txt = licznik.
        CONCATENATE 'EL4(' l_txt ')' INTO pole.
        condense pole no-gaps.
        PERFORM bdc_field USING pole wa_data-indic.
        CONCATENATE 'ELR1(' l_txt ')' INTO pole.
           condense pole no-gaps.
          liczba = wa_data-quant.
          if liczba <  0.
              shift liczba circular  left up to '-'.
          endif.
            condense liczba no-gaps.
        PERFORM bdc_field USING pole liczba.
        IF NOT wa_data-mpk IS INITIAL.
          CONCATENATE 'EL2(' l_txt ')' INTO pole.
             condense pole no-gaps.
          PERFORM bdc_field USING pole wa_data-mpk.
        ENDIF.
        IF NOT wa_data-order IS INITIAL.
          CONCATENATE 'EL3(' l_txt ')' INTO pole.
             condense pole no-gaps.
          PERFORM bdc_field USING pole wa_data-order.
        ENDIF.
        CONCATENATE 'EL8(' l_txt ')' INTO pole.
           condense pole no-gaps.
        PERFORM bdc_field USING pole wa_data-text.
    call transaction 'KB31N' using bdctab mode 'A'.
    refresh:bdctab.
    clear bdctab.
      ENDLOOP.
    CALL FUNCTION 'BDC_INSERT'
       EXPORTING
         tcode            = 'KB31N'
       TABLES
         dynprotab        = bdctab
       EXCEPTIONS
         internal_error   = 1
         not_open         = 2
         queue_error      = 3
         tcode_invalid    = 4
         printing_invalid = 5
         posting_invalid  = 6
         OTHERS           = 7.
    IF sy-subrc <> 0.
       WRITE: / text-010 .
    ENDIF.
    call transaction 'KB31N' using bdctab mode 'A'.
    REFRESH bdctab.
    clear:bdctab.        "by praveen
    ENDFORM.                    "wprowadz_dane
    *&      Form  bdc_dynpro
          text
         -->PROGRAM    text
         -->DYNPRO     text
    FORM bdc_dynpro USING program dynpro.
      CLEAR bdctab.
      MOVE:
        program   TO bdctab-program,
        dynpro    TO bdctab-dynpro,
        'X'       TO bdctab-dynbegin.
      APPEND bdctab.
    ENDFORM.                    "bdc_dynpro
    *&      Form  bdc_field
          text
         -->POLE       text
         -->WARTOSC    text
    FORM bdc_field USING pole wartosc.
      CLEAR bdctab.
      MOVE:
        pole     TO bdctab-fnam,
        wartosc  TO bdctab-fval.
      APPEND bdctab.
    ENDFORM.                    "bdc_field
    *&      Form  utworz_sesje
          text
    FORM utworz_sesje.
      CALL FUNCTION 'BDC_OPEN_GROUP'
        EXPORTING
          client = sy-mandt
          group  = 'WSKASTAT'
          user   = sy-uname
          keep   = 'X'.
    **begin  of praveen
    *if sy-subrc ne 0.
    write 'hai'.
    endif.
    **end of praveen
    ENDFORM.                    "utworz_sesje
    *&      Form  zamknij_sesje
          text
    FORM zamknij_sesje.
      CALL FUNCTION 'BDC_CLOSE_GROUP'.
      IF sy-subrc NE 0.
        WRITE: /, 'B&#322;ad podczas zamykania sesji'.
        EXIT.
      ENDIF.
    ENDFORM.                    "zamknij_sesje

  • Importing new users with plain text password using a csv file does not work

    Hello everyone,
    I am using csvde -i -f filename to import a number of users and their plain text passwords but it seems
    that the "Password" parameter in my csv file is not recognized.
    PS D:\csvfiles> csvde -i -f .\testimport.csv
    Connecting to "(null)"
    Logging in as current user using SSPI
    Importing directory from file ".\testimport.csv"
    Loading entries.
    Add error on line 2: No Such Attribute
    The server side error is "The parameter is incorrect."
    0 entries modified successfully.
    An error has occurred in the program
    No log files were written.  In order to generate a log file, please
    specify the log file path via the -j option.
    I'm probably doing something wrong but I can not see it. If you know what that is please let me know.
    Many thanks

    I suggested LDIFDE.exe or you can use the following PowerShell script to import your CSV file, if you have the Active Directory PowerShell Module installed:
    http://gallery.technet.microsoft.com/scriptcenter/ed20b349-9758-4c70-adc0-19c5acfcae45
    Enfo Zipper
    Christoffer Andersson – Principal Advisor
    http://blogs.chrisse.se - Directory Services Blog

  • Column order in ALV using in portal environment does not work

    Hello,
    I set the columns order of an ALV table ( in WD ABAP ).  For one portal user these settings are not applied. ( columns seems to be in random order )  For the other users it works fine. I tried to see the differences between the portal users, but did not find anything.
    I guess it is some portal user personalization setting problem.
    Anyone knows how to fix this?
    Thanks,
    Tamas

    Tamas,
    I think user has done some personalisation or if you are Netweaver 701 you can rearrange the columns in a table
    Thanks
    Bala Duvvuri

  • Error while creating sales order using SD_SALESDOCUMENT_CREATE

    Hello All,
    We are using to  SD_SALESDOCUMENT_CREATE function module to create sales order it is working fine for single material.
    When we try to create sales order with multiple matearials we ended up with the following errors
    SALES_HEADER_IN has been processed successfully
    000000
    VBAKKOM
    Internal error in communication between configuration and sales doc.CONFIGURATION_PROCESSING
    000000
    CONFIGURATION_PROCESSING
    Error in SALES_ITEM_IN 000010
    000000
    VBAPKOM
    Internal error in communication between configuration and sales doc.CONFIGURATION_PROCESSING
    000000
    CONFIGURATION_PROCESSING
    Error in SALES_ITEM_IN 000020
    000000
    VBAPKOM
    SALES_ITEM_IN has been processed successfully
    000000
    VBAPKOM
    Could any one help me out to resolve this issue.
    Thanks in advance....
    Cheers,
    Harsha

    Hello,
    Looking at BAPI errors. It looks like you are trying to create sales order with variant configuration.
    Check Below SAP Note.
    900380 - Configurable items in the SD process (idocs & bapis)
    Regards,
    Sameer

  • How to handle the errors in BDC Session method

    Hi All,
    I am uploading Material Master (MM01) records using BDC Session Method.my problem is when i am running the program, all the error records are going to flat file.how can i correcting the error records and after correction how can i re-process the error records.tell me with example.
    i have around 70,000 records in my flat file.

    Hi,
    I am attaching few threads.Hope these will help you.
    If there are any error records in session, all those error records will get poulated in log .SM35 and after the session is completed , u can see error records which can be corrected and reprocessed again
    We have the structures BDCLD and BDCLM, which will capture the log details inthe session. Firstly, sesssion should be processed. After that log will be created. Then caputure the information into an internal table using BDCLM and BDCLD.
    and refer the link.
    error correction in bdc session
    regards
    Madhu

  • Question in BDC session method.

    Hi guys,
    I am trying to upload BOM using BDC session method.
    While doing this, i have learnt the steps by heart. But i do not understrand the logic behind the steps. For example, why do we include this statement
    Data: IT-BDC like BDCDATA occurs 0 with headerline.
    What if we don't include this statement?
    Moderator message: sorry, these forums are not targeted to provide step by step guides to beginners, please search for available information, take courses, etc.
    locked by: Thomas Zloch on Sep 10, 2010 1:06 PM

    Hello Dhirendra,
    Thanks for immediate reply. I want to understand BDC method conceptually. What exactly happens by performing each step.
    I am putting up the BDC i made. I copied some of the code from here and there. It works fine but i don't understand the purpose of BDCDATA,
    call transaction 'cs01'
    and form bdc_dynpro and form bdc_field.
    I am quite new to ABAP. Please don't mind if i ask dumb questions.
    I am unable to understand how control flows through the code logic.
    report ZBDCFORCS01
           no standard page heading line-size 255.
    *include bdcrecx1.
    DATA: IT_BDC LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
          IT_MSGCOLL LIKE BDCMSGCOLL OCCURS 0.
    TYPES TRUXS_T_TEXT_DATA(4096) TYPE C OCCURS 0.
    DATA: I_TAB_RAW_DATA TYPE TRUXS_T_TEXT_DATA.
    DATA: BEGIN OF ITAB OCCURS 0,
          MATNR(18),
          WERKS(4),
          STLAN(1),
          IDNRK(18),
          MENGE(20),
          END OF ITAB.
    SELECTION-SCREEN: BEGIN OF BLOCK b1.
      PARAMETERS: CS01FILE TYPE RLGRAP-FILENAME.
    SELECTION-SCREEN: END OF BLOCK b1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR CS01FILE.
      CALL FUNCTION 'F4_FILENAME'
       EXPORTING
         PROGRAM_NAME        = SYST-CPROG
         DYNPRO_NUMBER       = SYST-DYNNR
         FIELD_NAME          = ' '
       IMPORTING
         FILE_NAME           = CS01FILE
    start-of-selection.
    CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
      EXPORTING
      I_FIELD_SEPERATOR          =
      I_LINE_HEADER              =
        I_TAB_RAW_DATA             = I_TAB_RAW_DATA
        I_FILENAME                 = CS01FILE
      TABLES
        I_TAB_CONVERTED_DATA       = ITAB[]
    EXCEPTIONS
       CONVERSION_FAILED          = 1
       OTHERS                     = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    *perform open_group.
    LOOP AT ITAB.
    perform bdc_dynpro      using 'SAPLCSDI' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29N-STLAN'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RC29N-MATNR'
                                 '1400-500'.
    itab-matnr.
    perform bdc_field       using 'RC29N-WERKS'
                                 '1000'.
    itab-werks.
    perform bdc_field       using 'RC29N-STLAN'
                                 '1'.
    itab-stlan.
    perform bdc_field       using 'RC29N-DATUV'
                                  '10.09.2010'.
    perform bdc_dynpro      using 'SAPLCSDI' '0110'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RC29K-BMENG'
                                  '1'.
    perform bdc_field       using 'RC29K-STLST'
                                  '1'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29K-EXSTL'.
    perform bdc_dynpro      using 'SAPLCSDI' '0111'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29K-LABOR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPLCSDI' '0140'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29P-MENGE(02)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RC29P-IDNRK(01)'
                                 '1300-320'.
    ITAB-IDNRK.
    perform bdc_field       using 'RC29P-IDNRK(02)'
                                 '1300-312'.
    ITAB-IDNRK.
    perform bdc_field       using 'RC29P-MENGE(01)'
                                 '2'.
    ITAB-MENGE.
    perform bdc_field       using 'RC29P-MENGE(02)'
                                 '2'.
    ITAB-MENGE.
    perform bdc_dynpro      using 'SAPLCSDI' '0130'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29P-POSNR'.
    perform bdc_field       using 'RC29P-POSNR'
                                  '0010'.
    perform bdc_field       using 'RC29P-IDNRK'
                                  '1300-320'.
    perform bdc_field       using 'RC29P-MENGE'
                                  '2'.
    perform bdc_field       using 'RC29P-MEINS'
                                  'PC'.
    perform bdc_dynpro      using 'SAPLCSDI' '0131'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29P-POTX1'.
    perform bdc_field       using 'RC29P-SANKA'
                                  'X'.
    perform bdc_dynpro      using 'SAPLCSDI' '0130'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29P-POSNR'.
    perform bdc_field       using 'RC29P-POSNR'
                                  '0020'.
    perform bdc_field       using 'RC29P-IDNRK'
                                  '1300-312'.
    perform bdc_field       using 'RC29P-MENGE'
                                  '2'.
    perform bdc_field       using 'RC29P-MEINS'
                                  'PC'.
    perform bdc_dynpro      using 'SAPLCSDI' '0131'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29P-POTX1'.
    perform bdc_field       using 'RC29P-SANKA'
                                  'X'.
    perform bdc_dynpro      using 'SAPLCSDI' '0140'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29P-POSNR(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPLCSDI' '0140'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29P-POSNR(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=FCBU'.
    perform bdc_transaction using 'CS01'.
    *perform close_group.
    CALL TRANSACTION 'CS01' USING IT_BDC
                MODE 'A'
                UPDATE 'S'
                MESSAGES INTO IT_MSGCOLL.
    REFRESH IT_BDC.           
    ENDLOOP.
    FORM BDC_DYNPRO USING PROGRAM_DYNPRO.
      CLEAR IT_BDC.
      BDCDATA-PROGRAM = PROGRAM.
      BDCDATA-DYNPRO = DYNPRO.
      BDCDATA-DYNBEGIN = 'X'.
      APPEND IT_BDC.
    ENDFORM.
    FORM BDC_FIELD USING FNAM FVAL.
      CLEAR BDCDATA.
      BDCDATA-FNAM = FNAM.
      BDCDATA-FVAL = FVAL.
      APPEND BDCDATA.
    ENDFORM.
    Edited by: Yayati6260 on Sep 10, 2010 12:29 PM

Maybe you are looking for

  • Can't open certain images in iPhoto

    Hello. Ever since I installed iLife'06, I can't open certain thumbnails in iPhoto. They are there, you can see them, but if you double click them to open them, you get the 'searching' ring forever. I made a duplicate of one of the thumbnails, and it

  • How to use loop in BPEL Process

    Hi friends I have done a bpel process which picks up XMl file using File Adapter and imports the data from the XMl file to oracle db table using DB adapter.... But here the XMl file which have only one row ..if i want insert the XML file which have t

  • How to update weblogic.xml

    i create user programmatically.(not using administration tool). user gets added. But i cannot login as a new user. problem is because of no entry in weblogic.xml for that user. when i manually add entry i can login. My question is are there any way b

  • How does Verizon expects me to let my unlimited plan go if they are not offering anything remotely close to it?

    My husband and I stopped today at a Verizon store in Fort Myers, just to check out of curiosity the deals they were offering regarding the new Iphones (we have Iphones 4s) currently we still have our unlimited data plan; everything sounded interestin

  • Clustering weblogic from a common storage box.

              Hi All,           Please some one help me out setting up a weblogic cluster. We have a requisition           as fallows:           Weblogic server needed to be setup in a common storage external box. Then this           server has to be clu