Serialize BAPI/RFC executions to avoid locking issue

We have an XI interface that calls and executes a BAPI/RFC to create an invoice receipt against a purchase order in R/3. 
While the BAPI/RFC is running, it locks the purchase order.  If another XI call to the BAPI/RFC is initiated to create an invoice receipt against the same purchase order, the second BAPI/RFC call will fail in R/3 due to locking. 
I have the following questions:
In XI, can we serialize the execution of the BAPI/RFC so the second call will start only after the execution of the first one is complete in R/3?

Hi,
no and yes
no: not in standard
yes: there are workarounds - you can wrap the
BAPI in a RFC in which you can control it
(I used this solution and it works)
Regards,
michal

Similar Messages

  • Parallel Device Creation -  How to avoid Locking Issue

    Hi All,
    I am using 'ENQUEUE_EIMASE' and  'DEQUEUE_EIMASE' to lock the MASE table inorder fetch the current serial number for a particular Device Category . Then this serial number is increased by one and FM 'READ_MASE' is used to save the new serial number in MASE database table.
    This works when we are creating just one device at a time for a particular device category.
    But if for the same device category am trying to creat devices parallelly through same program or differrent program, then its not working properly.
    For Eg:
    I am trying to 3 create devices for the same device category simultaneously  through different programs, then only for first one which has obtained the lock on MASE table am obtaining the serial number . And for the other 2 locking of table fails.
    Could you guide me to solve this issue?

    This is not an issue, while the record is being locked by program 1, it cannot be locked by program 2 simultaneously. Thats why we use locking mechanisms. You need to intoduce some time based mechanism like waiting for the first program to complete, or event based method, like keep on trying to lock the record in a loop, untill it gets successfully locked (After the lock is released by program one). Also remember to unlock all the records you lock in your program at the last, though they get unlocked automatically.
    Thanks,
    Saravanan Rajan

  • Delivery Document Lock Issue in Z Program using BAPI(s)

    Hi,
    I am a functional consultant posting this in ABAP forum. We have developed a Z-Program.
    User enters the Service Order no. in this program and executes it.
    The program then updates the following linked documents in the following sequence using BAPI(s)
    Outbound Delivery
    Service Notification
    Service Order (This is done using BDC of IW32)
    It sometimes happens that once the Program reaches the iw32 bdc, it gives error "Delivery XXXXXXXX is locked by User ID XXXXXX"
    The user ID being that of the person executing the transaction.
    This happens like 3 out of 100 times in the Production Server. We are unable to replicate this issue in Quality or Development Server.
    We believe it to be a performance issue (database updating is slow)
    However Client wants us to investigate the Program and see what is possible.
    We are thinking of putting WAIT after the BAPI(s) of the Delivery Update.
    Any suggestions, please help.

    Hello Suhas,
    Thanks for the reply.
    These documents are seperate objects but are interlinked. i.e I can see in the Document Flow for Service Order, which is the Service Notification and Outbound Delivery for the Material.
    Also, If I'm in change mode in the Outbound Delivery, I cannot go into the change mode of the Service Order.
    Yes, we are using BAPI_TRANSACTION_COMMIT after each BAPI in the Program. We have used the Wait Statement in all BAPIs for the Service Notification. These BAPI(s) are before the IW32 BDC.
    I am copying code from one of the commit BAPI(s)
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
                    EXPORTING
                      wait = c_x.
                  WAIT UP TO 1 SECONDS.
    I noticed in the Outbound Delivery BAPI(s) (two of them) don't have the wait in the BAPI_TRANSACTION_COMMIT. Hence I though if we add this, could this resolve the issue?
    Service Order gets updated last through BDC for IW32 after all the BAPI(s) are executed for Outbound Delivery and Service Notification.
    I understand WAIT would increase processing time, that is why I am posting this to know if we have some other solution available for such a lock issue.

  • RFC Adapter - Locking Issue

    Hi,
    Our SAP production environment was down for two days. While it was down the login used by one of my RFC Receiver Adapters was locked. This meant the adapter could not run. Fair enough.
    When the Production environment was brought back up the login used by the RFC Receiver Adapter was unlocked. However, I continued to get an error in Runtime Workbench claiming that the login was locked.
    Checked with the security team and they confirmed the user wasn't locked.
    Just to try something I went into the RFC adapter in question and simply retyped the login/pwd, saved the adapter and activated it. This seemed to clear the problem and it's now running as expected !!
    Question is why did this work ? The adapter was saying the login was locked. It wasn't. All I did was effectively resubmit an updated version of the adapter and it worked again, even though no part of the adapter had actually changed. Is this some sort of caching issue ? Any thoughts ?
    Cheers,
    PaulC.

    User was unlocked yesterday and was still giving locked error this morning. It's now working. Just surprised that a new call of an adapter would continue to say locked when it wasn't. Can only think it's some for of caching but this is a pretty unsatisfactory answer. Makes me worry that it might happen again.

  • Locking issue in workflow with conseutive database update

    Dear Workflowers,
    We are in ECC 5.0 and release 6.40. We went live for SAP in February and we are currently using workflow in PLM module for DMS and ECM.
    We have been facing this locking issue randomly happened in our production and quality system. The error from workflow log is "Document XXXX is locked by WF-BATCH". I have two steps in workflow one is to update the document user( from originator to editor with custom BO "zdraw" new method "setuser") and the next step is to update the document status( BO "zdraw" "setstatus" method which inherited form standard BO "draw").  
    I have tried to use "wait" (1st try) , statements  "BAPI_DOCUMENT_ENQUEUE", "BAPI_DOCUMENT_DEQUEUE" (2nd try) and  "Commit work and wait" (3rd try) to add one step in between, however the issue remains.
    The other question I had was we need to write "commit work" when we use BAPI to perform database update in the ABAP program. But I don't see "commit work" in the method of BO(for example "setstatus" in "draw" object) which performs database update. How does workflow perform DB update properly without "commit work" by referencing standard method?
    Could anyone please share your expertise with the issue I am facing?
    Thank you in advance,
    Merta

    Hi Merta,
    Regarding COMMITs: theoretically you should never use COMMIT statements because the Workflow runtime handles that - the transaction of executing the task is the LUW, not your method. By adding COMMIT WORK you are also committing the workflow task execution.
    In practice however there are the occasional exceptions where something just won't work without an explicit commit - but the theory remains that you should always try it without.
    Regarding your problem, the one way to be certain that a DB update is complete is to use a terminating event - either through change documents or status management.
    Failing that, you can write a wrapper method for SETSTATUS that does something like:
    do 10 times.
      try to lock it.
      if success.
        unlock.
        swc_call_method self 'SetStatus' container.
        set success flag.
      else.
        wait up to 3 seconds.
      endif.
    enddo.
    if no success, raise exception.
    Cheers,
    Mike

  • Locking issue with BAPI_GOODSMVT_CREATE in userexit_save_document

    Hello All,
    I am performing a separate goods movement for one of the materials in the delivery userexit_save_document during PGI. I have an issue. We might have multiple users trying to PGI deliveries and thereby performing the goods movement for the same material through the BAPI in the userexit_save_document.
    How do I prevent the locking issue when say two users go through the BAPI for goods movement for the same material data at the same time.
    Any answer in this regards is highly appreciated.
    Thanks,
    Mathangi

    Thanks Rich... this make work for me, but one question -
    Do you know if this function releases all lock objects for the user system wide or only for the current session? My concern is that if it is system wide, then I could be releasing lock objects for other sessions unintentionally. For example, if there are multiple RFC calls in parallel for the same function and same user then I could be destroying lock entries that I shouldn't be! I am hoping that it removes lock entries only for the current session...
    any ideas?
    Regards,
    Lee
    > I've used this BAPI in many of my programs,  and
    > always after the call, I code.....
    >
    >
    >
    >     commit work and wait.
    >     call function 'DEQUEUE_ALL'.
    >
    >
    >
    > The DEQUEUE_ALL show release any/all locks.
    >
    >
    > Regards,
    > Rich Heilman

  • Row locking issue with version enabled tables

    I've been testing the effect of locking in version enabled tables in order to assess workspace manager restrictions when updating records in different workspaces and I have encountered a locking problem where I can't seem to update different records of the same table in different sessions if these same records have been previously updated & committed in another workspace.
    I'm running the tests on 11.2.0.3.  I have ROW_LEVEL_LOCKING set to ON.
    Here's a simple test case (I have many other test cases which fail as well but understanding why this one causes a locking problem will help me understand the results from my other test cases):
    --Change tablespace names as required
    create table t1 (id varchar2(36) not null, name varchar2(50) not null) tablespace XXX;
    alter table t1 add constraint t1_pk primary key (id) using index tablespace XXX;
    exec dbms_wm.gotoworkspace('LIVE');
    insert into t1 values ('1', 'name1');
    insert into t1 values ('2', 'name2');
    insert into t1 values ('3', 'name3');
    commit;
    exec dbms_wm.enableversioning('t1');
    exec dbms_wm.gotoworkspace('LIVE');
    exec dbms_wm.createworkspace('TESTWSM1');
    exec dbms_wm.gotoworkspace('TESTWSM1');
    --update 2 records in a non-LIVE workspace in preparation for updating in different workspaces later
    update t1 set name = name||'changed' where id in ('1', '2');
    commit;
    quit;
    --Now in a separate session (called session 1 for this example) run the following without committing the changes:
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changed' where id = '1';
    --Now in another session (session 2) update a different record from the same table.  The below update will hang waiting on the transaction in session 1 to complete (via commit/rollback):
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changed' where id = '2';
    I'm surprised records of different ids can't be updated in different sessions i.e. why does session 1 lock the update of record 2 which is not being updated anywhere else.  I've tried this using different non-LIVE workspaces with similar results.  I've tried changing table properties e.g. initrans with and still get a lock.  The changes to table properties are successfully propagated to the _LT tables but not all the related workspace manager tables created for table T1 above.  I'm not sure if this is the issue.
    Note an example of the background workspace manager query that may create the lock is something like:
    UPDATE TESTWSM.T1_LT SET LTLOCK = WMSYS.LT_CTX_PKG.CHECKNGETLOCK(:B6 , LTLOCK, NEXTVER, :B3 , 0,'UPDATE', VERSION, DELSTATUS, :B5 ), NEXTVER = WMSYS.LT_CTX_PKG.GETNEXTVER(NEXTVER,:B4 ,VERSION,:B3 ,:B2 ,683) WHERE ROWID = :B1
    Any help with this will be appreciated.  Thanks in advance.

    Hi Ben,
    Thanks for your quick response.
    I've tested your suggestion and it does work with 2 workspaces but the same problem is enountered when additional workspaces are created. 
    It seems if multiple workspaces are used in a multi user environment, locks will be inevitable which will degrade performance especially if a long transaction is used. 
    Deadlocks can also be encountered where eventually one of the sessions is rolled back by the database. 
    Is there a way of avoiding this e.g. by controlling the creation of workspaces and table updates?
    I've updated my test case below to demonstrate the extra workspace locking issue.
    --change tablespace name as required
    create table t1 (id varchar2(36) not null, name varchar2(50) not null) tablespace XXX;
    alter table t1 add constraint t1_pk primary key (id) using index tablespace XXX;
    exec dbms_wm.gotoworkspace('LIVE');
    insert into t1 values ('1', 'name1');
    insert into t1 values ('2', 'name2');
    insert into t1 values ('3', 'name3');
    commit;
    exec dbms_wm.enableversioning('t1');
    exec dbms_wm.gotoworkspace('LIVE');
    exec dbms_wm.createworkspace('TESTWSM1');
    exec dbms_wm.gotoworkspace('TESTWSM1');
    update t1 set name = name||'changed' where id in ('1', '2');
    commit;
    Session 1:
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changed' where id = '1';
    session 2:
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changed' where id = '2';
    --end of original test case, start of additional workspace locking issue:
    Session 1:
    rollback;
    Session 2:
    rollback;
    --update record in both workspaces
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changed' where id = '3';
    commit;
    exec dbms_wm.gotoworkspace('TESTWSM1');
    update t1 set name = 'changed' where id = '3';
    commit;
    Session 1:
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changed' where id = '1';
    session 2:
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changed' where id = '2';
    Session 1:
    rollback;
    Session 2:
    rollback;
    exec dbms_wm.gotoworkspace('LIVE');
    exec dbms_wm.createworkspace('TESTWSM2');
    exec dbms_wm.gotoworkspace('TESTWSM2');
    update t1 set name = name||'changed2' where id in ('1', '2');
    commit;
    Session 1:
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changed' where id = '1';
    --this now gets locked out by session 1
    session 2:
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changed' where id = '2';
    Session 1:
    rollback;
    Session 2:
    rollback;
    --update record 3 in TESTWSM2
    exec dbms_wm.gotoworkspace('TESTWSM2');
    update t1 set name = 'changed' where id = '3';
    commit;
    Session 1:
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changed' where id = '1';
    --this is still locked out by session 1
    session 2:
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changed' where id = '2';
    Session 1:
    rollback;
    Session 2:
    rollback;
    --try updating LIVE
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changed' where id = '3';
    commit;
    Session 1:
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changed' where id = '1';
    --this is still locked out by session 1
    session 2:
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changed' where id = '2';
    Session 1:
    rollback;
    Session 2:
    rollback;
    --try updating TESTWSM1 workspace too - so all have been updated since TESTWSM2 was created
    exec dbms_wm.gotoworkspace('TESTWSM1');
    update t1 set name = 'changed' where id = '3';
    commit;
    Session 1:
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changed' where id = '1';
    --this is still locked out by session 1
    session 2:
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changed' where id = '2';
    Session 1:
    rollback;
    Session 2:
    rollback;
    --try updating every workspace afresh
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changedA' where id = '3';
    commit;
    exec dbms_wm.gotoworkspace('TESTWSM1');
    update t1 set name = 'changedB' where id = '3';
    commit;
    exec dbms_wm.gotoworkspace('TESTWSM2');
    update t1 set name = 'changedC' where id = '3';
    commit;
    Session 1:
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changed' where id = '1';
    --this is still locked out by session 1
    session 2:
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changed' where id = '2';
    Session 1:
    rollback;
    Session 2:
    rollback;

  • Second Time, RFC execution Problem!

    Hi all,
    Has any one encountered this problem, when calling RFC First time fine and getting data from BAPI, when i call same RFC again, Second Time, RFC execution Problem!. Any idea!, Now i restarted server, that may cause the problem. Other than this, please give me your idea.
    Thanks
    Ravi Golla

    Hi Bhavik,
    <b>In View Controller:</b>
    public void onActionCreateProject(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionCreateProject(ServerEvent)
        wdThis.wdGetArchCompController().CreateProject();
         wdThis.wdFirePlugOutToProjectCreationResult();
        //@@end
    <b>In Custom Controller:
    </b>
    wdDoInit()
    __Arch__Arm_Project_Create_Input create = new __Arch__Arm_Project_Create_Input();
         wdContext.node__Arch__Arm_Project_Create_Input().bind(create);
    public void CreateProject( )
        //@@begin CreateProject()
         try
                             wdContext.current__Arch__Arm_Project_Create_InputElement().modelObject().execute();
                             wdContext.nodeOutput().invalidate();
                        catch(WDDynamicRFCExecuteException ex)
                             wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(ex.toString());
                             ex.printStackTrace();
        //@@end
    I am using other functional modules they all working fine, this is one only has problem
    Thanks  Bhavic.
    Regards
    Ravi

  • What are idocs, BAPI, RFC?

    Hi,
    What are idocs, BAPI, RFC?
    Regards,
    anuj

    Hii,
    BAPIs and RFCs are the functions exposed by SAP, when it comes to the integration part, you have to know that particular BAPI or RFC. For example, if you want to get table data or want to query to the SAP table then you use RFC_READ_TABLE. Similarly if you want to know whether customer is existing, you need to know which RFC/BAPI has this info. May I know which tool are you using, are you talking about generating a proxy and playing around that.
    Data Creation in Idoc
    IDocs are text encoded documents with a rigid structure that are used to exchange data between R/3 and a foreign system. Instead of calling a program in the destination system directly, the data is first packed into an IDoc and then sent to the receiving system, where it is analyzed and properly processed. Therefore an IDoc data exchange is always an
    asynchronous process. The significant difference between simple RFC-calls and IDoc data exchange is the fact, that every action performed on IDocs are protocolled by R/3 and IDocs can be reprocessed if an error occurred in one of the message steps.
    While IDocs have to be understood as a data exchange protocol, EDI and ALE are typical use cases for IDocs. R/3 uses IDocs for both EDI and ALE to deliver data to the receiving system. ALE is basically the scheduling mechanism that defines when and between which partners and what kind of data will be exchanged on a regular or event triggered basis. Such a set-up is called an ALE-scenario.
    IDoc is a intermediate document to exchange data between two SAP Systems.
    *IDocs are structured ASCII files (or a virtual equivalent).
    *Electronic Interchange Document
    *They are the file format used by SAP R/3 to exchange data with foreign systems.
    *Data Is transmitted in ASCII format, i.e. human readable form
    *IDocs exchange messages
    *IDocs are used like classical interface files
    IDOC types are templates for specific message types depending on what is the business document, you want to exchange.
    WE30 - you can create a IDOC type.
    An IDOC with data, will have to be triggered by the application that is trying to send out the data.
    FOr testing you can use WE19.
    How to create idoc?
    *WE30 - you can create a IDOC type
    For more information in details on the same along with the examples can be viewed on:
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm#_Toc8400404
    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a6620507d11d18ee90000e8366fc2/frameset.htm
    http://www.sappoint.com/presentation.html
    http://www.allsaplinks.com/idoc_search.html
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://www.erpgenie.com/sapedi/idoc_abap.htm
    To Create Idoc we need to follow these steps:
    Create Segment ( WE31)
    Create Idoc Type ( WE30 )
    Create Message Type ( WE81 )
    Assign Idoc Type to Message Type ( WE82 )
    Creating a Segment
    Go to transaction code WE31
    Enter the name for your segment type and click on the Create icon
    Type the short text
    Enter the variable names and data elements
    Save it and go back
    Go to Edit -> Set Release
    Follow steps to create more number of segments
    Create IDOC Type
    Go to transaction code WE30
    Enter the Object Name, select Basic type and click Create icon
    Select the create new option and enter a description for your basic IDOC type and press enter
    Select the IDOC Name and click Create icon
    The system prompts us to enter a segment type and its attributes
    Choose the appropriate values and press Enter
    The system transfers the name of the segment type to the IDOC editor.
    Follow these steps to add more number of segments to Parent or as Parent-child relation
    Save it and go back
    Go to Edit -> Set release
    Create Message Type
    Go to transaction code WE81
    Change the details from Display mode to Change mode
    After selection, the system will give this message “The table is cross-client (see Help for further info)”. Press Enter
    Click New Entries to create new Message Type
    Fill details
    Save it and go back
    Assign Message Type to IDoc Type
    Go to transaction code WE82
    Change the details from Display mode to Change mode
    After selection, the system will give this message “The table is cross-client (see Help for further info)”. Press Enter.
    Click New Entries to create new Message Type.
    Fill details
    Save it and go back
    Check these out..
    Re: How to create IDOC
    Check below link. It will give the step by step procedure for IDOC creation.
    http://www.supinfo-projects.com/cn/2005/idocs_en/2/
    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
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.docs
    go trough these links.
    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
    http://http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    An IDoc is simply a data container that is used to exchange information between any two processes that can understand the syntax and semantics of the data...
    1.IDOCs are stored in the database. In the SAP system, IDOCs are stored in database tables.
    2.IDOCs are independent of the sending and receiving systems.
    3.IDOCs are independent of the direction of data exchange.
    The two available process for IDOCs are
    Outbound Process
    Inbound Process
    AND There are basically two types of IDOCs.
    Basic IDOCs
    Basic IDOC type defines the structure and format of the business document that is to be exchanged between two systems.
    Extended IDOCs
    Extending the functionality by adding more segments to existing Basic IDOCs.
    To Create Idoc we need to follow these steps:
    Create Segment ( WE31)
    Create Idoc Type ( WE30)
    Create Message Type ( WE81)
    Assign Idoc Type to Message Type ( WE82)
    imp links
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    www.sappoint.com
    --here u can find the ppts and basic seetings for ALE
    http://sappoint.com/presentation.html
    www.sapgenie.com
    http://www.sapgenie.com/ale/index.htm
    WE30 - you can create a IDOC type.
    An IDOC with data, will have to be triggered by the application that is trying to send out the data.
    Try this..Hope this will help.
    SAP ALE & IDOC<<<<
    Steps to configuration(Basis) >>
    1. Create Logical System (LS) for each applicable ALE-enabled client
    2. Link client to Logical System on the respective servers
    3. Create background user, to be used by ALE(with authorizaton for ALE postings)
    4. Create RFC Destinations(SM59)
    5. Ports in Idoc processing(WE21)
    6. Generate partner profiles for sending system
    The functional configuration(Tcode: SALE)
    • Create a Customer Distribution Model (CDM);
    • Add appropriate message types and filters to the CDM;
    • Generate outbound partner profiles;
    • Distribute the CDM to the receiving systems; and
    • Generate inbound partner profiles on each of the clients.
    Steps to customize a new IDoc >>>
    1. Define IDoc Segment (WE31)
    2. Convert Segments into an IDoc type (WE30)
    3. Create a Message Type (WE81)
    4. Create valid Combination of Message & IDoc type(WE82)
    5. Define Processing Code(WE41 for OUT / WE42 for IN)
    6. Define Partner Profile(WE20)
    Important Transaction Codes:
    SALE - IMG ALE Configuration root
    WE20 - Manually maintain partner profiles
    BD64 - Maintain customer distribution model
    BD71 - Distribute customer distribution model
    SM59 - Create RFC Destinations
    BDM5 - Consistency check (Transaction scenarios)
    BD82 - Generate Partner Profiles
    BD61 - Activate Change Pointers - Globally
    BD50 - Activate Change Pointer for Msg Type
    BD52 - Activate change pointer per change.doc object
    BD59 - Allocation object type -> IDOC type
    BD56 - Maintain IDOC Segment Filters
    BD53 - Reduction of Message Types
    BD21 - Select Change Pointer
    BD87 - Status Monitor for ALE Messages
    BDM5 - Consistency check (Transaction scenarios)
    BD62 - Define rules
    BD79 - Maintain rules
    BD55 - Defining settings for IDoc conversion
    WEDI - ALE IDoc Administration
    WE21 - Ports in Idoc processing
    WE60 - IDoc documentation
    SARA - IDoc archiving (Object type IDOC)
    WE47 - IDoc status maintenance
    WE07 - IDoc statistics
    BALE - ALE Distribution Administration
    WE05 - IDoc overview
    BD87 - Inbound IDoc reprocessing
    BD88 - Outbound IDoc reprocessing
    BDM2 - IDoc Trace
    BDM7 - IDoc Audit Analysis
    BD21 - Create IDocs from change pointers
    SM58 - Schedule RFC Failures
    Basic config for Distributed data:
    BD64: Maintain a Distributed Model
    BD82: Generate Partner Profile
    BD64: Distribute the distribution Model
    Programs
    RBDMIDOC – Creating IDoc Type from Change Pointers
    RSEOUT00 – Process all selected IDocs (EDI)
    RBDAPP01 - Inbound Processing of IDocs Ready for Transfer
    RSARFCEX - Execute Calls Not Yet Executed
    RBDMOIND - Status Conversion with Successful tRFC Execution
    RBDMANIN - Start error handling for non-posted IDocs
    RBDSTATE - Send Audit Confirmations
    FOr testing you can use WE19.
    BAPI
    BAPI Programming guide: -
    http://help.sap.com/saphelp_nw04/helpdata/en/e0/9eb2370f9cbe68e10000009b38f8cf/frameset.htm
    BAPI user guide: -
    http://help.sap.com/saphelp_46c/helpdata/en/7e/5e115e4a1611d1894c0000e829fbbd/frameset.htm
    BAPI STEP BY STEP PROCEDURE: -
    http://www.sap-img.com/abap/bapi-step-by-step-guidance.htm
    Example:-
    http://www.erpgenie.com/abap/bapi/example.htm
    PDF download: -
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/200dd1cc-589e-2910-98a9-bb2c48b78dfa
    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..
    http://www.sap-img.com/bapi.htm
    http://www.sap-img.com/abap/bapi-conventions.htm
    http://www.planetsap.com/Bapi_main_page.htm
    http://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#
    BADI
    Check these links on BADI
    http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
    http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
    http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
    http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
    http://www.esnips.com/doc/3b7bbc09-c095-45a0-9e89-91f2f86ee8e9/BADI-Introduction.ppt
    Check this link for advantage of BADIs over User exits
    http://www.sap-img.com/abap/difference-between-badi-and-user-exits.htm
    Reward points if useful.
    Regards,
    Sushama

  • Migrating BAPI & RFC function modules into web services

    What is the advantage of migrating BAPI & RFC function modules into web services?

    Hi.
    That's a very good question. Why did you ask it, are you considering doing so?
    I wouldn't think there would be any performance advantages using WebServices.
    You could make your BAPI's available for other systems than Web Dynpro or SAP systems by turning them into WebServices.
    That could be an issue when you want to use different integration engines perhaps.
    A WebService might also be better for dealing with large number of requests I guess.
    When dealing with XML you can also use the advantage of XSLT for validating your data.
    The main advantages would still be the availability of your service for non-SAP systems.
    /Mikael

  • Error MAM25_095 -    BAPI RFC

    Hi!
    Can anyone help me to get this error message solved ? This error is displayed after the replication of SyncBO MAM_095 is run.
    020     128                                                                               
    1 10.2007 09:02:04 Z_MEREP_GEN_T01_____MAM25_095 iniciado para número de ejecución 0000128506 y contador tiempo ejecución 1     
             2 10.2007 09:02:09 Código de retorno de llamada BAPI RFC: Entrada A_LMES2L21 ALM_ME_C011PRF  no existe en  (Verifique la entrada)
             3 10.2007 09:02:10 Z_MEREP_GEN_T01_____MAM25_095 finalizado para número ejecución 0000128506 y contador tiempo ejecución 1      
    Thank you very much for your help
    Xiomara

    Hi Xiomara,
    how have you started the replicator? From MEREP_PD? And I guess the trafficlight n MEREP_PD is still yellow for the MAM25_095 SyncBO?
    Have you tried to run the getlist handler for MAM25_090 on the backend? Does it return Data? If you then take one key from the result set of the getlist handler and run the getdetil handler with it, does it return data then as well?
    How to do that in detail:
    - On the backend, go to SE37
    - run the function module ALM_MEREP_095_GETLIST
    - no values needed, just start the function
    Now you should see the result screen of the function. The first line of the result set, tells you MAM_SCENARIO_LIST and the next line the result. If you see a number in line 4 only and not in line 2 of that table, you have an error. Send me the result of that line, I will have a look into it. Ok, hopefully in the second line you see a number >0. If this is the case, double click on that number and you should see a table with these X number of lines. In there take a line and write down the value for MYALM_SCEN. If you see the code from the error message, take that code as well. There should no be that many lines - normally two or three.
    Ok, we go back to the startscreen of SE37. In there we now run the Function module:
    ALM_MEREP_095_GETDETAIL
    Enter the value you have written down above as MAM_SCENARIO and then execute. It should give you a whole bunch of items. If you run into an exception, please have a lok into the config guide of MAM, backend settings - you missed the userand profile definition in SPRO on the backend then.
    If this above is fine and you see no error, can you please log on to your middleware using language EN  instead of SP? Then run transaction MEREP_EX_REPLIC on the middleware? You have to enter the name of the syncBO and set the trace level to 7. This gives you a better overview over what happens at replication.
    Post the error message, this should give us a better overview about the issue.
    Hope this is a step forward for you.
    Regards,
    Oliver

  • Avoiding locking

    Hi Experts,
    I often encounter process chains failing in the night due to locking.
    This can be when users forgot to exit their planning workbook or layout or input query.
    Not sure if there is a way to avoid such a problem.
    I am thinking could this solve the problem:
    1. process chain calls a planning sequence made up of a check program that detects any locking.
    ====?  if this solution exist, what would be the program name?
    2. When locking is detected, the locks are forcefully deleted. This enables the process chain to execute without locking issue.
    ====? is this solution feasible? Are there alternative solutions you have used?
    Thanks!
    Pointes Rexiproca

    Hi Experts,
    I often encounter process chains failing in the night due to locking.
    This can be when users forgot to exit their planning workbook or layout or input query.
    Not sure if there is a way to avoid such a problem.
    I am thinking could this solve the problem:
    1. process chain calls a planning sequence made up of a check program that detects any locking.
    ====?  if this solution exist, what would be the program name?
    2. When locking is detected, the locks are forcefully deleted. This enables the process chain to execute without locking issue.
    ====? is this solution feasible? Are there alternative solutions you have used?
    Thanks!
    Pointes Rexiproca

  • Report Designer Locking issue

    Hi,
       We have found locking issue while accessing same report(Created in Report Designer) by multi users at a time .
       Has anyone face this issue and How to fix it. It's major concern because same report can be accessed by multiusers at  same time
    Thanks
    Siva

    Siva,
    only one person at a time has permission to open the report in the Report designer - just like with Queries in the query designer.  This should not have any effect on you actually executing the report in the portal - multiple people can do it then.
    this is a security issue that other software vendors use as well - just like you cannot open any MS Office files on the network for editing that someone has opened already.
    Thanks

  • BAPI/RFC for Service Complaints Creation in CRM 5.0

    Hi,
    We are working on the Complaints and Returns module in CRM 5.0. We have found the Transaction Code for the same. (CRMD_BUS2000120).
    Not able to find the BAPI/RFC for the same.Let us know if any. Appreciate your comments on the same.
    Thanks,
    Moorthy

    Hi,
    Thanks for the response
    I am not talking about Service Order. I have requirement to create a Service Complaint. For that the transaction is CRMD_BUS2000120. Now I need to find the function modules/RFC available for this requirement.
    Hope it clarifies .
    Even I have found function module called -CRM_COMPLAINT_API_CREATE but not sure right one
    Thanks,
    Moorthy

  • Locking Issue in Planning DSO in SAP BW 7.3(Integrated Planning)

    Hi Experts,
    We have built Aggregation Level on Direct Update (planning enabled) DSO and used the same in the input ready queries.( Its complete Manual planning - new row addition feature in WAD).
    We have 5 characteristic and one key figure for planning.
    We are facing lock issue while planning the data i.e. when one user is planning, other user cannot plan.
    The lock relevant characteristic is Column A and the same has been added to the Lock Characteristic tab(RSPLSE) of the infoprovider. The input ready query is also restricted with a variable on Column A (manual input single variable- mandatory).
    While the user opens the Planning Layout and plans the data, we can see lock entry in RSPLSE(locks tab) for the Column A selection in the infoprovider, yet if another user is trying to plan for data for some other selection of Column A, a lock entry in RSPLSE is shown with the selection but it errors in thelayout with lock on the infoprovider and cannot plan the data.
    Any inputs will be of great help.
    Regards,
    Priyanka

    Post is closed.
    Refer http://scn.sap.com/thread/3564212 for the solution.
    Regards,
    Priyanka

Maybe you are looking for

  • What are the materials used to make a macbook pro?

    What are the material used to make a macbook pro?

  • Can't install Forte4j on SuSE Linux 8.0 ...

    Hi all, I tried to install Forte4J on my SuSE Linux 8.0. But I receive a strange error during the installation process. "package 02f06fd12771dbf359f999a9adb8b305-4.0- is not installed" So, which package do I need? ;-) I installed JDK 1.4.1 which runs

  • Can I use a Sum Calculation accross dynamically added rows?

    Well I have a working script that can add/delete extra rows to a table. And I have a working script that can calculate the sum of the columns. But when I put them together, the add row function stops working. Is there a way to reconcile the two? See

  • Thread Pool Problem

    Hi, I amhaving problem with a thread pooling my code once allocates a thread to a user then never is able to find that it is idle. the code is some what like this. public class foo extends Thread{ pubblic void setPrimeData(Hashtable data){ //sets the

  • Side Car

    Hi All, I checked the forum, i havent got any crystal clear output. My queries are as follows 1. what is SAP hana side car approach? 2. On what usecase SAP hana side car will work? 3. Can sap hana sidecar can connect to multiple ERP running on sql se