Regarding  bapi ( urgent)

hi
w t is   the  difference   b/w   of BAPIMEPOHEADERX,BAPIMEPOHEADER
wr can i use   this   BAPIMEPOHEADERX,
Regards
Spandana

hi spandana,
check this sample program.
*& Report  ZMM_PO_CREATE1                                              *
REPORT  ZMM_PO_CREATE1                          .
data : POHEADER like BAPIMEPOHEADER occurs 0 with header line,
       POHEADERX like BAPIMEPOHEADERX occurs 0 with header line,
       POITEM like BAPIMEPOITEM occurs 0 with header line,
       POITEMX like BAPIMEPOITEMX occurs 0 with header line,
       POESLLC like BAPIESLLC occurs 0 with header line,
       POACCOUNT like BAPIMEPOACCOUNT occurs 0 with header line,
       POACCOUNTX like BAPIMEPOACCOUNTX occurs 0 with header line,
       POCONDHEADER like BAPIMEPOCONDHEADER occurs 0 with header line,
       POCONDHEADERX like BAPIMEPOCONDHEADERX occurs 0 with header line,
       POCOND like BAPIMEPOCOND occurs 0 with header line,
       RETURN like BAPIRET2 occurs 0 with header line.
data : po_no(10).
data : begin of it_head occurs 0,
       ref(10),
       bsart like ekko-bsart,
       lifnr like ekko-lifnr,
       ekorg like ekko-ekorg,
       ekgrp like ekko-ekgrp,
       bukrs like ekko-bukrs,
       verkf like ekko-verkf,
       telf1 like ekko-telf1,
       ihrez like ekko-ihrez,
       unsez like ekko-unsez,
       kdatb(10),
       kdate(10),
       end of it_head.
data : begin of it_det occurs 0,
       ref(10),
       knttp like ekpo-knttp,
       pstyp like ekpo-pstyp,
       txz01 like ekpo-txz01,
       matkl like ekpo-matkl,
       werks like ekpo-werks,
       afnam like ekpo-afnam,
       ktext1 like esll-ktext1,
       srvpos like esll-srvpos,
       frmval1 like esll-frmval1,
       frmval2 like esll-frmval2,
       menge like esll-menge,
       kostl like eskn-kostl,
       sakto like eskn-sakto,
       zzcode like eskn-zzcode,
       kbetr like konv-kbetr,
       end of it_det.
data : c_col1 TYPE i VALUE '0001',
       c_col2 TYPE i VALUE '0002',
       c_col3 TYPE i VALUE '0003',
       c_col4 TYPE i VALUE '0004',
       c_col5 TYPE i VALUE '0005',
       c_col6 TYPE i VALUE '0006',
       c_col7 TYPE i VALUE '0007',
       c_col8 TYPE i VALUE '0008',
       c_col9 TYPE i VALUE '0009',
       c_col10 TYPE i VALUE '0010',
       c_col11 TYPE i VALUE '0011',
       c_col12 TYPE i VALUE '0012',
       c_col13 TYPE i VALUE '0013',
       c_col14 TYPE i VALUE '0014',
       c_col15 TYPE i VALUE '0015',
       c_col16 TYPE i VALUE '0016'.
data : v_currentrow type i,
       v_currentrow1 type i.
data : itab_head like ALSMEX_TABLINE occurs 0 with header line,
       itab_det like ALSMEX_TABLINE occurs 0 with header line.
data : file_head type RLGRAP-FILENAME,
       file_item type RLGRAP-FILENAME.
file_head = 'C:\Documents and Settings\abap.fi\Desktop\head.xls'.
file_item = 'C:\Documents and Settings\abap.fi\Desktop\item.xls'.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
  EXPORTING
    filename                      = file_head
    i_begin_col                   = 1
    i_begin_row                   = 1
    i_end_col                     = 12
    i_end_row                     = 50
  tables
    intern                        = itab_head
EXCEPTIONS
  INCONSISTENT_PARAMETERS       = 1
  UPLOAD_OLE                    = 2
  OTHERS                        = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
  EXPORTING
    filename                      = file_item
    i_begin_col                   = 1
    i_begin_row                   = 1
    i_end_col                     = 16
    i_end_row                     = 50
  tables
    intern                        = itab_det
EXCEPTIONS
  INCONSISTENT_PARAMETERS       = 1
  UPLOAD_OLE                    = 2
  OTHERS                        = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF itab_head[] IS INITIAL.
   WRITE:/ 'No Header Data  Exists '.
   STOP.
ELSE.
sort itab_head by row col.
read table itab_head index 1.
v_currentrow = itab_head-row.
loop at itab_head.
if itab_head-row ne v_currentrow.
   APPEND it_head.
   v_currentrow = itab_head-row.
   ENDIF.
CASE itab_head-col.
        WHEN  c_col1.
          it_head-ref = itab_head-value.
        WHEN  c_col2.
          it_head-bsart = itab_head-value.
        WHEN c_col3.
          it_head-lifnr = itab_head-value.
        WHEN c_col4.
          it_head-ekorg = itab_head-value.
        WHEN c_col5.
          it_head-ekgrp = itab_head-value.
        WHEN c_col6.
          it_head-bukrs = itab_head-value.
        WHEN c_col7.
          it_head-verkf = itab_head-value.
        WHEN c_col8.
          it_head-telf1 = itab_head-value.
        WHEN c_col9.
          it_head-ihrez = itab_head-value.
        WHEN c_col10.
          it_head-unsez = itab_head-value.
        WHEN c_col11.
          it_head-kdatb = itab_head-value.
        WHEN c_col12.
          it_head-kdate = itab_head-value.
ENDCASE.
ENDLOOP.
APPEND it_head.
CLEAR it_head.
ENDIF.
IF itab_det[] IS INITIAL.
   WRITE:/ 'No Item Data  Exists '.
   STOP.
ELSE.
sort itab_det by row col.
read table itab_det index 1.
v_currentrow1 = itab_det-row.
loop at itab_det.
if itab_det-row ne v_currentrow1.
   APPEND it_det.
   v_currentrow1 = itab_det-row.
   ENDIF.
CASE itab_det-col.
        WHEN  c_col1.
          it_det-ref = itab_det-value.
        WHEN  c_col2.
          it_det-knttp = itab_det-value.
        WHEN c_col3.
          it_det-pstyp = itab_det-value.
        WHEN c_col4.
          it_det-txz01 = itab_det-value.
        WHEN c_col5.
          it_det-matkl = itab_det-value.
        WHEN c_col6.
          it_det-werks = itab_det-value.
        WHEN c_col7.
          it_det-afnam = itab_det-value.
        WHEN c_col8.
          it_det-srvpos = itab_det-value.
        WHEN c_col9.
          it_det-ktext1 = itab_det-value.
        WHEN c_col10.
          it_det-frmval1 = itab_det-value.
        WHEN c_col11.
          it_det-frmval2 = itab_det-value.
        WHEN c_col12.
          it_det-menge = itab_det-value.
        WHEN c_col13.
          it_det-kostl = itab_det-value.
        WHEN c_col14.
          it_det-sakto = itab_det-value.
        WHEN c_col15.
          it_det-zzcode = itab_det-value.
        WHEN c_col16.
          it_det-kbetr = itab_det-value.
ENDCASE.
ENDLOOP.
APPEND it_det.
CLEAR it_det.
ENDIF.
loop at it_head.
poheader-doc_type = it_head-bsart.
poheader-vendor = it_head-lifnr.
poheader-purch_org = it_head-ekorg.
poheader-pur_group = it_head-ekgrp.
poheader-comp_code = it_head-bukrs.
poheader-sales_pers = it_head-verkf.
poheader-telephone = it_head-telf1.
poheader-REF_1 = it_head-ihrez.
poheader-OUR_REF = it_head-unsez.
poheader-VPER_START = it_head-kdatb.
poheader-VPER_END = it_head-kdate.
loop at it_det where ref = it_head-ref.
  poitem-acctasscat = it_det-knttp.
  poitem-item_cat = it_det-pstyp.
  poitem-short_text = it_det-txz01.
  poitem-matl_group = it_det-matkl.
  poitem-plant = it_det-werks.
  poitem-PREQ_NAME = it_det-afnam.
  POESLLC-SERVICE = it_det-srvpos.
  POESLLC-SHORT_TEXT = it_det-ktext1.
  POESLLC-FORM_VAL1 = it_det-frmval1.
  POESLLC-FORM_VAL2 = it_det-frmval2.
  POESLLC-QUANTITY = it_det-menge.
  POACCOUNT-COSTCENTER = it_det-kostl.
  POACCOUNT-GL_ACCOUNT = it_det-sakto.
  POCONDHEADER-COND_TYPE = 'R000'.
  POCONDHEADER-COND_VALUE = it_det-kbetr.
endloop.
endloop.
poheaderx-doc_type = 'X'.
poheaderx-vendor = 'X'.
poheaderx-purch_org = 'X'.
poheaderx-pur_group = 'X'.
poheaderx-comp_code = 'X'.
poheaderx-sales_pers = 'X'.
poheaderx-telephone = 'X'.
poheaderx-REF_1 = 'X'.
poheaderx-OUR_REF = 'X'.
poheaderx-VPER_START = 'X'.
poheaderx-VPER_END = 'X'.
poitemx-acctasscat = 'X'.
poitemx-item_cat = 'X'.
poitemx-short_text = 'X'.
poitemx-matl_group = 'X'.
poitemx-plant = 'X'.
poitemx-PREQ_NAME = 'X'.
*POESLLCx-SHORT_TEXT = 'X'.
POACCOUNTx-COSTCENTER = 'X'.
POACCOUNTx-GL_ACCOUNT = 'X'.
POCONDHEADER-cond_type = 'X'.
CALL FUNCTION 'BAPI_PO_CREATE1'
  EXPORTING
    poheader                     = poheader
   POHEADERX                    = poheaderx
  POADDRVENDOR                 =
  TESTRUN                      =
  MEMORY_UNCOMPLETE            =
  MEMORY_COMPLETE              =
  POEXPIMPHEADER               =
  POEXPIMPHEADERX              =
  VERSIONS                     =
  NO_MESSAGING                 =
  NO_MESSAGE_REQ               =
  NO_AUTHORITY                 =
  NO_PRICE_FROM_PO             =
IMPORTING
   EXPPURCHASEORDER             = po_no
  EXPHEADER                    =
  EXPPOEXPIMPHEADER            =
TABLES
   RETURN                       = return
   POITEM                       = poitem
   POITEMX                      = poitemx
  POADDRDELIVERY               =
  POSCHEDULE                   =
  POSCHEDULEX                  =
   POACCOUNT                    = poaccount
  POACCOUNTPROFITSEGMENT       =
   POACCOUNTX                   = poaccountx
   POCONDHEADER                 = pocondheader
   POCONDHEADERX                = pocondheaderx
  POCOND                       =
  POCONDX                      =
  POLIMITS                     =
  POCONTRACTLIMITS             =
   POSERVICES                   = poesllc
  POSRVACCESSVALUES            =
  POSERVICESTEXT               =
  EXTENSIONIN                  =
  EXTENSIONOUT                 =
  POEXPIMPITEM                 =
  POEXPIMPITEMX                =
  POTEXTHEADER                 =
  POTEXTITEM                   =
  ALLVERSIONS                  =
  POPARTNER                    =
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
   WAIT          =
IMPORTING
   RETURN        =
if sy-subrc = 0.
loop at return.
write return-MESSAGE_V1.
write po_no.
endloop.
endif.
reward points if hlpful.

Similar Messages

  • Regarding BAPI Docu

    Hi,
    I want to learn BAPI,can anyone send me the documentation regarding BAPI.
    Like what is BAPI?
    use of BAPI?
    When the BAPI will be used..........
    Thanx in advance.

    Hi,
    BAPI-step by step
    http://www.sapgenie.com/abap/bapi/example.htm
    list of all bapis
    http://www.planetsap.com/LIST_ALL_BAPIs.htm
    for BAPI's
    http://www.sappoint.com/abap/bapiintro.pdf
    http://www.sappoint.com/abap/bapiprg.pdf
    http://www.sappoint.com/abap/bapiactx.pdf
    http://www.sappoint.com/abap/bapilst.pdf
    http://www.sappoint.com/abap/bapiexer.pdf
    http://service.sap.com/ale
    http://service.sap.com/bapi
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
    http://www.planetsap.com/Bapi_main_page.htm
    http://www.topxml.com/sap/sap_idoc_xml.asp
    http://www.sapdevelopment.co.uk/
    http://www.sapdevelopment.co.uk/java/jco/bapi_jco.pdf
    Also refer to the following links..
    www.sappoint.com/abap/bapiintro.pdf
    www.sap-img.com/bapi.htm
    www.sap-img.com/abap/bapi-conventions.htm
    www.planetsap.com/Bapi_main_page.htm
    www.sapgenie.com/abap/bapi/index.htm
    Checkout !!
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    http://techrepublic.com.com/5100-6329-1051160.html#
    http://www.sap-img.com/bapi.htm
    http://www.sap-img.com/abap/bapi-conventions.htm
    http://www.sappoint.com/abap/bapiintro.pdf
    BAPI
    http://help.sap.com/saphelp_46c/helpdata/en/9b/417f07ee2211d1ad14080009b0fb56/frameset.htm
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    http://www.sapgenie.com/abap/bapi/example.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
    u can check the below the material also
    what is BAPI?
    BAPI stands for Business API(Application Program Interface).
    I have answered this question before..
    A BAPI is remotely enabled function module ie it can be invoked from remote programs like standalone JAVA programs, web interface etc..
    You can make your function module remotely enabled in attributes of Function module but
    A BAPI are standard SAP function modules provided by SAP for remote access. Also they are part of Businees Objest Repository(BOR).
    BAPI are RFC enabled function modules. the difference between RFc and BAPI are business objects. You create business objects and those are then registered in your BOR (Business Object Repository) which can be accessed outside the SAP system by using some other applications (Non-SAP) such as VB or JAVA. in this case u only specify the business object and its method from external system in BAPI there is no direct system call. while RFC are direct system call Some BAPIs provide basic functions and can be used for most SAP business object types. These BAPIs should be implemented the same for all business object types. Standardized BAPIs are easier to use and prevent users having to deal with a number of different BAPIs. Whenever possible, a standardized BAPI must be used in preference to an individual BAPI.
    The following standardized BAPIs are provided:
    Reading instances of SAP business objects
    GetList ( ) With the BAPI GetList you can select a range of object key values, for example, company codes and material numbers.
    The BAPI GetList() is a class method.
    GetDetail() With the BAPI GetDetail() the details of an instance of a business object type are retrieved and returned to the calling program. The instance is identified via its key. The BAPI GetDetail() is an instance method. BAPIs that can create, change or delete instances of a business object type
    The following BAPIs of the same object type have to be programmed so that they can be called several times within one transaction. For example, if, after sales order 1 has been created, a second sales order 2 is created in the same transaction, the second BAPI call must not affect the consistency of the sales order 2. After completing the transaction with a COMMIT WORK, both the orders are saved consistently in the database.
    Create( ) and CreateFromData! ( )
    The BAPIs Create() and CreateFromData() create an instance of an SAP business object type, for example, a purchase order. These BAPIs are class methods.
    Change( )
    The BAPI Change() changes an existing instance of an SAP business object type, for example, a purchase order. The BAPI Change () is an instance method.
    Delete( ) and Undelete( ) The BAPI Delete() deletes an instance of an SAP business object type from the database or sets a deletion flag.
    The BAPI Undelete() removes a deletion flag. These BAPIs are instance methods.
    Cancel ( ) Unlike the BAPI Delete(), the BAPI Cancel() cancels an instance of a business object type. The instance to be cancelled remains in the database and an additional instance is created and this is the one that is actually canceled. The Cancel() BAPI is an instance method.
    Add<subobject> ( ) and Remove<subobject> ( ) The BAPI Add<subobject> adds a subobject to an existing object inst! ance and the BAPI and Remove<subobject> removes a subobject from an object instance. These BAPIs are instance methods.
    Example Code
    U need to give the step_nr, item_nr, cond_count and cond_type so the correct conditon will be updated. If no condition exists for the given parameters, a new condition will be created.
    U can find these parameters for a particular condition type in table KONV.
    *& Form saveTransactionJOCR
    text
    --> p1 text
    <-- p2 text
    FORM saveTransactionJOCR .
    data: salesdocument like BAPIVBELN-VBELN,
    order_header_inx like bapisdh1x,
    order_header_in like bapisdh1,
    return type standard table of bapiret2 with header line,
    conditions_in type standard table of bapicond with header line,
    conditions_inx type standard table of bapicondx with header line,
    logic_switch like BAPISDLS,
    step_nr like conditions_in-cond_st_no,
    item_nr like conditions_in-itm_number,
    cond_count like conditions_in-cond_count,
    cond_type like conditions_in-cond_type.
    salesdocument = wa_order_information-VBELN.
    LOGIC_SWITCH-COND_HANDL = 'X'.
    order_header_inx-updateflag = 'U'.
    conditions
    clear conditions_in[].
    clear conditions_inx[].
    clear: step_nr,
    item_nr,
    cond_count,
    cond_type.
    step_nr = '710'.
    item_nr = '000000'.
    cond_count = '01'.
    cond_type = 'ZCP2'.
    CONDITIONS_IN-ITM_NUMBER = item_nr.
    conditions_in-cond_st_no = step_nr.
    CONDITIONS_IN-COND_COUNT = cond_count.
    CONDITIONS_IN-COND_TYPE = cond_type.
    CONDITIONS_IN-COND_VALUE = 666.
    CONDITIONS_IN-CURRENCY = 'EUR'.
    append conditions_in.
    CONDITIONS_INX-ITM_NUMBER = item_nr.
    conditions_inx-cond_st_no = step_nr.
    CONDITIONS_INX-COND_COUNT = cond_count.
    CONDITIONS_INX-COND_TYPE = cond_type.
    CONDITIONS_INX-UPDATEFLAG = 'U'.
    CONDITIONS_INX-COND_VALUE = 'X'.
    CONDITIONS_INX-CURRENCY = 'X'.
    append conditions_inx.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
    EXPORTING
    SALESDOCUMENT = salesdocument
    ORDER_HEADER_IN = order_header_in
    ORDER_HEADER_INX = order_header_inx
    LOGIC_SWITCH = logic_switch
    TABLES
    RETURN = return
    CONDITIONS_IN = conditions_in
    CONDITIONS_INX = conditions_inx
    if return-type ne 'E'.
    commit work and wait.
    endif.
    ENDFORM. " saveTransactionJOCR
    Bdc to Bapi
    The steps to be followed are :
    1. Find out the relevant BAPI (BAPI_SALESORDER_CHANGE for VA02).
    [for VA01 use BAPI_SALESORDER_CREATEFROMDAT2]
    2. Create a Z program and call the BAPi (same as a Funtion module call).
    2. Now, if you see this BAPi, it has
    -> Importing structures.
    eg: SALESDOCUMENT: this will take the Sales order header data as input.
    -> Tables parameters:
    eg: ORDER_ITEM_IN: this will take the line item data as input.
    Note :
    Only specify fields that should be changed
    Select these fields by entering an X in the checkboxes
    Enter a U in the UPDATEFLAG field
    Always specify key fields when changing the data, including in the checkboxes
    The configuration is an exception here. If this needs to be changed, you need to complete it again fully.
    Maintain quantities and dates in the schedule line data
    Possible UPDATEFLAGS:
    U = change
    D = delete
    I = add
    Example
    1. Delete the whole order
    2. Delete order items
    3. Change the order
    4. Change the configuration
    Notes
    1. Minimum entry:
    You must enter the order number in the SALESDOCUMENT structure.
    You must always enter key fields for changes.
    You must always specify the update indicator in the ORDER_HEADER_INX.
    2. Commit control:
    The BAPI does not run a database Commit, which means that the application must trigger the Commit so that the changes are read to the database. To do this, use the BAPI_TRANSACTION_COMMIT BAPI.
    For further details... refer to the Function Module documentation for the BAPi.
    Bapi to VB(Visual Basic)
    Long back I had used the following flow structure to acheive the same.
    Report -> SM59 RFC destination -> COM4ABAP -> VB.exe
    my report uses the rfc destination to create a COM session with com4abap. com4abap calls the vb.exe and manages the flow of data between sap and vb exe.
    You need to have com4abap.exe
    If com4abap is installed you will find it in sapgui installatin directory , C:\Program Files\SAPpc\sapgui\RFCSDK\com4abap.
    else refer OSS note 419822 for installation of com4abap
    after making the settings in com4abap to point to the vb program and setting up rfc destination in sm59 to point to com4abap session , you can use the following function modules to call the vb code.
    for setting up com4abap and rfc destination please refer to the documentation for com4abap.
    Invoke NEW DCOM session
    call function 'BEGIN_COM_SESSION'
    exporting
    service_dest = service_dest "(this will be a RFC destination created in SM59)
    importing
    worker_dest = worker_dest
    exceptions
    connect_to_dcom_service_failed = 1
    connect_to_dcom_worker_failed = 2
    others = 3.
    call function 'create_com_instance' destination worker_dest
    exporting
    clsid = g_c_clsid
    typelib = g_c_typelib
    importing
    instid = g_f_oid
    exceptions
    communication_failure = 1 message g_f_msg
    system_failure = 2 message g_f_msg
    invalid_instance_id = 3
    others = 4.
    call function 'com_invoke' destination worker_dest
    exporting
    %instid = g_f_oid
    %method = 'UpdatePDF'
    sntemp = g_v_const_filent
    snsysid = sy-sysid
    snflag = 'N'
    tables
    rssaptable = g_t_pdfdetail1
    %return = g_t_pdfdetail1 "t_test
    exceptions
    communication_failure = 1 message g_f_msg
    system_failure = 2 message g_f_msg
    invalid_instance_id = 3
    others = 4.
    then close the com session , using
    FM delete_com_instance
    FM END_COM_SESSION
    Regards,
    Priyanka.

  • Regarding BAPI HRXSS_CAT_WD_RECORD

    Hi Experts,
    This is regarding BAPI HRXSS_CAT_WD_RECORD.for  this BAPI ,  I am providing inputs like this
    IV_PERNR = 90030.
    IV_ACTION  = COPY_FROM_PREVIOUS_PERIOD.
    IV_BEGDA = 09/20/2008 .
    IV_ENDDA = 09/26/2008 .
    So this BAPI has to copy the previous period(week) data to current week what I provided in the input area.But it is not returing (it is not copying previous week data).means COPY_FROM_PREVIOUS_PERIOD action is not working in BAPI.
    Is there any BAPI for meeting this requirement. I want copy the previous weeks time sheet data to week dates provided in input. This functionality is available in Tcode in cat22.
    Regards,
    Vinod

    You may use the following BAPI (actual BAPI these one) to fulfil your requirement:
    - [BAPI_CATIMESHEETRECORD_GETLIST|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=bapi_catimesheetrecord_getlist&adv=false&sortby=cm_rnd_rankvalue]
    - [BAPI_CATIMESHEETMGR_INSERT|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=bapi_catimesheetmgr_insert&adv=false&sortby=cm_rnd_rankvalue]
    Regards

  • Error while creating BOM using BAPI (urgent)

    Hi all,
    Thanks for ur help. i am getting some error while creting a BOM using that BAPI
    BAPI_MATERIAL_BOM_GROUP_CREATE.
    errors are
    1) Error/warning when checking the structure of the BOM group with ID =
    2)Alternative does not exist for material assignment to material BAPIBOMFG1
    is it mandatory to pass the bom group id to this bapi?
    In bomgroup structure , i am not passing anything to BOM_GROUP field.
    is it mandatory to pass this data? i am giving my coding below.plz suggest , where i am making mistake. it is urgent.
    regards
    pabitra
    report z_bom_create
    line-size 132
    line-count 65
    no standard page heading.
    *-- DATA DECLARATION--
    include <icon> .
    *---Tables
    tables : s076, t100, marc .
    *---Types
    types : begin of t_upload, " Upload file data
    col1(18),
    col2(10),
    col3(30),
    col4(12),
    col5(50),
    end of t_upload,
    begin of t_split,
    location like stpu-ebort,
    end of t_split.
    data:begin of i_return occurs 10.
    include structure bapiret2.
    data:end of i_return.
    types:begin of t_item."occurs 10.
    include structure BAPI1080_ITM_C.
    types:end of t_item.
    types:begin of t_subitem." occurs 10.
    include structure BAPI1080_SUI_C.
    types:end of t_subitem.
    types:begin of t_header." occurs 10.
    include structure BAPI1080_MBM_C.
    types:end of t_header.
    types:begin of t_bomgroup." occurs 10.
    include structure BAPI1080_BGR_C.
    types:end of t_bomgroup.
    types:begin of t_variant." occurs 10.
    include structure BAPI1080_BOM_C.
    types:end of t_variant.
    *--- Tables
    data: i_upload type standard table of t_upload, " to hold data
    i_upload1 type standard table of t_upload,
    i_split type standard table of t_split,
    i_item type standard table of t_item,
    i_subitem type standard table of t_subitem,
    i_header type standard table of t_header,
    i_bomgroup type standard table of t_bomgroup,
    i_variant type standard table of t_variant.
    data: wa_upload type t_upload, " to hold file data,
    wa_upload1 type t_upload, " to hold plan data,
    wa_split type t_split,
    wa_item type t_item,
    wa_subitem type t_subitem,
    wa_header type t_header,
    wa_bomgroup type t_bomgroup,
    wa_variant type t_variant.
    data:v_matnr like mara-matnr,
    v_start like sy-index,
    v_count(3) type c.
    *--Constants
    data: c_dot type c value '.',
    c_x type c value 'X',
    c_comma type c value ','.
    -------Selection Screen Design -
    *Selection screen for input of upload file address
    selection-screen skip 2.
    selection-screen begin of block blk1 with frame.
    parameters : p_file like rlgrap-filename obligatory .
    parameters : p_matnr like mara-matnr obligatory,
    p_werks like marc-werks obligatory memory id wrk,
    p_stlan like afko-stlan obligatory default '1' .
    selection-screen end of block blk1.
    ---AT SELECTION SCREEN -
    at selection-screen on value-request for p_file.
    *--For popup to select file.
    perform f_give_help.
    at selection-screen on p_matnr.
    perform f_check_matnr.
    -----START OF SELECTION -
    *--Data upload using WS_Upload.
    perform f_get_data.
    perform f_get_bom_data.
    perform f_get_bom_data1.
    perform f_call_bapi.
    *& Form f_give_help
    text
    --> p1 text
    <-- p2 text
    FORM f_give_help.
    call function 'WS_FILENAME_GET'
    exporting
    mask = ',.,..'
    mode = 'O'
    importing
    filename = p_file
    exceptions
    inv_winsys = 1
    no_batch = 2
    selection_cancel = 3
    selection_error = 4
    others = 5.
    if sy-subrc <> 0 and not sy-msgty is initial.
    message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    endif.
    ENDFORM. " f_give_help
    *& Form f_check_matnr
    text
    --> p1 text
    <-- p2 text
    FORM f_check_matnr.
    CALL FUNCTION 'BAPI_MAT_BOM_EXISTENCE_CHECK'
    EXPORTING
    MATERIAL = p_matnr
    PLANT = p_werks
    BOMUSAGE = '1'
    VALID_FROM_DATE =
    VALID_TO_DATE =
    TABLES
    RETURN = i_return.
    ENDFORM. " f_check_matnr
    *& Form f_get_data
    text
    --> p1 text
    <-- p2 text
    FORM f_get_data.
    call function 'WS_UPLOAD'
    exporting
    CODEPAGE = ' '
    filename = p_file
    filetype = 'DAT'
    tables
    data_tab = i_upload
    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.
    ENDFORM. " f_get_data
    *& Form f_get_bom_data
    text
    --> p1 text
    <-- p2 text
    FORM f_get_bom_data.
    delete i_upload where col1 is initial.
    delete i_upload where col1 cs 'ITEM'.
    read table i_upload into wa_upload with key col1 = 'FINISHED GOOD:'.
    if sy-subrc = 0.
    v_matnr = wa_upload-col2.
    if v_matnr <> p_matnr.
    message e001(zl) with p_matnr.
    endif.
    else.
    message e000(zl).
    endif.
    ENDFORM. " f_get_bom_data
    *& Form f_get_bom_data1
    text
    --> p1 text
    <-- p2 text
    FORM f_get_bom_data1.
    loop at i_upload into wa_upload where col1 CS 'FINISHED GOOD'.
    v_start = sy-tabix + 1.
    loop at i_upload into wa_upload1 from v_start .
    if wa_upload1-col1 cs 'FINISHED GOOD'.
    exit.
    else.
    perform f_split_upload_data.
    endif.
    endloop.
    endloop.
    ENDFORM. " f_get_bom_data1
    *& Form f_split_upload_data
    text
    --> p1 text
    <-- p2 text
    FORM f_split_upload_data.
    if not wa_upload1-col5 is initial.
    if wa_upload1-col5 cs c_comma.
    split wa_upload1-col5 at c_comma into table i_split.
    loop at i_split into wa_split.
    v_count = v_count + 1.
    endloop.
    if wa_upload1-col4 <> v_count.
    wa_upload1-col4 = v_count.
    endif.
    clear wa_upload1-col5.
    clear wa_split.
    loop at i_split into wa_split.
    wa_upload1-col5 = wa_split-location.
    append wa_upload1 to i_upload1.
    endloop.
    else.
    append wa_upload1 to i_upload1.
    endif.
    else.
    append wa_upload1 to i_upload1.
    endif.
    ENDFORM. " f_split_upload_data
    *& Form f_call_bapi
    text
    --> p1 text
    <-- p2 text
    FORM f_call_bapi.
    clear wa_upload1.
    wa_header-material = p_matnr.
    wa_header-plant = p_werks.
    wa_header-bom_usage = p_stlan.
    append wa_header to i_header.
    wa_bomgroup-bom_usage = p_stlan.
    wa_bomgroup-created_in_plant = p_werks.
    append wa_bomgroup to i_bomgroup.
    wa_variant-alternative_bom = 1.
    wa_variant-base_qty = 1.
    wa_variant-valid_from_date = sy-datum.
    append wa_variant to i_variant.
    loop at i_upload1 into wa_upload1.
    wa_item-item_no = wa_upload1-col1.
    wa_item-item_cat = wa_upload1-col2.
    wa_item-component = wa_upload1-col3.
    wa_item-comp_qty = wa_upload1-col4.
    append wa_item to i_item.
    wa_subitem-subitem_qty = '1'.
    wa_subitem-installation_point = wa_upload1-col5.
    append wa_subitem to i_subitem.
    endloop.
    CALL FUNCTION 'BAPI_MATERIAL_BOM_GROUP_CREATE'
    EXPORTING
    TESTRUN = ' '
    ALL_ERROR = ' '
    TABLES
    BOMGROUP = i_bomgroup
    VARIANTS = i_variant
    ITEMS = i_item
    SUBITEMS = i_subitem
    MATERIALRELATIONS = i_header
    ITEMASSIGNMENTS =
    SUBITEMASSIGNMENTS =
    TEXTS =
    RETURN = i_return.
    if i_return[] is initial.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    *write: /'BOM created:', stpo-stlnr.
    else.
    *if not i_return[] is initial.
    loop at i_return.
    IF i_return-TYPE = 'E'.
    errmsg-type = i_return-type.
    errmsg-line = i_return-message.
    append errmsg.
    ULINE /1(108).
    write:/ icon_led_RED as icon, i_return-MESSAGE.
    ULINE /1(108).
    ENDIF.
    IF i_return-TYPE = 'W'.
    errmsg-type = i_return-type.
    errmsg-line = i_return-message.
    append errmsg.
    ULINE /1(108).
    write:/ icon_led_YELLOW as icon, i_return-MESSAGE.
    ULINE /1(108).
    ENDIF.
    ENDLOOP.
    *write: / i_return-id, i_return-number, i_return-message(80).
    *endloop.
    *write: /'Error'.
    endif.
    ENDFORM. " f_call_bapi

    Hi shashi,
    Thanks for ur help.i tried after passing the group but it is giving same error.
    i am getting the error
    "Error/warning when checking the structure of the BOM group with ID= test"
    i am gettig the above error when i put bomgroup-bom_group_identification = 'TEST'.
    whatever i am putting in this field, the same error is comming having different value.
    if i put--- bomgroup-bom_group_identification = ' '. then i will get error
    "Error/warning when checking the structure of the BOM group with ID=
    if i omit that field, then also , i am getting same error.
    plz suggest what r the fields i need to pass for BOMGROUP structure for that bapi?
    regards
    pabitra

  • Objects_objref_not_assigned  - error ( while executing the bapi) - urgent

    Hi,
    i designed a bapi  which is internally calling a transaction (i.e. TRIP ), and returning the status.
    when i call this in back end(abap) side it is giving the desired results correctly.  but when i call the bapi from the front end side , i am getting the error : objects_objref_not_assigned.
    what could be the reasons.
    for your information : we have provided the correct user name and password to execute this tcode.
    regards
    giri

    hi,
    thx for your response, but in the front end side they are calling the rfc using the JCO connection.
    for  your information other bapi's are all working the way which we call.
    regards
    giri
    since it's very urgent if you give your phone no or email .id , it would be helpful.
    thx

  • Regarding BAPI for Creat Class Hierarchy

    Hi ,
    Urgently i need a BAPI for to create Class_Hierarchy and also need what are the parameters to pass for that BAPI .
    Please any body help out this is urgent.
    thanks in advance,
    krishna.

    Hi,
    The relavant BAPI is BAPI_OBJCL_CREATE.
    You can read the characteristics by using BAPI: BAPI_OBJCL_GETDETAIL
    Plz check other BAPIs in FuGr: CLBPA which might help you. You can find FM Documentation for most of the BAPIs in this FuGr.
    If this is a one time load, I suggest you to take up this task by LSMW:
    Object               0130   Classification
    Method               0001   Batch input  
    Program name         RCCLBI02            
    Program type         B   Batch input    
    Hope this helps.
    Best Regards, Murugesh AS

  • To create Multilevel BOM---- BAPI (urgent)

    Hi all,
    i am using BAPI_MATERIAL_BOM_GROUP_CREATE to create a <u><b>MULTI LEVEL</b></u> BOM in sap. but i am not getting any field for <b>LEVEL</b> in this BAPI.so,  can i create a multilevel bom without a level ?
    can u plz suggest, how can i use this BAPI to create a <b>multi level</b> bom?
    is there any field relating to assembly indicator (stlkz) in this BAPI?i am not getting this field.plz suggest.
    any idea will be highly appreaciated.
    Regards
    pabitra

    Hi eswar,
    Thanks for ur help. i am getting some error while creting a BOM using that BAPI.
    errors are
    1) Error/warning when checking the structure of the BOM group with ID =
    2)Alternative  does not exist for material assignment to material BAPIBOMFG1
    is it mandatory to pass the bom group id to this bapi?
    In bomgroup structure , i am not passing anything to BOM_GROUP field.
    is it mandatory to pass this data? i am giving my coding below.plz suggest , where i am making mistake. it is urgent.
    regards
    pabitra
    report z_bom_create
           line-size 132
           line-count 65
           no standard page heading.
    *-- DATA DECLARATION--
    include <icon> .
    *---Tables
    tables : s076, t100, marc .
    *---Types
    types : begin of t_upload,      " Upload file data
             col1(18),
             col2(10),
             col3(30),
             col4(12),
             col5(50),
           end of t_upload,
           begin of t_split,
           location like stpu-ebort,
           end of t_split.
    data:begin of i_return occurs 10.
    include structure bapiret2.
    data:end of i_return.
    types:begin of t_item."occurs 10.
    include structure BAPI1080_ITM_C.
    types:end of t_item.
    types:begin of t_subitem." occurs 10.
    include structure  BAPI1080_SUI_C.
    types:end of t_subitem.
    types:begin of t_header." occurs 10.
    include structure  BAPI1080_MBM_C.
    types:end of t_header.
    types:begin of t_bomgroup." occurs 10.
    include structure  BAPI1080_BGR_C.
    types:end of t_bomgroup.
    types:begin of t_variant." occurs 10.
    include structure  BAPI1080_BOM_C.
    types:end of t_variant.
    *--- Tables
    data: i_upload type standard table of t_upload, " to hold data
          i_upload1 type standard table of t_upload,
          i_split type standard table of t_split,
          i_item type standard table of t_item,
          i_subitem type standard table of t_subitem,
          i_header type standard table of t_header,
          i_bomgroup type standard table of t_bomgroup,
          i_variant type standard table of t_variant.
    data: wa_upload  type t_upload, " to hold file data,
          wa_upload1 type t_upload, " to hold plan data,
          wa_split type t_split,
          wa_item type t_item,
          wa_subitem type t_subitem,
          wa_header type t_header,
          wa_bomgroup type t_bomgroup,
          wa_variant type t_variant.
    data:v_matnr like mara-matnr,
         v_start like sy-index,
         v_count(3) type c.
    *--Constants
    data: c_dot type c value '.',
          c_x type c value 'X',
          c_comma type c value ','.
    -------Selection Screen Design -
    *Selection screen for input of upload file address
    selection-screen skip 2.
    selection-screen begin of block blk1 with frame.
    parameters     : p_file like rlgrap-filename obligatory .
    parameters     : p_matnr like mara-matnr obligatory,
                     p_werks like marc-werks obligatory memory id wrk,
                     p_stlan like afko-stlan obligatory default '1' .
    selection-screen end of block blk1.
    ---AT SELECTION SCREEN -
    at selection-screen on  value-request for p_file.
    *--For popup  to select file.
      perform f_give_help.
    at selection-screen on  p_matnr.
      perform f_check_matnr.
    -----START OF SELECTION -
    *--Data upload using WS_Upload.
    perform f_get_data.
    perform f_get_bom_data.
    perform f_get_bom_data1.
    perform f_call_bapi.
    *&      Form  f_give_help
          text
    -->  p1        text
    <--  p2        text
    FORM f_give_help.
    call function 'WS_FILENAME_GET'
           exporting
                mask             = ',.,..'
                mode             = 'O'
           importing
                filename         = p_file
           exceptions
                inv_winsys       = 1
                no_batch         = 2
                selection_cancel = 3
                selection_error  = 4
                others           = 5.
      if sy-subrc <> 0 and  not sy-msgty is initial.
        message id sy-msgid type sy-msgty number sy-msgno
        with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    ENDFORM.                    " f_give_help
    *&      Form  f_check_matnr
          text
    -->  p1        text
    <--  p2        text
    FORM f_check_matnr.
    CALL FUNCTION 'BAPI_MAT_BOM_EXISTENCE_CHECK'
      EXPORTING
        MATERIAL              = p_matnr
        PLANT                 = p_werks
        BOMUSAGE              = '1'
      VALID_FROM_DATE       =
      VALID_TO_DATE         =
      TABLES
        RETURN                = i_return.
    ENDFORM.                    " f_check_matnr
    *&      Form  f_get_data
          text
    -->  p1        text
    <--  p2        text
    FORM f_get_data.
    call function 'WS_UPLOAD'
       exporting
      CODEPAGE                      = ' '
          filename                      = p_file
          filetype                      = 'DAT'
        tables
          data_tab                      = i_upload
       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.
    ENDFORM.                    " f_get_data
    *&      Form  f_get_bom_data
          text
    -->  p1        text
    <--  p2        text
    FORM f_get_bom_data.
    delete i_upload where col1 is initial.
    delete i_upload where col1 cs 'ITEM'.
    read table i_upload into wa_upload with key col1 = 'FINISHED GOOD:'.
    if sy-subrc = 0.
    v_matnr = wa_upload-col2.
    if v_matnr <> p_matnr.
    message e001(zl) with p_matnr.
    endif.
    else.
    message e000(zl).
    endif.
    ENDFORM.                    " f_get_bom_data
    *&      Form  f_get_bom_data1
          text
    -->  p1        text
    <--  p2        text
    FORM f_get_bom_data1.
    loop at i_upload into wa_upload where col1 CS 'FINISHED GOOD'.
    v_start = sy-tabix + 1.
    loop at i_upload into wa_upload1 from v_start .
            if wa_upload1-col1 cs 'FINISHED GOOD'.
              exit.
            else.
    perform f_split_upload_data.
         endif.
    endloop.
          endloop.
    ENDFORM.                    " f_get_bom_data1
    *&      Form  f_split_upload_data
          text
    -->  p1        text
    <--  p2        text
    FORM f_split_upload_data.
    if not wa_upload1-col5 is initial.
    if wa_upload1-col5 cs c_comma.
    split wa_upload1-col5 at c_comma into table i_split.
    loop at i_split into wa_split.
    v_count = v_count + 1.
    endloop.
    if wa_upload1-col4 <> v_count.
       wa_upload1-col4 = v_count.
    endif.
    clear wa_upload1-col5.
    clear wa_split.
    loop at i_split into wa_split.
    wa_upload1-col5 = wa_split-location.
    append wa_upload1 to i_upload1.
    endloop.
    else.
    append wa_upload1 to i_upload1.
    endif.
    else.
    append wa_upload1 to i_upload1.
    endif.
    ENDFORM.                    " f_split_upload_data
    *&      Form  f_call_bapi
          text
    -->  p1        text
    <--  p2        text
    FORM f_call_bapi.
    clear wa_upload1.
    wa_header-material = p_matnr.
    wa_header-plant = p_werks.
    wa_header-bom_usage = p_stlan.
    append wa_header to i_header.
    wa_bomgroup-bom_usage = p_stlan.
    wa_bomgroup-created_in_plant = p_werks.
    append wa_bomgroup to i_bomgroup.
    wa_variant-alternative_bom = 1.
    wa_variant-base_qty = 1.
    wa_variant-valid_from_date = sy-datum.
    append wa_variant to i_variant.
    loop at i_upload1 into wa_upload1.
    wa_item-item_no = wa_upload1-col1.
    wa_item-item_cat = wa_upload1-col2.
    wa_item-component = wa_upload1-col3.
    wa_item-comp_qty = wa_upload1-col4.
    append wa_item to i_item.
    wa_subitem-subitem_qty = '1'.
    wa_subitem-installation_point = wa_upload1-col5.
    append wa_subitem to i_subitem.
    endloop.
    CALL FUNCTION 'BAPI_MATERIAL_BOM_GROUP_CREATE'
    EXPORTING
      TESTRUN                  = ' '
      ALL_ERROR                = ' '
      TABLES
        BOMGROUP                 = i_bomgroup
        VARIANTS                 = i_variant
       ITEMS                    = i_item
       SUBITEMS                 = i_subitem
        MATERIALRELATIONS        = i_header
      ITEMASSIGNMENTS          =
      SUBITEMASSIGNMENTS       =
      TEXTS                    =
        RETURN                   = i_return.
    if  i_return[] is initial.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    *write: /'BOM created:', stpo-stlnr.
    else.
    *if not i_return[] is initial.
    loop at i_return.
        IF i_return-TYPE = 'E'.
       errmsg-type = i_return-type.
       errmsg-line = i_return-message.
       append errmsg.
          ULINE /1(108).
          write:/ icon_led_RED as icon, i_return-MESSAGE.
          ULINE /1(108).
        ENDIF.
        IF i_return-TYPE = 'W'.
       errmsg-type = i_return-type.
       errmsg-line = i_return-message.
       append errmsg.
          ULINE /1(108).
          write:/ icon_led_YELLOW as icon, i_return-MESSAGE.
          ULINE /1(108).
        ENDIF.
      ENDLOOP.
    *write: / i_return-id, i_return-number, i_return-message(80).
    *endloop.
    *write: /'Error'.
    endif.
    ENDFORM.                    " f_call_bapi

  • Regarding BAPI and ALE

    can u explain how the IDOC is transfered with BAPI with example???
    urgently??????
    suitable answers rewarded with maxi points???

    HI
    CHECH THESE LINKS ALSO
    ALE/ IDOC
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sappoint.com/abap.html
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.allsaplinks.com/idoc_sample.html
    Refer this
    http://www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_DATADICTIONARY_FAQ.html
    http://www.****************/InterviewQ/interviewQ.htm
    http://help.sap.com/saphelp_46c/helpdata/en/35/2cd77bd7705394e10000009b387c12/frameset.htm
    http://www.techinterviews.com/?p=198
    http://www.techinterviews.com/?p=326
    http://www.sap-img.com/abap/answers-to-some-abap-interview-questions.htm
    http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
    http://www.geekinterview.com/Interview-Questions/SAP-R-3/ABAP
    http://sap.ittoolbox.com/documents/popular-q-and-a/abap-sample-interview-questions-3240
    http://www.sap-img.com/abap/abap-interview-question.htm
    http://www.allinterview.com/Interview-Questions/ABAP.html
    hope it clears ur doubt
    regards
    ravish
    <b>plz dont forget to reward points if useful</b>

  • Regarding BAPI at sales order

    Dear guys,
    I have CSV file having records, which is read from local PC and has to be uploaded in R/3 screen.
    Concretely speaking, Now Records from CSV files will be displayed in Sales order screen. customer will correct the data changes in screen(if necessary for each record) and save the record to sales table.
    1-Here i want to know should i have to use BAPI or not for saving datas in sales order table.
    (Its purely ABAP programming module)
    2-if Bapi is required could you pls tell what BAPI is required to save in sales table.
    Thanks in advance.
    ambichan.

    Hi Ambichan,
    first of all: don't make changes (/ use exits / BADI) for this task. Only if you need different functionality for sales document creation itself, you might do some enhancements.
    Copy of this transaction doesn't make much sense: to much to delete. Maybe you use screen definition, but the rest you should do on your own.
    Do you need feedback from system?
    Yes: use BAPI_SALESORDER_SIMULATE to get feedback (like delivery days, availability...) and display results in own transaction.
    No: just display the values like an editor (but in corresponding fields and places of VA01).
    If you create only one order at a time, then it's also possible to use a batch input (VA01), started in error mode, to fill all fields. Then your last action is pressing enter (instead of save). Transaction will pop up, because it's not finished -> user is in correct transaction, feedback from system is available, all additional functions (like display customer / article / whatever else data) are at hand...
    Regards,
    Christian

  • Problem regarding BAPI call from a webdynpro applications

    Hi,
      We are trying to call a BAPI in R/3 system from a webdynpro application through the standard method. But we are getting some problems in JCO settings. We already wasted so much time in solving those problems. Is there anyway where i can access BAPI from Webdynpro application.
    Rgrds,
    Anna

    Hello Anna,
      You can do it by using SAP Java Connector API's in the implementation of the Webdynpro application. You can refer to the sample programs for JCO at http://service.sap.com/connectors and download the latest version of SAP JCo in that install those files as per the installation document in the downloaded zip. The downloaded zip contains information about JCo APIs and sample programs.
    Hope this will solve your problem.
    Best Regards,
    Srinivas.

  • Regarding Bapi data blocking

    HI friends,please help me on following issue"how to block the data of the customized bapi in R3 system."
    it is very urgent.
    point will be awarded.

    Do you want to block data coming from XI or in R/3.
    If in XI then you can do that in mapping.
    If in R/3 then after receiving data from XI. filter data from the table.
    Gaurav Jain
    Reward Points if answer is helpful

  • Regarding bapi to issue PGI BAPI_OUTB_DELIVERY_CHANGE,sample code please

    Can you send me the sample code of this bapiBAPI_OUTB_DELIVERY_CHANGE ,if any one have used this.it's urgent please..

    Hi,
    BAPI_OUTB_DELIVERY_CHANGE - BAPI for Change to Outbound Delivery
    BAPI_INB_DELIVERY_SAVEREPLICA - Create Inbound Delivery
    RV_DELIVERY_CREATE - Create Delivery
    GN_DELIVERY_CREATE - Create an Outbound Delivery
    &#1050;&#1086;&#1076;:
    FORM xkomdlgn_fill USING p_open_qty LIKE ekpo-menge
                                           p_eindt LIKE eket-eindt
                                           p_licha LIKE eket-licha
                                           p_charg LIKE eket-charg
                                           p_uzeit LIKE eket-uzeit.
      STATICS: h_grkor LIKE lips-grkor,
      h_bsmng LIKE ekpo-menge.
      CLEAR t_xkomdlgn.
      CHECK t_ekpo-uptyp NE '5' " Lot
      AND t_ekpo-uptyp NE '6' " Display
      AND t_ekpo-uptyp NE '7' " VK-Set
      AND t_ekpo-uptyp NE 'H'. " GT-Stuckliste
      IF t_ekpo-uebpo IS INITIAL AND t_ekpo-upvor CA '1I'.
        CHECK 1 = 2.
      ENDIF.
      IF NOT ekko-lifnr IS INITIAL.
        CALL FUNCTION 'VENDOR_MASTER_DATA_SELECT_12'
          EXPORTING
            pi_lifnr       = ekko-lifnr
            pi_ekorg       = ekko-ekorg
          IMPORTING
            pe_lfm1        = lfm1
          EXCEPTIONS
            no_entry_found = 1
            OTHERS         = 2.
        t_xkomdlgn-vsbed = lfm1-vsbed.
      ELSE.
        CLEAR t_xkomdlgn-vsbed.
      ENDIF.
      t_xkomdlgn-adrnr_li = ekko-adrnr.
      t_xkomdlgn-lifnr = ekko-lifnr.
      t_xkomdlgn-inco1 = ekko-inco1.
      t_xkomdlgn-inco2 = ekko-inco2.
      t_xkomdlgn-exnum = ekko-exnum.
      t_xkomdlgn-bukrs_best = ekko-bukrs.
      t_xkomdlgn-matnr = t_ekpo-matnr.
      t_xkomdlgn-werks = t_ekpo-werks.
    *IF STORAGE LOCATION IS MISSING APPEND
    *FG01 As storage location
      IF t_ekpo-lgort IS INITIAL .
        t_xkomdlgn-lgort = 'FG01' .
      ELSE .
        t_xkomdlgn-lgort = t_ekpo-lgort.
      ENDIF.
      xkomdlgn-charg = ?
      T_XKOMDLGN-VRKME = T_EKPO-MEINS.
      t_xkomdlgn-meins = t_ekpo-lmein.
      t_xkomdlgn-umvkz = t_ekpo-umrez.
      t_xkomdlgn-umvkn = t_ekpo-umren.
      IF t_ekpo-matnr EQ space.
        t_xkomdlgn-meins = t_ekpo-meins.
        t_xkomdlgn-umvkz = 1.
        t_xkomdlgn-umvkn = 1.
      ENDIF.
      t_xkomdlgn-insmk = t_ekpo-insmk.
      t_xkomdlgn-kzfme = t_ekpo-kzfme.
      t_xkomdlgn-kzvbr = t_ekpo-kzvbr.
      t_xkomdlgn-lfimg = p_open_qty.
      t_xkomdlgn-lfdat = p_eindt.
      t_xkomdlgn-lfuhr = p_uzeit.
      xkomdlgn-vstel = ?
      XKOMDLGN-VKORG = ?
      xkomdlgn-vtweg = ?
      XKOMDLGN-SPART = ?
      t_xkomdlgn-traid = t_ekpo-traid."CARRIER CODE
      t_xkomdlgn-lifex = t_ekpo-lifex."External ID
      t_xkomdlgn-bolnr = t_ekpo-bolnr."Bill Of Lading
      t_xkomdlgn-xabln = t_ekpo-xabln."Goods Receipt/Issue Slip Number
      t_xkomdlgn-vgbel = t_ekpo-ebeln.
      t_xkomdlgn-vgpos = t_ekpo-ebelp.
      t_xkomdlgn-lfart = gf_dlv_type.
      t_xkomdlgn-vgtyp = 'V'.
      t_xkomdlgn-kzazu = 'X'.
      t_xkomdlgn-knttp = t_ekpo-knttp.
      t_xkomdlgn-sobkz = t_ekpo-sobkz.
      SELECT * FROM t163g WHERE bstae EQ t_ekpo-bstae
      AND ebtyp EQ gf_ebtyp.
        EXIT.
      ENDSELECT.
      IF sy-subrc = 0.
        prufen, ob lieferavis we-zuordnung hat (vorauss. fur we uber vl32)
        und wepos prufen
        if t163g-wezuo eq space or t_ekpo-wepos eq space.
        t_xkomdlgn-nowab = 'X'.
      ELSE.
        CLEAR t_xkomdlgn-nowab.
      ENDIF.
    ENDIF.
    IF t_ekpo-matnr IS INITIAL OR t_ekpo-pstyp = '6'.
      t_xkomdlgn-posar = 'B'.
    ENDIF.
    t_xkomdlgn-ematn = t_ekpo-ematn.
    t_xkomdlgn-mfrnr = t_ekpo-mfrnr.
    t_xkomdlgn-mfrpn = t_ekpo-mfrpn.
    t_xkomdlgn-emnfr = t_ekpo-emnfr.
    t_xkomdlgn-cuobj = t_ekpo-cuobj.
    t_xkomdlgn-uebto = t_ekpo-uebto.
    t_xkomdlgn-untto = t_ekpo-untto.
    t_xkomdlgn-uebtk = t_ekpo-uebtk.
    t_xkomdlgn-lichn = p_licha.
    t_xkomdlgn-charg = p_charg.
    t_xkomdlgn-bwtar = t_ekpo-bwtar.
    t_xkomdlgn-kdmat = t_ekpo-idnlf.
    t_xkomdlgn-arktx = t_ekpo-txz01.
    t_xkomdlgn-mfrgr = t_ekpo-mfrgr.
    t_xkomdlgn-gewei = t_ekpo-gewei.
    t_xkomdlgn-voleh = t_ekpo-voleh.
    t_xkomdlgn-ntgew = t_ekpo-ntgew * t_xkomdlgn-lfimg.
    t_xkomdlgn-brgew = t_ekpo-brgew * t_xkomdlgn-lfimg.
    t_xkomdlgn-volum = t_ekpo-volum * t_xkomdlgn-lfimg.
    t_xkomdlgn-ean11 = t_ekpo-ean11.
    t_xkomdlgn-podrel = t163l-podrel.
    t_xkomdlgn-aktnr = t_ekpo-aktnr.
    t_xkomdlgn-abeln = t_ekpo-abeln.
    t_xkomdlgn-abelp = t_ekpo-abelp.
    xkomdlgn-ltssf = only SORT criteria IN vl31n
    T_XKOMDLGN-AUREL = T_EKPO-AUREL.
    t_xkomdlgn-idnlf = t_ekpo-idnlf.
    t_xkomdlgn-matkl = t_ekpo-matkl.
    leergut-stuckliste ubernehmen
    clear t_xkomdlgn-grkor.
    CLEAR t_xkomdlgn-kmpmg.
    CLEAR t_xkomdlgn-uepos.
    CLEAR t_xkomdlgn-uepvw.                                     "549736
    IF t_ekpo-upvor CA '3X'.
      h_grkor = h_grkor + 1.
      t_xkomdlgn-grkor = h_grkor.
      h_bsmng = t_ekpo-menge.
    ENDIF.
    IF NOT t_ekpo-uebpo IS INITIAL AND
    t_ekpo-uptyp CA '3X'.
      t_xkomdlgn-uepvw = 'G'.                                   "549736
      t_xkomdlgn-uepos = t_ekpo-uebpo.
      t_xkomdlgn-grkor = h_grkor.
      IF h_bsmng NE 0.
        t_xkomdlgn-kmpmg = t_ekpo-menge / h_bsmng.
      ENDIF.
    ENDIF.
    IF t_ekpo-pstyp EQ '2'.
      t_xkomdlgn-sobkz = 'K'.
    ENDIF.
    kontierungsfelder
    if t_ekpo-sobkz eq 'E' or t_ekpo-sobkz eq 'Q'.
    CALL FUNCTION 'MMPUR_EKKN_READ_EBELN_EBELP'
      EXPORTING
        pi_ebeln             = t_ekpo-ebeln
        pi_ebelp             = t_ekpo-ebelp
        pi_bypassing_buffer  = pi_refresh_buffer
        =
      tables
        pto_ekkn_po          = xekkn
      EXCEPTIONS
        no_records_requested = 1
        OTHERS               = 2.
    IF sy-subrc EQ 0.
      READ TABLE xekkn INDEX 1.
      t_xkomdlgn-ps_psp_pnr = xekkn-ps_psp_pnr.
      t_xkomdlgn-vbelv = xekkn-vbeln.
      t_xkomdlgn-posnv = xekkn-vbelp.
    ENDIF.
    ENDIF.
    APPEND t_xkomdlgn.
    ENDFORM. "xkomdlgn_fill
    LOOP AT t_xkomdlgn.
    set default parameter
    t_xkomdlgn-vgtyp = 'V'.
    t_xkomdlgn-kzazu = 'X'.
    IF t_xkomdlgn-lfart IS INITIAL.
    t_xkomdlgn-lfart = 'EL'.
    ENDIF.
    MODIFY t_xkomdlgn.
    ENDLOOP.
    SELECT SINGLE * FROM tvsa WHERE smart = xvbsk-smart.
    IF sy-subrc 0.
    Error Handling To be Done
    Meldung ins Protokoll
    ENDIF.
    l_nrnr = tvsa-numki.
    CALL FUNCTION 'NUMBER_GET_NEXT'
    EXPORTING
    nr_range_nr = l_nrnr
    object      = 'RV_SAMMG'
    IMPORTING
    number      = xvbsk-sammg
    EXCEPTIONS
    OTHERS      = 1.
    IF sy-subrc 0.
    error hadling tbd
    meldung ins protokoll
    endif.
    CALL FUNCTION 'GN_DELIVERY_CREATE'
    EXPORTING
    no_commit = 'X'
    vbsk_i = xvbsk
    if_no_deque = 'X'
    IF_MASS_READ_MAT_SW = 'X'
    vbls_pos_rueck = 'X'
    TABLES
    xkomdlgn = t_xkomdlgn
    xvbfs = xvbfs
    xvbls = xvbls
    xxlips = xlips.
    get informatioin from ekpo table and fill T_xkomdlgn

  • Regarding BAPI "BAPI_FUNCLOC_CHANGE" error

    Hi All,
    I have a requirement to update IFLOT table with new 3 custom fields which i have appened in the include CI_IFLOT.
    I have copied standard BAPI "BAPI_FUNCLOC_CHANGE" and created custom Function Module "Y_BAPI_FUNCLOC_CHANGE".
    Now when I activated the same, i got one error like "Type "ILOX_T_IFLOS" is unknown". I am not getting exactly why this error comes out, please tell me how to remove this error who have already worked on this.
    Thanks,
    Jay.

    hello,
    when you copied BAPI it did not copy global objects. Open BAPI via se37 choose attribute tab strip and double click on Program name SAPL( your BAPI's Function group name) you will find it on the right bottom corner and compare include in this program with the standard BAPI's program. Include missing data and you've got the solution.
    P.s. required structure is in top include-> type pool ILOX.
    best regards,
    dez_

  • Regarding BAPI for F-32

    Hi All,
    Can anybody Tell me Available Bapi for F-32( Clear Customer).
    Thanks in Advance,
    Jana

    Hi,
        Welcome To SDN!!.
    Please try one the below bapi.
    BAPI_ACC_PYMNTBLK_UPDATE_POST
    BAPI_ACC_BILLING_POST
    check this links:
    1) Re: BAPI for FB05
    2) Re: F-32 : Clearing Open Items
    Regards
    Kiran Sure

  • Regarding BAPI's

    Hi experts,
           i have one doubt about BAPI's. Here iam using SAP PLM system. I have to search the suitable BAPI to display the list of materials form SAP PLM system.Here the requirement is i have to give this BAPI to the XI people. There they wil use this BAPI to get the structure of the BAPI .
    Here my doubt is for SAP PLM system is there any separate BAPI's or we can use the normal BAPI existed in the sap system.Please let me know which BAPI i can use for this requirement.
    thanks & regards
    babu

    Hi Naga,
    you can try BAPI_MATERIAL_GETLIST this is standard bapi if it is excess to your requirement you need to create customized bapi  like Z_BAPI_MATERIAL_INFO  .
    if you give me your exact requirement i can provide fruitfull answer.  Thank you
    Thanks & Regards
    Ramana

Maybe you are looking for

  • Monitoring EJB from another application

    Hi! Let's say: We have some EJB deployed of Application Server. Each EJB (doesn't metter if session or entity) has its methods that can be called. (All EJB are in the same application) Can I from another application see what methods has been called a

  • IPhone 4S doesn't set purchased ringtone to chosen contact. So I have to do it myself, afterwards. Thank you.

    I open "iTunes" on my iPhone, then "Tones", then choose the ringtone i like and press "Buy Tone". iTunes asks me, how i would like to use my new tone - i choose "define to contact", then it asks to provide access to Contacts, and I say "Yes". Tone do

  • Online Number Shows Up As Anonymous on People's Ca...

    I've had my online number for over a year and it has correctly showed up on people's caller ids. For the past week when I've called people, they've received a completely different number than my actual online number I pay for, or my number comes up a

  • How do I fix Javascript message that says "too much recursion"?

    Hi there, every time that I load up or refresh a webpage in Firefox, I'm getting a message popup from Javascript that says "too much recursion" - I have no idea what this means or how to fix it, but it's gotten to a point where it's making it almost

  • Horizontal group by date

    I like to sum up and group my customer orders by year. It would be great if somebody could help! Kind regards.........Lorenz Expected result: CUST_ID 2005 2006 2007 138 - 64,7 258,7 401 96,9 646,4 228,9 Sample Data ORDER_ID ORDER_TOTAL ORDER_DATE CUS