BDC for VBO2 Tcode

Dear All,
   I am trying to write a bdc for tcode VBO2 (Agreement). in this i have ti give agreement number and then on second screen i have to select the PAY push button for clearing the amount.
In this i am not able to catch the pay table control as to on which index i have to pass my records.
Regards
Amit

Dear,
   I know this but teh problem is i have 2 tables in my bdc one is xkonp where i get the value i.e. mpwrt whereever i get this value means i have to update the same value in bzwrt field. but in xkonp i have all the data. but in PAy tab when we go table control fills up from knopd table where as i also have xvake table in my program where the index is not updated. so means in xkonp wherever i get mpwrt take knumh of that row and check in xvake table you will get the exact row of table control where that value needs to be updated in bdc. in xvake i am not getting the indexes. any help on this.
Regards
Amit

Similar Messages

  • BDCs for Multiple tcodes

    Hi Gurus,
    I am struck with BDCs for multiple tcodes.
    I know that multiple tcodes can be done only using session method.
    Please help how to proceed.
    Regards,
    V S L Bharathi K

    Hi,
    Loop at itab1.
    *fill BDCDATA table
    call transaction 'XXXX' using mode l_mode
                                messages in mess_tab
    *"Chk if any Error/Abort message in mess_tab
    * get the value for next processing.
    read table message_tab with key type ='S'
                              msg_class = 'XX'
                              msg_no     = 'NNN'.
    l_par = mess_tab-msg_v1.
    refresh BDCDATA.
    *again fill BDCDATA table
    call transaction 'YYYY' using mode l_mode
                                messages in mess_tab
    endloop.
    Hope this helps.

  • How to supress a warning message in BDC for ME11 Tcode

    Hi Expert,
    I am doing a BDC report for ME11 Tcode and some of warning is ignorable for this transaction code,how can we suppress these warning through BDC program, is it possible or will have to make some changes changes in TCODE(ME11) itself.

    hi,
    if the warning message coming in a pop-up window then it can be supressed in the following way.
    1. comment the lines of the code of bdc recording of that pop-up screen along with the perform of bdc ok code  '=ENTE".
    2. use the structure ctu_params and fill the correspondings fiels, particularly the field nobinpt = 'X' and then use this structure in the call transcation statement as
    call transcation 'ME11'
                            using bdcdata
                            options from opt ( structure of ctu_params )
    3. At the time of recording use the option of check box " no batch input session ".
    regards,
    Alok

  • BDC for CM25 tcode or a function module to dispatch planned orders

    Please suggest a way for BDC of CM25 tcode as the selection of planned/process order in the tcode is not captured in recording.
    or provide FM/BAPI for dispatch of planned orders.
    Moderator message - Cross post locked
    Edited by: Rob Burbank on Oct 23, 2009 11:27 AM

    reposting it

  • Problem in BDC for IA05 tcode.

    Hi,
    I am facing a problem while uploading data for IA05 t.code using BDC call transaction method.
    when I an running thru BDC, in the operational overview, when i select an operational line item, and go for inspection characteristics overview and provide inspection characteristics, sampling procedure, version and press enter, an window is popping up which is asking for inspection method, plant for inspection method and inspection method version number.
    but when I am running the tcode normally, this inspection window is not popping up and details are not being asked. these inspection method details are not neccessary for my business logic. how can I by-pass this popup window which  i don't want even when I run thru BDC.
    Thanks and Regards,
    Krishna.

    Hi Krishna
    This is not the right forum to post this question. Post this to proper forum in order to get quick response.
    Regards
    Vaishali

  • BDC for VBO2 does not update material in rebate document

    Hi All
    I am trying to close rebate agreement using VBO2 transaction.
    The steps that I am following are as follows
    1. Put rebate agreement number
    2. Rebate Payments --> Final Settlement --> Using payment screen
    I am making all the amounts 0.
    Then Saving it.
    Now this all process is done using a BDC session(Processed using SM35)
    When this session is processed, a document of type B1 is created. But sometimes it does not have any material (line item).
    What can be the reason?
    Also I would like to know, which transaction is used for creation of this B1 document.

    Can i Have the BDC code.
    regards
    Amit

  • Creating BDC for VB12 tcode

    Hi experts,
    I have a problem here. The requirment is like, we have a test data file in which in a particular record if there exists a deletion flag 'L' I need to delete this record from system by calling tcode VB12m, unless i need to create a record by calling tcode VB11.
    The problem here is for already created records which are being displayed in VB12.First I need to check whether this entry exists in VB11 or not and then select the checked and then click to delete button in TCode VB12.
    But how, shud i check the records from VB11 tcode whether it exists or not?These are coming in display mode in Tcode.......
    Plz if anyone has faced this problem earlier suggest me how to proceed further.
    Thanks in advance.

    Hi,
    Please use the following format for your upload file template
    DocDate1    ComCd1    Currency1    pstky1
    DocDate1    ComCd1    Currency1    pstky2
    DocDate1    ComCd1    Currency1    pstky3
    DocDate2    ComCd2    Currency2    pstky1
    DocDate2    ComCd2    Currency2    pstky2
    Then use the following logic.
    At New Currency1
    add the header data
    DocDate1    ComCd1    Currency1
    Thus this code will run only once for every new Header
    and remain in the screen till posting key are entered.
    Regards,
    Lokesh
    Edited by: Lokesh Tibbani on Sep 5, 2008 12:17 PM

  • Bdc for fb60 tcode

    Hi,
    can any one send me a sample code for posting document through fb60 tcode
    thanks

    Hi Bobby,
    try SHDB with FB60 and generate a Report.
    Here a Example:
    report ZTEST
           no standard page heading line-size 255.
    include bdcrecx1.
    start-of-selection.
    perform open_group.
    perform bdc_dynpro      using 'SAPMF05A' '1100'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=DUMMY'.
    perform bdc_field       using 'RF05A-BUSCS'
                                  'R'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'INVFO-XMWST'.
    perform bdc_field       using 'INVFO-ACCNT'
                                  '4711'. "LIFNR
    perform bdc_field       using 'INVFO-BUDAT'
                                  '07.07.2006'.
    perform bdc_field       using 'INVFO-WRBTR'
                                  '1000'.
    perform bdc_field       using 'INVFO-WAERS'
                                  'EUR'.
    perform bdc_field       using 'INVFO-XMWST'
                                  'X'.
    perform bdc_field       using 'INVFO-MWSKZ'
                                  'V4'.
    perform bdc_dynpro      using 'SAPMF05A' '1100'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BU'.
    perform bdc_field       using 'RF05A-BUSCS'
                                  'R'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'INVFO-XBLNR'.
    perform bdc_field       using 'INVFO-ACCNT'
                                  '4711'. "LIFNR
    perform bdc_field       using 'INVFO-XBLNR'
                                  'test'.
    perform bdc_field       using 'INVFO-WRBTR'
                                  '1.000,00'.
    perform bdc_field       using 'INVFO-XMWST'
                                  'X'.
    perform bdc_field       using 'INVFO-MWSKZ'
                                  'V4'.
    perform bdc_dynpro      using 'SAPMF05A' '1100'.
    perform bdc_field       using 'INVFO-BLDAT'
                                  '07062006'.
    perform bdc_field       using 'INVFO-XBLNR'
                                  'TEST'.
    perform bdc_field       using 'ACGL_ITEM-HKONT(01)'
                                  '467000'.
    perform bdc_field       using 'ACGL_ITEM-WRBTR(01)'
                                  '             1000'.
    perform bdc_field       using 'ACGL_ITEM-KOSTL(01)'
                                  '1000'.
    perform bdc_transaction using 'FB60'.
    perform close_group.
    Regards, Dieter

  • BDC for Me22 Tcode-Version Management

    Hi ,
    I want to add the version management in for exiting BDC in ME22 Transaction in ECC6.0
    How can i go for that.
    please help me .
    regards,
    Ajay
    Edited by: Ajay reddy on Sep 16, 2009 3:26 PM
    Edited by: Ajay reddy on Sep 16, 2009 3:38 PM

    Hi,
    Thanks for attempt the Question.
    Me22-> Enter Order number-> Go to HEADER> VERSION.
    Can I handle the Menu option in recording..... Please help me in this.
    regards,
    Ajay
    Edited by: Ajay reddy on Sep 16, 2009 3:47 PM
    Edited by: Ajay reddy on Sep 16, 2009 3:50 PM
    Edited by: Ajay reddy on Sep 16, 2009 6:52 PM

  • Issue with MB25 BDC for Dynamic Selection Screen

    Hi Experts,
    I recorded one BDC for MB25 Tcode regarding to determine Open Reservation(s) in E Mode (Display Mode). I am passing 3 parameters.
    1. Plant,
    2. Requirement Date
    3. Multiple Reservation Numbers i.e. RSNUM from Dynamic Selection i.e. 2nd Button -> Header Data for Reservation -> Reservation -> Multiple Selection Icon.
    But while executing that BDC, I need to manually click every time on 'Header Data for Reservation' Tree and then Multiple Selection for Reservation Icon.
    I want below steps automatically while executing:
    - Open 'Header Data for Reservation' Tree
    - Click Reservation
    - Open Popup for 'Multiple Selection'.
    So no need to click every time on Dynamic Selection Screen i.e. Header Data for Reservation -> Reservation -> Multiple Selection Icon.
    Please find attached screen shot for your reference.
    Please guide.
    Thanks and Regards,
    Emon Master

    Hello Jainam,
    submit (sy-repid) with selection-table v_sp
                             with free selections EXPRESSIONS
                             via selection-screen.
    Without going through the details, dont you think this will cause an inifinite loop as the calling & the called programs are the same.
    Please enlighten me !!
    BR,
    Suhas

  • Problem while doing bdc for fv60

    Hi frends,
       I got problem while doing BDC for fv60 tcode.i have given
    header items:
    vendor number
    invoice date
    posting date
    amount
    item data:
    g/l acc no: 100000
    amount 1000 whatever
    these are all given in recording
    in recording after all giving this data if we click on park it is telling "parking not possibe duiring batch input".
    can any body tell me the process for recording shdb and after that in bdc how can we give multiple line items for fv60
    thanks,
    naveen.

    I don't think you can use FV60 in batch input. Your options are to use transaction FBV1 or bapi BAPI_INCOMINGINVOICE_PARK.
    Rob

  • Problem in BDC for MM02

    Hi,
    I am working on a BDC for the tcode MM02 in which i have to insert the Inspection Type in the Quality Managment View of materials. i had executed the code which was working fine,but when i executed it ,it remains on the same screen where the after specifying on the file path. I dont know why it is happening ,plzz provide me guidelines for solving this problem.

    report ZMM02 no standard page heading line-size 255.
    include bdcrecx1.
    DATA: BEGIN OF ZVBM OCCURS 0,
           MATNR(18) TYPE C,
           BRGEW(16) TYPE C,
           NTGEW(16) TYPE C,
    END OF ZVBM.
    start-of-selection.
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
      CODEPAGE                      = ' '
       FILENAME                      = 'c:\vijay.txt'
       FILETYPE                      = 'DAT'
      HEADLEN                       = ' '
      LINE_EXIT                     = ' '
      TRUNCLEN                      = ' '
      USER_FORM                     = ' '
      USER_PROG                     = ' '
      DAT_D_FORMAT                  = ' '
    IMPORTING
      FILELENGTH                    =
      TABLES
        DATA_TAB                      = ZVBM
    EXCEPTIONS
      CONVERSION_ERROR              = 1
      FILE_OPEN_ERROR               = 2
      FILE_READ_ERROR               = 3
      INVALID_TYPE                  = 4
      NO_BATCH                      = 5
      UNKNOWN_ERROR                 = 6
      INVALID_TABLE_WIDTH           = 7
      GUI_REFUSE_FILETRANSFER       = 8
      CUSTOMER_ERROR                = 9
      OTHERS                        = 10
    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 ZVBM.
    perform bdc_dynpro      using 'SAPLMGMM' '0060'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RMMG1-MATNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RMMG1-MATNR'
                                  zvbm-matnr.
    perform bdc_dynpro      using 'SAPLMGMM' '0070'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MSICHTAUSW-DYTXT(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(01)'
                                  'X'.
    perform bdc_dynpro      using 'SAPLMGMM' '4004'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BU'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  'VIJAY3'.
    perform bdc_field       using 'MARA-MEINS'
                                  'KG'.
    perform bdc_field       using 'MARA-MATKL'
                                  '01'.
    perform bdc_field       using 'MARA-SPART'
                                  '01'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MARA-NTGEW'.
    perform bdc_field       using 'MARA-BRGEW'
                                  zvbm-brgew.
    perform bdc_field       using 'MARA-GEWEI'
                                  'KG'.
    perform bdc_field       using 'MARA-NTGEW'
                                  zvbm-ntgew.
    perform bdc_transaction using 'MM02'.
    ENDLOOP.
    perform close_group.

  • BDC for every 80 records

    Dear 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 can send some example code for the above it will be great help for me.
    Many Thanks,
    Ranjan

    Please find my code..
    This info may be useful..
    I'm doing BDC for KB31N tcode,where i have two items in header(doc date, posting date).Multiple line items(each line item should consists of 4 fields namely cost center,statistical key figure,total qty,text).
    When i'm sending more than 80 rec records i'm being populated an error message "BDC_Close_group, session not opened"
    Kindly advice me how to handle this
    *& Report  ZCO_I025_WSKAZNIKI_STAT_DEV                                 *
    *& Interfejs wczytywania wskaŸ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  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³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æ podane Stanowisko kosztów lub Zlecenie wewnê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æ podane Stanowisko kosztów lub Zlecenie wewnêtrzne. Rekord: ',
              wa_excel-row, /.
              EXIT.
            ENDIF.
            IF wa_data-indic IS INITIAL.
              error = '1'.
              WRITE: 'Brak identyfikatora wskaŸnika. Rekord: ', wa_excel-row
              EXIT.
            ENDIF.
            IF wa_data-quant IS INITIAL.
              error = '1'.
              WRITE: 'Brak informacji o iloœ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.
      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.
      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.
      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'.
    ENDFORM.                    "utworz_sesje
    *&      Form  zamknij_sesje
          text
    FORM zamknij_sesje.
      CALL FUNCTION 'BDC_CLOSE_GROUP'.
      IF sy-subrc NE 0.
        WRITE: /, 'B³ad podczas zamykania sesji'.
        EXIT.
      ENDIF.
    ENDFORM.                    "zamknij_sesje

  • Bdc for tocde CS01(BOM CREATION)

    Hi,
    I want to make a bdc for the tcode CS01(BOM Creation),but the thing when i perform the Recording then there is a point that the BOM having the sub - items which might be 3 or 2 or maybe 10 . how can i manage that during the recording.
    plzz provide me guidelines for solving this problem.

    Hi,
    This code for BOM creation/Change,
    using BAPI as well as BDC check this.
                    LOOP AT it_bom_create INTO wa_bom_create.
    * Begin of CCT51465 - B09794 - 11/28/2007
    *                  PERFORM f_bdc_dynpro      USING 'SAPLCSDI' '0100'.
    *                  PERFORM f_bdc_field       USING 'BDC_OKCODE'
    *                                                  '/00'.
    *                  PERFORM f_bdc_field       USING 'RC29N-MATNR'
    *                                                  wa_bom_create-matnr.
    *                  PERFORM f_bdc_field       USING 'RC29N-WERKS'
    *                                                  wa_mbew-bwkey.
    *                  PERFORM f_bdc_field       USING 'RC29N-STLAN'
    *                                                  '2'.
    *                  PERFORM f_bdc_field       USING 'RC29N-STLAL'
    *                                                  '01'.
    *                  PERFORM f_bdc_dynpro      USING 'SAPLCSDI' '0110'.
    *                  PERFORM f_bdc_field       USING 'BDC_OKCODE'
    *                                                  '/00'.
    *                  CONDENSE wa_bom_create-bmeng.
    *                  PERFORM f_bdc_field       USING 'RC29K-BMENG'
    *                                                  wa_bom_create-bmeng.
    *                  PERFORM f_bdc_dynpro      USING 'SAPLCSDI' '0111'.
    *                  PERFORM f_bdc_field       USING 'BDC_OKCODE'
    *                                                  '/00'.
    *                  CONDENSE wa_bom_create-menge.
    *                  PERFORM f_bdc_dynpro      USING 'SAPLCSDI' '0140'.
    *                  PERFORM f_bdc_field       USING 'BDC_CURSOR'
    *                                                  'RC29P-IDNRK(01)'.
    *                  PERFORM f_bdc_field       USING 'BDC_OKCODE'
    *                                                  '/00'.
    *                  PERFORM f_bdc_field       USING 'RC29P-IDNRK(01)'
    *                                                  wa_bom_create-idnrk.
    *                  CONDENSE wa_bom_create-menge.
    *                  PERFORM f_bdc_field       USING 'RC29P-MENGE(01)'
    *                                                  wa_bom_create-menge.
    *                  PERFORM f_bdc_field       USING 'RC29P-POSTP(01)'
    *                                                  'L'.
    *                  PERFORM f_bdc_dynpro      USING 'SAPLCSDI' '0130'.
    *                  PERFORM f_bdc_field       USING 'BDC_OKCODE'
    *                                                  '/00'.
    *                  PERFORM f_bdc_dynpro      USING 'SAPLCSDI' '0131'.
    *                  PERFORM f_bdc_field       USING 'BDC_OKCODE'
    *                                                  '/00'.
    *                  PERFORM f_bdc_dynpro      USING 'SAPLCSDI' '0140'.
    *                  PERFORM f_bdc_field       USING 'BDC_OKCODE'
    *                                                  '=FCBU'.
    *                  PERFORM f_bdc_transaction USING 'CS01'.
                      it_stko1-base_quan = wa_bom_create-bmeng.
                      CALL FUNCTION 'CSAP_MAT_BOM_CREATE'
                        EXPORTING
                          material                 = wa_bom_create-matnr
                          plant                    = wa_marc-werks
                          bom_usage                = '2'
                          valid_from               = v_valid              " CCT52206 - B09794 - 12/10/2007
    *                     CHANGE_NO                =
    *                     REVISION_LEVEL           =
                          i_stko                   = it_stko1
    *                     FL_NO_CHANGE_DOC         = ' '
                          fl_commit_and_wait       = 'X'
    *                     FL_CAD                   = ' '
                          fl_default_values        = ' '
                        IMPORTING
                          fl_warning               = flg_warning
    *                     BOM_NO                   =
                        TABLES
                          t_stpo                   = it_stpo1
    *                     T_DEP_DATA               =
    *                     T_DEP_DESCR              =
    *                     T_DEP_ORDER              =
    *                     T_DEP_SOURCE             =
    *                     T_DEP_DOC                =
    *                     T_LTX_LINE               =
    *                     T_STPU                   =
                        EXCEPTIONS
                          error                    = 1
                          OTHERS                   = 2.
                      IF sy-subrc <> 0.
    * Begin of CCT59311 - B09794 - 07/01/2008
                        IF p_show = 'X'.
                          PERFORM f_check_lock.
                        ENDIF.
    * End of CCT59311 - B09794 - 07/01/2008
                        CALL FUNCTION 'FORMAT_MESSAGE'
                          EXPORTING
                            id        = sy-msgid
                            lang      = sy-langu
                            no        = sy-msgno
                            v1        = sy-msgv1
                            v2        = sy-msgv2
                            v3        = sy-msgv3
                            v4        = sy-msgv4
                          IMPORTING
                            msg       = v_mstring
                          EXCEPTIONS
                            not_found = 1
                            OTHERS    = 2.
                        IF sy-subrc = 0.
                          CONDENSE v_mstring.
                          wa_errormsg-matnr = wa_bom_create-matnr.
                          wa_errormsg-werks = wa_marc-werks.
                          wa_errormsg-mtart = v_mat_typ.
                          wa_errormsg-msgtyp = sy-msgty.
                          IF sy-msgid = '29' AND sy-msgno = '037'.
                            v_mstring = text-027.                                   "  Costing BOM already exist (For Material -
                            CONCATENATE v_mstring wa_marc-matnr ')' INTO v_mstring.
                            wa_errormsg-msgtxt = v_mstring.
                          ELSE.
                            wa_errormsg-msgtxt = v_mstring.
                          ENDIF.
                          APPEND wa_errormsg TO it_errormsg1.
                          CLEAR wa_errormsg.
                        ENDIF.
                      ELSE.
                        wa_successmsg-matnr = wa_marc-matnr.
                        wa_successmsg-werks = wa_marc-werks.
                        wa_successmsg-mtart = v_mat_typ.
                        wa_successmsg-msgtyp = 'S'.
                        v_mstring = text-017.       "   Costing BOM created successfully (For Material -
                        CONCATENATE v_mstring wa_marc-matnr ')' INTO v_mstring.
                        wa_successmsg-msgtxt = v_mstring.
                        APPEND wa_successmsg TO it_successmsg.
                        CLEAR wa_successmsg.
                      ENDIF.
    Code Formatted by: Alvaro Tejada Galindo on Dec 23, 2008 10:21 AM

  • Reg : BDC for OM

    Hi,
    I want to write BDC for OM Tcode : ppoc_old.
    But the process gets stopped in the first screen itself.
    Can anyone help me out ??

    You can create any OM object via PP01.
    You can create all the relationships between ant OM objects via PP01.
    What I do is, for creation of organizational units I create a separate BDC (as their keys are determined after creation).
    Then I write the second BDC and make the necessary connections for the org unit by using the keys determined at the end of the first batch input run.
    For all of them I use PP01.
    Regards,
    Dilek
    Edited by: Dilek Ersoz Adak on Dec 14, 2009 8:23 AM

Maybe you are looking for

  • Missing contents (files) in the portal

    Hello, can someone help me please? (at first - sorry for my english.) We installed SAP portal (NetWeaver2004s, support Package stack 11). But its come to errors on several sites: E.G.:  System administration -> System configuration -> System landscap

  • SOAP adapter - unauthorized problem

    Hi all, Our third party receive an unauthorized (401) message back when they send a soap request via http protocol to our XI server. In the soap request, the following location adapted. http://integration.test.com/XISOAPAdapter/MessageServlet?channel

  • Remove Collapse/expand icons from the tray for all user except administrato

    Hi, My requirement is to remove the expand/collapse icons from the overview page for all the user but administrator can have those available. I have set the show tray property to NO , this has made the complete tray invisible for all including the ad

  • Error when posting captivate quiz results

    I would like to posting Captivate quiz results to Acrobat.com. I created an account, but when I click Post Results and log in, I get a 'Send' button option. When I select 'Send', the message 'Unknown Error' appears and the results do not get posted.

  • Exception in thread "main" java.lang.NoClassDefFoundError: MyProgram

    I have the following setup. I've installed the jdk to the c:\ drive of my machine in a folder named jdk1.5.0_05 I set up the environment as follows: path = c:\jdk1.5.0_05\bin set classpath = I store my own programs in a folder on the c:\ drive named