Function Exit , How to Debug

hi
i have created five function with four are hidden and one function Exit , for Function Exit i am using functin module , but when i put a Breakpoint in Function module and run the BPS , Debugging is not working out , it directly executing.
can anyone help me how to debug the function exit(Function Module) before running the report

Hi,
Go to that corresponding parameter group for that exit function, right click -execute with trace..it will take you to debugging screen..  (put a breakpoint before execution)

Similar Messages

  • BPS function exit  how to

    Hi all,
    I have some bad fund in my cube. So to correct these bad funds, I am using function exit in BPS. My question is: Do I need to implement the initialization function and exit function both. how could I write these function modules.
    does anybody have sample coding for these functions.
    any help appreciated.
    Thanks.
    BNP

    Thanks ATW and all.
    But I still could not figure it out.
    I am trying to summarize my problem and code here.
    FUNCTION Z_INFOPROV_FUND_EXIT.
    ""Local Interface:
    *"  IMPORTING
    *"     REFERENCE(I_AREA) TYPE  UPC_Y_AREA OPTIONAL
    *"     REFERENCE(I_PLEVEL) TYPE  UPC_Y_PLEVEL OPTIONAL
    *"     REFERENCE(I_METHOD) TYPE  UPC_Y_METHOD OPTIONAL
    *"     REFERENCE(I_PARAM) TYPE  UPC_Y_PARAM OPTIONAL
    *"     REFERENCE(I_PACKAGE) TYPE  UPC_Y_PACKAGE OPTIONAL
    *"     REFERENCE(IT_EXITP) TYPE  UPF_YT_EXITP OPTIONAL
    *"     REFERENCE(ITO_CHASEL) TYPE  UPC_YTO_CHASEL OPTIONAL
    *"     REFERENCE(ITO_CHA) TYPE  UPC_YTO_CHA OPTIONAL
    *"     REFERENCE(ITO_KYF) TYPE  UPC_YTO_KYF OPTIONAL
    *"  EXPORTING
    *"     REFERENCE(ET_MESG) TYPE  UPC_YT_MESG
    *"  CHANGING
    *"     REFERENCE(XTH_DATA) TYPE  HASHED TABLE
    functional requirement.
    correct fund value in the given cube zxxx1.
    *characteristics                  key values
    *fund     fund center             key1    key2
    *1A2      4562389                 300     500     -
    line 1
    *to correct the fund above, I am adding these two records
    *2A2      4562389                 300     500     -
    line2
    *1A2      4562389                -300    -500     -
    line3
    *I am trying to accomplish the above scenario.
    *Could you please tell me what I am missing.
    *Here is my code
      TYPES: begin of f_c,
                 v_from type /BIC/OIZVAL_FROM,
                 fund   type /BI0/OIFUND,
             end of   f_c.
      Data:  t_fund type table of f_c,
             w_fund type f_c,
             old_fund(10) type c..
      FIELD-SYMBOLS: <fundctr> type any,
                     <fund>    type any,
                     <s_kyfs>  type any,
                     <s_chas>  type any.
      field-symbols: <t_data> type hashed table,
                     <chavl>  type any,
                     <value>  type any,
                     <s_data> type any.
      data: ls_data type ref to data,
            lt_data type ref to data,
            l_chavl type upc_y_chavlint,
            ls_chasel type upc_ys_chasel,
            ls_charng type upc_ys_charng.
      data: l_app type ref to cl_upx_application.
      l_app = cl_upx_application=>get_instance( i_area ).
      lt_data = l_app->create_th_data( ).
      assign lt_data->* to <t_data>.
      ls_data = l_app->create_s_data( ).
      assign ls_data->* to <s_data>.
      <t_data> = xth_data.
      clear xth_data.
    transaction data
      loop at <t_data> assigning <s_data>.
        ASSIGN COMPONENT 'S_CHAS' OF STRUCTURE <s_data> TO <s_chas>.
        ASSIGN COMPONENT 'S_KYFS' OF STRUCTURE <s_data> TO <s_kyfs>.
        check sy-subrc eq 0.
        ASSIGN COMPONENT '0FUND' OF STRUCTURE <s_chas> TO <fund>.
        check sy-subrc eq 0.
        check not <fund> is initial. "no need to check for blank fund
        old_fund = <fund>. "holding old fund for third record above
       here add new record with new fund but with same key figures and characteristics
        ASSIGN COMPONENT '0FUNDS_CTR' OF STRUCTURE <s_chas> TO <fundctr>.
        check sy-subrc eq 0.
        select /BIC/ZVAL_FROM fund into table t_fund from /BIC/AZFMDERIV00
                          where /BIC/ZVAL_FROM <= sy-datum and
                                /BIC/ZSOUR1_TO = <fundctr>.
        check sy-subrc eq 0.
        sort t_fund by v_from descending.
        read table t_fund into w_fund index 1.
        <fund> = w_fund-fund. "new correct fund.
        collect <s_data> into xth_data. "adding line 2 above
       here add new record with all key figures values reversed
       return back old fund now.
        <fund> = old_fund.
        LOOP AT ito_chasel INTO ls_chasel.
        select struture with characteristics
          ASSIGN COMPONENT 'S_KYFS' OF STRUCTURE <s_data> TO <s_kyfs>.
        choose char according to ito_chasel
          ASSIGN COMPONENT ls_chasel-chanm OF STRUCTURE <s_kyfs> TO <value>.
        select value according to ito_chasel
          READ TABLE ls_chasel-t_charng INTO ls_charng INDEX 1.
        set char value
          <value> = ls_charng-low * -1.
        ENDLOOP.
        collect <s_data> into xth_data. "adding line 3 above
      endloop.
    ENDFUNCTION.

  • JVM 1.5 hang at system.exit(): how to debug ?

    Our Java application seems to sometimes hang indefinitely at System.exit().
    So far, we have observed that:
    - the hang does not happen when running JDK 1.4, but only with JDK 1.5 (we are trying to migrate to JDK 1.5.0_06)
    - it seems that if we comment out code that calls PrinterJob.print(), the hang does not happen
    - the hang can be observed on all our machines (different models), except one that is misteriously not impacted. OS is WinXP SP2.
    - when our software has sent a printer job to the printer and is running JDK 1.5, the problem can be reproduced after at most 4 or 5 tries, usually 1 or 2 runs being sufficient.
    - we have not been able to narrow the problem to a simple testcase (only reproduced using automated testcases on our application, which is 200.000+ LOC....)
    - when the JVM is stuck in System.exit, the process can be killed using the task explorer with the usual "program does not respond" and subsequent "send problem report" wizard after having killed it. (not to sure on exact wording in english...).
    We suspect a hard-to-hit regression or behavior change in JDK1.5 (there's no reason a java application could hang at System.exit(), right ?), but the above information is certainly far from being sufficient to open a bug report.
    So, any help to help us further identify the problem would be appreciated.
    More precisely, is there any way to try to understand the problem using a crash dump, or something like this ?
    Thanks

    I doubt that it hangs at System.exit(). Use jConsole (comes with your JDK) to connect to your application and inspect all running Threads which block at what exception stack trace.

  • Function Exit Help

    Hi Experts,
    I need to include two more input boxes in wherever GL . Account number is appearing in all screens.
    <b>
    Already Exits one is in boxes in wherever GL . Account number is appearing in all screen.</b>
    GL Account number (one input box,length 10)
    <b>
    Our current requirement is in boxes in wherever GL . Account number is appearing in all screen.</b>
    GL Account number (one input box1,length 10) (input box2 ,length 3) (input box3 ,length 3)
    So how to design the Screen (Tcode FS00) to include input box2 and input box3 in that screen. For this I found one User exit “GLX1028”..it has a Function Exit “EXIT_SAPL1028_001”.For further modification how can I proceed it . by using this Function Exit how can i proceed.
    Can please anyone give me steps detail.
    Thanks.

    First, you will have to search for screen exit where you can design subscreen for 2 additional boxes.
    Are you looking for modification in all screens where G/L is appearing or only in transaction FS00?

  • How to DEBUG a function module running in background mode? Please help!

    Hi Experts,
       I am calling a function module in my ABAP code in background module using the following syntax:
      CALL FUNCTION 'YBBC2_CREATE_SNAPSHOT' IN BACKGROUND TASK
              TABLES
                itab_std_format_inv = itab_std_format_inv
                itab_snapshot_inv = itab_snapshot_inv.
            COMMIT WORK.
    If I put the breakpoint in the CALL FUNCTION line and execute the program, the debugger does not take me to the valled function module. This may be because I am running the function module as background task.
    I cannot comment this  "IN BACKGROUND TASK" statement as well since i am debugging in Quality system where I don't have change access.
    So how to DEBUG a function module running in background mode? Please help!
    Thanks
    Gopal

    Hi,
    You could try to use the following trick:
    (1) Put an endless loop into the coding of your function module where you want to start debugging, e.g.
      DATA:
        lx_exit_loop(1)     TYPE c.
      lx_exit_loop = ' '.
      DO.
        IF ( lx_exit_loop = 'X' ).
          EXIT.
        ENDIF.
      ENDDO.
    (2) Call your function module in background task
    (3) Call transaction SM50 and search for the background process.
    (3) Choose from menu Program/Mode -> Program -> Debugging
    Now you the debugger should bring you right to your endless loop. Set lx_loop_exit = 'X' in the debugger and continue (F5 or F6).
    <b>Reward points</b>
    Regards

  • How to debug a program exit in a Workflow ?

    Hi experts,
                      How to debug a program exit in a workflow when the workflow is triggered ?
    thanks in advance
    regards
    Ashwin

    In 4.6c I did this by creating a function module and a table (zsm50_debug). In the table are just two fields: User name (key), and a flag (yes/no).
    The function module:
    FUNCTION zsm50_debug.
    *"*"Local interface:
    *"  IMPORTING
    *"     REFERENCE(Z_DEBUG_USER) LIKE  SY-UNAME
      DATA: z_exit,
            z_debug.
      CLEAR: z_debug.
      DATA: starttime   TYPE t,
            currenttime TYPE t,
            time_passed TYPE i.
      starttime = sy-uzeit.
    * Check if debugging is switched on
      SELECT SINGLE debug FROM  zsm50_debug
                          INTO  z_debug
                          WHERE uname = z_debug_user.
    * Debugging is switched on:
      IF z_debug = 'X'.
    *   Not an endless loop, but it will continue after approx. 1 minute...
    *   Plenty of time to go to SM50 to debug the program and continue!
        DO.
    *     Change the value of z_exit to 'X' to exit the loop an stay in
    *     debug mode.
          IF z_exit = 'X'.
            EXIT.
          ENDIF.
    *     To prevent an endless loop (if the user forgot that debugging was
    *     switched on in ZSM50_DEBUG, time is measured to allow the program
    *     to continue after 2 minutes
          GET TIME FIELD currenttime.
          time_passed = currenttime - starttime.
          IF time_passed > 120.
            WRITE: / '!!!==========================================!!!'.
            WRITE: / '!!!DEBUGGING STILL SWITCHED ON IN ZSM50_DEBUG!!!'.
            WRITE: / '!!!    Program was delayed by two minutes    !!!'.
            WRITE: / '!!!==========================================!!!'.
            EXIT.
          ENDIF.
        ENDDO.
      ENDIF.
    ENDFUNCTION.
    This FM reads the table and checks if the flag is switched on. If so, it loops for two minutes. After that, it continues regardless. If not flagged, it continues immediately.
    This way, you can debug any program that is running in the background.
    In every method I program I add this FM right in the beginning. With authorization for SM50, I can then debug the program (in production it may be difficult to get the correct server, if there are more).

  • How to see function exit Z_STRUCTURE_MAPPER_AFTER

    Hi,
    PROBLEM:I want to find out where and How function exit is called in my program.
    I have one program that will load Temporary table entry to Permanebt table in MW.
    Program Z_ASCI_ADAPTER_INVOKE is calling customer exit Z_STRUCTURE_MAPPER_AFTER
    to map some field while loading data from temp table to permanent(Consolidated database) table.
    Can any one please tell me how it is calling in my program.
    Even after debugging the program I am not able to find out  where exit is called.

    Hi Amit,
    I would suggest to display the function in SE37 (or in SE38 if it is a program) and then use the 'where used' button.
    best regards
    Christophe

  • How to debug a remote function module in calling system? Help!

    Hi Experts,
       I have a ABAP report (in System A) from where I am calling a remote function module which exists in a different system B.
    ABAP Program(System A)<----calls--
    RFC(System B)
    Can I debug the RFC funnction module in system A using ABAP debugger? In other words if i put a breakpoint on the "call function" statement then in debug mode I want to see that the control is going to system B and I should be able to process the FM code line by line. Is this possible?
    Is there any special transaction or settings?
    Is there any alternative?
    Please help
    Thanks
    Gopal

    hello,
    Try this method.
    first check whether RFC connection is working b/w 2 systems.
    if connection is working, then do like this.
    In System B , put endless loop in FM before some main select statement.
    like
    DATA : v_a TYPE c VALUE space
    DO  .
       IF v_a = 'X'.
         EXIT.
       ENDIF.
    ENDDO.
    the above code will be endleep loop.
    In system A, when cursor goes to CALL FUNCTION DESTINATION 'XXXXX'.
    u shud be logged in system B. the moment control comes to system B.goto tcode SM50 . check ur username . choose that particular  checkbox then in menu bar --> program/session --> Program --> Debugging.
    i hope it will help u.
    try & let us know.
    Thanks,
    Manjunath MS

  • Help w/MaxDB Function; also: how does the "Debug SQL" function work?

    Hi there forum folks,
    In my former life, I was a Basis guy, but I haven't had the pleasure of working directly with SAP applications in a few months.  My current project is to attempt to use MaxDB in a real estate environment.  We're tracking home listings so that we can build statistical reports... such as "what agents are in the Top 100 in postal code X?"
    Anyway, as part of this project, I have attempted to construct my very first MaxDB database function.  Unfortunately, it doesn't give me the answers I'm hoping to see.  Here's the function:
    CREATE FUNCTION COUNT_LISTINGS (AGENTID CHAR(10)) RETURNS FIXED(6,1) AS
      VAR COLISTINGAGENTID CHAR(10);
          LISTINGAGENTID   CHAR(10);
          MLSNUMBER        CHAR(7);
          UNITS            FIXED(6,1);
      SET UNITS = 0;
      DECLARE FUNCTIONRESULT CURSOR FOR
        SELECT MLSNUMBER,
               LISTINGAGENTID,
               COLISTINGAGENTID FROM FREDDIE.GLAR_SOLDS
         WHERE LISTINGAGENTID = :agentid OR COLISTINGAGENTID = :agentid;
      IF $COUNT IS NULL THEN
        BEGIN
          CLOSE FUNCTIONRESULT;
          RETURN UNITS;
        END
      ELSE
        SET $RC = 0;
      WHILE $RC = 0 DO BEGIN
        FETCH FUNCTIONRESULT INTO :mlsnumber, :listingagentid, :colistingagentid;
        IF ( LISTINGAGENTID   = AGENTID AND COLISTINGAGENTID IS NULL ) OR
           ( COLISTINGAGENTID = AGENTID AND LISTINGAGENTID   IS NULL ) THEN
          SET UNITS = UNITS + 1
        ELSE
          SET UNITS = UNITS + 0.5;
      END;
    CLOSE FUNCTIONRESULT;
    RETURN UNITS;
    I've tried to follow the official MaxDB documentation.  My first deviation from that standard was the use of the "$COUNT" variable (instead of the "$RC" variable) immediately after the DECLARE/SELECT statement above.  When I tried to use $RC, for either a successful or unsuccessful query, $RC was always set to a non-zero value.
    I believe I'm past that, but now my issue is down around that FETCH statement.  The UNITS variable doesn't end up with the value I expect.  I know that it can be terribly confusing to try to analyze someone else's logic, but here's a brief narrative that describes what I'm trying to do...
    The GLAR_SOLDS table holds one line for each home sold.  It's keyed by the MLSnumber.  Each record also stores up to four agents who've been involved in the transaction: the listing agent, the co-listing agent, the selling agent, and the co-selling agent.  The database function I've written above pertains to the listing side only.  If I can get this to work, a separate function will process the selling side.  If no co-listing agent is involved in a given sell, that agent should get credit for 1 unit sold.  If he/she has help from a co-listing agent, the agent should only get credit for 1/2 unit sold.
    Also, does anyone know how the "Debug SQL" functionality is supposed to work within Database Studio?  When I right-mouse click on my function, and follow the path thru "Debug As...", after entering the connection & function arguments, I'm presented with an empty screen.  If you could point me to some documentation somewhere, I'd gratefully read it.
    I'm using MaxDB 7.7.06.09 on Windows XP (WIN32) with MaxDB Database Studio 7.7.06.09 (build 009-123-202-944).
    Thanks everyone for your help & advice.
    ~Fred

    Fred,
    please either provide the full SQL statements for your example or stick with mine.
    I'm not going to build it up myself a second time to suit yours now.
    >  But now, my issue is how do I store the resultant data in its own table?
    So where is the problem?
    INSERT INTO <target table> (field 1, field 2, ...)  (<your query>)  UDPATE DUPLICATES-
    With my tables this looks like this:
    create table sell_result (list_agent varchar(20) primary key, SUM_CREDIT fixed (10,2))
    insert
    into sell_result (list_agent,sum_credit)
        ( select list_agent, sum (credit) as SUM_CREDIT
          from ( select sh.object_id,lag.name as list_agent, 1 as credit
                 from soldhomes sh join agents lag on lag.id = sh.list_agent_id
                union all
                 select sh.object_id, lag.name as list_coagent, 0.5 as credit
                 from soldhomes sh join agents lag on lag.id = sh.list_coagent_id
          group by list_agent
    update duplicates
    Check what we have now
    sqlcli db770=> select * from sell_result
    | LIST_AGENT           | SUM_CREDIT        |
    | -------------------- | ----------------- |
    | Lars                 |              4.50 |
    | Lisa                 |              3.00 |
    | Mona                 |              2.50 |
    | Paul                 |              2.50 |
    4 rows selected (600 usec)
    Now add some sales data...
    Insert into soldhomes values (11, 1, 2, NULL, NULL)
    Insert into soldhomes values (12, 2, NULL, NULL, NULL)
    Insert into soldhomes values (13, 2, NULL, NULL, NULL)
    Re-run the INSERT command and you're done:
    sqlcli db770=> select * from sell_result
    | LIST_AGENT           | SUM_CREDIT        |
    | -------------------- | ----------------- |
    | Lars                 |              5.50 |
    | Lisa                 |              3.00 |
    | Mona                 |              5.00 |
    | Paul                 |              2.50 |
    4 rows selected (390 usec)
    Neat, isn't it?

  • How to debug a function module using in the generic datasource?

    Hi all,
    We have created a generic data source using function modulle and have been extracting the data for a single customer it contains single records but it has pulled out more than 10,000 records. how to debug the function module used in the data source.
    since we schedule for extraction in bi and back ground job gets triggered in ecc for extraction,
    i know in se37 we can select the function module name and then debug but still need to check while the bacground job is trigered through bi.
    Thanks

    Yes you can debug the Function Module.
    Open the function module in SE37 and put a break point in the code where you want to check from, then come to RSA3 and give the datasource name and check the Debug check box on this screen, once you click on the start button it will take you the place where you have placed the break point in the FM, by pressing F5 you can see the flow of the FM.
    Let me know whether this solves your issue.

  • How to debug PL/SQL functions? Passing parameter and debugger error

    Hi,
    How to debug a PL/SQL function in JDeveloper? There are two problems with it:
    1) Don't see how it's possible to pass parameters required by function call (in the dialog opening after Debug -> Debug FUNCTION_NAME)
    2) In a function returning table_name%ROWTYPE (and having a record declaration for table_name%ROWTYPE), debug gives error:
    PLS-00103: Encountered symbol "/" when expecting one of ... in line
    v_Return PL/SQL RECORD;
    Debugging procedures works as expected.
    Found a similar question without answer here:
    Debugging PL/SQL with parameters

    Check
    http://www.oracle.com/technology/obe/obe9051jdev/plsqlobe/obeplsql.htm#t2
    Frank

  • How to read data from a function exit

    Hi friends,
    I have a requirement, where in i am creating a screen exit for ME51N.I am using MEREQ001 enhancement for this.It is working fine, but i am to get data in to this so as to write any code.For that i am using the function exit EXIT_SAPLMEREQ_001 in that same enhancement(thought of doing export and import).
    But the data is declared in this way..
    REFERENCE(IM_REQ_ITEM) TYPE REF TO IF_PURCHASE_REQUISITION_ITEM
    so now it is having a method GET_DATA in which i have all the parameters required.
    can anyone please tell me how to read this data...
    Regards,
    Thoufique.

    thats ok friends..i got the solution.
    Regards,
    Thoufique

  • How to Debug During Event Linkage( Reciever Function Module )

    Hi all,
           If anybody knows how to debug a reciever function module in event linkage method then please respond.The scenario is that whenever service order is changed the change event will fire the custom business object which has a supertype BUS2088.

    Hi Nishanth,
    You can debug event linkage using the transaction SWUE.
    Here you can raise an event and specify an object key (using an already created service order). 
    Just flag the trigger receiver FM synchr. checkbox and your break point will be hit.
    Hope that helps.
    Cheers,
    Brad

  • How to Debug Upload Function (ZCL_RSPLF_FILE_UPLOAD)

    Hello,
    We have the standard Upload function customized to call a function module which eventually does some calculations. I need to modify the function module with extra logic. I cant test the FM directly as it doesn't have Test Frame.
    Am stuck at how to debug the Upload function. Is it possible through program RSPLS_PLSEQ_EXECUTE but then how do I create the variant. Cant create it through Modeler.
    Please suggest.
    Thanks and regards
    Gaurav

    Hi Gaurav,
    As per my understanding you are trying to debug the custom planning function created using SE24.Go to this transaction enter the function name and place the externa break point as suggested in interface you want to debug .
    OR go to rsplf1 - specify function and place external break point.
    You can get it triggered two ways.
    If you already have GPS- Planning sequence built ,directly execute it .It will take you in debug mode.
    You can also create new one if required for testing.
    or
    If you are using any layout to load data ,you can also trigger it from there.
    It will take you to debug mode only after you place external breakpoint.
    Do not put break point rgt after intialization....

  • How to debug Function Modules from ISA!!!

    Hi Gurus,
                     How to debug the function modules from ISA.
    For Ex:If i am in shopping cart or product catalog,e.t.c..i need to know which FM is calling from backend, how to debug the FMs/Bapis related to that from ISA side.
    direct me to all the possible ways.
    Regards,
    Anil.

    Hello Anil,
    There are a few things you need to look at when trying to debug .
    1. The function module needed ( you can do a trace to see which one is called.)
    2. The user that is been user With statefull and stateless connection the FM can be called by either the JCO user or the internet user. This will need to be considered when setting your external break point.
    3. The server been used, You will need to check the XCM to see which server is been used ie are you using a group connect of a specific server , You need to make sure that you are setting the breakpoint on the server that is specified in the XCM.
    Have a look at note [871907|https://service.sap.com/sap/support/notes/871907]   the attachment to the note may help you a lot. .
    Hope this helps.
    Regards
    Mark
    Edited by: Mark Foley  on Feb 11, 2009 11:10 AM

Maybe you are looking for

  • ICal not syncing from computer to iPhone

    When my wife enters events in her Mac iCal they don't show up on her iPhone. When she enters in her iPhone events in the calendar show up on her computer. Both computer and phone r set to sync to iCloud. Any ideas?  Thanks

  • WHY DO YOU DISABLE THE ABILITY TO VOTE ON MANY COMMENTS ON NEW MENU?

    I see that one is no longer able to vote for many ideas your subscribers have suggested for the new menu on TV.  Of course, all of the places one can no longer vote are NOT IN FAVOR  of the new Menu. Why has voting been blocked on these comments? Ple

  • Linking and updating between photoshop and illustrator cs6

    Im having trouble with linking my files from photoshop to illustrator on a mac. Im using CS6 and it used to work fine, I'm not sure if I disabled a option somewhere but now It doesn't update the files when I make changes. For example if I'm making a

  • Troubles in message propagation

    Hi, guys. I really need you to help me out. I am using Oracle 9i and want to make JMS propagation work. I have read all postings here and Oracle 9i Application developer's guide-Advanced Queuing (especially 12-81) I still could not get it working pro

  • WRV200 can be administered wireless in spite of Local Remote Access DISABLED.

    I have a WRV200 with Local Remote Access disabled (HTTPS= Disable and Allow Wireless Web Access= Disable). When I go and connect wireless to the router, I still can access the configuration in wireless mode. What do I need to do such as to not allow