CRM_ORDER_SAVE works properly only in debug mode

I have a scenario where I'm creating two order documents (using CRM_ORDER_MAINTAIN and CRM_ORDER_SAVE), then linking them with function module CRM_CREATE_BREL_TO_CONTRACT.  After calling CRM_ORDER_SAVE and before CRM_CREATE_BREL_TO_CONTRACT, I "commit work and wait" and call CRM_ORDER_INITIALIZE.  When I set a breakpoint immediately before CRM_CREATE_BREL_TO_CONTRACT (and thus have to pass through debug mode), CRM_CREATE_BREL_TO_CONTRACT works with no problem.  If I don't pass through debug mode, it fails and returns the flag EV_LOCKING_PROBLEM = true.
I have added "wait X seconds" and have even added a while loop that calls CRM_ORDER_CHECK_CHANGE_ALLOWED.  But when I don't enter debug mode, this while loop runs forever.
Does anybody know what's happening here?  I suspect there is some kind of problem with document distribution, but I'm not sure.
Many thanks,
Tom Peng

Hello Tom,
As you may already known, the lock is added in FM CRM_CREATE_BREL_TO_CONTRACT with the following coding:
      IF ls_active_switch-lock_contract <> gc_act_switch-inactive.
*       Lock contract
        CALL FUNCTION 'CRM_ORDER_ENQUEUE'
          EXPORTING
            iv_guid           = iv_contract_header
          IMPORTING
            ev_already_locked = lv_already_locked
          EXCEPTIONS
            foreign_lock      = 1
            system_failure    = 2
            distributed_lock  = 3
            no_change_allowed = 4
            transferring      = 5
            OTHERS            = 6.
        IF sy-subrc <> 0.
Here system checks whether activ_switch is active. If yes, the error issued.
Thus you need to pass the parameter t_active_switch with value false when call FM crm_order_save.
Hope this information could be helpful.

Similar Messages

  • Updating Custom Table Only in Debug Mode

    Hi All!
    I have been encountering issues in updating a custom table. It would work successfully only in debug mode otherwise it won't update an entry in the table.
    This is the piece of code that would update an entry in the table specifically used in a user exit. The functionality of this code is to automatically remove a transportation block:
    SELECT SINGLE *
    INTO wa_zblock
    FROM zblock
    WHERE zzblknum EQ c_tr01
    AND vbeln EQ p_lvbeln
    AND zzprocessed EQ space.
    IF sy-subrc EQ 0.
    DO.
    CALL FUNCTION 'ENQUEUE_E_TABLES'
    EXPORTING
    MODE_RSTABLE = 'S'
    TABNAME = c_lzblock
    EXCEPTIONS
    FOREIGN_LOCK = 1
    SYSTEM_FAILURE = 2
    OTHERS = 3.
    IF sy-subrc EQ 0.
    wa_zblock-zzprocessed = c_x.
    wa_zblock-zzapproveby = sy-uname.
    wa_zblock-zzapproveon = sy-datum.
    MODIFY zblock FROM wa_zblock.
    if sy-subrc EQ 0.
    COMMIT WORK AND WAIT.
    endif.
    EXIT.
    ENDIF.
    ENDDO.
    CALL FUNCTION 'DEQUEUE_E_TABLES'
    EXPORTING
    MODE_RSTABLE = 'S'
    TABNAME = c_lzblock.
    ENDIF.
    How can I make this update the custom table successful in undebugged mode? Please let me know your thoughts on this.
    Thanks!

    I also suggest you to lock only the entry that will be updated (and not the whole table!) : you will have then far less problems of conflict with updating this table.
    For that, you have to create a lock object on your table (via SE11 - for example EZ_MY_TABLE). This will create 2 function modules named ENQUEUE_E<name of your lock object> (in my example ENQUEUE_EZ_MY_TABLE) and DEQUEUE_E<...>.
    You can then call those FM like this :
    CALL FUNCTION 'ENQUEUE_EZ_MY_TABLE'
      EXPORTING
        MODE_RSTABLE = 'S'
        KEYFIELD1 = ld_keyfield1  " Here are the key values for the entry that you have to update
        KEYFIELD2 = ld_keyfield2
      EXCEPTIONS
        FOREIGN_LOCK = 1
        SYSTEM_FAILURE = 2
        OTHERS = 3.
    Best regards,
    Samuel

  • CRM_ORDER_MAINTAIN works only in debug mode

    Hi Experts,
    I am currently facing a strange issue. I am trying to add a line item to a service ticket, but the code works only in debug mode. Sample code is given below:
    lv_product_i-ref_handle = '0000000001'.
    lv_product_i-ref_guid = lv_header_guid.
    INSERT lv_product_i INTO TABLE lt_product_i.
    ls_orderadm_i-header = lv_header_guid.
    ls_orderadm_i-itm_type = 'ZSG5'.
    ls_orderadm_i-number_int = '0000000010'.
    ls_orderadm_i-ordered_prod = 'SERVICEITEM_SG5'.
    ls_orderadm_i-handle = '0000000001'.
    ls_orderadm_i-mode = 'A'.
    ls_orderadm_i-itm_proc_ident = 'SRVC'.
    INSERT ls_orderadm_i INTO TABLE lt_orderadm_i.
    ls_input_fields-ref_handle = '0000000001'.
    ls_input_fields-objectname = 'ORDERADM_I'.
    CLEAR ls_field_names.
    ls_field_names-fieldname = 'HANDLE'.
    APPEND ls_field_names TO ls_input_fields-field_names.
    ls_field_names-fieldname = 'HEADER'.
    APPEND ls_field_names TO ls_input_fields-field_names.
    ls_field_names-fieldname = 'ITM_PROC_IDENT'.
    APPEND ls_field_names TO ls_input_fields-field_names.
    ls_field_names-fieldname = 'ITM_TYPE'.
    APPEND ls_field_names TO ls_input_fields-field_names.
    ls_field_names-fieldname = 'MODE'.
    APPEND ls_field_names TO ls_input_fields-field_names.
    ls_field_names-fieldname = 'NUMBER_INT'.
    APPEND ls_field_names TO ls_input_fields-field_names.
    ls_field_names-fieldname = 'ORDERED_PROD'.
    APPEND ls_field_names TO ls_input_fields-field_names.
    INSERT ls_input_fields INTO TABLE lt_input_fields.
    CALL FUNCTION 'CRM_ORDER_MAINTAIN'
    EXPORTING
    it_product_i = lt_product_i
    CHANGING
    ct_orderadm_i = lt_orderadm_i
    ct_input_fields = lt_input_fields
    EXCEPTIONS
    error_occurred = 1
    document_locked = 2
    no_change_allowed = 3
    no_authority = 4
    OTHERS = 5.
    LOOP AT lt_orderadm_i INTO lv_tempvar.
    lv_item_guid = lv_tempvar-guid.
    ENDLOOP.
    The item guid is coming as initial and no item is being added.But if i put a breakpoint in CRM_ORDER_MAINTIAN, then the guid is being generated properly. Any pointers why the code is behaving like this or someone has faced a similar issue before?
    Thanks and Regards,
    Rohit

    Hi Rohit,
    The above said is also correct + U have to write
      CALL FUNCTION 'CRM_ORDER_SAVE'
        EXPORTING
          IT_OBJECTS_TO_SAVE = GT_OBJ_GUIDS
        IMPORTING
          ET_SAVED_OBJECTS   = GT_SAVED_OBJECTS
        EXCEPTIONS
          OTHERS             = 2.
      COMMIT WORK.

  • CRM_ORDER_MAINTIAN works only in debug mode!

    Hi Experts,
    I am currently facing a strange issue. I am trying to add a line item to a service ticket, but the code works only in debug mode. Sample code is given below:
    lv_product_i-ref_handle = '0000000001'.
    lv_product_i-ref_guid = lv_header_guid.
    INSERT lv_product_i INTO TABLE lt_product_i.
    ls_orderadm_i-header = lv_header_guid.
    ls_orderadm_i-itm_type = 'ZSG5'.
    ls_orderadm_i-number_int = '0000000010'.
    ls_orderadm_i-ordered_prod = 'SERVICEITEM_SG5'.
    ls_orderadm_i-handle = '0000000001'.
    ls_orderadm_i-mode = 'A'.
    ls_orderadm_i-itm_proc_ident = 'SRVC'.
    INSERT ls_orderadm_i INTO TABLE lt_orderadm_i.
    ls_input_fields-ref_handle = '0000000001'.
    ls_input_fields-objectname = 'ORDERADM_I'.
    CLEAR ls_field_names.
    ls_field_names-fieldname = 'HANDLE'.
    APPEND ls_field_names TO ls_input_fields-field_names.
    ls_field_names-fieldname = 'HEADER'.
    APPEND ls_field_names TO ls_input_fields-field_names.
    ls_field_names-fieldname = 'ITM_PROC_IDENT'.
    APPEND ls_field_names TO ls_input_fields-field_names.
    ls_field_names-fieldname = 'ITM_TYPE'.
    APPEND ls_field_names TO ls_input_fields-field_names.
    ls_field_names-fieldname = 'MODE'.
    APPEND ls_field_names TO ls_input_fields-field_names.
    ls_field_names-fieldname = 'NUMBER_INT'.
    APPEND ls_field_names TO ls_input_fields-field_names.
    ls_field_names-fieldname = 'ORDERED_PROD'.
    APPEND ls_field_names TO ls_input_fields-field_names.
    INSERT ls_input_fields INTO TABLE lt_input_fields.
    CALL FUNCTION 'CRM_ORDER_MAINTAIN'
    EXPORTING
    it_product_i = lt_product_i
    CHANGING
    ct_orderadm_i = lt_orderadm_i
    ct_input_fields = lt_input_fields
    EXCEPTIONS
    error_occurred = 1
    document_locked = 2
    no_change_allowed = 3
    no_authority = 4
    OTHERS = 5.
    LOOP AT lt_orderadm_i INTO lv_tempvar.
    lv_item_guid = lv_tempvar-guid.
    ENDLOOP.
    The item guid is coming as initial and no item is being added.But if i put a breakpoint in CRM_ORDER_MAINTIAN, then the guid is being generated properly. Any pointers why the code is behaving like this or someone has faced a similar issue before?
    Thanks and Regards,
    Rohit

    Well, during debugging an implicit COMMIT WORK is executed on a regular basis. This might cause the ITEM GUID to be created during debugging.
    However, normally, after CRM_ORDER_MAINTAIN, you should use the CRM_ORDER_SAVE as well. This will return a list of SAVED_OBJECTS. If all objects were saved correctly, do an explicit COMMIT WORK.
    Works fine for us.....

  • Function Module working only in debug mode

    Hi all,
    The following Function Module works only in debug mode. The purpose of this FM is to create a notification and to put it in progress status. If I put a breakpoint before "CALL FUNCTION 'BAPI_ALM_NOTIF_PUTINPROGRESS'" it works. If I execute this FM without putting a breakpoint at that place it creates the notification but doesnt put it in progress status.
    In other words, the last BAPI call doesnot work if I dont put a breakpoint before.
    Can somebody help me to find out where is the problem?
    Thanks,
    Younes
    FUNCTION ZFM_CREATE_NOTIF_IN_PROCESS.
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(NOTIFTYP) TYPE  CHAR2
    *"     VALUE(NOTIFHEADER) TYPE  BAPI2080_NOTHDRI
    *"  EXPORTING
    *"     VALUE(NOTIFNUMBER) TYPE  CHAR12
    *"     VALUE(NOTIFCURSTATUS) TYPE  CHAR40
    DATA: gs_bapi2080_nothdre TYPE bapi2080_nothdre,
          gt_return TYPE TABLE OF bapiret2.
    The notification is created with a temporary number
    CALL FUNCTION 'BAPI_ALM_NOTIF_CREATE'
      EXPORTING
        notif_type         = NOTIFTYP
        notifheader        = NOTIFHEADER
      IMPORTING
        notifheader_export = gs_bapi2080_nothdre
      TABLES
        return             = gt_return.
    READ TABLE gt_return TRANSPORTING NO FIELDS WITH KEY type = 'E'.
    CHECK sy-subrc IS NOT INITIAL.
    *The notication will be saved with a number which isnt temporary
    CALL FUNCTION 'BAPI_ALM_NOTIF_SAVE'
      EXPORTING
        number      = gs_bapi2080_nothdre-notif_no
      IMPORTING
        notifheader = gs_bapi2080_nothdre
      TABLES
        return      = gt_return.
    READ TABLE gt_return TRANSPORTING NO FIELDS WITH KEY type = 'E'.
    CHECK sy-subrc IS NOT INITIAL.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    The Notif is already created, it will be put in progress status
    NOTIFNUMBER = gs_bapi2080_nothdre-notif_no.
       CALL FUNCTION 'BAPI_ALM_NOTIF_PUTINPROGRESS'
            EXPORTING
              NUMBER             = NOTIFNUMBER
              LANGU              = SY-LANGU
           IMPORTING
             SYSTEMSTATUS       = NOTIFCURSTATUS
           TABLES
             RETURN             = gt_return.

    Hi Emmanuel,
    Now I get your problem: you want to wait to have the commit finished! The call to BAPI_TRANSACTION_COMMIT has an optional parameter 'WAIT' which is space by default which causes only a commit. When you set this parameter to 'X' it will do a commit work and wait.
    This should solve your problem!
    Regards,
    John.

  • My program works only in debugging mode

    Dear All,
    I am just starting to use LabVIEW and developing a instumental driver. 
    The program is rather sequentially designed because I am only used to work with text-based program. 
    The current program is working in debugging mode without any error message.
    To give an idea of how it is composed:
    1. Set up the serial port setting (machine address, baud rate, parity, etc)
    2. Send to the instument the name of a short program to be run. 
    3. Send mutiple string commands to the instruments.  Those string commands construct a short program to control the instrument.
    4. Send another string command to run the short program
    The issue is that it does not work in excution mode.  It looks to me that the communication between the instrument and computer seems to be too fast. 
    Since the program is designed in a sequential manner, it does not have any while-loop or for-loop so I cannot add any timing function. 
    Could anyone give me a hint or a right direction to fix this issue?  It would be really appreciated.  Thank you.
    Solved!
    Go to Solution.

    You could do something like the attached modification.Note how I modified the connector pane for the subVI to use the conventional 4-2-2-4 pattern and notice where I connected the terminals.
    NOTE: I am assuming the VI is supposed to run just once, and that you're not using the Run Continuously button in the toolbar. You're not, right?
    Attachments:
    NE-100_StairFlow_w_RUN00 MOD.vi ‏27 KB
    NE-100_RAT_00_XX MOD.vi ‏18 KB

  • Enhancement works only in debug mode

    Hi all,
    Need help with the issue that I have.I have written an enhancement , in one of the includes that is being called by MIRA(LMR1MF1H) tcode, to set the document type , based on condition.Below is the code snippet :
    Import the flags from memory id
    import is_invo from memory id 'IS_INVO'.
    import is_crme from memory id 'IS_CRME'.
    import is_pdf from memory id 'IS_PDF'.
    * Check whether PDF or scanned document and change doc type to Y3 or Y4
      if is_pdf eq 'X'.
    *    Check if invoice
         if is_invo eq 'X'.
           rbkpv-blart = 'Y3'.
         elseif is_crme eq 'X'.
           rbkpv-blart = 'Y4'.
         endif.
      wait up to 1 seconds.
      endif.
    * Free memory
      free memory id 'IS_INVO'.
      free memory id 'IS_CRME'.
      free memory id 'IS_PDF'.
    Now, When I execute directly, the document type is not getting set...I assume the control is not going to my code at all..as there is no other place where the doc type gets modified...
    However, when i execute in debug mode, it works perfectly fine...Any inputs on why this behaviour ?

    Hi ,
    I am not sure what is going wrong..I think the control is not going to the enhancement point at all ! I set a default value for the flag and still the document type doesnt change..Let me explain the flow of the code, that is written, it may help you guys in understanding..
    I have a Z report, in which, I am preparing the bdc data and also setting the flag is_pdf, based on some criteria.
    In this Z report, I am calling transaction MIRA.Now, MIRA tcode is calling FORM init_miro( in the include LMR1MF1H).Just before this form ends , I have my enhancement code(given above in my first post) written, to change  the doc type...
    Now, to test, I set the is_pdf flag to 'X', but still the doc type doesnt change...so I assume the control is not going there at all
    Also, I am not sure how to use the shared buffer concept..please suggest..

  • Poweroff works only in debug mode

    Hello,
    I am running a fully updated (30.4.14 ) Arch on an oldish P4, and my problem is that the computer does not poweroff of shutdown and reboots instead. The cmd I tried were "systemctl poweroff"  ,"poweroff", "shutdown -P now"
    For some reason, if I append "debug" to the cmdline, powering off works as expected but then the pc boots slowly and i get my logfiles spammed.
    The machine was running Ubuntu 10.04 with kernel 2.6 before where everything worked fine.
    I tried to to add various acpi commands such as "acpi=noirg" or acpi_os_name="Microsoft Windows"
    Whats different in debug mode that makes shutdown work?

    I had the opposite problem on my new system in that it would not reboot; it would always power down but never power back up. My problem was solved by blacklisting the Intel Management Engine driver “mei_me”. I don't know if that driver is your problem or not, but if your system has that driver loaded you could check to see if blacklisting would work by unbinding it before the poweroff:
    Get the device id bound to the driver:
    ls -1L /sys/bus/pci/drivers/mei_me/ | grep ':'
    E.g. 0000:00:1f.0
    Now write (as root) that value to unbind:
    echo 0000:00:1f.0 > /sys/bus/pci/drivers/mei_me/unbind
    Obviously replace 0000:00:1f.0 with your device id.
    If your system still fails to power off, the problem is not with mei_me.
    Otherwise, to save you from having to unbind the driver each time, you can blacklist the mei_me driver:
    E.g.:
    echo blacklist mei_me >> /etc/modprobe.d/fix-poweroff-problem.conf
    And reboot

  • Deserialization works only in debug mode

    When I try to deserialize an XML document (defined via File-Connection) it works fine in debug mode but I get an error in non-debug-mode. What's the problem here?
    Error: 2011-12-29 19:31:40.25
    Code: 0x00000001
    Source: Read data from SAP
    Description: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: There is an error in X
    ML document (0, 0). ---> System.TypeInitializationException: The type initializer for 'Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderList1' threw an exception
    . ---> System.NullReferenceException: Object reference not set to an instance of an object.
    at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderList1..cctor()
    --- End of inner exception stack trace ---
    at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderList1..ctor()
    at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializerContract.get_Reader()
    at System.Xml.Serialization.TempAssembly.InvokeReader(XmlMapping mapping, XmlReader xmlReader, XmlDeserializationEvents events, String encodingStyle)
    at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
    --- End of inner exception stack trace ---
    at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
    at System.Xml.Serialization.XmlSerializer.Deserialize(TextReader textReader)

    Yes, there is a potential for a bug. Thus, feel free to log it in
    MS Connect.
    You need to deploy it to the GAC, too. I will better point you to a blog post that covers this: http://www.hoekstra.co.uk/index.php/software-mainmenu-36/ssis-mainmenu-75/73-create-and-use-a-c-assembly-for-ssis.html?start=1
    I suggest when you go live you create a script that will take care of all, but it is not too too laborious.
    Arthur My Blog
    Are you 100% sure? Because I can see that SSIS seeks for the dll in ...DTS/binn. So I see no need to pollute the GAC with this dll.
    My dll is not deployed into the GAC and when I remove it, it will no longer work. I think it works in DTS/binn because the DTExec.exe is located there?
    LOG: This bind starts in default load context.
    LOG: Using application configuration file: c:\Program Files\Microsoft SQL Server\100\DTS\binn\DTExec.exe.Config
    LOG: Using machine configuration file from c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
    LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
    LOG: Attempting download of new URL file:///c:/Program Files/Microsoft SQL Server/100/DTS/binn/ClassLibrary1.DLL.
    LOG: Attempting download of new URL file:///c:/Program Files/Microsoft SQL Server/100/DTS/binn/ClassLibrary1/ClassLibrary1.DLL.
    LOG: Attempting download of new URL file:///c:/Program Files/Microsoft SQL Server/100/DTS/binn/ClassLibrary1.EXE.
    LOG: Attempting download of new URL file:///c:/Program Files/Microsoft SQL Server/100/DTS/binn/ClassLibrary1/ClassLibrary1.EXE.

  • SRM purchasing document updated in enhancement only in Debug mode

    Hi everybody,
    I created an enhancement for a SRM include ( LBBP_SOCO_APPF0R -> Form CREATE_FOLLOW_ON_DOCUMENT) because existing BAdI are not called at necessary moment to update Shopping Cart (purchasing document) CUF items.
    ABAP code i added allows to get data from follow-on document, then i get details from parent document, i update this document with values for CUF fields, i save this document and finally i run function module BAPI_TRANSACTION_COMMIT (with or without export parameter 'WAIT').
    Nevertheless, those CUF fields are correctly updated but only when i am in debugging process flow with an external break-point.
    When i delete this debug point, CUF fields are not updated any more !
    Is anyone have an idea to solve this problem ?
    Regards.
    Laurent.

    The problem may come from the network system or something's wrong in the system Because I have run the tcode and It work properly.
    Thanks,
    Hung

  • Processing happens only in debug mode.

    Hi,
    I am calling an RFC enabled FM BAPI_ALM_NOTIF_DATA_MODIFY and BAPI_ALM_NOTIF_SAVE to modify the data of a notification. These function modules are called within another FM which is also a RFC called in background as a separate task. The problem here is that, the data gets modified fine only when I am in the debugging mode and execute it. But if I execute without going to the debug mode, I cannot modify the notification data. Kindly suggest why this is happening and what the solution is. Thanks

    I am not using any destination. The code is as shown:
      WAIT UP TO 5 SECONDS.
      CALL FUNCTION 'BAPI_ALM_ORDER_GET_DETAIL'
        EXPORTING
          number                 = aufnr
       IMPORTING
         es_header              = gf_header
        TABLES
         et_olist               = it_ord_notif
          return                 = it_ret
    CALL FUNCTION 'BAPI_ALM_NOTIF_GET_DETAIL'
      EXPORTING
        number                   = gf_header-notif_no
    IMPORTING
       NOTIFHEADER_EXPORT       = gf_notif_exp
            CLEAR: gf_notif_no.
            DESCRIBE TABLE it_notif_no LINES g_line.
            READ TABLE it_notif_no into gf_notif_no INDEX g_line.
            IF gf_notif_no-short_text+0(3) = 'PRB'.
             clear: gf_notif_imp, gf_notif_imp_x.
                gf_notif_imp-desstdate = gf_notif_exp-desstdate.
                gf_notif_imp-desenddate = gf_notif_exp-desenddate.
                gf_notif_imp_x-desstdate = 'X'.
                gf_notif_imp_x-desenddate = 'X'.
                CALL FUNCTION 'BAPI_ALM_NOTIF_DATA_MODIFY'
                      EXPORTING
                        number                   = gf_notif_no-notif_no
                       NOTIFHEADER              = gf_notif_imp
                       NOTIFHEADER_X            = gf_notif_imp_x
                     IMPORTING
                       NOTIFHEADER_EXPORT       = gf_notif_result
                     TABLES
               CALL FUNCTION 'BAPI_ALM_NOTIF_SAVE'
      EXPORTING
        number            = gf_notif_no-notif_no
    IMPORTING
      NOTIFHEADER       = gf_qmnum_save
    TABLES
       RETURN            = it_ret2.
              endif.
                clear: gf_notif_no.
            LOOP AT it_notif_no INTO gf_notif_no.
              IF gf_notif_no-short_text+0(3) = 'PRB'.
                SELECT SINGLE objnr FROM viqmel
                                                      INTO g_objnr
                                                     WHERE qmnum = gf_notif_no-notif_no.
                SELECT SINGLE stsma INTO g_stsma FROM jsto WHERE objnr = g_objnr.
                SELECT SINGLE estat INTO g_stat FROM tj30t WHERE stsma = g_stsma AND
                  spras = 'EN'
                  AND txt04 = 'SFMR'.
                CALL FUNCTION 'STATUS_CHANGE_EXTERN'
                  EXPORTING
                    check_only          = ' '
                    client              = sy-mandt
                    objnr               = g_objnr
                    user_status         = g_stat
                    set_inact           = ' '
                    set_chgkz           = 'X'
                    no_check            = ' '
                  EXCEPTIONS
                    object_not_found    = 1
                    status_inconsistent = 2
                    status_not_allowed  = 3
                    OTHERS              = 4.
                IF sy-subrc = 0.
                ENDIF.
              ENDIF.
            ENDLOOP.
          ENDIF.
        ENDIF.
      ENDIF.

  • Published report will not run; works fine in VS2010 debug mode.

    Have 64bit Visual Studio Ultimate installed, CRv13_1 and MSSQL 2008 R2.
    The issue I am having is the report work like a champ when I run the web application in debug mode. IE I hit the run button in Visual Studio, However when I publish the application the report will not run. I get various errors depending on how I have connected to report to MSSQL. I have tried ODBC and OLE DB connections. I have tried Windows authentication and MSSQL user login. The results are the same. the report works fine in debug mode but will not work when published. The most common error message is :
    Error
    Database logon failed.
    or
    Login failed for user 'NT AUTHORITY\NETWORK SERVICE'
    Depending on how I am authenticating. I have Google this issue and there are tons of posts about it but no solutions. Any help would be appreciated.

    See if the article [Troubleshooting Guide to Database Connectivity Issues with Crystal Reports in Visual Studio .NET Applications|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b0225775-88c4-2c10-bd80-8298769293de] helps.
    I'd settle on the prefered connection method and troubleshoot that. Use the search box in the top right corner of this web page. It will bring up KBases, blogs, wikis, articles and more. Also, search these forums. There is lots of info here and lots of answers.
    - Ludek

  • I am in india and using i phone 5 whenever i insert a sim it works properly only for 10 or 30 or maximum one hour then phone shows no sim or invalid sim it has been going on for last one week i hv changed the sim but nothig changed please help me?

    i am in india iam using i phone 5 whenever i insert a sim card it works properly but after 10 or30 or maximum after one hour phone shows no sim or invalid sim.i have changed sim on /off phone but nothing is happening please help me

    That's going to be a ridiculous waste of money and energy.
    First of all, the current ATI drivers don't support multiple GPUs, so at the moment even a single 4870X2 would be only a 'normal' 4870 (which is quite a speed beast already). GFX drivers evolve rapidly, so things might look different next month, but when it comes to Linux and hardware there's one Golden Rule: stay away from the newest stuff and wait for proper support to get coded.
    I also wonder what power supply could possibly cope with the differences between idle and full load; that's way beyond 400W. But then, I'm one of those "quiet&green" types where >100W idle is already a bit much.
    I kind of understand that you want to get it done and not worry about hardware for the next 10 years or so, but that's simply not how the hardware world works and never did. At least not for the average consumer.

  • RBCA_PP_SIF_RUN_PP_TEMPLATE generates spool only in debug mode

    Hi
    I have developed a PP report based on the templaate RBCA_PP_SIF_RUN_PP_TEMPLATE. The report is a simple selection and is supposed to write to the spool (success or error messages). Using WRITE <text> should write to the spool for every job under this parallel processing.
    When I am debugging the code, or simply set a breakpoint (BCADEBUG) and execute, spool appears. But if i simply run the job with same variant (no debugging, no BCADEBUG), the spool does not appear.
    Any suggestions why this is happening ans how to generate spool in all modes.
    Regards
    Vikram

    Hi Billy,
    this is nasty.
    My strategy for this situation would be to start 2 browsers.
    In 1 browser session I use the Apex Application Builder and in the other (in private/ incognito) browser I run the application in debug mode.
    The debug information can be viewed in the Application Builder using the Utillities or by using the URL to the debug screen directly like so
    http://localhost:8888/pls/apex/f?p=4000:19:<APP_SESSION>:::RIR,19:IR_APPLICATION_ID,IR_PAGE_ID:<APP_ID_OF_APP_TO_DEBUG>,<PAGE_TO_DEBUG>regards,
    Erik-jan

  • Badi working only in Debug mode

    Hi experts,
    It's my first time with Badi, and I'm facing a issue I can't understand.
    I've activated badi ME_PROCESS_PO_CUST , and everything work's fine .
    From the method "Close" I call a Z... function which writes data on a custom table.
    I've tested  it and the system correctly update the table , but when I deactivate  the debug  in the badi's method , it looks like the badi is not implemented and the system doesn't pass trough the function. 
    Can somebody adress me to solve it ?
    Thank you in advance for any help.
    Ciao.

    Thank you for your help Sudhir , but the table update it's done by the custom function which should be called by the BAdI. My issue is that the BAdI's method works only if I set a break-point on it. If I do not put a break-point on the BAdI , the function is not called at all !!.
    Thanks again for your suggestion.

Maybe you are looking for