Problem when I execute program SCM in background

Hi experts,
    I am with problem when I execute a program (SCM) in background. I inserted a new field (estoque_seg(10)) and the process stopped at execute in background.When I call transaction and press F8, works but for this, I need jump the consistence  IF sy-batch IS INITIAL....Dont has any bath imput, only functions. Any idea?
Follow below the code:
Estrutura para tabela ENTRADA
DATA: BEGIN OF st_entrada,
        matnr(40)            TYPE c,
        werks(20)            TYPE c,
        ponto_abas(10)       TYPE c,
        estoque_max(10)      TYPE c,
        cobertura(10)        TYPE c,
        estoque_seg(10)      TYPE c, " Erlon Lourenço 20/01/2011
      END OF st_entrada.
Estrutura para tabela de LOG
*TYPES: BEGIN OF st_saida,
       pernr(8)             TYPE c ,
       date(10)             TYPE c,
       er_contribuition(15) TYPE c,
       tax(15)              TYPE c,
       msg_erro(80)         TYPE c,
     END OF st_saida.
Tabela para obter descricao da mensagem
*DATA: ti_saida TYPE STANDARD TABLE OF st_saida WITH HEADER LINE
                                              INITIAL SIZE 0.
Tabela que recebera o arquivo texto
DATA: BEGIN OF ti_entrada OCCURS 0.
        INCLUDE STRUCTURE st_entrada.
DATA: END OF ti_entrada.
DATA: BEGIN OF it_matid OCCURS 0,
  matnr TYPE /sapapo/matkey-matnr,
  matid TYPE /sapapo/matkey-matid,
END OF it_matid.
DATA: BEGIN OF it_locid OCCURS 0,
  locno TYPE /sapapo/loc-locno,
  locid TYPE /sapapo/loc-locid,
END OF it_locid.
DATA: BEGIN OF it_matlotsz OCCURS 0,
  target_dur TYPE /sapapo/matlotsz-target_dur,
  END OF it_matlotsz.
DATA:        wa_matloc       LIKE /sapapo/matloc   OCCURS  0 WITH HEADER LINE,
             wa_matlsim      LIKE /sapapo/matlsim  OCCURS  0 WITH HEADER LINE,
             wa_matlotsz     LIKE /sapapo/matlotsz OCCURS  0 WITH HEADER LINE.
Variáveis Globais
DATA: v_tabix   TYPE sy-tabix,
      v_vrsioid TYPE /sapapo/apo01-vrsioid,
      v_tam     TYPE i.
    Select-Options & Parameters
SELECTION-SCREEN SKIP.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS:  p_versao    TYPE /sapapo/apo01-vrsioex OBLIGATORY DEFAULT '000',
             p_abas  AS CHECKBOX  ,
             p_est   AS CHECKBOX  ,
             p_cober AS CHECKBOX  ,
             p_estsg AS CHECKBOX.   " ERLON LOURENCO - 20/01/2012 - Estoque Segurança
SELECTION-SCREEN END OF BLOCK b1.
    Start-of-Selection
START-OF-SELECTION.
  PERFORM consiste.
  PERFORM f_upload.
  PERFORM f_processa_batch.
  PERFORM f_saida_dados.
  MESSAGE i000 WITH 'Processo encerrado com Sucesso'.
END-OF-SELECTION.
*&      Form  F_UPLOAD
      text
-->  p1        text
<--  p2        text
FORM f_upload .
  DATA: lc_file TYPE string.
  TYPES: BEGIN OF st_ent,
            cam(80),
         END OF st_ent.
  DATA: ti_ent TYPE STANDARD TABLE OF st_ent WITH HEADER LINE
                                              INITIAL SIZE 0.
  RANGES: r_file       FOR zget0001-field_content.
  r_file[] = zbs_constantes=>obter( i_bukrs = space i_field = 'FILE' i_process = 'PONTO-REAB' ).
  READ TABLE r_file INDEX 1.
  lc_file = r_file-low.
  CLEAR: ti_entrada,
         ti_entrada[],
         ti_ent,
         ti_ent[].
abrir arquivo para leitura
  OPEN DATASET lc_file FOR INPUT  IN TEXT MODE ENCODING DEFAULT.
  IF sy-subrc NE 0.
    MESSAGE i000 WITH text-e01.
    STOP.
  ENDIF.
Leitura de arquivos
  DO.
    READ DATASET lc_file INTO ti_ent.
    IF sy-subrc <> 0.
      EXIT.
    ENDIF.
    APPEND ti_ent.
  ENDDO.
Fechamento do arquivo
  CLOSE DATASET lc_file.
  LOOP AT ti_ent.
    SPLIT ti_ent AT ';' INTO ti_entrada-matnr ti_entrada-werks ti_entrada-ponto_abas ti_entrada-estoque_max ti_entrada-cobertura ti_entrada-estoque_seg.
    APPEND ti_entrada.
  ENDLOOP.
ENDFORM.                    " F_UPLOAD
*&      Form  F_PROCESSA_BATCH
      text
-->  p1        text
<--  p2        text
FORM f_processa_batch .
  LOOP AT ti_entrada.
    v_tabix = sy-tabix.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        input  = ti_entrada-matnr
      IMPORTING
        output = ti_entrada-matnr.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        input  = ti_entrada-ponto_abas
      IMPORTING
        output = ti_entrada-ponto_abas.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        input  = ti_entrada-estoque_max
      IMPORTING
        output = ti_entrada-estoque_max.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        input  = ti_entrada-cobertura
      IMPORTING
        output = ti_entrada-cobertura.
IA - ERLON LOURENCO - 20/01/2012
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        input  = ti_entrada-estoque_seg
      IMPORTING
        output = ti_entrada-estoque_seg.
FA - ERLON LOURENCO - 20/01/2012
    MODIFY ti_entrada INDEX v_tabix.
  ENDLOOP.
  CLEAR: it_matid,
         it_matid[],
         it_locid,
         it_locid[],
         wa_matlsim,
         wa_matlsim[],
         wa_matloc,
         wa_matloc[].
  SELECT matnr matid INTO TABLE it_matid FROM /sapapo/matkey
  FOR ALL ENTRIES IN ti_entrada WHERE matnr = ti_entrada-matnr.
  SELECT locno locid INTO TABLE it_locid FROM /sapapo/loc
  FOR ALL ENTRIES IN ti_entrada WHERE locno = ti_entrada-werks.
  IF p_versao = '000'.
    LOOP AT ti_entrada.
      READ TABLE it_matid WITH KEY matnr = ti_entrada-matnr.
      IF sy-subrc = 0 .
        READ TABLE it_locid WITH KEY locno = ti_entrada-werks.
        IF sy-subrc = 0.
          SELECT SINGLE * INTO wa_matloc FROM /sapapo/matloc WHERE matid = it_matid-matid  AND
                                                                   locid = it_locid-locid.
          IF sy-subrc = 0.
            IF p_abas = 'X'.
              wa_matloc-reord    = ti_entrada-ponto_abas.
            ENDIF.
            IF p_est = 'X'.
              wa_matloc-maxstock = ti_entrada-estoque_max.
            ENDIF.
            " IA - Erlon Lourenço - 23/01/2012
            if p_estsg = 'X'.
              wa_matloc-safty    = ti_entrada-estoque_seg.     " Erlon Lourenço - 23/01/2012
            endif.
            "FA - Erlon Lourenço - 23/01/2012
            IF p_abas  = 'X'   OR
               p_est   = 'X'   OR
               p_estsg = 'X'.      " Erlon Lourenço - 23/01/2012
              APPEND wa_matloc TO wa_matloc.
            ENDIF.
            SELECT SINGLE * INTO wa_matlotsz FROM /sapapo/matlotsz WHERE lszid = wa_matloc-lszid.
            IF sy-subrc = 0.
              IF p_cober = 'X'.
                wa_matlotsz-target_dur = ti_entrada-cobertura.
                APPEND wa_matlotsz TO wa_matlotsz.
              ENDIF.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDLOOP.   " LOOP AT ti_entrada.
  ELSE.
Verifica versáo para saber se preenche a tabela wa_matlsim
    SELECT SINGLE vrsioid INTO v_vrsioid FROM /sapapo/apo01 WHERE vrsioex = p_versao.
    IF sy-subrc = 0.
      SELECT * INTO TABLE wa_matlsim FROM /sapapo/matlsim WHERE simid = v_vrsioid.
      IF wa_matlsim[] IS NOT INITIAL.
        LOOP AT ti_entrada.
          READ TABLE it_matid WITH KEY matnr = ti_entrada-matnr.
          IF sy-subrc = 0 .
            READ TABLE it_locid WITH KEY locno = ti_entrada-werks.
            IF sy-subrc = 0.
              READ TABLE wa_matlsim WITH KEY matid = wa_matloc-matid
                                             locid = wa_matloc-locid.
              IF sy-subrc = 0.
                wa_matlsim-reord    = ti_entrada-ponto_abas.
                wa_matlsim-maxstock = ti_entrada-estoque_max.
                wa_matlsim-safty    = ti_entrada-estoque_seg.     " Erlon Lourenço - 23/01/2012
                MODIFY wa_matlsim INDEX v_tabix.
              ENDIF.
            ENDIF.
          ENDIF.
        ENDLOOP.  " LOOP AT ti_entrada.
      ENDIF.     " IF wa_matlsim[] IS NOT INITIAL.
    ENDIF.     " IF sy-subrc = 0. 1º
  ENDIF.     "IF p_versao = '000'
Funcáo que atualiza campos nas bases de dados.
  CALL FUNCTION '/SAPAPO/DM_PRODUCTS_POST'
    EXPORTING
      iv_vb         = 'U'
    TABLES
      it_matloc     = wa_matloc
      it_matlsim    = wa_matlsim
      it_matlotsz   = wa_matlotsz
    EXCEPTIONS
      not_qualified = 1
      insert_failed = 2
      update_failed = 3
      OTHERS        = 4.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
ENDFORM.                    " F_PROCESSA_BATCH
  FORM  BDC_DYNPRO
*&      Form  F_SAIDA_DADOS
      text
-->  p1        text
<--  p2        text
FORM f_saida_dados .
IF ti_saida[] IS NOT INITIAL.
   DATA: lc_file TYPE string.
   lc_file = p_erros.
   CALL FUNCTION 'GUI_DOWNLOAD'
     EXPORTING
  BIN_FILESIZE                    =
       filename                        = lc_file
  FILETYPE                        = 'ASC'
     TABLES
       data_tab                        = ti_saida
  FIELDNAMES                      =
    EXCEPTIONS
      file_write_error                = 1
      no_batch                        = 2
      gui_refuse_filetransfer         = 3
      invalid_type                    = 4
      no_authority                    = 5
      unknown_error                   = 6
      header_not_allowed              = 7
      separator_not_allowed           = 8
      filesize_not_allowed            = 9
      header_too_long                 = 10
      dp_error_create                 = 11
      dp_error_send                   = 12
      dp_error_write                  = 13
      unknown_dp_error                = 14
      access_denied                   = 15
      dp_out_of_memory                = 16
      disk_full                       = 17
      dp_timeout                      = 18
      file_not_found                  = 19
      dataprovider_exception          = 20
      control_flush_error             = 21
      OTHERS                          = 22
   IF sy-subrc <> 0.
     MESSAGE i005 WITH 'Error to unload file !'.
     STOP.
   ENDIF.
ENDIF.
ENDFORM.                    " F_SAIDA_DADOS
*&      Form  CONSISTE
      text
-->  p1        text
<--  p2        text
FORM consiste .
  IF p_abas  IS INITIAL  AND
     p_est   IS INITIAL  AND
     p_cober IS INITIAL AND
     p_estsg IS INITIAL.   " ERLON LOURENCO - 20/01/2012 - Estoque Segurança
    MESSAGE i000 WITH text-e03.
    STOP.
  ENDIF.
  IF sy-batch IS INITIAL.
    MESSAGE i000 WITH text-e02.
    STOP.
  ENDIF.
Best regards,
Erlon Lourenço
Edited by: Erlon Louren on Jan 27, 2012 11:09 AM

Hi Raja,
            Check weather there are  any enhancements to the datasource.If yes once check the code in CMOD.Seems there is some discrepency in that.
Regards
Karthik

Similar Messages

  • Bluetooth Problems when running other programes in the background

    I have been experiening problems with the bluthooth conenctivity on my 2012 Macbook Air.
    It is the 2.0GHZ i7 8GB RAm with 256Gb flash storage model released June 2012.
    I use it in clamsehll mode hoked up to an external HD monitor using the Mini display port to HDMI adaptor and then link it to an external LG soundbar using bluetooht for audio.
    No other device has any issue linking ot the LG soundbar but when i am using my Macbook air and downloading something, even a tiny file that might only be goign at a speed of a few kb/s ( I have very slow internet speed ) it casues the bluetooth to cut out every 5-10 seconds and then some times it will work for an hour uninterupted.
    The only other bluthooth device I have connected is my Magic Trackpad and I have tried it without this with the same results occuring.
    Has anyone else experienced this and if so has nayone found a soltuion so that i can run a basic video file and hear the sound clearly and uninteruopted while using my Macbook to to run some other vey basic tasks in the background?
    Any help is greatly appreciated.

    I believe the process to do this is to:
    1)  Go to transaction SM36 to create a batch job. 
    2)  Enter a job name
    3)  Select "Step", specify the ABAP program name (for ME2M, this is RM06EM00), then type in the variant you wish to use
    4)  Save, then go to Start Condition and specify when you want this batch job to run, along with the frequency
    Edit - nevermind, I misunderstood the issue.  I am unsure of how to have the layout automatically populated.
    Edited by: Andy Slania on Jan 26, 2011 10:28 PM

  • When  i executed program , it go to dump, show this error

    Hi Gurs
    when  i executed program , it go to dump, show this error .
    Short text                                                   
         The ABAP program lines are wider than the internal table.
    Error in the ABAP Application Program                                                                               
    The current ABAP program "SAPLSKBH" had to be terminated because it has 
    come across a statement that unfortunately cannot be executed.          
    it show this lines.
        read report l_prog_tab_local into l_abap_source.          
      366 *      catch cx_sy_read_src_line_too_long into ex_too_long.   
      367 *    endtry.                                                  
      368     check sy-subrc eq 0.
    Edited by: Rob Burbank on Feb 17, 2010 2:54 PM

    d022s length is only 72 char
    so u have to copy D022S Structure  to ZD022S Structure and
    and define  like  LINE  CHAR(data type)  1500(length)
    then u define internal table like
    data: begin of itab occurs 0.
            include structure  Zd022s.
    data: end of itab.

  • I have a problem, when I execute an mapping from Desing Center, its frezeen

    I have a problem, when I execute an mapping from Desing Center, its frezeen, this doesnt send error can you help me plis
    Ali

    If I would be you, I will check mapping activity from backend using (TOAD/SESSION-BROWSER) your map should be under JDBC THIN CLIENT. Also check if your target table is locked by running this query (select
    c.owner,
    c.object_name,
    c.object_type,
    b.sid,
    b.serial#,
    b.status,
    b.osuser,
    b.machine
    from
    v$locked_object a ,
    v$session b,
    dba_objects c
    where
    b.sid = a.session_id
    and
    a.object_id = c.object_id;).

  • Have problem when using EXECUTE IMMEDIATE.

    Hi, i'm new here... i having problem when trying to use execute immediate statement... :(
    procedure code as below:
    create procedure copy_row(
    p_table varchar2,
    p_key varchar2,
    p_keyval varchar2,
    p_user varchar2,
    p_frmto varchar2 default 'FROM')
    IS
    V_SQL VARCHAR2(500);
    BEGIN
    if upper(p_frmto)='FROM' then
    V_SQL:='INSERT INTO '||P_TABLE||
    ' SELECT * FROM '||P_USER||'.'||P_TABLE||' WHERE '||P_KEY||' = '''||P_KEYVAL||'''';
    elsif upper(p_frmto)='TO' then
    V_SQL:='INSERT INTO '||P_USER||'.'||P_TABLE||
    ' SELECT * FROM '||P_TABLE||' WHERE '||P_KEY||' = '''||P_KEYVAL||'''';
    end if;
    EXECUTE IMMEDIATE V_SQL;
    exception
    when others then
    raise_application_error(-20000,'PROCEDURE: COPY_ROW - UNABLE TO COPY ROWS! SQL='||V_SQL,TRUE);
    end;
    is there any limitation on using EXECUTE IMMEDIATE command? i need to use procedure because i'm using old form builder.... but the database server was 9i which able to use this command, so... i decide to use procedure....
    i've done some testing on this.... assume the structure of schema1.table1 and schema2.table1 are same....
    SQL> CREATE PROCEDURE TESTING IS
    2 BEGIN
    3 exeCute IMMEDIATE 'INSERT INTO schema1.table1 SELECT * FROM schema2.table1 WHERE column1 = ''abc''';
    4 END;
    5 /
    Procedure created.
    SQL> BEGIN
    2 TESTING;
    3 END;
    4 /
    BEGIN
    ERROR at line 1:
    ORA-00942: table or view does not exist
    ORA-06512: at "SCHEMA1.TESTING", line 3
    ORA-06512: at line 2
    any idea?? or have better solution other than this?
    database server:9i
    sqlplus:SQL*Plus: Release 8.0.6.0.0

    Do you have an access to tables you are going to insert into / select from ?
    Dynamic SQL checks the access permissions at runtime, not at the compilation stage:
    SQL> create user master identified by master default tablespace users temporary
      2  tablespace temp;
    User created.
    SQL> alter user master quota unlimited on users;
    User altered.
    SQL> grant create session to master;
    Grant succeeded.
    SQL> grant create table to master;
    Grant succeeded.
    SQL> grant create procedure to master;
    Grant succeeded.
    SQL> conn master/master
    Connected.
    SQL> create procedure wrong_prc
      2  is
      3  begin
      4   execute immediate 'insert into master.t select * from scott.t';
      5  end;
      6  /
    Procedure created.
    SQL> create table t (id number);
    Table created.
    SQL> exec wrong_prc;
    BEGIN wrong_prc; END;
    ERROR at line 1:
    ORA-00942: table or view does not exist
    ORA-06512: at "MASTER.WRONG_PRC", line 4
    ORA-06512: at line 1
    SQL> conn scott/tiger
    Connected.
    SQL> grant select on t to master;
    Grant succeeded.
    SQL> conn master/master
    Connected.
    SQL> exec wrong_prc;
    PL/SQL procedure successfully completed.
    SQL> select * from t;
            ID
             1And don't use literals in dynamic SQL - you should use binding variables instead.
    Rgds.

  • Screen light auto turn dark when I use program/web with background dark in windows 8.1

    Hi there,
    I used HP Pavilion dv6t-6000 CTO Quad for 3 years.
    CPU: Intel core i7-2630QM
    GPU: AMD Radeon 6490m
    It build in windows 7 and I manual install ( fresh install ) windows 8. It's fine. But when I upgrade to windows 8.1, it have an issue and I really hate it.
    When I use "Sublime Text" ( with background is black ), the screen light is become darker. And when I back to ( e.g: a website with background is white ), the screen turn back to lighter.
    I tried many ways, included 4 ways here but it's NOT WORK. 
    NOTE: When I used Option 1 ( upper )
    1. Open PC settings, and click/tap on PC and devices on the left side
    2. Click/tap on Power and sleep on the left side, and turn on or off Adjust my screen brightness automatically on the right side under Brightness.
    ==> It's NOT SHOW button "Adjust my screen brightness automatically". It mean: I have NO built in auto brightness sensor.
    I think this issue is about AMD driver or Intel Graphic driver.
    Is anybody have idea???

    Hi @kolz,
    Welcome to the HP Forums!
    It is a wonderful  place to find answers and solutions!
    For you to have the best experience in the HP forum I would like to direct your attention to the HP Forums Guide Learn How to Post and More
    i grasp that after updating your system from Windows 8 to 8.1 you are having an issue with the display going dim.
    You have tried some steps you located on the web but there was no change.
    Windows 8 an 8.1 are not supported Operating Systems for your notebook.  This does not mean they will not work only that HP has not tested it and therefore does not supply updated drivers.  You would need to check the manufacturer's site for any updated drivers.
    Downloading or Updating Software and Drivers for HP Computers
    When I checked the driver page for your notebook I did notice there is a  bios update, have you done that?
    HP Pavilion dv6t-6000 CTO Quad Edition Entertainment Drivers and Software
    As a bios update does have a potential to cause damage I suggest contacting HP support for assistance with that process.
    Updating the BIOS
    Please call our technical support at 800 474 6836. If you live outside the US/Canada Region, please click the link below to get a support number for your region.
    World Wide Phone Support
    Good Luck!
    Here is a link to Troubleshooting a dim display (Windows 8, Windows 7 and Windows Vista)
    Sparkles1
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the bottom right to say “Thanks” for helping!

  • Language Problem when building executable

    I'm having a weird issue when building executables.  Labview seems to forget the english language.  I have tried selecting English exclusively as the run time language but when i do that i get a "No supported languages installed!" error. Everthing works fine in the development environment.  It only seems to apply to application menus and not custom user menus.  Thanks for any insight.  
    Solved!
    Go to Solution.
    Attachments:
    Language.png ‏3 KB

    Hello Jed394,
    I took a look into the issue, just to be sure the error thrown was “No support Language Installed,” correct?  Check to see if the language of your operating system and the language LabVIEW is using is English.  If these are both English, then it looks like this is an error due to installation issues in the run-time engine.  Try to perform a repair by going through the install menu of LabVIEW.  The following link will help you with the repair: http://digital.ni.com/public.nsf/allkb/FE6B641E86E55AF2862576DE00038001?OpenDocument
    If you have any further issues, please let me know. Thanks!
    Matt S.
    Industrial Communications Product Support Engineer
    National Instruments

  • Problem when calling function module CV120_DOC_CHECKOUT_VIEW in background

    Hi ,
    I'm currently developping an abap program which extract document from KPRO for printing into a windows Folder.
    For this I use standard function module CV120_DOC_CHECKOUT_VIEW.
    When i run my program in foreground task there's no problem, but when i run it in background task the extract doesn't work. It seems that the system cannot connect to the Windows Network.
    Whe the program is running in foreground task, the function module user SAPHHTP RFC destination, when it runs in background task it use SAPFTP destination .
    Does somebody can help me ?
    thanks in advance

    Hi Ajay,
    The program extract document into a folder on Windows Network that means on a server not on a PC .
    I know that in background task ther's no connection with sapgui.
    For example when i want to create a file on network n background task i use OPEN_DATASET instruction and that works fine.
    My problem is the use of the standard function module CV120_DOC_CHECKOUT_VIEW in background task because when this function module is running in background task it use the SAPFTP rfc destination instead of SAPHHTP rfc destination in foreground task . I check the RFC destination , thoses works both . SO i think the problem comes from parameters given to the function module.
    Regards.

  • Strange problem when a c++ program is triggered by Runtime.exec()

    I am working in linux system. I have 2 programs:
    1. one is a c++ program e.g. AAA. In this program, i use "system("gcc ...")" to call gcc to do some internal processing
    2. the other is a java program BBB. In this program, i use Runtime.exec("AAA") to run program AAA.
    case 1
    if I run c++ program AAA directly, everything goes well, gcc call via "system" is successful.
    case 2
    if I run java program BBB to trigger AAA indirectly, the AAA can be executed, but the system call (gcc call inside AAA) is failed.
    so, what is wrong? any hints? what is the solution to make case #2 work? I just want to use BBB to trigger AAA, and the system call should also be successful.
    thanks in advance for your help!

    "...but the system call (gcc call inside AAA) is failed."
    Isn't terribly descriptive, but I'm guessing that it complains it can't find gcc?
    If that's the case then it's because the call to Runtime.exec() runs the code in a shell with no idea where anything is, whereas when you run the C++ code straight it is running in the shell you kicked it off in. Something along those lines anyway.
    Someone else'll be able to tell you how to get it to work. I'm sure I've seen this sort of problem here several times.

  • Problem when calling external program

    Hi,
    I have a strange problem and no more idea how to solve it.
    What I do:
    In Java I call an external Fortran-exe with Runtime.getRuntime().exec(...) This Fortran program creates 4 files.
    What I get:
    One of the 4 files is incomplete, the first few lines are missing.
    What makes me wonder:
    When I take the exec-statement to the commandline and let it run there, everything is fine and the files contain all the info I need. All the 4 files are correct then.
    What I also tried:
    I tried to copy the (incomplete) file within Fortran. That means when I call the Fortran program I get 2 identical files then but with different filenames. Doing so on the commandline everything is fine again. But again, the same commandline String called in the exec in my Java program it is getting worse: The formerly incomplete file is empty now with 0 bytes.
    Even if I wait for the process to finish does not help.
    I do not understand it any more and would really like to know what happens there, why, and what can I do to avoid it or to get my complete output files. What does Runtime.getRuntime().exec(myString) do different than when I take the myString on the commandline?
    Any hints welcome.
    TIA

    Hi,
    unfortunately this does not help. I have already about 15 Fortran programs running this way which work accurately. So a possible problem with output stream does not look reasonable to me in this case.

  • Problem when using execute immediate str variable into refcursor var

    Hi,
    I have a packaged function which returns a "strong refcursor" variable to the calling program.
    inside this packaged function, i had to use dynamic sql ....
    i am doing it somethingl like this...
    execute immediate lc_submit_Sql into lrc_submitted;
    where lc_submit_Sql contains the query. and lrc_submitted is declared as a refcursor variable which is a recordtype.
    when calling this packaged function from an anonymous block getting an error.....
    "ora-00932 inconsistent datatypes:expecting - got -"
    I checked the select statment columns and the record type columns, their types and order. they are fine.
    not sure abt the reason.
    any help is appreciated. have some dead lines to meet.
    Thanks in advance.
    Kiran

    Hi John,
    the following is the code ....
    package spec...
    CREATE OR REPLACE PACKAGE refcur_kk IS
    --Sample submitted Function
    TYPE r_submitted IS RECORD(
    q_party_name apps.bpsicc_crm_quote_header_v.party_name%TYPE,
    q_party_id apps.bpsicc_crm_quote_header_v.cust_party_id%TYPE,
    q_quote_header_id apps.bpsicc_crm_quote_header_v.quote_header_id%TYPE,
    q_creation_date apps.bpsicc_crm_quote_header_v.quote_creation_date%TYPE,
    q_created_by apps.bpsicc_crm_quote_header_v.quote_created_by%TYPE,
    q_quote_status apps.bpsicc_crm_quote_header_v.quote_status%TYPE,
    q_quote_name apps.bpsicc_crm_quote_header_v.quote_name%TYPE,
    q_quote_number apps.bpsicc_crm_quote_header_v.quote_number%TYPE,
    q_internal_project_details apps.bpsicc_crm_quote_line_v.internal_project_details%TYPE,
    ql_item apps.bpsicc_crm_item_all_v.item_number%TYPE,
    ql_item_link apps.bpsicc_crm_item_all_v.item_link%TYPE,
    ql_party_link apps.bpsicc_gcm_party_details_v.party_link%TYPE,
    ql_quantity apps.bpsicc_crm_quote_line_v.quantity%TYPE,
    q_country apps.bpsicc_gcm_party_sites_v.party_site_country_name%TYPE,
    q_territory apps.bpsicc_crm_party_by_terr_mv.territory%TYPE,
    q_region apps.bpsicc_crm_party_by_terr_mv.region%TYPE,
    q_created_disp apps.bpsicc_crm_quote_header_v.quote_created_by_username%TYPE,
    reqst_shipdate apps.bpsicc_crm_quote_header_v.date_of_request%TYPE,
    q_item_color apps.bpsicc_crm_item_all_v.item_color%TYPE
    TYPE rc_submitted IS REF CURSOR;
    RETURN r_submitted;
    FUNCTION get_submitted(
    pd_start_date IN DATE,
    pc_time IN VARCHAR2,
    pd_end_date IN DATE,
    pc_party_id IN VARCHAR2,
    pc_price_class IN VARCHAR2,
    ps_section IN VARCHAR2,
    pn_sales_channel IN NUMBER,
    pc_country IN VARCHAR2,
    pc_territory IN VARCHAR2,
    pc_region IN VARCHAR2)
    RETURN rc_submitted;
    and the body of it.....
    ls_submit_sql:= 'SELECT bcqhv.party_name q_party_name,'||
    'bcqhv.cust_party_id q_party_id,'||
    'bcqhv.quote_header_id q_quote_header_id,'||
    'TRUNC(bcqhv.quote_creation_date) q_creation_date,'||
    'bcqhv.quote_created_by q_created_by,'||
    'bcqhv.quote_status q_quote_status,'||
    'bcqhv.quote_name q_quote_name,'||
    'bcqhv.quote_number q_quote_number,'||
    'bcqlv.internal_project_details q_internal_project_details,'||
    'bciav.item_number ql_item,'||
    'bciav.item_link ql_item_link,'||
    'bgpdv.party_link ql_party_link,'||
    'bcqlv.quantity ql_quantity,'||
    'bgpsv.party_site_country_name q_country,'||
    'bcpbtv.territory q_territory,'||
    'bcpbtv.region q_region,'||
    'bcqhv.quote_created_by_username q_created_disp,'||
    'bcqhv.date_of_request reqst_ship_date,'||
    'bciav.item_color q_item_color '||
    'FROM apps.bpsicc_crm_quote_header_v bcqhv,'||
    'apps.bpsicc_crm_party_by_terr_mv bcpbtv,'||
    'apps.bpsicc_gcm_party_sites_v bgpsv,'||
    'apps.bpsicc_crm_quote_line_v bcqlv,'||
    'apps.bpsicc_crm_item_all_v bciav,'||
    'apps.bpsicc_gcm_party_details_v bgpdv '||
    'WHERE bciav.inventory_item_id = bcqlv.inventory_item_id '||
    'AND bcqhv.cust_party_id = bcpbtv.party_id '||
    'AND bcqhv.sold_to_party_site_id = bgpsv.party_site_id '||
    'AND bgpdv.party_id = bcqhv.cust_party_id '||
    'AND bcqlv.quote_header_id = bcqhv.quote_header_id '||
    'AND bcqhv.quote_status IN ('||chr(39)||'Submitted to Lab for Review'||chr(39)||','||chr(39)||'Submitted to US Lab for Review'||chr(39)||')';
    execute immediate ls_submit_sql into lrc_submitted;
    returning lrc_submitted to the report which is calling this function.
    using oracle report builder.
    kiran

  • Strange problem when copying standard program SAPF100 (transaction F.05)

    Hi there ABAP'ers,
    I've got a very strange problem I can't figure out :/
    I'm doing a copy of a standard program - SAPF100, which stands for F.05 transaction.
    I copy it to ZSAPF100 and after launching it, filling a selection-screen with data and F8 I'm receiving a dump
    GETWA_NOT_ASSIGNED
    Field symbol has not yet been assigned.
    The termination occurred in the ABAP program "SAPF100" in "DO_SKC1C".      
    The main program was "ZSAPF100 ".                                                                               
    The termination occurred in line 253 of the source code of the (Include)   
    program "SAPF100_SBEW"                                                    
    of the source code of program "SAPF100_SBEW" (when calling the editor 2530).
    and when debugging the place in Zcode where error occurs - really a fs is not assigned, whilst in standard code is assigned.
    Why such situation appeared? I just copied the standard program and launched a copy :/ How to deal with that problem?
    I will be very very very thankful for a help.
    Regards. P.

    I'm doing the copy:
    Components:
    Source       
    Text elements
    Documentation
    Variants     
    User interface
    Screens      
    INCLUDEs     
    Includes:
    FROM            ->              TO
    <ICON>                         Z<ICON>     
    <LINE>                          Z<LINE>                 
    FIUUMS40                        ZFIUUMS40               
    RKASMAWF                        ZRKASMAWF               
    SAPF100_I1                      ZSAPF100_I1             
    SAPF100_POSTINGS                ZSAPF100_POSTINGS       
    SAPF100_SBEW                    ZSAPF100_SBEW           
    SAPF100_SLDATA                  ZSAPF100_SLDATA         
    SCHEDMAN_EVENTS                 ZSCHEDMAN_EVENTS        
    And still DUMP

  • Problem when runing sample program "SimpleTopicSubscriber"

    I am new to JMS, When i tried to run the jms tutorial example, Iam facing following error. I says"Check to see if parser conforms to JAXP 1.2 spec." but jaxp 1.2 api jar is in classpath.
    It may be simple. Can any one help me.
    jms_client.properites file content:
    #comments jms properties file
    com.sun.jms.internal.java.naming.provider.url=iiop://localhost:1050
    com.sun.jms.client.transport_preference=IIOP
    #Possible values are SEVERE,WARNING,INFO, FINE, FINER, FINEST.
    com.sun.jms.default.loglevel=WARNING
    com.sun.jms.internal.java.naming.factory.initial=com.sun.enterprise.naming.SerialInitContextFactory
    D:\Sample\jms_sample>setenv
    D:\Sample\jms_sample>set classpath=
    D:\Sample\jms_sample>set path=
    D:\Sample\jms_sample>set JAVA_HOME=D:\j2sdk1.4.0_01
    D:\Sample\jms_sample>set J2EE_HOME=D:\j2sdkee1.4
    D:\Sample\jms_sample>set classpath=.;D:\j2sdkee1.4\lib\j2ee.jar;D:\j2sdkee1.4\li
    b\locale;D:\j2sdk1.4.0_01\lib;D:\java_xml_pack-summer-02_01\jaxp-1.2_01\jaxp-api
    .jar
    D:\Sample\jms_sample>set path=D:\j2sdkee1.4\bin;D:\j2sdk1.4.0_01\bin;
    D:\Sample\jms_sample>java -Djms.properties=%J2EE_HOME%\config\jms_client.propert
    ies SimpleTopicSubscriber MyTopic
    Topic name is MyTopic
    WARNING : modify your java command line to include the -Djava.endorsed.dirs opti
    on
    Error: JAXP SAXParser property not recognized: http://java.sun.com/xml/jaxp/prop
    erties/schemaLanguage
    Check to see if parser conforms to JAXP 1.2 spec.
    XML Error line : 17 Element type "connector" is not declared.
    Dec 20, 2002 4:19:53 PM com.sun.enterprise.deployment.node.SaxParserHandler erro
    r
    SEVERE: XML Error line : 17 Element type "connector" is not declared.
    XML Error line : 18 Attribute "xmlns" is not declared for element "connector".
    Dec 20, 2002 4:19:53 PM com.sun.enterprise.deployment.node.SaxParserHandler erro
    r
    SEVERE: XML Error line : 18 Attribute "xmlns" is not declared for element "conne
    ctor".

    Hi,
    You have a mismatch between the J2EE SDK (1.4) and the tutorial version (1.3.1).
    Instead of using the J2EE 1.3.1 tutorial, you need to download the J2EE Tutorial Addendum, which you can reach at http://java.sun.com/j2ee/1.4/docs/tutorial/index.html.
    The JMS chapters and examples in that tutorial have been revised so that when you run them, you use the correct options and classpath setting. Running J2EE examples has become more complicated at J2EE 1.4, so we provide an ant build file and run script to make the examples less error-prone. As the warning suggested, you need to set the java.endorsed.dirs property when you run a program now, but you don't set the jms.properties any more. The actual command line for the J2EE 1.3.1 example should look like this, if you don't use the script (all on one line!):
    java -Djava.endorsed.dirs=%J2EE_HOME%\lib\endorsed -classpath .;%J2EE_HOME%\lib\j2ee.jar;%J2EE_HOME%\lib\system\jmsra.jar SimpleTopicSubscriber MyTopic
    I hope this is helpful --
    Kim Haase
    Technical Writer
    Sun Microsystems, Inc.

  • Problem when compiling C program from RFC SDK with Unicode on AIX 5.3

    hi friends.
    I try RFC with UNICODE.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/90313271-2311-2a10-c495-c20199d1d821
    This simple code compiled.
    #include <saprfc.h>
    #include <sapuc.h>
    #include <sapucx.h>
    int mainU(int argc, SAP_UC* argv[] )
        const SAP_UC* s1 = cU("Hello");
        SAP_UC s2[100];
        strcpyU( s2, s1);
        printfU(cU("%s
    "),s2);
        return 0;
    The compiling command is
    cc -DSAPwithUNICODE -I ../rfcsdkU/include -L ../rfcsdkU/lib sample.c -o sample -lrfcu -lC
    to compile.
    Then the error information comed:
    "sample.c", line 7.24: 1506-045 (S) Undeclared identifier U16LIT_cU.
    "sample.c", line 7.27: 1506-275 (S) Unexpected text string literal encountered.
    "sample.c", line 10.16: 1506-276 (S) Syntax error: possible missing ')'?
    I hope someone can tell me how I can get it through.
    Edited by: sakamoto shouichi on Apr 16, 2008 11:02 AM
    Edited by: sakamoto shouichi on Apr 16, 2008 11:03 AM

    hi friends. I'm having same problem.
    i speak english just a little.sorry.
    see this command line.
    AIX5.3
    cc -I ../rfcsdk/include -L ../saprfc/rfcsdk/lib sapinfo.c -o sapinfo -lrfc -lC
    add -lC .
    i fnish this problem. thnx!
    Edited by: sakamoto shouichi on Apr 7, 2008 5:32 AM

  • Change in Normal list when i execute Report in Background.

    Hi all ,
    When we execute the Report in background a normal list will be displayed in the spool. In that Normal
    list is it possible to shift the columns that are displayed at the last to be displayed at the beginning.
    Regards ,
    Murthy

    Hi,
    Yes you can do that.
    You can determine the program is runing in background mode by using system variable SY-BATCH = 'X'.
    If SY-BATCH = 'X'.
    Then you can shift the column of internal table.
    Endif.

Maybe you are looking for

  • How can I share a few of my songs on itunes with another pc

    I have sent a song from my pc to my sons pc and signed into itunes to authorise it on his pc with the understanding that this is allowed on up to 5 pc's. I upgraded his itunes and plugged in his nano. All appeared to be fine and his nano updated - bu

  • Downloaded new version of itunes and now it will not open on my Macbook

    downloaded new version of itunes and now it will not open on my Macbook

  • Can anyone tell me what this messsage means and how to fix it?

    I use CS3 to prepare a black and white newsletter for our village onmy MAC and frequently change colour photos to greyscale.  However when printing on my HP Colour Laserjet 2550L the photo shows as a dark green colour.  I've tried everything imaginab

  • Error in DW when using Dynamic Data

    Hello all, I'm not sure if my problem is common or rare, so I'll give you two versions. Short Version: Everytime I load a page with Dynamic date (I'm using PHP MySQL), the problem tells me an error was encountered and it boots me after I select to se

  • HDV Monitor Out?

    How does CS5 handle HD preview on an external monitor? Say one has the GTX 285 with two jacks...would you use a "y" adapter for two computer monitors and the other jack for HDTV? Will CS5 know to send the signal out to the HDTV?