ABAP Programing help regarding function modules coding

Hi,
i'm currently creating a function module that retrieve a number from a table and add one to it and return back the value to the table.
the codes are as follow:
FUNCTION ZFM_NUMBER
" * " Local Interface:
" EXPORTING
"      VALUE (ZZNUMBER) TYPE ZNUMBER
"      VALUE (ZENUMBER) TYPE ZNUMBER
SELECT ZNUMBER FROM ZTAB_NUM into ZZNUMBER.
END SELECT.
ZENUMBER = ZZNUMBER + 1.
UPDATE ZTAB_NUM SET ZNUMBER = ZENUMBER WHERE ZNUMBER = ZZNUMBER.
END FUNCTION.
this function module works finely, but now i need to concatenate the number with the year to store it into another table.
i know something about the sysdatum where i select only the first 4 characters...but i'm not sure how could i do that?
do i need to create another function module to call the above function module and concatenate it with the year?
or i just need to continue the codes in the same function module?
and how should i code it?
i'm very new to abap coding and i could'nt get help from anyone in my team. your help is very much appreciated!!!
Thanks,
leesyy

hi you can do it in the same function module.
SELECT ZNUMBER FROM ZTAB_NUM into ZZNUMBER.
END SELECT.
instead of the above statement use the following statement, it improves performance of your program
SELECT single ZNUMBER FROM ZTAB_NUM into ZZNUMBER.
in the above statement you can also specify some where condition
ZENUMBER = ZZNUMBER + 1.
UPDATE ZTAB_NUM SET ZNUMBER = ZENUMBER WHERE ZNUMBER = ZZNUMBER.
data: var_date type sy-datum,
      var_yyyy(4) type c,
      var_numyear(10) type c.                   
var_date = sy-datum.
var_yyyy = var_date+0(4).
concatenate ZENUMBER var_yyyy into var_numyear.
UPDATE ZTAB_NUMyear SET ZNUMyear = var_numyear WHERE ZNUMBER = ZZNUMBER.
Regards
Sajid
Edited by: shaik sajid on Jan 14, 2010 5:08 AM
Edited by: shaik sajid on Jan 14, 2010 5:09 AM

Similar Messages

  • Call an ABAP program or a function module from command prompt/python script

    Dear All,
    I want to call a function module/ABAP program from command prompt or a python script.
    Let me explain with an example.
    There is a function module "z_add" that takes  two integers as input parameters and generates their sum.
    the sum is the output parameter.
    Now i want to call this function module from command prompt / python script and pass parameters to this function module.
    In return i must get the sum(i.e. the output of function module).
    I tried using STARTRFC ,was able to call the FM but could not get the return value(output) from FM.
    Can you please provide me the code of such a function module and the method to call it thereby passing parameters and getting the sum.
    Thanks and regards,
    Gaurav
    Edited by: gauravkec2005 on Mar 4, 2010 7:41 AM

    thank you both!  helpful answers! :o)
    anyway! 
    i have written the program which is called from the SAPScript:
        /:       PERFORM GET_VATNUMBER IN PROGRAM ZFI_F140_OPERATIONS
        /:       USING &BKPF-BUKRS&
        /:       CHANGING &VATNUMBER&
        CE       VAT Registration No : &VATNUMBER&
        REPORT zfi_f140_operations.
        FORM get_vatnumber TABLES in_par  STRUCTURE itcsy
                                  out_par STRUCTURE itcsy.
          DATA: lv_co_code TYPE bukrs,
                lv_vat_no  TYPE stceg.
          READ TABLE in_par WITH KEY name = 'BKPF-BUKRS'.
          MOVE in_par-value TO lv_co_code.
          SELECT SINGLE stceg FROM t001
            INTO lv_vat_no WHERE bukrs = lv_co_code.
          out_par-name = 'VATNUMBER'.
          WRITE lv_vat_no TO out_par-value.
          CONDENSE out_par-value.
          MODIFY out_par INDEX 1.
        ENDFORM.              
    it is not working and i cannot work out why... 
    i have not been ABAPing for very long but have had a go.... 
    any thoughts as to what i have done wrong?
    or point me where i should be looking?  thank you!

  • How to create Inbound Idocs in a ABAP program? Any function Module?

    Hello Experts,
    My requirement is : I have sales order data which I extracted from third party system in my internal tables. In the same box I need to create inbound Idocs and then consequently create sales orders.
    I have used the function module IDOC_INBOUND_WRITE_TO_DB to create inbound Idocs from Sales Orders data in internal tables. I have populated all the data records with correct PSGNUM and HLEVEL values. My plan is to create inbound idocs with this function module and send those to IDOC_INPUT_ORDERS function module which creates Sales Orders.
    If a sales order in the internal table in ABAP program contains only one item, then I am getting correct idocs. But if more than one item exists for a sales order then the line item segments which got repeated in Idoc are having PSGNUM and HLEVEL values as zero when I checked in WE02. As a result the hierarchy from the second item segment is getting disturbed and getting the status 60.
    I populated T_EDIDD with data records from  IDOC_INBOUND_WRITE_TO_DB.
    To the function module IDOC_INPUT_ORDERS,  T_EDIDC and T_EDIDD are the input. I observed that in T_EDIDD also the PSGNUM and HLEVEL values are blank.
    I am getting Status 60 with message 'EDI: Syntax error in IDoc (segment cannot be identified)' for idocs which have more than one item.
    I need to extract sales data from third party and create inbound idocs and create sales orders in one ABAP program only. I need to display corresponding Idoc numbers for the corresponding third party sales order number in a listoutput.
    Can anybody please provide inputs?
    Regards.

    Hi Anjali,
    Thanks for the response.
    I have passed the PSGNUM and HLEVEL values while populating the data records. Then I sent the data records and control record information to the function module IDOC_INBOUND_WRITE_TO_DB. Inside this function module there is code to clear the PSGNUM values and HLEVEL values.
    for compatibility: clear administration data of data records
               perform data_records_wipe
                                      tables
                                          t_data_records.
    FORM DATA_RECORDS_WIPE
                      TABLES
                          T_DATA_RECORDS_IN  STRUCTURE EDIDD.
      LOOP AT  T_DATA_RECORDS_IN.
        CLEAR: T_DATA_RECORDS_IN-MANDT,
               T_DATA_RECORDS_IN-DOCNUM,
               T_DATA_RECORDS_IN-SEGNUM,
               T_DATA_RECORDS_IN-PSGNUM,
               T_DATA_RECORDS_IN-HLEVEL.
        modify t_data_records_in.
      ENDLOOP.
    ENDFORM.                               " DATA_RECORDS_WIPE
    This is the code which is clearing all the PSGNUM and HLEVEL values. After coming out of this function module we are getting the error idocs created with disturbed hierarchy.
    I need to create INBOUND Idocs with the data in ABAP program.
    Please let me know if any inputs? Is there any function module existing to create Inbound Idocs inside an ABAP program?
    Regards

  • Required help on Function Modules and Bapis

    Web portal publishing of ERS invoice letters. This involves modification in the BAPI screens to show the invoice PDF instead of printing??
    can anyone help me in fixing this issue.

    hi Anjaneyulu,
    open the t-code --> and go to menu system->status-->select the program and open the program-->
    selct the tree structure----in the left side the includes screen and function module everthing will show..
    or
    open the t-code --> and go to menu system->status-->select the program and open the program-->
    go to attributes and select the Package..
    next----
    go to se80--> enter the package --> and dispalay it shows the list of Program , include transaction function modules and bapi's under the pakage
    Regards,
    Prabhudas

  • Regarding Function Module trace.

    Hi,
    How are you ?. I need a help for Function Module datasources of how to get info of fields related to tables. I tried ST05 of SQL Trace but not showing complete picture and I heard through ST12 can do Function module trace to obtain table names. Can you kindly walk me through of how to Obtain table names for fields for Function Module Datasources through ST12 or any tcode in detail.
    Thanks in advance.
    Regards
    Srinivas M.

    Hi Srinivas,
    I suggest to first have a look at the SAP Help for Business Content DataSource. You might find information on the source tables here.
    As a next step you can have a look in the coding of the Function Module or debug it. You have to look to statements like TABLES and SELECT.
    As a last step (and maybe time-consuming) execute an SQL Trace using t/code ST05 during executing t/code RSA3 in the Source System.
    Best regards,
    Sander

  • Query regarding function module SPOOL_RQ_READ_BAPI_EXPORTS (EBP-SRM Module)

    query regarding function module SPOOL_RQ_READ_BAPI_EXPORTS (EBP-SRM Module)
    shopping cart
    Hi in FM SPOOL_RQ_READ_BAPI_EXPORTS
    i want to relate the internal tables requisition_items and requisition_services.
    but in am not getting the key on which they should be joined
    here i have to take the quantity and other fields from requisition_services
    right now i am using the joining condition as
    requisition_items-pckg_no = requisition_services-pckg_no.
    any help in this regard is welcome.
    Thanks and regards,
    Vithalprasad

    Hi Kathirvel,
    Thank you for reply. I am making changes for standard code only.
    " Call FM SPOOL_DPO_READ_BAPI_EXPORTS to read PO data exported to backend.
    Use this data to call FM B46B_DPO_TRANSFER and copy errors tab from
    ' lt_bapi_return ' to ' et_messages' retrun tab in 'doc_check' badi. "
    Thank you.
    Regards, Sunu

  • ALV Grid Traffic control Example  program implemented with function modules

    Hi Friends,
    Can any one please give me ALV Grid control traffic lights  example program implented using function modules instead of OOP ALV. It is very urgent,
    Thanks in advance,
    Santosh Kumar.

    Hi Santosh ,
    Here is a sampla code for the same
    TYPE-POOLS : SLIS.
    DATA : BEGIN OF IT_1 OCCURS 0 ,
               MATNR TYPE matnr ,
               FLAG TYPE C ,  " added for the traffic control
           END OF IT_1.
    SELECT MATNR INTO TABLE IT_1 " Select Data
    UP TO 10 ROWS
    FROM MARA.
    DATA : CATALOG TYPE SLIS_T_FIELDCAT_ALV ,
           WA_CATALOG TYPE SLIS_FIELDCAT_ALV ,
           LAYOUT TYPE SLIS_LAYOUT_ALV .
    *" create catalog
    WA_CATALOG-FIELDNAME = 'FLAG'.
    WA_CATALOG-TABNAME = 'IT_1'.
    APPEND WA_CATALOG TO CATALOG.
    WA_CATALOG-FIELDNAME = 'MATNR'.
    WA_CATALOG-TABNAME = 'IT_1'.
    APPEND WA_CATALOG TO CATALOG.
    DATA : FLAG_T TYPE I.
    *"assign value to traffic signal
    LOOP AT IT_1.
    FLAG_T = SY-TABIX MOD 2.
    IF FLAG_T = 0.
    IT_1-FLAG = '1'.
    ELSE.
    IT_1-FLAG = '2'.
    ENDIF.
    MODIFY IT_1.
    ENDLOOP.
    *"specify the traffic signal field in the layout
    LAYOUT-LIGHTS_FIELDNAME = 'FLAG'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    *   I_INTERFACE_CHECK                 = ' '
    *   I_BYPASSING_BUFFER                =
    *   I_BUFFER_ACTIVE                   = ' '
    *   I_CALLBACK_PROGRAM                = ' '
    *   I_CALLBACK_PF_STATUS_SET          = ' '
    *   I_CALLBACK_USER_COMMAND           = ' '
    *   I_CALLBACK_TOP_OF_PAGE            = ' '
    *   I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
    *   I_CALLBACK_HTML_END_OF_LIST       = ' '
    *   I_STRUCTURE_NAME                  =
    *   I_BACKGROUND_ID                   = ' '
    *   I_GRID_TITLE                      =
    *   I_GRID_SETTINGS                   =
       IS_LAYOUT                         = LAYOUT
       IT_FIELDCAT                       = CATALOG
    *   IT_EXCLUDING                      =
    *   IT_SPECIAL_GROUPS                 =
    *   IT_SORT                           =
    *   IT_FILTER                         =
    *   IS_SEL_HIDE                       =
    *   I_DEFAULT                         = 'X'
    *   I_SAVE                            = ' '
    *   IS_VARIANT                        =
    *   IT_EVENTS                         =
    *   IT_EVENT_EXIT                     =
    *   IS_PRINT                          =
    *   IS_REPREP_ID                      =
    *   I_SCREEN_START_COLUMN             = 0
    *   I_SCREEN_START_LINE               = 0
    *   I_SCREEN_END_COLUMN               = 0
    *   I_SCREEN_END_LINE                 = 0
    *   IT_ALV_GRAPHICS                   =
    *   IT_ADD_FIELDCAT                   =
    *   IT_HYPERLINK                      =
    *   I_HTML_HEIGHT_TOP                 =
    *   I_HTML_HEIGHT_END                 =
    *   IT_EXCEPT_QINFO                   =
    * IMPORTING
    *   E_EXIT_CAUSED_BY_CALLER           =
    *   ES_EXIT_CAUSED_BY_USER            =
      TABLES
        T_OUTTAB                          = IT_1
    * 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.
    so rem all you need to do is add a feild in internal table for the traffic signal , assign values 0 , 1, 2 to it and last specify the name of this feild in the layout.
    Regards
    Arun

  • Help in ABAP function module coding.

    Hi,
    i am having trouble coding the program where i have to select a number from the table and add one to it to create a new record back to the table.  example, i've select 1 from the table, i need the program to be able to return 2 and create a new record back into the table and the next time i generate the program, i will select 2 and create a 3 into the table. It needed to be a custom function module as i need to call it in another function module which would concatenate the generated number with some words..
    i'm very new to abap programing...so could anyone please provide a detailed on how i could code it...
    THANKS alot in advance!!!!

    Hi Lessy,
    i have done the same requirement where my sequence number will automatically get incremented by 1 as new record cames for update.as already discussed you have to cretae the numebr range and call the number range by function module 'Number_get_next'.
    PFB the code which will definitely help you.
    CALL FUNCTION 'NUMBER_GET_NEXT'
            EXPORTING
              NR_RANGE_NR                   = '01'  " specify this number this is
    *the same when you cretae numberrange  have specified.
              OBJECT                        = 'ZSEQNUM'    " This the number range
    *i have created
           IMPORTING
             NUMBER                         = wa_msg-seqnr
           EXCEPTIONS
             INTERVAL_NOT_FOUND            = 1
             NUMBER_RANGE_NOT_INTERN       = 2
             OBJECT_NOT_FOUND              = 3
             QUANTITY_IS_0                 = 4
             QUANTITY_IS_NOT_1             = 5
             INTERVAL_OVERFLOW             = 6
             BUFFER_OVERFLOW               = 7
             OTHERS                        = 8.
          modify lt_message FROM wa_msg TRANSPORTING seqnr.
    to cretete number range.
    goto transaction SNRO
    enter the name,short text, give the number length domain (char10 or what ever is your domain)
    click on number range and cretae interval.
    give the number , from number and to number.
    this number you have to give in FM also (i have given '01').
    hope this will help you.for any problem revert back
    thanks
    Tanmaya
    Code Formatted by: Alvaro Tejada Galindo on Jan 13, 2010 4:16 PM
    Edited by: Rob Burbank on Jan 13, 2010 5:20 PM

  • Regarding Function module exits

    Hi,
    function module exit :EXIT_SAPLAFAR_002
    include in function module exit :ZXAFAU02
    include exit is implemented :LAFARF70
    Main Program :SAPLAFAR
    Please help me how to execute this funcion moduel exit, and how to work on it, I could not find out any transaction for it, and provide me some links to understand the use of function module exits.
    Thanks & Regards,
    vinesh.

    Hi,
    User exits (Function module exits) are exits developed by SAP. The exit is implementerd as a call to a function module. The code for the function module is written by the developer. You are not writing the code directly in the function module, but in the include that is implemented in the function module.
    The naming standard of function modules for functionmodule exits is:
    EXIT_<program name><3 digit suffix>
    The call to a functionmodule exit is implemented as:
    CALL CUSTOMER.-FUNCTION <3 digit suffix>
    To find a Exit.
    Goto Transaction -- Find The Package
    SMOD >f4>Use the Package here to Find the Exits In the Package.
    Else if you Want to search by Application Area wise ,
    There is one more tab to find the Exits in the Respective Application Area.
    Implementing the Exit-- CMOD Create ProjectsAssgn your Component .
    Now Run ur Transaction to Check if it Triggers.
    Thats it..
    Suppose you need to find out all the user exits related to a tcode.
    1. Execute the Tcode.
    2. Open the SAP program.
    3. Get the Development Class.
    4. Execute Tcode SE84.
    5. Open the Node 'Envir. -> Exit Techniques -> 'Customer Exits -> Enhancements'
    6. Enter the Development class and execute.
    Check out this thread..
    The specified item was not found.
    1. Type the transaction : system->status-> <PROG. NAME>
    2 open SE37 , type EXIT<PROG NAME> and press F4 to get the list of function exits available.
    3. Open CMOD utilities->SAP enhancements
    EDIT->All selections
    4.type the function module name obtained in step 2, in fields 'component name' in 'additional selections' block. and execute.
    5. The displayed list contains the enhancements names for the transaction You were looking for.
    6. Create a project in CMOD and the code in default include->activate.
    http://www.erpgenie.com/sap/abap/code/abap26.htm
    which gives the list of exits for a tcode
    http://help.sap.com/saphelp_nw04/helpdata/en/bf/ec079f5db911d295ae0000e82de14a/frameset.htm
    For information on Exits, check these links
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sapgenie.com/abap/code/abap26.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    http://www.easymarketplace.de/userexit.php
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sappoint.com/abap/userexit.pdfUser-Exit
    http://www.planetsap.com/userexit_main_page.htm
    User-Exits
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sap-img.com/ab038.htm
    http://www.planetsap.com/userexit_main_page.htm
    http://www.sap-basis-abap.com/sapab013.htm
    http://sap.ittoolbox.com/documents/popular-q-and-a/user-exits-for-the-transaction-code-migo-3283
    These links will help you to learn more on user exits.
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/frameset.htm
    http://www.planetsap.com/userexit_main_page.htm
    http://www.allsaplinks.com/user_exit.html
    www.sap-img.com/abap/what-is-user-exits.htm
    Also please check these threads for more details about user exits.
    Re: Screen exit
    user exit and customer exit
    user exit
    1. Document on UserExits in FI/CO
    http://www.ficoexpertonline.com/downloads/User%20ExitsWPedit.doc
    2. Finding User Exits...
    http://sap.ionelburlacu.ro/abap/sap2/Other_Useful_Tips.html#Finding_User_Exits
    3. List of all User Exits...
    http://www.planetsap.com/userexit_main_page.htm
    Reward if Helpful.

  • Alv query regarding function modules

    hi all,
    what is difference between
    Reuse_alv_list_display & Reuse_alv_grid_display?
    thanks & regards
    sanjeev

    hi,
    1. For all practical purposes, they are the same.
    2. Some differences:
    a) from abap coding point of view,
    alv list is done with Function modules,
    alv gris can also be done with FM,
    but can also be done using OO concepts.
    b) Alv grid (using oo concept) requires
    designing the screen layout .
    Hence, in one screen, we can show more
    then one alv grid
    (we cannot show more than
    one alv list on one screen)
    c) ALV grid uses ActiveX controls
    present on the Presentation Server.
    Hence, it consumes More Memory
    on the presentation server.
    d) ALV LIST is Display Only.
    Whereas
    ALV Grid Can Be made EDITABLE for entry purpose.
    e) In alv grid, these options are possible,
    but not in alv list.
    without horizontal lines
    without vertical lines
    without cell merging during sorts
    display total lines above the entries
    ALV LIST Can be coded using only FMs
    ALV GRID Can be coded using FMs and object oriented concepts
    ALV LIST Can be displayed hieraicharlly
    ALV GRID cannot be displayed hierarichally
    I hope it helps.
    Rgds
    Anver

  • Urgent help in function modules

    Hi Gurus,
    Please send me the names of the related function modules of ISU.also if possible send examples or tutorials of FM creation and the coding involved in it.
    My email is [email protected]
    All Replies will be rewarded.

    Check the links below for details about creating Function Modules:
    http://help.sap.com/saphelp_nw04/helpdata/en/26/64f623fa8911d386e70000e82011b8/content.htm
    http://www.erpgenie.com/abap/functions.htm
    Check this link for how to create the function module exit..
    http://sap.niraj.tripod.com/id62.html

  • Regarding function module

    hi all, could u pls help me on my thread.
    in my program
    data:p_molga type molga.
    select-options:s_molga for p_molga.
    in function module source code
    select
            pernr
            jobseq
            docnum
            molga
            bukrs
            jobname
            jobcount
            jobtype
            jobdate
            jobtime
            inistat
      from ztp_idoc_xref
      into table idoc_table
      where molga eq r_molga.
    and in exporting iam exporting the data.
    in the tables  R_MOLGA     TYPE     ZTP_MOLGA_RANGE it is table type.
    line type :inv_ranges     .
    in program
    what is the parameter should i give for  tables parameter.
    and how can i restrict the molga values.
    thank u in advance.

    Hi,
    use
    CHANGING idoc_table.  You will have to pass your idoc_table structure to the FM.  You should not restrict on molga, but you can only do this by hard coding it:
    if r_molga eq '07'.
      run FM.
    else.
      do nothing
    endif.
    thanks.
    jamie

  • Regarding function module in update task

    Hi,
    I have a function module(Zxxx) which is update type. i have called the fun.module in my program (Zyyy) using the syntax CALL FUNCTION ZXXX IN UPDATE TASK. As I suppose to debug the function module, I activated the update debugging in the debugging screen. But the controll still not goen into the function module. Please let me know solution.
    Thanks & regards,
    Suresh

    >
    sureshkumar vaniyasekar wrote:
    > I activated the update debugging in the debugging screen. But the controll still not goen into the function module.
    Hello Suresh,
    What do you mean by not going?
    If you are trying to do an F5 at the function call, the debugger is not "enter" into the FM. This is because at this point the function call is registered but the FM is not executed.
    Update FM calls registered in a particular LUW are executed(in a special "UPD" workprocess) when there is a COMMIT encountered(may be explicit or implicit).
    Did you read the online help on [Update Debugging|http://help.sap.com/saphelp_NW70EHP1core/helpdata/en/c6/617d0ce68c11d2b2ab080009b43351/content.htm] & [Breakpoint behaviour during Update Debugging|http://help.sap.com/saphelp_NW70EHP1core/helpdata/en/c6/617cbee68c11d2b2ab080009b43351/content.htm]?
    BR,
    Suhas

  • Help in Function module

    Hi All,
    I want to add FILE NAME  option in import parametsr in function module. I want to download the RFC FM  interface Output in excel format.
    Please give any sample programs.
    regards,
    Ajay reddy

    PROGRAM  ZSV_TEST.
    Data : IT type table of kna1 initial size 0.
    Select * from kna1 into table IT up to 10 rows.
    CALL FUNCTION 'SAP_CONVERT_TO_XLS_FORMAT'
      EXPORTING
      I_FIELD_SEPERATOR          =
       I_LINE_HEADER              = 'X'
        I_FILENAME                 = 'C:\TEST.XLS'
       I_APPL_KEEP                = 'X'
      TABLES
        I_TAB_SAP_DATA             = IT
    CHANGING
      I_TAB_CONVERTED_DATA       =
    EXCEPTIONS
      CONVERSION_FAILED          = 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.
    The Headings wont be downloaded. if needed then declare a internal table with character fields append the titles and then the values and call this function.
    Reward if it helpful
    Thanks & Regards
    Senthilvel Murugesan

  • ABAP Dump when calling Function Module Starting New Task

    Hi all. I have a tricky situation now, I am doing a POC on parallel processing.
    I am getting an ABAP dump on the following Call Function line which is in class lcl_steer_114numc (See below for full program):
    METHOD start.
        CALL FUNCTION 'Z_ZZCLS_STEER_114NUMC'
          STARTING NEW TASK me->id
          CALLING me->finish ON END OF TASK.
      ENDMETHOD.                    "start
    However I get the following ABAP dump:
    Short text
        Statement "CALL FUNCTION .. DESTINATION/STARTING NEW TASK/IN BACKGROUND TASK"
    The function module only contains a wait statement to simulate parallel processing. It is strange that it dumps here, because when I change the FM call to another call that has been triggered successfully from other classes, it still produces the same ABAP dump.
    The background of the Proof Of Concept is to see if I can get an event to trigger the next process that depends on the outcome of the previous process. Parallel processes are run in the start methods by calling RFC.
    <Garbled code removed>
    Moderator Message: Please post relevant portions of the code only.
    Edited by: Suhas Saha on Jul 17, 2011 1:17 PM

    Well, the thing is I did manage to run 3 other Function Modules asynchronously succeesfully prior to that function call, with the same exact function call syntax. Further more, I have tried editing it with your suggestion but I get the exact same dump.
    The complete function group can be downloaded here (slinkee file):
    https://docs.google.com/leaf?id=0B3sua1Bw4XK4ZmFhNzcwMTgtYzQ0Mi00NzQ4LTg5YTMtNDNlNWUxYTM2NTg3&hl=en_US
    The complete program can be downloaded here (slinkee file):
    https://docs.google.com/leaf?id=0B3sua1Bw4XK4YWJmNjU3ODYtODRmMy00Nzg2LThkNTUtZjNkNDRhZGQ3MTUw&hl=en_US
    The complete ST22 dump can be found here:
    https://docs.google.com/leaf?id=0B3sua1Bw4XK4ZDU1YmFkZDAtOTU5MS00ZTgwLWFlZTktNWZhMDUxMzJlZWNl&hl=en_US
    Basically I ST22 gives me the following:
    Runtime Errors         RPERF_ILLEGAL_STATEMENT
    Date and Time          17.07.2011 05:29:54
    |Short text                                                                                |
    |    Statement "CALL FUNCTION .. DESTINATION/STARTING NEW TASK/IN BACKGROUND TASK"                 |
    |What happened?                                                                                |
    |    Error in the ABAP Application Program                                                         |
    |                                                                                |
    |    The current ABAP program "Z_ZZB1_CLOSE_PERIOD_TEST2" had to be terminated                     |
    |     because it has                                                                               |
    |    come across a statement that unfortunately cannot be executed.                                |
    And it explains it here (but is not helpful / relevant at all) as I ran the program from SE38.
    |Error analysis                                                                                |
    |    There is probably an error in the program                                                     |
    |    "Z_ZZB1_CLOSE_PERIOD_TEST2".                                                                  |
    |    The program was probably called in a conversion exit                                          |
    |    or in a field exit. These are implemented by                                                  |
    |    function modules called CONVERSION_EXIT_xxxxx_INPUT/OUTPUT or                                 |
    |    USER_EXIT_xxxxx_INPUT.                                                                        |
    |    Conversion exits are triggered during screen field transports or                              |
    |    WRITE statements, field exits during field transports from the                                |
    |    screen to the ABAP/4 program.                                                                 |
    |    In this connection, the following ABAP/4 statements are not allowed:                          |
    |                                                                                |
    I hope you try to download the slinkee files and you will notice the call function I performed was no different than the other call function RFC calls that really are working.

Maybe you are looking for

  • Blue & White G3 won't boot from Tiger DVD

    Correct me if I'm wrong, but the B & W G3's ARE supported under OS X 10.4 right? This computer came to me only a week ago with 10.3.9 installed (flaky, but working), 32x CD-ROM, 384 MB RAM, 25 GB HD. The PRAM battery is dead. I was also given an NEC

  • Different spreadsheet output on French locale

    Hi guys, So I moved some VIs over to another laptop. The laptop language is set to French. Now, my output is different. I changed my laptop language to English, in hopes of having it work properly again. No luck. Look at the screenshot below: It is s

  • Cannot encrypt Password in MDSS file...

    Hi All, Can in  mdss.ini file we encrypt the password for repository with user id other than Admin? issue is i change the password in console for Admin and then try to login datamanager with Admin user id ,but it fails saying Invalid login credential

  • Condition variable for sql query

    I have created the follwing query which adds the open sales orders and forecasts to create a projected cashflow.  The query works fine except I would like to be able to enter the forecast code, rather than have it hard coded.  If I enter Where OFCT.c

  • Why Mac's are not prone to viruses

    I have ALWAYS had a mac dating back to the old Macintosh II and dread whenever I HAVE TO use a windows. Many of my friends and employees are windows fans and I have found myself defending mac's when I do not know the facts. I would greatly appreciate