Help  For Calling Method........!

I am confused about a problem. When I access the method of EJB A: such as UpdJob(),it works seccessfully,
also it is successful when access EJB B: insert(...).
But when I call the both methods at the same time in a method:
public void bothmethod(){
B.insert();..........(the method of EJB B)
A.UpdJob();........(the method of EJB A)
the result is that the B.insert() is success and the B.UpdJob failed with exception: No Resource Available,ejbStore failed,getConnection...
It looks failed to connect the database.
I don't know what's the matter,who can tell me?
Thanks in advance.

you may have closed some resources in calling the B.insert(), and then not establish that resource before calling A.UpdJob()

Similar Messages

  • Need help with calling method

    I'm new to Java, trying to pass a required class so I can graduate this semester, and I need help figuring out what is wrong with the code below. My assignment is to create a program to convert celsius to fahrenheit and vice versa using Scanner for input. The program must contain 3 methods - main, convert F to C, method, and convert C to F method. Requirements of the conversion methods are one parameter which is an int representing temp, return an int representing calculated temp after doing appropriate calculation, should not display info to user, and should not take in info from user.
    The main method is required to ask the user to input a 1 for converting F to C, 2 for C to F, and 3 to end the program. It must include a while loop that loops until the user enters a 3, ask the user to enter a temp, call the appropriate method to do the conversion, and display the results. I'm having trouble calling the conversion methods and keep getting the following 2 compiler errors:
    cannot find symbol
    symbol : method farenheitToCelsius(int)
    location: class WondaPavoneTempConverter
    int celsius = farenheitToCelsius(intTemp);
    ^
    cannot find symbol
    symbol : method celsiusToFarenheit(int)
    location: class WondaPavoneTempConverter
    int farenheit = celsiusToFarenheit(intTemp);
    The code is as follows:
    public static void main(String[] args) {
    // Create a scanner
    Scanner scanner = new Scanner(System.in);
    // Prompt the user to enter a temperature
    System.out.println("Enter the temperature you wish to convert as a whole number: ");
    int intTemp = scanner.nextInt();
    System.out.println("You entered " + intTemp + " degrees.");
    // Prompt the user to enter "1" to convert to Celsius, "2" to convert to
    // Farenheit, or "3" to exit the program
    System.out.println("Enter 1 to convert to Celsius, 2 to convert to Farenheit, or 3 to exit.");
    int intConvert = scanner.nextInt();
    // Convert temperature to Celsius or Farenheit
    int celsius = farenheitToCelsius(intTemp);
    int farenheit = celsiusToFarenheit(intTemp);
    while (intConvert >= 0) {
    // Convert to Celsius
    if (intConvert == 1) {
    System.out.println("Celsius is " + celsius + " degrees.");
    // Convert to Farenheit
    else if (intConvert == 2) {
    System.out.println("Farenheit is " + farenheit + " degrees.");
    // Exit program
    else if (intConvert == 3) {
    break;
    else {
    System.out.println("The number you entered is invalid. Please enter 1, 2, or 3.");
    //Method to convert Celsius to Farenheit
    public static int celsiusToFahrenheit(int cTemp) {
    return (9 / 5) * (cTemp + 32);
    //Method to convert Farenheit to Celsius
    public static int fahrenheitToCelsius(int fTemp) {
    return (5 / 9) * (fTemp - 32);
    I readily admit I'm a complete dunce when it comes to programming - digital media is my area of expertise. Can anyone point me in the right direction? This assignment is due very soon. Thanks.

    1) consider using a boolean variable in the while statement and converting it to true if the input is good.
    while (inputNotValid)
    }2) put the code to get the input within the while loop. Try your code right now and enter the number 30 when your menu requests for input and you'll see the infinite loop.... and why you need to request input within the loop.
    3) Fix your equations. You are gonig to have to do some double calcs, even if you convert it back to int for the method return. Otherwise the results are just plain wrong. As a good test, put in the numbers -40, 0, 32, 100, and 212. Are the results as expected? (-40 is the only temp that is the same for both cent and fahr). I recommend doing double calcs and then casting the result to int in the return. for example:
    int a = (int) (20 + 42.0 / 3);  // the 42.0 forces the compiler to do double calc.4) One of your equations may still be plain wrong even with this fix. Again, run the test numbers and see.
    5) Also, when posting your code, please use code tags so that your code will be well-formatted and readable. To do this, either use the "code" button at the top of the forum Message editor or place the tag [code] at the top of your block of code and the tag [/code] at the bottom, like so:
    [code]
      // your code block goes here.
    [/code]

  • Help In Call Method Using types Tables.

    dear gurus
    im having a problem in my code please help me
    TYPES: BEGIN OF itab,
              vtext TYPE tvfkt-vtext,
              fkart TYPE vbrk-fkart,
              fkdat TYPE vbrk-fkdat,
              vbeln TYPE vbrk-vbeln,
              END OF itab.
    DATA:  itab1 TYPE itab OCCURS 0 WITH HEADER LINE.
      DATA:  itab2 TYPE itab OCCURS 0 WITH HEADER LINE.
    SELECT *
        INTO CORRESPONDING FIELDS OF TABLE itab1
        FROM vbrk
        INNER JOIN vbrp ON vbrp~vbeln = vbrk~vbeln
        WHERE vbrk~fkart IN fkart
        AND   vbrk~fkdat IN fkdat
        AND   vbrp~vstel IN vstel
        AND   vbrk~kunag IN kunag
        AND   vbrp~matnr IN matnr.
    LOOP AT itab1.
        SELECT SINGLE vtext FROM tvfkt
          INTO itab1-vtext WHERE fkart EQ itab1-fkart
          AND spras EQ 'EN'.
        IF itab1-fkart EQ 'F2'.
          CONCATENATE 'Tax' itab1-vtext INTO itab1-vtext SEPARATED BY space.
        ENDIF.
        SELECT SINGLE bstkd FROM vbkd INTO itab1-bstkd
          WHERE vbeln EQ itab1-aubel.
        SELECT SINGLE name1 FROM kna1 INTO itab1-name1 WHERE
          kunnr EQ itab1-kunag.
        MODIFY itab1.
        COLLECT itab1 INTO itab2.
        MOVE-CORRESPONDING itab1 TO itab2.
        CLEAR itab1.
      ENDLOOP.
    LOOP AT itab2.
        SELECT SINGLE kbetr FROM konv INTO itab2-kbetr
        WHERE kschl EQ 'PR00'
        AND   knumv EQ itab2-knumv.
        itab2-kwert = itab2-fklmg * itab2-kbetr.
        itab2-gst   = itab2-kwert * 21 / 100.
        itab2-sed   = itab2-kwert * 1 / 100.
        itab2-gt    = itab2-kwert + itab2-gst + itab2-sed.
        MODIFY itab2.
      ENDLOOP.
    CALL METHOD w_handle->insert_full
            EXPORTING
              n_vrt_keys        = 1
              n_hrz_keys        = 1
              n_att_cols        = 3
              sema              = t_sema[]
              hkey              = t_hkey[]
              vkey              = t_vkey[]
              online_text       = t_online[]
              data              = itab2   " "ITAB2" is not type-compatible with formal parameter "DATA". <- ERROR
            EXCEPTIONS
              dim_mismatch_data = 1
              dim_mismatch_sema = 2
              dim_mismatch_vkey = 3
              error_in_hkey     = 4
              error_in_sema     = 5
              inv_data_range    = 6
              error_in_vkey     = 7.

    Hi,
    In your case, please change itab2 into itab2[].
    Because you defined itab2 with header line, itab2 means header line in the method call.
    Cheers,

  • Little help for calling report from a form

    hi,
    I AM NOT ABLE TO CALL THE REPORT WITH THE FOLLOWING CODE. PLEASE TELL ME WHERE I AM DOING WRONG! THANKS A LOT!!
    It is Oracle 9i and Reports 6i.
    -> I have a form with only one BUTTON.
    -> I have a REPORT with only one USER PARAMETER 'P_1' which is a number.
    -> I have only one query INSIDE the report. It is "SELECT * FROM EMP WHERE EMPNO = :P_1'
    -> I added the report to form in the OBJECT NAVAVIGATOR of FORM and the NAME OF REPORT is 'REOPRT4'
    here is the code on the form:
    ================================
    When_button_pressed
    DECLARE
    vid report_object;
    vname varchar2(100);
    BEGIN
    vid := find_report_object('Report4');
    vname := run_report_object(vid);
    END;
    ==================================
    -> the FORM and REPORT are in "c:\helloworld" directory.
    -> the error I am getting is 'internal pl/sql error'
    -> I WANT THE USER TO ENTER THE RUNTIME PARAMETER FOR THE REPORT AT RUNTIME, so no need to worry about supplying the parameter through code!!!
    Thank You very much. I appreciate your kind help!!

    I think that you have to add some code, see page 15 in this:
    http://otn.oracle.com/products/forms/pdf/277282.pdf
    Helena

  • Re: help with calling methods

    TL;DR--OK, here are 2 things for you to check
    1 - are you making changes to your object in a scope as a passed by value variable?
    public void myMethod(MyObject o){
      o.my_int = 66;
    }when you return from this method, my_int will be the same as it was before you entered.
    2 - are you making changes to what you think is your object, but is a local copy?
    class MyClass{
      String s = "This is a test";
      MyClass{
       String s = "My inialized String";
    }even through you changed s in your constructor (you can say any method here), you defined a local variable called s and actually modified the local variable leaving your class variable s altered.

    alright guys all yall who posted replies thanks.
    i found out what was wrong. my program was working perfectly. I had flaws in basic math equations that made me get 0 for all those things.

  • Help for Calling RFC in B2C application.

    hi,
    We had written one RFC and all java classes related to that.
    we are able to call RFC in b2c application.we are calling RFC on loading of JSP.
    now my requirement is to call same RFC in other JSP but muliple times(in a for loop).But how can i do that?
    one thing is sure we cannot calll this RFC on loading of new jsp page.we have to call inside jsp page(in a loop).
    there is any way?
    please help me out.
    thanks in advance.
    jayesh talreja

    Two things I would like to say here:
    1) Calling RFCs directly from JSP is not supported so we need to use interfaces and backend classes.
    2) Calling an rfc is java code and in jsp we write java code along with html to make it dynamic...so dynamic
    call is also possible.
    ie. suppose we want to call our rfc for fetching some data from the backend based on the data entered at item level once the user clicks on update button on order creation page.So we can write the code like below
                                  <%--   messages --%>
                                       <%@ include file="/b2b/itemErrMsg.inc.jsp"%>
                                       <% } %>
                                       <%-- ui.showItemDetailButton() --%>
                                       <% } %>
                                       <%-- ui.isBOMSubItemToBeSuppressed() --%>
                                       <%--Start of addition by Arshid --%>
                        <!-- From here our custom rfc call is starting-->
                        <%
                             String arg1[]= {"crm~isa~isacore~resources_en"};
                             if((JspUtil.removeNull(item.getProduct()).length()) !=0 && !(JspUtil.removeNull(item.getNetValue()).equals(WebUtil.translate(pageContext,"yourcompany.order.minimumValue",arg1))) )
                                  String baseUOM = "";
                                  int enteredQuan= 0;
                                  double minOrderQuan = 0.00;
                                  double roundingValue = 0.00;
                                  BusinessObjectManager isaBOM = (BusinessObjectManager)userSessionData.getBOM(BusinessObjectManager.ISACORE_BOM);
                                  User user = (User)isaBOM.getUser();
                                  Shop shop = (Shop)isaBOM.getShop();
                                  String distrChannel = shop.getDistributionChannel();
                                  String sod = shop.getSalesOrganisation();
                                  Z_CustomBusinessObjectManager customBOM = (Z_CustomBusinessObjectManager)userSessionData.getBOM(Z_CustomBusinessObjectManager.CUSTOM_BOM);
    //Z_prodInfoValue is a bo that will hold the data returned from rfc call
                                  Z_prodInfoValue z_prodinfo = customBOM.getZ_prodInfobo().getProdInfo(Zeropadding.productInfoNoPadding(item.getProduct()), sod, distrChannel);
    <!-- Call ends here and this piece of code is called for every item on clicking on update buton -->
    Although this is not a good code design as instead of making multiple calls to the backend we can get the above thing done in a single call also.I wrote this code just to give an example .
    This clearky proves we can have dynamic calls to the backend through jsps also.
    But Jayesh, your question is not very clear to me.
    If its about for loop, where you want to call the backend for multiple times with different set of values than i would rather suggest you to create lists of these different datasets and send these in a single call to the backend and fetch the data similarily in tables in a single call.
    Regards,
    Arshi

  • Syntax for calling method

    Hi,
       I've a component controller : Z_FPM_SPL_REC_SD, which is used a shared data component in my WD application.
    It has a method: read_tspl_obj.
    The usage defined in another component for it is: Z_FPM_SPL_REC_SD.
    I want to call this method read_tspl_obj in process_event method of this component.
    What shall be the syntax for the same?
    Thanks in advance!
    Rohit.

    try this
    String b = (String)am.invokeMethod("getValue", params);
    Thanks,
    Prasanna

  • URGENT help for calling a window from a flash button in a frame not working

    Hello, i'm really desperated, because i can't call a window
    in a frame from flash with the getURL, i tried other but do
    nothing! and something of external something doesn't work too, so
    please can enya tellme what can i do???? i'm using flash 8
    professional, explorer 6, (and let me tell you that i didn't have
    issues before)!!

    chen1 wrote:
    > Hello, i'm really desperated, because i can't call a
    window in a frame from
    > flash with the getURL, i tried other but do nothing! and
    something of external
    > something doesn't work too, so please can enya tellme
    what can i do???? i'm
    > using flash 8 professional, explorer 6, (and let me tell
    you that i didn't have
    > issues before)!!
    Please search the forum, in past weeks I personally replied
    to the very same topic
    few times.
    Search for "Flash Player 9 - broken getURL doesn't open
    specified frame"
    and "Problems with flash navigation in Internet Explorer 7"
    Best Regards
    Urami
    !!!!!!! Merry Christmas !!!!!!!
    Happy New Year
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • Example/help for CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY' editable

    hello experts,
    are there any example using function 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'  with editable columns.
    Or, have somebody an idea to resolve my problem.
    I can edit the fields in the alv-grid, but I don't see the changes in the internal table using 'LVC_TRANSFER_FROM_SLIS' function.
    thanks and regards.
    K. WErner

    hi,
    here is the code for editable Hieararchical ALV
    TYPE-POOLS : slis.
    TABLES : mseg.
    DATA : BEGIN OF itab_head OCCURS 0,
            mat LIKE mseg-matnr,
    *        matnr LIKE mseg-matnr,
            werks LIKE mseg-werks,
           END OF itab_head.
    DATA : BEGIN OF itab_item OCCURS 0,
    *        mat LIKE mseg-matnr,
            matnr LIKE mseg-matnr,
            werks LIKE mseg-werks,
            mblnr LIKE mseg-mblnr,
            menge LIKE mseg-menge,
           END OF itab_item.
    DATA : t_fcat TYPE slis_t_fieldcat_alv,
           key_info TYPE slis_keyinfo_alv,
           t_eve TYPE slis_t_event,
           gt_subtot TYPE slis_t_sortinfo_alv,
           subtot LIKE LINE OF gt_subtot,
           t_listhead TYPE slis_t_listheader,
           st_line TYPE slis_listheader.
    DATA : lin_no TYPE i.
    DATA : t_mtdoc LIKE mseg-mblnr.
    SELECT-OPTIONS : mat FOR mseg-matnr.
    INITIALIZATION.
      PERFORM build_cat USING t_fcat.
      PERFORM build_eve.
    START-OF-SELECTION.
      PERFORM get_data.
      PERFORM dis_data.
    *&      Form  build_cat
    *       text
    *      -->TEMP_FCAT  text
    FORM build_cat USING temp_fcat TYPE slis_t_fieldcat_alv.
      DATA : wa_fcat TYPE slis_fieldcat_alv.
      wa_fcat-tabname = 'ITAB_HEAD'.
      wa_fcat-fieldname = 'MAT'.
      wa_fcat-seltext_m = 'Material'.
      APPEND wa_fcat TO temp_fcat.
      CLEAR wa_fcat.
      wa_fcat-tabname = 'ITAB_HEAD'.
      wa_fcat-fieldname = 'WERKS'.
      wa_fcat-seltext_m = 'Plant'.
      wa_fcat-edit = 'X'.
      wa_fcat-input = 'X'.
      APPEND wa_fcat TO temp_fcat.
      CLEAR wa_fcat.
      wa_fcat-tabname = 'ITAB_ITEM'.
      wa_fcat-fieldname = 'MBLNR'.
      wa_fcat-seltext_m = 'Material Doc.'.
      APPEND wa_fcat TO temp_fcat.
      CLEAR wa_fcat.
      wa_fcat-tabname = 'ITAB_ITEM'.
      wa_fcat-fieldname = 'MENGE'.
      wa_fcat-seltext_m = 'Quantity'.
      wa_fcat-edit = 'X'.
      wa_fcat-input = 'X'.
      wa_fcat-do_sum = 'Y'.
      APPEND wa_fcat TO temp_fcat.
      CLEAR wa_fcat.
      subtot-spos = 1.
      subtot-fieldname = 'MAT'.
      subtot-tabname = 'ITAB_HEAD'.
      subtot-up = 'X'.
      subtot-group = 'X'.
      subtot-subtot = 'X'.
      subtot-expa = 'X'.
      APPEND subtot TO gt_subtot.
    ENDFORM.                    "build_cat
    *&      Form  build_eve
    *       text
    FORM build_eve.
      DATA : wa_eve TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
       EXPORTING
         i_list_type           = 0
       IMPORTING
         et_events             = t_eve
    *   EXCEPTIONS
    *     LIST_TYPE_WRONG       = 1
    *     OTHERS                = 2
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      READ TABLE t_eve INTO wa_eve WITH KEY name = 'TOP_OF_PAGE'.
      IF sy-subrc = 0.
        wa_eve-form = 'TOP_OF_PAGE'.
        MODIFY t_eve FROM wa_eve INDEX sy-tabix.
      ENDIF.
    ENDFORM.                    "build_eve
    *&      Form  get_data
    *       text
    FORM get_data.
      SELECT matnr werks mblnr menge FROM mseg INTO CORRESPONDING FIELDS OF TABLE itab_item
      WHERE matnr IN mat.
    ENDFORM.                    "get_data
    *&      Form  dis_data
    *       text
    FORM dis_data.
      key_info-header01 = 'MAT'.
      key_info-item01 = 'MATNR'.
      key_info-header02 = 'WERKS'.
      key_info-item02 = 'WERKS'.
      REFRESH itab_head.
      LOOP AT itab_item.
        ON CHANGE OF itab_item-matnr OR itab_item-werks.
          MOVE-CORRESPONDING itab_item TO itab_head.
          itab_head-mat = itab_item-matnr.
          APPEND itab_head.
        ENDON.
      ENDLOOP.
      CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
        EXPORTING
          i_callback_program             = 'ZALV_PRDS'
          it_fieldcat                    = t_fcat
          it_sort                        = gt_subtot
          it_events                      = t_eve[]
          i_tabname_header               = 'ITAB_HEAD'
          i_tabname_item                 = 'ITAB_ITEM'
          is_keyinfo                     = key_info
        TABLES
          t_outtab_header                = itab_head
          t_outtab_item                  = itab_item
    * EXCEPTIONS
    *   PROGRAM_ERROR                  = 1
    *   OTHERS                         = 2
      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.                    "dis_data
    *&      Form  top_of_page
    *       text
    FORM top_of_page.
      CLEAR st_line.
      st_line-typ = 'H'.
      st_line-info = 'Dhwani Shah'.
      APPEND st_line TO t_listhead.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary       = t_listhead
    *   I_LOGO                   =
    *   I_END_OF_LIST_GRID       =
    *   I_ALV_FORM               =
    ENDFORM.                    "top_of_page
    reward if usefull.....

  • Help with calling methods of different classes

    I have two classes. In class A I read a line of input from the console
    myVar= x.readLine();
    then I call a method of the same class (A)
    methodA(); i get NULLPOINTEREXCEPTION here
    in this method I wish to call another method but this time of class B so I create an instance of class B in class A
    private B instanceVar;
    and then proceed to create the method call to class B
    instanceVar.methodB(myVar); i get NULLPOINTEREXCEPTION here
    What am I doing wrong?

    What am I doing wrong?Not posting a short snippet of java code that demonstrates your problem.
    In class A I read a line of input from the console
    myVar= x.readLine();
    How is that related to the NPE's?
    then I call a method of the same class (A)
    methodA(); i get NULLPOINTEREXCEPTION hereSomething is probably wrong in methodA(). Impossible to say anything more with the information given.
    private B instanceVar;
    and then proceed to create the method call to class B
    instanceVar.methodB(myVar); i get NULLPOINTEREXCEPTION hereDid you ever assign instanceVar to an actual object with something like instanceVar = new B(); ?

  • Syntax for how to call method of one comp in other comp     wd java.

    Let us assume,
    there is method1 in view1 comp1.
    tell me syntax for calling method 1 in view2 comp2
    thanks in advance.
    Edited by: madhu1011 on Nov 9, 2011 11:31 AM

    Hi Madhu,
    This is the situation:
    comp1-> method 1 , view1
    comp2-> view2
    You need to access method1  in view2 of comp2.
    For that, do the following steps:
    1.) First create a method (for eg: method1) in comp1 (under implementation of view1).
            eg: public void method1(){
                    <......some logic...>
    2.)Save the meta data.
    3.) In comp2, you will find an option called used components. In that right click and add the component comp2. (Carefully select comp1 itslef).
    4.)Save the meta data.
    5.) Then go to view2 of comp2 and take implementaion part and right the following logic in wddoinit() (or any other standard or custom method).
    wdThis.wdGetComp2Interface().getMethod("method1"); 
    By this way, we can access the method1 of comp1 in comp2.
    Regards,
    Jithin

  • When we have to go for session method, when we have to go for call transact

    when we have to go for session method, when we have to go for call transaction method if i have a 3000 records in flat file. which is better? why

    Data Transfer
    During the process of data transfer, data is transferred into the SAP R/3 System. This transfer is from an external system to SAP R/3 system. Whenever you transfer data from an external system into an R/3 System, you can use data transfer because it is installed and regularly transfers data from an external system into an R/3 System.
    As discussed, with the help of BDC, you can transfer the required data from a non-SAP system to an SAP system. For this kind of data transfer you are required to write an ABAP program. This ABAP program would help to export the concerned data to a sequential dataset file. The data in this file has to be stored. This should be stored in a format, which is acceptable to SAP batch input program. But, to transfer data from a SAP system to another SAP system, you can take the aid of RFC or CPI-C.
    SAP application supports the data transfer of numerous SAP business objects. The said data transfer program specifies the data format definition, which is necessary to import the data into the R/3 System. There are three methods available for transferring data:
    Direct Input:
    In this method the SAP function modules execute the consistency checks. However, there are other means of checking with the help of screens. The Direct Input Method has considerable performance advantages.
    Call Transaction:
    In this method you can check the data consistency with the help of screen logic.
    Batch Input Session:
    In this method data consistency is checked with the help of screen logic.
    Direct Input Method
    Among the methods of data transfer through BDC, direct input method is the one that is used, especially in case of transferring large amount of data. In order to enhance the batch input procedure, the system offers you with the direct input technique.
    There is a distinction between the batch input technique and this technique. Unlike batch input technique, this technique does not create sessions. Instead, it stores the data directly. Moreover, it does not process screens. The data has to be entered directly into the corresponding database tables. The system calls a number of function modules which execute necessary checks, if any required. In the case of errors, the direct input technique has a facility to restart the entire mechanism. However, if you want to restart the entire mechanism in case you faced an error, then direct input programs must be executed in the background only. One has to use program RBMVSHOW or Transaction BMV0 to maintain and start these programs.
    Call Transaction Method
    Call Transaction method is another method used for Data Transfer. In this type of method your program will use the ABAP statement CALL TRANSACTION USING in order to run a SAP transaction. In this type external data need not be deposited in a session for being processed later on. Instead, the entire batch input process takes place inline in your program.
    Here, the data transfer program must convert the data that has to be transferred into the SAP system. This is as per requirement by the SAP data structure or the transaction which is using it. It is to be remembered that a conversion of the data types may be necessary at different times during the process.
    Suppose there is a data type mismatch then you have to convert the data types to type C. In this regard the data transfer program should be capable of exporting the data in SAP format to the sequential file. At the time of uploading the data into the SAP system, the BDC program reads the data from the abovementioned sequential file.
    Batch Input Session Method
    This is the third method for data transfer. If you use the batch input method to transfer data, then you should remember that an ABAP program has to read the external data which is to be entered in the R/3 System. Subsequently, it stores the concerned data a "batch input session." The batch Input session records the actions which are required in the process of transferring data into the system. This can be done by using normal SAP transactions.
    As soon as the program generates the said session, you will be able to run the session in order to execute the SAP transactions in it. Moreover, you can start the session, and at the same time, can monitor a session with the help of batch input management function. For this you have to choose:
    System à Services à Batch input. Moreover, you can have the session run in the background processing.
    Writing a Data Transfer Program
    If you want to write a data transfer program, you have to follow the steps mentioned below.
    Firstly, you will analyze the structure of the existing data. Subsequently, your job is to specify the conversions, which are essential to fill the SAP data structures.
    Secondly, you have to generate the SAP data structure. In case the program is written in ABAP, you will require only the required tables in the concerned program with the help of TABLES statement.
    Thirdly, you will have to initialize the SAP data structure.
    Fourthly, fill the structure with data, performing any conversions and error checking that are required.
    Finally, you will write the sequential file. In the SAP system this sequential file is typically required for making the data available to the batch input program.
    Batch Input Method
    Batch input method is a type of data transfer method. It is used for bulk data transfer; it is one of the primary ways by which data can transferred into the R/3 System. This method is not for near real-time data transfers.
    There are various typical uses of batch input. One of the ways includes the one-time import of data. This import of data is from a legacy system into a newly installed R/3 System. In addition to it, another typical use is for periodic (i.e. hourly, daily..., and so on) transfers of data. These transfers are from external systems or legacy systems which are still in use into R/3 system where all enterprise data is consolidated.
    The R/3 applications deliver different programs for batch input, which are ready to be used. However, in some cases a customer has to write his or her own batch input program. This is required in order to convert the concerned data from a legacy System or from a proprietary format into an R/3 data format.
    The process flows for a batch input are discussed below.
    Data Transfer Decision-Making: It is with a decision to transfer data from an external source into R/3 that the process of batch input begins. It is probable that the external source may be a legacy system that is being replaced. A one-time bulk data transfer is foreseen in this regard. Alternatively, the external source may be an external system that is to remain in use. In this case, a regularly recurring bulk data transfer is foreseen.
    Setting up Batch-Input for Data Transfers: If R/3 standard one-time or regular data transfers are required, then by means of customizing settings in the R/3 Customizing System in SAP ASAP set up will occur. You must set up custom batch input procedures by hand, which means the system administrator must schedule the data conversion program that creates the batch input session. The system administrator and the batch input programmer must determine the following: how frequently data is made available from the external system, how frequently the conversion program should run, and whether the conversion program runs in R/3 (ABAP program) or in a host system (external program).
    Processing Batch Input Sessions: When a batch input session is processed, then the actual transfer of data into R/3 takes place. Little attention is required in processing of batch input sessions by the system administrator. Usually, the starting of batch input sessions is automated by the system administrator. If necessary, the administrators can also start batch input session explicitly from transaction SM35.
    Checking Batch Input Sessions: For a system administrator the routine activity is to check daily or more frequently in transaction SM35 whether all batch input sessions have been completed successfully. It is the schedule for running batch input sessions on which the schedule for checking sessions depends upon. For doing this check the R/3 System provides easy-to-use batch input management tools.
    Analyzing Errors: It is the duty of the system administrator to analyze the problem if one or more transactions in a session end in errors. Usually, the assistance of the affected data entry specialist or department for this analysis will be needed by the system administrator. In the situation where the problem was caused by incorrect data conversion or incorrect generation of the batch input session then the programmer who wrote the data conversion program may also need to be involved.
    Error Handling in Batch Input Method
    It is found that most problems usually fall into one of the following two categories discussed below.
    In this case either required data is missing from the batch-input session or invalid data has been included in the session. Errors in the data conversion program or the presence of unexpected types of data or incorrect data in the legacy database are the possible external causes of this type of problem. Within R/3, the causes for this type of problem include incorrect or incomplete customizing in an application. For example, a legacy data type may not have been foreseen in the check table entries made in application customizing.
    This case mainly includes technical/programming problems. The data is entered by a batch input session by running R/3 transactions non-interactively. Therefore, a typical technical or programming problem is the incorrect identification of one of the data fields in a transaction. Thus, the conversion program may not fill a required data field or may have provided invalid values.
    Conclusion
    I have gone through the details of batch data communication and various methods used to transfer data. One can make use of BDC to transfer data from a SAP to SAP system. In addition, it can transfer data from a non SAP system to SAP system too. I have discussed the various methods of BDC and the error handling in the respective methods.
    Thanks,
    Shankar

  • Program for call transaction method

    can any body  help  me , how to write a  call transaction method . how to create error logs for call transaction method

    hi
    REPORT  ZCALL.
    TYPES : BEGIN OF itab,
    lifnr TYPE rf02k-lifnr,
    ktokk TYPE rf02k-ktokk,
    END OF itab.
    DATA : i_tab TYPE TABLE OF itab INITIAL SIZE 0,
    wa_tab TYPE itab.
    DATA : i_bdc TYPE TABLE OF bdcdata INITIAL SIZE 0,
    wa_bdc TYPE bdcdata.
    DATA : i_message LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE,
    wa_message TYPE bdcmsgcoll.
    DATA : fname TYPE string VALUE 'd:\manish.txt'.
    DATA: p_text(100) TYPE c.
    START-OF-SELECTION.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = fname
    filetype = 'ASC'
    has_field_separator = 'X'
    TABLES
    data_tab = i_tab.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    LOOP AT i_tab INTO wa_tab.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0100'.
    PERFORM bdc_field USING 'RF02K-LIFNR' wa_tab-lifnr.
    PERFORM bdc_field USING 'RF02K-KTOKK' wa_tab-ktokk.
    PERFORM bdc_field USING 'BDC_OKCODE' '= AUSW'.
    CALL TRANSACTION 'XK01' USING i_bdc MODE 'N'. " UPDATE 'S' MESSAGES
    "INTO i_message.
    REFRESH i_bdc.
    ENDLOOP.
    IF sy-subrc NE 0.
    READ TABLE i_message WITH KEY msgtyp = 'E'.
    IF sy-subrc = 0.
    LOOP AT i_message INTO wa_message.
    CALL FUNCTION 'FORMAT_MESSAGE'
    EXPORTING
    id = i_message-msgid
    lang = 'EN'
    no = i_message-msgnr
    v1 = i_message-msgv1
    v2 = i_message-msgv2
    v3 = i_message-msgv3
    v4 = i_message-msgv4
    IMPORTING
    msg = p_text
    EXCEPTIONS
    not_found = 1
    OTHERS = 2.
    WRITE:/ p_text.
    ENDLOOP.
    ENDIF.
    ENDIF.
    *& Form bdc_dynpro
    text
    -->PROGRAM text
    -->DYNPRO text
    FORM bdc_dynpro USING program dynpro.
    CLEAR wa_bdc.
    wa_bdc-program = program.
    wa_bdc-dynpro = dynpro.
    wa_bdc-dynbegin = 'X'.
    APPEND wa_bdc TO i_bdc.
    ENDFORM. "bdc_dynpro
    *& Form bdc_field
    text
    -->FNAM text
    -->FVAL text
    reward if u find useful
    regards
    Nagesh.Paruchuri

  • UserManager's Create, CreateAsync and FindAsync methods giving "Incorrect number of arguments for call to method Boolean Equals(...)"

    I've made custom User and UserStore classes.
    Now I'm trying to register or login with a user, but I get the error
    'Incorrect number of arguments supplied for call to method Boolean Equals(System.String, System.String, System.StringComparison)'
    The error is on line 411:
    Line 409: }
    Line 410: var user = new User() { UserName = model.Email, Email = model.Email };
    --> Line 411: IdentityResult result = await UserManager.CreateAsync(user);
    Line 412: if (result.Succeeded)
    Line 413: {
    The problem is that I can't really debug UserManager's methods, because it is in a closed DLL.
    I get this same error on
    UserManager.FindAsync(user), UserManager.CreateAsync(user,password), UserManager.Create(User user)
    Now the error doesn't occur when I log in with an External Login, like Google, which also uses methods from UserManager. Entering the email works
    as well, but when the user has to be created from an External Login with the inserted email, it gives the CreateAsync error
    too.
    How can I fix this? Do I need to create my own UserManager? Or do I need another solution entirely?
    Packages (relevant):
    package id="Microsoft.AspNet.Mvc" version="5.1.2"
    id="Microsoft.Owin" version="2.1.0"
    id="Microsoft.AspNet.Identity.Core" version="2.0.1"
    UserStore.cs
    public class UserStore :
    IUserStore<User, int>,
    IUserPasswordStore<User, int>,
    IUserSecurityStampStore<User, int>,
    IUserEmailStore<User, int>,
    IUserLoginStore<User, int>
    private readonly NFCMSDbContext _db;
    public UserStore(NFCMSDbContext db)
    _db = db;
    public UserStore()
    _db = new NFCMSDbContext();
    #region IUserStore
    public Task CreateAsync(User user)
    if (user == null)
    throw new ArgumentNullException("user");
    _db.Users.Add(user);
    _db.Configuration.ValidateOnSaveEnabled = false;
    return _db.SaveChangesAsync();
    public Task DeleteAsync(User user)
    if (user == null)
    throw new ArgumentNullException("user");
    _db.Users.Remove(user);
    _db.Configuration.ValidateOnSaveEnabled = false;
    return _db.SaveChangesAsync();
    public Task<User> FindByIdAsync(int userId = 0)
    int userid;
    if (userId == 0)
    throw new ArgumentNullException("userId");
    return _db.Users.Where(u => u.UserId == userId).FirstOrDefaultAsync();
    User.cs
    public class User : IUser<int>
    public User()
    UserLogins = new List<UserLogin>();
    public int UserId { get; set; }
    public string UserName { get; set; }
    public string PasswordHash { get; set; }
    public string SecurityStamp { get; set; }
    public string Email {get; set; }
    public bool IsEmailConfirmed { get; set; }
    int IUser<int>.Id
    get { return UserId; }
    public ICollection<UserLogin> UserLogins { get; private set; }
    public async Task<ClaimsIdentity> GenerateUserIdentityAsync(UserManager<User, int> manager)
    // Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType
    var userIdentity = await manager.CreateIdentityAsync(this, DefaultAuthenticationTypes.ApplicationCookie);
    // Add custom user claims here
    return userIdentity;
    Startup.Auth.cs
    public partial class Startup
    // For more information on configuring authentication, please visit http://go.microsoft.com/fwlink/?LinkId=301864
    public void ConfigureAuth(IAppBuilder app)
    // Configure the db context and user manager to use a single instance per request
    app.CreatePerOwinContext(NFCMSDbContext.Create);
    app.CreatePerOwinContext<ApplicationUserManager>(ApplicationUserManager.Create);
    // Enable the application to use a cookie to store information for the signed in user
    // and to use a cookie to temporarily store information about a user logging in with a third party login provider
    // Configure the sign in cookie
    app.UseCookieAuthentication(new CookieAuthenticationOptions
    AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
    LoginPath = new PathString("/Account/Login"),
    Provider = new CookieAuthenticationProvider
    OnValidateIdentity = SecurityStampValidator.OnValidateIdentity<ApplicationUserManager, User, int>(
    validateInterval: TimeSpan.FromMinutes(20),
    regenerateIdentityCallback: (manager, user) => user.GenerateUserIdentityAsync(manager),
    getUserIdCallback: (id) => (Int32.Parse(id.GetUserId())))
    // Use a cookie to temporarily store information about a user logging in with a third party login provider
    app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie); (...)
    Any help or ideas are greatly appreciated!
    Kind regards,
    Nils

    Hi,
    According to your description, I am afraid your problem is out of support in C# forum. For ASP.NET question, please go to
    ASP.NET Forum to post your thread.
    Best Wishes!
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and
    makes it easier for other visitors to find the resolution later.

  • Help me to call method in the mouselistener

    hi all expert,
    I have a program having code structure as following:
    public class A {
    public void methodA {
    //do something
    MouseListener mltree = new MouseAdapter(){
    //Where is I want to call methodA ,
    //I don't do like this: this.methodA because "this" is refer to mltree
    Anyone can help me,
    thanks verry much for your help in advance
    }

    That's unnecessary code, when you could just do this:public class A
      public void methodA()
        //do something
       MouseListener mltree = new MouseAdapter(){
        //I don't do like this: this.methodA because "this" is refer to mltree
        A.this.methodA();};

Maybe you are looking for

  • How can I hold data stored in an object?

    Hi everyone! I have a problem with a Java-Program that I am trying to write for university. The program is the following: import java.io.*; public class Ergasia4 {     public static void main (String args[])throws IOException      {     int i,epilogi

  • How do we save three 1D arrays in while loop as an excel file? I used build array, waveform. I could not make it work.

    I have three separate 1 dimensional arrays in a while loop. I need to combine these arrays and save as a excel file outside the loop. My second question is that is there any emergency STOP button in Labview so that when I press that button, it cuts a

  • Mac Pro won't be put to sleep

    Hi, My mid 2010 mac pro refuses to sleep.  It may be to do with some universal audio drivers installed with a recent hardware interface I've added, but maybe not. I'm running 10.6.8 on a 2x 2.4 GHz Quad core Intel xeon with 32 GB RAM. Whilst I don't

  • Using the command line client...

    I've got a few thousand videos, with metadata, that I have to add to an existing FCS install. Right now, I'm just trying to figure out the proper way to use the command line. If I run the following command as root (paasset_predict_motorvideo is the n

  • Unauthorized update  + all my past accounts, folders emails gone

    Just opened my computer up this morning and mail says, "we have some new feature, let me show you". I go to mail and all my work accounts are gone? Only Mobile me there. I did not click on any update and I always review updates before I do them so ho