UR: Regarding BAPI Wrapper

Hi SDN.
there is a standard bapi BAPI_PO_GETITEMSREL.
I created an RFC ZBAPI_PO_GETITEMSREL.... But i want 2 know whether the RFC i created is said to be a BAPI Wrapper or not ???
because actually i'm in need of BAPI Wrapper.
here is the code ....
FUNCTION ZBAPI_PO_GETITEMREL.
""Local Interface:
*"  IMPORTING
*"     VALUE(I_REL_GROUP) LIKE  BAPIMMPARA-REL_GROUP OPTIONAL
*"     VALUE(I_REL_CODE) LIKE  BAPIMMPARA-REL_CODE OPTIONAL
*"     VALUE(I_ITEMS_FOR_RELEASE) LIKE  BAPIMMPARA-SELECTION DEFAULT
*"       'X'
*"  TABLES
*"      ET_PO_HEADERS STRUCTURE  BAPIEKKOL
*"      ET_PO_ITEMS STRUCTURE  BAPIEKPOC
*"      RETURN STRUCTURE  BAPIRETURN OPTIONAL
if I_ITEMS_FOR_RELEASE is initial.
CALL FUNCTION 'BAPI_PO_GETITEMSREL'
EXPORTING
   REL_GROUP               = I_REL_GROUP
   REL_CODE                = I_REL_CODE
   ITEMS_FOR_RELEASE       = ' '
  TABLES
    po_headers              = ET_PO_HEADERS
    po_items                = ET_PO_ITEMS
   RETURN                  = RETURN      .
else.
CALL FUNCTION 'BAPI_PO_GETITEMSREL'
EXPORTING
   REL_GROUP               = I_REL_GROUP
   REL_CODE                = I_REL_CODE
   ITEMS_FOR_RELEASE       = 'X'
  TABLES
    po_headers              = ET_PO_HEADERS
    po_items                = ET_PO_ITEMS
   RETURN                  = RETURN      .
ENDIF.
ENDFUNCTION.

Hi,
to use it with MI you need to have:
GETLIST
and
GETDETAIL
warpper. Check the documentation in MDK to have a better understanding of the complete process. There is a good example for this and you can take the code from there and change it to your needs.
The single code you send will not help you any further cause it is missing the clear structure between GETLIST and GETDETAIL - that is standard MI behaviour and necessary for correct results. Without this you even can not create any SyncBO in MEREP_SBUILDER.
Hope this helps to bring you any further.
Regards,
Oliver

Similar Messages

  • Regarding MAM25_001_GetList BAPI wrapper

    Hi,
    We are configuring MAM 2.5 on ECC 5.0
    We have created work orders for a work center.
    We then created a operation variant with the work center as a parameter and assigned it to the order profile in MAM 2.5 configuration
    When I execute the variant independently, it shows the list of orders being retrieved.
    But when I execute MAM25_001_Get_List Bapi wrapper for the same user manually in R/3, it doesnt display any data.
    I could see that the BAPI wrapper is executing a report program RIAFVC20 and passing the order selection variant as a parameter.
    I even tried executing this report program manually and selected the variant. The report program displays the data when run independently.
    Do we need to apply any SAP Notes for MAM 2.5 component in ECC 5.0
    Regards
    Raja Sekhar

    Hi Raja,
    In assignment profile, you kept user->workcenter for order..right
    In the transaction alm_me_user, you need to give the workcenter. Otherwise the system will consider that as empty work-center and since all the orders selected in operation have workcenter, none of the orders are selected and downloaded to client.
    A Customer scenario.
    1. Assume Daily 100 order are created in R/3 system. They should be selected by variant.
    2. 10 work-centers are used for processing the orders. In assignment profile, we keep user->workcenter(Assume 10 order for each work-center)
    3. So, generally we keep a work-center value in alm_me_user. So, when you execute getlist for this user, he will get 10 orders.
    Regarding
    2. What does the User -> Work Center + Employee + Planner Group option mean in the Order assignment criteria.
    Does it mean that orders will be downloaded to the user only if he satisfies all the conditions like
    1. He belongs to work center mentioned in the order
    2. His employee number is mentioned in the order
    3. He belongs to the planner group mentioned in the order
    >> If you keep above option in assignment profile, in alm_me_user, (in order section), you need to give all the values (i.e., work-center, employee, planner group). The user given need not belong any work-center or planner etc.
    Hope I am clear.
    Best Regards,
    Subhakanth

  • GETLIST BAPI Wrapper for Purchase Requisiton

    HI All,
    I want to know the GETLIST BAPI Wrapper for Purchase Requisition in ECC 6.0 . I am able to find GETDETAIL but not GETLIST.
    It would be nice if anyone could help me out in this.
    Regards,
    Madhu.
    Edited by: madhu kv on Jul 8, 2008 10:53 AM

    In that case you could just write your own custom function module to do it.  All you need to do is write a simple select statement to return a table of document numbers.  It shouldn't take more than an hour to have it all up and running.  You could add a parameter to the interface so that it either returns just a list of document numbers or if the parameter is set, it calls GET_DETAIL for each document and returns the full data.
    Good luck

  • Delete bapi wrapper with multi node object

    In delete bapi wrapper how do I discover if only the subnode was deleted ?.
    Because the user can delete operation of  the orderm and operation is subnode of object Orderm.

    Hi esoliveira ,
    Ex:  OrderHeader (Root)
                          --- OrderItems (Child level1)
    OrderSubItems  (Child level2)
    In this scenario, MODIFY will be called when
    1--> Root is updated
    2--> Child1 is updated/Deleted.
    3--> Child2 is updated/Deleted.
    Ex:  When you delete  OrderSubItems(Child2) on client and sync, DOE will call MODIFY BAPI pasing only OrderHeader(Root) and OrderItems(child level1).   Your MODIFY BAPI should have code/logic  to upate Root,OrderItems and delete OrderSubItems.
    Only when you delete OrderHeader on client and sync, DOE will call call the DELETE BAPI by passing the primary key of root(OrderHeader).  Your DELETE BAPI should have the logic to clean the child tables (OrderItems and OrderSubItems)  and then delete the root(OrderHeader) in the Backend.
    Regards
    Rohith

  • BAPI WRAPPER

    Hi,
    I'm facing a new problem concerning Bapi wrapper when i try to insert new data.
    Actually, i get a message from the DOE, telling me that the bapi wrapper does not return any header key.
    The problem is that, the primary key in the backend table is a composite primary key. Therefore, no primary key is generated while datas are inserted.
    Is there any way to dodge this problem ?
    Thanks

    Hi,
    I understand that you are trying to create a new entry in backend via DOE.
    Create BAPI wrapper is invoked passing these keys generated in custom service.
    Is this data getting inserted correctly in the BE table?
    The create BAPI wrapper's Exporting parameterlist will be containing the header keys (multiple keys in your case).
    I suppose these keys given there will be available when Create BAPI is executed(even if they are generated in custom service and given to BE)
    These keys in exported parameter list should be filled in proper values..
    Are you seeing these filled already?
    Regards,
    Liji

  • To create BAPI Wrapper for Sales Order Creation

    Hi Experts,
    I'm working upon MI 7.1 to create mobile application for creation of sales order.
    I've to create Sales Order BAPI Wrapper (Getlist, Get Detail & Create) using Standard BAPI's (BAPI_SALESORDER_GETLIST & BAPI_SALESORDER_CREATEFROMDAT2).
    Kindly guide me for how to proceed with the above. Which all other BAPI's do I require except above?
    PS: I was trying to call standard BAPI's but while executing the BAPI Wrapper it asks about Customer No. & Sales Org. then only I'll get the output.
    my requirement is I should get list of all the sales order's existing in the Back-end, once I execute the BAPI Wrapper.
    Romi

    Hi,
    if it comes to bapis on the backend, there are not so many changes from MI7.0 to MI7.1 as in the UI for example. So you still need the backend adapters like GETLIST/GETDETAIL/CREATE as they where necessary in 7.0.
    If you need an example on how these should look like - do you have a full blown backend available? Have a look if you can find the following BADIS in SE37 in the backend: MAM30_050_GETLIST. If you can find this one, have a look how it is working. That one should help you to get an idea on how the replication is working and how the complete stuff works. The create should be straight forward development then.
    You furthermore can have a look into the URL mentioned aboveand as well in the complete MI7.0 dokumentation if you take it just to get a general idea on how the stuff works. But the URL mentioned above should be enough in a normal case.
    Regards,
    Oliver

  • Regarding bapis for sales order creation and modification

    Hi,
    I am trying to create a syncbo for sales order creation, modification and display. The bapis that I am using are
    1.BAPI_SALESORDER_GETLIST
    2.BAPISDORDER_GETDETAILEDLIST
    3.BAPI_SALESORDER_CREATEFROMDATA1
    4. BAPI_SALESORDER_CHANGE
    Am I using the correct bapis. When I tried to create a syncbo it gave the following errors
    BAPISDORDER_GETDETAILEDLIST does not have RETURN parameter in export or tables parameter
    RETURN parameter in Create BAPI Wrapper should refer to structure BAPIRET2
    RETURN parameter in GetList BAPI Wrapper should refer to structure BAPIRET2
    GetDetail BAPI Wrapper does not have RETURN parameter in export or tables parameter
    No Export parameter referring to header structure exists in GetDetail BAPI Wrapper
    No Import parameter referring to header structure exists in Create BAPI Wrapper
    No Import parameter referring to header structure exists in Modify BAPI Wrapper
    No Import parameter referring to a field of header structure exists in GetDetail BAPI Wrapper
    No Export parameter referring to a field of header structure exists in Create BAPI Wrapper
    No Tables parameter referring to item structure exists in Create BAPI Wrapper
    No Tables parameter referring to item structure exists in Modify BAPI Wrapper
    I am informed that the above bapis are standard bapis.
    I am not sure as to why I am getting the errors.
    Does the syncbo require the  bapi's to be in a specific format.
    What would be the header and item structures for sales order bapis
    Regards
    Raja Sekhar

    Hi Raja,
      ya , for creating Sync BOs ,our BAPI wrappers must satisfy certain conditions..
    just go through this link.
    u can use the standard BAPIs of SALES Order in ur Custom BAPI Wrapper
      http://media.sdn.sap.com/public/html/submitted_docs/MI/MDK_2.5/content/appdev/smartsync/what_is_a_bapi_wrapper.html
    the RETURN must be of type BAPIRET2..
                    Regards
                    Kishor Gopinathan

  • Creating GetList Bapi Wrapper for Sales Order

    Hi All,
    I am not at all into CRM, but there is some problem I have which is related to it.
    In the Sales-TeleSales transactions, I create a sales Order.
    Now there is much data that is there which is linked to this Sales Order like
    1)     Telesales
    2)     Item
    3)     Sold-to-party
    4)     Product
    5)     Quantity
    6)     Req-del-date
    7)     Currency
    8)     Region
    9)     Country
    10)     Net Value
    11)     Discount
    12)     Tax amount
    13)     Gross Value
    14)     Partner
    I need to create a BAPI Wrapper to get all the Header and Detail data.
    I am thinking of finding a BAPI or a Function Module which does this job and calling it in my BAPI Wrapper.
    Now I want you people to tell me the Appropriate BAPIs or FMs which will do this job for me.
    I need almost all these fields to be returned by my Bapi Wrapper.
    Please ask for Clarifications...
    Lookin forward to responses...
    Ankur

    Hi Ankur,
           You can Call the FM : CRM_ORDER_MAINTAIN within your BAPI wrapper.
    For testing purpose there is a Standard Report on this FM , Report name : 'CRM_TEST_ORDER_MAINTAIN'.
    Hope this will be helpful to you
    Regards,
    Anand.

  • Backend adapter (BAPI Wrapper)

    hi all,
    i created a data object in the DOE called USER and set his direction proprety to "Download Only" with 2 BAPI Wrappers (GETLIST,GETDETAIL) to check if a simple scenario work and go on from there.
    everything worked very well.
    now i want to add a new BAPI Wrapper which is CHANGE.
    for this to happen i need to change the direction propery in the data object to "BI-Direction" and add the new BAPI Wrapper to the backend adapter.
    i can't figure out how to change the direction property to "BI-Direction" as the radio buttons are gray and can't be changed.
    also the place where i put the BAPI Wrapper in the backend adapter is also gray and can't be changed .
    my only option is to delete the data object,DM and rule (which in this case in the whole scenario) which i don't want to do.
    is there a possible way to change the data object direction property in more easy way?
    regards,
    Roi Grosfeld

    Hi Roi,
    Thats the expected behaviour. The reason is that, you have an active backend adapter, which is mapped for only getlist and getdetail (download only). If you are allowed to change the direction to bidirectional, then the backend adapter may not function well. Thats the reason why its disabled and you are not able to change the direction. If you want to do so, you can delete the backend adapter and then you will be able to change the direction of the Data Object. Then you just need to create the backend adapter again and do that mapping for all the BAPI's -- getlist, getdetail, create, delete(optional), modify(optional).
    Hope this helps,
    Regards,Vinodh

  • BAPI and BAPI Wrapper

    Hi All,
    I would like to know the difference between a BAPI and a BAPI Wrapper in detail.
    I would also like to know the procedure to create the various types of BAPI Wrappers- Getlist, GetDetail, Create, Modify and Delete.
    regards,
    Sunil

    Hi Sunil,
    Conceptually, BAPIs and BAPI wrappers are the same. BAPI wrappers, like BAPIs also must have a standard interface. THey are also RFC enabled FMs and like BAPIs they can comprise of the backend applciation business logic. They can also comprise of calls to Web services.
    You can easily create BAPI wrappers - GETLIST, GETDETAIL, CREATE, MODIFY and DELETE from the DOE workbench (SDOE_WB transaction) using the BAPI wrapper wizard, available under the Utilities menu.
    Once you create the BAPI wrappers, you can compare them with BAPIs and you will see that they are the same. Of course this is under the assumption that you are using MI 7.1.
    You do not need specific OO knowledge for creating BAPI Wrappers.
    Regards,
    Wenonah
    Edited by: Wenonah Jaques on May 9, 2008 7:44 AM

  • Instance Push doubt about getList bapi wrapper

    Hi guys.
    Another question: Is necessary to implement getList and getdatails bapi wrapper in backend adapter whose Synchronization  Type backend trigerred  and Direction only download?

    Hi,
    It is not mandatory to have both GetList and GetDetail.
    If you have only one structure in your BAPI, which is a header/root node and if you return the whole instance rather than just the backend key, then only GetList BAPI wrapper is enough.
    But if you have root node along with some child nodes, then you need GetList and GetDetail both. Getlist returning either just Backendkey or whole root node and then a GetDetail which returns whole root along with all child nodes.
    Regards,
    Siva.

  • Mapping tool: mapping child nodes (level2 hierarchy) to bapi wrapper fields

    Hi,
    I'm new to MI7.1. I'll try the demo on help.sap.com. I have following data object EQUIPMENT with node structure in DOE:
    ROOTNODE (attr: EQUIPMENT_ID/ SERIAL_NO)
       child node level 1 DETAILS (attr: SERIAL_NO/TYPE/BRAND/INSTRUCTIONS)
           child node level 2 LOCATION (attr: SERIAL_NO/ADDRESS_LINE1/
    ADDRESS_LINE2/ZIP_CODE/...)
    In backend my bapi wrapper is build using structures:
      TOP: ZSEQUIPMENT (attr: EQUIPMENT_ID/SERIAL_NO)
      010: ZSEQUIPMENT_DET(attr: SERIAL_NO/TYPE/BRAND/INSTRUCTIONS)
      020: ZSLOCATION(attr: SERIAL_NO/ADDRESS_LINE1/...)
    When i want to use mapping tool in middleware for the backend adapter, after mapping the fields, during activation i get the error:
    Referential integrity between node DETAILS and it's parent is not complete.
    Referential integrity between node LOCATION and it's parent is not complete.
    What does that mean? How can I solve this?
    thanks
    Peter

    Solved it myself with explicit key mapping. thanks anyway

  • How to pass table values in Create Bapi Wrapper

    Hi All,
           Am using create BAPI  Wrapper in that how to map the fields inside BAPI  Import Structure .
    Thanks&Regrads,
    Arun

    Hi,
    Am using standard RFC " QIBP_INSPCHAR_SETRESULT "  for creating result recording in SAP QM. And BAPI_INSPOPER_GETDETAIL for getdetail i want to create BAPI wrapper for these 2 i already created BAPI wrapper for get detail . I dont know how to create Create BAPI wrapper.
    In QIBP_INSPCHAR_SETRESULT am passing inupt
    INSPLOT      LIKE         QALS-PRUEFLOS
    INSPOPER     LIKE     QAPO-VORNR
    INSPCHAR     LIKE     QAMV-MERKNR
    INSPSAMPLE     LIKE     QASV-PROBENR
    CHAR_RESULT     LIKE     BAPI2045D2           
    so i want to know how i can pass    1 . CHAR_RESULT structrue values
                                                               2.  INSPLOT,INSPOPER,INSPCHAR again repting inside CHAR_RESULT so how to map these
                                                                    in SDOE_WB
    Pls explain how to create BAPI Wrapper for this and how to map details.

  • 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

Maybe you are looking for

  • Deleted Photos from iPhone still show up in Photo Stream on iPad: iOS 6

    Okay, I've done a lot of searching and can't find any solution for this.  I'm on iOS 6 on all devices, so none of the iOS 5.x article / discussions apply.  I have my iPhone 5, my wife has an iPhone 4, we have an iMac, and an iPad 2.  Here's the situa

  • Product Life Cycle Management

    Dear All           Is    PLCM module is suitable for design engineering professionals. Regards Karthik

  • Ideal compressor settings for vocal podcast?

    Any audio guru got some ideas on how to set up the podcast for a optimal audiopodcast? I'm using a external microphone and don't want my audio to be clipped. I wan't to raise the low sounds and try to keep the narration constant at around -10 dB. I t

  • Degrading performance when running consecutive insert operations

    Hi, I'm using DB-XML (2.5.16) as a backend storage for a web application that works on top of a TBX (TermBase eXchange) document. The application is using the Python bindings and development is being done on GNU/Linux with Python 2.6. The document is

  • Internet sharing ***** on OS X Lion 10.7.1

    Internet sharing doesn't work on OS X Lion 10.7.1 (niether in 10.7.0) If I create a network with my MBP, and turn on Internet sharing (I have an ethernet cable plugged in, and share the internet via Wi-Fi), the device can connect to the network, but