Is it necessary to pass RETURN parameter in bapi function module

Hai All,
            Is it necessary to pass structure to RETURN parameter in bapi_transaction_rollback function module. If it is not necessary then how can it gives return value. Please give me the answer for this one. some sample code below...
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'
IMPORTING
   RETURN        = i_return.
        LOOP AT i_return into wa_return WHERE type EQ c_error.
          wa1_out-postdoc = wa_return-message.
        ENDLOOP.
Thanks & Regards.
Laxman.P

hi
bapi should never throw an error as it might be called for mass data proceessing
and it is prefferred not to hault the proceess bcoz of one or two errors.
that's why the error or success messages are caught and returned in return table.
in bapi_transaction_rollback the return parameter is not necessary as it will work without that as well.
the purpose of rollback bapi is just to undo whatever done before that.
regards
vijay
<b>reward points if helpful</b>
Message was edited by:
        vijay sharma

Similar Messages

  • Passing the parameter in the Function module MESSAGE_SEND_AS_MAIL

    Hi all,
    I have to send the same message to five different mail ID's using the Function module MESSAGE_SEND_AS_MAIL
    How to pass this five mail ID's in the Parameter Reciever of the Function module
    Regards
    Ajay

    see if this helps
    REPORT  Z_MESSAGE.
    data receiv type standard table of SOMLRECI1 initial size 0.
    data wa type SOMLRECI1.
    wa-receiver = 'email address in caps'.
    wa-REC_TYPE = 'U'.
    append wa to receiv.
    wa-receiver = 'email address in caps'.
    wa-REC_TYPE = 'U'.
    append wa to receiv.
    do so more more three
    CALL FUNCTION 'MESSAGE_SEND_AS_MAIL'
      EXPORTING
        msgid           = 'Z_ZZZ_CA_MESSAGES'
        msgno           = '000'
       MSGV1           = 'material'
       MSGV2           = 'MAT'
       MSGV3           = 'MM'
       MSGV4           = 'MMM'
      tables
        receivers       = receiv[]
              COMMIT WORK AND WAIT.
    then u can go to SOST transaction and see that the mail has been or is yet to be sent. It worked for me. The message comes in an PDF form to the mail box.
    Edited by: Biswadeep Ghosh on Jun 25, 2008 2:28 PM
    Edited by: Biswadeep Ghosh on Jun 25, 2008 2:30 PM

  • How to use Return parameter of BAPI in DOE

    Hello all,
    I have a question on Return parameter of BAPI wrappers written in backend. When we use the BAPI in DOE there i do not see any table which stores these Return parameters then what is the use of writting it in BAPI wrappers.
    Can anyone please clarify??
    Thanks & Best Regards,
    Abhishek

    Hi,
    BAPIRET are stored in log tables during delta download(You can check it in logs and traces of backend integration).
    In case of upload, the bapiret is returned in message error list to the devices. Its also stored in message error list table which you can see it in message monitoring.
    In upload scenario case all the BAPIRET returned by backend are captured ,where as in case of delta load or push the BAPIRET of type 'A' and 'E' are captured by default and other message types are captured when trace setting is higher.(SMMW_TRC_SETTING).
    Regards,
    Dhana

  • Doubt in passing a parameter to a fn module

    dear friends,
    i want to pass a parameter to the fn module HRHAP_SHOW_DOCUMENT from the abap program.the parameter that iam passing to the fn module is a table type HAP_T_HEADER_APPRAISER.so i have declared a internal table with the same structure with the table type,assigned values to the internal table and i have passed it as the export parameter to the fn module.but when i run the program it is showing a dump with a message that there is a type conflict when calling the fn module.i think that the table type declaration and assignment in the pgm is wrong.can any one help of how to declare and define the table type in the program and how to pass it to the fn module as one of the export parameter.
    thanks.

    Hi Vadivel,
    HAP_T_HEADER_APPRAISER is a dictionary table type you need to declare the table with reference to it and a structure to load data into it as it has no header line. Something like this.
    data:
      myTable       type HAP_T_HEADER_APPRAISER,
      myStructure   type HAP_S_HEADER_APPRAISER.
    Then you should have no problems.
    Hope this helps.
    Gary

  • How to pass select-option filed to Function Module Exporting Parameter

    Hi,
        How to pass select-option filed to Function Module Exporting Parameter.
    Thanks

    Hi,
    DATA: BEGIN OF ITAB5_WRK OCCURS 0,
            KUNNR     TYPE KNKK-KUNNR,  "CUSTOMER #
            SBGRP     TYPE KNKK-SBGRP,  "CREDIT REP
            KLIMK     TYPE KNKK-KLIMK,  "CREDIT LIMIT
            NAME1     TYPE KNA1-NAME1,  "CUSTOMER NAME
            SKFOR     TYPE KNKK-SKFOR,  "TOTAL A/R
            AMT1      TYPE KNKK-SKFOR,  "CURRENT
            AMT2      TYPE KNKK-SKFOR,                          "01-30
            AMT3      TYPE KNKK-SKFOR,                          "31-60
            AMT4      TYPE KNKK-SKFOR,                          "61-90
            AMT5      TYPE KNKK-SKFOR,                          "91-120
            AMT6      TYPE KNKK-SKFOR,                          "OVR 120
            BZIRK     TYPE KNVV-BZIRK,
          END OF ITAB5_WRK.
    SELECT-OPTIONS P_COMP     FOR  T001-BUKRS
      SELECT KUNNR SBGRP  FROM KNKK
             INTO TABLE ITAB5_WRK
             WHERE SBGRP IN P_REP
               AND KUNNR GE '0001000000'
               AND SKFOR NE 0.
      LOOP AT ITAB5_WRK.
        DELETE ADJACENT DUPLICATES FROM ITAB5_WRK COMPARING KUNNR.
      ENDLOOP.
      PERFORM GET_CREDIT_LIMITS.
    *=======================================================================
      IF P_DIST NE SPACE.
        LOOP AT ITAB5_WRK.
          SELECT SINGLE * FROM KNVV WHERE KUNNR EQ ITAB5_WRK-KUNNR
                                      AND VKORG EQ P_COMP
                                      AND VTWEG EQ '20'
                                      AND SPART EQ '10'
                                      AND BZIRK IN P_DIST.
          IF SY-SUBRC EQ 0.
            MOVE KNVV-BZIRK TO ITAB5_WRK-BZIRK.
            MODIFY ITAB5_WRK.
          ELSE.
            DELETE ITAB5_WRK.
          ENDIF.
        ENDLOOP.
      ENDIF.
    *==============================================================
      LOOP AT ITAB5_WRK.
        MOVE: 'F/S'            TO WRK-KKBER,
               ITAB5_WRK-KUNNR TO WRK-KUNNR.
        PERFORM AGING.
        ADD: W_SNFAE  TO ITAB5_WRK-AMT1,
             W_SFAE1  TO ITAB5_WRK-AMT2,
             W_SFAE2  TO ITAB5_WRK-AMT3,
             W_SFAE3  TO ITAB5_WRK-AMT4,
             W_SFAE4  TO ITAB5_WRK-AMT5,
             W_SFAE5  TO ITAB5_WRK-AMT6,
             W_SFAEL  TO ITAB5_WRK-SKFOR,
             W_SNFAE  TO ITAB5_WRK-SKFOR.
        MOVE: 'SPEC'            TO WRK-KKBER,
               ITAB5_WRK-KUNNR TO WRK-KUNNR.
        *PERFORM AGING.*
        ADD: W_SNFAE  TO ITAB5_WRK-AMT1,
             W_SFAE1  TO ITAB5_WRK-AMT2,
             W_SFAE2  TO ITAB5_WRK-AMT3,
             W_SFAE3  TO ITAB5_WRK-AMT4,
             W_SFAE4  TO ITAB5_WRK-AMT5,
             W_SFAE5  TO ITAB5_WRK-AMT6,
             W_SFAEL  TO ITAB5_WRK-SKFOR,
             W_SNFAE  TO ITAB5_WRK-SKFOR.
        MODIFY ITAB5_WRK.
      ENDLOOP.
    FORM AGING.
      *CALL FUNCTION 'CUSTOMER_DUE_DATE_ANALYSIS'* 
      EXPORTING
          BUKRS             = P_COMP           
          KKBER             = WRK-KKBER
          KUNNR             = WRK-KUNNR
          RASID             = 'FEND'
          KLIMP             = 'X'
        IMPORTING
          SFAE1             = W_SFAE1
          SFAE2             = W_SFAE2
          SFAE3             = W_SFAE3
          SFAE4             = W_SFAE4
          SFAE5             = W_SFAE5
          SFAE6             = W_SFAE6
          SFAEL             = W_SFAEL
          SNFA1             = W_SNFA1
          SNFA2             = W_SNFA2
          SNFA3             = W_SNFA3
          SNFA4             = W_SNFA4
          SNFA5             = W_SNFA5
          SNFA6             = W_SNFA6
          SNFAE             = W_SNFAE
        EXCEPTIONS
          NO-AGING_SCHEDULE = 1
          NO_TABLE_INPUT    = 2.
      CASE SY-SUBRC.
        WHEN 1.
          MESSAGE E999 WITH 'PLEASE ENTER AGING SCHEDULE'.
        WHEN 2.
          MESSAGE E999 WITH 'DO NOTHING ??'.
      ENDCASE.
    ENDFORM.                    "AGING
    Thanks

  • Passing Message number as an parameter in a Function module

    Hi all,
    I have  to pass the Message number(sy-msgno) as an parameter into an function module
    and that Message should be like "PO NUMBER  #######  is deleted"
    This Funtion module is an loop and PO number changes for every loop
    How to define this Message in the Message class.
    Regards
    Ajay

    Hi,
    Message definition SE91 should be like below.
    PO NUMBER & is deleted.
    Here & is the place holder where u can pass one value dynamically. If u want to pass 2 dynamic values then u have to use 2 place holder and so on.
    eg: PO NUMBER & is deleted by user &.
    When u call this message it will display like
    PO NUMBER 12345 is deleted by user user1.
    Thanks,
    vinod.

  • Return Parameter in BAPI

    can any one tell me...... what is the purpose of Return parameter in BAPI ?

    it return all the Message's  ,Exceptions  ,etc
    it  is  a  kind  of
    Catch ..... endcatch & Try & endtry   what ever  message's  (S,E,A,I,W)it will capture and   maintain in the strucuture called  BAPIRETURN (or)BAPIRETURN2.
    Reward points  if it is usefull ..
    Girish

  • Passing Internal Table to a Function Module.

    I am new to Web Dynpro Abap. Using the Function Builder, I am trying to pass an Internal Table (IT) as an import parameter into my Function Module (FM), fill it within the FM and be able to recieve the filled IT back as an Export parameter from the FM to my program. My problem here is that I do not know how to specify the Internal Table as an import OR export parameter for a Function Module, I tried using the Table Tab, but it says that is obsoleted.
    Anyone! Thanks.

    Hi,
    You want to pass the internal table to FM inside WD component and that table contains fields from diff table, right?
    Open the FM through SE37. Goto 'Tables' tab of FM. Create table of type mentioned in the 'Associated Type' column of the FM. Fill the internal table with data and pass the internal table to FM.
    You can create Table type with different fields through SE11.
    I hope I interpreted your question correctly.
    Regards,
    Saket.

  • Problem in passing varchar2 parameter to Evaluate function in OBIEE

    Hi there,
    This is regarding an issue while passing parameter in EVALUATE function.
    I have to call a function with varchar parameters. parameter are nothing but my table column values.
    I've created session variables which holds value from my table column values.
    for eg:
    EVALUATE('REP1_FIRSTMONTH_F(%1)' AS  CHARACTER ( 30 ),  VALUEOF  (NQ_SESSION."month"))
    so whenever i call function using EVALUATE in OBIEE. i hve to pass ' ' (single quotes) for my varchar values. without this , i'm facing error stating :
    *State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 59015] The requested column PERIOD0 does not exist in this table. (HY000)*
    If i'll give parameter within single quotes in my dashboard prompt. it is working fine, but fails without the quotes.
    kindly help me in solving this issue.
    Thanks - Vijay
    NOTE: parameter are from column values.

    Hi
    Anyone has any input for the above issue??. Please share.
    Regards - Vijay

  • HOW  TO PASS SELECT-OPTIONS PARAMETER TO A FUNCTION MODULE.

    Hi friends.
    HOW DO U PASS A SELECT-OPTIONS PARAMTER TO A FUNCTION MODULE AS ITS IMPORT PARAMETER(IN MY CASE rfc fM) .
    Really urgent!!!
    thanks to one and all

    Hi,
    If you are passing a single value, its better you take it from s_option-low or s_option-high (select options).
    Else if you are passing values to the FM in a loop for all select option values, then better you declare an internal table with type <b>WSELKUNNR</b>.
    get low & high fields from each row & pass them.
    It will make you clear when you check out your select options in debug mode by entering different combinations of inputs.

  • Passing java parameter to javascript function in oa framework

    hi all,
    can anybody tell how to pass parameter to javascript function from java for example
    OAMessageTextInputBean txtbean = (OAMessageTextInputBean)webBean.findChildRecursive("BuyerPrice");
    String row = "rowid";
    txtbean.setOnKeyUp("javascript:checkNumber("+row+")");
    checknumber is javascript function defined .

    Hi,
    go through http://forum.java.sun.com/thread.jspa?threadID=174157&messageID=539357
    if ur requirement is just to pass a string to a JS function.
    Thanks

  • How to pass multi value selection parameter to SAP Function Module?

    Hi ,
    Anyone know how to pass CR multi value parameter - array to SAP Function module ?
    eg  multi selection of customer in CR
    and then pass to Function module
    in SAP FM,  the SQL select these customer only
    How should the import parameter / table of SAP Function module designed?
    and how should CR pass the data to SAP FM
    thx
    John

    Moved to Integration Kit forum

  • "Changing" parameter and "Tables" parameter defintions in function module

    If one defines "Changing" or "tables" parameters, they are treated as reference parameters.
    It becomes obvious for "tables" parameters where one does not have option to check box for "Pass by Value". But for "Changing" parameters, they provide the checkbox for "Pass by Value". Even when you select this option, the function module seems to handle the parameter as a reference parameter (whatever changes you make to it in the function module are retained when you return back to a calling program).
    My question is why then SAP has provided the checkbox of "Pass by Value" for "Changing" parameter?
    Thanks.
    Jitendra Mehta

    Hi Chaiphon:
    Thanks for explanation but I know the theory of "Pass by reference" versus "Pass by Value".
    Let me rephrase my question.
    When I use the importing parameter (say as a table with a dictionary table type) with reference (not "passing by value"), and if I modify the value of the parameter, the calling program (which calls function module) receives the changed value after the call.
    When I use the importing parameter with "Pass by Value" box checked, the modifications made to the table inside the function module is not retained after the code leaves function module and returns to the calling program.
    My question is why not the same behaviour with the "Changing parameter" in function module definition?
    And if Changing parameters are always reference parameters, then why SAP has provided the "Pass by Value" check box?

  • Error while passing a table to a function module

    Hi Iam passing a table g_tab of length 376 flat structure to the function module..under TABLES section parameter.
    Changedocument_read_headers.
    iam getting a complile time error like the below displayed thing. Can u tell me how to solve this ?
    In the function module interface, you can specify only
    fields of a specific type and length under "I_CDHDR".
    Although the currently specified field
    "G_CDHDR_TAB" is the correct type, its length is incorrect.
    Edited by: kiran kumar on Jul 7, 2008 8:53 AM

    probably u making a mistake while declaring the table
    declare it like this in the tables section:
    S_JOB     LIKE     RNGE_OBJID
    where s_job is the internal table name and RANGE_OBJID is a structure type and NOT an internal table type.

  • Passing the structure to rfc function module

    hi,
    iam having a rfc function module which is importing structure.
    i have to pass only one field value to that structure.
    how can i pass that field value to that structure.
    it is very urgent.
    thanks in advance

    Hi..
    You have to Declare the ACTUAL PARAMETER (workarea) with the Same Structure as that of the FORMAL PARAMETER.
    but you can fill only the FIELD that you want pass in the workarea and pass it to the RFC.
    <b>Reward if helpful.</b>

Maybe you are looking for

  • Boot Cam Assistant Cannot be used... +more troubles...

    i may have done something wrong but let me first explain and your opinion would then be very welcome... got my SL update this friday so i install it in my macmini (early 09), installation go well. It kep my boot camp partition unchanged and working r

  • SAP APO DP CBF - Change data only at one level

    Hello Guys, I am getting error as "Change data only at one level". I am getting this error while loading data in the planning book at product level (Details All on products). I have a default macro in the data view. However, I am getting proper resul

  • Need different rows from single query based on condition

    Hi, I have a table with 100 rows that holds employees and their roles. I need to write a SQL(not a PL/SQL block) as below 1. When employee with role 'VP' logs in, the query should return all the 100 rows. 2. When employee with role 'MGR' logs in, the

  • Lightroom 6 - 64 bit only

    I finally found a way to get the desktop update to LR6 (from 5.7). Bought it and went to install it, but it won't install because it's only for 64 bit. Is this a mistake?

  • Communication error with Epson 2400

    I am trying to use my Epson 2400 printer with my MacBook and my MacPro, both using Leopard (10.5.5) and connecting by FireWire. When I try to print a photo from PS CS2 with the MacPro, I get a dialog box in the printer application stating that there'