Reg bapi for xd01 txn

Dear Freinds,
Pls let me know the BAPI for XD01 appl ( customer master)
Regards,
Manoj

Tnx for reply...
But i am having 258 fields to upload fm flat file and all the fields are not in the BAPI function modules ..
How to get remaining fields which are not in the BAPI FM.
PLs help

Similar Messages

  • Reg:Bapi for mass creation of production order/confirmation

    Dear Experts,
    I wanted to know with the following BAPI is it possible to create Multiple production orders for different semifinshed Materials along with material availability check and other functions similar to CO01 transaction.
    I knew there are standard transactions for mass confirmation for production orders. But i need a confirmation on this BAPI . As i am planning to go-ahed with ,mass creation of production order creation / Order confirmation in single custom transaction.Need back flush activity even supported.
    BAPI_PRODORD_CREATE to create the orders.
    BAPI_PRODORD_RELEASE to release the orders.
    BAPI_PRODORDCONF_GET_TT_PROP to get the default data for the confirmation.
    BAPI_PRODORDCONF_CREATE_TT to ost the confirmation of production order.
    Along with this BAPI do i need to commit any other BAPI to carry out back flush for components.
    Need your suggestions to take it further.
    Regards,
    Daya.

    Dear SAP Daya
    If the issue has been solved, please close this thread.
    You have already mentioned that the issue has been resolved, thefore, you should not ask for help on another thread before closing this one, as it looks like you are trying to force people to answer your threads.
    Users are always trying to answer as many threads as possible on good will we don't need this kind of "incentive".
    Please read carefully the The SCN Rules of Engagement, especially point 8:
    Be responsive. If an SCN member has answered your question, please mark the answer as "helpful” or “correct”. Mark the discussion as “answered,” so that other members can find the answers more easily
    Also, I checked your old threads and I could observe that there is only one closed. Please review your old threads and close those already solved.
    BR
    Caetano

  • Reg bapi for creation of purchase order

    hai to all,
    i have to upload purchase orders from  legacy file to R/3 system
    certain order having more than 50 line items
    so please any one send me <b>stardard bapi program or bdc program for me21n</b> transaction which will suitable for my senario.
    please send asap
    regards
    vijay

    hai
    i am trying to create po using bapi
    the following code explains
    constants : c_x value 'X'.
      data: del_date type sy-datum.
      data: pohead  type bapimepoheader.
      data: poheadx type bapimepoheaderx.
      data: exp_head type bapimepoheader.
      data: t_return_out  type table of bapiret2 with header line,
            wa_return_out  TYPE bapiret2.
      data: poitem  type table of bapimepoitem with header line.
      data: poitemx type table of bapimepoitemx with header line.
      data: posched  type table of bapimeposchedule with header line.
      data: poschedx type table of bapimeposchedulx with header line.
      data: ex_po_number type bapimepoheader-po_number.
    Header Level Data
      pohead-comp_code = '1011'.
      pohead-doc_type   = 'NB'     .
      pohead-creat_date = sy-datum   .
      pohead-vendor = 'A1138'.
      pohead-purch_org = 'DOMS'.
      pohead-pur_group = 'MFR'.
      pohead-langu      = sy-langu   .
      pohead-doc_date   = sy-datum.
      poheadx-comp_code  = c_x.
      poheadx-doc_type   = c_x.
      poheadx-creat_date = c_x.
      poheadx-vendor     = c_x.
      poheadx-langu      = c_x.
      poheadx-purch_org  = c_x.
      poheadx-pur_group  = c_x.
      poheadx-doc_date   = c_x.
    Item Level Data
      poitem-po_item  = 1.
      poitem-material = '000000000100001079'.
      poitem-plant    = 'HO01'.
    poitem-stge_loc = ''.
      poitem-quantity = 1.
      append poitem.
      poitemx-po_item    = 1.
      poitemx-po_itemx   = c_x.
      poitemx-material   = c_x.
      poitemx-plant      = c_x .
      poitemx-stge_loc   = c_x .
      poitemx-quantity   = c_x .
      poitemx-tax_code   = c_x .
      poitemx-item_cat   = c_x .
      poitemx-acctasscat = c_x .
      append poitemx.
    Schedule Line Level Data
    posched-po_item        = 1.
    posched-sched_line     = 1.
    posched-del_datcat_ext = 'D'.
    del_date = sy-datum + 1.
    write del_date to posched-delivery_date.
    posched-deliv_time     = '000001'.
    posched-quantity       = 1.
    append posched.
    poschedx-po_item        = 1.
    poschedx-sched_line     = 1.
    poschedx-po_itemx       = c_x.
    poschedx-sched_linex    = c_x.
    poschedx-del_datcat_ext = c_x.
    poschedx-delivery_date  = c_x.
    poschedx-quantity       = c_x.
    append poschedx.
      call function 'BAPI_PO_CREATE1'
           EXPORTING
                poheader         = pohead
                poheaderx        = poheadx
                testrun          = ' '
           IMPORTING
                exppurchaseorder = ex_po_number
                expheader        = exp_head
           TABLES
                return           = t_return_out
                poitem           = poitem
                poitemx          = poitemx.
               poschedule       = posched
               poschedulex      = poschedx.
    call function 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
               wait = 'X'.
    if not ex_po_number is initial.
       call function 'DEQUEUE_ALL'.
    else.
       call function 'DEQUEUE_ALL'.
       message i036.
    endif.
    **endform. " create_po
    IF ex_po_number IS NOT INITIAL.
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
          PERFORM show_result.
    ELSE.
          CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
          PERFORM show_result.
        ENDIF.
    *&      Form  show_result
          text
    -->  p1        text
    <--  p2        text
    FORM show_result .
      LOOP AT t_return_out INTO wa_return_out.
        write : ex_po_number.
        WRITE : / wa_return_out-type,
                / wa_return_out-id,
                / wa_return_out-number,
                / wa_return_out-message,
                / wa_return_out-log_no,
                / wa_return_out-log_msg_no,
                / wa_return_out-message_v1,
                / wa_return_out-message_v2,
                / wa_return_out-message_v3,
                / wa_return_out-message_v4,
                / wa_return_out-parameter,
                / wa_return_out-row,
                / wa_return_out-field,
                / wa_return_out-system.
      ENDLOOP.
    <b>iam geting the error such that</b>
    E                                                                            
    BAPI                                                                         
    001                                                                          
    No instance of object type PurchaseOrder has been created. External reference:
    000000                                                                       
    PurchaseOrder                                                                
    POHEADER                                                                     
            1                                                                 
    E                                                                         
    ME                                                                        
    062                                                                       
    Account assignment mandatory for material 100001079 (enter acc. ***. cat.)
    000000                                                                    
    100001079                                                                 
    POITEM                                                                    
    <b>how to correct this error</b>
    regards
    vijay

  • Reg: BAPI for HR

    Hi Experts,
    Please help me onthis.
    To which InfoType does it belong (both HR US and HR INT.)
    Which BAPI is used or available to read the information? (both HR US and HR INT.)
    Which BAPI is used or available to write the e-mail address? (both HR US and HR INT.)
    Which BAPI is used or available to write the different phone numbers (telephone, telex, pager, mobile, fax) (HR INT. only)
    Is it correct the default BAPI will only return objects that are ACTIVE? Is there a BAPI available that will return person objects, independent of their status? (this is needed to be able to provision the AD account in a disabled state right after the HR record creation. This way HP has the time to finish the configuration of that AD account and mailbox BEFORE the person starts working for SaraLee) A BAPI is needed that returns objects whether or not the object are ACTIVE.
    I am waiting for ur reply
    Thanks & Regards,
    ABAP

    Hi,
    you can check with this function module.
    BAPI_HRMASTER_SAVE_REPL_MULT,
    RH_CALL_BAPI_HRMD_APPL.
    Regards,
    Shamma

  • Reg:bapis for abap-hr

    Hi Gurus,
    Cna iget the bapis used for the HR module in abap-hr
    programming ....
    Thanks & Regards
    Suman

    Hi,
    Goto Txcode-BAPI->in the left side of the screen click on Alphabetical tab -> Scroll down you will get lot of BAPIs regarding employee, HR master data replication and all.
    Cheers!!
    VEnk@

  • Reg : BAPI For FB60

    Hi All,
    Can Any one Tell me which bapi should i use for fb60 transaction i have tried BAPI_INCOMINGINVOICE_PARK but it is asking PO as mandatory field but i don't have po for this scenario.
    i have tried BAPI_ACC_DOCUMENT_POST but its not having a export parameter to give the invoice number.
    So can anyone suggest me which bapi i have to go without referring the po.
    Regards,
    Karthik.

    Hi Sudharshan,
    Thanks For your quick response could you provide any sample program for this type of scenario so that it is easy to understand .I have tried BAPI_ACC_DOCUMENT_POST but in the ACCOUNTTAX  tables its asking me to fill the posting date but its not there ,so can you provide any sample program.

  • Reg: BAPI for FB02

    Hi ABAP Gurus,
    Could you please let me know of whether there is a bapi defined for the transaction FB02.
    Thanks,
    Kishore

    Hi Mukesh,
    I need to change the Reference key and the reason code using the transaction FB02.
    I can do the same using the BDC but screen numbers keep changing based on the company code.
    I need to know whether it is possible to do same using the bapi.
    Thanks,
    Kishore

  • Reg:BAPI for updation of Progress parameter and status profile

    Hi,
    Can anybody suggest name of BAPI used for updating "progress parameter" & "Status Profile" in actvity.
    With Regards
    Rohit Prakash

    Hi Ammar,
    I have checked both BAPI but BAPI are not working as per our requirement.
    Firstly we wanted to update progress parameter like measurement method(progress version,method plan,method actual) & POC weight into activity but as per BAPI given by you there is no any field available related to measurement method(progress version,method plan,method actual).
    And secondly we wanted to update status profile residing in Activity tab not in network header or WBS.
    Waiting for some more input related to  query.
    With Regards
    Rohit Prakash

  • Reg:BAPI for sales order creation

    Dear All,
    I am not able to populate  Order Quantity in Sales Oder
    from bapi BAPI_SALESORDER_CREATEFROMDAT2
    in which structure the order quantity field will be there.
    In the structure BAPISDITM there is a field TARGET_QTY but it is not  populeting in Cumulative Order Quantity in Sales Units.
    In the structure BAPISCHDL there is a field REQ_QTY
    is it Cumulative Order Quantity in Sales Units.
    please can you tell me which is the field for Order Quantity througn bapi in BAPI_SALESORDER_CREATEFROMDAT2.
    thanks
    mars

    Pass the quantity in ORDER_SCHEDULES_IN-REQ_QTY.  Also update the field ORDER_SCHEDULES_INX-REQ_QTY with value 'X'.
    Regards
    Vinod

  • Bapi for XD01

    Hi,
    I want to clear a doubt. I want to upload customer master with XD01. Now in XD01 I will update with all fields including Bank details, text IDs i.e. I will enter value in all screens. I dont want to use BDC, so will BAPI
    BAPI_CUSTOMER_CREATE
    BAPI_CUSTOMER_CREATEFROMDATA1,
    BAPI_CUSTOMER_CREATEFROMDATA,
    or LSMW
    RFBIDE00
    RFBIDE01 will fullfill my requirement or I have to go with BDC?
    In which way will I move. Please suggest !!
    Thnaks and regards,
    Kaushik

    Hi
    Always prefer to use BAPI. You can use BAPI_CUSTOMER_CREATE to fulfill your requirement.

  • BAPI Needed for IQ01 txn

    Hi All
    I am uploading 1lac Serial No's for the IQ01 txn against the material. For this I am using BDC of IQ01 but its taking long time.
    Please suggest any useful BAPI for IQ01 txn....
    << removed >>
    Rgds
    Deepanker
    Please read Please read "The Forum Rules of Engagement" before posting!  HOT NEWS!! and How to post code in SCN, and some things NOT to do... and [Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers] before posting again.
    Edited by: Rob Burbank on Jun 7, 2010 11:41 AM

    refer:
    Re: Any Interface for transaction IQ01
    Reddy

  • BAPI for Txn FB60

    Hi friends,
       I want to upload data to transaction FB60. I have found a BAPI 'BAPI_ACC_DOCUMENT_POST' for the same but I am not sure about it.
       Can anybody help me or if anybody has used the BAPI for uploading data to Txn FB60.
       Thanks in Advance,
       Punit

    Hi,
    check this code..
    REPORT  Z_FI_GL_POSTING.
    include <icon>.
    */ =================================================================== *
    CONSTANTS: on  VALUE 'X',
               off VALUE ' ',
               tabx TYPE X VALUE '09',
               c_e1bpache08 TYPE edilsegtyp VALUE 'E1BPACHE08',
               c_e1bpacgl08 TYPE edilsegtyp VALUE 'E1BPACGL08',
               c_e1bpaccr08 TYPE edilsegtyp VALUE 'E1BPACCR08'.
    TYPES: BEGIN OF t_tab_index,
              from TYPE i,
              to   TYPE i,
           END   OF t_tab_index.
    data :    tab type c.
    DATA:
          e1bpache08 LIKE e1bpache08,
          e1bpacgl08 LIKE e1bpacgl08,
          e1bpaccr08 LIKE e1bpaccr08.
    DATA:      g_subrc    TYPE subrc.
    DATA:      g_file     TYPE string.
    DATA:      g_segname  TYPE edilsegtyp.
    DATA:      g_sdata    TYPE edi_sdata.
    DATA:      g_first_doc.
    DATA:      i_dataf     TYPE char2000   OCCURS 900 WITH HEADER LINE,
               i_dataf_doc TYPE char2000   OCCURS  50 WITH HEADER LINE.
    DATA:      g_tab_index TYPE t_tab_index OCCURS 100 WITH HEADER LINE.
    DATA:      i_accountgl TYPE bapiacgl08 OCCURS 100 WITH HEADER LINE,
               i_curramnt  TYPE bapiaccr08 OCCURS 100 WITH HEADER LINE,
               i_return    TYPE bapiret2   OCCURS  10 WITH HEADER LINE,
               g_docheader TYPE bapiache08.
    */ ======================== SELECTION ================================ *
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-010.
    PARAMETERS: excelf TYPE file_name LOWER CASE
                DEFAULT 'C:my_excel_file.txt'.
    SELECTION-SCREEN END   OF BLOCK b1.
    */ =========================== CORE ================================== *
    START-OF-SELECTION.
    */ Call text File with GUI_UPLOAD
      g_file = excelf.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                      = g_file
    *     FILETYPE                      = 'ASC'
    *     HAS_FIELD_SEPARATOR           = ' '
    *     HEADER_LENGTH                 = 0
    *     READ_BY_LINE                  = 'X'
    *   IMPORTING
    *     FILELENGTH                    =
    *     HEADER                        =
        TABLES
          data_tab                      = i_dataf
        EXCEPTIONS
          file_open_error               = 1
          file_read_error               = 2
          no_batch                      = 3
          gui_refuse_filetransfer       = 4
          invalid_type                  = 5
          no_authority                  = 6
          unknown_error                 = 7
          bad_data_format               = 8
          header_not_allowed            = 9
          separator_not_allowed         = 10
          header_too_long               = 11
          unknown_dp_error              = 12
          access_denied                 = 13
          dp_out_of_memory              = 14
          disk_full                     = 15
          dp_timeout                    = 16
          OTHERS                        = 17
      IF sy-subrc <> 0.
        write: / Text-032.
        stop.
      ENDIF.
    */ Initialisation
      write tabx to tab.          " required as of ABAP 610 split cannot
    */                             have mixed char and byte types
      CLEAR   g_tab_index.
      REFRESH g_tab_index.
    */ how to process several doc : detecting docs in i_dataf
      g_first_doc = on.
      LOOP AT i_dataf.
        CLEAR: g_segname, g_sdata.
        SPLIT i_dataf AT tab INTO g_segname g_sdata.
        CHECK:  g_segname = c_e1bpache08,
                sy-tabix > 1.
    */ 1st document
        IF g_first_doc = on.
          g_tab_index-from = 1.
          g_tab_index-to   = sy-tabix - 1.
          APPEND g_tab_index.
    */ Next Documents
        ELSE.
          g_tab_index-from = g_tab_index-to + 1.
          g_tab_index-to   = sy-tabix - 1.
          APPEND g_tab_index.
        ENDIF.
        g_first_doc = off.
      ENDLOOP.
    */ Last doc.
      g_tab_index-from = g_tab_index-to + 1.
      g_tab_index-to   = sy-tfill.
      APPEND g_tab_index.
    */ Process documents.
      loop at g_tab_index.
         clear   i_dataf_doc.
         refresh i_dataf_doc.
         append lines of i_dataf from g_tab_index-from
                                 to   g_tab_index-to
                                 to   i_dataf_doc.
         perform process_document.
      endloop.
    END-OF-SELECTION.
    */ =========================== ROUTINES ============================== *
    *       FORM process_document                                         *
    FORM process_document.
    */ Clearing Memory
      CLEAR:   g_docheader, i_accountgl, i_curramnt, i_return, g_subrc.
      REFRESH:              i_accountgl, i_curramnt, i_return.
    */ Checking i_dataf_doc
    */ Mapping dataf => Bapi structures & internal tables
      CLEAR g_subrc.
      CATCH SYSTEM-EXCEPTIONS conversion_errors = 1.
        LOOP AT i_dataf_doc.
          CLEAR g_sdata.
          SPLIT i_dataf_doc AT tab INTO g_segname g_sdata.
          CASE g_segname.
    */ HEADER
            WHEN c_e1bpache08.
              PERFORM do_split_ache08.
              MOVE-CORRESPONDING e1bpache08 TO g_docheader.
              IF e1bpache08-doc_date IS INITIAL.
                CLEAR g_docheader-doc_date.
              ENDIF.
              IF e1bpache08-pstng_date IS INITIAL.
                CLEAR g_docheader-pstng_date.
              ENDIF.
              IF e1bpache08-trans_date IS INITIAL.
                CLEAR g_docheader-trans_date.
              ENDIF.
    */ Account GL
            WHEN c_e1bpacgl08.
              PERFORM do_split_acgl08.
              MOVE-CORRESPONDING e1bpacgl08 TO i_accountgl.
              IF e1bpacgl08-pstng_date IS INITIAL.
                CLEAR i_accountgl-pstng_date.
              ENDIF.
              APPEND i_accountgl.
    */ Account Currency & Amounts
            WHEN c_e1bpaccr08.
              PERFORM do_split_accr08.
              MOVE-CORRESPONDING e1bpaccr08 TO i_curramnt.
              APPEND i_curramnt.
    */ kick the line if segment name not filled
            WHEN space.
    */ Other names => Bad file structure !
            WHEN OTHERS.
              g_subrc = 2.
          ENDCASE.
        ENDLOOP. " i_dataf_doc
      ENDCATCH.
      IF sy-subrc = 1 OR
      NOT g_subrc IS INITIAL.
        perform message_output using on.
        exit.
      ENDIF.
    */ Calling the BAPI
      CALL FUNCTION 'BAPI_ACC_GL_POSTING_POST'
        EXPORTING
          documentheader       = g_docheader
        TABLES
          accountgl            = i_accountgl
          currencyamount       = i_curramnt
          return               = i_return
    *   EXTENSION1           =
      LOOP AT i_return WHERE type CA 'AE'.
        g_subrc = 1.
        EXIT.
      ENDLOOP.
      IF NOT g_subrc IS INITIAL.
        perform message_output using on.
      ELSE.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    *        EXPORTING
    *           WAIT          =
    *        IMPORTING
    *           RETURN        =
          perform message_output using off.
      ENDIF.
    ENDFORM.
    *&      Form  do_split_ACHE08
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM do_split_ache08.
      CLEAR e1bpache08.
      SPLIT g_sdata AT tab INTO
      e1bpache08-obj_type
      e1bpache08-obj_key
      e1bpache08-obj_sys
      e1bpache08-username
      e1bpache08-header_txt
      e1bpache08-obj_key_r
      e1bpache08-comp_code
      e1bpache08-ac_doc_no
      e1bpache08-fisc_year
      e1bpache08-doc_date
      e1bpache08-pstng_date
      e1bpache08-trans_date
      e1bpache08-fis_period
      e1bpache08-doc_type
      e1bpache08-ref_doc_no
      e1bpache08-compo_acc
      e1bpache08-reason_rev
    ENDFORM.                    " do_split_ACHE08
    *&      Form  do_split_ACGL08
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM do_split_acgl08.
      CLEAR e1bpacgl08.
      SPLIT  g_sdata AT tab INTO
                      e1bpacgl08-itemno_acc
                      e1bpacgl08-gl_account
                      e1bpacgl08-comp_code
                      e1bpacgl08-pstng_date
                      e1bpacgl08-doc_type
                      e1bpacgl08-ac_doc_no
                      e1bpacgl08-fisc_year
                      e1bpacgl08-fis_period
                      e1bpacgl08-stat_con
                      e1bpacgl08-ref_key_1
                      e1bpacgl08-ref_key_2
                      e1bpacgl08-ref_key_3
                      e1bpacgl08-customer
                      e1bpacgl08-vendor_no
                      e1bpacgl08-alloc_nmbr
                      e1bpacgl08-item_text
                      e1bpacgl08-bus_area
                      e1bpacgl08-costcenter
                      e1bpacgl08-acttype
                      e1bpacgl08-orderid
                      e1bpacgl08-orig_group
                      e1bpacgl08-cost_obj
                      e1bpacgl08-profit_ctr
                      e1bpacgl08-part_prctr
                      e1bpacgl08-wbs_element
                      e1bpacgl08-network
                      e1bpacgl08-routing_no
                      e1bpacgl08-order_itno
    ENDFORM.                    " do_split_ACGL08
    *&      Form  do_split_ACCR08
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM do_split_accr08.
      data: l_filler(100).
      CLEAR  e1bpaccr08.
      SPLIT  g_sdata AT tab INTO
                e1bpaccr08-itemno_acc
                e1bpaccr08-curr_type
                e1bpaccr08-currency
                e1bpaccr08-currency_iso
                e1bpaccr08-amt_doccur
                e1bpaccr08-exch_rate
                e1bpaccr08-exch_rate_v
                l_filler
    ENDFORM.                    " do_split_ACCR08
    *&      Form  message_output
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM message_output using if_error.
      data: l_message(200),
            l_return type i.
       format color 1.
       skip.
       write: / text-020, g_tab_index-from,
                text-021, g_tab_index-to.
       skip.
       if if_error = on.
        write: / icon_red_light as icon, text-030 color 6.
       else.
        write: / icon_green_light as icon, text-031 color 5.
       endif.
       describe table i_return lines l_return.
       if l_return is initial.
         write: / text-032.
       endif.
       loop at i_return.
          CALL FUNCTION 'FORMAT_MESSAGE'
            EXPORTING
              ID              = i_return-id
              LANG            = sy-langu
              NO              = i_return-number
              V1              = i_return-MESSAGE_V1
              V2              = i_return-MESSAGE_V2
              V3              = i_return-MESSAGE_V3
              V4              = i_return-MESSAGE_V4
            IMPORTING
              MSG             = l_message
            EXCEPTIONS
              NOT_FOUND       = 1
              OTHERS          = 2
          check sy-subrc = 0.
          write: / l_message.
       endloop.
    ENDFORM.                    " message_output
    regards
    vijay

  • BAPI for Scheduling Agreement

    any bapi for updating scheduling agreement ME38 txn
    i have checked bapi BAPI_AGREEMENT_MAINTAIN
    but how to maintatin schedulines over there

    first see the documentations.
    Regards
    Peram

  • BAPI for Purchase Order Vendor Confirmations

    Can any body suggest me the BAPI for the purchase order vendor confirmations transaction code me22n - Tab<b>-(Confirmations)</b> alone.
    regs,
    Raja

    Dear Asha,
    Pls find the below code, this handles only the BDC part of the program.Updates only the EKES table thru standard confirmation tab on ME22N.
    Kindly clarify any doubts in this reg.
    regs,
    Raja.
    FORM ins_stdtable .
      DATA:var TYPE c LENGTH 30,
      cstr(02) TYPE n value '01'.
      data istr(02) type n value '00'.
      DATA recno TYPE i.
      data: eblc type c length 5,
      ebli type i.
      DATA: kebeln LIKE utab-ebeln.
      DATA: BEGIN OF indx,
             ebelp type ekes-ebelp,
             eindx type i,
            END OF indx.
      DATA : CNT TYPE I value 1.
      DATA: COUNTER(2) TYPE N VALUE '01',
      ROWS TYPE P.
      DATA: w_textout            LIKE t100-text.
      DATA: gd_update TYPE i,
            gd_lines TYPE i.
      data :waek like indx,
      itabek LIKE TABLE OF waek.
    *Used to stores error information from CALL TRANSACTION Function Module
      DATA: BEGIN OF messtab OCCURS 0.
              INCLUDE STRUCTURE bdcmsgcoll.
      DATA: END OF messtab.
      SELECT MAX( ETENS ) FROM ekes INTO zetens WHERE ebeln =
      ekko-ebeln.
      recno = zetens.
      LOOP AT utab.
        SELECT distinct ebelp INTO CORRESPONDING FIELDS OF TABLE
        itabek  FROM eket  WHERE ebeln = ekko-ebeln.
        loop at itabek into waek.
          ebli =  ebli + 1.
          waek-eindx = ebli.
          modify itabek from waek.
        endloop.
        loop at itabek into waek where ebelp = utab-ebelp.
          eblc = waek-eindx.
          condense eblc.
        endloop.
        AT NEW ebeln.
          PERFORM bdc_dynpro      USING 'SAPLMEGUI' '0014'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=MECHOB'.
          PERFORM bdc_dynpro      USING 'SAPLMEGUI' '0002'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=MEOK'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'MEPO_SELECT-EBELN'.
          PERFORM bdc_field       USING 'MEPO_SELECT-EBELN'
                                         utab-ebeln.
          AT New EBELP.
            perform bdc_dynpro      using 'SAPLMEGUI' '0014'.
            perform bdc_field       using 'BDC_CURSOR'
                                      'DYN_6000-LIST'.
            perform bdc_field       using 'DYN_6000-LIST'
                                     eblc.
            perform bdc_field       using 'BDC_OKCODE'
                                          '=DDOWN3200'.
            PERFORM bdc_dynpro      USING 'SAPLMEGUI' '0014'.
            PERFORM bdc_field       USING 'BDC_OKCODE'
                                          '=TABIDT15'.
            perform bdc_field       using 'DYN_6000-LIST'
                                    eblc.
            PERFORM bdc_dynpro      USING 'SAPLMEGUI' '0014'.
            PERFORM bdc_field       USING 'BDC_OKCODE'
                                          'PICK'.
          ENDAT.
        ENDAT.
        PERFORM bdc_field       USING 'DYN_6000-LIST'
                                          eblc.
        recno = recno + 1.
        cstr = recno.
        counter = cstr.
    *This is to check whether the scheduled line item exceeding 12 rows. if so, use *page up
        if counter >= 13.
          rows = counter MOD 13.
          istr = ( ( counter - rows ) / 13 ).
          do istr times.
            perform bdc_dynpro      using 'SAPLMEGUI' '0014'.
            perform bdc_field       using 'BDC_OKCODE'
                                    '=EINB_CREATE'.
          enddo.
          DO 2 TIMES.
            perform bdc_dynpro      using 'SAPLMEGUI' '0014'.
            perform bdc_field       using 'BDC_OKCODE'
                                    '=P+'.
          enddo.
          COUNTER = '03'.
          cstr = '03'.
        ENDIF.
        CONCATENATE 'EKES-EBTYP('  cstr  ')' INTO var.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                          var.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '/00'.
        PERFORM bdc_field       USING var
                                    utab-ebtyp.
        CONCATENATE 'RM06E-EEIND('  cstr  ')' INTO var.
        PERFORM bdc_field       USING var
                                       utab-eeind.
        CONCATENATE 'EKES-MENGE('  cstr  ')' INTO var.
        PERFORM bdc_field       USING var
                                       utab-menge.
        CONCATENATE 'J_3ASZDI-J_3ASIZED('  cstr  ')' INTO var.
        PERFORM bdc_field       USING var
                                       utab-j_3asize.
        AT END OF Ebelp.
          PERFORM bdc_dynpro      USING 'SAPLMEGUI' '0014'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=MESAVE'.
          perform bdc_dynpro      using 'SAPLMEGUI' '0014'.
          perform bdc_field       using 'BDC_OKCODE'
                                    '/00'.
          CALL TRANSACTION 'ME22N' USING bdcdata MODE 'E'.
          IF sy-subrc EQ 0.
            savedone = 'Y'.
            saveflag = 'Y'.
            initflag = 'N'.
            MESSAGE 'SAVED' TYPE 'I'.
          else.
            saveflag = 'N'.
            savedone = 'N'.
            initflag = 'Y'.
            MESSAGE 'Not Saved' Type 'I'.
          endif.
          CLEAR: bdcdata.
          REFRESH bdcdata.
        ENDAT.
      ENDLOOP.
    ENDFORM.
    Hope this will help u

  • BAPI for Partial Confirmation CO11N

    Dear Gurus,
    REG : BAPI
    How to get the actual activites for partial confirmation of qty
    we have tried some bapis like for getting activites we have used
    bapi_prodordconf_get_tt_prop
    but in this bapi it is calculating total qty i.e, order qty not for the yeild qty.
    I need to get the yeild qty planned activites
    Tks
    Murali

    Hi,
    Check the Bapis
    BAPI_PRODORDCONF_CREATE_TT 
    BAPI_PRODORDCONF_CREATE_HDR
    Regards,
    Raj.

Maybe you are looking for